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
/* Unix SMB/CIFS implementation. RFC2478 Compliant SPNEGO implementation Copyright (C) <NAME> <<EMAIL>> 2003 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef SAMBA_SPNEGO_H #define SAMBA_SPNEGO_H #define SPNEGO_DELEG_FLAG 0x01 #define SPNEGO_MUTUAL_FLAG 0x02 #define SPNEGO_REPLAY_FLAG 0x04 #define SPNEGO_SEQUENCE_FLAG 0x08 #define SPNEGO_ANON_FLAG 0x10 #define SPNEGO_CONF_FLAG 0x20 #define SPNEGO_INTEG_FLAG 0x40 #define SPNEGO_REQ_FLAG 0x80 #define SPNEGO_NEG_TOKEN_INIT 0 #define SPNEGO_NEG_TOKEN_TARG 1 typedef enum _spnego_negResult { SPNEGO_ACCEPT_COMPLETED = 0, SPNEGO_ACCEPT_INCOMPLETE = 1, SPNEGO_REJECT = 2 } negResult_t; typedef struct spnego_negTokenInit { const char **mechTypes; int reqFlags; DATA_BLOB mechToken; DATA_BLOB mechListMIC; } negTokenInit_t; typedef struct spnego_negTokenTarg { uint8 negResult; char *supportedMech; DATA_BLOB responseToken; DATA_BLOB mechListMIC; } negTokenTarg_t; typedef struct spnego_spnego { int type; negTokenInit_t negTokenInit; negTokenTarg_t negTokenTarg; } SPNEGO_DATA; #endif
31.89
53
(translation_unit) "/* \n Unix SMB/CIFS implementation.\n\n RFC2478 Compliant SPNEGO implementation\n\n Copyright (C) <NAME> <<EMAIL>> 2003\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 \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., 675 Mass Ave, Cambridge, MA 02139, USA.\n*/\n\n#ifndef SAMBA_SPNEGO_H\n#define SAMBA_SPNEGO_H\n\n#define SPNEGO_DELEG_FLAG 0x01\n#define SPNEGO_MUTUAL_FLAG 0x02\n#define SPNEGO_REPLAY_FLAG 0x04\n#define SPNEGO_SEQUENCE_FLAG 0x08\n#define SPNEGO_ANON_FLAG 0x10\n#define SPNEGO_CONF_FLAG 0x20\n#define SPNEGO_INTEG_FLAG 0x40\n#define SPNEGO_REQ_FLAG 0x80\n\n#define SPNEGO_NEG_TOKEN_INIT 0\n#define SPNEGO_NEG_TOKEN_TARG 1\n\ntypedef enum _spnego_negResult {\n SPNEGO_ACCEPT_COMPLETED = 0,\n SPNEGO_ACCEPT_INCOMPLETE = 1,\n SPNEGO_REJECT = 2\n} negResult_t;\n\ntypedef struct spnego_negTokenInit {\n const char **mechTypes;\n int reqFlags;\n DATA_BLOB mechToken;\n DATA_BLOB mechListMIC;\n} negTokenInit_t;\n\ntypedef struct spnego_negTokenTarg {\n uint8 negResult;\n char *supportedMech;\n DATA_BLOB responseToken;\n DATA_BLOB mechListMIC;\n} negTokenTarg_t;\n\ntypedef struct spnego_spnego {\n int type;\n negTokenInit_t negTokenInit;\n negTokenTarg_t negTokenTarg;\n} SPNEGO_DATA;\n\n#endif\n" (comment) "/* \n Unix SMB/CIFS implementation.\n\n RFC2478 Compliant SPNEGO implementation\n\n Copyright (C) <NAME> <<EMAIL>> 2003\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 \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., 675 Mass Ave, Cambridge, MA 02139, USA.\n*/" (preproc_ifdef) "#ifndef SAMBA_SPNEGO_H\n#define SAMBA_SPNEGO_H\n\n#define SPNEGO_DELEG_FLAG 0x01\n#define SPNEGO_MUTUAL_FLAG 0x02\n#define SPNEGO_REPLAY_FLAG 0x04\n#define SPNEGO_SEQUENCE_FLAG 0x08\n#define SPNEGO_ANON_FLAG 0x10\n#define SPNEGO_CONF_FLAG 0x20\n#define SPNEGO_INTEG_FLAG 0x40\n#define SPNEGO_REQ_FLAG 0x80\n\n#define SPNEGO_NEG_TOKEN_INIT 0\n#define SPNEGO_NEG_TOKEN_TARG 1\n\ntypedef enum _spnego_negResult {\n SPNEGO_ACCEPT_COMPLETED = 0,\n SPNEGO_ACCEPT_INCOMPLETE = 1,\n SPNEGO_REJECT = 2\n} negResult_t;\n\ntypedef struct spnego_negTokenInit {\n const char **mechTypes;\n int reqFlags;\n DATA_BLOB mechToken;\n DATA_BLOB mechListMIC;\n} negTokenInit_t;\n\ntypedef struct spnego_negTokenTarg {\n uint8 negResult;\n char *supportedMech;\n DATA_BLOB responseToken;\n DATA_BLOB mechListMIC;\n} negTokenTarg_t;\n\ntypedef struct spnego_spnego {\n int type;\n negTokenInit_t negTokenInit;\n negTokenTarg_t negTokenTarg;\n} SPNEGO_DATA;\n\n#endif" (#ifndef) "#ifndef" (identifier) "SAMBA_SPNEGO_H" (preproc_def) "#define SAMBA_SPNEGO_H\n" (#define) "#define" (identifier) "SAMBA_SPNEGO_H" (preproc_def) "#define SPNEGO_DELEG_FLAG 0x01\n" (#define) "#define" (identifier) "SPNEGO_DELEG_FLAG" (preproc_arg) "0x01" (preproc_def) "#define SPNEGO_MUTUAL_FLAG 0x02\n" (#define) "#define" (identifier) "SPNEGO_MUTUAL_FLAG" (preproc_arg) "0x02" (preproc_def) "#define SPNEGO_REPLAY_FLAG 0x04\n" (#define) "#define" (identifier) "SPNEGO_REPLAY_FLAG" (preproc_arg) "0x04" (preproc_def) "#define SPNEGO_SEQUENCE_FLAG 0x08\n" (#define) "#define" (identifier) "SPNEGO_SEQUENCE_FLAG" (preproc_arg) "0x08" (preproc_def) "#define SPNEGO_ANON_FLAG 0x10\n" (#define) "#define" (identifier) "SPNEGO_ANON_FLAG" (preproc_arg) "0x10" (preproc_def) "#define SPNEGO_CONF_FLAG 0x20\n" (#define) "#define" (identifier) "SPNEGO_CONF_FLAG" (preproc_arg) "0x20" (preproc_def) "#define SPNEGO_INTEG_FLAG 0x40\n" (#define) "#define" (identifier) "SPNEGO_INTEG_FLAG" (preproc_arg) "0x40" (preproc_def) "#define SPNEGO_REQ_FLAG 0x80\n" (#define) "#define" (identifier) "SPNEGO_REQ_FLAG" (preproc_arg) "0x80" (preproc_def) "#define SPNEGO_NEG_TOKEN_INIT 0\n" (#define) "#define" (identifier) "SPNEGO_NEG_TOKEN_INIT" (preproc_arg) "0" (preproc_def) "#define SPNEGO_NEG_TOKEN_TARG 1\n" (#define) "#define" (identifier) "SPNEGO_NEG_TOKEN_TARG" (preproc_arg) "1" (type_definition) "typedef enum _spnego_negResult {\n SPNEGO_ACCEPT_COMPLETED = 0,\n SPNEGO_ACCEPT_INCOMPLETE = 1,\n SPNEGO_REJECT = 2\n} negResult_t;" (typedef) "typedef" (enum_specifier) "enum _spnego_negResult {\n SPNEGO_ACCEPT_COMPLETED = 0,\n SPNEGO_ACCEPT_INCOMPLETE = 1,\n SPNEGO_REJECT = 2\n}" (enum) "enum" (type_identifier) "_spnego_negResult" (enumerator_list) "{\n SPNEGO_ACCEPT_COMPLETED = 0,\n SPNEGO_ACCEPT_INCOMPLETE = 1,\n SPNEGO_REJECT = 2\n}" ({) "{" (enumerator) "SPNEGO_ACCEPT_COMPLETED = 0" (identifier) "SPNEGO_ACCEPT_COMPLETED" (=) "=" (number_literal) "0" (,) "," (enumerator) "SPNEGO_ACCEPT_INCOMPLETE = 1" (identifier) "SPNEGO_ACCEPT_INCOMPLETE" (=) "=" (number_literal) "1" (,) "," (enumerator) "SPNEGO_REJECT = 2" (identifier) "SPNEGO_REJECT" (=) "=" (number_literal) "2" (}) "}" (type_identifier) "negResult_t" (;) ";" (type_definition) "typedef struct spnego_negTokenInit {\n const char **mechTypes;\n int reqFlags;\n DATA_BLOB mechToken;\n DATA_BLOB mechListMIC;\n} negTokenInit_t;" (typedef) "typedef" (struct_specifier) "struct spnego_negTokenInit {\n const char **mechTypes;\n int reqFlags;\n DATA_BLOB mechToken;\n DATA_BLOB mechListMIC;\n}" (struct) "struct" (type_identifier) "spnego_negTokenInit" (field_declaration_list) "{\n const char **mechTypes;\n int reqFlags;\n DATA_BLOB mechToken;\n DATA_BLOB mechListMIC;\n}" ({) "{" (field_declaration) "const char **mechTypes;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "**mechTypes" (*) "*" (pointer_declarator) "*mechTypes" (*) "*" (field_identifier) "mechTypes" (;) ";" (field_declaration) "int reqFlags;" (primitive_type) "int" (field_identifier) "reqFlags" (;) ";" (field_declaration) "DATA_BLOB mechToken;" (type_identifier) "DATA_BLOB" (field_identifier) "mechToken" (;) ";" (field_declaration) "DATA_BLOB mechListMIC;" (type_identifier) "DATA_BLOB" (field_identifier) "mechListMIC" (;) ";" (}) "}" (type_identifier) "negTokenInit_t" (;) ";" (type_definition) "typedef struct spnego_negTokenTarg {\n uint8 negResult;\n char *supportedMech;\n DATA_BLOB responseToken;\n DATA_BLOB mechListMIC;\n} negTokenTarg_t;" (typedef) "typedef" (struct_specifier) "struct spnego_negTokenTarg {\n uint8 negResult;\n char *supportedMech;\n DATA_BLOB responseToken;\n DATA_BLOB mechListMIC;\n}" (struct) "struct" (type_identifier) "spnego_negTokenTarg" (field_declaration_list) "{\n uint8 negResult;\n char *supportedMech;\n DATA_BLOB responseToken;\n DATA_BLOB mechListMIC;\n}" ({) "{" (field_declaration) "uint8 negResult;" (type_identifier) "uint8" (field_identifier) "negResult" (;) ";" (field_declaration) "char *supportedMech;" (primitive_type) "char" (pointer_declarator) "*supportedMech" (*) "*" (field_identifier) "supportedMech" (;) ";" (field_declaration) "DATA_BLOB responseToken;" (type_identifier) "DATA_BLOB" (field_identifier) "responseToken" (;) ";" (field_declaration) "DATA_BLOB mechListMIC;" (type_identifier) "DATA_BLOB" (field_identifier) "mechListMIC" (;) ";" (}) "}" (type_identifier) "negTokenTarg_t" (;) ";" (type_definition) "typedef struct spnego_spnego {\n int type;\n negTokenInit_t negTokenInit;\n negTokenTarg_t negTokenTarg;\n} SPNEGO_DATA;" (typedef) "typedef" (struct_specifier) "struct spnego_spnego {\n int type;\n negTokenInit_t negTokenInit;\n negTokenTarg_t negTokenTarg;\n}" (struct) "struct" (type_identifier) "spnego_spnego" (field_declaration_list) "{\n int type;\n negTokenInit_t negTokenInit;\n negTokenTarg_t negTokenTarg;\n}" ({) "{" (field_declaration) "int type;" (primitive_type) "int" (field_identifier) "type" (;) ";" (field_declaration) "negTokenInit_t negTokenInit;" (type_identifier) "negTokenInit_t" (field_identifier) "negTokenInit" (;) ";" (field_declaration) "negTokenTarg_t negTokenTarg;" (type_identifier) "negTokenTarg_t" (field_identifier) "negTokenTarg" (;) ";" (}) "}" (type_identifier) "SPNEGO_DATA" (;) ";" (#endif) "#endif"
155
0
{"language": "c", "success": true, "metadata": {"lines": 53, "avg_line_length": 31.89, "nodes": 123, "errors": 0, "source_hash": "d84ef6348e46e8f6fa334675f15e6d3381f94ce361f85fc89e568c2869517633", "categorized_nodes": 74}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SAMBA_SPNEGO_H\n#define SAMBA_SPNEGO_H\n\n#define SPNEGO_DELEG_FLAG 0x01\n#define SPNEGO_MUTUAL_FLAG 0x02\n#define SPNEGO_REPLAY_FLAG 0x04\n#define SPNEGO_SEQUENCE_FLAG 0x08\n#define SPNEGO_ANON_FLAG 0x10\n#define SPNEGO_CONF_FLAG 0x20\n#define SPNEGO_INTEG_FLAG 0x40\n#define SPNEGO_REQ_FLAG 0x80\n\n#define SPNEGO_NEG_TOKEN_INIT 0\n#define SPNEGO_NEG_TOKEN_TARG 1\n\ntypedef enum _spnego_negResult {\n\tSPNEGO_ACCEPT_COMPLETED = 0,\n\tSPNEGO_ACCEPT_INCOMPLETE = 1,\n\tSPNEGO_REJECT = 2\n} negResult_t;\n\ntypedef struct spnego_negTokenInit {\n\tconst char **mechTypes;\n\tint reqFlags;\n\tDATA_BLOB mechToken;\n\tDATA_BLOB mechListMIC;\n} negTokenInit_t;\n\ntypedef struct spnego_negTokenTarg {\n\tuint8 negResult;\n\tchar *supportedMech;\n\tDATA_BLOB responseToken;\n\tDATA_BLOB mechListMIC;\n} negTokenTarg_t;\n\ntypedef struct spnego_spnego {\n\tint type;\n\tnegTokenInit_t negTokenInit;\n\tnegTokenTarg_t negTokenTarg;\n} SPNEGO_DATA;\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 65, 87, 107, 122], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 64, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 2, "type": "identifier", "text": "SAMBA_SPNEGO_H", "parent": 0, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define SAMBA_SPNEGO_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 5, "type": "identifier", "text": "SAMBA_SPNEGO_H", "parent": 3, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 22}}, {"id": 6, "type": "preproc_def", "text": "#define SPNEGO_DELEG_FLAG 0x01\n", "parent": 0, "children": [7, 8, 9], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 8, "type": "identifier", "text": "SPNEGO_DELEG_FLAG", "parent": 6, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 25}}, {"id": 9, "type": "preproc_arg", "text": "0x01", "parent": 6, "children": [], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 33}}, {"id": 10, "type": "preproc_def", "text": "#define SPNEGO_MUTUAL_FLAG 0x02\n", "parent": 0, "children": [11, 12, 13], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 11, "type": "#define", "text": "#define", "parent": 10, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 12, "type": "identifier", "text": "SPNEGO_MUTUAL_FLAG", "parent": 10, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 26}}, {"id": 13, "type": "preproc_arg", "text": "0x02", "parent": 10, "children": [], "start_point": {"row": 27, "column": 29}, "end_point": {"row": 27, "column": 33}}, {"id": 14, "type": "preproc_def", "text": "#define SPNEGO_REPLAY_FLAG 0x04\n", "parent": 0, "children": [15, 16, 17], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 15, "type": "#define", "text": "#define", "parent": 14, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 16, "type": "identifier", "text": "SPNEGO_REPLAY_FLAG", "parent": 14, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 26}}, {"id": 17, "type": "preproc_arg", "text": "0x04", "parent": 14, "children": [], "start_point": {"row": 28, "column": 29}, "end_point": {"row": 28, "column": 33}}, {"id": 18, "type": "preproc_def", "text": "#define SPNEGO_SEQUENCE_FLAG 0x08\n", "parent": 0, "children": [19, 20, 21], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 19, "type": "#define", "text": "#define", "parent": 18, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 20, "type": "identifier", "text": "SPNEGO_SEQUENCE_FLAG", "parent": 18, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 28}}, {"id": 21, "type": "preproc_arg", "text": "0x08", "parent": 18, "children": [], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 33}}, {"id": 22, "type": "preproc_def", "text": "#define SPNEGO_ANON_FLAG 0x10\n", "parent": 0, "children": [23, 24, 25], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 23, "type": "#define", "text": "#define", "parent": 22, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 24, "type": "identifier", "text": "SPNEGO_ANON_FLAG", "parent": 22, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 24}}, {"id": 25, "type": "preproc_arg", "text": "0x10", "parent": 22, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 33}}, {"id": 26, "type": "preproc_def", "text": "#define SPNEGO_CONF_FLAG 0x20\n", "parent": 0, "children": [27, 28, 29], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 27, "type": "#define", "text": "#define", "parent": 26, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 28, "type": "identifier", "text": "SPNEGO_CONF_FLAG", "parent": 26, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 24}}, {"id": 29, "type": "preproc_arg", "text": "0x20", "parent": 26, "children": [], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 33}}, {"id": 30, "type": "preproc_def", "text": "#define SPNEGO_INTEG_FLAG 0x40\n", "parent": 0, "children": [31, 32, 33], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 31, "type": "#define", "text": "#define", "parent": 30, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 32, "type": "identifier", "text": "SPNEGO_INTEG_FLAG", "parent": 30, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 25}}, {"id": 33, "type": "preproc_arg", "text": "0x40", "parent": 30, "children": [], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 33}}, {"id": 34, "type": "preproc_def", "text": "#define SPNEGO_REQ_FLAG 0x80\n", "parent": 0, "children": [35, 36, 37], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 35, "type": "#define", "text": "#define", "parent": 34, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 36, "type": "identifier", "text": "SPNEGO_REQ_FLAG", "parent": 34, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 23}}, {"id": 37, "type": "preproc_arg", "text": "0x80", "parent": 34, "children": [], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 33}}, {"id": 38, "type": "preproc_def", "text": "#define SPNEGO_NEG_TOKEN_INIT 0\n", "parent": 0, "children": [39, 40, 41], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 39, "type": "#define", "text": "#define", "parent": 38, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 40, "type": "identifier", "text": "SPNEGO_NEG_TOKEN_INIT", "parent": 38, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 29}}, {"id": 41, "type": "preproc_arg", "text": "0", "parent": 38, "children": [], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 31}}, {"id": 42, "type": "preproc_def", "text": "#define SPNEGO_NEG_TOKEN_TARG 1\n", "parent": 0, "children": [43, 44, 45], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 43, "type": "#define", "text": "#define", "parent": 42, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 44, "type": "identifier", "text": "SPNEGO_NEG_TOKEN_TARG", "parent": 42, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 29}}, {"id": 45, "type": "preproc_arg", "text": "1", "parent": 42, "children": [], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 31}}, {"id": 46, "type": "type_definition", "text": "typedef enum _spnego_negResult {\n\tSPNEGO_ACCEPT_COMPLETED = 0,\n\tSPNEGO_ACCEPT_INCOMPLETE = 1,\n\tSPNEGO_REJECT = 2\n} negResult_t;", "parent": 0, "children": [47, 48, 64], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 42, "column": 14}}, {"id": 47, "type": "typedef", "text": "typedef", "parent": 46, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 48, "type": "enum_specifier", "text": "enum _spnego_negResult {\n\tSPNEGO_ACCEPT_COMPLETED = 0,\n\tSPNEGO_ACCEPT_INCOMPLETE = 1,\n\tSPNEGO_REJECT = 2\n}", "parent": 46, "children": [49, 50, 51], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 42, "column": 1}}, {"id": 49, "type": "enum", "text": "enum", "parent": 48, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 12}}, {"id": 50, "type": "type_identifier", "text": "_spnego_negResult", "parent": 48, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 30}}, {"id": 51, "type": "enumerator_list", "text": "{\n\tSPNEGO_ACCEPT_COMPLETED = 0,\n\tSPNEGO_ACCEPT_INCOMPLETE = 1,\n\tSPNEGO_REJECT = 2\n}", "parent": 48, "children": [52, 56, 60], "start_point": {"row": 38, "column": 31}, "end_point": {"row": 42, "column": 1}}, {"id": 52, "type": "enumerator", "text": "SPNEGO_ACCEPT_COMPLETED = 0", "parent": 51, "children": [53, 54, 55], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 28}}, {"id": 53, "type": "identifier", "text": "SPNEGO_ACCEPT_COMPLETED", "parent": 52, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 24}}, {"id": 54, "type": "=", "text": "=", "parent": 52, "children": [], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 26}}, {"id": 55, "type": "number_literal", "text": "0", "parent": 52, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 28}}, {"id": 56, "type": "enumerator", "text": "SPNEGO_ACCEPT_INCOMPLETE = 1", "parent": 51, "children": [57, 58, 59], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 29}}, {"id": 57, "type": "identifier", "text": "SPNEGO_ACCEPT_INCOMPLETE", "parent": 56, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 25}}, {"id": 58, "type": "=", "text": "=", "parent": 56, "children": [], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 27}}, {"id": 59, "type": "number_literal", "text": "1", "parent": 56, "children": [], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 29}}, {"id": 60, "type": "enumerator", "text": "SPNEGO_REJECT = 2", "parent": 51, "children": [61, 62, 63], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 18}}, {"id": 61, "type": "identifier", "text": "SPNEGO_REJECT", "parent": 60, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 14}}, {"id": 62, "type": "=", "text": "=", "parent": 60, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 16}}, {"id": 63, "type": "number_literal", "text": "2", "parent": 60, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 18}}, {"id": 64, "type": "type_identifier", "text": "negResult_t", "parent": 46, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 13}}, {"id": 65, "type": "type_definition", "text": "typedef struct spnego_negTokenInit {\n\tconst char **mechTypes;\n\tint reqFlags;\n\tDATA_BLOB mechToken;\n\tDATA_BLOB mechListMIC;\n} negTokenInit_t;", "parent": 0, "children": [66, 67, 86], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 49, "column": 17}}, {"id": 66, "type": "typedef", "text": "typedef", "parent": 65, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 67, "type": "struct_specifier", "text": "struct spnego_negTokenInit {\n\tconst char **mechTypes;\n\tint reqFlags;\n\tDATA_BLOB mechToken;\n\tDATA_BLOB mechListMIC;\n}", "parent": 65, "children": [68, 69], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 49, "column": 1}}, {"id": 68, "type": "struct", "text": "struct", "parent": 67, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 14}}, {"id": 69, "type": "type_identifier", "text": "spnego_negTokenInit", "parent": 67, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 34}}, {"id": 70, "type": "field_declaration", "text": "const char **mechTypes;", "parent": 67, "children": [71, 72], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 24}}, {"id": 71, "type": "primitive_type", "text": "char", "parent": 70, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 11}}, {"id": 72, "type": "pointer_declarator", "text": "**mechTypes", "parent": 70, "children": [73, 74], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 23}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 13}}, {"id": 74, "type": "pointer_declarator", "text": "*mechTypes", "parent": 72, "children": [75, 76], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 23}}, {"id": 75, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 14}}, {"id": 76, "type": "field_identifier", "text": "mechTypes", "parent": 74, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 23}}, {"id": 77, "type": "field_declaration", "text": "int reqFlags;", "parent": 67, "children": [78, 79], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 14}}, {"id": 78, "type": "primitive_type", "text": "int", "parent": 77, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 4}}, {"id": 79, "type": "field_identifier", "text": "reqFlags", "parent": 77, "children": [], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 13}}, {"id": 80, "type": "field_declaration", "text": "DATA_BLOB mechToken;", "parent": 67, "children": [81, 82], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 21}}, {"id": 81, "type": "type_identifier", "text": "DATA_BLOB", "parent": 80, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 10}}, {"id": 82, "type": "field_identifier", "text": "mechToken", "parent": 80, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 20}}, {"id": 83, "type": "field_declaration", "text": "DATA_BLOB mechListMIC;", "parent": 67, "children": [84, 85], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 23}}, {"id": 84, "type": "type_identifier", "text": "DATA_BLOB", "parent": 83, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 10}}, {"id": 85, "type": "field_identifier", "text": "mechListMIC", "parent": 83, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 22}}, {"id": 86, "type": "type_identifier", "text": "negTokenInit_t", "parent": 65, "children": [], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 16}}, {"id": 87, "type": "type_definition", "text": "typedef struct spnego_negTokenTarg {\n\tuint8 negResult;\n\tchar *supportedMech;\n\tDATA_BLOB responseToken;\n\tDATA_BLOB mechListMIC;\n} negTokenTarg_t;", "parent": 0, "children": [88, 89, 106], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 56, "column": 17}}, {"id": 88, "type": "typedef", "text": "typedef", "parent": 87, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 7}}, {"id": 89, "type": "struct_specifier", "text": "struct spnego_negTokenTarg {\n\tuint8 negResult;\n\tchar *supportedMech;\n\tDATA_BLOB responseToken;\n\tDATA_BLOB mechListMIC;\n}", "parent": 87, "children": [90, 91], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 56, "column": 1}}, {"id": 90, "type": "struct", "text": "struct", "parent": 89, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 14}}, {"id": 91, "type": "type_identifier", "text": "spnego_negTokenTarg", "parent": 89, "children": [], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 34}}, {"id": 92, "type": "field_declaration", "text": "uint8 negResult;", "parent": 89, "children": [93, 94], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 17}}, {"id": 93, "type": "type_identifier", "text": "uint8", "parent": 92, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 6}}, {"id": 94, "type": "field_identifier", "text": "negResult", "parent": 92, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 16}}, {"id": 95, "type": "field_declaration", "text": "char *supportedMech;", "parent": 89, "children": [96, 97], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 21}}, {"id": 96, "type": "primitive_type", "text": "char", "parent": 95, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 5}}, {"id": 97, "type": "pointer_declarator", "text": "*supportedMech", "parent": 95, "children": [98, 99], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 20}}, {"id": 98, "type": "*", "text": "*", "parent": 97, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 7}}, {"id": 99, "type": "field_identifier", "text": "supportedMech", "parent": 97, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 20}}, {"id": 100, "type": "field_declaration", "text": "DATA_BLOB responseToken;", "parent": 89, "children": [101, 102], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 25}}, {"id": 101, "type": "type_identifier", "text": "DATA_BLOB", "parent": 100, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 10}}, {"id": 102, "type": "field_identifier", "text": "responseToken", "parent": 100, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 24}}, {"id": 103, "type": "field_declaration", "text": "DATA_BLOB mechListMIC;", "parent": 89, "children": [104, 105], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 23}}, {"id": 104, "type": "type_identifier", "text": "DATA_BLOB", "parent": 103, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 10}}, {"id": 105, "type": "field_identifier", "text": "mechListMIC", "parent": 103, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 22}}, {"id": 106, "type": "type_identifier", "text": "negTokenTarg_t", "parent": 87, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 16}}, {"id": 107, "type": "type_definition", "text": "typedef struct spnego_spnego {\n\tint type;\n\tnegTokenInit_t negTokenInit;\n\tnegTokenTarg_t negTokenTarg;\n} SPNEGO_DATA;", "parent": 0, "children": [108, 109, 121], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 62, "column": 14}}, {"id": 108, "type": "typedef", "text": "typedef", "parent": 107, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 7}}, {"id": 109, "type": "struct_specifier", "text": "struct spnego_spnego {\n\tint type;\n\tnegTokenInit_t negTokenInit;\n\tnegTokenTarg_t negTokenTarg;\n}", "parent": 107, "children": [110, 111], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 62, "column": 1}}, {"id": 110, "type": "struct", "text": "struct", "parent": 109, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 14}}, {"id": 111, "type": "type_identifier", "text": "spnego_spnego", "parent": 109, "children": [], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 28}}, {"id": 112, "type": "field_declaration", "text": "int type;", "parent": 109, "children": [113, 114], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 10}}, {"id": 113, "type": "primitive_type", "text": "int", "parent": 112, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 4}}, {"id": 114, "type": "field_identifier", "text": "type", "parent": 112, "children": [], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 9}}, {"id": 115, "type": "field_declaration", "text": "negTokenInit_t negTokenInit;", "parent": 109, "children": [116, 117], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 29}}, {"id": 116, "type": "type_identifier", "text": "negTokenInit_t", "parent": 115, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 15}}, {"id": 117, "type": "field_identifier", "text": "negTokenInit", "parent": 115, "children": [], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 28}}, {"id": 118, "type": "field_declaration", "text": "negTokenTarg_t negTokenTarg;", "parent": 109, "children": [119, 120], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 29}}, {"id": 119, "type": "type_identifier", "text": "negTokenTarg_t", "parent": 118, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 15}}, {"id": 120, "type": "field_identifier", "text": "negTokenTarg", "parent": 118, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 28}}, {"id": 121, "type": "type_identifier", "text": "SPNEGO_DATA", "parent": 107, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 13}}, {"id": 122, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [46, 65, 70, 77, 80, 83, 87, 92, 95, 100, 103, 107, 112, 115, 118], "classes": [67, 68, 89, 90, 109, 110], "imports": [], "modules": [], "enums": [48, 49, 51, 52, 56, 60]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 50, 53, 57, 61, 64, 69, 76, 79, 81, 82, 84, 85, 86, 91, 93, 94, 99, 101, 102, 104, 105, 106, 111, 114, 116, 117, 119, 120, 121, 122], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [55, 59, 63], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 67, "universal_type": "class", "name": "spnego_negTokenInit", "text_snippet": "struct spnego_negTokenInit {\n\tconst char **mechTypes;\n\tint reqFlags;\n\tDATA_BLOB mechToken;\n\tDATA_BLO"}, {"node_id": 68, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 89, "universal_type": "class", "name": "spnego_negTokenTarg", "text_snippet": "struct spnego_negTokenTarg {\n\tuint8 negResult;\n\tchar *supportedMech;\n\tDATA_BLOB responseToken;\n\tDATA"}, {"node_id": 90, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 109, "universal_type": "class", "name": "spnego_spnego", "text_snippet": "struct spnego_spnego {\n\tint type;\n\tnegTokenInit_t negTokenInit;\n\tnegTokenTarg_t negTokenTarg;\n}"}, {"node_id": 110, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": []}, "original_source_code": "/* \n Unix SMB/CIFS implementation.\n\n RFC2478 Compliant SPNEGO implementation\n\n Copyright (C) <NAME> <<EMAIL>> 2003\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 \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., 675 Mass Ave, Cambridge, MA 02139, USA.\n*/\n\n#ifndef SAMBA_SPNEGO_H\n#define SAMBA_SPNEGO_H\n\n#define SPNEGO_DELEG_FLAG 0x01\n#define SPNEGO_MUTUAL_FLAG 0x02\n#define SPNEGO_REPLAY_FLAG 0x04\n#define SPNEGO_SEQUENCE_FLAG 0x08\n#define SPNEGO_ANON_FLAG 0x10\n#define SPNEGO_CONF_FLAG 0x20\n#define SPNEGO_INTEG_FLAG 0x40\n#define SPNEGO_REQ_FLAG 0x80\n\n#define SPNEGO_NEG_TOKEN_INIT 0\n#define SPNEGO_NEG_TOKEN_TARG 1\n\ntypedef enum _spnego_negResult {\n\tSPNEGO_ACCEPT_COMPLETED = 0,\n\tSPNEGO_ACCEPT_INCOMPLETE = 1,\n\tSPNEGO_REJECT = 2\n} negResult_t;\n\ntypedef struct spnego_negTokenInit {\n\tconst char **mechTypes;\n\tint reqFlags;\n\tDATA_BLOB mechToken;\n\tDATA_BLOB mechListMIC;\n} negTokenInit_t;\n\ntypedef struct spnego_negTokenTarg {\n\tuint8 negResult;\n\tchar *supportedMech;\n\tDATA_BLOB responseToken;\n\tDATA_BLOB mechListMIC;\n} negTokenTarg_t;\n\ntypedef struct spnego_spnego {\n\tint type;\n\tnegTokenInit_t negTokenInit;\n\tnegTokenTarg_t negTokenTarg;\n} SPNEGO_DATA;\n\n#endif\n"}
300
c
// // BZCommonAlertView.h // Project // // Created by sins on 16/7/11. // Copyright © 2018 益萃网络科技(中国)有限公司. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> @interface BZCommonAlertView : NSObject + (void)showAlterWillDismiss:(NSString *)alterText; @end
23.17
12
(translation_unit) "//\n// BZCommonAlertView.h\n// Project\n//\n// Created by sins on 16/7/11.\n// Copyright © 2018 益萃网络科技(中国)有限公司. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\n@interface BZCommonAlertView : NSObject\n\n+ (void)showAlterWillDismiss:(NSString *)alterText;\n\n@end\n" (comment) "//" (comment) "// BZCommonAlertView.h" (comment) "// Project" (comment) "//" (comment) "// Created by sins on 16/7/11." (comment) "// Copyright © 2018 益萃网络科技(中国)有限公司. All rights reserved.\n//\n\n#import <Foundation/Foun" (comment) "at" (preproc_call) "n.h>\n#import <UIKit/UIKit.h>\n\n@int" (preproc_directive) "n.h>\n#i" (preproc_arg) "port <UIKit/UIKit.h>\n\n@in" (preproc_call) "erface BZCommonAlertView" (preproc_directive) "erface " (preproc_arg) "ZCommonAlertVie" (ERROR) ": NSObject\n\n+ (void)showAlterWillDismiss:(NSString *)alterText;\n\n@end\n" (ERROR) ":" (type_identifier) " NSObject" (identifier) "\n+ (void)showAlte" (:) "W" (identifier) "llDismis" (unary_expression) "(NSString *)alterText;\n\n@end" (+) "(" (cast_expression) "SString *)alterText;\n\n@end" (() "S" (type_descriptor) "Stri" (primitive_type) "Stri" ()) "n" (identifier) "g *)alterText;\n\n@end" (:) "\n" (() "" (binary_expression) "" (identifier) "" (*) "" (ERROR) "" ()) "" (identifier) "" (expression_statement) "" (;) "" (ERROR) "" (ERROR) "" (expression_statement) "" (identifier) "" (;) ""
43
5
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 23.17, "nodes": 23, "errors": 0, "source_hash": "dc9f68115e2665f962af4797ee596395f31243e064e7a395df5fdd27b3254073", "categorized_nodes": 12}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "n.h>\n#import <UIKit/UIKit.h>\n\n@int", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "n.h>\n#i", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "port <UIKit/UIKit.h>\n\n@in", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "preproc_call", "text": "erface BZCommonAlertView", "parent": null, "children": [4, 5], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": "erface ", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "ZCommonAlertVie", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 23}}, {"id": 6, "type": "ERROR", "text": ": NSObject\n\n+ (void)showAlterWillDismiss:(NSString *)alterText;\n\n@end\n", "parent": null, "children": [7, 8, 9, 10, 15], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 13, "column": 50}}, {"id": 7, "type": "type_identifier", "text": " NSObject", "parent": 6, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 8, "type": "identifier", "text": "\n+ (void)showAlte", "parent": 6, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 28}}, {"id": 9, "type": "identifier", "text": "llDismis", "parent": 6, "children": [], "start_point": {"row": 11, "column": 31}, "end_point": {"row": 11, "column": 39}}, {"id": 10, "type": "unary_expression", "text": "(NSString *)alterText;\n\n@end", "parent": 6, "children": [11], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 28}}, {"id": 11, "type": "cast_expression", "text": "SString *)alterText;\n\n@end", "parent": 10, "children": [12, 14], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 28}}, {"id": 12, "type": "type_descriptor", "text": "Stri", "parent": 11, "children": [13], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 13, "type": "primitive_type", "text": "Stri", "parent": 12, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 14, "type": "identifier", "text": "g *)alterText;\n\n@end", "parent": 11, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 28}}, {"id": 15, "type": "binary_expression", "text": "", "parent": 6, "children": [16, 17, 18, 19], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 50}}, {"id": 16, "type": "identifier", "text": "", "parent": 15, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 38}}, {"id": 17, "type": "*", "text": "", "parent": 15, "children": [], "start_point": {"row": 13, "column": 39}, "end_point": {"row": 13, "column": 40}}, {"id": 18, "type": "ERROR", "text": "", "parent": 15, "children": [], "start_point": {"row": 13, "column": 40}, "end_point": {"row": 13, "column": 41}}, {"id": 19, "type": "identifier", "text": "", "parent": 15, "children": [], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 50}}, {"id": 20, "type": "ERROR", "text": "", "parent": null, "children": [21], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 21, "type": "ERROR", "text": "", "parent": 20, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 22, "type": "identifier", "text": "", "parent": null, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [10, 11, 15], "assignments": [], "loops": [], "conditionals": [7, 8, 9, 14, 16, 19, 22], "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// BZCommonAlertView.h\n// Project\n//\n// Created by sins on 16/7/11.\n// Copyright \u00a9 2018 \u76ca\u8403\u7f51\u7edc\u79d1\u6280\uff08\u4e2d\u56fd\uff09\u6709\u9650\u516c\u53f8. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\n@interface BZCommonAlertView : NSObject\n\n+ (void)showAlterWillDismiss:(NSString *)alterText;\n\n@end\n"}
301
c
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #pragma once class MY_OBJ { public: MY_OBJ(PCWSTR pstr) : _pstr(pstr) {} PCWSTR GetString() { return _pstr; } private: PCWSTR _pstr; }; class MY_HASH : public HASH_TABLE<MY_OBJ,PCWSTR> { public: VOID ReferenceRecord( MY_OBJ * //pRecord ) {} VOID DereferenceRecord( MY_OBJ * //pRecord ) {} PCWSTR ExtractKey( MY_OBJ * pRecord ) { return pRecord->GetString(); } DWORD CalcKeyHash( PCWSTR key ) { return HashString(key); } BOOL EqualKeys( PCWSTR key1, PCWSTR key2 ) { return (wcscmp(key1, key2) == 0); } }; void TestHash();
15.19
53
(translation_unit) "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\n#pragma once\n\nclass MY_OBJ\n{\n public:\n MY_OBJ(PCWSTR pstr)\n : _pstr(pstr)\n {}\n\n PCWSTR GetString()\n {\n return _pstr;\n }\n\n private:\n PCWSTR _pstr;\n};\n\nclass MY_HASH : public HASH_TABLE<MY_OBJ,PCWSTR>\n{\n public:\n VOID\n ReferenceRecord(\n MY_OBJ * //pRecord\n )\n {}\n\n VOID\n DereferenceRecord(\n MY_OBJ * //pRecord\n )\n {}\n\n PCWSTR\n ExtractKey(\n MY_OBJ * pRecord\n )\n {\n return pRecord->GetString();\n }\n\n DWORD\n CalcKeyHash(\n PCWSTR key\n )\n {\n return HashString(key);\n }\n\n BOOL\n EqualKeys(\n PCWSTR key1,\n PCWSTR key2\n )\n {\n return (wcscmp(key1, key2) == 0);\n }\n};\n\nvoid TestHash();" (comment) "// Copyright (c) Microsoft Corporation. All rights reserved." (comment) "// Licensed under the MIT license." (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (function_definition) "class MY_OBJ\n{\n public:\n MY_OBJ(PCWSTR pstr)\n : _pstr(pstr)\n {}\n\n PCWSTR GetString()\n {\n return _pstr;\n }" (type_identifier) "class" (identifier) "MY_OBJ" (compound_statement) "{\n public:\n MY_OBJ(PCWSTR pstr)\n : _pstr(pstr)\n {}\n\n PCWSTR GetString()\n {\n return _pstr;\n }" ({) "{" (labeled_statement) "public:\n MY_OBJ(PCWSTR pstr)\n : _pstr(pstr)\n {}\n\n PCWSTR GetString()\n {\n return _pstr;" (statement_identifier) "public" (:) ":" (declaration) "MY_OBJ(PCWSTR pstr)\n : _pstr(pstr)\n {}\n\n PCWSTR GetString()\n {\n return _pstr;" (macro_type_specifier) "MY_OBJ(PCWSTR pstr)" (identifier) "MY_OBJ" (() "(" (type_descriptor) "PCWSTR" (type_identifier) "PCWSTR" (ERROR) "pstr" (identifier) "pstr" ()) ")" (ERROR) ": _pstr(pstr)\n {}\n\n PCWSTR GetString()\n {\n return" (:) ":" (function_declarator) "_pstr(pstr)" (identifier) "_pstr" (parameter_list) "(pstr)" (() "(" (parameter_declaration) "pstr" (type_identifier) "pstr" ()) ")" ({) "{" (}) "}" (identifier) "PCWSTR" (function_declarator) "GetString()" (identifier) "GetString" (parameter_list) "()" (() "(" ()) ")" ({) "{" (return) "return" (identifier) "_pstr" (;) ";" (}) "}" (labeled_statement) "private:\n PCWSTR _pstr;" (statement_identifier) "private" (:) ":" (declaration) "PCWSTR _pstr;" (type_identifier) "PCWSTR" (identifier) "_pstr" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (ERROR) "class MY_HASH : public HASH_TABLE<MY_OBJ,PCWSTR>" (type_identifier) "class" (ERROR) "MY_HASH : public HASH_TABLE<" (identifier) "MY_HASH" (:) ":" (identifier) "public" (identifier) "HASH_TABLE" (<) "<" (identifier) "MY_OBJ" (,) "," (identifier) "PCWSTR" (>) ">" (compound_statement) "{\n public:\n VOID\n ReferenceRecord(\n MY_OBJ * //pRecord\n )\n {}\n\n VOID\n DereferenceRecord(\n MY_OBJ * //pRecord\n )\n {}\n\n PCWSTR\n ExtractKey(\n MY_OBJ * pRecord\n )\n {\n return pRecord->GetString();\n }\n\n DWORD\n CalcKeyHash(\n PCWSTR key\n )\n {\n return HashString(key);\n }\n\n BOOL\n EqualKeys(\n PCWSTR key1,\n PCWSTR key2\n )\n {\n return (wcscmp(key1, key2) == 0);\n }\n}" ({) "{" (labeled_statement) "public:\n VOID\n ReferenceRecord(\n MY_OBJ * //pRecord\n )\n {}" (statement_identifier) "public" (:) ":" (ERROR) "VOID\n ReferenceRecord(\n MY_OBJ * //pRecord\n )" (type_identifier) "VOID" (function_declarator) "ReferenceRecord(\n MY_OBJ * //pRecord\n )" (identifier) "ReferenceRecord" (parameter_list) "(\n MY_OBJ * //pRecord\n )" (() "(" (parameter_declaration) "MY_OBJ *" (type_identifier) "MY_OBJ" (abstract_pointer_declarator) "*" (*) "*" (comment) "//pRecord" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "VOID\n DereferenceRecord(\n MY_OBJ * //pRecord\n )\n {}" (type_identifier) "VOID" (function_declarator) "DereferenceRecord(\n MY_OBJ * //pRecord\n )" (identifier) "DereferenceRecord" (parameter_list) "(\n MY_OBJ * //pRecord\n )" (() "(" (parameter_declaration) "MY_OBJ *" (type_identifier) "MY_OBJ" (abstract_pointer_declarator) "*" (*) "*" (comment) "//pRecord" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "PCWSTR\n ExtractKey(\n MY_OBJ * pRecord\n )\n {\n return pRecord->GetString();\n }" (type_identifier) "PCWSTR" (function_declarator) "ExtractKey(\n MY_OBJ * pRecord\n )" (identifier) "ExtractKey" (parameter_list) "(\n MY_OBJ * pRecord\n )" (() "(" (parameter_declaration) "MY_OBJ * pRecord" (type_identifier) "MY_OBJ" (pointer_declarator) "* pRecord" (*) "*" (identifier) "pRecord" ()) ")" (compound_statement) "{\n return pRecord->GetString();\n }" ({) "{" (return_statement) "return pRecord->GetString();" (return) "return" (call_expression) "pRecord->GetString()" (field_expression) "pRecord->GetString" (identifier) "pRecord" (->) "->" (field_identifier) "GetString" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "DWORD\n CalcKeyHash(\n PCWSTR key\n )\n {\n return HashString(key);\n }" (type_identifier) "DWORD" (function_declarator) "CalcKeyHash(\n PCWSTR key\n )" (identifier) "CalcKeyHash" (parameter_list) "(\n PCWSTR key\n )" (() "(" (parameter_declaration) "PCWSTR key" (type_identifier) "PCWSTR" (identifier) "key" ()) ")" (compound_statement) "{\n return HashString(key);\n }" ({) "{" (return_statement) "return HashString(key);" (return) "return" (call_expression) "HashString(key)" (identifier) "HashString" (argument_list) "(key)" (() "(" (identifier) "key" ()) ")" (;) ";" (}) "}" (function_definition) "BOOL\n EqualKeys(\n PCWSTR key1,\n PCWSTR key2\n )\n {\n return (wcscmp(key1, key2) == 0);\n }" (type_identifier) "BOOL" (function_declarator) "EqualKeys(\n PCWSTR key1,\n PCWSTR key2\n )" (identifier) "EqualKeys" (parameter_list) "(\n PCWSTR key1,\n PCWSTR key2\n )" (() "(" (parameter_declaration) "PCWSTR key1" (type_identifier) "PCWSTR" (identifier) "key1" (,) "," (parameter_declaration) "PCWSTR key2" (type_identifier) "PCWSTR" (identifier) "key2" ()) ")" (compound_statement) "{\n return (wcscmp(key1, key2) == 0);\n }" ({) "{" (return_statement) "return (wcscmp(key1, key2) == 0);" (return) "return" (parenthesized_expression) "(wcscmp(key1, key2) == 0)" (() "(" (binary_expression) "wcscmp(key1, key2) == 0" (call_expression) "wcscmp(key1, key2)" (identifier) "wcscmp" (argument_list) "(key1, key2)" (() "(" (identifier) "key1" (,) "," (identifier) "key2" ()) ")" (==) "==" (number_literal) "0" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (declaration) "void TestHash();" (primitive_type) "void" (function_declarator) "TestHash()" (identifier) "TestHash" (parameter_list) "()" (() "(" ()) ")" (;) ";"
196
6
{"language": "c", "success": true, "metadata": {"lines": 53, "avg_line_length": 15.19, "nodes": 110, "errors": 0, "source_hash": "eb9614d0bf06c9767e52aca7aedaa0b79be78c7438cc20ffe8b5317c8c1f3c35", "categorized_nodes": 78}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 12}}, {"id": 3, "type": "function_definition", "text": "class MY_OBJ\n{\n public:\n MY_OBJ(PCWSTR pstr)\n : _pstr(pstr)\n {}\n\n PCWSTR GetString()\n {\n return _pstr;\n }", "parent": null, "children": [4], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 4, "type": "identifier", "text": "MY_OBJ", "parent": 3, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 12}}, {"id": 5, "type": "labeled_statement", "text": "public:\n MY_OBJ(PCWSTR pstr)\n : _pstr(pstr)\n {}\n\n PCWSTR GetString()\n {\n return _pstr;", "parent": 3, "children": [6], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 14, "column": 22}}, {"id": 6, "type": "declaration", "text": "MY_OBJ(PCWSTR pstr)\n : _pstr(pstr)\n {}\n\n PCWSTR GetString()\n {\n return _pstr;", "parent": 5, "children": [7, 13, 23], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 14, "column": 22}}, {"id": 7, "type": "macro_type_specifier", "text": "MY_OBJ(PCWSTR pstr)", "parent": 6, "children": [8, 9, 11], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 24}}, {"id": 8, "type": "identifier", "text": "MY_OBJ", "parent": 7, "children": [], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 11}}, {"id": 9, "type": "type_descriptor", "text": "PCWSTR", "parent": 7, "children": [10], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 18}}, {"id": 10, "type": "type_identifier", "text": "PCWSTR", "parent": 9, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 18}}, {"id": 11, "type": "ERROR", "text": "pstr", "parent": 7, "children": [12], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 23}}, {"id": 12, "type": "identifier", "text": "pstr", "parent": 11, "children": [], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 23}}, {"id": 13, "type": "ERROR", "text": ": _pstr(pstr)\n {}\n\n PCWSTR GetString()\n {\n return", "parent": 6, "children": [14, 19, 20], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 14, "column": 15}}, {"id": 14, "type": "function_declarator", "text": "_pstr(pstr)", "parent": 13, "children": [15, 16], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 20}}, {"id": 15, "type": "identifier", "text": "_pstr", "parent": 14, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 14}}, {"id": 16, "type": "parameter_list", "text": "(pstr)", "parent": 14, "children": [17], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 20}}, {"id": 17, "type": "parameter_declaration", "text": "pstr", "parent": 16, "children": [18], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 19}}, {"id": 18, "type": "type_identifier", "text": "pstr", "parent": 17, "children": [], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 19}}, {"id": 19, "type": "identifier", "text": "PCWSTR", "parent": 13, "children": [], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 11}}, {"id": 20, "type": "function_declarator", "text": "GetString()", "parent": 13, "children": [21, 22], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 23}}, {"id": 21, "type": "identifier", "text": "GetString", "parent": 20, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 21}}, {"id": 22, "type": "parameter_list", "text": "()", "parent": 20, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 23}}, {"id": 23, "type": "identifier", "text": "_pstr", "parent": 6, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 21}}, {"id": 24, "type": "labeled_statement", "text": "private:\n PCWSTR _pstr;", "parent": null, "children": [25], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 18, "column": 18}}, {"id": 25, "type": "declaration", "text": "PCWSTR _pstr;", "parent": 24, "children": [26, 27], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 18}}, {"id": 26, "type": "type_identifier", "text": "PCWSTR", "parent": 25, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 11}}, {"id": 27, "type": "identifier", "text": "_pstr", "parent": 25, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 17}}, {"id": 28, "type": "ERROR", "text": "class MY_HASH : public HASH_TABLE<MY_OBJ,PCWSTR>", "parent": null, "children": [29, 33, 34, 35], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 48}}, {"id": 29, "type": "ERROR", "text": "MY_HASH : public HASH_TABLE<", "parent": 28, "children": [30, 31, 32], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 34}}, {"id": 30, "type": "identifier", "text": "MY_HASH", "parent": 29, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 13}}, {"id": 31, "type": "identifier", "text": "HASH_TABLE", "parent": 29, "children": [], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 33}}, {"id": 32, "type": "<", "text": "<", "parent": 29, "children": [], "start_point": {"row": 21, "column": 33}, "end_point": {"row": 21, "column": 34}}, {"id": 33, "type": "identifier", "text": "MY_OBJ", "parent": 28, "children": [], "start_point": {"row": 21, "column": 34}, "end_point": {"row": 21, "column": 40}}, {"id": 34, "type": "identifier", "text": "PCWSTR", "parent": 28, "children": [], "start_point": {"row": 21, "column": 41}, "end_point": {"row": 21, "column": 47}}, {"id": 35, "type": ">", "text": ">", "parent": 28, "children": [], "start_point": {"row": 21, "column": 47}, "end_point": {"row": 21, "column": 48}}, {"id": 36, "type": "labeled_statement", "text": "public:\n VOID\n ReferenceRecord(\n MY_OBJ * //pRecord\n )\n {}", "parent": null, "children": [37], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 28, "column": 6}}, {"id": 37, "type": "ERROR", "text": "VOID\n ReferenceRecord(\n MY_OBJ * //pRecord\n )", "parent": 36, "children": [38, 39], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 27, "column": 5}}, {"id": 38, "type": "type_identifier", "text": "VOID", "parent": 37, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 8}}, {"id": 39, "type": "function_declarator", "text": "ReferenceRecord(\n MY_OBJ * //pRecord\n )", "parent": 37, "children": [40, 41], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 27, "column": 5}}, {"id": 40, "type": "identifier", "text": "ReferenceRecord", "parent": 39, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 19}}, {"id": 41, "type": "parameter_list", "text": "(\n MY_OBJ * //pRecord\n )", "parent": 39, "children": [42], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 27, "column": 5}}, {"id": 42, "type": "parameter_declaration", "text": "MY_OBJ *", "parent": 41, "children": [43, 44], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 16}}, {"id": 43, "type": "type_identifier", "text": "MY_OBJ", "parent": 42, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 14}}, {"id": 44, "type": "abstract_pointer_declarator", "text": "*", "parent": 42, "children": [45], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 16}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 16}}, {"id": 46, "type": "function_definition", "text": "VOID\n DereferenceRecord(\n MY_OBJ * //pRecord\n )\n {}", "parent": null, "children": [47, 48], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 34, "column": 6}}, {"id": 47, "type": "type_identifier", "text": "VOID", "parent": 46, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 8}}, {"id": 48, "type": "function_declarator", "text": "DereferenceRecord(\n MY_OBJ * //pRecord\n )", "parent": 46, "children": [49, 50], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 33, "column": 5}}, {"id": 49, "type": "identifier", "text": "DereferenceRecord", "parent": 48, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 21}}, {"id": 50, "type": "parameter_list", "text": "(\n MY_OBJ * //pRecord\n )", "parent": 48, "children": [51], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 33, "column": 5}}, {"id": 51, "type": "parameter_declaration", "text": "MY_OBJ *", "parent": 50, "children": [52, 53], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 16}}, {"id": 52, "type": "type_identifier", "text": "MY_OBJ", "parent": 51, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 14}}, {"id": 53, "type": "abstract_pointer_declarator", "text": "*", "parent": 51, "children": [54], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 16}}, {"id": 54, "type": "*", "text": "*", "parent": 53, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 16}}, {"id": 55, "type": "function_definition", "text": "PCWSTR\n ExtractKey(\n MY_OBJ * pRecord\n )\n {\n return pRecord->GetString();\n }", "parent": null, "children": [56, 57], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 42, "column": 5}}, {"id": 56, "type": "type_identifier", "text": "PCWSTR", "parent": 55, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 10}}, {"id": 57, "type": "function_declarator", "text": "ExtractKey(\n MY_OBJ * pRecord\n )", "parent": 55, "children": [58, 59], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 39, "column": 5}}, {"id": 58, "type": "identifier", "text": "ExtractKey", "parent": 57, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 14}}, {"id": 59, "type": "parameter_list", "text": "(\n MY_OBJ * pRecord\n )", "parent": 57, "children": [60], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 39, "column": 5}}, {"id": 60, "type": "parameter_declaration", "text": "MY_OBJ * pRecord", "parent": 59, "children": [61, 62], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 26}}, {"id": 61, "type": "type_identifier", "text": "MY_OBJ", "parent": 60, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 14}}, {"id": 62, "type": "pointer_declarator", "text": "* pRecord", "parent": 60, "children": [63, 64], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 26}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 16}}, {"id": 64, "type": "identifier", "text": "pRecord", "parent": 62, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 26}}, {"id": 65, "type": "return_statement", "text": "return pRecord->GetString();", "parent": 55, "children": [66], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 36}}, {"id": 66, "type": "call_expression", "text": "pRecord->GetString()", "parent": 65, "children": [67, 70], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 35}}, {"id": 67, "type": "field_expression", "text": "pRecord->GetString", "parent": 66, "children": [68, 69], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 33}}, {"id": 68, "type": "identifier", "text": "pRecord", "parent": 67, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 22}}, {"id": 69, "type": "field_identifier", "text": "GetString", "parent": 67, "children": [], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 33}}, {"id": 70, "type": "argument_list", "text": "()", "parent": 66, "children": [], "start_point": {"row": 41, "column": 33}, "end_point": {"row": 41, "column": 35}}, {"id": 71, "type": "function_definition", "text": "DWORD\n CalcKeyHash(\n PCWSTR key\n )\n {\n return HashString(key);\n }", "parent": null, "children": [72, 73], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 50, "column": 5}}, {"id": 72, "type": "type_identifier", "text": "DWORD", "parent": 71, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 9}}, {"id": 73, "type": "function_declarator", "text": "CalcKeyHash(\n PCWSTR key\n )", "parent": 71, "children": [74, 75], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 47, "column": 5}}, {"id": 74, "type": "identifier", "text": "CalcKeyHash", "parent": 73, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 15}}, {"id": 75, "type": "parameter_list", "text": "(\n PCWSTR key\n )", "parent": 73, "children": [76], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 47, "column": 5}}, {"id": 76, "type": "parameter_declaration", "text": "PCWSTR key", "parent": 75, "children": [77, 78], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 25}}, {"id": 77, "type": "type_identifier", "text": "PCWSTR", "parent": 76, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 14}}, {"id": 78, "type": "identifier", "text": "key", "parent": 76, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 25}}, {"id": 79, "type": "return_statement", "text": "return HashString(key);", "parent": 71, "children": [80], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 31}}, {"id": 80, "type": "call_expression", "text": "HashString(key)", "parent": 79, "children": [81, 82], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 30}}, {"id": 81, "type": "identifier", "text": "HashString", "parent": 80, "children": [], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 25}}, {"id": 82, "type": "argument_list", "text": "(key)", "parent": 80, "children": [83], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 30}}, {"id": 83, "type": "identifier", "text": "key", "parent": 82, "children": [], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 29}}, {"id": 84, "type": "function_definition", "text": "BOOL\n EqualKeys(\n PCWSTR key1,\n PCWSTR key2\n )\n {\n return (wcscmp(key1, key2) == 0);\n }", "parent": null, "children": [85, 86], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 59, "column": 5}}, {"id": 85, "type": "type_identifier", "text": "BOOL", "parent": 84, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 8}}, {"id": 86, "type": "function_declarator", "text": "EqualKeys(\n PCWSTR key1,\n PCWSTR key2\n )", "parent": 84, "children": [87, 88], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 56, "column": 5}}, {"id": 87, "type": "identifier", "text": "EqualKeys", "parent": 86, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 13}}, {"id": 88, "type": "parameter_list", "text": "(\n PCWSTR key1,\n PCWSTR key2\n )", "parent": 86, "children": [89, 92], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 56, "column": 5}}, {"id": 89, "type": "parameter_declaration", "text": "PCWSTR key1", "parent": 88, "children": [90, 91], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 26}}, {"id": 90, "type": "type_identifier", "text": "PCWSTR", "parent": 89, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 14}}, {"id": 91, "type": "identifier", "text": "key1", "parent": 89, "children": [], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 26}}, {"id": 92, "type": "parameter_declaration", "text": "PCWSTR key2", "parent": 88, "children": [93, 94], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 26}}, {"id": 93, "type": "type_identifier", "text": "PCWSTR", "parent": 92, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 14}}, {"id": 94, "type": "identifier", "text": "key2", "parent": 92, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 26}}, {"id": 95, "type": "return_statement", "text": "return (wcscmp(key1, key2) == 0);", "parent": 84, "children": [96], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 41}}, {"id": 96, "type": "parenthesized_expression", "text": "(wcscmp(key1, key2) == 0)", "parent": 95, "children": [97], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 40}}, {"id": 97, "type": "binary_expression", "text": "wcscmp(key1, key2) == 0", "parent": 96, "children": [98, 103, 104], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 39}}, {"id": 98, "type": "call_expression", "text": "wcscmp(key1, key2)", "parent": 97, "children": [99, 100], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 34}}, {"id": 99, "type": "identifier", "text": "wcscmp", "parent": 98, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 22}}, {"id": 100, "type": "argument_list", "text": "(key1, key2)", "parent": 98, "children": [101, 102], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 34}}, {"id": 101, "type": "identifier", "text": "key1", "parent": 100, "children": [], "start_point": {"row": 58, "column": 23}, "end_point": {"row": 58, "column": 27}}, {"id": 102, "type": "identifier", "text": "key2", "parent": 100, "children": [], "start_point": {"row": 58, "column": 29}, "end_point": {"row": 58, "column": 33}}, {"id": 103, "type": "==", "text": "==", "parent": 97, "children": [], "start_point": {"row": 58, "column": 35}, "end_point": {"row": 58, "column": 37}}, {"id": 104, "type": "number_literal", "text": "0", "parent": 97, "children": [], "start_point": {"row": 58, "column": 38}, "end_point": {"row": 58, "column": 39}}, {"id": 105, "type": "declaration", "text": "void TestHash();", "parent": null, "children": [106, 107], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 16}}, {"id": 106, "type": "primitive_type", "text": "void", "parent": 105, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 4}}, {"id": 107, "type": "function_declarator", "text": "TestHash()", "parent": 105, "children": [108, 109], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 15}}, {"id": 108, "type": "identifier", "text": "TestHash", "parent": 107, "children": [], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 13}}, {"id": 109, "type": "parameter_list", "text": "()", "parent": 107, "children": [], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 15}}]}, "node_categories": {"declarations": {"functions": [3, 14, 20, 39, 46, 48, 55, 57, 71, 73, 84, 86, 107], "variables": [6, 17, 25, 42, 51, 60, 76, 89, 92, 105], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [66, 67, 80, 96, 97, 98], "assignments": [], "loops": [], "conditionals": [4, 7, 8, 10, 12, 15, 18, 19, 21, 23, 26, 27, 30, 31, 33, 34, 38, 40, 43, 47, 49, 52, 56, 58, 61, 64, 68, 69, 72, 74, 77, 78, 81, 83, 85, 87, 90, 91, 93, 94, 99, 101, 102, 108], "returns": [65, 79, 95], "exceptions": []}, "expressions": {"calls": [0], "literals": [104], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "MY_OBJ", "text_snippet": "class MY_OBJ\n{\n public:\n MY_OBJ(PCWSTR pstr)\n : _pstr(pstr)\n {}\n\n PCWSTR GetString"}, {"node_id": 14, "universal_type": "function", "name": "unknown", "text_snippet": "_pstr(pstr)"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "GetString()"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "ReferenceRecord(\n MY_OBJ * //pRecord\n )"}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "VOID\n DereferenceRecord(\n MY_OBJ * //pRecord\n )\n {}"}, {"node_id": 48, "universal_type": "function", "name": "unknown", "text_snippet": "DereferenceRecord(\n MY_OBJ * //pRecord\n )"}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "PCWSTR\n ExtractKey(\n MY_OBJ * pRecord\n )\n {\n return pRecord->GetString();\n "}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "ExtractKey(\n MY_OBJ * pRecord\n )"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "DWORD\n CalcKeyHash(\n PCWSTR key\n )\n {\n return HashString(key);\n }"}, {"node_id": 73, "universal_type": "function", "name": "unknown", "text_snippet": "CalcKeyHash(\n PCWSTR key\n )"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "BOOL\n EqualKeys(\n PCWSTR key1,\n PCWSTR key2\n )\n {\n retur"}, {"node_id": 86, "universal_type": "function", "name": "unknown", "text_snippet": "EqualKeys(\n PCWSTR key1,\n PCWSTR key2\n )"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "TestHash()"}], "class_declarations": [], "import_statements": []}, "original_source_code": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\n#pragma once\n\nclass MY_OBJ\n{\n public:\n MY_OBJ(PCWSTR pstr)\n : _pstr(pstr)\n {}\n\n PCWSTR GetString()\n {\n return _pstr;\n }\n\n private:\n PCWSTR _pstr;\n};\n\nclass MY_HASH : public HASH_TABLE<MY_OBJ,PCWSTR>\n{\n public:\n VOID\n ReferenceRecord(\n MY_OBJ * //pRecord\n )\n {}\n\n VOID\n DereferenceRecord(\n MY_OBJ * //pRecord\n )\n {}\n\n PCWSTR\n ExtractKey(\n MY_OBJ * pRecord\n )\n {\n return pRecord->GetString();\n }\n\n DWORD\n CalcKeyHash(\n PCWSTR key\n )\n {\n return HashString(key);\n }\n\n BOOL\n EqualKeys(\n PCWSTR key1,\n PCWSTR key2\n )\n {\n return (wcscmp(key1, key2) == 0);\n }\n};\n\nvoid TestHash();"}
302
c
#ifndef __wasilibc_sys_uio_h #define __wasilibc_sys_uio_h #include <__struct_iovec.h> #endif
22.25
4
(translation_unit) "#ifndef __wasilibc_sys_uio_h\n#define __wasilibc_sys_uio_h\n\n#include <__struct_iovec.h>\n\n#endif\n" (preproc_ifdef) "#ifndef __wasilibc_sys_uio_h\n#define __wasilibc_sys_uio_h\n\n#include <__struct_iovec.h>\n\n#endif" (#ifndef) "#ifndef" (identifier) "__wasilibc_sys_uio_h" (preproc_def) "#define __wasilibc_sys_uio_h\n" (#define) "#define" (identifier) "__wasilibc_sys_uio_h" (preproc_include) "#include <__struct_iovec.h>\n" (#include) "#include" (system_lib_string) "<__struct_iovec.h>" (#endif) "#endif"
11
0
{"language": "c", "success": true, "metadata": {"lines": 4, "avg_line_length": 22.25, "nodes": 10, "errors": 0, "source_hash": "223fb0f1cfbb9449cd90c306fd72216c3d6879d944ffcb3146806701cf8f9cfe", "categorized_nodes": 8}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __wasilibc_sys_uio_h\n#define __wasilibc_sys_uio_h\n\n#include <__struct_iovec.h>\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "__wasilibc_sys_uio_h", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 28}}, {"id": 3, "type": "preproc_def", "text": "#define __wasilibc_sys_uio_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": "__wasilibc_sys_uio_h", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 28}}, {"id": 6, "type": "preproc_include", "text": "#include <__struct_iovec.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": "<__struct_iovec.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 27}}, {"id": 9, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <__struct_iovec.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef __wasilibc_sys_uio_h\n#define __wasilibc_sys_uio_h\n\n#include <__struct_iovec.h>\n\n#endif\n"}
303
c
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "ScopedGlobalRef.h" #include "ScopedLocalRef.h" namespace facebook { namespace yoga { namespace vanillajni { /** * Registers a set of methods for a JNI class. Aborts if registration fails. */ void registerNatives( JNIEnv* env, const char* className, const JNINativeMethod methods[], size_t numMethods); /** * Returns a jmethodID for a class static method. Aborts if any error happens. */ jmethodID getStaticMethodId( JNIEnv* env, jclass clazz, const char* methodName, const char* methodDescriptor); /** * Returns a jmethodID for a class non-static method. Aborts if any error * happens. */ jmethodID getMethodId( JNIEnv* env, jclass clazz, const char* methodName, const char* methodDescriptor); /** * Returns a class non-static field ID. Aborts if any error happens. */ jfieldID getFieldId( JNIEnv* env, jclass clazz, const char* fieldName, const char* fieldSignature); // Helper methods to call a non-static method on an object depending on the // return type. Each method will abort the execution if an error // (such as a Java pending exception) is detected after invoking the // Java method. #define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \ jnitype call##readableType##Method( \ JNIEnv* env, jobject obj, jmethodID methodId, ...) DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void); DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long); DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float); ScopedLocalRef<jobject> callStaticObjectMethod( JNIEnv* env, jclass clazz, jmethodID methodId, ...); /** * Given a local or a global reference, this method creates a new global * reference out of it. If any error happens, aborts the process. */ ScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj); ScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj); } // namespace vanillajni } // namespace yoga } // namespace facebook
32.65
68
(translation_unit) "/*\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n#pragma once\n#include "ScopedGlobalRef.h"\n#include "ScopedLocalRef.h"\n\nnamespace facebook {\nnamespace yoga {\nnamespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */\nvoid registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);\n\n/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */\njmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */\njmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */\njfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);\n\n// Helper methods to call a non-static method on an object depending on the\n// return type. Each method will abort the execution if an error\n// (such as a Java pending exception) is detected after invoking the\n// Java method.\n#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\n jnitype call##readableType##Method( \\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);\n\nScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);\n\n/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */\nScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);\n\nScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);\n} // namespace vanillajni\n} // namespace yoga\n} // namespace facebook\n" (comment) "/*\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "ScopedGlobalRef.h"\n" (#include) "#include" (string_literal) ""ScopedGlobalRef.h"" (") """ (string_content) "ScopedGlobalRef.h" (") """ (preproc_include) "#include "ScopedLocalRef.h"\n" (#include) "#include" (string_literal) ""ScopedLocalRef.h"" (") """ (string_content) "ScopedLocalRef.h" (") """ (function_definition) "namespace facebook {\nnamespace yoga {\nnamespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */\nvoid registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);\n\n/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */\njmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */\njmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */\njfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);\n\n// Helper methods to call a non-static method on an object depending on the\n// return type. Each method will abort the execution if an error\n// (such as a Java pending exception) is detected after invoking the\n// Java method.\n#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\n jnitype call##readableType##Method( \\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);\n\nScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);\n\n/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */\nScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);\n\nScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);\n} // namespace vanillajni\n} // namespace yoga\n}" (type_identifier) "namespace" (identifier) "facebook" (compound_statement) "{\nnamespace yoga {\nnamespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */\nvoid registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);\n\n/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */\njmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */\njmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */\njfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);\n\n// Helper methods to call a non-static method on an object depending on the\n// return type. Each method will abort the execution if an error\n// (such as a Java pending exception) is detected after invoking the\n// Java method.\n#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\n jnitype call##readableType##Method( \\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);\n\nScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);\n\n/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */\nScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);\n\nScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);\n} // namespace vanillajni\n} // namespace yoga\n}" ({) "{" (function_definition) "namespace yoga {\nnamespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */\nvoid registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);\n\n/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */\njmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */\njmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */\njfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);\n\n// Helper methods to call a non-static method on an object depending on the\n// return type. Each method will abort the execution if an error\n// (such as a Java pending exception) is detected after invoking the\n// Java method.\n#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\n jnitype call##readableType##Method( \\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);\n\nScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);\n\n/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */\nScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);\n\nScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);\n} // namespace vanillajni\n}" (type_identifier) "namespace" (identifier) "yoga" (compound_statement) "{\nnamespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */\nvoid registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);\n\n/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */\njmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */\njmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */\njfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);\n\n// Helper methods to call a non-static method on an object depending on the\n// return type. Each method will abort the execution if an error\n// (such as a Java pending exception) is detected after invoking the\n// Java method.\n#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\n jnitype call##readableType##Method( \\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);\n\nScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);\n\n/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */\nScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);\n\nScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);\n} // namespace vanillajni\n}" ({) "{" (function_definition) "namespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */\nvoid registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);\n\n/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */\njmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */\njmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */\njfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);\n\n// Helper methods to call a non-static method on an object depending on the\n// return type. Each method will abort the execution if an error\n// (such as a Java pending exception) is detected after invoking the\n// Java method.\n#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\n jnitype call##readableType##Method( \\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);\n\nScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);\n\n/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */\nScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);\n\nScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);\n}" (type_identifier) "namespace" (identifier) "vanillajni" (compound_statement) "{\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */\nvoid registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);\n\n/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */\njmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */\njmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */\njfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);\n\n// Helper methods to call a non-static method on an object depending on the\n// return type. Each method will abort the execution if an error\n// (such as a Java pending exception) is detected after invoking the\n// Java method.\n#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\n jnitype call##readableType##Method( \\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);\n\nScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);\n\n/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */\nScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);\n\nScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);\n}" ({) "{" (comment) "/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */" (declaration) "void registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);" (primitive_type) "void" (function_declarator) "registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods)" (identifier) "registerNatives" (parameter_list) "(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods)" (() "(" (parameter_declaration) "JNIEnv* env" (type_identifier) "JNIEnv" (pointer_declarator) "* env" (*) "*" (identifier) "env" (,) "," (parameter_declaration) "const char* className" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* className" (*) "*" (identifier) "className" (,) "," (parameter_declaration) "const JNINativeMethod methods[]" (type_qualifier) "const" (const) "const" (type_identifier) "JNINativeMethod" (array_declarator) "methods[]" (identifier) "methods" ([) "[" (]) "]" (,) "," (parameter_declaration) "size_t numMethods" (primitive_type) "size_t" (identifier) "numMethods" ()) ")" (;) ";" (comment) "/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */" (declaration) "jmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);" (type_identifier) "jmethodID" (function_declarator) "getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor)" (identifier) "getStaticMethodId" (parameter_list) "(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor)" (() "(" (parameter_declaration) "JNIEnv* env" (type_identifier) "JNIEnv" (pointer_declarator) "* env" (*) "*" (identifier) "env" (,) "," (parameter_declaration) "jclass clazz" (type_identifier) "jclass" (identifier) "clazz" (,) "," (parameter_declaration) "const char* methodName" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* methodName" (*) "*" (identifier) "methodName" (,) "," (parameter_declaration) "const char* methodDescriptor" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* methodDescriptor" (*) "*" (identifier) "methodDescriptor" ()) ")" (;) ";" (comment) "/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */" (declaration) "jmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);" (type_identifier) "jmethodID" (function_declarator) "getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor)" (identifier) "getMethodId" (parameter_list) "(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor)" (() "(" (parameter_declaration) "JNIEnv* env" (type_identifier) "JNIEnv" (pointer_declarator) "* env" (*) "*" (identifier) "env" (,) "," (parameter_declaration) "jclass clazz" (type_identifier) "jclass" (identifier) "clazz" (,) "," (parameter_declaration) "const char* methodName" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* methodName" (*) "*" (identifier) "methodName" (,) "," (parameter_declaration) "const char* methodDescriptor" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* methodDescriptor" (*) "*" (identifier) "methodDescriptor" ()) ")" (;) ";" (comment) "/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */" (declaration) "jfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);" (type_identifier) "jfieldID" (function_declarator) "getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature)" (identifier) "getFieldId" (parameter_list) "(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature)" (() "(" (parameter_declaration) "JNIEnv* env" (type_identifier) "JNIEnv" (pointer_declarator) "* env" (*) "*" (identifier) "env" (,) "," (parameter_declaration) "jclass clazz" (type_identifier) "jclass" (identifier) "clazz" (,) "," (parameter_declaration) "const char* fieldName" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* fieldName" (*) "*" (identifier) "fieldName" (,) "," (parameter_declaration) "const char* fieldSignature" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* fieldSignature" (*) "*" (identifier) "fieldSignature" ()) ")" (;) ";" (comment) "// Helper methods to call a non-static method on an object depending on the" (comment) "// return type. Each method will abort the execution if an error" (comment) "// (such as a Java pending exception) is detected after invoking the" (comment) "// Java method." (preproc_function_def) "#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\n jnitype call##readableType##Method( \\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\n" (#define) "#define" (identifier) "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE" (preproc_params) "(jnitype, readableType)" (() "(" (identifier) "jnitype" (,) "," (identifier) "readableType" ()) ")" (preproc_arg) "jnitype call##readableType##Method( \\n JNIEnv* env, jobject obj, jmethodID methodId, ...)" (expression_statement) "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);" (call_expression) "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void)" (identifier) "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE" (argument_list) "(void, Void)" (() "(" (identifier) "void" (,) "," (identifier) "Void" ()) ")" (;) ";" (expression_statement) "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);" (call_expression) "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long)" (identifier) "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE" (argument_list) "(jlong, Long)" (() "(" (identifier) "jlong" (,) "," (identifier) "Long" ()) ")" (;) ";" (expression_statement) "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);" (call_expression) "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float)" (identifier) "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE" (argument_list) "(jfloat, Float)" (() "(" (identifier) "jfloat" (,) "," (identifier) "Float" ()) ")" (;) ";" (expression_statement) "ScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);" (binary_expression) "ScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...)" (binary_expression) "ScopedLocalRef<jobject" (identifier) "ScopedLocalRef" (<) "<" (identifier) "jobject" (>) ">" (call_expression) "callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...)" (identifier) "callStaticObjectMethod" (argument_list) "(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...)" (() "(" (binary_expression) "JNIEnv* env" (identifier) "JNIEnv" (*) "*" (identifier) "env" (,) "," (identifier) "jclass" (ERROR) "clazz" (identifier) "clazz" (,) "," (identifier) "jmethodID" (ERROR) "methodId,\n ..." (identifier) "methodId" (,) "," (.) "." (.) "." (.) "." ()) ")" (;) ";" (comment) "/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */" (expression_statement) "ScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);" (binary_expression) "ScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj)" (binary_expression) "ScopedGlobalRef<jobject" (identifier) "ScopedGlobalRef" (<) "<" (identifier) "jobject" (>) ">" (call_expression) "newGlobalRef(JNIEnv* env, jobject obj)" (identifier) "newGlobalRef" (argument_list) "(JNIEnv* env, jobject obj)" (() "(" (binary_expression) "JNIEnv* env" (identifier) "JNIEnv" (*) "*" (identifier) "env" (,) "," (identifier) "jobject" (ERROR) "obj" (identifier) "obj" ()) ")" (;) ";" (expression_statement) "ScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);" (binary_expression) "ScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj)" (binary_expression) "ScopedGlobalRef<jthrowable" (identifier) "ScopedGlobalRef" (<) "<" (identifier) "jthrowable" (>) ">" (call_expression) "newGlobalRef(JNIEnv* env, jthrowable obj)" (identifier) "newGlobalRef" (argument_list) "(JNIEnv* env, jthrowable obj)" (() "(" (binary_expression) "JNIEnv* env" (identifier) "JNIEnv" (*) "*" (identifier) "env" (,) "," (identifier) "jthrowable" (ERROR) "obj" (identifier) "obj" ()) ")" (;) ";" (}) "}" (comment) "// namespace vanillajni" (}) "}" (comment) "// namespace yoga" (}) "}" (comment) "// namespace facebook"
291
4
{"language": "c", "success": true, "metadata": {"lines": 68, "avg_line_length": 32.65, "nodes": 182, "errors": 0, "source_hash": "7bd060323c889b6b11d2aa4375bddb6c36008c6e91104ba7393425f8514ad8cc", "categorized_nodes": 122}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"ScopedGlobalRef.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"ScopedGlobalRef.h\"", "parent": 3, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 28}}, {"id": 6, "type": "preproc_include", "text": "#include \"ScopedLocalRef.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"ScopedLocalRef.h\"", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 27}}, {"id": 9, "type": "function_definition", "text": "namespace facebook {\nnamespace yoga {\nnamespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */\nvoid registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);\n\n/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */\njmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */\njmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */\njfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);\n\n// Helper methods to call a non-static method on an object depending on the\n// return type. Each method will abort the execution if an error\n// (such as a Java pending exception) is detected after invoking the\n// Java method.\n#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\\n jnitype call##readableType##Method( \\\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);\n\nScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);\n\n/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */\nScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);\n\nScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);\n} // namespace vanillajni\n} // namespace yoga\n}", "parent": null, "children": [10, 11], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 78, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 9}}, {"id": 11, "type": "identifier", "text": "facebook", "parent": 9, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 18}}, {"id": 12, "type": "function_definition", "text": "namespace yoga {\nnamespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */\nvoid registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);\n\n/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */\njmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */\njmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */\njfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);\n\n// Helper methods to call a non-static method on an object depending on the\n// return type. Each method will abort the execution if an error\n// (such as a Java pending exception) is detected after invoking the\n// Java method.\n#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\\n jnitype call##readableType##Method( \\\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);\n\nScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);\n\n/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */\nScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);\n\nScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);\n} // namespace vanillajni\n}", "parent": 9, "children": [13, 14], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 77, "column": 1}}, {"id": 13, "type": "type_identifier", "text": "namespace", "parent": 12, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 9}}, {"id": 14, "type": "identifier", "text": "yoga", "parent": 12, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 14}}, {"id": 15, "type": "function_definition", "text": "namespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */\nvoid registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);\n\n/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */\njmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */\njmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */\njfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);\n\n// Helper methods to call a non-static method on an object depending on the\n// return type. Each method will abort the execution if an error\n// (such as a Java pending exception) is detected after invoking the\n// Java method.\n#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\\n jnitype call##readableType##Method( \\\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);\n\nScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);\n\n/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */\nScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);\n\nScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);\n}", "parent": 12, "children": [16, 17], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 76, "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": "vanillajni", "parent": 15, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 20}}, {"id": 18, "type": "declaration", "text": "void registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);", "parent": 15, "children": [19, 20], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 22, "column": 23}}, {"id": 19, "type": "primitive_type", "text": "void", "parent": 18, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 20, "type": "function_declarator", "text": "registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods)", "parent": 18, "children": [21, 22], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 22, "column": 22}}, {"id": 21, "type": "identifier", "text": "registerNatives", "parent": 20, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 20}}, {"id": 22, "type": "parameter_list", "text": "(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods)", "parent": 20, "children": [23, 28, 33, 37], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 22, "column": 22}}, {"id": 23, "type": "parameter_declaration", "text": "JNIEnv* env", "parent": 22, "children": [24, 25], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 15}}, {"id": 24, "type": "type_identifier", "text": "JNIEnv", "parent": 23, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 10}}, {"id": 25, "type": "pointer_declarator", "text": "* env", "parent": 23, "children": [26, 27], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 15}}, {"id": 26, "type": "*", "text": "*", "parent": 25, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 11}}, {"id": 27, "type": "identifier", "text": "env", "parent": 25, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 15}}, {"id": 28, "type": "parameter_declaration", "text": "const char* className", "parent": 22, "children": [29, 30], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 25}}, {"id": 29, "type": "primitive_type", "text": "char", "parent": 28, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 14}}, {"id": 30, "type": "pointer_declarator", "text": "* className", "parent": 28, "children": [31, 32], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 25}}, {"id": 31, "type": "*", "text": "*", "parent": 30, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 15}}, {"id": 32, "type": "identifier", "text": "className", "parent": 30, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 25}}, {"id": 33, "type": "parameter_declaration", "text": "const JNINativeMethod methods[]", "parent": 22, "children": [34, 35], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 35}}, {"id": 34, "type": "type_identifier", "text": "JNINativeMethod", "parent": 33, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 25}}, {"id": 35, "type": "array_declarator", "text": "methods[]", "parent": 33, "children": [36], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 35}}, {"id": 36, "type": "identifier", "text": "methods", "parent": 35, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 33}}, {"id": 37, "type": "parameter_declaration", "text": "size_t numMethods", "parent": 22, "children": [38, 39], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 21}}, {"id": 38, "type": "primitive_type", "text": "size_t", "parent": 37, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 10}}, {"id": 39, "type": "identifier", "text": "numMethods", "parent": 37, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 21}}, {"id": 40, "type": "declaration", "text": "jmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);", "parent": 15, "children": [41, 42], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 31, "column": 34}}, {"id": 41, "type": "type_identifier", "text": "jmethodID", "parent": 40, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 9}}, {"id": 42, "type": "function_declarator", "text": "getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor)", "parent": 40, "children": [43, 44], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 31, "column": 33}}, {"id": 43, "type": "identifier", "text": "getStaticMethodId", "parent": 42, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 27}}, {"id": 44, "type": "parameter_list", "text": "(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor)", "parent": 42, "children": [45, 50, 53, 58], "start_point": {"row": 27, "column": 27}, "end_point": {"row": 31, "column": 33}}, {"id": 45, "type": "parameter_declaration", "text": "JNIEnv* env", "parent": 44, "children": [46, 47], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 15}}, {"id": 46, "type": "type_identifier", "text": "JNIEnv", "parent": 45, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 10}}, {"id": 47, "type": "pointer_declarator", "text": "* env", "parent": 45, "children": [48, 49], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 15}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 11}}, {"id": 49, "type": "identifier", "text": "env", "parent": 47, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 15}}, {"id": 50, "type": "parameter_declaration", "text": "jclass clazz", "parent": 44, "children": [51, 52], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 16}}, {"id": 51, "type": "type_identifier", "text": "jclass", "parent": 50, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 10}}, {"id": 52, "type": "identifier", "text": "clazz", "parent": 50, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 16}}, {"id": 53, "type": "parameter_declaration", "text": "const char* methodName", "parent": 44, "children": [54, 55], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 26}}, {"id": 54, "type": "primitive_type", "text": "char", "parent": 53, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 14}}, {"id": 55, "type": "pointer_declarator", "text": "* methodName", "parent": 53, "children": [56, 57], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 26}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 15}}, {"id": 57, "type": "identifier", "text": "methodName", "parent": 55, "children": [], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 26}}, {"id": 58, "type": "parameter_declaration", "text": "const char* methodDescriptor", "parent": 44, "children": [59, 60], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 32}}, {"id": 59, "type": "primitive_type", "text": "char", "parent": 58, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 14}}, {"id": 60, "type": "pointer_declarator", "text": "* methodDescriptor", "parent": 58, "children": [61, 62], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 32}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 15}}, {"id": 62, "type": "identifier", "text": "methodDescriptor", "parent": 60, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 32}}, {"id": 63, "type": "declaration", "text": "jmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);", "parent": 15, "children": [64, 65], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 41, "column": 34}}, {"id": 64, "type": "type_identifier", "text": "jmethodID", "parent": 63, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 9}}, {"id": 65, "type": "function_declarator", "text": "getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor)", "parent": 63, "children": [66, 67], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 41, "column": 33}}, {"id": 66, "type": "identifier", "text": "getMethodId", "parent": 65, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 21}}, {"id": 67, "type": "parameter_list", "text": "(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor)", "parent": 65, "children": [68, 73, 76, 81], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 41, "column": 33}}, {"id": 68, "type": "parameter_declaration", "text": "JNIEnv* env", "parent": 67, "children": [69, 70], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 15}}, {"id": 69, "type": "type_identifier", "text": "JNIEnv", "parent": 68, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 10}}, {"id": 70, "type": "pointer_declarator", "text": "* env", "parent": 68, "children": [71, 72], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 15}}, {"id": 71, "type": "*", "text": "*", "parent": 70, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 11}}, {"id": 72, "type": "identifier", "text": "env", "parent": 70, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 15}}, {"id": 73, "type": "parameter_declaration", "text": "jclass clazz", "parent": 67, "children": [74, 75], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 16}}, {"id": 74, "type": "type_identifier", "text": "jclass", "parent": 73, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 10}}, {"id": 75, "type": "identifier", "text": "clazz", "parent": 73, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 16}}, {"id": 76, "type": "parameter_declaration", "text": "const char* methodName", "parent": 67, "children": [77, 78], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 26}}, {"id": 77, "type": "primitive_type", "text": "char", "parent": 76, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 14}}, {"id": 78, "type": "pointer_declarator", "text": "* methodName", "parent": 76, "children": [79, 80], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 26}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 15}}, {"id": 80, "type": "identifier", "text": "methodName", "parent": 78, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 26}}, {"id": 81, "type": "parameter_declaration", "text": "const char* methodDescriptor", "parent": 67, "children": [82, 83], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 32}}, {"id": 82, "type": "primitive_type", "text": "char", "parent": 81, "children": [], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 14}}, {"id": 83, "type": "pointer_declarator", "text": "* methodDescriptor", "parent": 81, "children": [84, 85], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 32}}, {"id": 84, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 15}}, {"id": 85, "type": "identifier", "text": "methodDescriptor", "parent": 83, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 32}}, {"id": 86, "type": "declaration", "text": "jfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);", "parent": 15, "children": [87, 88], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 50, "column": 32}}, {"id": 87, "type": "type_identifier", "text": "jfieldID", "parent": 86, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 8}}, {"id": 88, "type": "function_declarator", "text": "getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature)", "parent": 86, "children": [89, 90], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 50, "column": 31}}, {"id": 89, "type": "identifier", "text": "getFieldId", "parent": 88, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 19}}, {"id": 90, "type": "parameter_list", "text": "(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature)", "parent": 88, "children": [91, 96, 99, 104], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 50, "column": 31}}, {"id": 91, "type": "parameter_declaration", "text": "JNIEnv* env", "parent": 90, "children": [92, 93], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 15}}, {"id": 92, "type": "type_identifier", "text": "JNIEnv", "parent": 91, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 10}}, {"id": 93, "type": "pointer_declarator", "text": "* env", "parent": 91, "children": [94, 95], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 15}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 11}}, {"id": 95, "type": "identifier", "text": "env", "parent": 93, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 15}}, {"id": 96, "type": "parameter_declaration", "text": "jclass clazz", "parent": 90, "children": [97, 98], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 16}}, {"id": 97, "type": "type_identifier", "text": "jclass", "parent": 96, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 10}}, {"id": 98, "type": "identifier", "text": "clazz", "parent": 96, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 16}}, {"id": 99, "type": "parameter_declaration", "text": "const char* fieldName", "parent": 90, "children": [100, 101], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 25}}, {"id": 100, "type": "primitive_type", "text": "char", "parent": 99, "children": [], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 14}}, {"id": 101, "type": "pointer_declarator", "text": "* fieldName", "parent": 99, "children": [102, 103], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 25}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 15}}, {"id": 103, "type": "identifier", "text": "fieldName", "parent": 101, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 25}}, {"id": 104, "type": "parameter_declaration", "text": "const char* fieldSignature", "parent": 90, "children": [105, 106], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 30}}, {"id": 105, "type": "primitive_type", "text": "char", "parent": 104, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 14}}, {"id": 106, "type": "pointer_declarator", "text": "* fieldSignature", "parent": 104, "children": [107, 108], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 30}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 15}}, {"id": 108, "type": "identifier", "text": "fieldSignature", "parent": 106, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 30}}, {"id": 109, "type": "preproc_function_def", "text": "#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\\n jnitype call##readableType##Method( \\\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\n", "parent": 15, "children": [110, 111, 112, 115], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 59, "column": 0}}, {"id": 110, "type": "#define", "text": "#define", "parent": 109, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 7}}, {"id": 111, "type": "identifier", "text": "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE", "parent": 109, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 50}}, {"id": 112, "type": "preproc_params", "text": "(jnitype, readableType)", "parent": 109, "children": [113, 114], "start_point": {"row": 56, "column": 50}, "end_point": {"row": 56, "column": 73}}, {"id": 113, "type": "identifier", "text": "jnitype", "parent": 112, "children": [], "start_point": {"row": 56, "column": 51}, "end_point": {"row": 56, "column": 58}}, {"id": 114, "type": "identifier", "text": "readableType", "parent": 112, "children": [], "start_point": {"row": 56, "column": 60}, "end_point": {"row": 56, "column": 72}}, {"id": 115, "type": "preproc_arg", "text": "jnitype call##readableType##Method( \\\n JNIEnv* env, jobject obj, jmethodID methodId, ...)", "parent": 109, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 58, "column": 56}}, {"id": 116, "type": "call_expression", "text": "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void)", "parent": 15, "children": [117, 118], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 54}}, {"id": 117, "type": "identifier", "text": "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE", "parent": 116, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 42}}, {"id": 118, "type": "argument_list", "text": "(void, Void)", "parent": 116, "children": [119, 120], "start_point": {"row": 59, "column": 42}, "end_point": {"row": 59, "column": 54}}, {"id": 119, "type": "identifier", "text": "void", "parent": 118, "children": [], "start_point": {"row": 59, "column": 43}, "end_point": {"row": 59, "column": 47}}, {"id": 120, "type": "identifier", "text": "Void", "parent": 118, "children": [], "start_point": {"row": 59, "column": 49}, "end_point": {"row": 59, "column": 53}}, {"id": 121, "type": "call_expression", "text": "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long)", "parent": 15, "children": [122, 123], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 55}}, {"id": 122, "type": "identifier", "text": "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE", "parent": 121, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 42}}, {"id": 123, "type": "argument_list", "text": "(jlong, Long)", "parent": 121, "children": [124, 125], "start_point": {"row": 60, "column": 42}, "end_point": {"row": 60, "column": 55}}, {"id": 124, "type": "identifier", "text": "jlong", "parent": 123, "children": [], "start_point": {"row": 60, "column": 43}, "end_point": {"row": 60, "column": 48}}, {"id": 125, "type": "identifier", "text": "Long", "parent": 123, "children": [], "start_point": {"row": 60, "column": 50}, "end_point": {"row": 60, "column": 54}}, {"id": 126, "type": "call_expression", "text": "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float)", "parent": 15, "children": [127, 128], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 57}}, {"id": 127, "type": "identifier", "text": "DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE", "parent": 126, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 42}}, {"id": 128, "type": "argument_list", "text": "(jfloat, Float)", "parent": 126, "children": [129, 130], "start_point": {"row": 61, "column": 42}, "end_point": {"row": 61, "column": 57}}, {"id": 129, "type": "identifier", "text": "jfloat", "parent": 128, "children": [], "start_point": {"row": 61, "column": 43}, "end_point": {"row": 61, "column": 49}}, {"id": 130, "type": "identifier", "text": "Float", "parent": 128, "children": [], "start_point": {"row": 61, "column": 51}, "end_point": {"row": 61, "column": 56}}, {"id": 131, "type": "binary_expression", "text": "ScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...)", "parent": 15, "children": [132, 136, 137], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 67, "column": 8}}, {"id": 132, "type": "binary_expression", "text": "ScopedLocalRef<jobject", "parent": 131, "children": [133, 134, 135], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 22}}, {"id": 133, "type": "identifier", "text": "ScopedLocalRef", "parent": 132, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 14}}, {"id": 134, "type": "<", "text": "<", "parent": 132, "children": [], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 15}}, {"id": 135, "type": "identifier", "text": "jobject", "parent": 132, "children": [], "start_point": {"row": 63, "column": 15}, "end_point": {"row": 63, "column": 22}}, {"id": 136, "type": ">", "text": ">", "parent": 131, "children": [], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 23}}, {"id": 137, "type": "call_expression", "text": "callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...)", "parent": 131, "children": [138, 139], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 67, "column": 8}}, {"id": 138, "type": "identifier", "text": "callStaticObjectMethod", "parent": 137, "children": [], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 63, "column": 46}}, {"id": 139, "type": "argument_list", "text": "(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...)", "parent": 137, "children": [140, 144, 145, 147, 148], "start_point": {"row": 63, "column": 46}, "end_point": {"row": 67, "column": 8}}, {"id": 140, "type": "binary_expression", "text": "JNIEnv* env", "parent": 139, "children": [141, 142, 143], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 15}}, {"id": 141, "type": "identifier", "text": "JNIEnv", "parent": 140, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 10}}, {"id": 142, "type": "*", "text": "*", "parent": 140, "children": [], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 11}}, {"id": 143, "type": "identifier", "text": "env", "parent": 140, "children": [], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 15}}, {"id": 144, "type": "identifier", "text": "jclass", "parent": 139, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 10}}, {"id": 145, "type": "ERROR", "text": "clazz", "parent": 139, "children": [146], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 16}}, {"id": 146, "type": "identifier", "text": "clazz", "parent": 145, "children": [], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 16}}, {"id": 147, "type": "identifier", "text": "jmethodID", "parent": 139, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 13}}, {"id": 148, "type": "ERROR", "text": "methodId,\n ...", "parent": 139, "children": [149], "start_point": {"row": 66, "column": 14}, "end_point": {"row": 67, "column": 7}}, {"id": 149, "type": "identifier", "text": "methodId", "parent": 148, "children": [], "start_point": {"row": 66, "column": 14}, "end_point": {"row": 66, "column": 22}}, {"id": 150, "type": "binary_expression", "text": "ScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj)", "parent": 15, "children": [151, 155, 156], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 63}}, {"id": 151, "type": "binary_expression", "text": "ScopedGlobalRef<jobject", "parent": 150, "children": [152, 153, 154], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 23}}, {"id": 152, "type": "identifier", "text": "ScopedGlobalRef", "parent": 151, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 15}}, {"id": 153, "type": "<", "text": "<", "parent": 151, "children": [], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 16}}, {"id": 154, "type": "identifier", "text": "jobject", "parent": 151, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 23}}, {"id": 155, "type": ">", "text": ">", "parent": 150, "children": [], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 24}}, {"id": 156, "type": "call_expression", "text": "newGlobalRef(JNIEnv* env, jobject obj)", "parent": 150, "children": [157, 158], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 63}}, {"id": 157, "type": "identifier", "text": "newGlobalRef", "parent": 156, "children": [], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 37}}, {"id": 158, "type": "argument_list", "text": "(JNIEnv* env, jobject obj)", "parent": 156, "children": [159, 163, 164], "start_point": {"row": 73, "column": 37}, "end_point": {"row": 73, "column": 63}}, {"id": 159, "type": "binary_expression", "text": "JNIEnv* env", "parent": 158, "children": [160, 161, 162], "start_point": {"row": 73, "column": 38}, "end_point": {"row": 73, "column": 49}}, {"id": 160, "type": "identifier", "text": "JNIEnv", "parent": 159, "children": [], "start_point": {"row": 73, "column": 38}, "end_point": {"row": 73, "column": 44}}, {"id": 161, "type": "*", "text": "*", "parent": 159, "children": [], "start_point": {"row": 73, "column": 44}, "end_point": {"row": 73, "column": 45}}, {"id": 162, "type": "identifier", "text": "env", "parent": 159, "children": [], "start_point": {"row": 73, "column": 46}, "end_point": {"row": 73, "column": 49}}, {"id": 163, "type": "identifier", "text": "jobject", "parent": 158, "children": [], "start_point": {"row": 73, "column": 51}, "end_point": {"row": 73, "column": 58}}, {"id": 164, "type": "ERROR", "text": "obj", "parent": 158, "children": [165], "start_point": {"row": 73, "column": 59}, "end_point": {"row": 73, "column": 62}}, {"id": 165, "type": "identifier", "text": "obj", "parent": 164, "children": [], "start_point": {"row": 73, "column": 59}, "end_point": {"row": 73, "column": 62}}, {"id": 166, "type": "binary_expression", "text": "ScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj)", "parent": 15, "children": [167, 171, 172], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 69}}, {"id": 167, "type": "binary_expression", "text": "ScopedGlobalRef<jthrowable", "parent": 166, "children": [168, 169, 170], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 26}}, {"id": 168, "type": "identifier", "text": "ScopedGlobalRef", "parent": 167, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 15}}, {"id": 169, "type": "<", "text": "<", "parent": 167, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 16}}, {"id": 170, "type": "identifier", "text": "jthrowable", "parent": 167, "children": [], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 26}}, {"id": 171, "type": ">", "text": ">", "parent": 166, "children": [], "start_point": {"row": 75, "column": 26}, "end_point": {"row": 75, "column": 27}}, {"id": 172, "type": "call_expression", "text": "newGlobalRef(JNIEnv* env, jthrowable obj)", "parent": 166, "children": [173, 174], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 69}}, {"id": 173, "type": "identifier", "text": "newGlobalRef", "parent": 172, "children": [], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 40}}, {"id": 174, "type": "argument_list", "text": "(JNIEnv* env, jthrowable obj)", "parent": 172, "children": [175, 179, 180], "start_point": {"row": 75, "column": 40}, "end_point": {"row": 75, "column": 69}}, {"id": 175, "type": "binary_expression", "text": "JNIEnv* env", "parent": 174, "children": [176, 177, 178], "start_point": {"row": 75, "column": 41}, "end_point": {"row": 75, "column": 52}}, {"id": 176, "type": "identifier", "text": "JNIEnv", "parent": 175, "children": [], "start_point": {"row": 75, "column": 41}, "end_point": {"row": 75, "column": 47}}, {"id": 177, "type": "*", "text": "*", "parent": 175, "children": [], "start_point": {"row": 75, "column": 47}, "end_point": {"row": 75, "column": 48}}, {"id": 178, "type": "identifier", "text": "env", "parent": 175, "children": [], "start_point": {"row": 75, "column": 49}, "end_point": {"row": 75, "column": 52}}, {"id": 179, "type": "identifier", "text": "jthrowable", "parent": 174, "children": [], "start_point": {"row": 75, "column": 54}, "end_point": {"row": 75, "column": 64}}, {"id": 180, "type": "ERROR", "text": "obj", "parent": 174, "children": [181], "start_point": {"row": 75, "column": 65}, "end_point": {"row": 75, "column": 68}}, {"id": 181, "type": "identifier", "text": "obj", "parent": 180, "children": [], "start_point": {"row": 75, "column": 65}, "end_point": {"row": 75, "column": 68}}]}, "node_categories": {"declarations": {"functions": [9, 12, 15, 20, 42, 65, 88, 109], "variables": [18, 23, 28, 33, 37, 40, 45, 50, 53, 58, 63, 68, 73, 76, 81, 86, 91, 96, 99, 104], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [116, 121, 126, 131, 132, 137, 140, 150, 151, 156, 159, 166, 167, 172, 175], "assignments": [], "loops": [], "conditionals": [10, 11, 13, 14, 16, 17, 21, 24, 27, 32, 34, 36, 39, 41, 43, 46, 49, 51, 52, 57, 62, 64, 66, 69, 72, 74, 75, 80, 85, 87, 89, 92, 95, 97, 98, 103, 108, 111, 113, 114, 117, 119, 120, 122, 124, 125, 127, 129, 130, 133, 135, 138, 141, 143, 144, 146, 147, 149, 152, 154, 157, 160, 162, 163, 165, 168, 170, 173, 176, 178, 179, 181], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "registerNatives", "text_snippet": "namespace facebook {\nnamespace yoga {\nnamespace vanillajni {\n\n/**\n * Registers a set of methods for "}, {"node_id": 12, "universal_type": "function", "name": "registerNatives", "text_snippet": "namespace yoga {\nnamespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts i"}, {"node_id": 15, "universal_type": "function", "name": "registerNatives", "text_snippet": "namespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fa"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n "}, {"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* me"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDe"}, {"node_id": 88, "universal_type": "function", "name": "unknown", "text_snippet": "getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSigna"}, {"node_id": 109, "universal_type": "function", "name": "unknown", "text_snippet": "#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\\n jnitype call##readable"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"ScopedGlobalRef.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"ScopedLocalRef.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n#pragma once\n#include \"ScopedGlobalRef.h\"\n#include \"ScopedLocalRef.h\"\n\nnamespace facebook {\nnamespace yoga {\nnamespace vanillajni {\n\n/**\n * Registers a set of methods for a JNI class. Aborts if registration fails.\n */\nvoid registerNatives(\n JNIEnv* env,\n const char* className,\n const JNINativeMethod methods[],\n size_t numMethods);\n\n/**\n * Returns a jmethodID for a class static method. Aborts if any error happens.\n */\njmethodID getStaticMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a jmethodID for a class non-static method. Aborts if any error\n * happens.\n */\njmethodID getMethodId(\n JNIEnv* env,\n jclass clazz,\n const char* methodName,\n const char* methodDescriptor);\n\n/**\n * Returns a class non-static field ID. Aborts if any error happens.\n */\njfieldID getFieldId(\n JNIEnv* env,\n jclass clazz,\n const char* fieldName,\n const char* fieldSignature);\n\n// Helper methods to call a non-static method on an object depending on the\n// return type. Each method will abort the execution if an error\n// (such as a Java pending exception) is detected after invoking the\n// Java method.\n#define DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jnitype, readableType) \\\n jnitype call##readableType##Method( \\\n JNIEnv* env, jobject obj, jmethodID methodId, ...)\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);\nDEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);\n\nScopedLocalRef<jobject> callStaticObjectMethod(\n JNIEnv* env,\n jclass clazz,\n jmethodID methodId,\n ...);\n\n/**\n * Given a local or a global reference, this method creates a new global\n * reference out of it. If any error happens, aborts the process.\n */\nScopedGlobalRef<jobject> newGlobalRef(JNIEnv* env, jobject obj);\n\nScopedGlobalRef<jthrowable> newGlobalRef(JNIEnv* env, jthrowable obj);\n} // namespace vanillajni\n} // namespace yoga\n} // namespace facebook\n"}
304
c
// Copyright 2005,2006,2007 <NAME>, <NAME> // $Id: ExprLabeler.h,v 1.4 2008-06-26 08:08:09 gergo Exp $ #ifndef H_EXPRLABELER #define H_EXPRLABELER #include <satire_rose.h> #include "cfg_support.h" #include "IrCreation.h" // preorder -- but it doesn't really matter class ExprLabeler : public AstSimpleProcessing { public: ExprLabeler(int, CFG *, Procedure *); int get_expnum() const; protected: void visit(SgNode *); private: ExprLabeler(); int expnum; CFG *cfg; Procedure *proc; }; #endif
22.55
22
(translation_unit) "// Copyright 2005,2006,2007 <NAME>, <NAME>\n// $Id: ExprLabeler.h,v 1.4 2008-06-26 08:08:09 gergo Exp $\n\n#ifndef H_EXPRLABELER\n#define H_EXPRLABELER\n\n#include <satire_rose.h>\n\n#include "cfg_support.h"\n#include "IrCreation.h"\n\n// preorder -- but it doesn't really matter\nclass ExprLabeler : public AstSimpleProcessing\n{\npublic:\n ExprLabeler(int, CFG *, Procedure *);\n int get_expnum() const;\n\nprotected:\n void visit(SgNode *);\n\nprivate:\n ExprLabeler();\n int expnum;\n CFG *cfg;\n Procedure *proc;\n};\n\n#endif\n" (comment) "// Copyright 2005,2006,2007 <NAME>, <NAME>" (comment) "// $Id: ExprLabeler.h,v 1.4 2008-06-26 08:08:09 gergo Exp $" (preproc_ifdef) "#ifndef H_EXPRLABELER\n#define H_EXPRLABELER\n\n#include <satire_rose.h>\n\n#include "cfg_support.h"\n#include "IrCreation.h"\n\n// preorder -- but it doesn't really matter\nclass ExprLabeler : public AstSimpleProcessing\n{\npublic:\n ExprLabeler(int, CFG *, Procedure *);\n int get_expnum() const;\n\nprotected:\n void visit(SgNode *);\n\nprivate:\n ExprLabeler();\n int expnum;\n CFG *cfg;\n Procedure *proc;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "H_EXPRLABELER" (preproc_def) "#define H_EXPRLABELER\n" (#define) "#define" (identifier) "H_EXPRLABELER" (preproc_include) "#include <satire_rose.h>\n" (#include) "#include" (system_lib_string) "<satire_rose.h>" (preproc_include) "#include "cfg_support.h"\n" (#include) "#include" (string_literal) ""cfg_support.h"" (") """ (string_content) "cfg_support.h" (") """ (preproc_include) "#include "IrCreation.h"\n" (#include) "#include" (string_literal) ""IrCreation.h"" (") """ (string_content) "IrCreation.h" (") """ (comment) "// preorder -- but it doesn't really matter" (function_definition) "class ExprLabeler : public AstSimpleProcessing\n{\npublic:\n ExprLabeler(int, CFG *, Procedure *);\n int get_expnum() const;\n\nprotected:\n void visit(SgNode *);\n\nprivate:\n ExprLabeler();\n int expnum;\n CFG *cfg;\n Procedure *proc;\n}" (type_identifier) "class" (ERROR) "ExprLabeler : public" (identifier) "ExprLabeler" (:) ":" (identifier) "public" (identifier) "AstSimpleProcessing" (compound_statement) "{\npublic:\n ExprLabeler(int, CFG *, Procedure *);\n int get_expnum() const;\n\nprotected:\n void visit(SgNode *);\n\nprivate:\n ExprLabeler();\n int expnum;\n CFG *cfg;\n Procedure *proc;\n}" ({) "{" (labeled_statement) "public:\n ExprLabeler(int, CFG *, Procedure *);" (statement_identifier) "public" (:) ":" (expression_statement) "ExprLabeler(int, CFG *, Procedure *);" (call_expression) "ExprLabeler(int, CFG *, Procedure *)" (identifier) "ExprLabeler" (argument_list) "(int, CFG *, Procedure *)" (() "(" (identifier) "int" (,) "," (binary_expression) "CFG *, Procedure" (identifier) "CFG" (*) "*" (ERROR) "," (,) "," (identifier) "Procedure" (ERROR) "*" (*) "*" ()) ")" (;) ";" (ERROR) "int get_expnum() const" (primitive_type) "int" (function_declarator) "get_expnum()" (identifier) "get_expnum" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (expression_statement) ";" (;) ";" (labeled_statement) "protected:\n void visit(SgNode *);" (statement_identifier) "protected" (:) ":" (declaration) "void visit(SgNode *);" (primitive_type) "void" (function_declarator) "visit(SgNode *)" (identifier) "visit" (parameter_list) "(SgNode *)" (() "(" (parameter_declaration) "SgNode *" (type_identifier) "SgNode" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (labeled_statement) "private:\n ExprLabeler();" (statement_identifier) "private" (:) ":" (expression_statement) "ExprLabeler();" (call_expression) "ExprLabeler()" (identifier) "ExprLabeler" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int expnum;" (primitive_type) "int" (identifier) "expnum" (;) ";" (declaration) "CFG *cfg;" (type_identifier) "CFG" (pointer_declarator) "*cfg" (*) "*" (identifier) "cfg" (;) ";" (declaration) "Procedure *proc;" (type_identifier) "Procedure" (pointer_declarator) "*proc" (*) "*" (identifier) "proc" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif"
110
4
{"language": "c", "success": true, "metadata": {"lines": 22, "avg_line_length": 22.55, "nodes": 63, "errors": 0, "source_hash": "ce952a4bd00650d99ea3f620a3e7c56de90fbe633555c1cbf60a16093c93cf16", "categorized_nodes": 40}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef H_EXPRLABELER\n#define H_EXPRLABELER\n\n#include <satire_rose.h>\n\n#include \"cfg_support.h\"\n#include \"IrCreation.h\"\n\n// preorder -- but it doesn't really matter\nclass ExprLabeler : public AstSimpleProcessing\n{\npublic:\n ExprLabeler(int, CFG *, Procedure *);\n int get_expnum() const;\n\nprotected:\n void visit(SgNode *);\n\nprivate:\n ExprLabeler();\n int expnum;\n CFG *cfg;\n Procedure *proc;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 62], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 28, "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": "H_EXPRLABELER", "parent": 0, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 21}}, {"id": 3, "type": "preproc_def", "text": "#define H_EXPRLABELER\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": "H_EXPRLABELER", "parent": 3, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "#include <satire_rose.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": "system_lib_string", "text": "<satire_rose.h>", "parent": 6, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 24}}, {"id": 9, "type": "preproc_include", "text": "#include \"cfg_support.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": "\"cfg_support.h\"", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 24}}, {"id": 12, "type": "preproc_include", "text": "#include \"IrCreation.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": "\"IrCreation.h\"", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 23}}, {"id": 15, "type": "function_definition", "text": "class ExprLabeler : public AstSimpleProcessing\n{\npublic:\n ExprLabeler(int, CFG *, Procedure *);\n int get_expnum() const;\n\nprotected:\n void visit(SgNode *);\n\nprivate:\n ExprLabeler();\n int expnum;\n CFG *cfg;\n Procedure *proc;\n}", "parent": 0, "children": [16, 18], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 16, "type": "ERROR", "text": "ExprLabeler : public", "parent": 15, "children": [17], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 26}}, {"id": 17, "type": "identifier", "text": "ExprLabeler", "parent": 16, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 17}}, {"id": 18, "type": "identifier", "text": "AstSimpleProcessing", "parent": 15, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 46}}, {"id": 19, "type": "labeled_statement", "text": "public:\n ExprLabeler(int, CFG *, Procedure *);", "parent": 15, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 41}}, {"id": 20, "type": "call_expression", "text": "ExprLabeler(int, CFG *, Procedure *)", "parent": 19, "children": [21, 22], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 40}}, {"id": 21, "type": "identifier", "text": "ExprLabeler", "parent": 20, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 15}}, {"id": 22, "type": "argument_list", "text": "(int, CFG *, Procedure *)", "parent": 20, "children": [23, 24, 28], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 40}}, {"id": 23, "type": "identifier", "text": "int", "parent": 22, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 19}}, {"id": 24, "type": "binary_expression", "text": "CFG *, Procedure", "parent": 22, "children": [25, 26, 27], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 37}}, {"id": 25, "type": "identifier", "text": "CFG", "parent": 24, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 24}}, {"id": 26, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 26}}, {"id": 27, "type": "identifier", "text": "Procedure", "parent": 24, "children": [], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 37}}, {"id": 28, "type": "ERROR", "text": "*", "parent": 22, "children": [29], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 39}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 39}}, {"id": 30, "type": "ERROR", "text": "int get_expnum() const", "parent": 15, "children": [31, 32], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 26}}, {"id": 31, "type": "primitive_type", "text": "int", "parent": 30, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 7}}, {"id": 32, "type": "function_declarator", "text": "get_expnum()", "parent": 30, "children": [33, 34], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 20}}, {"id": 33, "type": "identifier", "text": "get_expnum", "parent": 32, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 18}}, {"id": 34, "type": "parameter_list", "text": "()", "parent": 32, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 20}}, {"id": 35, "type": "labeled_statement", "text": "protected:\n void visit(SgNode *);", "parent": 15, "children": [36], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 25}}, {"id": 36, "type": "declaration", "text": "void visit(SgNode *);", "parent": 35, "children": [37, 38], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 25}}, {"id": 37, "type": "primitive_type", "text": "void", "parent": 36, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 8}}, {"id": 38, "type": "function_declarator", "text": "visit(SgNode *)", "parent": 36, "children": [39, 40], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 24}}, {"id": 39, "type": "identifier", "text": "visit", "parent": 38, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 14}}, {"id": 40, "type": "parameter_list", "text": "(SgNode *)", "parent": 38, "children": [41], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 24}}, {"id": 41, "type": "parameter_declaration", "text": "SgNode *", "parent": 40, "children": [42, 43], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 23}}, {"id": 42, "type": "type_identifier", "text": "SgNode", "parent": 41, "children": [], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 21}}, {"id": 43, "type": "abstract_pointer_declarator", "text": "*", "parent": 41, "children": [44], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 23}}, {"id": 44, "type": "*", "text": "*", "parent": 43, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 23}}, {"id": 45, "type": "labeled_statement", "text": "private:\n ExprLabeler();", "parent": 15, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 18}}, {"id": 46, "type": "call_expression", "text": "ExprLabeler()", "parent": 45, "children": [47, 48], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 17}}, {"id": 47, "type": "identifier", "text": "ExprLabeler", "parent": 46, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 15}}, {"id": 48, "type": "argument_list", "text": "()", "parent": 46, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 17}}, {"id": 49, "type": "declaration", "text": "int expnum;", "parent": 15, "children": [50, 51], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 15}}, {"id": 50, "type": "primitive_type", "text": "int", "parent": 49, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 7}}, {"id": 51, "type": "identifier", "text": "expnum", "parent": 49, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 14}}, {"id": 52, "type": "declaration", "text": "CFG *cfg;", "parent": 15, "children": [53, 54], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 13}}, {"id": 53, "type": "type_identifier", "text": "CFG", "parent": 52, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 7}}, {"id": 54, "type": "pointer_declarator", "text": "*cfg", "parent": 52, "children": [55, 56], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 12}}, {"id": 55, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 9}}, {"id": 56, "type": "identifier", "text": "cfg", "parent": 54, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 12}}, {"id": 57, "type": "declaration", "text": "Procedure *proc;", "parent": 15, "children": [58, 59], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 20}}, {"id": 58, "type": "type_identifier", "text": "Procedure", "parent": 57, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 13}}, {"id": 59, "type": "pointer_declarator", "text": "*proc", "parent": 57, "children": [60, 61], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 19}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 15}}, {"id": 61, "type": "identifier", "text": "proc", "parent": 59, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 19}}, {"id": 62, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 32, 38], "variables": [36, 41, 49, 52, 57], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [20, 24, 46], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 17, 18, 21, 23, 25, 27, 33, 39, 42, 47, 51, 53, 56, 58, 61, 62], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "ExprLabeler", "text_snippet": "class ExprLabeler : public AstSimpleProcessing\n{\npublic:\n ExprLabeler(int, CFG *, Procedure *);\n "}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "get_expnum()"}, {"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "visit(SgNode *)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <satire_rose.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"cfg_support.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"IrCreation.h\"\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "// Copyright 2005,2006,2007 <NAME>, <NAME>\n// $Id: ExprLabeler.h,v 1.4 2008-06-26 08:08:09 gergo Exp $\n\n#ifndef H_EXPRLABELER\n#define H_EXPRLABELER\n\n#include <satire_rose.h>\n\n#include \"cfg_support.h\"\n#include \"IrCreation.h\"\n\n// preorder -- but it doesn't really matter\nclass ExprLabeler : public AstSimpleProcessing\n{\npublic:\n ExprLabeler(int, CFG *, Procedure *);\n int get_expnum() const;\n\nprotected:\n void visit(SgNode *);\n\nprivate:\n ExprLabeler();\n int expnum;\n CFG *cfg;\n Procedure *proc;\n};\n\n#endif\n"}
305
c
#ifndef COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H #define COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H #include "AssembledMultiMapping.h" #include <Compliant/config.h> #include "../utils/map.h" namespace sofa { namespace component { namespace mapping { /** natural pairing between two vector dofs: \[ f(x, y) = x^T y \] use it to enforce holonomic bilateral constraints in your scene as: -lambda^T f(x) (+ unit compliance on end dofs) note that you need a numerical solver that can handle indefinite systems (e.g. minres) @author: <NAME> */ template <class TIn, class TOut > class PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> { public: SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut)); typedef typename TIn::Real in_real; typedef typename TOut::Real out_real; typedef AssembledMultiMapping<TIn, TOut> base; typedef PairingMultiMapping self; Data<SReal> sign; PairingMultiMapping() : sign(initData(&sign, (SReal)1.0, "sign", "scalar factor")) { } protected: void apply(typename self::out_pos_type& out, const helper::vector< typename self::in_pos_type >& in ) { // auto resize output this->to()->resize( 1 ); assert( in.size() == 2 ); assert( in[0].size() == in[1].size() ); out_real& res = out[0][0]; res = 0; for(unsigned i = 0, n = in[0].size(); i < n; ++i) { res += in[0][i] * in[1][i]; } res *= sign.getValue(); } void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/, const typename self::const_out_deriv_type& out_force) { typedef typename self::geometric_type::CompressedMatrix matrix_type; matrix_type& dJ = this->geometric.compressedMatrix; // out force const out_real& mu = out_force[0][0]; const SReal value = sign.getValue() * mu; // matrix sizes const unsigned size_x = this->from(0)->getMatrixSize(); const unsigned size_y = this->from(1)->getMatrixSize(); assert( size_x == size_y ); const unsigned size = size_x + size_y; dJ.resize( size, size ); // we want dJ = mu * (0 I \\ I 0) for(unsigned i = 0; i < size_x; ++i) { dJ.startVec(i); dJ.insertBack(i, size_x + i) = value; } for(unsigned i = 0; i < size_y; ++i) { dJ.startVec(size_x + i); dJ.insertBack(size_x + i, i) = value; } dJ.finalize(); } void assemble(const helper::vector< typename self::in_pos_type >& in ) { assert(this->getFrom()[0] != this->getFrom()[1]); for(unsigned i = 0, n = in.size(); i < n; ++i) { typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix; // resize/clean J.resize( 1, self::Nin * in[i].size() ); const SReal& s = sign.getValue(); const unsigned other = 1 - i; // fill J.startVec(0); for(unsigned j = 0, m = in[i].size(); j < m; ++j) { for(unsigned k = 0; k < self::Nin; ++k) { const unsigned col = j * self::Nin + k; J.insertBack(0, col) = s * in[other][j][k]; } } J.finalize(); } } }; } } } #endif
29.74
116
(translation_unit) "#ifndef COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H\n#define COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H\n\n#include "AssembledMultiMapping.h"\n#include <Compliant/config.h>\n\n#include "../utils/map.h"\n\nnamespace sofa {\n\nnamespace component {\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \[ f(x, y) = x^T y \]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n \n typedef typename TIn::Real in_real;\n typedef typename TOut::Real out_real;\n \n typedef AssembledMultiMapping<TIn, TOut> base;\n typedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, "sign", "scalar factor")) {\n \n }\n \nprotected:\n\n void apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n }\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n assert(this->getFrom()[0] != this->getFrom()[1]);\n\n for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n }\n \n\n\n};\n\n\n\n\n\n\n}\n}\n}\n\n#endif\n" (preproc_ifdef) "#ifndef COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H\n#define COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H\n\n#include "AssembledMultiMapping.h"\n#include <Compliant/config.h>\n\n#include "../utils/map.h"\n\nnamespace sofa {\n\nnamespace component {\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \[ f(x, y) = x^T y \]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n \n typedef typename TIn::Real in_real;\n typedef typename TOut::Real out_real;\n \n typedef AssembledMultiMapping<TIn, TOut> base;\n typedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, "sign", "scalar factor")) {\n \n }\n \nprotected:\n\n void apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n }\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n assert(this->getFrom()[0] != this->getFrom()[1]);\n\n for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n }\n \n\n\n};\n\n\n\n\n\n\n}\n}\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H" (preproc_def) "#define COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H\n" (#define) "#define" (identifier) "COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H" (preproc_include) "#include "AssembledMultiMapping.h"\n" (#include) "#include" (string_literal) ""AssembledMultiMapping.h"" (") """ (string_content) "AssembledMultiMapping.h" (") """ (preproc_include) "#include <Compliant/config.h>\n" (#include) "#include" (system_lib_string) "<Compliant/config.h>" (preproc_include) "#include "../utils/map.h"\n" (#include) "#include" (string_literal) ""../utils/map.h"" (") """ (string_content) "../utils/map.h" (") """ (function_definition) "namespace sofa {\n\nnamespace component {\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \[ f(x, y) = x^T y \]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n \n typedef typename TIn::Real in_real;\n typedef typename TOut::Real out_real;\n \n typedef AssembledMultiMapping<TIn, TOut> base;\n typedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, "sign", "scalar factor")) {\n \n }\n \nprotected:\n\n void apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n }\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n assert(this->getFrom()[0] != this->getFrom()[1]);\n\n for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n }\n \n\n\n};\n\n\n\n\n\n\n}\n}\n}" (type_identifier) "namespace" (identifier) "sofa" (compound_statement) "{\n\nnamespace component {\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \[ f(x, y) = x^T y \]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n \n typedef typename TIn::Real in_real;\n typedef typename TOut::Real out_real;\n \n typedef AssembledMultiMapping<TIn, TOut> base;\n typedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, "sign", "scalar factor")) {\n \n }\n \nprotected:\n\n void apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n }\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n assert(this->getFrom()[0] != this->getFrom()[1]);\n\n for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n }\n \n\n\n};\n\n\n\n\n\n\n}\n}\n}" ({) "{" (function_definition) "namespace component {\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \[ f(x, y) = x^T y \]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n \n typedef typename TIn::Real in_real;\n typedef typename TOut::Real out_real;\n \n typedef AssembledMultiMapping<TIn, TOut> base;\n typedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, "sign", "scalar factor")) {\n \n }\n \nprotected:\n\n void apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n }\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n assert(this->getFrom()[0] != this->getFrom()[1]);\n\n for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n }\n \n\n\n};\n\n\n\n\n\n\n}\n}" (type_identifier) "namespace" (identifier) "component" (compound_statement) "{\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \[ f(x, y) = x^T y \]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n \n typedef typename TIn::Real in_real;\n typedef typename TOut::Real out_real;\n \n typedef AssembledMultiMapping<TIn, TOut> base;\n typedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, "sign", "scalar factor")) {\n \n }\n \nprotected:\n\n void apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n }\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n assert(this->getFrom()[0] != this->getFrom()[1]);\n\n for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n }\n \n\n\n};\n\n\n\n\n\n\n}\n}" ({) "{" (function_definition) "namespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \[ f(x, y) = x^T y \]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n \n typedef typename TIn::Real in_real;\n typedef typename TOut::Real out_real;\n \n typedef AssembledMultiMapping<TIn, TOut> base;\n typedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, "sign", "scalar factor")) {\n \n }\n \nprotected:\n\n void apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n }\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n assert(this->getFrom()[0] != this->getFrom()[1]);\n\n for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n }\n \n\n\n};\n\n\n\n\n\n\n}" (type_identifier) "namespace" (identifier) "mapping" (compound_statement) "{\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \[ f(x, y) = x^T y \]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n \n typedef typename TIn::Real in_real;\n typedef typename TOut::Real out_real;\n \n typedef AssembledMultiMapping<TIn, TOut> base;\n typedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, "sign", "scalar factor")) {\n \n }\n \nprotected:\n\n void apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n }\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n assert(this->getFrom()[0] != this->getFrom()[1]);\n\n for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n }\n \n\n\n};\n\n\n\n\n\n\n}" ({) "{" (comment) "/** \n\n natural pairing between two vector dofs:\n \n \[ f(x, y) = x^T y \]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/" (expression_statement) "template <class TIn, class TOut >\nclass" (comma_expression) "template <class TIn, class TOut >\nclass" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "TIn" (identifier) "TIn" (,) "," (binary_expression) "class TOut >\nclass" (identifier) "class" (ERROR) "TOut" (identifier) "TOut" (>) ">" (identifier) "class" (;) "" (ERROR) "PairingMultiMapping : public AssembledMultiMapping<TIn, TOut>" (binary_expression) "PairingMultiMapping : public AssembledMultiMapping<TIn" (identifier) "PairingMultiMapping" (ERROR) ": public AssembledMultiMapping" (:) ":" (type_identifier) "public" (identifier) "AssembledMultiMapping" (<) "<" (identifier) "TIn" (,) "," (identifier) "TOut" (>) ">" (compound_statement) "{\npublic:\n SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n \n typedef typename TIn::Real in_real;\n typedef typename TOut::Real out_real;\n \n typedef AssembledMultiMapping<TIn, TOut> base;\n typedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, "sign", "scalar factor")) {\n \n }\n \nprotected:\n\n void apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n }\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n assert(this->getFrom()[0] != this->getFrom()[1]);\n\n for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n }\n \n\n\n}" ({) "{" (labeled_statement) "public:\n SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));" (statement_identifier) "public" (:) ":" (expression_statement) "SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));" (call_expression) "SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut))" (identifier) "SOFA_CLASS" (argument_list) "(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut))" (() "(" (call_expression) "SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut)" (identifier) "SOFA_TEMPLATE2" (argument_list) "(PairingMultiMapping,TIn,TOut)" (() "(" (identifier) "PairingMultiMapping" (,) "," (identifier) "TIn" (,) "," (identifier) "TOut" ()) ")" (,) "," (call_expression) "SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut)" (identifier) "SOFA_TEMPLATE2" (argument_list) "(AssembledMultiMapping,TIn,TOut)" (() "(" (identifier) "AssembledMultiMapping" (,) "," (identifier) "TIn" (,) "," (identifier) "TOut" ()) ")" ()) ")" (;) ";" (type_definition) "typedef typename TIn::Real in_real;" (typedef) "typedef" (type_identifier) "typename" (ERROR) "TIn::Real" (type_identifier) "TIn" (:) ":" (:) ":" (type_identifier) "Real" (type_identifier) "in_real" (;) ";" (type_definition) "typedef typename TOut::Real out_real;" (typedef) "typedef" (type_identifier) "typename" (ERROR) "TOut::Real" (type_identifier) "TOut" (:) ":" (:) ":" (identifier) "Real" (type_identifier) "out_real" (;) ";" (type_definition) "typedef AssembledMultiMapping<TIn, TOut> base;" (typedef) "typedef" (type_identifier) "AssembledMultiMapping" (ERROR) "<" (<) "<" (type_identifier) "TIn" (,) "," (ERROR) "TOut>" (type_identifier) "TOut" (>) ">" (type_identifier) "base" (;) ";" (type_definition) "typedef PairingMultiMapping self;" (typedef) "typedef" (type_identifier) "PairingMultiMapping" (type_identifier) "self" (;) ";" (expression_statement) "Data<SReal> sign;" (binary_expression) "Data<SReal> sign" (binary_expression) "Data<SReal" (identifier) "Data" (<) "<" (identifier) "SReal" (>) ">" (identifier) "sign" (;) ";" (ERROR) "PairingMultiMapping() :" (call_expression) "PairingMultiMapping()" (identifier) "PairingMultiMapping" (argument_list) "()" (() "(" ()) ")" (:) ":" (expression_statement) "sign(initData(&sign, (SReal)1.0, "sign", "scalar factor"))" (call_expression) "sign(initData(&sign, (SReal)1.0, "sign", "scalar factor"))" (identifier) "sign" (argument_list) "(initData(&sign, (SReal)1.0, "sign", "scalar factor"))" (() "(" (call_expression) "initData(&sign, (SReal)1.0, "sign", "scalar factor")" (identifier) "initData" (argument_list) "(&sign, (SReal)1.0, "sign", "scalar factor")" (() "(" (pointer_expression) "&sign" (&) "&" (identifier) "sign" (,) "," (cast_expression) "(SReal)1.0" (() "(" (type_descriptor) "SReal" (type_identifier) "SReal" ()) ")" (number_literal) "1.0" (,) "," (string_literal) ""sign"" (") """ (string_content) "sign" (") """ (,) "," (string_literal) ""scalar factor"" (") """ (string_content) "scalar factor" (") """ ()) ")" ()) ")" (;) "" (compound_statement) "{\n \n }" ({) "{" (}) "}" (labeled_statement) "protected:\n\n void apply(typename self::out_pos_type& out,\n const" (statement_identifier) "protected" (ERROR) ":\n\n void apply(typename self:" (:) ":" (primitive_type) "void" (identifier) "apply" (() "(" (parameter_declaration) "typename self" (type_identifier) "typename" (identifier) "self" (:) ":" (:) ":" (expression_statement) "out_pos_type& out,\n const" (comma_expression) "out_pos_type& out,\n const" (binary_expression) "out_pos_type& out" (identifier) "out_pos_type" (&) "&" (identifier) "out" (,) "," (identifier) "const" (;) "" (labeled_statement) "helper::vector< typename" (statement_identifier) "helper" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "vector< typename" (binary_expression) "vector< typename" (identifier) "vector" (<) "<" (identifier) "typename" (;) "" (labeled_statement) "self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n }" (statement_identifier) "self" (:) ":" (ERROR) ":in_pos_type >& in )" (:) ":" (binary_expression) "in_pos_type >& in" (identifier) "in_pos_type" (>) ">" (pointer_expression) "& in" (&) "&" (identifier) "in" ()) ")" (compound_statement) "{\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n }" ({) "{" (comment) "// auto resize output" (expression_statement) "this->to()->resize( 1 );" (call_expression) "this->to()->resize( 1 )" (field_expression) "this->to()->resize" (call_expression) "this->to()" (field_expression) "this->to" (identifier) "this" (->) "->" (field_identifier) "to" (argument_list) "()" (() "(" ()) ")" (->) "->" (field_identifier) "resize" (argument_list) "( 1 )" (() "(" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "assert( in.size() == 2 );" (call_expression) "assert( in.size() == 2 )" (identifier) "assert" (argument_list) "( in.size() == 2 )" (() "(" (binary_expression) "in.size() == 2" (call_expression) "in.size()" (field_expression) "in.size" (identifier) "in" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (==) "==" (number_literal) "2" ()) ")" (;) ";" (expression_statement) "assert( in[0].size() == in[1].size() );" (call_expression) "assert( in[0].size() == in[1].size() )" (identifier) "assert" (argument_list) "( in[0].size() == in[1].size() )" (() "(" (binary_expression) "in[0].size() == in[1].size()" (call_expression) "in[0].size()" (field_expression) "in[0].size" (subscript_expression) "in[0]" (identifier) "in" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (==) "==" (call_expression) "in[1].size()" (field_expression) "in[1].size" (subscript_expression) "in[1]" (identifier) "in" ([) "[" (number_literal) "1" (]) "]" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (expression_statement) "out_real& res = out[0][0];" (binary_expression) "out_real& res = out[0][0]" (identifier) "out_real" (&) "&" (assignment_expression) "res = out[0][0]" (identifier) "res" (=) "=" (subscript_expression) "out[0][0]" (subscript_expression) "out[0]" (identifier) "out" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" (;) ";" (expression_statement) "res = 0;" (assignment_expression) "res = 0" (identifier) "res" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }" (for) "for" (() "(" (declaration) "unsigned i = 0, n = in[0].size();" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (,) "," (init_declarator) "n = in[0].size()" (identifier) "n" (=) "=" (call_expression) "in[0].size()" (field_expression) "in[0].size" (subscript_expression) "in[0]" (identifier) "in" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (binary_expression) "i < n" (identifier) "i" (<) "<" (identifier) "n" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{\n res += in[0][i] * in[1][i];\n }" ({) "{" (expression_statement) "res += in[0][i] * in[1][i];" (assignment_expression) "res += in[0][i] * in[1][i]" (identifier) "res" (+=) "+=" (binary_expression) "in[0][i] * in[1][i]" (subscript_expression) "in[0][i]" (subscript_expression) "in[0]" (identifier) "in" ([) "[" (number_literal) "0" (]) "]" ([) "[" (identifier) "i" (]) "]" (*) "*" (subscript_expression) "in[1][i]" (subscript_expression) "in[1]" (identifier) "in" ([) "[" (number_literal) "1" (]) "]" ([) "[" (identifier) "i" (]) "]" (;) ";" (}) "}" (expression_statement) "res *= sign.getValue();" (assignment_expression) "res *= sign.getValue()" (identifier) "res" (*=) "*=" (call_expression) "sign.getValue()" (field_expression) "sign.getValue" (identifier) "sign" (.) "." (field_identifier) "getValue" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }" (primitive_type) "void" (function_declarator) "assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force)" (identifier) "assemble_geometric" (parameter_list) "(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force)" (() "(" (parameter_declaration) "const helper::vector<typename self::const_in_coord_type" (type_qualifier) "const" (const) "const" (type_identifier) "helper" (ERROR) "::vector<typename self::" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "typename" (identifier) "self" (:) ":" (:) ":" (identifier) "const_in_coord_type" (ERROR) ">&" (>) ">" (&) "&" (comment) "/*in_pos*/" (,) "," (parameter_declaration) "const typename self::const_out_deriv_type& out_force" (type_qualifier) "const" (const) "const" (type_identifier) "typename" (ERROR) "self::const_out_deriv_type&" (identifier) "self" (:) ":" (:) ":" (identifier) "const_out_deriv_type" (&) "&" (identifier) "out_force" ()) ")" (compound_statement) "{\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }" ({) "{" (type_definition) "typedef typename self::geometric_type::CompressedMatrix matrix_type;" (typedef) "typedef" (type_identifier) "typename" (ERROR) "self::geometric_type::CompressedMatrix" (type_identifier) "self" (:) ":" (:) ":" (type_identifier) "geometric_type" (:) ":" (:) ":" (type_identifier) "CompressedMatrix" (type_identifier) "matrix_type" (;) ";" (expression_statement) "matrix_type& dJ = this->geometric.compressedMatrix;" (binary_expression) "matrix_type& dJ = this->geometric.compressedMatrix" (identifier) "matrix_type" (&) "&" (assignment_expression) "dJ = this->geometric.compressedMatrix" (identifier) "dJ" (=) "=" (field_expression) "this->geometric.compressedMatrix" (field_expression) "this->geometric" (identifier) "this" (->) "->" (field_identifier) "geometric" (.) "." (field_identifier) "compressedMatrix" (;) ";" (comment) "// out force" (declaration) "const out_real& mu = out_force[0][0];" (type_qualifier) "const" (const) "const" (type_identifier) "out_real" (ERROR) "&" (&) "&" (init_declarator) "mu = out_force[0][0]" (identifier) "mu" (=) "=" (subscript_expression) "out_force[0][0]" (subscript_expression) "out_force[0]" (identifier) "out_force" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" (;) ";" (declaration) "const SReal value = sign.getValue() * mu;" (type_qualifier) "const" (const) "const" (type_identifier) "SReal" (init_declarator) "value = sign.getValue() * mu" (identifier) "value" (=) "=" (binary_expression) "sign.getValue() * mu" (call_expression) "sign.getValue()" (field_expression) "sign.getValue" (identifier) "sign" (.) "." (field_identifier) "getValue" (argument_list) "()" (() "(" ()) ")" (*) "*" (identifier) "mu" (;) ";" (comment) "// matrix sizes" (declaration) "const unsigned size_x = this->from(0)->getMatrixSize();" (type_qualifier) "const" (const) "const" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "size_x = this->from(0)->getMatrixSize()" (identifier) "size_x" (=) "=" (call_expression) "this->from(0)->getMatrixSize()" (field_expression) "this->from(0)->getMatrixSize" (call_expression) "this->from(0)" (field_expression) "this->from" (identifier) "this" (->) "->" (field_identifier) "from" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (->) "->" (field_identifier) "getMatrixSize" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "const unsigned size_y = this->from(1)->getMatrixSize();" (type_qualifier) "const" (const) "const" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "size_y = this->from(1)->getMatrixSize()" (identifier) "size_y" (=) "=" (call_expression) "this->from(1)->getMatrixSize()" (field_expression) "this->from(1)->getMatrixSize" (call_expression) "this->from(1)" (field_expression) "this->from" (identifier) "this" (->) "->" (field_identifier) "from" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (->) "->" (field_identifier) "getMatrixSize" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "assert( size_x == size_y );" (call_expression) "assert( size_x == size_y )" (identifier) "assert" (argument_list) "( size_x == size_y )" (() "(" (binary_expression) "size_x == size_y" (identifier) "size_x" (==) "==" (identifier) "size_y" ()) ")" (;) ";" (declaration) "const unsigned size = size_x + size_y;" (type_qualifier) "const" (const) "const" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "size = size_x + size_y" (identifier) "size" (=) "=" (binary_expression) "size_x + size_y" (identifier) "size_x" (+) "+" (identifier) "size_y" (;) ";" (expression_statement) "dJ.resize( size, size );" (call_expression) "dJ.resize( size, size )" (field_expression) "dJ.resize" (identifier) "dJ" (.) "." (field_identifier) "resize" (argument_list) "( size, size )" (() "(" (identifier) "size" (,) "," (identifier) "size" ()) ")" (;) ";" (comment) "// we want dJ = mu * (0 I \\ I 0)" (for_statement) "for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }" (for) "for" (() "(" (declaration) "unsigned i = 0;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < size_x" (identifier) "i" (<) "<" (identifier) "size_x" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }" ({) "{" (expression_statement) "dJ.startVec(i);" (call_expression) "dJ.startVec(i)" (field_expression) "dJ.startVec" (identifier) "dJ" (.) "." (field_identifier) "startVec" (argument_list) "(i)" (() "(" (identifier) "i" ()) ")" (;) ";" (expression_statement) "dJ.insertBack(i, size_x + i) = value;" (assignment_expression) "dJ.insertBack(i, size_x + i) = value" (call_expression) "dJ.insertBack(i, size_x + i)" (field_expression) "dJ.insertBack" (identifier) "dJ" (.) "." (field_identifier) "insertBack" (argument_list) "(i, size_x + i)" (() "(" (identifier) "i" (,) "," (binary_expression) "size_x + i" (identifier) "size_x" (+) "+" (identifier) "i" ()) ")" (=) "=" (identifier) "value" (;) ";" (}) "}" (for_statement) "for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }" (for) "for" (() "(" (declaration) "unsigned i = 0;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < size_y" (identifier) "i" (<) "<" (identifier) "size_y" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }" ({) "{" (expression_statement) "dJ.startVec(size_x + i);" (call_expression) "dJ.startVec(size_x + i)" (field_expression) "dJ.startVec" (identifier) "dJ" (.) "." (field_identifier) "startVec" (argument_list) "(size_x + i)" (() "(" (binary_expression) "size_x + i" (identifier) "size_x" (+) "+" (identifier) "i" ()) ")" (;) ";" (expression_statement) "dJ.insertBack(size_x + i, i) = value;" (assignment_expression) "dJ.insertBack(size_x + i, i) = value" (call_expression) "dJ.insertBack(size_x + i, i)" (field_expression) "dJ.insertBack" (identifier) "dJ" (.) "." (field_identifier) "insertBack" (argument_list) "(size_x + i, i)" (() "(" (binary_expression) "size_x + i" (identifier) "size_x" (+) "+" (identifier) "i" (,) "," (identifier) "i" ()) ")" (=) "=" (identifier) "value" (;) ";" (}) "}" (expression_statement) "dJ.finalize();" (call_expression) "dJ.finalize()" (field_expression) "dJ.finalize" (identifier) "dJ" (.) "." (field_identifier) "finalize" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n assert(this->getFrom()[0] != this->getFrom()[1]);\n\n for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n }" (primitive_type) "void" (function_declarator) "assemble(const helper::vector< typename self::in_pos_type >& in )" (identifier) "assemble" (parameter_list) "(const helper::vector< typename self::in_pos_type >& in )" (() "(" (parameter_declaration) "const helper::vector< typename self::in_pos_type >& in" (type_qualifier) "const" (const) "const" (type_identifier) "helper" (ERROR) "::vector< typename self::in_pos_type >&" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "typename" (identifier) "self" (:) ":" (:) ":" (identifier) "in_pos_type" (>) ">" (&) "&" (identifier) "in" ()) ")" (compound_statement) "{\n assert(this->getFrom()[0] != this->getFrom()[1]);\n\n for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n }" ({) "{" (expression_statement) "assert(this->getFrom()[0] != this->getFrom()[1]);" (call_expression) "assert(this->getFrom()[0] != this->getFrom()[1])" (identifier) "assert" (argument_list) "(this->getFrom()[0] != this->getFrom()[1])" (() "(" (binary_expression) "this->getFrom()[0] != this->getFrom()[1]" (subscript_expression) "this->getFrom()[0]" (call_expression) "this->getFrom()" (field_expression) "this->getFrom" (identifier) "this" (->) "->" (field_identifier) "getFrom" (argument_list) "()" (() "(" ()) ")" ([) "[" (number_literal) "0" (]) "]" (!=) "!=" (subscript_expression) "this->getFrom()[1]" (call_expression) "this->getFrom()" (field_expression) "this->getFrom" (identifier) "this" (->) "->" (field_identifier) "getFrom" (argument_list) "()" (() "(" ()) ")" ([) "[" (number_literal) "1" (]) "]" ()) ")" (;) ";" (for_statement) "for(unsigned i = 0, n = in.size(); i < n; ++i) {\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }" (for) "for" (() "(" (declaration) "unsigned i = 0, n = in.size();" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (,) "," (init_declarator) "n = in.size()" (identifier) "n" (=) "=" (call_expression) "in.size()" (field_expression) "in.size" (identifier) "in" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (binary_expression) "i < n" (identifier) "i" (<) "<" (identifier) "n" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{\n typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }" ({) "{" (declaration) "typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;" (type_identifier) "typename" (ERROR) "self::jacobian_type::CompressedMatrix&" (identifier) "self" (:) ":" (:) ":" (identifier) "jacobian_type" (:) ":" (:) ":" (identifier) "CompressedMatrix" (&) "&" (init_declarator) "J = this->jacobian(i).compressedMatrix" (identifier) "J" (=) "=" (field_expression) "this->jacobian(i).compressedMatrix" (call_expression) "this->jacobian(i)" (field_expression) "this->jacobian" (identifier) "this" (->) "->" (field_identifier) "jacobian" (argument_list) "(i)" (() "(" (identifier) "i" ()) ")" (.) "." (field_identifier) "compressedMatrix" (;) ";" (comment) "// resize/clean" (expression_statement) "J.resize( 1, self::Nin * in[i].size() );" (call_expression) "J.resize( 1, self::Nin * in[i].size() )" (field_expression) "J.resize" (identifier) "J" (.) "." (field_identifier) "resize" (argument_list) "( 1, self::Nin * in[i].size() )" (() "(" (number_literal) "1" (,) "," (binary_expression) "self::Nin * in[i].size()" (identifier) "self" (ERROR) "::Nin" (:) ":" (:) ":" (identifier) "Nin" (*) "*" (call_expression) "in[i].size()" (field_expression) "in[i].size" (subscript_expression) "in[i]" (identifier) "in" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (declaration) "const SReal& s = sign.getValue();" (type_qualifier) "const" (const) "const" (type_identifier) "SReal" (ERROR) "&" (&) "&" (init_declarator) "s = sign.getValue()" (identifier) "s" (=) "=" (call_expression) "sign.getValue()" (field_expression) "sign.getValue" (identifier) "sign" (.) "." (field_identifier) "getValue" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "const unsigned other = 1 - i;" (type_qualifier) "const" (const) "const" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "other = 1 - i" (identifier) "other" (=) "=" (binary_expression) "1 - i" (number_literal) "1" (-) "-" (identifier) "i" (;) ";" (comment) "// fill" (expression_statement) "J.startVec(0);" (call_expression) "J.startVec(0)" (field_expression) "J.startVec" (identifier) "J" (.) "." (field_identifier) "startVec" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (for_statement) "for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }" (for) "for" (() "(" (declaration) "unsigned j = 0, m = in[i].size();" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (,) "," (init_declarator) "m = in[i].size()" (identifier) "m" (=) "=" (call_expression) "in[i].size()" (field_expression) "in[i].size" (subscript_expression) "in[i]" (identifier) "in" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (binary_expression) "j < m" (identifier) "j" (<) "<" (identifier) "m" (;) ";" (update_expression) "++j" (++) "++" (identifier) "j" ()) ")" (compound_statement) "{\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }" ({) "{" (for_statement) "for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }" (for) "for" (() "(" (declaration) "unsigned k = 0;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "k = 0" (identifier) "k" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "k < self" (identifier) "k" (<) "<" (identifier) "self" (ERROR) "::Nin" (:) ":" (:) ":" (identifier) "Nin" (;) ";" (update_expression) "++k" (++) "++" (identifier) "k" ()) ")" (compound_statement) "{\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }" ({) "{" (declaration) "const unsigned col = j * self::Nin + k;" (type_qualifier) "const" (const) "const" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "col = j * self::Nin + k" (identifier) "col" (=) "=" (binary_expression) "j * self::Nin + k" (binary_expression) "j * self" (identifier) "j" (*) "*" (identifier) "self" (ERROR) "::Nin" (:) ":" (:) ":" (identifier) "Nin" (+) "+" (identifier) "k" (;) ";" (expression_statement) "J.insertBack(0, col) = s * in[other][j][k];" (assignment_expression) "J.insertBack(0, col) = s * in[other][j][k]" (call_expression) "J.insertBack(0, col)" (field_expression) "J.insertBack" (identifier) "J" (.) "." (field_identifier) "insertBack" (argument_list) "(0, col)" (() "(" (number_literal) "0" (,) "," (identifier) "col" ()) ")" (=) "=" (binary_expression) "s * in[other][j][k]" (identifier) "s" (*) "*" (subscript_expression) "in[other][j][k]" (subscript_expression) "in[other][j]" (subscript_expression) "in[other]" (identifier) "in" ([) "[" (identifier) "other" (]) "]" ([) "[" (identifier) "j" (]) "]" ([) "[" (identifier) "k" (]) "]" (;) ";" (}) "}" (}) "}" (expression_statement) "J.finalize();" (call_expression) "J.finalize()" (field_expression) "J.finalize" (identifier) "J" (.) "." (field_identifier) "finalize" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (}) "}" (}) "}" (#endif) "#endif"
1,050
23
{"language": "c", "success": true, "metadata": {"lines": 116, "avg_line_length": 29.74, "nodes": 631, "errors": 0, "source_hash": "def78f6ed3b8d5b52452f3d20e2bdc57584c2d29e18a00f113cd5e38eb26fa2c", "categorized_nodes": 459}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H\n#define COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H\n\n#include \"AssembledMultiMapping.h\"\n#include <Compliant/config.h>\n\n#include \"../utils/map.h\"\n\nnamespace sofa {\n\nnamespace component {\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \\[ f(x, y) = x^T y \\]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n\tSOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n\t\t\t SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n\t\n\ttypedef typename TIn::Real in_real;\n\ttypedef typename TOut::Real out_real;\n\t\n\ttypedef AssembledMultiMapping<TIn, TOut> base;\n\ttypedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, \"sign\", \"scalar factor\")) {\n \n }\n \nprotected:\n\n\tvoid apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n\t}\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\\\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n\t\tassert(this->getFrom()[0] != this->getFrom()[1]);\n\n\t\tfor(unsigned i = 0, n = in.size(); i < n; ++i) {\n\t\t\ttypename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n\t}\n\t\n\n\n};\n\n\n\n\n\n\n}\n}\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 630], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 153, "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": "COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 47}}, {"id": 3, "type": "preproc_def", "text": "#define COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_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": "COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 47}}, {"id": 6, "type": "preproc_include", "text": "#include \"AssembledMultiMapping.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": "\"AssembledMultiMapping.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 34}}, {"id": 9, "type": "preproc_include", "text": "#include <Compliant/config.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": "<Compliant/config.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 29}}, {"id": 12, "type": "preproc_include", "text": "#include \"../utils/map.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": "\"../utils/map.h\"", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 25}}, {"id": 15, "type": "function_definition", "text": "namespace sofa {\n\nnamespace component {\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \\[ f(x, y) = x^T y \\]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n\tSOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n\t\t\t SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n\t\n\ttypedef typename TIn::Real in_real;\n\ttypedef typename TOut::Real out_real;\n\t\n\ttypedef AssembledMultiMapping<TIn, TOut> base;\n\ttypedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, \"sign\", \"scalar factor\")) {\n \n }\n \nprotected:\n\n\tvoid apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n\t}\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\\\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n\t\tassert(this->getFrom()[0] != this->getFrom()[1]);\n\n\t\tfor(unsigned i = 0, n = in.size(); i < n; ++i) {\n\t\t\ttypename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n\t}\n\t\n\n\n};\n\n\n\n\n\n\n}\n}\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 151, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 9}}, {"id": 17, "type": "identifier", "text": "sofa", "parent": 15, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 14}}, {"id": 18, "type": "function_definition", "text": "namespace component {\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \\[ f(x, y) = x^T y \\]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n\tSOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n\t\t\t SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n\t\n\ttypedef typename TIn::Real in_real;\n\ttypedef typename TOut::Real out_real;\n\t\n\ttypedef AssembledMultiMapping<TIn, TOut> base;\n\ttypedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, \"sign\", \"scalar factor\")) {\n \n }\n \nprotected:\n\n\tvoid apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n\t}\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\\\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n\t\tassert(this->getFrom()[0] != this->getFrom()[1]);\n\n\t\tfor(unsigned i = 0, n = in.size(); i < n; ++i) {\n\t\t\ttypename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n\t}\n\t\n\n\n};\n\n\n\n\n\n\n}\n}", "parent": 15, "children": [19, 20], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 150, "column": 1}}, {"id": 19, "type": "type_identifier", "text": "namespace", "parent": 18, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 9}}, {"id": 20, "type": "identifier", "text": "component", "parent": 18, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 19}}, {"id": 21, "type": "function_definition", "text": "namespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \\[ f(x, y) = x^T y \\]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n\tSOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n\t\t\t SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n\t\n\ttypedef typename TIn::Real in_real;\n\ttypedef typename TOut::Real out_real;\n\t\n\ttypedef AssembledMultiMapping<TIn, TOut> base;\n\ttypedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, \"sign\", \"scalar factor\")) {\n \n }\n \nprotected:\n\n\tvoid apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n\t}\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\\\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n\t\tassert(this->getFrom()[0] != this->getFrom()[1]);\n\n\t\tfor(unsigned i = 0, n = in.size(); i < n; ++i) {\n\t\t\ttypename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n\t}\n\t\n\n\n};\n\n\n\n\n\n\n}", "parent": 18, "children": [22, 23], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 149, "column": 1}}, {"id": 22, "type": "type_identifier", "text": "namespace", "parent": 21, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 9}}, {"id": 23, "type": "identifier", "text": "mapping", "parent": 21, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 17}}, {"id": 24, "type": "comma_expression", "text": "template <class TIn, class TOut >\nclass", "parent": 21, "children": [25, 28, 30], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 5}}, {"id": 25, "type": "binary_expression", "text": "template <class", "parent": 24, "children": [26, 27], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 15}}, {"id": 26, "type": "identifier", "text": "template", "parent": 25, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 27, "type": "<", "text": "<", "parent": 25, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 10}}, {"id": 28, "type": "ERROR", "text": "TIn", "parent": 24, "children": [29], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 19}}, {"id": 29, "type": "identifier", "text": "TIn", "parent": 28, "children": [], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 19}}, {"id": 30, "type": "binary_expression", "text": "class TOut >\nclass", "parent": 24, "children": [31, 33], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 34, "column": 5}}, {"id": 31, "type": "ERROR", "text": "TOut", "parent": 30, "children": [32], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 31}}, {"id": 32, "type": "identifier", "text": "TOut", "parent": 31, "children": [], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 31}}, {"id": 33, "type": ">", "text": ">", "parent": 30, "children": [], "start_point": {"row": 33, "column": 32}, "end_point": {"row": 33, "column": 33}}, {"id": 34, "type": "ERROR", "text": "PairingMultiMapping : public AssembledMultiMapping<TIn, TOut>", "parent": 21, "children": [35, 41, 42], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 67}}, {"id": 35, "type": "binary_expression", "text": "PairingMultiMapping : public AssembledMultiMapping<TIn", "parent": 34, "children": [36, 37, 39, 40], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 60}}, {"id": 36, "type": "identifier", "text": "PairingMultiMapping", "parent": 35, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 25}}, {"id": 37, "type": "ERROR", "text": ": public AssembledMultiMapping", "parent": 35, "children": [38], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 56}}, {"id": 38, "type": "identifier", "text": "AssembledMultiMapping", "parent": 37, "children": [], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 56}}, {"id": 39, "type": "<", "text": "<", "parent": 35, "children": [], "start_point": {"row": 34, "column": 56}, "end_point": {"row": 34, "column": 57}}, {"id": 40, "type": "identifier", "text": "TIn", "parent": 35, "children": [], "start_point": {"row": 34, "column": 57}, "end_point": {"row": 34, "column": 60}}, {"id": 41, "type": "identifier", "text": "TOut", "parent": 34, "children": [], "start_point": {"row": 34, "column": 62}, "end_point": {"row": 34, "column": 66}}, {"id": 42, "type": ">", "text": ">", "parent": 34, "children": [], "start_point": {"row": 34, "column": 66}, "end_point": {"row": 34, "column": 67}}, {"id": 43, "type": "labeled_statement", "text": "public:\n\tSOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n\t\t\t SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));", "parent": 21, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 37, "column": 54}}, {"id": 44, "type": "call_expression", "text": "SOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n\t\t\t SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut))", "parent": 43, "children": [45, 46], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 37, "column": 53}}, {"id": 45, "type": "identifier", "text": "SOFA_CLASS", "parent": 44, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 11}}, {"id": 46, "type": "argument_list", "text": "(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n\t\t\t SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut))", "parent": 44, "children": [47, 53], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 37, "column": 53}}, {"id": 47, "type": "call_expression", "text": "SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut)", "parent": 46, "children": [48, 49], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 56}}, {"id": 48, "type": "identifier", "text": "SOFA_TEMPLATE2", "parent": 47, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 26}}, {"id": 49, "type": "argument_list", "text": "(PairingMultiMapping,TIn,TOut)", "parent": 47, "children": [50, 51, 52], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 56}}, {"id": 50, "type": "identifier", "text": "PairingMultiMapping", "parent": 49, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 46}}, {"id": 51, "type": "identifier", "text": "TIn", "parent": 49, "children": [], "start_point": {"row": 36, "column": 47}, "end_point": {"row": 36, "column": 50}}, {"id": 52, "type": "identifier", "text": "TOut", "parent": 49, "children": [], "start_point": {"row": 36, "column": 51}, "end_point": {"row": 36, "column": 55}}, {"id": 53, "type": "call_expression", "text": "SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut)", "parent": 46, "children": [54, 55], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 52}}, {"id": 54, "type": "identifier", "text": "SOFA_TEMPLATE2", "parent": 53, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 20}}, {"id": 55, "type": "argument_list", "text": "(AssembledMultiMapping,TIn,TOut)", "parent": 53, "children": [56, 57, 58], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 52}}, {"id": 56, "type": "identifier", "text": "AssembledMultiMapping", "parent": 55, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 42}}, {"id": 57, "type": "identifier", "text": "TIn", "parent": 55, "children": [], "start_point": {"row": 37, "column": 43}, "end_point": {"row": 37, "column": 46}}, {"id": 58, "type": "identifier", "text": "TOut", "parent": 55, "children": [], "start_point": {"row": 37, "column": 47}, "end_point": {"row": 37, "column": 51}}, {"id": 59, "type": "type_definition", "text": "typedef typename TIn::Real in_real;", "parent": 21, "children": [60, 61, 62, 65], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 36}}, {"id": 60, "type": "typedef", "text": "typedef", "parent": 59, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 8}}, {"id": 61, "type": "type_identifier", "text": "typename", "parent": 59, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 17}}, {"id": 62, "type": "ERROR", "text": "TIn::Real", "parent": 59, "children": [63, 64], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 27}}, {"id": 63, "type": "type_identifier", "text": "TIn", "parent": 62, "children": [], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 21}}, {"id": 64, "type": "type_identifier", "text": "Real", "parent": 62, "children": [], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 27}}, {"id": 65, "type": "type_identifier", "text": "in_real", "parent": 59, "children": [], "start_point": {"row": 39, "column": 28}, "end_point": {"row": 39, "column": 35}}, {"id": 66, "type": "type_definition", "text": "typedef typename TOut::Real out_real;", "parent": 21, "children": [67, 68, 69, 72], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 38}}, {"id": 67, "type": "typedef", "text": "typedef", "parent": 66, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 8}}, {"id": 68, "type": "type_identifier", "text": "typename", "parent": 66, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 17}}, {"id": 69, "type": "ERROR", "text": "TOut::Real", "parent": 66, "children": [70, 71], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 28}}, {"id": 70, "type": "type_identifier", "text": "TOut", "parent": 69, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 22}}, {"id": 71, "type": "identifier", "text": "Real", "parent": 69, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 28}}, {"id": 72, "type": "type_identifier", "text": "out_real", "parent": 66, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 37}}, {"id": 73, "type": "type_definition", "text": "typedef AssembledMultiMapping<TIn, TOut> base;", "parent": 21, "children": [74, 75, 76, 78, 79, 82], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 47}}, {"id": 74, "type": "typedef", "text": "typedef", "parent": 73, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 8}}, {"id": 75, "type": "type_identifier", "text": "AssembledMultiMapping", "parent": 73, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 30}}, {"id": 76, "type": "ERROR", "text": "<", "parent": 73, "children": [77], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 31}}, {"id": 77, "type": "<", "text": "<", "parent": 76, "children": [], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 31}}, {"id": 78, "type": "type_identifier", "text": "TIn", "parent": 73, "children": [], "start_point": {"row": 42, "column": 31}, "end_point": {"row": 42, "column": 34}}, {"id": 79, "type": "ERROR", "text": "TOut>", "parent": 73, "children": [80, 81], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 41}}, {"id": 80, "type": "type_identifier", "text": "TOut", "parent": 79, "children": [], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 40}}, {"id": 81, "type": ">", "text": ">", "parent": 79, "children": [], "start_point": {"row": 42, "column": 40}, "end_point": {"row": 42, "column": 41}}, {"id": 82, "type": "type_identifier", "text": "base", "parent": 73, "children": [], "start_point": {"row": 42, "column": 42}, "end_point": {"row": 42, "column": 46}}, {"id": 83, "type": "type_definition", "text": "typedef PairingMultiMapping self;", "parent": 21, "children": [84, 85, 86], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 34}}, {"id": 84, "type": "typedef", "text": "typedef", "parent": 83, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 8}}, {"id": 85, "type": "type_identifier", "text": "PairingMultiMapping", "parent": 83, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 28}}, {"id": 86, "type": "type_identifier", "text": "self", "parent": 83, "children": [], "start_point": {"row": 43, "column": 29}, "end_point": {"row": 43, "column": 33}}, {"id": 87, "type": "binary_expression", "text": "Data<SReal> sign", "parent": 21, "children": [88, 92, 93], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 20}}, {"id": 88, "type": "binary_expression", "text": "Data<SReal", "parent": 87, "children": [89, 90, 91], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 14}}, {"id": 89, "type": "identifier", "text": "Data", "parent": 88, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 8}}, {"id": 90, "type": "<", "text": "<", "parent": 88, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 9}}, {"id": 91, "type": "identifier", "text": "SReal", "parent": 88, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 14}}, {"id": 92, "type": ">", "text": ">", "parent": 87, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 15}}, {"id": 93, "type": "identifier", "text": "sign", "parent": 87, "children": [], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 20}}, {"id": 94, "type": "ERROR", "text": "PairingMultiMapping() :", "parent": 21, "children": [95], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 27}}, {"id": 95, "type": "call_expression", "text": "PairingMultiMapping()", "parent": 94, "children": [96, 97], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 25}}, {"id": 96, "type": "identifier", "text": "PairingMultiMapping", "parent": 95, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 23}}, {"id": 97, "type": "argument_list", "text": "()", "parent": 95, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 25}}, {"id": 98, "type": "call_expression", "text": "sign(initData(&sign, (SReal)1.0, \"sign\", \"scalar factor\"))", "parent": 21, "children": [99, 100], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 66}}, {"id": 99, "type": "identifier", "text": "sign", "parent": 98, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 12}}, {"id": 100, "type": "argument_list", "text": "(initData(&sign, (SReal)1.0, \"sign\", \"scalar factor\"))", "parent": 98, "children": [101], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 66}}, {"id": 101, "type": "call_expression", "text": "initData(&sign, (SReal)1.0, \"sign\", \"scalar factor\")", "parent": 100, "children": [102, 103], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 65}}, {"id": 102, "type": "identifier", "text": "initData", "parent": 101, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 21}}, {"id": 103, "type": "argument_list", "text": "(&sign, (SReal)1.0, \"sign\", \"scalar factor\")", "parent": 101, "children": [104, 106, 110, 111], "start_point": {"row": 49, "column": 21}, "end_point": {"row": 49, "column": 65}}, {"id": 104, "type": "pointer_expression", "text": "&sign", "parent": 103, "children": [105], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 27}}, {"id": 105, "type": "identifier", "text": "sign", "parent": 104, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 27}}, {"id": 106, "type": "cast_expression", "text": "(SReal)1.0", "parent": 103, "children": [107, 109], "start_point": {"row": 49, "column": 29}, "end_point": {"row": 49, "column": 39}}, {"id": 107, "type": "type_descriptor", "text": "SReal", "parent": 106, "children": [108], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 35}}, {"id": 108, "type": "type_identifier", "text": "SReal", "parent": 107, "children": [], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 35}}, {"id": 109, "type": "number_literal", "text": "1.0", "parent": 106, "children": [], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 39}}, {"id": 110, "type": "string_literal", "text": "\"sign\"", "parent": 103, "children": [], "start_point": {"row": 49, "column": 41}, "end_point": {"row": 49, "column": 47}}, {"id": 111, "type": "string_literal", "text": "\"scalar factor\"", "parent": 103, "children": [], "start_point": {"row": 49, "column": 49}, "end_point": {"row": 49, "column": 64}}, {"id": 112, "type": "labeled_statement", "text": "protected:\n\n\tvoid apply(typename self::out_pos_type& out,\n const", "parent": 21, "children": [113], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 56, "column": 20}}, {"id": 113, "type": "ERROR", "text": ":\n\n\tvoid apply(typename self:", "parent": 112, "children": [114, 115, 116], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 55, "column": 26}}, {"id": 114, "type": "primitive_type", "text": "void", "parent": 113, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 5}}, {"id": 115, "type": "identifier", "text": "apply", "parent": 113, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 11}}, {"id": 116, "type": "parameter_declaration", "text": "typename self", "parent": 113, "children": [117, 118], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 25}}, {"id": 117, "type": "type_identifier", "text": "typename", "parent": 116, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 20}}, {"id": 118, "type": "identifier", "text": "self", "parent": 116, "children": [], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 25}}, {"id": 119, "type": "comma_expression", "text": "out_pos_type& out,\n const", "parent": 112, "children": [120], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 56, "column": 20}}, {"id": 120, "type": "binary_expression", "text": "out_pos_type& out", "parent": 119, "children": [121, 122], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 44}}, {"id": 121, "type": "identifier", "text": "out_pos_type", "parent": 120, "children": [], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 39}}, {"id": 122, "type": "identifier", "text": "out", "parent": 120, "children": [], "start_point": {"row": 55, "column": 41}, "end_point": {"row": 55, "column": 44}}, {"id": 123, "type": "labeled_statement", "text": "helper::vector< typename", "parent": 21, "children": [124], "start_point": {"row": 56, "column": 21}, "end_point": {"row": 56, "column": 45}}, {"id": 124, "type": "statement_identifier", "text": "helper", "parent": 123, "children": [], "start_point": {"row": 56, "column": 21}, "end_point": {"row": 56, "column": 27}}, {"id": 125, "type": "binary_expression", "text": "vector< typename", "parent": 123, "children": [126, 127, 128], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 45}}, {"id": 126, "type": "identifier", "text": "vector", "parent": 125, "children": [], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 35}}, {"id": 127, "type": "<", "text": "<", "parent": 125, "children": [], "start_point": {"row": 56, "column": 35}, "end_point": {"row": 56, "column": 36}}, {"id": 128, "type": "identifier", "text": "typename", "parent": 125, "children": [], "start_point": {"row": 56, "column": 37}, "end_point": {"row": 56, "column": 45}}, {"id": 129, "type": "labeled_statement", "text": "self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n\t}", "parent": 21, "children": [130, 131], "start_point": {"row": 56, "column": 46}, "end_point": {"row": 74, "column": 2}}, {"id": 130, "type": "statement_identifier", "text": "self", "parent": 129, "children": [], "start_point": {"row": 56, "column": 46}, "end_point": {"row": 56, "column": 50}}, {"id": 131, "type": "ERROR", "text": ":in_pos_type >& in )", "parent": 129, "children": [132], "start_point": {"row": 56, "column": 51}, "end_point": {"row": 56, "column": 71}}, {"id": 132, "type": "binary_expression", "text": "in_pos_type >& in", "parent": 131, "children": [133, 134, 135], "start_point": {"row": 56, "column": 52}, "end_point": {"row": 56, "column": 69}}, {"id": 133, "type": "identifier", "text": "in_pos_type", "parent": 132, "children": [], "start_point": {"row": 56, "column": 52}, "end_point": {"row": 56, "column": 63}}, {"id": 134, "type": ">", "text": ">", "parent": 132, "children": [], "start_point": {"row": 56, "column": 64}, "end_point": {"row": 56, "column": 65}}, {"id": 135, "type": "pointer_expression", "text": "& in", "parent": 132, "children": [136], "start_point": {"row": 56, "column": 65}, "end_point": {"row": 56, "column": 69}}, {"id": 136, "type": "identifier", "text": "in", "parent": 135, "children": [], "start_point": {"row": 56, "column": 67}, "end_point": {"row": 56, "column": 69}}, {"id": 137, "type": "call_expression", "text": "this->to()->resize( 1 )", "parent": 129, "children": [138, 145], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 31}}, {"id": 138, "type": "field_expression", "text": "this->to()->resize", "parent": 137, "children": [139, 144], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 26}}, {"id": 139, "type": "call_expression", "text": "this->to()", "parent": 138, "children": [140, 143], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 18}}, {"id": 140, "type": "field_expression", "text": "this->to", "parent": 139, "children": [141, 142], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 16}}, {"id": 141, "type": "identifier", "text": "this", "parent": 140, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 12}}, {"id": 142, "type": "field_identifier", "text": "to", "parent": 140, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 16}}, {"id": 143, "type": "argument_list", "text": "()", "parent": 139, "children": [], "start_point": {"row": 59, "column": 16}, "end_point": {"row": 59, "column": 18}}, {"id": 144, "type": "field_identifier", "text": "resize", "parent": 138, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 26}}, {"id": 145, "type": "argument_list", "text": "( 1 )", "parent": 137, "children": [146], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 31}}, {"id": 146, "type": "number_literal", "text": "1", "parent": 145, "children": [], "start_point": {"row": 59, "column": 28}, "end_point": {"row": 59, "column": 29}}, {"id": 147, "type": "call_expression", "text": "assert( in.size() == 2 )", "parent": 129, "children": [148, 149], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 32}}, {"id": 148, "type": "identifier", "text": "assert", "parent": 147, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 14}}, {"id": 149, "type": "argument_list", "text": "( in.size() == 2 )", "parent": 147, "children": [150], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 32}}, {"id": 150, "type": "binary_expression", "text": "in.size() == 2", "parent": 149, "children": [151, 156, 157], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 30}}, {"id": 151, "type": "call_expression", "text": "in.size()", "parent": 150, "children": [152, 155], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 25}}, {"id": 152, "type": "field_expression", "text": "in.size", "parent": 151, "children": [153, 154], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 23}}, {"id": 153, "type": "identifier", "text": "in", "parent": 152, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 18}}, {"id": 154, "type": "field_identifier", "text": "size", "parent": 152, "children": [], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 23}}, {"id": 155, "type": "argument_list", "text": "()", "parent": 151, "children": [], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 25}}, {"id": 156, "type": "==", "text": "==", "parent": 150, "children": [], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 28}}, {"id": 157, "type": "number_literal", "text": "2", "parent": 150, "children": [], "start_point": {"row": 61, "column": 29}, "end_point": {"row": 61, "column": 30}}, {"id": 158, "type": "call_expression", "text": "assert( in[0].size() == in[1].size() )", "parent": 129, "children": [159, 160], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 46}}, {"id": 159, "type": "identifier", "text": "assert", "parent": 158, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 14}}, {"id": 160, "type": "argument_list", "text": "( in[0].size() == in[1].size() )", "parent": 158, "children": [161], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 46}}, {"id": 161, "type": "binary_expression", "text": "in[0].size() == in[1].size()", "parent": 160, "children": [162, 169, 170], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 44}}, {"id": 162, "type": "call_expression", "text": "in[0].size()", "parent": 161, "children": [163, 168], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 28}}, {"id": 163, "type": "field_expression", "text": "in[0].size", "parent": 162, "children": [164, 167], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 26}}, {"id": 164, "type": "subscript_expression", "text": "in[0]", "parent": 163, "children": [165, 166], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 21}}, {"id": 165, "type": "identifier", "text": "in", "parent": 164, "children": [], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 18}}, {"id": 166, "type": "number_literal", "text": "0", "parent": 164, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 20}}, {"id": 167, "type": "field_identifier", "text": "size", "parent": 163, "children": [], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 26}}, {"id": 168, "type": "argument_list", "text": "()", "parent": 162, "children": [], "start_point": {"row": 62, "column": 26}, "end_point": {"row": 62, "column": 28}}, {"id": 169, "type": "==", "text": "==", "parent": 161, "children": [], "start_point": {"row": 62, "column": 29}, "end_point": {"row": 62, "column": 31}}, {"id": 170, "type": "call_expression", "text": "in[1].size()", "parent": 161, "children": [171, 176], "start_point": {"row": 62, "column": 32}, "end_point": {"row": 62, "column": 44}}, {"id": 171, "type": "field_expression", "text": "in[1].size", "parent": 170, "children": [172, 175], "start_point": {"row": 62, "column": 32}, "end_point": {"row": 62, "column": 42}}, {"id": 172, "type": "subscript_expression", "text": "in[1]", "parent": 171, "children": [173, 174], "start_point": {"row": 62, "column": 32}, "end_point": {"row": 62, "column": 37}}, {"id": 173, "type": "identifier", "text": "in", "parent": 172, "children": [], "start_point": {"row": 62, "column": 32}, "end_point": {"row": 62, "column": 34}}, {"id": 174, "type": "number_literal", "text": "1", "parent": 172, "children": [], "start_point": {"row": 62, "column": 35}, "end_point": {"row": 62, "column": 36}}, {"id": 175, "type": "field_identifier", "text": "size", "parent": 171, "children": [], "start_point": {"row": 62, "column": 38}, "end_point": {"row": 62, "column": 42}}, {"id": 176, "type": "argument_list", "text": "()", "parent": 170, "children": [], "start_point": {"row": 62, "column": 42}, "end_point": {"row": 62, "column": 44}}, {"id": 177, "type": "binary_expression", "text": "out_real& res = out[0][0]", "parent": 129, "children": [178, 179], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 33}}, {"id": 178, "type": "identifier", "text": "out_real", "parent": 177, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 16}}, {"id": 179, "type": "assignment_expression", "text": "res = out[0][0]", "parent": 177, "children": [180, 181, 182], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 33}}, {"id": 180, "type": "identifier", "text": "res", "parent": 179, "children": [], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 21}}, {"id": 181, "type": "=", "text": "=", "parent": 179, "children": [], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 23}}, {"id": 182, "type": "subscript_expression", "text": "out[0][0]", "parent": 179, "children": [183, 186], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 33}}, {"id": 183, "type": "subscript_expression", "text": "out[0]", "parent": 182, "children": [184, 185], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 30}}, {"id": 184, "type": "identifier", "text": "out", "parent": 183, "children": [], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 27}}, {"id": 185, "type": "number_literal", "text": "0", "parent": 183, "children": [], "start_point": {"row": 64, "column": 28}, "end_point": {"row": 64, "column": 29}}, {"id": 186, "type": "number_literal", "text": "0", "parent": 182, "children": [], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 32}}, {"id": 187, "type": "assignment_expression", "text": "res = 0", "parent": 129, "children": [188, 189, 190], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 15}}, {"id": 188, "type": "identifier", "text": "res", "parent": 187, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 11}}, {"id": 189, "type": "=", "text": "=", "parent": 187, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 13}}, {"id": 190, "type": "number_literal", "text": "0", "parent": 187, "children": [], "start_point": {"row": 66, "column": 14}, "end_point": {"row": 66, "column": 15}}, {"id": 191, "type": "for_statement", "text": "for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }", "parent": 129, "children": [192, 209, 213], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 70, "column": 9}}, {"id": 192, "type": "declaration", "text": "unsigned i = 0, n = in[0].size();", "parent": 191, "children": [193, 195, 199], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 45}}, {"id": 193, "type": "sized_type_specifier", "text": "unsigned", "parent": 192, "children": [194], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 20}}, {"id": 194, "type": "unsigned", "text": "unsigned", "parent": 193, "children": [], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 20}}, {"id": 195, "type": "init_declarator", "text": "i = 0", "parent": 192, "children": [196, 197, 198], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 26}}, {"id": 196, "type": "identifier", "text": "i", "parent": 195, "children": [], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 22}}, {"id": 197, "type": "=", "text": "=", "parent": 195, "children": [], "start_point": {"row": 68, "column": 23}, "end_point": {"row": 68, "column": 24}}, {"id": 198, "type": "number_literal", "text": "0", "parent": 195, "children": [], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 26}}, {"id": 199, "type": "init_declarator", "text": "n = in[0].size()", "parent": 192, "children": [200, 201, 202], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 44}}, {"id": 200, "type": "identifier", "text": "n", "parent": 199, "children": [], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 29}}, {"id": 201, "type": "=", "text": "=", "parent": 199, "children": [], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 31}}, {"id": 202, "type": "call_expression", "text": "in[0].size()", "parent": 199, "children": [203, 208], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 44}}, {"id": 203, "type": "field_expression", "text": "in[0].size", "parent": 202, "children": [204, 207], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 42}}, {"id": 204, "type": "subscript_expression", "text": "in[0]", "parent": 203, "children": [205, 206], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 37}}, {"id": 205, "type": "identifier", "text": "in", "parent": 204, "children": [], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 34}}, {"id": 206, "type": "number_literal", "text": "0", "parent": 204, "children": [], "start_point": {"row": 68, "column": 35}, "end_point": {"row": 68, "column": 36}}, {"id": 207, "type": "field_identifier", "text": "size", "parent": 203, "children": [], "start_point": {"row": 68, "column": 38}, "end_point": {"row": 68, "column": 42}}, {"id": 208, "type": "argument_list", "text": "()", "parent": 202, "children": [], "start_point": {"row": 68, "column": 42}, "end_point": {"row": 68, "column": 44}}, {"id": 209, "type": "binary_expression", "text": "i < n", "parent": 191, "children": [210, 211, 212], "start_point": {"row": 68, "column": 46}, "end_point": {"row": 68, "column": 51}}, {"id": 210, "type": "identifier", "text": "i", "parent": 209, "children": [], "start_point": {"row": 68, "column": 46}, "end_point": {"row": 68, "column": 47}}, {"id": 211, "type": "<", "text": "<", "parent": 209, "children": [], "start_point": {"row": 68, "column": 48}, "end_point": {"row": 68, "column": 49}}, {"id": 212, "type": "identifier", "text": "n", "parent": 209, "children": [], "start_point": {"row": 68, "column": 50}, "end_point": {"row": 68, "column": 51}}, {"id": 213, "type": "update_expression", "text": "++i", "parent": 191, "children": [214, 215], "start_point": {"row": 68, "column": 53}, "end_point": {"row": 68, "column": 56}}, {"id": 214, "type": "++", "text": "++", "parent": 213, "children": [], "start_point": {"row": 68, "column": 53}, "end_point": {"row": 68, "column": 55}}, {"id": 215, "type": "identifier", "text": "i", "parent": 213, "children": [], "start_point": {"row": 68, "column": 55}, "end_point": {"row": 68, "column": 56}}, {"id": 216, "type": "assignment_expression", "text": "res += in[0][i] * in[1][i]", "parent": 191, "children": [217, 218, 219], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 38}}, {"id": 217, "type": "identifier", "text": "res", "parent": 216, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 15}}, {"id": 218, "type": "+=", "text": "+=", "parent": 216, "children": [], "start_point": {"row": 69, "column": 16}, "end_point": {"row": 69, "column": 18}}, {"id": 219, "type": "binary_expression", "text": "in[0][i] * in[1][i]", "parent": 216, "children": [220, 225, 226], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 38}}, {"id": 220, "type": "subscript_expression", "text": "in[0][i]", "parent": 219, "children": [221, 224], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 27}}, {"id": 221, "type": "subscript_expression", "text": "in[0]", "parent": 220, "children": [222, 223], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 24}}, {"id": 222, "type": "identifier", "text": "in", "parent": 221, "children": [], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 21}}, {"id": 223, "type": "number_literal", "text": "0", "parent": 221, "children": [], "start_point": {"row": 69, "column": 22}, "end_point": {"row": 69, "column": 23}}, {"id": 224, "type": "identifier", "text": "i", "parent": 220, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 26}}, {"id": 225, "type": "*", "text": "*", "parent": 219, "children": [], "start_point": {"row": 69, "column": 28}, "end_point": {"row": 69, "column": 29}}, {"id": 226, "type": "subscript_expression", "text": "in[1][i]", "parent": 219, "children": [227, 230], "start_point": {"row": 69, "column": 30}, "end_point": {"row": 69, "column": 38}}, {"id": 227, "type": "subscript_expression", "text": "in[1]", "parent": 226, "children": [228, 229], "start_point": {"row": 69, "column": 30}, "end_point": {"row": 69, "column": 35}}, {"id": 228, "type": "identifier", "text": "in", "parent": 227, "children": [], "start_point": {"row": 69, "column": 30}, "end_point": {"row": 69, "column": 32}}, {"id": 229, "type": "number_literal", "text": "1", "parent": 227, "children": [], "start_point": {"row": 69, "column": 33}, "end_point": {"row": 69, "column": 34}}, {"id": 230, "type": "identifier", "text": "i", "parent": 226, "children": [], "start_point": {"row": 69, "column": 36}, "end_point": {"row": 69, "column": 37}}, {"id": 231, "type": "assignment_expression", "text": "res *= sign.getValue()", "parent": 129, "children": [232, 233, 234], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 30}}, {"id": 232, "type": "identifier", "text": "res", "parent": 231, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 11}}, {"id": 233, "type": "*=", "text": "*=", "parent": 231, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 14}}, {"id": 234, "type": "call_expression", "text": "sign.getValue()", "parent": 231, "children": [235, 238], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 30}}, {"id": 235, "type": "field_expression", "text": "sign.getValue", "parent": 234, "children": [236, 237], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 28}}, {"id": 236, "type": "identifier", "text": "sign", "parent": 235, "children": [], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 19}}, {"id": 237, "type": "field_identifier", "text": "getValue", "parent": 235, "children": [], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 28}}, {"id": 238, "type": "argument_list", "text": "()", "parent": 234, "children": [], "start_point": {"row": 72, "column": 28}, "end_point": {"row": 72, "column": 30}}, {"id": 239, "type": "function_definition", "text": "void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\\\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }", "parent": 21, "children": [240, 241], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 111, "column": 5}}, {"id": 240, "type": "primitive_type", "text": "void", "parent": 239, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 8}}, {"id": 241, "type": "function_declarator", "text": "assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force)", "parent": 239, "children": [242, 243], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 79, "column": 81}}, {"id": 242, "type": "identifier", "text": "assemble_geometric", "parent": 241, "children": [], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 78, "column": 27}}, {"id": 243, "type": "parameter_list", "text": "(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force)", "parent": 241, "children": [244, 252, 254], "start_point": {"row": 78, "column": 27}, "end_point": {"row": 79, "column": 81}}, {"id": 244, "type": "parameter_declaration", "text": "const helper::vector<typename self::const_in_coord_type", "parent": 243, "children": [245, 246, 251], "start_point": {"row": 78, "column": 28}, "end_point": {"row": 78, "column": 83}}, {"id": 245, "type": "type_identifier", "text": "helper", "parent": 244, "children": [], "start_point": {"row": 78, "column": 34}, "end_point": {"row": 78, "column": 40}}, {"id": 246, "type": "ERROR", "text": "::vector<typename self::", "parent": 244, "children": [247, 248, 249, 250], "start_point": {"row": 78, "column": 40}, "end_point": {"row": 78, "column": 64}}, {"id": 247, "type": "identifier", "text": "vector", "parent": 246, "children": [], "start_point": {"row": 78, "column": 42}, "end_point": {"row": 78, "column": 48}}, {"id": 248, "type": "<", "text": "<", "parent": 246, "children": [], "start_point": {"row": 78, "column": 48}, "end_point": {"row": 78, "column": 49}}, {"id": 249, "type": "identifier", "text": "typename", "parent": 246, "children": [], "start_point": {"row": 78, "column": 49}, "end_point": {"row": 78, "column": 57}}, {"id": 250, "type": "identifier", "text": "self", "parent": 246, "children": [], "start_point": {"row": 78, "column": 58}, "end_point": {"row": 78, "column": 62}}, {"id": 251, "type": "identifier", "text": "const_in_coord_type", "parent": 244, "children": [], "start_point": {"row": 78, "column": 64}, "end_point": {"row": 78, "column": 83}}, {"id": 252, "type": "ERROR", "text": ">&", "parent": 243, "children": [253], "start_point": {"row": 78, "column": 83}, "end_point": {"row": 78, "column": 85}}, {"id": 253, "type": ">", "text": ">", "parent": 252, "children": [], "start_point": {"row": 78, "column": 83}, "end_point": {"row": 78, "column": 84}}, {"id": 254, "type": "parameter_declaration", "text": "const typename self::const_out_deriv_type& out_force", "parent": 243, "children": [255, 256, 259], "start_point": {"row": 79, "column": 28}, "end_point": {"row": 79, "column": 80}}, {"id": 255, "type": "type_identifier", "text": "typename", "parent": 254, "children": [], "start_point": {"row": 79, "column": 34}, "end_point": {"row": 79, "column": 42}}, {"id": 256, "type": "ERROR", "text": "self::const_out_deriv_type&", "parent": 254, "children": [257, 258], "start_point": {"row": 79, "column": 43}, "end_point": {"row": 79, "column": 70}}, {"id": 257, "type": "identifier", "text": "self", "parent": 256, "children": [], "start_point": {"row": 79, "column": 43}, "end_point": {"row": 79, "column": 47}}, {"id": 258, "type": "identifier", "text": "const_out_deriv_type", "parent": 256, "children": [], "start_point": {"row": 79, "column": 49}, "end_point": {"row": 79, "column": 69}}, {"id": 259, "type": "identifier", "text": "out_force", "parent": 254, "children": [], "start_point": {"row": 79, "column": 71}, "end_point": {"row": 79, "column": 80}}, {"id": 260, "type": "type_definition", "text": "typedef typename self::geometric_type::CompressedMatrix matrix_type;", "parent": 239, "children": [261, 262, 263, 267], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 76}}, {"id": 261, "type": "typedef", "text": "typedef", "parent": 260, "children": [], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 15}}, {"id": 262, "type": "type_identifier", "text": "typename", "parent": 260, "children": [], "start_point": {"row": 80, "column": 16}, "end_point": {"row": 80, "column": 24}}, {"id": 263, "type": "ERROR", "text": "self::geometric_type::CompressedMatrix", "parent": 260, "children": [264, 265, 266], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 63}}, {"id": 264, "type": "type_identifier", "text": "self", "parent": 263, "children": [], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 29}}, {"id": 265, "type": "type_identifier", "text": "geometric_type", "parent": 263, "children": [], "start_point": {"row": 80, "column": 31}, "end_point": {"row": 80, "column": 45}}, {"id": 266, "type": "type_identifier", "text": "CompressedMatrix", "parent": 263, "children": [], "start_point": {"row": 80, "column": 47}, "end_point": {"row": 80, "column": 63}}, {"id": 267, "type": "type_identifier", "text": "matrix_type", "parent": 260, "children": [], "start_point": {"row": 80, "column": 64}, "end_point": {"row": 80, "column": 75}}, {"id": 268, "type": "binary_expression", "text": "matrix_type& dJ = this->geometric.compressedMatrix", "parent": 239, "children": [269, 270], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 58}}, {"id": 269, "type": "identifier", "text": "matrix_type", "parent": 268, "children": [], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 19}}, {"id": 270, "type": "assignment_expression", "text": "dJ = this->geometric.compressedMatrix", "parent": 268, "children": [271, 272, 273], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 58}}, {"id": 271, "type": "identifier", "text": "dJ", "parent": 270, "children": [], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 23}}, {"id": 272, "type": "=", "text": "=", "parent": 270, "children": [], "start_point": {"row": 81, "column": 24}, "end_point": {"row": 81, "column": 25}}, {"id": 273, "type": "field_expression", "text": "this->geometric.compressedMatrix", "parent": 270, "children": [274, 277], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 58}}, {"id": 274, "type": "field_expression", "text": "this->geometric", "parent": 273, "children": [275, 276], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 41}}, {"id": 275, "type": "identifier", "text": "this", "parent": 274, "children": [], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 30}}, {"id": 276, "type": "field_identifier", "text": "geometric", "parent": 274, "children": [], "start_point": {"row": 81, "column": 32}, "end_point": {"row": 81, "column": 41}}, {"id": 277, "type": "field_identifier", "text": "compressedMatrix", "parent": 273, "children": [], "start_point": {"row": 81, "column": 42}, "end_point": {"row": 81, "column": 58}}, {"id": 278, "type": "declaration", "text": "const out_real& mu = out_force[0][0];", "parent": 239, "children": [279, 280], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 45}}, {"id": 279, "type": "type_identifier", "text": "out_real", "parent": 278, "children": [], "start_point": {"row": 84, "column": 14}, "end_point": {"row": 84, "column": 22}}, {"id": 280, "type": "init_declarator", "text": "mu = out_force[0][0]", "parent": 278, "children": [281, 282, 283], "start_point": {"row": 84, "column": 24}, "end_point": {"row": 84, "column": 44}}, {"id": 281, "type": "identifier", "text": "mu", "parent": 280, "children": [], "start_point": {"row": 84, "column": 24}, "end_point": {"row": 84, "column": 26}}, {"id": 282, "type": "=", "text": "=", "parent": 280, "children": [], "start_point": {"row": 84, "column": 27}, "end_point": {"row": 84, "column": 28}}, {"id": 283, "type": "subscript_expression", "text": "out_force[0][0]", "parent": 280, "children": [284, 287], "start_point": {"row": 84, "column": 29}, "end_point": {"row": 84, "column": 44}}, {"id": 284, "type": "subscript_expression", "text": "out_force[0]", "parent": 283, "children": [285, 286], "start_point": {"row": 84, "column": 29}, "end_point": {"row": 84, "column": 41}}, {"id": 285, "type": "identifier", "text": "out_force", "parent": 284, "children": [], "start_point": {"row": 84, "column": 29}, "end_point": {"row": 84, "column": 38}}, {"id": 286, "type": "number_literal", "text": "0", "parent": 284, "children": [], "start_point": {"row": 84, "column": 39}, "end_point": {"row": 84, "column": 40}}, {"id": 287, "type": "number_literal", "text": "0", "parent": 283, "children": [], "start_point": {"row": 84, "column": 42}, "end_point": {"row": 84, "column": 43}}, {"id": 288, "type": "declaration", "text": "const SReal value = sign.getValue() * mu;", "parent": 239, "children": [289, 290], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 49}}, {"id": 289, "type": "type_identifier", "text": "SReal", "parent": 288, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 19}}, {"id": 290, "type": "init_declarator", "text": "value = sign.getValue() * mu", "parent": 288, "children": [291, 292, 293], "start_point": {"row": 86, "column": 20}, "end_point": {"row": 86, "column": 48}}, {"id": 291, "type": "identifier", "text": "value", "parent": 290, "children": [], "start_point": {"row": 86, "column": 20}, "end_point": {"row": 86, "column": 25}}, {"id": 292, "type": "=", "text": "=", "parent": 290, "children": [], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 27}}, {"id": 293, "type": "binary_expression", "text": "sign.getValue() * mu", "parent": 290, "children": [294, 299, 300], "start_point": {"row": 86, "column": 28}, "end_point": {"row": 86, "column": 48}}, {"id": 294, "type": "call_expression", "text": "sign.getValue()", "parent": 293, "children": [295, 298], "start_point": {"row": 86, "column": 28}, "end_point": {"row": 86, "column": 43}}, {"id": 295, "type": "field_expression", "text": "sign.getValue", "parent": 294, "children": [296, 297], "start_point": {"row": 86, "column": 28}, "end_point": {"row": 86, "column": 41}}, {"id": 296, "type": "identifier", "text": "sign", "parent": 295, "children": [], "start_point": {"row": 86, "column": 28}, "end_point": {"row": 86, "column": 32}}, {"id": 297, "type": "field_identifier", "text": "getValue", "parent": 295, "children": [], "start_point": {"row": 86, "column": 33}, "end_point": {"row": 86, "column": 41}}, {"id": 298, "type": "argument_list", "text": "()", "parent": 294, "children": [], "start_point": {"row": 86, "column": 41}, "end_point": {"row": 86, "column": 43}}, {"id": 299, "type": "*", "text": "*", "parent": 293, "children": [], "start_point": {"row": 86, "column": 44}, "end_point": {"row": 86, "column": 45}}, {"id": 300, "type": "identifier", "text": "mu", "parent": 293, "children": [], "start_point": {"row": 86, "column": 46}, "end_point": {"row": 86, "column": 48}}, {"id": 301, "type": "declaration", "text": "const unsigned size_x = this->from(0)->getMatrixSize();", "parent": 239, "children": [302, 304], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 63}}, {"id": 302, "type": "sized_type_specifier", "text": "unsigned", "parent": 301, "children": [303], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 22}}, {"id": 303, "type": "unsigned", "text": "unsigned", "parent": 302, "children": [], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 22}}, {"id": 304, "type": "init_declarator", "text": "size_x = this->from(0)->getMatrixSize()", "parent": 301, "children": [305, 306, 307], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 62}}, {"id": 305, "type": "identifier", "text": "size_x", "parent": 304, "children": [], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 29}}, {"id": 306, "type": "=", "text": "=", "parent": 304, "children": [], "start_point": {"row": 89, "column": 30}, "end_point": {"row": 89, "column": 31}}, {"id": 307, "type": "call_expression", "text": "this->from(0)->getMatrixSize()", "parent": 304, "children": [308, 315], "start_point": {"row": 89, "column": 32}, "end_point": {"row": 89, "column": 62}}, {"id": 308, "type": "field_expression", "text": "this->from(0)->getMatrixSize", "parent": 307, "children": [309, 314], "start_point": {"row": 89, "column": 32}, "end_point": {"row": 89, "column": 60}}, {"id": 309, "type": "call_expression", "text": "this->from(0)", "parent": 308, "children": [310, 312], "start_point": {"row": 89, "column": 32}, "end_point": {"row": 89, "column": 45}}, {"id": 310, "type": "field_expression", "text": "this->from", "parent": 309, "children": [311], "start_point": {"row": 89, "column": 32}, "end_point": {"row": 89, "column": 42}}, {"id": 311, "type": "identifier", "text": "this", "parent": 310, "children": [], "start_point": {"row": 89, "column": 32}, "end_point": {"row": 89, "column": 36}}, {"id": 312, "type": "argument_list", "text": "(0)", "parent": 309, "children": [313], "start_point": {"row": 89, "column": 42}, "end_point": {"row": 89, "column": 45}}, {"id": 313, "type": "number_literal", "text": "0", "parent": 312, "children": [], "start_point": {"row": 89, "column": 43}, "end_point": {"row": 89, "column": 44}}, {"id": 314, "type": "field_identifier", "text": "getMatrixSize", "parent": 308, "children": [], "start_point": {"row": 89, "column": 47}, "end_point": {"row": 89, "column": 60}}, {"id": 315, "type": "argument_list", "text": "()", "parent": 307, "children": [], "start_point": {"row": 89, "column": 60}, "end_point": {"row": 89, "column": 62}}, {"id": 316, "type": "declaration", "text": "const unsigned size_y = this->from(1)->getMatrixSize();", "parent": 239, "children": [317, 319], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 63}}, {"id": 317, "type": "sized_type_specifier", "text": "unsigned", "parent": 316, "children": [318], "start_point": {"row": 90, "column": 14}, "end_point": {"row": 90, "column": 22}}, {"id": 318, "type": "unsigned", "text": "unsigned", "parent": 317, "children": [], "start_point": {"row": 90, "column": 14}, "end_point": {"row": 90, "column": 22}}, {"id": 319, "type": "init_declarator", "text": "size_y = this->from(1)->getMatrixSize()", "parent": 316, "children": [320, 321, 322], "start_point": {"row": 90, "column": 23}, "end_point": {"row": 90, "column": 62}}, {"id": 320, "type": "identifier", "text": "size_y", "parent": 319, "children": [], "start_point": {"row": 90, "column": 23}, "end_point": {"row": 90, "column": 29}}, {"id": 321, "type": "=", "text": "=", "parent": 319, "children": [], "start_point": {"row": 90, "column": 30}, "end_point": {"row": 90, "column": 31}}, {"id": 322, "type": "call_expression", "text": "this->from(1)->getMatrixSize()", "parent": 319, "children": [323, 330], "start_point": {"row": 90, "column": 32}, "end_point": {"row": 90, "column": 62}}, {"id": 323, "type": "field_expression", "text": "this->from(1)->getMatrixSize", "parent": 322, "children": [324, 329], "start_point": {"row": 90, "column": 32}, "end_point": {"row": 90, "column": 60}}, {"id": 324, "type": "call_expression", "text": "this->from(1)", "parent": 323, "children": [325, 327], "start_point": {"row": 90, "column": 32}, "end_point": {"row": 90, "column": 45}}, {"id": 325, "type": "field_expression", "text": "this->from", "parent": 324, "children": [326], "start_point": {"row": 90, "column": 32}, "end_point": {"row": 90, "column": 42}}, {"id": 326, "type": "identifier", "text": "this", "parent": 325, "children": [], "start_point": {"row": 90, "column": 32}, "end_point": {"row": 90, "column": 36}}, {"id": 327, "type": "argument_list", "text": "(1)", "parent": 324, "children": [328], "start_point": {"row": 90, "column": 42}, "end_point": {"row": 90, "column": 45}}, {"id": 328, "type": "number_literal", "text": "1", "parent": 327, "children": [], "start_point": {"row": 90, "column": 43}, "end_point": {"row": 90, "column": 44}}, {"id": 329, "type": "field_identifier", "text": "getMatrixSize", "parent": 323, "children": [], "start_point": {"row": 90, "column": 47}, "end_point": {"row": 90, "column": 60}}, {"id": 330, "type": "argument_list", "text": "()", "parent": 322, "children": [], "start_point": {"row": 90, "column": 60}, "end_point": {"row": 90, "column": 62}}, {"id": 331, "type": "call_expression", "text": "assert( size_x == size_y )", "parent": 239, "children": [332, 333], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 34}}, {"id": 332, "type": "identifier", "text": "assert", "parent": 331, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 14}}, {"id": 333, "type": "argument_list", "text": "( size_x == size_y )", "parent": 331, "children": [334], "start_point": {"row": 91, "column": 14}, "end_point": {"row": 91, "column": 34}}, {"id": 334, "type": "binary_expression", "text": "size_x == size_y", "parent": 333, "children": [335, 336, 337], "start_point": {"row": 91, "column": 16}, "end_point": {"row": 91, "column": 32}}, {"id": 335, "type": "identifier", "text": "size_x", "parent": 334, "children": [], "start_point": {"row": 91, "column": 16}, "end_point": {"row": 91, "column": 22}}, {"id": 336, "type": "==", "text": "==", "parent": 334, "children": [], "start_point": {"row": 91, "column": 23}, "end_point": {"row": 91, "column": 25}}, {"id": 337, "type": "identifier", "text": "size_y", "parent": 334, "children": [], "start_point": {"row": 91, "column": 26}, "end_point": {"row": 91, "column": 32}}, {"id": 338, "type": "declaration", "text": "const unsigned size = size_x + size_y;", "parent": 239, "children": [339, 341], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 46}}, {"id": 339, "type": "sized_type_specifier", "text": "unsigned", "parent": 338, "children": [340], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 22}}, {"id": 340, "type": "unsigned", "text": "unsigned", "parent": 339, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 22}}, {"id": 341, "type": "init_declarator", "text": "size = size_x + size_y", "parent": 338, "children": [342, 343, 344], "start_point": {"row": 93, "column": 23}, "end_point": {"row": 93, "column": 45}}, {"id": 342, "type": "identifier", "text": "size", "parent": 341, "children": [], "start_point": {"row": 93, "column": 23}, "end_point": {"row": 93, "column": 27}}, {"id": 343, "type": "=", "text": "=", "parent": 341, "children": [], "start_point": {"row": 93, "column": 28}, "end_point": {"row": 93, "column": 29}}, {"id": 344, "type": "binary_expression", "text": "size_x + size_y", "parent": 341, "children": [345, 346, 347], "start_point": {"row": 93, "column": 30}, "end_point": {"row": 93, "column": 45}}, {"id": 345, "type": "identifier", "text": "size_x", "parent": 344, "children": [], "start_point": {"row": 93, "column": 30}, "end_point": {"row": 93, "column": 36}}, {"id": 346, "type": "+", "text": "+", "parent": 344, "children": [], "start_point": {"row": 93, "column": 37}, "end_point": {"row": 93, "column": 38}}, {"id": 347, "type": "identifier", "text": "size_y", "parent": 344, "children": [], "start_point": {"row": 93, "column": 39}, "end_point": {"row": 93, "column": 45}}, {"id": 348, "type": "call_expression", "text": "dJ.resize( size, size )", "parent": 239, "children": [349, 352], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 31}}, {"id": 349, "type": "field_expression", "text": "dJ.resize", "parent": 348, "children": [350, 351], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 17}}, {"id": 350, "type": "identifier", "text": "dJ", "parent": 349, "children": [], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 10}}, {"id": 351, "type": "field_identifier", "text": "resize", "parent": 349, "children": [], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 17}}, {"id": 352, "type": "argument_list", "text": "( size, size )", "parent": 348, "children": [353, 354], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 31}}, {"id": 353, "type": "identifier", "text": "size", "parent": 352, "children": [], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 23}}, {"id": 354, "type": "identifier", "text": "size", "parent": 352, "children": [], "start_point": {"row": 95, "column": 25}, "end_point": {"row": 95, "column": 29}}, {"id": 355, "type": "for_statement", "text": "for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }", "parent": 239, "children": [356, 363, 367], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 102, "column": 9}}, {"id": 356, "type": "declaration", "text": "unsigned i = 0;", "parent": 355, "children": [357, 359], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 27}}, {"id": 357, "type": "sized_type_specifier", "text": "unsigned", "parent": 356, "children": [358], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 20}}, {"id": 358, "type": "unsigned", "text": "unsigned", "parent": 357, "children": [], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 20}}, {"id": 359, "type": "init_declarator", "text": "i = 0", "parent": 356, "children": [360, 361, 362], "start_point": {"row": 99, "column": 21}, "end_point": {"row": 99, "column": 26}}, {"id": 360, "type": "identifier", "text": "i", "parent": 359, "children": [], "start_point": {"row": 99, "column": 21}, "end_point": {"row": 99, "column": 22}}, {"id": 361, "type": "=", "text": "=", "parent": 359, "children": [], "start_point": {"row": 99, "column": 23}, "end_point": {"row": 99, "column": 24}}, {"id": 362, "type": "number_literal", "text": "0", "parent": 359, "children": [], "start_point": {"row": 99, "column": 25}, "end_point": {"row": 99, "column": 26}}, {"id": 363, "type": "binary_expression", "text": "i < size_x", "parent": 355, "children": [364, 365, 366], "start_point": {"row": 99, "column": 28}, "end_point": {"row": 99, "column": 38}}, {"id": 364, "type": "identifier", "text": "i", "parent": 363, "children": [], "start_point": {"row": 99, "column": 28}, "end_point": {"row": 99, "column": 29}}, {"id": 365, "type": "<", "text": "<", "parent": 363, "children": [], "start_point": {"row": 99, "column": 30}, "end_point": {"row": 99, "column": 31}}, {"id": 366, "type": "identifier", "text": "size_x", "parent": 363, "children": [], "start_point": {"row": 99, "column": 32}, "end_point": {"row": 99, "column": 38}}, {"id": 367, "type": "update_expression", "text": "++i", "parent": 355, "children": [368, 369], "start_point": {"row": 99, "column": 40}, "end_point": {"row": 99, "column": 43}}, {"id": 368, "type": "++", "text": "++", "parent": 367, "children": [], "start_point": {"row": 99, "column": 40}, "end_point": {"row": 99, "column": 42}}, {"id": 369, "type": "identifier", "text": "i", "parent": 367, "children": [], "start_point": {"row": 99, "column": 42}, "end_point": {"row": 99, "column": 43}}, {"id": 370, "type": "call_expression", "text": "dJ.startVec(i)", "parent": 355, "children": [371, 374], "start_point": {"row": 100, "column": 12}, "end_point": {"row": 100, "column": 26}}, {"id": 371, "type": "field_expression", "text": "dJ.startVec", "parent": 370, "children": [372, 373], "start_point": {"row": 100, "column": 12}, "end_point": {"row": 100, "column": 23}}, {"id": 372, "type": "identifier", "text": "dJ", "parent": 371, "children": [], "start_point": {"row": 100, "column": 12}, "end_point": {"row": 100, "column": 14}}, {"id": 373, "type": "field_identifier", "text": "startVec", "parent": 371, "children": [], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 23}}, {"id": 374, "type": "argument_list", "text": "(i)", "parent": 370, "children": [375], "start_point": {"row": 100, "column": 23}, "end_point": {"row": 100, "column": 26}}, {"id": 375, "type": "identifier", "text": "i", "parent": 374, "children": [], "start_point": {"row": 100, "column": 24}, "end_point": {"row": 100, "column": 25}}, {"id": 376, "type": "assignment_expression", "text": "dJ.insertBack(i, size_x + i) = value", "parent": 355, "children": [377, 387, 388], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 48}}, {"id": 377, "type": "call_expression", "text": "dJ.insertBack(i, size_x + i)", "parent": 376, "children": [378, 381], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 40}}, {"id": 378, "type": "field_expression", "text": "dJ.insertBack", "parent": 377, "children": [379, 380], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 25}}, {"id": 379, "type": "identifier", "text": "dJ", "parent": 378, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 14}}, {"id": 380, "type": "field_identifier", "text": "insertBack", "parent": 378, "children": [], "start_point": {"row": 101, "column": 15}, "end_point": {"row": 101, "column": 25}}, {"id": 381, "type": "argument_list", "text": "(i, size_x + i)", "parent": 377, "children": [382, 383], "start_point": {"row": 101, "column": 25}, "end_point": {"row": 101, "column": 40}}, {"id": 382, "type": "identifier", "text": "i", "parent": 381, "children": [], "start_point": {"row": 101, "column": 26}, "end_point": {"row": 101, "column": 27}}, {"id": 383, "type": "binary_expression", "text": "size_x + i", "parent": 381, "children": [384, 385, 386], "start_point": {"row": 101, "column": 29}, "end_point": {"row": 101, "column": 39}}, {"id": 384, "type": "identifier", "text": "size_x", "parent": 383, "children": [], "start_point": {"row": 101, "column": 29}, "end_point": {"row": 101, "column": 35}}, {"id": 385, "type": "+", "text": "+", "parent": 383, "children": [], "start_point": {"row": 101, "column": 36}, "end_point": {"row": 101, "column": 37}}, {"id": 386, "type": "identifier", "text": "i", "parent": 383, "children": [], "start_point": {"row": 101, "column": 38}, "end_point": {"row": 101, "column": 39}}, {"id": 387, "type": "=", "text": "=", "parent": 376, "children": [], "start_point": {"row": 101, "column": 41}, "end_point": {"row": 101, "column": 42}}, {"id": 388, "type": "identifier", "text": "value", "parent": 376, "children": [], "start_point": {"row": 101, "column": 43}, "end_point": {"row": 101, "column": 48}}, {"id": 389, "type": "for_statement", "text": "for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }", "parent": 239, "children": [390, 397, 401], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 107, "column": 9}}, {"id": 390, "type": "declaration", "text": "unsigned i = 0;", "parent": 389, "children": [391, 393], "start_point": {"row": 104, "column": 12}, "end_point": {"row": 104, "column": 27}}, {"id": 391, "type": "sized_type_specifier", "text": "unsigned", "parent": 390, "children": [392], "start_point": {"row": 104, "column": 12}, "end_point": {"row": 104, "column": 20}}, {"id": 392, "type": "unsigned", "text": "unsigned", "parent": 391, "children": [], "start_point": {"row": 104, "column": 12}, "end_point": {"row": 104, "column": 20}}, {"id": 393, "type": "init_declarator", "text": "i = 0", "parent": 390, "children": [394, 395, 396], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 26}}, {"id": 394, "type": "identifier", "text": "i", "parent": 393, "children": [], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 22}}, {"id": 395, "type": "=", "text": "=", "parent": 393, "children": [], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 24}}, {"id": 396, "type": "number_literal", "text": "0", "parent": 393, "children": [], "start_point": {"row": 104, "column": 25}, "end_point": {"row": 104, "column": 26}}, {"id": 397, "type": "binary_expression", "text": "i < size_y", "parent": 389, "children": [398, 399, 400], "start_point": {"row": 104, "column": 28}, "end_point": {"row": 104, "column": 38}}, {"id": 398, "type": "identifier", "text": "i", "parent": 397, "children": [], "start_point": {"row": 104, "column": 28}, "end_point": {"row": 104, "column": 29}}, {"id": 399, "type": "<", "text": "<", "parent": 397, "children": [], "start_point": {"row": 104, "column": 30}, "end_point": {"row": 104, "column": 31}}, {"id": 400, "type": "identifier", "text": "size_y", "parent": 397, "children": [], "start_point": {"row": 104, "column": 32}, "end_point": {"row": 104, "column": 38}}, {"id": 401, "type": "update_expression", "text": "++i", "parent": 389, "children": [402, 403], "start_point": {"row": 104, "column": 40}, "end_point": {"row": 104, "column": 43}}, {"id": 402, "type": "++", "text": "++", "parent": 401, "children": [], "start_point": {"row": 104, "column": 40}, "end_point": {"row": 104, "column": 42}}, {"id": 403, "type": "identifier", "text": "i", "parent": 401, "children": [], "start_point": {"row": 104, "column": 42}, "end_point": {"row": 104, "column": 43}}, {"id": 404, "type": "call_expression", "text": "dJ.startVec(size_x + i)", "parent": 389, "children": [405, 408], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 35}}, {"id": 405, "type": "field_expression", "text": "dJ.startVec", "parent": 404, "children": [406, 407], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 23}}, {"id": 406, "type": "identifier", "text": "dJ", "parent": 405, "children": [], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 14}}, {"id": 407, "type": "field_identifier", "text": "startVec", "parent": 405, "children": [], "start_point": {"row": 105, "column": 15}, "end_point": {"row": 105, "column": 23}}, {"id": 408, "type": "argument_list", "text": "(size_x + i)", "parent": 404, "children": [409], "start_point": {"row": 105, "column": 23}, "end_point": {"row": 105, "column": 35}}, {"id": 409, "type": "binary_expression", "text": "size_x + i", "parent": 408, "children": [410, 411, 412], "start_point": {"row": 105, "column": 24}, "end_point": {"row": 105, "column": 34}}, {"id": 410, "type": "identifier", "text": "size_x", "parent": 409, "children": [], "start_point": {"row": 105, "column": 24}, "end_point": {"row": 105, "column": 30}}, {"id": 411, "type": "+", "text": "+", "parent": 409, "children": [], "start_point": {"row": 105, "column": 31}, "end_point": {"row": 105, "column": 32}}, {"id": 412, "type": "identifier", "text": "i", "parent": 409, "children": [], "start_point": {"row": 105, "column": 33}, "end_point": {"row": 105, "column": 34}}, {"id": 413, "type": "assignment_expression", "text": "dJ.insertBack(size_x + i, i) = value", "parent": 389, "children": [414, 424, 425], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 48}}, {"id": 414, "type": "call_expression", "text": "dJ.insertBack(size_x + i, i)", "parent": 413, "children": [415, 418], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 40}}, {"id": 415, "type": "field_expression", "text": "dJ.insertBack", "parent": 414, "children": [416, 417], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 25}}, {"id": 416, "type": "identifier", "text": "dJ", "parent": 415, "children": [], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 14}}, {"id": 417, "type": "field_identifier", "text": "insertBack", "parent": 415, "children": [], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 25}}, {"id": 418, "type": "argument_list", "text": "(size_x + i, i)", "parent": 414, "children": [419, 423], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 40}}, {"id": 419, "type": "binary_expression", "text": "size_x + i", "parent": 418, "children": [420, 421, 422], "start_point": {"row": 106, "column": 26}, "end_point": {"row": 106, "column": 36}}, {"id": 420, "type": "identifier", "text": "size_x", "parent": 419, "children": [], "start_point": {"row": 106, "column": 26}, "end_point": {"row": 106, "column": 32}}, {"id": 421, "type": "+", "text": "+", "parent": 419, "children": [], "start_point": {"row": 106, "column": 33}, "end_point": {"row": 106, "column": 34}}, {"id": 422, "type": "identifier", "text": "i", "parent": 419, "children": [], "start_point": {"row": 106, "column": 35}, "end_point": {"row": 106, "column": 36}}, {"id": 423, "type": "identifier", "text": "i", "parent": 418, "children": [], "start_point": {"row": 106, "column": 38}, "end_point": {"row": 106, "column": 39}}, {"id": 424, "type": "=", "text": "=", "parent": 413, "children": [], "start_point": {"row": 106, "column": 41}, "end_point": {"row": 106, "column": 42}}, {"id": 425, "type": "identifier", "text": "value", "parent": 413, "children": [], "start_point": {"row": 106, "column": 43}, "end_point": {"row": 106, "column": 48}}, {"id": 426, "type": "call_expression", "text": "dJ.finalize()", "parent": 239, "children": [427, 430], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 21}}, {"id": 427, "type": "field_expression", "text": "dJ.finalize", "parent": 426, "children": [428, 429], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 19}}, {"id": 428, "type": "identifier", "text": "dJ", "parent": 427, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 10}}, {"id": 429, "type": "field_identifier", "text": "finalize", "parent": 427, "children": [], "start_point": {"row": 109, "column": 11}, "end_point": {"row": 109, "column": 19}}, {"id": 430, "type": "argument_list", "text": "()", "parent": 426, "children": [], "start_point": {"row": 109, "column": 19}, "end_point": {"row": 109, "column": 21}}, {"id": 431, "type": "function_definition", "text": "void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n\t\tassert(this->getFrom()[0] != this->getFrom()[1]);\n\n\t\tfor(unsigned i = 0, n = in.size(); i < n; ++i) {\n\t\t\ttypename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n\t}", "parent": 21, "children": [432, 433], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 138, "column": 2}}, {"id": 432, "type": "primitive_type", "text": "void", "parent": 431, "children": [], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 8}}, {"id": 433, "type": "function_declarator", "text": "assemble(const helper::vector< typename self::in_pos_type >& in )", "parent": 431, "children": [434, 435], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 74}}, {"id": 434, "type": "identifier", "text": "assemble", "parent": 433, "children": [], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 17}}, {"id": 435, "type": "parameter_list", "text": "(const helper::vector< typename self::in_pos_type >& in )", "parent": 433, "children": [436], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 74}}, {"id": 436, "type": "parameter_declaration", "text": "const helper::vector< typename self::in_pos_type >& in", "parent": 435, "children": [437, 438, 445], "start_point": {"row": 113, "column": 18}, "end_point": {"row": 113, "column": 72}}, {"id": 437, "type": "type_identifier", "text": "helper", "parent": 436, "children": [], "start_point": {"row": 113, "column": 24}, "end_point": {"row": 113, "column": 30}}, {"id": 438, "type": "ERROR", "text": "::vector< typename self::in_pos_type >&", "parent": 436, "children": [439, 440, 441, 442, 443, 444], "start_point": {"row": 113, "column": 30}, "end_point": {"row": 113, "column": 69}}, {"id": 439, "type": "identifier", "text": "vector", "parent": 438, "children": [], "start_point": {"row": 113, "column": 32}, "end_point": {"row": 113, "column": 38}}, {"id": 440, "type": "<", "text": "<", "parent": 438, "children": [], "start_point": {"row": 113, "column": 38}, "end_point": {"row": 113, "column": 39}}, {"id": 441, "type": "identifier", "text": "typename", "parent": 438, "children": [], "start_point": {"row": 113, "column": 40}, "end_point": {"row": 113, "column": 48}}, {"id": 442, "type": "identifier", "text": "self", "parent": 438, "children": [], "start_point": {"row": 113, "column": 49}, "end_point": {"row": 113, "column": 53}}, {"id": 443, "type": "identifier", "text": "in_pos_type", "parent": 438, "children": [], "start_point": {"row": 113, "column": 55}, "end_point": {"row": 113, "column": 66}}, {"id": 444, "type": ">", "text": ">", "parent": 438, "children": [], "start_point": {"row": 113, "column": 67}, "end_point": {"row": 113, "column": 68}}, {"id": 445, "type": "identifier", "text": "in", "parent": 436, "children": [], "start_point": {"row": 113, "column": 70}, "end_point": {"row": 113, "column": 72}}, {"id": 446, "type": "call_expression", "text": "assert(this->getFrom()[0] != this->getFrom()[1])", "parent": 431, "children": [447, 448], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 50}}, {"id": 447, "type": "identifier", "text": "assert", "parent": 446, "children": [], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 8}}, {"id": 448, "type": "argument_list", "text": "(this->getFrom()[0] != this->getFrom()[1])", "parent": 446, "children": [449], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 50}}, {"id": 449, "type": "binary_expression", "text": "this->getFrom()[0] != this->getFrom()[1]", "parent": 448, "children": [450, 457, 458], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 49}}, {"id": 450, "type": "subscript_expression", "text": "this->getFrom()[0]", "parent": 449, "children": [451, 456], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 27}}, {"id": 451, "type": "call_expression", "text": "this->getFrom()", "parent": 450, "children": [452, 455], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 24}}, {"id": 452, "type": "field_expression", "text": "this->getFrom", "parent": 451, "children": [453, 454], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 22}}, {"id": 453, "type": "identifier", "text": "this", "parent": 452, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 13}}, {"id": 454, "type": "field_identifier", "text": "getFrom", "parent": 452, "children": [], "start_point": {"row": 114, "column": 15}, "end_point": {"row": 114, "column": 22}}, {"id": 455, "type": "argument_list", "text": "()", "parent": 451, "children": [], "start_point": {"row": 114, "column": 22}, "end_point": {"row": 114, "column": 24}}, {"id": 456, "type": "number_literal", "text": "0", "parent": 450, "children": [], "start_point": {"row": 114, "column": 25}, "end_point": {"row": 114, "column": 26}}, {"id": 457, "type": "!=", "text": "!=", "parent": 449, "children": [], "start_point": {"row": 114, "column": 28}, "end_point": {"row": 114, "column": 30}}, {"id": 458, "type": "subscript_expression", "text": "this->getFrom()[1]", "parent": 449, "children": [459, 464], "start_point": {"row": 114, "column": 31}, "end_point": {"row": 114, "column": 49}}, {"id": 459, "type": "call_expression", "text": "this->getFrom()", "parent": 458, "children": [460, 463], "start_point": {"row": 114, "column": 31}, "end_point": {"row": 114, "column": 46}}, {"id": 460, "type": "field_expression", "text": "this->getFrom", "parent": 459, "children": [461, 462], "start_point": {"row": 114, "column": 31}, "end_point": {"row": 114, "column": 44}}, {"id": 461, "type": "identifier", "text": "this", "parent": 460, "children": [], "start_point": {"row": 114, "column": 31}, "end_point": {"row": 114, "column": 35}}, {"id": 462, "type": "field_identifier", "text": "getFrom", "parent": 460, "children": [], "start_point": {"row": 114, "column": 37}, "end_point": {"row": 114, "column": 44}}, {"id": 463, "type": "argument_list", "text": "()", "parent": 459, "children": [], "start_point": {"row": 114, "column": 44}, "end_point": {"row": 114, "column": 46}}, {"id": 464, "type": "number_literal", "text": "1", "parent": 458, "children": [], "start_point": {"row": 114, "column": 47}, "end_point": {"row": 114, "column": 48}}, {"id": 465, "type": "for_statement", "text": "for(unsigned i = 0, n = in.size(); i < n; ++i) {\n\t\t\ttypename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }", "parent": 431, "children": [466, 481, 485], "start_point": {"row": 116, "column": 2}, "end_point": {"row": 136, "column": 9}}, {"id": 466, "type": "declaration", "text": "unsigned i = 0, n = in.size();", "parent": 465, "children": [467, 469, 473], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 36}}, {"id": 467, "type": "sized_type_specifier", "text": "unsigned", "parent": 466, "children": [468], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 14}}, {"id": 468, "type": "unsigned", "text": "unsigned", "parent": 467, "children": [], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 14}}, {"id": 469, "type": "init_declarator", "text": "i = 0", "parent": 466, "children": [470, 471, 472], "start_point": {"row": 116, "column": 15}, "end_point": {"row": 116, "column": 20}}, {"id": 470, "type": "identifier", "text": "i", "parent": 469, "children": [], "start_point": {"row": 116, "column": 15}, "end_point": {"row": 116, "column": 16}}, {"id": 471, "type": "=", "text": "=", "parent": 469, "children": [], "start_point": {"row": 116, "column": 17}, "end_point": {"row": 116, "column": 18}}, {"id": 472, "type": "number_literal", "text": "0", "parent": 469, "children": [], "start_point": {"row": 116, "column": 19}, "end_point": {"row": 116, "column": 20}}, {"id": 473, "type": "init_declarator", "text": "n = in.size()", "parent": 466, "children": [474, 475, 476], "start_point": {"row": 116, "column": 22}, "end_point": {"row": 116, "column": 35}}, {"id": 474, "type": "identifier", "text": "n", "parent": 473, "children": [], "start_point": {"row": 116, "column": 22}, "end_point": {"row": 116, "column": 23}}, {"id": 475, "type": "=", "text": "=", "parent": 473, "children": [], "start_point": {"row": 116, "column": 24}, "end_point": {"row": 116, "column": 25}}, {"id": 476, "type": "call_expression", "text": "in.size()", "parent": 473, "children": [477, 480], "start_point": {"row": 116, "column": 26}, "end_point": {"row": 116, "column": 35}}, {"id": 477, "type": "field_expression", "text": "in.size", "parent": 476, "children": [478, 479], "start_point": {"row": 116, "column": 26}, "end_point": {"row": 116, "column": 33}}, {"id": 478, "type": "identifier", "text": "in", "parent": 477, "children": [], "start_point": {"row": 116, "column": 26}, "end_point": {"row": 116, "column": 28}}, {"id": 479, "type": "field_identifier", "text": "size", "parent": 477, "children": [], "start_point": {"row": 116, "column": 29}, "end_point": {"row": 116, "column": 33}}, {"id": 480, "type": "argument_list", "text": "()", "parent": 476, "children": [], "start_point": {"row": 116, "column": 33}, "end_point": {"row": 116, "column": 35}}, {"id": 481, "type": "binary_expression", "text": "i < n", "parent": 465, "children": [482, 483, 484], "start_point": {"row": 116, "column": 37}, "end_point": {"row": 116, "column": 42}}, {"id": 482, "type": "identifier", "text": "i", "parent": 481, "children": [], "start_point": {"row": 116, "column": 37}, "end_point": {"row": 116, "column": 38}}, {"id": 483, "type": "<", "text": "<", "parent": 481, "children": [], "start_point": {"row": 116, "column": 39}, "end_point": {"row": 116, "column": 40}}, {"id": 484, "type": "identifier", "text": "n", "parent": 481, "children": [], "start_point": {"row": 116, "column": 41}, "end_point": {"row": 116, "column": 42}}, {"id": 485, "type": "update_expression", "text": "++i", "parent": 465, "children": [486, 487], "start_point": {"row": 116, "column": 44}, "end_point": {"row": 116, "column": 47}}, {"id": 486, "type": "++", "text": "++", "parent": 485, "children": [], "start_point": {"row": 116, "column": 44}, "end_point": {"row": 116, "column": 46}}, {"id": 487, "type": "identifier", "text": "i", "parent": 485, "children": [], "start_point": {"row": 116, "column": 46}, "end_point": {"row": 116, "column": 47}}, {"id": 488, "type": "declaration", "text": "typename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;", "parent": 465, "children": [489, 490, 494], "start_point": {"row": 117, "column": 3}, "end_point": {"row": 117, "column": 90}}, {"id": 489, "type": "type_identifier", "text": "typename", "parent": 488, "children": [], "start_point": {"row": 117, "column": 3}, "end_point": {"row": 117, "column": 11}}, {"id": 490, "type": "ERROR", "text": "self::jacobian_type::CompressedMatrix&", "parent": 488, "children": [491, 492, 493], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 50}}, {"id": 491, "type": "identifier", "text": "self", "parent": 490, "children": [], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 16}}, {"id": 492, "type": "identifier", "text": "jacobian_type", "parent": 490, "children": [], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 31}}, {"id": 493, "type": "identifier", "text": "CompressedMatrix", "parent": 490, "children": [], "start_point": {"row": 117, "column": 33}, "end_point": {"row": 117, "column": 49}}, {"id": 494, "type": "init_declarator", "text": "J = this->jacobian(i).compressedMatrix", "parent": 488, "children": [495, 496, 497], "start_point": {"row": 117, "column": 51}, "end_point": {"row": 117, "column": 89}}, {"id": 495, "type": "identifier", "text": "J", "parent": 494, "children": [], "start_point": {"row": 117, "column": 51}, "end_point": {"row": 117, "column": 52}}, {"id": 496, "type": "=", "text": "=", "parent": 494, "children": [], "start_point": {"row": 117, "column": 53}, "end_point": {"row": 117, "column": 54}}, {"id": 497, "type": "field_expression", "text": "this->jacobian(i).compressedMatrix", "parent": 494, "children": [498, 504], "start_point": {"row": 117, "column": 55}, "end_point": {"row": 117, "column": 89}}, {"id": 498, "type": "call_expression", "text": "this->jacobian(i)", "parent": 497, "children": [499, 502], "start_point": {"row": 117, "column": 55}, "end_point": {"row": 117, "column": 72}}, {"id": 499, "type": "field_expression", "text": "this->jacobian", "parent": 498, "children": [500, 501], "start_point": {"row": 117, "column": 55}, "end_point": {"row": 117, "column": 69}}, {"id": 500, "type": "identifier", "text": "this", "parent": 499, "children": [], "start_point": {"row": 117, "column": 55}, "end_point": {"row": 117, "column": 59}}, {"id": 501, "type": "field_identifier", "text": "jacobian", "parent": 499, "children": [], "start_point": {"row": 117, "column": 61}, "end_point": {"row": 117, "column": 69}}, {"id": 502, "type": "argument_list", "text": "(i)", "parent": 498, "children": [503], "start_point": {"row": 117, "column": 69}, "end_point": {"row": 117, "column": 72}}, {"id": 503, "type": "identifier", "text": "i", "parent": 502, "children": [], "start_point": {"row": 117, "column": 70}, "end_point": {"row": 117, "column": 71}}, {"id": 504, "type": "field_identifier", "text": "compressedMatrix", "parent": 497, "children": [], "start_point": {"row": 117, "column": 73}, "end_point": {"row": 117, "column": 89}}, {"id": 505, "type": "call_expression", "text": "J.resize( 1, self::Nin * in[i].size() )", "parent": 465, "children": [506, 509], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 51}}, {"id": 506, "type": "field_expression", "text": "J.resize", "parent": 505, "children": [507, 508], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 20}}, {"id": 507, "type": "identifier", "text": "J", "parent": 506, "children": [], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 13}}, {"id": 508, "type": "field_identifier", "text": "resize", "parent": 506, "children": [], "start_point": {"row": 120, "column": 14}, "end_point": {"row": 120, "column": 20}}, {"id": 509, "type": "argument_list", "text": "( 1, self::Nin * in[i].size() )", "parent": 505, "children": [510, 511], "start_point": {"row": 120, "column": 20}, "end_point": {"row": 120, "column": 51}}, {"id": 510, "type": "number_literal", "text": "1", "parent": 509, "children": [], "start_point": {"row": 120, "column": 22}, "end_point": {"row": 120, "column": 23}}, {"id": 511, "type": "binary_expression", "text": "self::Nin * in[i].size()", "parent": 509, "children": [512, 513, 515, 516], "start_point": {"row": 120, "column": 25}, "end_point": {"row": 120, "column": 49}}, {"id": 512, "type": "identifier", "text": "self", "parent": 511, "children": [], "start_point": {"row": 120, "column": 25}, "end_point": {"row": 120, "column": 29}}, {"id": 513, "type": "ERROR", "text": "::Nin", "parent": 511, "children": [514], "start_point": {"row": 120, "column": 29}, "end_point": {"row": 120, "column": 34}}, {"id": 514, "type": "identifier", "text": "Nin", "parent": 513, "children": [], "start_point": {"row": 120, "column": 31}, "end_point": {"row": 120, "column": 34}}, {"id": 515, "type": "*", "text": "*", "parent": 511, "children": [], "start_point": {"row": 120, "column": 35}, "end_point": {"row": 120, "column": 36}}, {"id": 516, "type": "call_expression", "text": "in[i].size()", "parent": 511, "children": [517, 522], "start_point": {"row": 120, "column": 37}, "end_point": {"row": 120, "column": 49}}, {"id": 517, "type": "field_expression", "text": "in[i].size", "parent": 516, "children": [518, 521], "start_point": {"row": 120, "column": 37}, "end_point": {"row": 120, "column": 47}}, {"id": 518, "type": "subscript_expression", "text": "in[i]", "parent": 517, "children": [519, 520], "start_point": {"row": 120, "column": 37}, "end_point": {"row": 120, "column": 42}}, {"id": 519, "type": "identifier", "text": "in", "parent": 518, "children": [], "start_point": {"row": 120, "column": 37}, "end_point": {"row": 120, "column": 39}}, {"id": 520, "type": "identifier", "text": "i", "parent": 518, "children": [], "start_point": {"row": 120, "column": 40}, "end_point": {"row": 120, "column": 41}}, {"id": 521, "type": "field_identifier", "text": "size", "parent": 517, "children": [], "start_point": {"row": 120, "column": 43}, "end_point": {"row": 120, "column": 47}}, {"id": 522, "type": "argument_list", "text": "()", "parent": 516, "children": [], "start_point": {"row": 120, "column": 47}, "end_point": {"row": 120, "column": 49}}, {"id": 523, "type": "declaration", "text": "const SReal& s = sign.getValue();", "parent": 465, "children": [524, 525], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 45}}, {"id": 524, "type": "type_identifier", "text": "SReal", "parent": 523, "children": [], "start_point": {"row": 122, "column": 18}, "end_point": {"row": 122, "column": 23}}, {"id": 525, "type": "init_declarator", "text": "s = sign.getValue()", "parent": 523, "children": [526, 527, 528], "start_point": {"row": 122, "column": 25}, "end_point": {"row": 122, "column": 44}}, {"id": 526, "type": "identifier", "text": "s", "parent": 525, "children": [], "start_point": {"row": 122, "column": 25}, "end_point": {"row": 122, "column": 26}}, {"id": 527, "type": "=", "text": "=", "parent": 525, "children": [], "start_point": {"row": 122, "column": 27}, "end_point": {"row": 122, "column": 28}}, {"id": 528, "type": "call_expression", "text": "sign.getValue()", "parent": 525, "children": [529, 532], "start_point": {"row": 122, "column": 29}, "end_point": {"row": 122, "column": 44}}, {"id": 529, "type": "field_expression", "text": "sign.getValue", "parent": 528, "children": [530, 531], "start_point": {"row": 122, "column": 29}, "end_point": {"row": 122, "column": 42}}, {"id": 530, "type": "identifier", "text": "sign", "parent": 529, "children": [], "start_point": {"row": 122, "column": 29}, "end_point": {"row": 122, "column": 33}}, {"id": 531, "type": "field_identifier", "text": "getValue", "parent": 529, "children": [], "start_point": {"row": 122, "column": 34}, "end_point": {"row": 122, "column": 42}}, {"id": 532, "type": "argument_list", "text": "()", "parent": 528, "children": [], "start_point": {"row": 122, "column": 42}, "end_point": {"row": 122, "column": 44}}, {"id": 533, "type": "declaration", "text": "const unsigned other = 1 - i;", "parent": 465, "children": [534, 536], "start_point": {"row": 124, "column": 12}, "end_point": {"row": 124, "column": 41}}, {"id": 534, "type": "sized_type_specifier", "text": "unsigned", "parent": 533, "children": [535], "start_point": {"row": 124, "column": 18}, "end_point": {"row": 124, "column": 26}}, {"id": 535, "type": "unsigned", "text": "unsigned", "parent": 534, "children": [], "start_point": {"row": 124, "column": 18}, "end_point": {"row": 124, "column": 26}}, {"id": 536, "type": "init_declarator", "text": "other = 1 - i", "parent": 533, "children": [537, 538, 539], "start_point": {"row": 124, "column": 27}, "end_point": {"row": 124, "column": 40}}, {"id": 537, "type": "identifier", "text": "other", "parent": 536, "children": [], "start_point": {"row": 124, "column": 27}, "end_point": {"row": 124, "column": 32}}, {"id": 538, "type": "=", "text": "=", "parent": 536, "children": [], "start_point": {"row": 124, "column": 33}, "end_point": {"row": 124, "column": 34}}, {"id": 539, "type": "binary_expression", "text": "1 - i", "parent": 536, "children": [540, 541, 542], "start_point": {"row": 124, "column": 35}, "end_point": {"row": 124, "column": 40}}, {"id": 540, "type": "number_literal", "text": "1", "parent": 539, "children": [], "start_point": {"row": 124, "column": 35}, "end_point": {"row": 124, "column": 36}}, {"id": 541, "type": "-", "text": "-", "parent": 539, "children": [], "start_point": {"row": 124, "column": 37}, "end_point": {"row": 124, "column": 38}}, {"id": 542, "type": "identifier", "text": "i", "parent": 539, "children": [], "start_point": {"row": 124, "column": 39}, "end_point": {"row": 124, "column": 40}}, {"id": 543, "type": "call_expression", "text": "J.startVec(0)", "parent": 465, "children": [544, 547], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 127, "column": 25}}, {"id": 544, "type": "field_expression", "text": "J.startVec", "parent": 543, "children": [545, 546], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 127, "column": 22}}, {"id": 545, "type": "identifier", "text": "J", "parent": 544, "children": [], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 127, "column": 13}}, {"id": 546, "type": "field_identifier", "text": "startVec", "parent": 544, "children": [], "start_point": {"row": 127, "column": 14}, "end_point": {"row": 127, "column": 22}}, {"id": 547, "type": "argument_list", "text": "(0)", "parent": 543, "children": [548], "start_point": {"row": 127, "column": 22}, "end_point": {"row": 127, "column": 25}}, {"id": 548, "type": "number_literal", "text": "0", "parent": 547, "children": [], "start_point": {"row": 127, "column": 23}, "end_point": {"row": 127, "column": 24}}, {"id": 549, "type": "for_statement", "text": "for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }", "parent": 465, "children": [550, 567, 571], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 134, "column": 13}}, {"id": 550, "type": "declaration", "text": "unsigned j = 0, m = in[i].size();", "parent": 549, "children": [551, 553, 557], "start_point": {"row": 128, "column": 16}, "end_point": {"row": 128, "column": 49}}, {"id": 551, "type": "sized_type_specifier", "text": "unsigned", "parent": 550, "children": [552], "start_point": {"row": 128, "column": 16}, "end_point": {"row": 128, "column": 24}}, {"id": 552, "type": "unsigned", "text": "unsigned", "parent": 551, "children": [], "start_point": {"row": 128, "column": 16}, "end_point": {"row": 128, "column": 24}}, {"id": 553, "type": "init_declarator", "text": "j = 0", "parent": 550, "children": [554, 555, 556], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 30}}, {"id": 554, "type": "identifier", "text": "j", "parent": 553, "children": [], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 26}}, {"id": 555, "type": "=", "text": "=", "parent": 553, "children": [], "start_point": {"row": 128, "column": 27}, "end_point": {"row": 128, "column": 28}}, {"id": 556, "type": "number_literal", "text": "0", "parent": 553, "children": [], "start_point": {"row": 128, "column": 29}, "end_point": {"row": 128, "column": 30}}, {"id": 557, "type": "init_declarator", "text": "m = in[i].size()", "parent": 550, "children": [558, 559, 560], "start_point": {"row": 128, "column": 32}, "end_point": {"row": 128, "column": 48}}, {"id": 558, "type": "identifier", "text": "m", "parent": 557, "children": [], "start_point": {"row": 128, "column": 32}, "end_point": {"row": 128, "column": 33}}, {"id": 559, "type": "=", "text": "=", "parent": 557, "children": [], "start_point": {"row": 128, "column": 34}, "end_point": {"row": 128, "column": 35}}, {"id": 560, "type": "call_expression", "text": "in[i].size()", "parent": 557, "children": [561, 566], "start_point": {"row": 128, "column": 36}, "end_point": {"row": 128, "column": 48}}, {"id": 561, "type": "field_expression", "text": "in[i].size", "parent": 560, "children": [562, 565], "start_point": {"row": 128, "column": 36}, "end_point": {"row": 128, "column": 46}}, {"id": 562, "type": "subscript_expression", "text": "in[i]", "parent": 561, "children": [563, 564], "start_point": {"row": 128, "column": 36}, "end_point": {"row": 128, "column": 41}}, {"id": 563, "type": "identifier", "text": "in", "parent": 562, "children": [], "start_point": {"row": 128, "column": 36}, "end_point": {"row": 128, "column": 38}}, {"id": 564, "type": "identifier", "text": "i", "parent": 562, "children": [], "start_point": {"row": 128, "column": 39}, "end_point": {"row": 128, "column": 40}}, {"id": 565, "type": "field_identifier", "text": "size", "parent": 561, "children": [], "start_point": {"row": 128, "column": 42}, "end_point": {"row": 128, "column": 46}}, {"id": 566, "type": "argument_list", "text": "()", "parent": 560, "children": [], "start_point": {"row": 128, "column": 46}, "end_point": {"row": 128, "column": 48}}, {"id": 567, "type": "binary_expression", "text": "j < m", "parent": 549, "children": [568, 569, 570], "start_point": {"row": 128, "column": 50}, "end_point": {"row": 128, "column": 55}}, {"id": 568, "type": "identifier", "text": "j", "parent": 567, "children": [], "start_point": {"row": 128, "column": 50}, "end_point": {"row": 128, "column": 51}}, {"id": 569, "type": "<", "text": "<", "parent": 567, "children": [], "start_point": {"row": 128, "column": 52}, "end_point": {"row": 128, "column": 53}}, {"id": 570, "type": "identifier", "text": "m", "parent": 567, "children": [], "start_point": {"row": 128, "column": 54}, "end_point": {"row": 128, "column": 55}}, {"id": 571, "type": "update_expression", "text": "++j", "parent": 549, "children": [572, 573], "start_point": {"row": 128, "column": 57}, "end_point": {"row": 128, "column": 60}}, {"id": 572, "type": "++", "text": "++", "parent": 571, "children": [], "start_point": {"row": 128, "column": 57}, "end_point": {"row": 128, "column": 59}}, {"id": 573, "type": "identifier", "text": "j", "parent": 571, "children": [], "start_point": {"row": 128, "column": 59}, "end_point": {"row": 128, "column": 60}}, {"id": 574, "type": "for_statement", "text": "for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }", "parent": 549, "children": [575, 582, 586, 588], "start_point": {"row": 130, "column": 16}, "end_point": {"row": 133, "column": 17}}, {"id": 575, "type": "declaration", "text": "unsigned k = 0;", "parent": 574, "children": [576, 578], "start_point": {"row": 130, "column": 20}, "end_point": {"row": 130, "column": 35}}, {"id": 576, "type": "sized_type_specifier", "text": "unsigned", "parent": 575, "children": [577], "start_point": {"row": 130, "column": 20}, "end_point": {"row": 130, "column": 28}}, {"id": 577, "type": "unsigned", "text": "unsigned", "parent": 576, "children": [], "start_point": {"row": 130, "column": 20}, "end_point": {"row": 130, "column": 28}}, {"id": 578, "type": "init_declarator", "text": "k = 0", "parent": 575, "children": [579, 580, 581], "start_point": {"row": 130, "column": 29}, "end_point": {"row": 130, "column": 34}}, {"id": 579, "type": "identifier", "text": "k", "parent": 578, "children": [], "start_point": {"row": 130, "column": 29}, "end_point": {"row": 130, "column": 30}}, {"id": 580, "type": "=", "text": "=", "parent": 578, "children": [], "start_point": {"row": 130, "column": 31}, "end_point": {"row": 130, "column": 32}}, {"id": 581, "type": "number_literal", "text": "0", "parent": 578, "children": [], "start_point": {"row": 130, "column": 33}, "end_point": {"row": 130, "column": 34}}, {"id": 582, "type": "binary_expression", "text": "k < self", "parent": 574, "children": [583, 584, 585], "start_point": {"row": 130, "column": 36}, "end_point": {"row": 130, "column": 44}}, {"id": 583, "type": "identifier", "text": "k", "parent": 582, "children": [], "start_point": {"row": 130, "column": 36}, "end_point": {"row": 130, "column": 37}}, {"id": 584, "type": "<", "text": "<", "parent": 582, "children": [], "start_point": {"row": 130, "column": 38}, "end_point": {"row": 130, "column": 39}}, {"id": 585, "type": "identifier", "text": "self", "parent": 582, "children": [], "start_point": {"row": 130, "column": 40}, "end_point": {"row": 130, "column": 44}}, {"id": 586, "type": "ERROR", "text": "::Nin", "parent": 574, "children": [587], "start_point": {"row": 130, "column": 44}, "end_point": {"row": 130, "column": 49}}, {"id": 587, "type": "identifier", "text": "Nin", "parent": 586, "children": [], "start_point": {"row": 130, "column": 46}, "end_point": {"row": 130, "column": 49}}, {"id": 588, "type": "update_expression", "text": "++k", "parent": 574, "children": [589, 590], "start_point": {"row": 130, "column": 51}, "end_point": {"row": 130, "column": 54}}, {"id": 589, "type": "++", "text": "++", "parent": 588, "children": [], "start_point": {"row": 130, "column": 51}, "end_point": {"row": 130, "column": 53}}, {"id": 590, "type": "identifier", "text": "k", "parent": 588, "children": [], "start_point": {"row": 130, "column": 53}, "end_point": {"row": 130, "column": 54}}, {"id": 591, "type": "declaration", "text": "const unsigned col = j * self::Nin + k;", "parent": 574, "children": [592, 594], "start_point": {"row": 131, "column": 20}, "end_point": {"row": 131, "column": 59}}, {"id": 592, "type": "sized_type_specifier", "text": "unsigned", "parent": 591, "children": [593], "start_point": {"row": 131, "column": 26}, "end_point": {"row": 131, "column": 34}}, {"id": 593, "type": "unsigned", "text": "unsigned", "parent": 592, "children": [], "start_point": {"row": 131, "column": 26}, "end_point": {"row": 131, "column": 34}}, {"id": 594, "type": "init_declarator", "text": "col = j * self::Nin + k", "parent": 591, "children": [595, 596, 597], "start_point": {"row": 131, "column": 35}, "end_point": {"row": 131, "column": 58}}, {"id": 595, "type": "identifier", "text": "col", "parent": 594, "children": [], "start_point": {"row": 131, "column": 35}, "end_point": {"row": 131, "column": 38}}, {"id": 596, "type": "=", "text": "=", "parent": 594, "children": [], "start_point": {"row": 131, "column": 39}, "end_point": {"row": 131, "column": 40}}, {"id": 597, "type": "binary_expression", "text": "j * self::Nin + k", "parent": 594, "children": [598, 602, 604, 605], "start_point": {"row": 131, "column": 41}, "end_point": {"row": 131, "column": 58}}, {"id": 598, "type": "binary_expression", "text": "j * self", "parent": 597, "children": [599, 600, 601], "start_point": {"row": 131, "column": 41}, "end_point": {"row": 131, "column": 49}}, {"id": 599, "type": "identifier", "text": "j", "parent": 598, "children": [], "start_point": {"row": 131, "column": 41}, "end_point": {"row": 131, "column": 42}}, {"id": 600, "type": "*", "text": "*", "parent": 598, "children": [], "start_point": {"row": 131, "column": 43}, "end_point": {"row": 131, "column": 44}}, {"id": 601, "type": "identifier", "text": "self", "parent": 598, "children": [], "start_point": {"row": 131, "column": 45}, "end_point": {"row": 131, "column": 49}}, {"id": 602, "type": "ERROR", "text": "::Nin", "parent": 597, "children": [603], "start_point": {"row": 131, "column": 49}, "end_point": {"row": 131, "column": 54}}, {"id": 603, "type": "identifier", "text": "Nin", "parent": 602, "children": [], "start_point": {"row": 131, "column": 51}, "end_point": {"row": 131, "column": 54}}, {"id": 604, "type": "+", "text": "+", "parent": 597, "children": [], "start_point": {"row": 131, "column": 55}, "end_point": {"row": 131, "column": 56}}, {"id": 605, "type": "identifier", "text": "k", "parent": 597, "children": [], "start_point": {"row": 131, "column": 57}, "end_point": {"row": 131, "column": 58}}, {"id": 606, "type": "assignment_expression", "text": "J.insertBack(0, col) = s * in[other][j][k]", "parent": 574, "children": [607, 614, 615], "start_point": {"row": 132, "column": 20}, "end_point": {"row": 132, "column": 62}}, {"id": 607, "type": "call_expression", "text": "J.insertBack(0, col)", "parent": 606, "children": [608, 611], "start_point": {"row": 132, "column": 20}, "end_point": {"row": 132, "column": 40}}, {"id": 608, "type": "field_expression", "text": "J.insertBack", "parent": 607, "children": [609, 610], "start_point": {"row": 132, "column": 20}, "end_point": {"row": 132, "column": 32}}, {"id": 609, "type": "identifier", "text": "J", "parent": 608, "children": [], "start_point": {"row": 132, "column": 20}, "end_point": {"row": 132, "column": 21}}, {"id": 610, "type": "field_identifier", "text": "insertBack", "parent": 608, "children": [], "start_point": {"row": 132, "column": 22}, "end_point": {"row": 132, "column": 32}}, {"id": 611, "type": "argument_list", "text": "(0, col)", "parent": 607, "children": [612, 613], "start_point": {"row": 132, "column": 32}, "end_point": {"row": 132, "column": 40}}, {"id": 612, "type": "number_literal", "text": "0", "parent": 611, "children": [], "start_point": {"row": 132, "column": 33}, "end_point": {"row": 132, "column": 34}}, {"id": 613, "type": "identifier", "text": "col", "parent": 611, "children": [], "start_point": {"row": 132, "column": 36}, "end_point": {"row": 132, "column": 39}}, {"id": 614, "type": "=", "text": "=", "parent": 606, "children": [], "start_point": {"row": 132, "column": 41}, "end_point": {"row": 132, "column": 42}}, {"id": 615, "type": "binary_expression", "text": "s * in[other][j][k]", "parent": 606, "children": [616, 617, 618], "start_point": {"row": 132, "column": 43}, "end_point": {"row": 132, "column": 62}}, {"id": 616, "type": "identifier", "text": "s", "parent": 615, "children": [], "start_point": {"row": 132, "column": 43}, "end_point": {"row": 132, "column": 44}}, {"id": 617, "type": "*", "text": "*", "parent": 615, "children": [], "start_point": {"row": 132, "column": 45}, "end_point": {"row": 132, "column": 46}}, {"id": 618, "type": "subscript_expression", "text": "in[other][j][k]", "parent": 615, "children": [619, 624], "start_point": {"row": 132, "column": 47}, "end_point": {"row": 132, "column": 62}}, {"id": 619, "type": "subscript_expression", "text": "in[other][j]", "parent": 618, "children": [620, 623], "start_point": {"row": 132, "column": 47}, "end_point": {"row": 132, "column": 59}}, {"id": 620, "type": "subscript_expression", "text": "in[other]", "parent": 619, "children": [621, 622], "start_point": {"row": 132, "column": 47}, "end_point": {"row": 132, "column": 56}}, {"id": 621, "type": "identifier", "text": "in", "parent": 620, "children": [], "start_point": {"row": 132, "column": 47}, "end_point": {"row": 132, "column": 49}}, {"id": 622, "type": "identifier", "text": "other", "parent": 620, "children": [], "start_point": {"row": 132, "column": 50}, "end_point": {"row": 132, "column": 55}}, {"id": 623, "type": "identifier", "text": "j", "parent": 619, "children": [], "start_point": {"row": 132, "column": 57}, "end_point": {"row": 132, "column": 58}}, {"id": 624, "type": "identifier", "text": "k", "parent": 618, "children": [], "start_point": {"row": 132, "column": 60}, "end_point": {"row": 132, "column": 61}}, {"id": 625, "type": "call_expression", "text": "J.finalize()", "parent": 465, "children": [626, 629], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 24}}, {"id": 626, "type": "field_expression", "text": "J.finalize", "parent": 625, "children": [627, 628], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 22}}, {"id": 627, "type": "identifier", "text": "J", "parent": 626, "children": [], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 13}}, {"id": 628, "type": "field_identifier", "text": "finalize", "parent": 626, "children": [], "start_point": {"row": 135, "column": 14}, "end_point": {"row": 135, "column": 22}}, {"id": 629, "type": "argument_list", "text": "()", "parent": 625, "children": [], "start_point": {"row": 135, "column": 22}, "end_point": {"row": 135, "column": 24}}, {"id": 630, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 153, "column": 0}, "end_point": {"row": 153, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 18, 21, 239, 241, 431, 433], "variables": [59, 66, 73, 83, 116, 192, 244, 254, 260, 278, 288, 301, 316, 338, 356, 390, 436, 466, 488, 523, 533, 550, 575, 591], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [24, 25, 30, 35, 44, 47, 53, 87, 88, 95, 98, 101, 104, 106, 119, 120, 125, 132, 135, 137, 138, 139, 140, 147, 150, 151, 152, 158, 161, 162, 163, 164, 170, 171, 172, 177, 182, 183, 202, 203, 204, 209, 213, 219, 220, 221, 226, 227, 234, 235, 268, 273, 274, 283, 284, 293, 294, 295, 307, 308, 309, 310, 322, 323, 324, 325, 331, 334, 344, 348, 349, 363, 367, 370, 371, 377, 378, 383, 397, 401, 404, 405, 409, 414, 415, 419, 426, 427, 446, 449, 450, 451, 452, 458, 459, 460, 476, 477, 481, 485, 497, 498, 499, 505, 506, 511, 516, 517, 518, 528, 529, 539, 543, 544, 560, 561, 562, 567, 571, 582, 588, 597, 598, 607, 608, 615, 618, 619, 620, 625, 626], "assignments": [179, 187, 216, 231, 270, 376, 413, 606], "loops": [191, 355, 389, 465, 549, 574], "conditionals": [0, 1, 2, 5, 16, 17, 19, 20, 22, 23, 26, 29, 32, 36, 38, 40, 41, 45, 48, 50, 51, 52, 54, 56, 57, 58, 61, 63, 64, 65, 68, 70, 71, 72, 75, 78, 80, 82, 85, 86, 89, 91, 93, 96, 99, 102, 105, 108, 115, 117, 118, 121, 122, 124, 126, 128, 130, 133, 136, 141, 142, 144, 148, 153, 154, 159, 165, 167, 173, 175, 178, 180, 184, 188, 193, 196, 200, 205, 207, 210, 212, 215, 217, 222, 224, 228, 230, 232, 236, 237, 242, 245, 247, 249, 250, 251, 255, 257, 258, 259, 262, 264, 265, 266, 267, 269, 271, 275, 276, 277, 279, 281, 285, 289, 291, 296, 297, 300, 302, 305, 311, 314, 317, 320, 326, 329, 332, 335, 337, 339, 342, 345, 347, 350, 351, 353, 354, 357, 360, 364, 366, 369, 372, 373, 375, 379, 380, 382, 384, 386, 388, 391, 394, 398, 400, 403, 406, 407, 410, 412, 416, 417, 420, 422, 423, 425, 428, 429, 434, 437, 439, 441, 442, 443, 445, 447, 453, 454, 461, 462, 467, 470, 474, 478, 479, 482, 484, 487, 489, 491, 492, 493, 495, 500, 501, 503, 504, 507, 508, 512, 514, 519, 520, 521, 524, 526, 530, 531, 534, 537, 542, 545, 546, 551, 554, 558, 563, 564, 565, 568, 570, 573, 576, 579, 583, 585, 587, 590, 592, 595, 599, 601, 603, 605, 609, 610, 613, 616, 621, 622, 623, 624, 627, 628, 630], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 109, 110, 111, 146, 157, 166, 174, 185, 186, 190, 198, 206, 223, 229, 286, 287, 313, 328, 362, 396, 456, 464, 472, 510, 540, 548, 556, 581, 612], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "TOut", "text_snippet": "namespace sofa {\n\nnamespace component {\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two"}, {"node_id": 18, "universal_type": "function", "name": "TOut", "text_snippet": "namespace component {\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n "}, {"node_id": 21, "universal_type": "function", "name": "TOut", "text_snippet": "namespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \\[ f(x, y) = x^T "}, {"node_id": 239, "universal_type": "function", "name": "assemble_geometric", "text_snippet": "void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n "}, {"node_id": 241, "universal_type": "function", "name": "unknown", "text_snippet": "assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n "}, {"node_id": 431, "universal_type": "function", "name": "assemble", "text_snippet": "void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n\t\tassert(this->getFrom()[0]"}, {"node_id": 433, "universal_type": "function", "name": "unknown", "text_snippet": "assemble(const helper::vector< typename self::in_pos_type >& in )"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"AssembledMultiMapping.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <Compliant/config.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"../utils/map.h\"\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#ifndef COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H\n#define COMPLIANT_MAPPING_PAIRINGMULTIMAPPING_H\n\n#include \"AssembledMultiMapping.h\"\n#include <Compliant/config.h>\n\n#include \"../utils/map.h\"\n\nnamespace sofa {\n\nnamespace component {\n\nnamespace mapping {\n\n\n/** \n\n natural pairing between two vector dofs:\n \n \\[ f(x, y) = x^T y \\]\n\n use it to enforce holonomic bilateral constraints in your scene\n as: -lambda^T f(x) (+ unit compliance on end dofs)\n \n note that you need a numerical solver that can handle indefinite\n systems (e.g. minres)\n\n @author: <NAME>\n\n*/\n\n\n\ntemplate <class TIn, class TOut >\nclass PairingMultiMapping : public AssembledMultiMapping<TIn, TOut> {\npublic:\n\tSOFA_CLASS(SOFA_TEMPLATE2(PairingMultiMapping,TIn,TOut), \n\t\t\t SOFA_TEMPLATE2(AssembledMultiMapping,TIn,TOut));\n\t\n\ttypedef typename TIn::Real in_real;\n\ttypedef typename TOut::Real out_real;\n\t\n\ttypedef AssembledMultiMapping<TIn, TOut> base;\n\ttypedef PairingMultiMapping self;\n\n Data<SReal> sign;\n\n\n PairingMultiMapping() :\n sign(initData(&sign, (SReal)1.0, \"sign\", \"scalar factor\")) {\n \n }\n \nprotected:\n\n\tvoid apply(typename self::out_pos_type& out,\n const helper::vector< typename self::in_pos_type >& in ) {\n\n // auto resize output\n this->to()->resize( 1 );\n \n assert( in.size() == 2 );\n assert( in[0].size() == in[1].size() ); \n \n out_real& res = out[0][0];\n\n res = 0;\n\n for(unsigned i = 0, n = in[0].size(); i < n; ++i) {\n res += in[0][i] * in[1][i];\n }\n\n res *= sign.getValue();\n\n\t}\n\n\n\n void assemble_geometric(const helper::vector<typename self::const_in_coord_type>& /*in_pos*/,\n const typename self::const_out_deriv_type& out_force) {\n typedef typename self::geometric_type::CompressedMatrix matrix_type;\n matrix_type& dJ = this->geometric.compressedMatrix;\n \n // out force\n const out_real& mu = out_force[0][0];\n\n const SReal value = sign.getValue() * mu;\n \n // matrix sizes\n const unsigned size_x = this->from(0)->getMatrixSize();\n const unsigned size_y = this->from(1)->getMatrixSize();\n assert( size_x == size_y );\n \n const unsigned size = size_x + size_y;\n \n dJ.resize( size, size );\n\n // we want dJ = mu * (0 I \\\\ I 0)\n\n for(unsigned i = 0; i < size_x; ++i) {\n dJ.startVec(i);\n dJ.insertBack(i, size_x + i) = value;\n }\n\n for(unsigned i = 0; i < size_y; ++i) {\n dJ.startVec(size_x + i);\n dJ.insertBack(size_x + i, i) = value;\n }\n\n dJ.finalize();\n\n }\n\n void assemble(const helper::vector< typename self::in_pos_type >& in ) {\n\t\tassert(this->getFrom()[0] != this->getFrom()[1]);\n\n\t\tfor(unsigned i = 0, n = in.size(); i < n; ++i) {\n\t\t\ttypename self::jacobian_type::CompressedMatrix& J = this->jacobian(i).compressedMatrix;\n\n // resize/clean\n J.resize( 1, self::Nin * in[i].size() );\n\n const SReal& s = sign.getValue();\n \n const unsigned other = 1 - i;\n\n // fill\n J.startVec(0);\n for(unsigned j = 0, m = in[i].size(); j < m; ++j) {\n \n for(unsigned k = 0; k < self::Nin; ++k) {\n const unsigned col = j * self::Nin + k;\n J.insertBack(0, col) = s * in[other][j][k];\n }\n }\n J.finalize();\n }\n \n\t}\n\t\n\n\n};\n\n\n\n\n\n\n}\n}\n}\n\n#endif\n"}
306
c
/* * MikroSDK - MikroE Software Development Kit * Copyright© 2020 MikroElektronika d.o.o. * * 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 * */ #include "leddriver6.h" #define LEDDRIVER6_SLAVE_ADDR 0x4D #define LEDDRIVER6_ADC_RES 4096 #define LEDDRIVER6_ADC_VREF 3.3 void leddriver6_cfg_setup ( leddriver6_cfg_t *cfg ) { cfg->pwm = HAL_PIN_NC; cfg->scl = HAL_PIN_NC; cfg->sda = HAL_PIN_NC; cfg->int_pin = HAL_PIN_NC; cfg->dev_pwm_freq = LEDDRIVER6_DEF_FREQ; cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD; cfg->i2c_address = LEDDRIVER6_SLAVE_ADDR; } err_t leddriver6_init ( leddriver6_t *ctx, leddriver6_cfg_t *cfg ) { pwm_config_t pwm_cfg; pwm_configure_default( &pwm_cfg ); pwm_cfg.pin = cfg->pwm; ctx->pwm_freq = cfg->dev_pwm_freq; if ( pwm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR ) { return LEDDRIVER6_INIT_ERROR; } if ( pwm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR ) { return LEDDRIVER6_INIT_ERROR; } i2c_master_config_t i2c_cfg; i2c_master_configure_default( &i2c_cfg ); i2c_cfg.scl = cfg->scl; i2c_cfg.sda = cfg->sda; ctx->slave_address = cfg->i2c_address; if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR ) { return LEDDRIVER6_INIT_ERROR; } if ( i2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR ) { return LEDDRIVER6_INIT_ERROR; } if ( i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR ) { return LEDDRIVER6_INIT_ERROR; } if ( digital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN ) { return LEDDRIVER6_INIT_ERROR; } return LEDDRIVER6_OK; } err_t leddriver6_set_duty_cycle ( leddriver6_t *ctx, float duty_cycle ) { return pwm_set_duty( &ctx->pwm, duty_cycle ); } err_t leddriver6_pwm_stop ( leddriver6_t *ctx ) { return pwm_stop( &ctx->pwm ); } err_t leddriver6_pwm_start ( leddriver6_t *ctx ) { return pwm_start( &ctx->pwm ); } err_t leddriver6_read_adc ( leddriver6_t *ctx, uint16_t *data_out ) { uint8_t read_data[ 2 ]; if ( i2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR ) { return LEDDRIVER6_INIT_ERROR; } *data_out = read_data[ 0 ]; *data_out <<= 8; *data_out |= read_data[ 1 ]; return LEDDRIVER6_OK; } err_t leddriver6_get_pg_voltage ( leddriver6_t *ctx, float *data_out ) { uint16_t adc_data; if ( leddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR ) { return LEDDRIVER6_INIT_ERROR; } *data_out = (float)adc_data / LEDDRIVER6_ADC_RES * LEDDRIVER6_ADC_VREF; return LEDDRIVER6_OK; } uint8_t leddriver6_get_interrupt_state ( leddriver6_t *ctx ) { return digital_in_read( &ctx->int_pin ); } // ------------------------------------------------------------------------ END
26.52
151
(translation_unit) "/* \n * MikroSDK - MikroE Software Development Kit \n * Copyright© 2020 MikroElektronika d.o.o. \n * \n * Permission is hereby granted, free of charge, to any person \n * obtaining a copy of this software and associated documentation \n * files (the "Software"), to deal in the Software without restriction, \n * including without limitation the rights to use, copy, modify, merge, \n * publish, distribute, sublicense, and/or sell copies of the Software, \n * and to permit persons to whom the Software is furnished to do so, \n * subject to the following conditions: \n * \n * The above copyright notice and this permission notice shall be \n * included in all copies or substantial portions of the Software. \n * \n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, \n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. \n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, \n * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE \n * OR OTHER DEALINGS IN THE SOFTWARE. \n */ \n \n/*! \n * \file \n * \n */ \n \n#include "leddriver6.h" \n \n#define LEDDRIVER6_SLAVE_ADDR 0x4D \n \n#define LEDDRIVER6_ADC_RES 4096 \n#define LEDDRIVER6_ADC_VREF 3.3 \n \nvoid leddriver6_cfg_setup ( leddriver6_cfg_t *cfg ) \n{ \n cfg->pwm = HAL_PIN_NC; \n cfg->scl = HAL_PIN_NC; \n cfg->sda = HAL_PIN_NC; \n cfg->int_pin = HAL_PIN_NC; \n \n cfg->dev_pwm_freq = LEDDRIVER6_DEF_FREQ; \n cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD; \n cfg->i2c_address = LEDDRIVER6_SLAVE_ADDR; \n} \n \nerr_t leddriver6_init ( leddriver6_t *ctx, leddriver6_cfg_t *cfg ) \n{ \n pwm_config_t pwm_cfg; \n \n pwm_configure_default( &pwm_cfg ); \n \n pwm_cfg.pin = cfg->pwm; \n \n ctx->pwm_freq = cfg->dev_pwm_freq; \n \n if ( pwm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( pwm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n i2c_master_config_t i2c_cfg; \n \n i2c_master_configure_default( &i2c_cfg ); \n \n i2c_cfg.scl = cfg->scl; \n i2c_cfg.sda = cfg->sda; \n \n ctx->slave_address = cfg->i2c_address; \n \n if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( i2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( digital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n return LEDDRIVER6_OK; \n} \n \nerr_t leddriver6_set_duty_cycle ( leddriver6_t *ctx, float duty_cycle ) \n{ \n return pwm_set_duty( &ctx->pwm, duty_cycle ); \n} \n \nerr_t leddriver6_pwm_stop ( leddriver6_t *ctx ) \n{ \n return pwm_stop( &ctx->pwm ); \n} \n \nerr_t leddriver6_pwm_start ( leddriver6_t *ctx ) \n{ \n return pwm_start( &ctx->pwm ); \n} \n \nerr_t leddriver6_read_adc ( leddriver6_t *ctx, uint16_t *data_out ) \n{ \n uint8_t read_data[ 2 ]; \n \n if ( i2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n *data_out = read_data[ 0 ]; \n *data_out <<= 8; \n *data_out |= read_data[ 1 ]; \n \n return LEDDRIVER6_OK; \n} \n \nerr_t leddriver6_get_pg_voltage ( leddriver6_t *ctx, float *data_out ) \n{ \n uint16_t adc_data; \n \n if ( leddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n *data_out = (float)adc_data / LEDDRIVER6_ADC_RES * LEDDRIVER6_ADC_VREF; \n \n return LEDDRIVER6_OK; \n} \n \nuint8_t leddriver6_get_interrupt_state ( leddriver6_t *ctx ) \n{ \n return digital_in_read( &ctx->int_pin ); \n} \n \n// ------------------------------------------------------------------------ END \n" (comment) "/* \n * MikroSDK - MikroE Software Development Kit \n * Copyright© 2020 MikroElektronika d.o.o. \n * \n * Permission is hereby granted, free of charge, to any person \n * obtaining a copy of this software and associated documentation \n * files (the "Software"), to deal in the Software without restriction, \n * including without limitation the rights to use, copy, modify, merge, \n * publish, distribute, sublicense, and/or sell copies of the Software, \n * and to permit persons to whom the Software is furnished to do so, \n * subject to the following conditions: \n * \n * The above copyright notice and this permission notice shall be \n * included in all copies or substantial portions of the Software. \n * \n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, \n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. \n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, \n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, \n * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE \n * OR OTHER DEALINGS IN THE SOFTWARE. \n */ " (comment) "*! \n * \file \n * \n */ " (preproc_include) "include "leddriver6.h" \n " (#include) "include " (string_literal) "leddriver6.h" " (") "l" (string_content) "eddriver6.h"" (") " " (preproc_def) "define LEDDRIVER6_SLAVE_ADDR 0x4D \n " (#define) "define " (identifier) "EDDRIVER6_SLAVE_ADDR " (preproc_arg) "x4D \n" (preproc_def) "define LEDDRIVER6_ADC_RES 4096 \n#" (#define) "define " (identifier) "EDDRIVER6_ADC_RES " (preproc_arg) "096 \n" (preproc_def) "define LEDDRIVER6_ADC_VREF 3.3 \n " (#define) "define " (identifier) "EDDRIVER6_ADC_VREF " (preproc_arg) ".3 \n" (function_definition) "oid leddriver6_cfg_setup ( leddriver6_cfg_t *cfg ) \n{ \n cfg->pwm = HAL_PIN_NC; \n cfg->scl = HAL_PIN_NC; \n cfg->sda = HAL_PIN_NC; \n cfg->int_pin = HAL_PIN_NC; \n \n cfg->dev_pwm_freq = LEDDRIVER6_DEF_FREQ; \n cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD; \n cfg->i2c_address = LEDDRIVER6_SLAVE_ADDR; \n} " (primitive_type) "oid " (function_declarator) "eddriver6_cfg_setup ( leddriver6_cfg_t *cfg ) " (identifier) "eddriver6_cfg_setup " (parameter_list) " leddriver6_cfg_t *cfg ) " (() " " (parameter_declaration) "eddriver6_cfg_t *cfg " (type_identifier) "eddriver6_cfg_t " (pointer_declarator) "cfg " (*) "c" (identifier) "fg " ()) " " (compound_statement) " \n cfg->pwm = HAL_PIN_NC; \n cfg->scl = HAL_PIN_NC; \n cfg->sda = HAL_PIN_NC; \n cfg->int_pin = HAL_PIN_NC; \n \n cfg->dev_pwm_freq = LEDDRIVER6_DEF_FREQ; \n cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD; \n cfg->i2c_address = LEDDRIVER6_SLAVE_ADDR; \n} " ({) " " (expression_statement) "fg->pwm = HAL_PIN_NC; " (assignment_expression) "fg->pwm = HAL_PIN_NC;" (field_expression) "fg->pwm " (identifier) "fg-" (->) ">p" (field_identifier) "wm " (=) " " (identifier) "AL_PIN_NC;" (;) " " (expression_statement) "fg->scl = HAL_PIN_NC; " (assignment_expression) "fg->scl = HAL_PIN_NC;" (field_expression) "fg->scl " (identifier) "fg-" (->) ">s" (field_identifier) "cl " (=) " " (identifier) "AL_PIN_NC;" (;) " " (expression_statement) "fg->sda = HAL_PIN_NC; " (assignment_expression) "fg->sda = HAL_PIN_NC;" (field_expression) "fg->sda " (identifier) "fg-" (->) ">s" (field_identifier) "da " (=) " " (identifier) "AL_PIN_NC;" (;) " " (expression_statement) "fg->int_pin = HAL_PIN_NC; " (assignment_expression) "fg->int_pin = HAL_PIN_NC;" (field_expression) "fg->int_pin " (identifier) "fg-" (->) ">i" (field_identifier) "nt_pin " (=) " " (identifier) "AL_PIN_NC;" (;) " " (expression_statement) "fg->dev_pwm_freq = LEDDRIVER6_DEF_FREQ; " (assignment_expression) "fg->dev_pwm_freq = LEDDRIVER6_DEF_FREQ;" (field_expression) "fg->dev_pwm_freq " (identifier) "fg-" (->) ">d" (field_identifier) "ev_pwm_freq " (=) " " (identifier) "EDDRIVER6_DEF_FREQ;" (;) " " (expression_statement) "fg->i2c_speed = I2C_MASTER_SPEED_STANDARD; " (assignment_expression) "fg->i2c_speed = I2C_MASTER_SPEED_STANDARD;" (field_expression) "fg->i2c_speed " (identifier) "fg-" (->) ">i" (field_identifier) "2c_speed " (=) " " (identifier) "2C_MASTER_SPEED_STANDARD;" (;) " " (expression_statement) "fg->i2c_address = LEDDRIVER6_SLAVE_ADDR; " (assignment_expression) "fg->i2c_address = LEDDRIVER6_SLAVE_ADDR;" (field_expression) "fg->i2c_address " (identifier) "fg-" (->) ">i" (field_identifier) "2c_address " (=) " " (identifier) "EDDRIVER6_SLAVE_ADDR;" (;) " " (}) " " (function_definition) "rr_t leddriver6_init ( leddriver6_t *ctx, leddriver6_cfg_t *cfg ) \n{ \n pwm_config_t pwm_cfg; \n \n pwm_configure_default( &pwm_cfg ); \n \n pwm_cfg.pin = cfg->pwm; \n \n ctx->pwm_freq = cfg->dev_pwm_freq; \n \n if ( pwm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( pwm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n i2c_master_config_t i2c_cfg; \n \n i2c_master_configure_default( &i2c_cfg ); \n \n i2c_cfg.scl = cfg->scl; \n i2c_cfg.sda = cfg->sda; \n \n ctx->slave_address = cfg->i2c_address; \n \n if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( i2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( digital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n return LEDDRIVER6_OK; \n} " (type_identifier) "rr_t " (function_declarator) "eddriver6_init ( leddriver6_t *ctx, leddriver6_cfg_t *cfg ) " (identifier) "eddriver6_init " (parameter_list) " leddriver6_t *ctx, leddriver6_cfg_t *cfg ) " (() " " (parameter_declaration) "eddriver6_t *ctx," (type_identifier) "eddriver6_t " (pointer_declarator) "ctx," (*) "c" (identifier) "tx," (,) " " (parameter_declaration) "eddriver6_cfg_t *cfg " (type_identifier) "eddriver6_cfg_t " (pointer_declarator) "cfg " (*) "c" (identifier) "fg " ()) " " (compound_statement) " \n pwm_config_t pwm_cfg; \n \n pwm_configure_default( &pwm_cfg ); \n \n pwm_cfg.pin = cfg->pwm; \n \n ctx->pwm_freq = cfg->dev_pwm_freq; \n \n if ( pwm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( pwm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n i2c_master_config_t i2c_cfg; \n \n i2c_master_configure_default( &i2c_cfg ); \n \n i2c_cfg.scl = cfg->scl; \n i2c_cfg.sda = cfg->sda; \n \n ctx->slave_address = cfg->i2c_address; \n \n if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( i2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n if ( digital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n return LEDDRIVER6_OK; \n} " ({) " " (declaration) "wm_config_t pwm_cfg; " (type_identifier) "wm_config_t " (identifier) "wm_cfg;" (;) " " (expression_statement) "wm_configure_default( &pwm_cfg ); " (call_expression) "wm_configure_default( &pwm_cfg );" (identifier) "wm_configure_default(" (argument_list) " &pwm_cfg );" (() " " (pointer_expression) "pwm_cfg " (&) "p" (identifier) "wm_cfg " ()) ";" (;) " " (expression_statement) "wm_cfg.pin = cfg->pwm; " (assignment_expression) "wm_cfg.pin = cfg->pwm;" (field_expression) "wm_cfg.pin " (identifier) "wm_cfg." (.) "p" (field_identifier) "in " (=) " " (field_expression) "fg->pwm;" (identifier) "fg-" (->) ">p" (field_identifier) "wm;" (;) " " (expression_statement) "tx->pwm_freq = cfg->dev_pwm_freq; " (assignment_expression) "tx->pwm_freq = cfg->dev_pwm_freq;" (field_expression) "tx->pwm_freq " (identifier) "tx-" (->) ">p" (field_identifier) "wm_freq " (=) " " (field_expression) "fg->dev_pwm_freq;" (identifier) "fg-" (->) ">d" (field_identifier) "ev_pwm_freq;" (;) " " (if_statement) "f ( pwm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } " (if) "f " (parenthesized_expression) " pwm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR ) " (() " " (binary_expression) "wm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR " (call_expression) "wm_open( &ctx->pwm, &pwm_cfg ) " (identifier) "wm_open(" (argument_list) " &ctx->pwm, &pwm_cfg ) " (() " " (pointer_expression) "ctx->pwm," (&) "c" (field_expression) "tx->pwm," (identifier) "tx-" (->) ">p" (field_identifier) "wm," (,) " " (pointer_expression) "pwm_cfg " (&) "p" (identifier) "wm_cfg " ()) " " (==) "= " (identifier) "WM_ERROR " ()) " " (compound_statement) " \n return LEDDRIVER6_INIT_ERROR; \n } " ({) " " (return_statement) "eturn LEDDRIVER6_INIT_ERROR; " (return) "eturn " (identifier) "EDDRIVER6_INIT_ERROR;" (;) " " (}) " " (if_statement) "f ( pwm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } " (if) "f " (parenthesized_expression) " pwm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR ) " (() " " (binary_expression) "wm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR " (call_expression) "wm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) " (identifier) "wm_set_freq(" (argument_list) " &ctx->pwm, cfg->dev_pwm_freq ) " (() " " (pointer_expression) "ctx->pwm," (&) "c" (field_expression) "tx->pwm," (identifier) "tx-" (->) ">p" (field_identifier) "wm," (,) " " (field_expression) "fg->dev_pwm_freq " (identifier) "fg-" (->) ">d" (field_identifier) "ev_pwm_freq " ()) " " (==) "= " (identifier) "WM_ERROR " ()) " " (compound_statement) " \n return LEDDRIVER6_INIT_ERROR; \n } " ({) " " (return_statement) "eturn LEDDRIVER6_INIT_ERROR; " (return) "eturn " (identifier) "EDDRIVER6_INIT_ERROR;" (;) " " (}) " " (declaration) "2c_master_config_t i2c_cfg; " (type_identifier) "2c_master_config_t " (identifier) "2c_cfg;" (;) " " (expression_statement) "2c_master_configure_default( &i2c_cfg ); " (call_expression) "2c_master_configure_default( &i2c_cfg );" (identifier) "2c_master_configure_default(" (argument_list) " &i2c_cfg );" (() " " (pointer_expression) "i2c_cfg " (&) "i" (identifier) "2c_cfg " ()) ";" (;) " " (expression_statement) "2c_cfg.scl = cfg->scl; " (assignment_expression) "2c_cfg.scl = cfg->scl;" (field_expression) "2c_cfg.scl " (identifier) "2c_cfg." (.) "s" (field_identifier) "cl " (=) " " (field_expression) "fg->scl;" (identifier) "fg-" (->) ">s" (field_identifier) "cl;" (;) " " (expression_statement) "2c_cfg.sda = cfg->sda; " (assignment_expression) "2c_cfg.sda = cfg->sda;" (field_expression) "2c_cfg.sda " (identifier) "2c_cfg." (.) "s" (field_identifier) "da " (=) " " (field_expression) "fg->sda;" (identifier) "fg-" (->) ">s" (field_identifier) "da;" (;) " " (expression_statement) "tx->slave_address = cfg->i2c_address; " (assignment_expression) "tx->slave_address = cfg->i2c_address;" (field_expression) "tx->slave_address " (identifier) "tx-" (->) ">s" (field_identifier) "lave_address " (=) " " (field_expression) "fg->i2c_address;" (identifier) "fg-" (->) ">i" (field_identifier) "2c_address;" (;) " " (if_statement) "f ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } " (if) "f " (parenthesized_expression) " i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR ) " (() " " (binary_expression) "2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR " (call_expression) "2c_master_open( &ctx->i2c, &i2c_cfg ) " (identifier) "2c_master_open(" (argument_list) " &ctx->i2c, &i2c_cfg ) " (() " " (pointer_expression) "ctx->i2c," (&) "c" (field_expression) "tx->i2c," (identifier) "tx-" (->) ">i" (field_identifier) "2c," (,) " " (pointer_expression) "i2c_cfg " (&) "i" (identifier) "2c_cfg " ()) " " (==) "= " (identifier) "2C_MASTER_ERROR " ()) " " (compound_statement) " \n return LEDDRIVER6_INIT_ERROR; \n } " ({) " " (return_statement) "eturn LEDDRIVER6_INIT_ERROR; " (return) "eturn " (identifier) "EDDRIVER6_INIT_ERROR;" (;) " " (}) " " (if_statement) "f ( i2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } " (if) "f " (parenthesized_expression) " i2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR ) " (() " " (binary_expression) "2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR " (call_expression) "2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) " (identifier) "2c_master_set_slave_address(" (argument_list) " &ctx->i2c, cfg->i2c_address ) " (() " " (pointer_expression) "ctx->i2c," (&) "c" (field_expression) "tx->i2c," (identifier) "tx-" (->) ">i" (field_identifier) "2c," (,) " " (field_expression) "fg->i2c_address " (identifier) "fg-" (->) ">i" (field_identifier) "2c_address " ()) " " (==) "= " (identifier) "2C_MASTER_ERROR " ()) " " (compound_statement) " \n return LEDDRIVER6_INIT_ERROR; \n } " ({) " " (return_statement) "eturn LEDDRIVER6_INIT_ERROR; " (return) "eturn " (identifier) "EDDRIVER6_INIT_ERROR;" (;) " " (}) " " (if_statement) "f ( i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } " (if) "f " (parenthesized_expression) " i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR ) " (() " " (binary_expression) "2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR " (call_expression) "2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) " (identifier) "2c_master_set_speed(" (argument_list) " &ctx->i2c, cfg->i2c_speed ) " (() " " (pointer_expression) "ctx->i2c," (&) "c" (field_expression) "tx->i2c," (identifier) "tx-" (->) ">i" (field_identifier) "2c," (,) " " (field_expression) "fg->i2c_speed " (identifier) "fg-" (->) ">i" (field_identifier) "2c_speed " ()) " " (==) "= " (identifier) "2C_MASTER_ERROR " ()) " " (compound_statement) " \n return LEDDRIVER6_INIT_ERROR; \n } " ({) " " (return_statement) "eturn LEDDRIVER6_INIT_ERROR; " (return) "eturn " (identifier) "EDDRIVER6_INIT_ERROR;" (;) " " (}) " " (if_statement) "f ( digital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } " (if) "f " (parenthesized_expression) " digital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN ) " (() " " (binary_expression) "igital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN " (call_expression) "igital_in_init( &ctx->int_pin, cfg->int_pin ) " (identifier) "igital_in_init(" (argument_list) " &ctx->int_pin, cfg->int_pin ) " (() " " (pointer_expression) "ctx->int_pin," (&) "c" (field_expression) "tx->int_pin," (identifier) "tx-" (->) ">i" (field_identifier) "nt_pin," (,) " " (field_expression) "fg->int_pin " (identifier) "fg-" (->) ">i" (field_identifier) "nt_pin " ()) " " (==) "= " (identifier) "IGITAL_IN_UNSUPPORTED_PIN " ()) " " (compound_statement) " \n return LEDDRIVER6_INIT_ERROR; \n } " ({) " " (return_statement) "eturn LEDDRIVER6_INIT_ERROR; " (return) "eturn " (identifier) "EDDRIVER6_INIT_ERROR;" (;) " " (}) " " (return_statement) "eturn LEDDRIVER6_OK; " (return) "eturn " (identifier) "EDDRIVER6_OK;" (;) " " (}) " " (function_definition) "rr_t leddriver6_set_duty_cycle ( leddriver6_t *ctx, float duty_cycle ) \n{ \n return pwm_set_duty( &ctx->pwm, duty_cycle ); \n} " (type_identifier) "rr_t " (function_declarator) "eddriver6_set_duty_cycle ( leddriver6_t *ctx, float duty_cycle ) " (identifier) "eddriver6_set_duty_cycle " (parameter_list) " leddriver6_t *ctx, float duty_cycle ) " (() " " (parameter_declaration) "eddriver6_t *ctx," (type_identifier) "eddriver6_t " (pointer_declarator) "ctx," (*) "c" (identifier) "tx," (,) " " (parameter_declaration) "loat duty_cycle " (primitive_type) "loat " (identifier) "uty_cycle " ()) " " (compound_statement) " \n return pwm_set_duty( &ctx->pwm, duty_cycle ); \n} " ({) " " (return_statement) "eturn pwm_set_duty( &ctx->pwm, duty_cycle ); " (return) "eturn " (call_expression) "wm_set_duty( &ctx->pwm, duty_cycle );" (identifier) "wm_set_duty(" (argument_list) " &ctx->pwm, duty_cycle );" (() " " (pointer_expression) "ctx->pwm," (&) "c" (field_expression) "tx->pwm," (identifier) "tx-" (->) ">p" (field_identifier) "wm," (,) " " (identifier) "uty_cycle " ()) ";" (;) " " (}) " " (function_definition) "rr_t leddriver6_pwm_stop ( leddriver6_t *ctx ) \n{ \n return pwm_stop( &ctx->pwm ); \n} " (type_identifier) "rr_t " (function_declarator) "eddriver6_pwm_stop ( leddriver6_t *ctx ) " (identifier) "eddriver6_pwm_stop " (parameter_list) " leddriver6_t *ctx ) " (() " " (parameter_declaration) "eddriver6_t *ctx " (type_identifier) "eddriver6_t " (pointer_declarator) "ctx " (*) "c" (identifier) "tx " ()) " " (compound_statement) " \n return pwm_stop( &ctx->pwm ); \n} " ({) " " (return_statement) "eturn pwm_stop( &ctx->pwm ); " (return) "eturn " (call_expression) "wm_stop( &ctx->pwm );" (identifier) "wm_stop(" (argument_list) " &ctx->pwm );" (() " " (pointer_expression) "ctx->pwm " (&) "c" (field_expression) "tx->pwm " (identifier) "tx-" (->) ">p" (field_identifier) "wm " ()) ";" (;) " " (}) " " (function_definition) "rr_t leddriver6_pwm_start ( leddriver6_t *ctx ) \n{ \n return pwm_start( &ctx->pwm ); \n} " (type_identifier) "rr_t " (function_declarator) "eddriver6_pwm_start ( leddriver6_t *ctx ) " (identifier) "eddriver6_pwm_start " (parameter_list) " leddriver6_t *ctx ) " (() " " (parameter_declaration) "eddriver6_t *ctx " (type_identifier) "eddriver6_t " (pointer_declarator) "ctx " (*) "c" (identifier) "tx " ()) " " (compound_statement) " \n return pwm_start( &ctx->pwm ); \n} " ({) " " (return_statement) "eturn pwm_start( &ctx->pwm ); " (return) "eturn " (call_expression) "wm_start( &ctx->pwm );" (identifier) "wm_start(" (argument_list) " &ctx->pwm );" (() " " (pointer_expression) "ctx->pwm " (&) "c" (field_expression) "tx->pwm " (identifier) "tx-" (->) ">p" (field_identifier) "wm " ()) ";" (;) " " (}) " " (function_definition) "rr_t leddriver6_read_adc ( leddriver6_t *ctx, uint16_t *data_out ) \n{ \n uint8_t read_data[ 2 ]; \n \n if ( i2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n *data_out = read_data[ 0 ]; \n *data_out <<= 8; \n *data_out |= read_data[ 1 ]; \n \n return LEDDRIVER6_OK; \n} " (type_identifier) "rr_t " (function_declarator) "eddriver6_read_adc ( leddriver6_t *ctx, uint16_t *data_out ) " (identifier) "eddriver6_read_adc " (parameter_list) " leddriver6_t *ctx, uint16_t *data_out ) " (() " " (parameter_declaration) "eddriver6_t *ctx," (type_identifier) "eddriver6_t " (pointer_declarator) "ctx," (*) "c" (identifier) "tx," (,) " " (parameter_declaration) "int16_t *data_out " (primitive_type) "int16_t " (pointer_declarator) "data_out " (*) "d" (identifier) "ata_out " ()) " " (compound_statement) " \n uint8_t read_data[ 2 ]; \n \n if ( i2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n *data_out = read_data[ 0 ]; \n *data_out <<= 8; \n *data_out |= read_data[ 1 ]; \n \n return LEDDRIVER6_OK; \n} " ({) " " (declaration) "int8_t read_data[ 2 ]; " (primitive_type) "int8_t " (array_declarator) "ead_data[ 2 ];" (identifier) "ead_data[" ([) " " (number_literal) " " (]) ";" (;) " " (if_statement) "f ( i2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } " (if) "f " (parenthesized_expression) " i2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR ) " (() " " (binary_expression) "2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR " (call_expression) "2c_master_read( &ctx->i2c, read_data, 2 ) " (identifier) "2c_master_read(" (argument_list) " &ctx->i2c, read_data, 2 ) " (() " " (pointer_expression) "ctx->i2c," (&) "c" (field_expression) "tx->i2c," (identifier) "tx-" (->) ">i" (field_identifier) "2c," (,) " " (identifier) "ead_data," (,) " " (number_literal) " " ()) " " (==) "= " (identifier) "2C_MASTER_ERROR " ()) " " (compound_statement) " \n return LEDDRIVER6_INIT_ERROR; \n } " ({) " " (return_statement) "eturn LEDDRIVER6_INIT_ERROR; " (return) "eturn " (identifier) "EDDRIVER6_INIT_ERROR;" (;) " " (}) " " (expression_statement) "data_out = read_data[ 0 ]; " (assignment_expression) "data_out = read_data[ 0 ];" (pointer_expression) "data_out " (*) "d" (identifier) "ata_out " (=) " " (subscript_expression) "ead_data[ 0 ];" (identifier) "ead_data[" ([) " " (number_literal) " " (]) ";" (;) " " (expression_statement) "data_out <<= 8; " (assignment_expression) "data_out <<= 8;" (pointer_expression) "data_out " (*) "d" (identifier) "ata_out " (<<=) "<= " (number_literal) ";" (;) " " (expression_statement) "data_out |= read_data[ 1 ]; " (assignment_expression) "data_out |= read_data[ 1 ];" (pointer_expression) "data_out " (*) "d" (identifier) "ata_out " (|=) "= " (subscript_expression) "ead_data[ 1 ];" (identifier) "ead_data[" ([) " " (number_literal) " " (]) ";" (;) " " (return_statement) "eturn LEDDRIVER6_OK; " (return) "eturn " (identifier) "EDDRIVER6_OK;" (;) " " (}) " " (function_definition) "rr_t leddriver6_get_pg_voltage ( leddriver6_t *ctx, float *data_out ) \n{ \n uint16_t adc_data; \n \n if ( leddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n *data_out = (float)adc_data / LEDDRIVER6_ADC_RES * LEDDRIVER6_ADC_VREF; \n \n return LEDDRIVER6_OK; \n} " (type_identifier) "rr_t " (function_declarator) "eddriver6_get_pg_voltage ( leddriver6_t *ctx, float *data_out ) " (identifier) "eddriver6_get_pg_voltage " (parameter_list) " leddriver6_t *ctx, float *data_out ) " (() " " (parameter_declaration) "eddriver6_t *ctx," (type_identifier) "eddriver6_t " (pointer_declarator) "ctx," (*) "c" (identifier) "tx," (,) " " (parameter_declaration) "loat *data_out " (primitive_type) "loat " (pointer_declarator) "data_out " (*) "d" (identifier) "ata_out " ()) " " (compound_statement) " \n uint16_t adc_data; \n \n if ( leddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } \n \n *data_out = (float)adc_data / LEDDRIVER6_ADC_RES * LEDDRIVER6_ADC_VREF; \n \n return LEDDRIVER6_OK; \n} " ({) " " (declaration) "int16_t adc_data; " (primitive_type) "int16_t " (identifier) "dc_data;" (;) " " (if_statement) "f ( leddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR ) \n { \n return LEDDRIVER6_INIT_ERROR; \n } " (if) "f " (parenthesized_expression) " leddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR ) " (() " " (binary_expression) "eddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR " (call_expression) "eddriver6_read_adc( ctx, &adc_data ) " (identifier) "eddriver6_read_adc(" (argument_list) " ctx, &adc_data ) " (() " " (identifier) "tx," (,) " " (pointer_expression) "adc_data " (&) "a" (identifier) "dc_data " ()) " " (==) "= " (identifier) "EDDRIVER6_INIT_ERROR " ()) " " (compound_statement) " \n return LEDDRIVER6_INIT_ERROR; \n } " ({) " " (return_statement) "eturn LEDDRIVER6_INIT_ERROR; " (return) "eturn " (identifier) "EDDRIVER6_INIT_ERROR;" (;) " " (}) " " (expression_statement) "data_out = (float)adc_data / LEDDRIVER6_ADC_RES * LEDDRIVER6_ADC_VREF; " (assignment_expression) "data_out = (float)adc_data / LEDDRIVER6_ADC_RES * LEDDRIVER6_ADC_VREF;" (pointer_expression) "data_out " (*) "d" (identifier) "ata_out " (=) " " (binary_expression) "float)adc_data / LEDDRIVER6_ADC_RES * LEDDRIVER6_ADC_VREF;" (binary_expression) "float)adc_data / LEDDRIVER6_ADC_RES " (cast_expression) "float)adc_data " (() "f" (type_descriptor) "loat)" (primitive_type) "loat)" ()) "a" (identifier) "dc_data " (/) " " (identifier) "EDDRIVER6_ADC_RES " (*) " " (identifier) "EDDRIVER6_ADC_VREF;" (;) " " (return_statement) "eturn LEDDRIVER6_OK; " (return) "eturn " (identifier) "EDDRIVER6_OK;" (;) " " (}) " " (function_definition) "int8_t leddriver6_get_interrupt_state ( leddriver6_t *ctx ) \n{ \n return digital_in_read( &ctx->int_pin ); \n} " (primitive_type) "int8_t " (function_declarator) "eddriver6_get_interrupt_state ( leddriver6_t *ctx ) " (identifier) "eddriver6_get_interrupt_state " (parameter_list) " leddriver6_t *ctx ) " (() " " (parameter_declaration) "eddriver6_t *ctx " (type_identifier) "eddriver6_t " (pointer_declarator) "ctx " (*) "c" (identifier) "tx " ()) " " (compound_statement) " \n return digital_in_read( &ctx->int_pin ); \n} " ({) " " (return_statement) "eturn digital_in_read( &ctx->int_pin ); " (return) "eturn " (call_expression) "igital_in_read( &ctx->int_pin );" (identifier) "igital_in_read(" (argument_list) " &ctx->int_pin );" (() " " (pointer_expression) "ctx->int_pin " (&) "c" (field_expression) "tx->int_pin " (identifier) "tx-" (->) ">i" (field_identifier) "nt_pin " ()) ";" (;) " " (}) " " (comment) "/ ------------------------------------------------------------------------ END \n"
687
0
{"language": "c", "success": true, "metadata": {"lines": 151, "avg_line_length": 26.52, "nodes": 468, "errors": 0, "source_hash": "3369c0a454b7b09f4672b421a0b7c700c749bd3373ca084323eea2cfb956a0fa", "categorized_nodes": 330}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "include \"leddriver6.h\"\r\n\r", "parent": null, "children": [1, 2], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 1, "type": "#include", "text": "include ", "parent": 0, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 2, "type": "string_literal", "text": "leddriver6.h\"\r", "parent": 0, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 23}}, {"id": 3, "type": "preproc_def", "text": "define LEDDRIVER6_SLAVE_ADDR 0x4D\r\n\r", "parent": null, "children": [4, 5, 6], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 4, "type": "#define", "text": "define ", "parent": 3, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 5, "type": "identifier", "text": "EDDRIVER6_SLAVE_ADDR ", "parent": 3, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 29}}, {"id": 6, "type": "preproc_arg", "text": "x4D\r\n", "parent": 3, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 36}}, {"id": 7, "type": "preproc_def", "text": "define LEDDRIVER6_ADC_RES 4096\r\n#", "parent": null, "children": [8, 9, 10], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 8, "type": "#define", "text": "define ", "parent": 7, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 9, "type": "identifier", "text": "EDDRIVER6_ADC_RES ", "parent": 7, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 26}}, {"id": 10, "type": "preproc_arg", "text": "096\r\n", "parent": 7, "children": [], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 34}}, {"id": 11, "type": "preproc_def", "text": "define LEDDRIVER6_ADC_VREF 3.3\r\n\r", "parent": null, "children": [12, 13, 14], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 12, "type": "#define", "text": "define ", "parent": 11, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 7}}, {"id": 13, "type": "identifier", "text": "EDDRIVER6_ADC_VREF ", "parent": 11, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 27}}, {"id": 14, "type": "preproc_arg", "text": ".3\r\n", "parent": 11, "children": [], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 33}}, {"id": 15, "type": "function_definition", "text": "oid leddriver6_cfg_setup ( leddriver6_cfg_t *cfg )\r\n{\r\n cfg->pwm = HAL_PIN_NC;\r\n cfg->scl = HAL_PIN_NC;\r\n cfg->sda = HAL_PIN_NC;\r\n cfg->int_pin = HAL_PIN_NC;\r\n\r\n cfg->dev_pwm_freq = LEDDRIVER6_DEF_FREQ;\r\n cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;\r\n cfg->i2c_address = LEDDRIVER6_SLAVE_ADDR;\r\n}\r", "parent": null, "children": [16, 17], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 46, "column": 1}}, {"id": 16, "type": "primitive_type", "text": "oid ", "parent": 15, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 4}}, {"id": 17, "type": "function_declarator", "text": "eddriver6_cfg_setup ( leddriver6_cfg_t *cfg )\r", "parent": 15, "children": [18, 19], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 51}}, {"id": 18, "type": "identifier", "text": "eddriver6_cfg_setup ", "parent": 17, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 25}}, {"id": 19, "type": "parameter_list", "text": " leddriver6_cfg_t *cfg )\r", "parent": 17, "children": [20], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 51}}, {"id": 20, "type": "parameter_declaration", "text": "eddriver6_cfg_t *cfg ", "parent": 19, "children": [21, 22], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 49}}, {"id": 21, "type": "type_identifier", "text": "eddriver6_cfg_t ", "parent": 20, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 44}}, {"id": 22, "type": "pointer_declarator", "text": "cfg ", "parent": 20, "children": [23, 24], "start_point": {"row": 36, "column": 45}, "end_point": {"row": 36, "column": 49}}, {"id": 23, "type": "*", "text": "c", "parent": 22, "children": [], "start_point": {"row": 36, "column": 45}, "end_point": {"row": 36, "column": 46}}, {"id": 24, "type": "identifier", "text": "fg ", "parent": 22, "children": [], "start_point": {"row": 36, "column": 46}, "end_point": {"row": 36, "column": 49}}, {"id": 25, "type": "assignment_expression", "text": "fg->pwm = HAL_PIN_NC;", "parent": 15, "children": [26, 30, 31], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 29}}, {"id": 26, "type": "field_expression", "text": "fg->pwm ", "parent": 25, "children": [27, 28, 29], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 12}}, {"id": 27, "type": "identifier", "text": "fg-", "parent": 26, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 7}}, {"id": 28, "type": "->", "text": ">p", "parent": 26, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 9}}, {"id": 29, "type": "field_identifier", "text": "wm ", "parent": 26, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 12}}, {"id": 30, "type": "=", "text": " ", "parent": 25, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 18}}, {"id": 31, "type": "identifier", "text": "AL_PIN_NC;", "parent": 25, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 29}}, {"id": 32, "type": "assignment_expression", "text": "fg->scl = HAL_PIN_NC;", "parent": 15, "children": [33, 37, 38], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 29}}, {"id": 33, "type": "field_expression", "text": "fg->scl ", "parent": 32, "children": [34, 35, 36], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 12}}, {"id": 34, "type": "identifier", "text": "fg-", "parent": 33, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 7}}, {"id": 35, "type": "->", "text": ">s", "parent": 33, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 9}}, {"id": 36, "type": "field_identifier", "text": "cl ", "parent": 33, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 12}}, {"id": 37, "type": "=", "text": " ", "parent": 32, "children": [], "start_point": {"row": 39, "column": 17}, "end_point": {"row": 39, "column": 18}}, {"id": 38, "type": "identifier", "text": "AL_PIN_NC;", "parent": 32, "children": [], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 29}}, {"id": 39, "type": "assignment_expression", "text": "fg->sda = HAL_PIN_NC;", "parent": 15, "children": [40, 44, 45], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 29}}, {"id": 40, "type": "field_expression", "text": "fg->sda ", "parent": 39, "children": [41, 42, 43], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 12}}, {"id": 41, "type": "identifier", "text": "fg-", "parent": 40, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 7}}, {"id": 42, "type": "->", "text": ">s", "parent": 40, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 9}}, {"id": 43, "type": "field_identifier", "text": "da ", "parent": 40, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 12}}, {"id": 44, "type": "=", "text": " ", "parent": 39, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 18}}, {"id": 45, "type": "identifier", "text": "AL_PIN_NC;", "parent": 39, "children": [], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 29}}, {"id": 46, "type": "assignment_expression", "text": "fg->int_pin = HAL_PIN_NC;", "parent": 15, "children": [47, 51, 52], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 29}}, {"id": 47, "type": "field_expression", "text": "fg->int_pin ", "parent": 46, "children": [48, 49, 50], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 16}}, {"id": 48, "type": "identifier", "text": "fg-", "parent": 47, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 7}}, {"id": 49, "type": "->", "text": ">i", "parent": 47, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 9}}, {"id": 50, "type": "field_identifier", "text": "nt_pin ", "parent": 47, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 16}}, {"id": 51, "type": "=", "text": " ", "parent": 46, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 18}}, {"id": 52, "type": "identifier", "text": "AL_PIN_NC;", "parent": 46, "children": [], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 29}}, {"id": 53, "type": "assignment_expression", "text": "fg->dev_pwm_freq = LEDDRIVER6_DEF_FREQ;", "parent": 15, "children": [54, 58, 59], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 43}}, {"id": 54, "type": "field_expression", "text": "fg->dev_pwm_freq ", "parent": 53, "children": [55, 56, 57], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 21}}, {"id": 55, "type": "identifier", "text": "fg-", "parent": 54, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 7}}, {"id": 56, "type": "->", "text": ">d", "parent": 54, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 9}}, {"id": 57, "type": "field_identifier", "text": "ev_pwm_freq ", "parent": 54, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 21}}, {"id": 58, "type": "=", "text": " ", "parent": 53, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 23}}, {"id": 59, "type": "identifier", "text": "EDDRIVER6_DEF_FREQ;", "parent": 53, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 43}}, {"id": 60, "type": "assignment_expression", "text": "fg->i2c_speed = I2C_MASTER_SPEED_STANDARD;", "parent": 15, "children": [61, 65, 66], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 49}}, {"id": 61, "type": "field_expression", "text": "fg->i2c_speed ", "parent": 60, "children": [62, 63, 64], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 18}}, {"id": 62, "type": "identifier", "text": "fg-", "parent": 61, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 7}}, {"id": 63, "type": "->", "text": ">i", "parent": 61, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 9}}, {"id": 64, "type": "field_identifier", "text": "2c_speed ", "parent": 61, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 18}}, {"id": 65, "type": "=", "text": " ", "parent": 60, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 23}}, {"id": 66, "type": "identifier", "text": "2C_MASTER_SPEED_STANDARD;", "parent": 60, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 49}}, {"id": 67, "type": "assignment_expression", "text": "fg->i2c_address = LEDDRIVER6_SLAVE_ADDR;", "parent": 15, "children": [68, 72, 73], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 45}}, {"id": 68, "type": "field_expression", "text": "fg->i2c_address ", "parent": 67, "children": [69, 70, 71], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 20}}, {"id": 69, "type": "identifier", "text": "fg-", "parent": 68, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 7}}, {"id": 70, "type": "->", "text": ">i", "parent": 68, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 9}}, {"id": 71, "type": "field_identifier", "text": "2c_address ", "parent": 68, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 20}}, {"id": 72, "type": "=", "text": " ", "parent": 67, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 23}}, {"id": 73, "type": "identifier", "text": "EDDRIVER6_SLAVE_ADDR;", "parent": 67, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 45}}, {"id": 74, "type": "function_definition", "text": "rr_t leddriver6_init ( leddriver6_t *ctx, leddriver6_cfg_t *cfg )\r\n{\r\n pwm_config_t pwm_cfg;\r\n\r\n pwm_configure_default( &pwm_cfg );\r\n\r\n pwm_cfg.pin = cfg->pwm;\r\n\r\n ctx->pwm_freq = cfg->dev_pwm_freq;\r\n\r\n if ( pwm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n if ( pwm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n i2c_master_config_t i2c_cfg;\r\n\r\n i2c_master_configure_default( &i2c_cfg );\r\n\r\n i2c_cfg.scl = cfg->scl;\r\n i2c_cfg.sda = cfg->sda;\r\n\r\n ctx->slave_address = cfg->i2c_address;\r\n\r\n if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n if ( i2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n if ( i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n if ( digital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n return LEDDRIVER6_OK;\r\n}\r", "parent": null, "children": [75, 76], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 98, "column": 1}}, {"id": 75, "type": "type_identifier", "text": "rr_t ", "parent": 74, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 5}}, {"id": 76, "type": "function_declarator", "text": "eddriver6_init ( leddriver6_t *ctx, leddriver6_cfg_t *cfg )\r", "parent": 74, "children": [77, 78], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 66}}, {"id": 77, "type": "identifier", "text": "eddriver6_init ", "parent": 76, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 21}}, {"id": 78, "type": "parameter_list", "text": " leddriver6_t *ctx, leddriver6_cfg_t *cfg )\r", "parent": 76, "children": [79, 84], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 66}}, {"id": 79, "type": "parameter_declaration", "text": "eddriver6_t *ctx,", "parent": 78, "children": [80, 81], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 41}}, {"id": 80, "type": "type_identifier", "text": "eddriver6_t ", "parent": 79, "children": [], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 36}}, {"id": 81, "type": "pointer_declarator", "text": "ctx,", "parent": 79, "children": [82, 83], "start_point": {"row": 48, "column": 37}, "end_point": {"row": 48, "column": 41}}, {"id": 82, "type": "*", "text": "c", "parent": 81, "children": [], "start_point": {"row": 48, "column": 37}, "end_point": {"row": 48, "column": 38}}, {"id": 83, "type": "identifier", "text": "tx,", "parent": 81, "children": [], "start_point": {"row": 48, "column": 38}, "end_point": {"row": 48, "column": 41}}, {"id": 84, "type": "parameter_declaration", "text": "eddriver6_cfg_t *cfg ", "parent": 78, "children": [85, 86], "start_point": {"row": 48, "column": 43}, "end_point": {"row": 48, "column": 64}}, {"id": 85, "type": "type_identifier", "text": "eddriver6_cfg_t ", "parent": 84, "children": [], "start_point": {"row": 48, "column": 43}, "end_point": {"row": 48, "column": 59}}, {"id": 86, "type": "pointer_declarator", "text": "cfg ", "parent": 84, "children": [87, 88], "start_point": {"row": 48, "column": 60}, "end_point": {"row": 48, "column": 64}}, {"id": 87, "type": "*", "text": "c", "parent": 86, "children": [], "start_point": {"row": 48, "column": 60}, "end_point": {"row": 48, "column": 61}}, {"id": 88, "type": "identifier", "text": "fg ", "parent": 86, "children": [], "start_point": {"row": 48, "column": 61}, "end_point": {"row": 48, "column": 64}}, {"id": 89, "type": "declaration", "text": "wm_config_t pwm_cfg;\r", "parent": 74, "children": [90, 91], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 25}}, {"id": 90, "type": "type_identifier", "text": "wm_config_t ", "parent": 89, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 16}}, {"id": 91, "type": "identifier", "text": "wm_cfg;", "parent": 89, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 24}}, {"id": 92, "type": "call_expression", "text": "wm_configure_default( &pwm_cfg );", "parent": 74, "children": [93, 94], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 37}}, {"id": 93, "type": "identifier", "text": "wm_configure_default(", "parent": 92, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 25}}, {"id": 94, "type": "argument_list", "text": " &pwm_cfg );", "parent": 92, "children": [95], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 37}}, {"id": 95, "type": "pointer_expression", "text": "pwm_cfg ", "parent": 94, "children": [96, 97], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 35}}, {"id": 96, "type": "&", "text": "p", "parent": 95, "children": [], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 28}}, {"id": 97, "type": "identifier", "text": "wm_cfg ", "parent": 95, "children": [], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 35}}, {"id": 98, "type": "assignment_expression", "text": "wm_cfg.pin = cfg->pwm;", "parent": 74, "children": [99, 102, 103], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 26}}, {"id": 99, "type": "field_expression", "text": "wm_cfg.pin ", "parent": 98, "children": [100, 101], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 15}}, {"id": 100, "type": "identifier", "text": "wm_cfg.", "parent": 99, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 11}}, {"id": 101, "type": "field_identifier", "text": "in ", "parent": 99, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 15}}, {"id": 102, "type": "=", "text": " ", "parent": 98, "children": [], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 17}}, {"id": 103, "type": "field_expression", "text": "fg->pwm;", "parent": 98, "children": [104, 105, 106], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 26}}, {"id": 104, "type": "identifier", "text": "fg-", "parent": 103, "children": [], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 21}}, {"id": 105, "type": "->", "text": ">p", "parent": 103, "children": [], "start_point": {"row": 54, "column": 21}, "end_point": {"row": 54, "column": 23}}, {"id": 106, "type": "field_identifier", "text": "wm;", "parent": 103, "children": [], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 26}}, {"id": 107, "type": "assignment_expression", "text": "tx->pwm_freq = cfg->dev_pwm_freq;", "parent": 74, "children": [108, 112, 113], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 37}}, {"id": 108, "type": "field_expression", "text": "tx->pwm_freq ", "parent": 107, "children": [109, 110, 111], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 17}}, {"id": 109, "type": "identifier", "text": "tx-", "parent": 108, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 7}}, {"id": 110, "type": "->", "text": ">p", "parent": 108, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 9}}, {"id": 111, "type": "field_identifier", "text": "wm_freq ", "parent": 108, "children": [], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 17}}, {"id": 112, "type": "=", "text": " ", "parent": 107, "children": [], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 19}}, {"id": 113, "type": "field_expression", "text": "fg->dev_pwm_freq;", "parent": 107, "children": [114, 115, 116], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 37}}, {"id": 114, "type": "identifier", "text": "fg-", "parent": 113, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 23}}, {"id": 115, "type": "->", "text": ">d", "parent": 113, "children": [], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 25}}, {"id": 116, "type": "field_identifier", "text": "ev_pwm_freq;", "parent": 113, "children": [], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 37}}, {"id": 117, "type": "if_statement", "text": "f ( pwm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r", "parent": 74, "children": [118], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 61, "column": 5}}, {"id": 118, "type": "parenthesized_expression", "text": " pwm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR )\r", "parent": 117, "children": [119], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 55}}, {"id": 119, "type": "binary_expression", "text": "wm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR ", "parent": 118, "children": [120, 132, 133], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 53}}, {"id": 120, "type": "call_expression", "text": "wm_open( &ctx->pwm, &pwm_cfg ) ", "parent": 119, "children": [121, 122], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 40}}, {"id": 121, "type": "identifier", "text": "wm_open(", "parent": 120, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 17}}, {"id": 122, "type": "argument_list", "text": " &ctx->pwm, &pwm_cfg ) ", "parent": 120, "children": [123, 129], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 40}}, {"id": 123, "type": "pointer_expression", "text": "ctx->pwm,", "parent": 122, "children": [124, 125], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 28}}, {"id": 124, "type": "&", "text": "c", "parent": 123, "children": [], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 20}}, {"id": 125, "type": "field_expression", "text": "tx->pwm,", "parent": 123, "children": [126, 127, 128], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 28}}, {"id": 126, "type": "identifier", "text": "tx-", "parent": 125, "children": [], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 23}}, {"id": 127, "type": "->", "text": ">p", "parent": 125, "children": [], "start_point": {"row": 58, "column": 23}, "end_point": {"row": 58, "column": 25}}, {"id": 128, "type": "field_identifier", "text": "wm,", "parent": 125, "children": [], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 28}}, {"id": 129, "type": "pointer_expression", "text": "pwm_cfg ", "parent": 122, "children": [130, 131], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 38}}, {"id": 130, "type": "&", "text": "p", "parent": 129, "children": [], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 31}}, {"id": 131, "type": "identifier", "text": "wm_cfg ", "parent": 129, "children": [], "start_point": {"row": 58, "column": 31}, "end_point": {"row": 58, "column": 38}}, {"id": 132, "type": "==", "text": "= ", "parent": 119, "children": [], "start_point": {"row": 58, "column": 41}, "end_point": {"row": 58, "column": 43}}, {"id": 133, "type": "identifier", "text": "WM_ERROR ", "parent": 119, "children": [], "start_point": {"row": 58, "column": 44}, "end_point": {"row": 58, "column": 53}}, {"id": 134, "type": "return_statement", "text": "eturn LEDDRIVER6_INIT_ERROR;\r", "parent": 117, "children": [135], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 37}}, {"id": 135, "type": "identifier", "text": "EDDRIVER6_INIT_ERROR;", "parent": 134, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 36}}, {"id": 136, "type": "if_statement", "text": "f ( pwm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r", "parent": 74, "children": [137], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 66, "column": 5}}, {"id": 137, "type": "parenthesized_expression", "text": " pwm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR )\r", "parent": 136, "children": [138], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 68}}, {"id": 138, "type": "binary_expression", "text": "wm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR ", "parent": 137, "children": [139, 152, 153], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 66}}, {"id": 139, "type": "call_expression", "text": "wm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) ", "parent": 138, "children": [140, 141], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 53}}, {"id": 140, "type": "identifier", "text": "wm_set_freq(", "parent": 139, "children": [], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 21}}, {"id": 141, "type": "argument_list", "text": " &ctx->pwm, cfg->dev_pwm_freq ) ", "parent": 139, "children": [142, 148], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 53}}, {"id": 142, "type": "pointer_expression", "text": "ctx->pwm,", "parent": 141, "children": [143, 144], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 32}}, {"id": 143, "type": "&", "text": "c", "parent": 142, "children": [], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 24}}, {"id": 144, "type": "field_expression", "text": "tx->pwm,", "parent": 142, "children": [145, 146, 147], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 63, "column": 32}}, {"id": 145, "type": "identifier", "text": "tx-", "parent": 144, "children": [], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 63, "column": 27}}, {"id": 146, "type": "->", "text": ">p", "parent": 144, "children": [], "start_point": {"row": 63, "column": 27}, "end_point": {"row": 63, "column": 29}}, {"id": 147, "type": "field_identifier", "text": "wm,", "parent": 144, "children": [], "start_point": {"row": 63, "column": 29}, "end_point": {"row": 63, "column": 32}}, {"id": 148, "type": "field_expression", "text": "fg->dev_pwm_freq ", "parent": 141, "children": [149, 150, 151], "start_point": {"row": 63, "column": 34}, "end_point": {"row": 63, "column": 51}}, {"id": 149, "type": "identifier", "text": "fg-", "parent": 148, "children": [], "start_point": {"row": 63, "column": 34}, "end_point": {"row": 63, "column": 37}}, {"id": 150, "type": "->", "text": ">d", "parent": 148, "children": [], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 39}}, {"id": 151, "type": "field_identifier", "text": "ev_pwm_freq ", "parent": 148, "children": [], "start_point": {"row": 63, "column": 39}, "end_point": {"row": 63, "column": 51}}, {"id": 152, "type": "==", "text": "= ", "parent": 138, "children": [], "start_point": {"row": 63, "column": 54}, "end_point": {"row": 63, "column": 56}}, {"id": 153, "type": "identifier", "text": "WM_ERROR ", "parent": 138, "children": [], "start_point": {"row": 63, "column": 57}, "end_point": {"row": 63, "column": 66}}, {"id": 154, "type": "return_statement", "text": "eturn LEDDRIVER6_INIT_ERROR;\r", "parent": 136, "children": [155], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 37}}, {"id": 155, "type": "identifier", "text": "EDDRIVER6_INIT_ERROR;", "parent": 154, "children": [], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 36}}, {"id": 156, "type": "declaration", "text": "2c_master_config_t i2c_cfg;\r", "parent": 74, "children": [157, 158], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 32}}, {"id": 157, "type": "type_identifier", "text": "2c_master_config_t ", "parent": 156, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 23}}, {"id": 158, "type": "identifier", "text": "2c_cfg;", "parent": 156, "children": [], "start_point": {"row": 68, "column": 24}, "end_point": {"row": 68, "column": 31}}, {"id": 159, "type": "call_expression", "text": "2c_master_configure_default( &i2c_cfg );", "parent": 74, "children": [160, 161], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 44}}, {"id": 160, "type": "identifier", "text": "2c_master_configure_default(", "parent": 159, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 32}}, {"id": 161, "type": "argument_list", "text": " &i2c_cfg );", "parent": 159, "children": [162], "start_point": {"row": 70, "column": 32}, "end_point": {"row": 70, "column": 44}}, {"id": 162, "type": "pointer_expression", "text": "i2c_cfg ", "parent": 161, "children": [163, 164], "start_point": {"row": 70, "column": 34}, "end_point": {"row": 70, "column": 42}}, {"id": 163, "type": "&", "text": "i", "parent": 162, "children": [], "start_point": {"row": 70, "column": 34}, "end_point": {"row": 70, "column": 35}}, {"id": 164, "type": "identifier", "text": "2c_cfg ", "parent": 162, "children": [], "start_point": {"row": 70, "column": 35}, "end_point": {"row": 70, "column": 42}}, {"id": 165, "type": "assignment_expression", "text": "2c_cfg.scl = cfg->scl;", "parent": 74, "children": [166, 169, 170], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 26}}, {"id": 166, "type": "field_expression", "text": "2c_cfg.scl ", "parent": 165, "children": [167, 168], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 15}}, {"id": 167, "type": "identifier", "text": "2c_cfg.", "parent": 166, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 11}}, {"id": 168, "type": "field_identifier", "text": "cl ", "parent": 166, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 15}}, {"id": 169, "type": "=", "text": " ", "parent": 165, "children": [], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 17}}, {"id": 170, "type": "field_expression", "text": "fg->scl;", "parent": 165, "children": [171, 172, 173], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 26}}, {"id": 171, "type": "identifier", "text": "fg-", "parent": 170, "children": [], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 21}}, {"id": 172, "type": "->", "text": ">s", "parent": 170, "children": [], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 23}}, {"id": 173, "type": "field_identifier", "text": "cl;", "parent": 170, "children": [], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 26}}, {"id": 174, "type": "assignment_expression", "text": "2c_cfg.sda = cfg->sda;", "parent": 74, "children": [175, 178, 179], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 26}}, {"id": 175, "type": "field_expression", "text": "2c_cfg.sda ", "parent": 174, "children": [176, 177], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 15}}, {"id": 176, "type": "identifier", "text": "2c_cfg.", "parent": 175, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 11}}, {"id": 177, "type": "field_identifier", "text": "da ", "parent": 175, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 15}}, {"id": 178, "type": "=", "text": " ", "parent": 174, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 17}}, {"id": 179, "type": "field_expression", "text": "fg->sda;", "parent": 174, "children": [180, 181, 182], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 26}}, {"id": 180, "type": "identifier", "text": "fg-", "parent": 179, "children": [], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 21}}, {"id": 181, "type": "->", "text": ">s", "parent": 179, "children": [], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 23}}, {"id": 182, "type": "field_identifier", "text": "da;", "parent": 179, "children": [], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 26}}, {"id": 183, "type": "assignment_expression", "text": "tx->slave_address = cfg->i2c_address;", "parent": 74, "children": [184, 188, 189], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 41}}, {"id": 184, "type": "field_expression", "text": "tx->slave_address ", "parent": 183, "children": [185, 186, 187], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 22}}, {"id": 185, "type": "identifier", "text": "tx-", "parent": 184, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 7}}, {"id": 186, "type": "->", "text": ">s", "parent": 184, "children": [], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 9}}, {"id": 187, "type": "field_identifier", "text": "lave_address ", "parent": 184, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 22}}, {"id": 188, "type": "=", "text": " ", "parent": 183, "children": [], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 24}}, {"id": 189, "type": "field_expression", "text": "fg->i2c_address;", "parent": 183, "children": [190, 191, 192], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 41}}, {"id": 190, "type": "identifier", "text": "fg-", "parent": 189, "children": [], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 28}}, {"id": 191, "type": "->", "text": ">i", "parent": 189, "children": [], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 30}}, {"id": 192, "type": "field_identifier", "text": "2c_address;", "parent": 189, "children": [], "start_point": {"row": 75, "column": 30}, "end_point": {"row": 75, "column": 41}}, {"id": 193, "type": "if_statement", "text": "f ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r", "parent": 74, "children": [194], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 80, "column": 5}}, {"id": 194, "type": "parenthesized_expression", "text": " i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )\r", "parent": 193, "children": [195], "start_point": {"row": 77, "column": 7}, "end_point": {"row": 77, "column": 69}}, {"id": 195, "type": "binary_expression", "text": "2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR ", "parent": 194, "children": [196, 208, 209], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 67}}, {"id": 196, "type": "call_expression", "text": "2c_master_open( &ctx->i2c, &i2c_cfg ) ", "parent": 195, "children": [197, 198], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 47}}, {"id": 197, "type": "identifier", "text": "2c_master_open(", "parent": 196, "children": [], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 24}}, {"id": 198, "type": "argument_list", "text": " &ctx->i2c, &i2c_cfg ) ", "parent": 196, "children": [199, 205], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 77, "column": 47}}, {"id": 199, "type": "pointer_expression", "text": "ctx->i2c,", "parent": 198, "children": [200, 201], "start_point": {"row": 77, "column": 26}, "end_point": {"row": 77, "column": 35}}, {"id": 200, "type": "&", "text": "c", "parent": 199, "children": [], "start_point": {"row": 77, "column": 26}, "end_point": {"row": 77, "column": 27}}, {"id": 201, "type": "field_expression", "text": "tx->i2c,", "parent": 199, "children": [202, 203, 204], "start_point": {"row": 77, "column": 27}, "end_point": {"row": 77, "column": 35}}, {"id": 202, "type": "identifier", "text": "tx-", "parent": 201, "children": [], "start_point": {"row": 77, "column": 27}, "end_point": {"row": 77, "column": 30}}, {"id": 203, "type": "->", "text": ">i", "parent": 201, "children": [], "start_point": {"row": 77, "column": 30}, "end_point": {"row": 77, "column": 32}}, {"id": 204, "type": "field_identifier", "text": "2c,", "parent": 201, "children": [], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 77, "column": 35}}, {"id": 205, "type": "pointer_expression", "text": "i2c_cfg ", "parent": 198, "children": [206, 207], "start_point": {"row": 77, "column": 37}, "end_point": {"row": 77, "column": 45}}, {"id": 206, "type": "&", "text": "i", "parent": 205, "children": [], "start_point": {"row": 77, "column": 37}, "end_point": {"row": 77, "column": 38}}, {"id": 207, "type": "identifier", "text": "2c_cfg ", "parent": 205, "children": [], "start_point": {"row": 77, "column": 38}, "end_point": {"row": 77, "column": 45}}, {"id": 208, "type": "==", "text": "= ", "parent": 195, "children": [], "start_point": {"row": 77, "column": 48}, "end_point": {"row": 77, "column": 50}}, {"id": 209, "type": "identifier", "text": "2C_MASTER_ERROR ", "parent": 195, "children": [], "start_point": {"row": 77, "column": 51}, "end_point": {"row": 77, "column": 67}}, {"id": 210, "type": "return_statement", "text": "eturn LEDDRIVER6_INIT_ERROR;\r", "parent": 193, "children": [211], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 37}}, {"id": 211, "type": "identifier", "text": "EDDRIVER6_INIT_ERROR;", "parent": 210, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 36}}, {"id": 212, "type": "if_statement", "text": "f ( i2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r", "parent": 74, "children": [213], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 85, "column": 5}}, {"id": 213, "type": "parenthesized_expression", "text": " i2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR )\r", "parent": 212, "children": [214], "start_point": {"row": 82, "column": 7}, "end_point": {"row": 82, "column": 90}}, {"id": 214, "type": "binary_expression", "text": "2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR ", "parent": 213, "children": [215, 228, 229], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 88}}, {"id": 215, "type": "call_expression", "text": "2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) ", "parent": 214, "children": [216, 217], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 68}}, {"id": 216, "type": "identifier", "text": "2c_master_set_slave_address(", "parent": 215, "children": [], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 37}}, {"id": 217, "type": "argument_list", "text": " &ctx->i2c, cfg->i2c_address ) ", "parent": 215, "children": [218, 224], "start_point": {"row": 82, "column": 37}, "end_point": {"row": 82, "column": 68}}, {"id": 218, "type": "pointer_expression", "text": "ctx->i2c,", "parent": 217, "children": [219, 220], "start_point": {"row": 82, "column": 39}, "end_point": {"row": 82, "column": 48}}, {"id": 219, "type": "&", "text": "c", "parent": 218, "children": [], "start_point": {"row": 82, "column": 39}, "end_point": {"row": 82, "column": 40}}, {"id": 220, "type": "field_expression", "text": "tx->i2c,", "parent": 218, "children": [221, 222, 223], "start_point": {"row": 82, "column": 40}, "end_point": {"row": 82, "column": 48}}, {"id": 221, "type": "identifier", "text": "tx-", "parent": 220, "children": [], "start_point": {"row": 82, "column": 40}, "end_point": {"row": 82, "column": 43}}, {"id": 222, "type": "->", "text": ">i", "parent": 220, "children": [], "start_point": {"row": 82, "column": 43}, "end_point": {"row": 82, "column": 45}}, {"id": 223, "type": "field_identifier", "text": "2c,", "parent": 220, "children": [], "start_point": {"row": 82, "column": 45}, "end_point": {"row": 82, "column": 48}}, {"id": 224, "type": "field_expression", "text": "fg->i2c_address ", "parent": 217, "children": [225, 226, 227], "start_point": {"row": 82, "column": 50}, "end_point": {"row": 82, "column": 66}}, {"id": 225, "type": "identifier", "text": "fg-", "parent": 224, "children": [], "start_point": {"row": 82, "column": 50}, "end_point": {"row": 82, "column": 53}}, {"id": 226, "type": "->", "text": ">i", "parent": 224, "children": [], "start_point": {"row": 82, "column": 53}, "end_point": {"row": 82, "column": 55}}, {"id": 227, "type": "field_identifier", "text": "2c_address ", "parent": 224, "children": [], "start_point": {"row": 82, "column": 55}, "end_point": {"row": 82, "column": 66}}, {"id": 228, "type": "==", "text": "= ", "parent": 214, "children": [], "start_point": {"row": 82, "column": 69}, "end_point": {"row": 82, "column": 71}}, {"id": 229, "type": "identifier", "text": "2C_MASTER_ERROR ", "parent": 214, "children": [], "start_point": {"row": 82, "column": 72}, "end_point": {"row": 82, "column": 88}}, {"id": 230, "type": "return_statement", "text": "eturn LEDDRIVER6_INIT_ERROR;\r", "parent": 212, "children": [231], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 37}}, {"id": 231, "type": "identifier", "text": "EDDRIVER6_INIT_ERROR;", "parent": 230, "children": [], "start_point": {"row": 84, "column": 15}, "end_point": {"row": 84, "column": 36}}, {"id": 232, "type": "if_statement", "text": "f ( i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r", "parent": 74, "children": [233], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 90, "column": 5}}, {"id": 233, "type": "parenthesized_expression", "text": " i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR )\r", "parent": 232, "children": [234], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 80}}, {"id": 234, "type": "binary_expression", "text": "2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR ", "parent": 233, "children": [235, 248, 249], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 78}}, {"id": 235, "type": "call_expression", "text": "2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) ", "parent": 234, "children": [236, 237], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 58}}, {"id": 236, "type": "identifier", "text": "2c_master_set_speed(", "parent": 235, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 29}}, {"id": 237, "type": "argument_list", "text": " &ctx->i2c, cfg->i2c_speed ) ", "parent": 235, "children": [238, 244], "start_point": {"row": 87, "column": 29}, "end_point": {"row": 87, "column": 58}}, {"id": 238, "type": "pointer_expression", "text": "ctx->i2c,", "parent": 237, "children": [239, 240], "start_point": {"row": 87, "column": 31}, "end_point": {"row": 87, "column": 40}}, {"id": 239, "type": "&", "text": "c", "parent": 238, "children": [], "start_point": {"row": 87, "column": 31}, "end_point": {"row": 87, "column": 32}}, {"id": 240, "type": "field_expression", "text": "tx->i2c,", "parent": 238, "children": [241, 242, 243], "start_point": {"row": 87, "column": 32}, "end_point": {"row": 87, "column": 40}}, {"id": 241, "type": "identifier", "text": "tx-", "parent": 240, "children": [], "start_point": {"row": 87, "column": 32}, "end_point": {"row": 87, "column": 35}}, {"id": 242, "type": "->", "text": ">i", "parent": 240, "children": [], "start_point": {"row": 87, "column": 35}, "end_point": {"row": 87, "column": 37}}, {"id": 243, "type": "field_identifier", "text": "2c,", "parent": 240, "children": [], "start_point": {"row": 87, "column": 37}, "end_point": {"row": 87, "column": 40}}, {"id": 244, "type": "field_expression", "text": "fg->i2c_speed ", "parent": 237, "children": [245, 246, 247], "start_point": {"row": 87, "column": 42}, "end_point": {"row": 87, "column": 56}}, {"id": 245, "type": "identifier", "text": "fg-", "parent": 244, "children": [], "start_point": {"row": 87, "column": 42}, "end_point": {"row": 87, "column": 45}}, {"id": 246, "type": "->", "text": ">i", "parent": 244, "children": [], "start_point": {"row": 87, "column": 45}, "end_point": {"row": 87, "column": 47}}, {"id": 247, "type": "field_identifier", "text": "2c_speed ", "parent": 244, "children": [], "start_point": {"row": 87, "column": 47}, "end_point": {"row": 87, "column": 56}}, {"id": 248, "type": "==", "text": "= ", "parent": 234, "children": [], "start_point": {"row": 87, "column": 59}, "end_point": {"row": 87, "column": 61}}, {"id": 249, "type": "identifier", "text": "2C_MASTER_ERROR ", "parent": 234, "children": [], "start_point": {"row": 87, "column": 62}, "end_point": {"row": 87, "column": 78}}, {"id": 250, "type": "return_statement", "text": "eturn LEDDRIVER6_INIT_ERROR;\r", "parent": 232, "children": [251], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 37}}, {"id": 251, "type": "identifier", "text": "EDDRIVER6_INIT_ERROR;", "parent": 250, "children": [], "start_point": {"row": 89, "column": 15}, "end_point": {"row": 89, "column": 36}}, {"id": 252, "type": "if_statement", "text": "f ( digital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r", "parent": 74, "children": [253], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 95, "column": 5}}, {"id": 253, "type": "parenthesized_expression", "text": " digital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN )\r", "parent": 252, "children": [254], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 87}}, {"id": 254, "type": "binary_expression", "text": "igital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN ", "parent": 253, "children": [255, 268, 269], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 85}}, {"id": 255, "type": "call_expression", "text": "igital_in_init( &ctx->int_pin, cfg->int_pin ) ", "parent": 254, "children": [256, 257], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 55}}, {"id": 256, "type": "identifier", "text": "igital_in_init(", "parent": 255, "children": [], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 24}}, {"id": 257, "type": "argument_list", "text": " &ctx->int_pin, cfg->int_pin ) ", "parent": 255, "children": [258, 264], "start_point": {"row": 92, "column": 24}, "end_point": {"row": 92, "column": 55}}, {"id": 258, "type": "pointer_expression", "text": "ctx->int_pin,", "parent": 257, "children": [259, 260], "start_point": {"row": 92, "column": 26}, "end_point": {"row": 92, "column": 39}}, {"id": 259, "type": "&", "text": "c", "parent": 258, "children": [], "start_point": {"row": 92, "column": 26}, "end_point": {"row": 92, "column": 27}}, {"id": 260, "type": "field_expression", "text": "tx->int_pin,", "parent": 258, "children": [261, 262, 263], "start_point": {"row": 92, "column": 27}, "end_point": {"row": 92, "column": 39}}, {"id": 261, "type": "identifier", "text": "tx-", "parent": 260, "children": [], "start_point": {"row": 92, "column": 27}, "end_point": {"row": 92, "column": 30}}, {"id": 262, "type": "->", "text": ">i", "parent": 260, "children": [], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 32}}, {"id": 263, "type": "field_identifier", "text": "nt_pin,", "parent": 260, "children": [], "start_point": {"row": 92, "column": 32}, "end_point": {"row": 92, "column": 39}}, {"id": 264, "type": "field_expression", "text": "fg->int_pin ", "parent": 257, "children": [265, 266, 267], "start_point": {"row": 92, "column": 41}, "end_point": {"row": 92, "column": 53}}, {"id": 265, "type": "identifier", "text": "fg-", "parent": 264, "children": [], "start_point": {"row": 92, "column": 41}, "end_point": {"row": 92, "column": 44}}, {"id": 266, "type": "->", "text": ">i", "parent": 264, "children": [], "start_point": {"row": 92, "column": 44}, "end_point": {"row": 92, "column": 46}}, {"id": 267, "type": "field_identifier", "text": "nt_pin ", "parent": 264, "children": [], "start_point": {"row": 92, "column": 46}, "end_point": {"row": 92, "column": 53}}, {"id": 268, "type": "==", "text": "= ", "parent": 254, "children": [], "start_point": {"row": 92, "column": 56}, "end_point": {"row": 92, "column": 58}}, {"id": 269, "type": "identifier", "text": "IGITAL_IN_UNSUPPORTED_PIN ", "parent": 254, "children": [], "start_point": {"row": 92, "column": 59}, "end_point": {"row": 92, "column": 85}}, {"id": 270, "type": "return_statement", "text": "eturn LEDDRIVER6_INIT_ERROR;\r", "parent": 252, "children": [271], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 37}}, {"id": 271, "type": "identifier", "text": "EDDRIVER6_INIT_ERROR;", "parent": 270, "children": [], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 36}}, {"id": 272, "type": "return_statement", "text": "eturn LEDDRIVER6_OK;\r", "parent": 74, "children": [273], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 25}}, {"id": 273, "type": "identifier", "text": "EDDRIVER6_OK;", "parent": 272, "children": [], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 24}}, {"id": 274, "type": "function_definition", "text": "rr_t leddriver6_set_duty_cycle ( leddriver6_t *ctx, float duty_cycle )\r\n{\r\n return pwm_set_duty( &ctx->pwm, duty_cycle );\r\n}\r", "parent": null, "children": [275, 276], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 103, "column": 1}}, {"id": 275, "type": "type_identifier", "text": "rr_t ", "parent": 274, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 5}}, {"id": 276, "type": "function_declarator", "text": "eddriver6_set_duty_cycle ( leddriver6_t *ctx, float duty_cycle )\r", "parent": 274, "children": [277, 278], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 71}}, {"id": 277, "type": "identifier", "text": "eddriver6_set_duty_cycle ", "parent": 276, "children": [], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 31}}, {"id": 278, "type": "parameter_list", "text": " leddriver6_t *ctx, float duty_cycle )\r", "parent": 276, "children": [279, 284], "start_point": {"row": 100, "column": 32}, "end_point": {"row": 100, "column": 71}}, {"id": 279, "type": "parameter_declaration", "text": "eddriver6_t *ctx,", "parent": 278, "children": [280, 281], "start_point": {"row": 100, "column": 34}, "end_point": {"row": 100, "column": 51}}, {"id": 280, "type": "type_identifier", "text": "eddriver6_t ", "parent": 279, "children": [], "start_point": {"row": 100, "column": 34}, "end_point": {"row": 100, "column": 46}}, {"id": 281, "type": "pointer_declarator", "text": "ctx,", "parent": 279, "children": [282, 283], "start_point": {"row": 100, "column": 47}, "end_point": {"row": 100, "column": 51}}, {"id": 282, "type": "*", "text": "c", "parent": 281, "children": [], "start_point": {"row": 100, "column": 47}, "end_point": {"row": 100, "column": 48}}, {"id": 283, "type": "identifier", "text": "tx,", "parent": 281, "children": [], "start_point": {"row": 100, "column": 48}, "end_point": {"row": 100, "column": 51}}, {"id": 284, "type": "parameter_declaration", "text": "loat duty_cycle ", "parent": 278, "children": [285, 286], "start_point": {"row": 100, "column": 53}, "end_point": {"row": 100, "column": 69}}, {"id": 285, "type": "primitive_type", "text": "loat ", "parent": 284, "children": [], "start_point": {"row": 100, "column": 53}, "end_point": {"row": 100, "column": 58}}, {"id": 286, "type": "identifier", "text": "uty_cycle ", "parent": 284, "children": [], "start_point": {"row": 100, "column": 59}, "end_point": {"row": 100, "column": 69}}, {"id": 287, "type": "return_statement", "text": "eturn pwm_set_duty( &ctx->pwm, duty_cycle );\r", "parent": 274, "children": [288], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 49}}, {"id": 288, "type": "call_expression", "text": "wm_set_duty( &ctx->pwm, duty_cycle );", "parent": 287, "children": [289, 290], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 48}}, {"id": 289, "type": "identifier", "text": "wm_set_duty(", "parent": 288, "children": [], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 23}}, {"id": 290, "type": "argument_list", "text": " &ctx->pwm, duty_cycle );", "parent": 288, "children": [291, 297], "start_point": {"row": 102, "column": 23}, "end_point": {"row": 102, "column": 48}}, {"id": 291, "type": "pointer_expression", "text": "ctx->pwm,", "parent": 290, "children": [292, 293], "start_point": {"row": 102, "column": 25}, "end_point": {"row": 102, "column": 34}}, {"id": 292, "type": "&", "text": "c", "parent": 291, "children": [], "start_point": {"row": 102, "column": 25}, "end_point": {"row": 102, "column": 26}}, {"id": 293, "type": "field_expression", "text": "tx->pwm,", "parent": 291, "children": [294, 295, 296], "start_point": {"row": 102, "column": 26}, "end_point": {"row": 102, "column": 34}}, {"id": 294, "type": "identifier", "text": "tx-", "parent": 293, "children": [], "start_point": {"row": 102, "column": 26}, "end_point": {"row": 102, "column": 29}}, {"id": 295, "type": "->", "text": ">p", "parent": 293, "children": [], "start_point": {"row": 102, "column": 29}, "end_point": {"row": 102, "column": 31}}, {"id": 296, "type": "field_identifier", "text": "wm,", "parent": 293, "children": [], "start_point": {"row": 102, "column": 31}, "end_point": {"row": 102, "column": 34}}, {"id": 297, "type": "identifier", "text": "uty_cycle ", "parent": 290, "children": [], "start_point": {"row": 102, "column": 36}, "end_point": {"row": 102, "column": 46}}, {"id": 298, "type": "function_definition", "text": "rr_t leddriver6_pwm_stop ( leddriver6_t *ctx )\r\n{\r\n return pwm_stop( &ctx->pwm );\r\n}\r", "parent": null, "children": [299, 300], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 108, "column": 1}}, {"id": 299, "type": "type_identifier", "text": "rr_t ", "parent": 298, "children": [], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 5}}, {"id": 300, "type": "function_declarator", "text": "eddriver6_pwm_stop ( leddriver6_t *ctx )\r", "parent": 298, "children": [301, 302], "start_point": {"row": 105, "column": 6}, "end_point": {"row": 105, "column": 47}}, {"id": 301, "type": "identifier", "text": "eddriver6_pwm_stop ", "parent": 300, "children": [], "start_point": {"row": 105, "column": 6}, "end_point": {"row": 105, "column": 25}}, {"id": 302, "type": "parameter_list", "text": " leddriver6_t *ctx )\r", "parent": 300, "children": [303], "start_point": {"row": 105, "column": 26}, "end_point": {"row": 105, "column": 47}}, {"id": 303, "type": "parameter_declaration", "text": "eddriver6_t *ctx ", "parent": 302, "children": [304, 305], "start_point": {"row": 105, "column": 28}, "end_point": {"row": 105, "column": 45}}, {"id": 304, "type": "type_identifier", "text": "eddriver6_t ", "parent": 303, "children": [], "start_point": {"row": 105, "column": 28}, "end_point": {"row": 105, "column": 40}}, {"id": 305, "type": "pointer_declarator", "text": "ctx ", "parent": 303, "children": [306, 307], "start_point": {"row": 105, "column": 41}, "end_point": {"row": 105, "column": 45}}, {"id": 306, "type": "*", "text": "c", "parent": 305, "children": [], "start_point": {"row": 105, "column": 41}, "end_point": {"row": 105, "column": 42}}, {"id": 307, "type": "identifier", "text": "tx ", "parent": 305, "children": [], "start_point": {"row": 105, "column": 42}, "end_point": {"row": 105, "column": 45}}, {"id": 308, "type": "return_statement", "text": "eturn pwm_stop( &ctx->pwm );\r", "parent": 298, "children": [309], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 33}}, {"id": 309, "type": "call_expression", "text": "wm_stop( &ctx->pwm );", "parent": 308, "children": [310, 311], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 32}}, {"id": 310, "type": "identifier", "text": "wm_stop(", "parent": 309, "children": [], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 19}}, {"id": 311, "type": "argument_list", "text": " &ctx->pwm );", "parent": 309, "children": [312], "start_point": {"row": 107, "column": 19}, "end_point": {"row": 107, "column": 32}}, {"id": 312, "type": "pointer_expression", "text": "ctx->pwm ", "parent": 311, "children": [313, 314], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 30}}, {"id": 313, "type": "&", "text": "c", "parent": 312, "children": [], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 22}}, {"id": 314, "type": "field_expression", "text": "tx->pwm ", "parent": 312, "children": [315, 316, 317], "start_point": {"row": 107, "column": 22}, "end_point": {"row": 107, "column": 30}}, {"id": 315, "type": "identifier", "text": "tx-", "parent": 314, "children": [], "start_point": {"row": 107, "column": 22}, "end_point": {"row": 107, "column": 25}}, {"id": 316, "type": "->", "text": ">p", "parent": 314, "children": [], "start_point": {"row": 107, "column": 25}, "end_point": {"row": 107, "column": 27}}, {"id": 317, "type": "field_identifier", "text": "wm ", "parent": 314, "children": [], "start_point": {"row": 107, "column": 27}, "end_point": {"row": 107, "column": 30}}, {"id": 318, "type": "function_definition", "text": "rr_t leddriver6_pwm_start ( leddriver6_t *ctx )\r\n{\r\n return pwm_start( &ctx->pwm );\r\n}\r", "parent": null, "children": [319, 320], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 113, "column": 1}}, {"id": 319, "type": "type_identifier", "text": "rr_t ", "parent": 318, "children": [], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 5}}, {"id": 320, "type": "function_declarator", "text": "eddriver6_pwm_start ( leddriver6_t *ctx )\r", "parent": 318, "children": [321, 322], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 48}}, {"id": 321, "type": "identifier", "text": "eddriver6_pwm_start ", "parent": 320, "children": [], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 26}}, {"id": 322, "type": "parameter_list", "text": " leddriver6_t *ctx )\r", "parent": 320, "children": [323], "start_point": {"row": 110, "column": 27}, "end_point": {"row": 110, "column": 48}}, {"id": 323, "type": "parameter_declaration", "text": "eddriver6_t *ctx ", "parent": 322, "children": [324, 325], "start_point": {"row": 110, "column": 29}, "end_point": {"row": 110, "column": 46}}, {"id": 324, "type": "type_identifier", "text": "eddriver6_t ", "parent": 323, "children": [], "start_point": {"row": 110, "column": 29}, "end_point": {"row": 110, "column": 41}}, {"id": 325, "type": "pointer_declarator", "text": "ctx ", "parent": 323, "children": [326, 327], "start_point": {"row": 110, "column": 42}, "end_point": {"row": 110, "column": 46}}, {"id": 326, "type": "*", "text": "c", "parent": 325, "children": [], "start_point": {"row": 110, "column": 42}, "end_point": {"row": 110, "column": 43}}, {"id": 327, "type": "identifier", "text": "tx ", "parent": 325, "children": [], "start_point": {"row": 110, "column": 43}, "end_point": {"row": 110, "column": 46}}, {"id": 328, "type": "return_statement", "text": "eturn pwm_start( &ctx->pwm );\r", "parent": 318, "children": [329], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 34}}, {"id": 329, "type": "call_expression", "text": "wm_start( &ctx->pwm );", "parent": 328, "children": [330, 331], "start_point": {"row": 112, "column": 11}, "end_point": {"row": 112, "column": 33}}, {"id": 330, "type": "identifier", "text": "wm_start(", "parent": 329, "children": [], "start_point": {"row": 112, "column": 11}, "end_point": {"row": 112, "column": 20}}, {"id": 331, "type": "argument_list", "text": " &ctx->pwm );", "parent": 329, "children": [332], "start_point": {"row": 112, "column": 20}, "end_point": {"row": 112, "column": 33}}, {"id": 332, "type": "pointer_expression", "text": "ctx->pwm ", "parent": 331, "children": [333, 334], "start_point": {"row": 112, "column": 22}, "end_point": {"row": 112, "column": 31}}, {"id": 333, "type": "&", "text": "c", "parent": 332, "children": [], "start_point": {"row": 112, "column": 22}, "end_point": {"row": 112, "column": 23}}, {"id": 334, "type": "field_expression", "text": "tx->pwm ", "parent": 332, "children": [335, 336, 337], "start_point": {"row": 112, "column": 23}, "end_point": {"row": 112, "column": 31}}, {"id": 335, "type": "identifier", "text": "tx-", "parent": 334, "children": [], "start_point": {"row": 112, "column": 23}, "end_point": {"row": 112, "column": 26}}, {"id": 336, "type": "->", "text": ">p", "parent": 334, "children": [], "start_point": {"row": 112, "column": 26}, "end_point": {"row": 112, "column": 28}}, {"id": 337, "type": "field_identifier", "text": "wm ", "parent": 334, "children": [], "start_point": {"row": 112, "column": 28}, "end_point": {"row": 112, "column": 31}}, {"id": 338, "type": "function_definition", "text": "rr_t leddriver6_read_adc ( leddriver6_t *ctx, uint16_t *data_out )\r\n{\r\n uint8_t read_data[ 2 ];\r\n\r\n if ( i2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n *data_out = read_data[ 0 ];\r\n *data_out <<= 8;\r\n *data_out |= read_data[ 1 ];\r\n\r\n return LEDDRIVER6_OK;\r\n}\r", "parent": null, "children": [339, 340], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 129, "column": 1}}, {"id": 339, "type": "type_identifier", "text": "rr_t ", "parent": 338, "children": [], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 115, "column": 5}}, {"id": 340, "type": "function_declarator", "text": "eddriver6_read_adc ( leddriver6_t *ctx, uint16_t *data_out )\r", "parent": 338, "children": [341, 342], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 67}}, {"id": 341, "type": "identifier", "text": "eddriver6_read_adc ", "parent": 340, "children": [], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 25}}, {"id": 342, "type": "parameter_list", "text": " leddriver6_t *ctx, uint16_t *data_out )\r", "parent": 340, "children": [343, 348], "start_point": {"row": 115, "column": 26}, "end_point": {"row": 115, "column": 67}}, {"id": 343, "type": "parameter_declaration", "text": "eddriver6_t *ctx,", "parent": 342, "children": [344, 345], "start_point": {"row": 115, "column": 28}, "end_point": {"row": 115, "column": 45}}, {"id": 344, "type": "type_identifier", "text": "eddriver6_t ", "parent": 343, "children": [], "start_point": {"row": 115, "column": 28}, "end_point": {"row": 115, "column": 40}}, {"id": 345, "type": "pointer_declarator", "text": "ctx,", "parent": 343, "children": [346, 347], "start_point": {"row": 115, "column": 41}, "end_point": {"row": 115, "column": 45}}, {"id": 346, "type": "*", "text": "c", "parent": 345, "children": [], "start_point": {"row": 115, "column": 41}, "end_point": {"row": 115, "column": 42}}, {"id": 347, "type": "identifier", "text": "tx,", "parent": 345, "children": [], "start_point": {"row": 115, "column": 42}, "end_point": {"row": 115, "column": 45}}, {"id": 348, "type": "parameter_declaration", "text": "int16_t *data_out ", "parent": 342, "children": [349, 350], "start_point": {"row": 115, "column": 47}, "end_point": {"row": 115, "column": 65}}, {"id": 349, "type": "primitive_type", "text": "int16_t ", "parent": 348, "children": [], "start_point": {"row": 115, "column": 47}, "end_point": {"row": 115, "column": 55}}, {"id": 350, "type": "pointer_declarator", "text": "data_out ", "parent": 348, "children": [351, 352], "start_point": {"row": 115, "column": 56}, "end_point": {"row": 115, "column": 65}}, {"id": 351, "type": "*", "text": "d", "parent": 350, "children": [], "start_point": {"row": 115, "column": 56}, "end_point": {"row": 115, "column": 57}}, {"id": 352, "type": "identifier", "text": "ata_out ", "parent": 350, "children": [], "start_point": {"row": 115, "column": 57}, "end_point": {"row": 115, "column": 65}}, {"id": 353, "type": "declaration", "text": "int8_t read_data[ 2 ];\r", "parent": 338, "children": [354, 355], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 27}}, {"id": 354, "type": "primitive_type", "text": "int8_t ", "parent": 353, "children": [], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 11}}, {"id": 355, "type": "array_declarator", "text": "ead_data[ 2 ];", "parent": 353, "children": [356, 357], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 26}}, {"id": 356, "type": "identifier", "text": "ead_data[", "parent": 355, "children": [], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 21}}, {"id": 357, "type": "number_literal", "text": " ", "parent": 355, "children": [], "start_point": {"row": 117, "column": 23}, "end_point": {"row": 117, "column": 24}}, {"id": 358, "type": "if_statement", "text": "f ( i2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r", "parent": 338, "children": [359], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 122, "column": 5}}, {"id": 359, "type": "parenthesized_expression", "text": " i2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR )\r", "parent": 358, "children": [360], "start_point": {"row": 119, "column": 7}, "end_point": {"row": 119, "column": 73}}, {"id": 360, "type": "binary_expression", "text": "2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR ", "parent": 359, "children": [361, 372, 373], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 71}}, {"id": 361, "type": "call_expression", "text": "2c_master_read( &ctx->i2c, read_data, 2 ) ", "parent": 360, "children": [362, 363], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 51}}, {"id": 362, "type": "identifier", "text": "2c_master_read(", "parent": 361, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 24}}, {"id": 363, "type": "argument_list", "text": " &ctx->i2c, read_data, 2 ) ", "parent": 361, "children": [364, 370, 371], "start_point": {"row": 119, "column": 24}, "end_point": {"row": 119, "column": 51}}, {"id": 364, "type": "pointer_expression", "text": "ctx->i2c,", "parent": 363, "children": [365, 366], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 35}}, {"id": 365, "type": "&", "text": "c", "parent": 364, "children": [], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 27}}, {"id": 366, "type": "field_expression", "text": "tx->i2c,", "parent": 364, "children": [367, 368, 369], "start_point": {"row": 119, "column": 27}, "end_point": {"row": 119, "column": 35}}, {"id": 367, "type": "identifier", "text": "tx-", "parent": 366, "children": [], "start_point": {"row": 119, "column": 27}, "end_point": {"row": 119, "column": 30}}, {"id": 368, "type": "->", "text": ">i", "parent": 366, "children": [], "start_point": {"row": 119, "column": 30}, "end_point": {"row": 119, "column": 32}}, {"id": 369, "type": "field_identifier", "text": "2c,", "parent": 366, "children": [], "start_point": {"row": 119, "column": 32}, "end_point": {"row": 119, "column": 35}}, {"id": 370, "type": "identifier", "text": "ead_data,", "parent": 363, "children": [], "start_point": {"row": 119, "column": 37}, "end_point": {"row": 119, "column": 46}}, {"id": 371, "type": "number_literal", "text": " ", "parent": 363, "children": [], "start_point": {"row": 119, "column": 48}, "end_point": {"row": 119, "column": 49}}, {"id": 372, "type": "==", "text": "= ", "parent": 360, "children": [], "start_point": {"row": 119, "column": 52}, "end_point": {"row": 119, "column": 54}}, {"id": 373, "type": "identifier", "text": "2C_MASTER_ERROR ", "parent": 360, "children": [], "start_point": {"row": 119, "column": 55}, "end_point": {"row": 119, "column": 71}}, {"id": 374, "type": "return_statement", "text": "eturn LEDDRIVER6_INIT_ERROR;\r", "parent": 358, "children": [375], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 37}}, {"id": 375, "type": "identifier", "text": "EDDRIVER6_INIT_ERROR;", "parent": 374, "children": [], "start_point": {"row": 121, "column": 15}, "end_point": {"row": 121, "column": 36}}, {"id": 376, "type": "assignment_expression", "text": "data_out = read_data[ 0 ];", "parent": 338, "children": [377, 380, 381], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 30}}, {"id": 377, "type": "pointer_expression", "text": "data_out ", "parent": 376, "children": [378, 379], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 13}}, {"id": 378, "type": "*", "text": "d", "parent": 377, "children": [], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 5}}, {"id": 379, "type": "identifier", "text": "ata_out ", "parent": 377, "children": [], "start_point": {"row": 124, "column": 5}, "end_point": {"row": 124, "column": 13}}, {"id": 380, "type": "=", "text": " ", "parent": 376, "children": [], "start_point": {"row": 124, "column": 14}, "end_point": {"row": 124, "column": 15}}, {"id": 381, "type": "subscript_expression", "text": "ead_data[ 0 ];", "parent": 376, "children": [382, 383], "start_point": {"row": 124, "column": 16}, "end_point": {"row": 124, "column": 30}}, {"id": 382, "type": "identifier", "text": "ead_data[", "parent": 381, "children": [], "start_point": {"row": 124, "column": 16}, "end_point": {"row": 124, "column": 25}}, {"id": 383, "type": "number_literal", "text": " ", "parent": 381, "children": [], "start_point": {"row": 124, "column": 27}, "end_point": {"row": 124, "column": 28}}, {"id": 384, "type": "assignment_expression", "text": "data_out <<= 8;", "parent": 338, "children": [385, 388], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 19}}, {"id": 385, "type": "pointer_expression", "text": "data_out ", "parent": 384, "children": [386, 387], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 13}}, {"id": 386, "type": "*", "text": "d", "parent": 385, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 5}}, {"id": 387, "type": "identifier", "text": "ata_out ", "parent": 385, "children": [], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 13}}, {"id": 388, "type": "<<=", "text": "<= ", "parent": 384, "children": [], "start_point": {"row": 125, "column": 14}, "end_point": {"row": 125, "column": 17}}, {"id": 389, "type": "assignment_expression", "text": "data_out |= read_data[ 1 ];", "parent": 338, "children": [390, 393, 394], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 31}}, {"id": 390, "type": "pointer_expression", "text": "data_out ", "parent": 389, "children": [391, 392], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 13}}, {"id": 391, "type": "*", "text": "d", "parent": 390, "children": [], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 5}}, {"id": 392, "type": "identifier", "text": "ata_out ", "parent": 390, "children": [], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 13}}, {"id": 393, "type": "|=", "text": "= ", "parent": 389, "children": [], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 16}}, {"id": 394, "type": "subscript_expression", "text": "ead_data[ 1 ];", "parent": 389, "children": [395, 396], "start_point": {"row": 126, "column": 17}, "end_point": {"row": 126, "column": 31}}, {"id": 395, "type": "identifier", "text": "ead_data[", "parent": 394, "children": [], "start_point": {"row": 126, "column": 17}, "end_point": {"row": 126, "column": 26}}, {"id": 396, "type": "number_literal", "text": " ", "parent": 394, "children": [], "start_point": {"row": 126, "column": 28}, "end_point": {"row": 126, "column": 29}}, {"id": 397, "type": "return_statement", "text": "eturn LEDDRIVER6_OK;\r", "parent": 338, "children": [398], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 25}}, {"id": 398, "type": "identifier", "text": "EDDRIVER6_OK;", "parent": 397, "children": [], "start_point": {"row": 128, "column": 11}, "end_point": {"row": 128, "column": 24}}, {"id": 399, "type": "function_definition", "text": "rr_t leddriver6_get_pg_voltage ( leddriver6_t *ctx, float *data_out )\r\n{\r\n uint16_t adc_data;\r\n\r\n if ( leddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n *data_out = (float)adc_data / LEDDRIVER6_ADC_RES * LEDDRIVER6_ADC_VREF;\r\n\r\n return LEDDRIVER6_OK;\r\n}\r", "parent": null, "children": [400, 401], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 143, "column": 1}}, {"id": 400, "type": "type_identifier", "text": "rr_t ", "parent": 399, "children": [], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 131, "column": 5}}, {"id": 401, "type": "function_declarator", "text": "eddriver6_get_pg_voltage ( leddriver6_t *ctx, float *data_out )\r", "parent": 399, "children": [402, 403], "start_point": {"row": 131, "column": 6}, "end_point": {"row": 131, "column": 70}}, {"id": 402, "type": "identifier", "text": "eddriver6_get_pg_voltage ", "parent": 401, "children": [], "start_point": {"row": 131, "column": 6}, "end_point": {"row": 131, "column": 31}}, {"id": 403, "type": "parameter_list", "text": " leddriver6_t *ctx, float *data_out )\r", "parent": 401, "children": [404, 409], "start_point": {"row": 131, "column": 32}, "end_point": {"row": 131, "column": 70}}, {"id": 404, "type": "parameter_declaration", "text": "eddriver6_t *ctx,", "parent": 403, "children": [405, 406], "start_point": {"row": 131, "column": 34}, "end_point": {"row": 131, "column": 51}}, {"id": 405, "type": "type_identifier", "text": "eddriver6_t ", "parent": 404, "children": [], "start_point": {"row": 131, "column": 34}, "end_point": {"row": 131, "column": 46}}, {"id": 406, "type": "pointer_declarator", "text": "ctx,", "parent": 404, "children": [407, 408], "start_point": {"row": 131, "column": 47}, "end_point": {"row": 131, "column": 51}}, {"id": 407, "type": "*", "text": "c", "parent": 406, "children": [], "start_point": {"row": 131, "column": 47}, "end_point": {"row": 131, "column": 48}}, {"id": 408, "type": "identifier", "text": "tx,", "parent": 406, "children": [], "start_point": {"row": 131, "column": 48}, "end_point": {"row": 131, "column": 51}}, {"id": 409, "type": "parameter_declaration", "text": "loat *data_out ", "parent": 403, "children": [410, 411], "start_point": {"row": 131, "column": 53}, "end_point": {"row": 131, "column": 68}}, {"id": 410, "type": "primitive_type", "text": "loat ", "parent": 409, "children": [], "start_point": {"row": 131, "column": 53}, "end_point": {"row": 131, "column": 58}}, {"id": 411, "type": "pointer_declarator", "text": "data_out ", "parent": 409, "children": [412, 413], "start_point": {"row": 131, "column": 59}, "end_point": {"row": 131, "column": 68}}, {"id": 412, "type": "*", "text": "d", "parent": 411, "children": [], "start_point": {"row": 131, "column": 59}, "end_point": {"row": 131, "column": 60}}, {"id": 413, "type": "identifier", "text": "ata_out ", "parent": 411, "children": [], "start_point": {"row": 131, "column": 60}, "end_point": {"row": 131, "column": 68}}, {"id": 414, "type": "declaration", "text": "int16_t adc_data;\r", "parent": 399, "children": [415, 416], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 22}}, {"id": 415, "type": "primitive_type", "text": "int16_t ", "parent": 414, "children": [], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 12}}, {"id": 416, "type": "identifier", "text": "dc_data;", "parent": 414, "children": [], "start_point": {"row": 133, "column": 13}, "end_point": {"row": 133, "column": 21}}, {"id": 417, "type": "if_statement", "text": "f ( leddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r", "parent": 399, "children": [418], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 138, "column": 5}}, {"id": 418, "type": "parenthesized_expression", "text": " leddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR )\r", "parent": 417, "children": [419], "start_point": {"row": 135, "column": 7}, "end_point": {"row": 135, "column": 73}}, {"id": 419, "type": "binary_expression", "text": "eddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR ", "parent": 418, "children": [420, 427, 428], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 71}}, {"id": 420, "type": "call_expression", "text": "eddriver6_read_adc( ctx, &adc_data ) ", "parent": 419, "children": [421, 422], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 46}}, {"id": 421, "type": "identifier", "text": "eddriver6_read_adc(", "parent": 420, "children": [], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 28}}, {"id": 422, "type": "argument_list", "text": " ctx, &adc_data ) ", "parent": 420, "children": [423, 424], "start_point": {"row": 135, "column": 28}, "end_point": {"row": 135, "column": 46}}, {"id": 423, "type": "identifier", "text": "tx,", "parent": 422, "children": [], "start_point": {"row": 135, "column": 30}, "end_point": {"row": 135, "column": 33}}, {"id": 424, "type": "pointer_expression", "text": "adc_data ", "parent": 422, "children": [425, 426], "start_point": {"row": 135, "column": 35}, "end_point": {"row": 135, "column": 44}}, {"id": 425, "type": "&", "text": "a", "parent": 424, "children": [], "start_point": {"row": 135, "column": 35}, "end_point": {"row": 135, "column": 36}}, {"id": 426, "type": "identifier", "text": "dc_data ", "parent": 424, "children": [], "start_point": {"row": 135, "column": 36}, "end_point": {"row": 135, "column": 44}}, {"id": 427, "type": "==", "text": "= ", "parent": 419, "children": [], "start_point": {"row": 135, "column": 47}, "end_point": {"row": 135, "column": 49}}, {"id": 428, "type": "identifier", "text": "EDDRIVER6_INIT_ERROR ", "parent": 419, "children": [], "start_point": {"row": 135, "column": 50}, "end_point": {"row": 135, "column": 71}}, {"id": 429, "type": "return_statement", "text": "eturn LEDDRIVER6_INIT_ERROR;\r", "parent": 417, "children": [430], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 37}}, {"id": 430, "type": "identifier", "text": "EDDRIVER6_INIT_ERROR;", "parent": 429, "children": [], "start_point": {"row": 137, "column": 15}, "end_point": {"row": 137, "column": 36}}, {"id": 431, "type": "assignment_expression", "text": "data_out = (float)adc_data / LEDDRIVER6_ADC_RES * LEDDRIVER6_ADC_VREF;", "parent": 399, "children": [432, 435, 436], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 74}}, {"id": 432, "type": "pointer_expression", "text": "data_out ", "parent": 431, "children": [433, 434], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 13}}, {"id": 433, "type": "*", "text": "d", "parent": 432, "children": [], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 5}}, {"id": 434, "type": "identifier", "text": "ata_out ", "parent": 432, "children": [], "start_point": {"row": 140, "column": 5}, "end_point": {"row": 140, "column": 13}}, {"id": 435, "type": "=", "text": " ", "parent": 431, "children": [], "start_point": {"row": 140, "column": 14}, "end_point": {"row": 140, "column": 15}}, {"id": 436, "type": "binary_expression", "text": "float)adc_data / LEDDRIVER6_ADC_RES * LEDDRIVER6_ADC_VREF;", "parent": 431, "children": [437, 444, 445], "start_point": {"row": 140, "column": 16}, "end_point": {"row": 140, "column": 74}}, {"id": 437, "type": "binary_expression", "text": "float)adc_data / LEDDRIVER6_ADC_RES ", "parent": 436, "children": [438, 442, 443], "start_point": {"row": 140, "column": 16}, "end_point": {"row": 140, "column": 52}}, {"id": 438, "type": "cast_expression", "text": "float)adc_data ", "parent": 437, "children": [439, 441], "start_point": {"row": 140, "column": 16}, "end_point": {"row": 140, "column": 31}}, {"id": 439, "type": "type_descriptor", "text": "loat)", "parent": 438, "children": [440], "start_point": {"row": 140, "column": 17}, "end_point": {"row": 140, "column": 22}}, {"id": 440, "type": "primitive_type", "text": "loat)", "parent": 439, "children": [], "start_point": {"row": 140, "column": 17}, "end_point": {"row": 140, "column": 22}}, {"id": 441, "type": "identifier", "text": "dc_data ", "parent": 438, "children": [], "start_point": {"row": 140, "column": 23}, "end_point": {"row": 140, "column": 31}}, {"id": 442, "type": "/", "text": " ", "parent": 437, "children": [], "start_point": {"row": 140, "column": 32}, "end_point": {"row": 140, "column": 33}}, {"id": 443, "type": "identifier", "text": "EDDRIVER6_ADC_RES ", "parent": 437, "children": [], "start_point": {"row": 140, "column": 34}, "end_point": {"row": 140, "column": 52}}, {"id": 444, "type": "*", "text": " ", "parent": 436, "children": [], "start_point": {"row": 140, "column": 53}, "end_point": {"row": 140, "column": 54}}, {"id": 445, "type": "identifier", "text": "EDDRIVER6_ADC_VREF;", "parent": 436, "children": [], "start_point": {"row": 140, "column": 55}, "end_point": {"row": 140, "column": 74}}, {"id": 446, "type": "return_statement", "text": "eturn LEDDRIVER6_OK;\r", "parent": 399, "children": [447], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 25}}, {"id": 447, "type": "identifier", "text": "EDDRIVER6_OK;", "parent": 446, "children": [], "start_point": {"row": 142, "column": 11}, "end_point": {"row": 142, "column": 24}}, {"id": 448, "type": "function_definition", "text": "int8_t leddriver6_get_interrupt_state ( leddriver6_t *ctx )\r\n{\r\n return digital_in_read( &ctx->int_pin );\r\n}\r", "parent": null, "children": [449, 450], "start_point": {"row": 145, "column": 0}, "end_point": {"row": 148, "column": 1}}, {"id": 449, "type": "primitive_type", "text": "int8_t ", "parent": 448, "children": [], "start_point": {"row": 145, "column": 0}, "end_point": {"row": 145, "column": 7}}, {"id": 450, "type": "function_declarator", "text": "eddriver6_get_interrupt_state ( leddriver6_t *ctx )\r", "parent": 448, "children": [451, 452], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 60}}, {"id": 451, "type": "identifier", "text": "eddriver6_get_interrupt_state ", "parent": 450, "children": [], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 38}}, {"id": 452, "type": "parameter_list", "text": " leddriver6_t *ctx )\r", "parent": 450, "children": [453], "start_point": {"row": 145, "column": 39}, "end_point": {"row": 145, "column": 60}}, {"id": 453, "type": "parameter_declaration", "text": "eddriver6_t *ctx ", "parent": 452, "children": [454, 455], "start_point": {"row": 145, "column": 41}, "end_point": {"row": 145, "column": 58}}, {"id": 454, "type": "type_identifier", "text": "eddriver6_t ", "parent": 453, "children": [], "start_point": {"row": 145, "column": 41}, "end_point": {"row": 145, "column": 53}}, {"id": 455, "type": "pointer_declarator", "text": "ctx ", "parent": 453, "children": [456, 457], "start_point": {"row": 145, "column": 54}, "end_point": {"row": 145, "column": 58}}, {"id": 456, "type": "*", "text": "c", "parent": 455, "children": [], "start_point": {"row": 145, "column": 54}, "end_point": {"row": 145, "column": 55}}, {"id": 457, "type": "identifier", "text": "tx ", "parent": 455, "children": [], "start_point": {"row": 145, "column": 55}, "end_point": {"row": 145, "column": 58}}, {"id": 458, "type": "return_statement", "text": "eturn digital_in_read( &ctx->int_pin );\r", "parent": 448, "children": [459], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 44}}, {"id": 459, "type": "call_expression", "text": "igital_in_read( &ctx->int_pin );", "parent": 458, "children": [460, 461], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 43}}, {"id": 460, "type": "identifier", "text": "igital_in_read(", "parent": 459, "children": [], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 26}}, {"id": 461, "type": "argument_list", "text": " &ctx->int_pin );", "parent": 459, "children": [462], "start_point": {"row": 147, "column": 26}, "end_point": {"row": 147, "column": 43}}, {"id": 462, "type": "pointer_expression", "text": "ctx->int_pin ", "parent": 461, "children": [463, 464], "start_point": {"row": 147, "column": 28}, "end_point": {"row": 147, "column": 41}}, {"id": 463, "type": "&", "text": "c", "parent": 462, "children": [], "start_point": {"row": 147, "column": 28}, "end_point": {"row": 147, "column": 29}}, {"id": 464, "type": "field_expression", "text": "tx->int_pin ", "parent": 462, "children": [465, 466, 467], "start_point": {"row": 147, "column": 29}, "end_point": {"row": 147, "column": 41}}, {"id": 465, "type": "identifier", "text": "tx-", "parent": 464, "children": [], "start_point": {"row": 147, "column": 29}, "end_point": {"row": 147, "column": 32}}, {"id": 466, "type": "->", "text": ">i", "parent": 464, "children": [], "start_point": {"row": 147, "column": 32}, "end_point": {"row": 147, "column": 34}}, {"id": 467, "type": "field_identifier", "text": "nt_pin ", "parent": 464, "children": [], "start_point": {"row": 147, "column": 34}, "end_point": {"row": 147, "column": 41}}]}, "node_categories": {"declarations": {"functions": [15, 17, 74, 76, 274, 276, 298, 300, 318, 320, 338, 340, 399, 401, 448, 450], "variables": [20, 79, 84, 89, 156, 279, 284, 303, 323, 343, 348, 353, 404, 409, 414, 453], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [26, 33, 40, 47, 54, 61, 68, 92, 95, 99, 103, 108, 113, 118, 119, 120, 123, 125, 129, 137, 138, 139, 142, 144, 148, 159, 162, 166, 170, 175, 179, 184, 189, 194, 195, 196, 199, 201, 205, 213, 214, 215, 218, 220, 224, 233, 234, 235, 238, 240, 244, 253, 254, 255, 258, 260, 264, 288, 291, 293, 309, 312, 314, 329, 332, 334, 359, 360, 361, 364, 366, 377, 381, 385, 390, 394, 418, 419, 420, 424, 432, 436, 437, 438, 459, 462, 464], "assignments": [25, 32, 39, 46, 53, 60, 67, 98, 107, 165, 174, 183, 376, 384, 389, 431], "loops": [], "conditionals": [5, 9, 13, 18, 21, 24, 27, 29, 31, 34, 36, 38, 41, 43, 45, 48, 50, 52, 55, 57, 59, 62, 64, 66, 69, 71, 73, 75, 77, 80, 83, 85, 88, 90, 91, 93, 97, 100, 101, 104, 106, 109, 111, 114, 116, 117, 121, 126, 128, 131, 133, 135, 136, 140, 145, 147, 149, 151, 153, 155, 157, 158, 160, 164, 167, 168, 171, 173, 176, 177, 180, 182, 185, 187, 190, 192, 193, 197, 202, 204, 207, 209, 211, 212, 216, 221, 223, 225, 227, 229, 231, 232, 236, 241, 243, 245, 247, 249, 251, 252, 256, 261, 263, 265, 267, 269, 271, 273, 275, 277, 280, 283, 286, 289, 294, 296, 297, 299, 301, 304, 307, 310, 315, 317, 319, 321, 324, 327, 330, 335, 337, 339, 341, 344, 347, 352, 356, 358, 362, 367, 369, 370, 373, 375, 379, 382, 387, 392, 395, 398, 400, 402, 405, 408, 413, 416, 417, 421, 423, 426, 428, 430, 434, 441, 443, 445, 447, 451, 454, 457, 460, 465, 467], "returns": [134, 154, 210, 230, 250, 270, 272, 287, 308, 328, 374, 397, 429, 446, 458], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 357, 371, 383, 396], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "unknown", "text_snippet": "oid leddriver6_cfg_setup ( leddriver6_cfg_t *cfg )\r\n{\r\n cfg->pwm = HAL_PIN_NC;\r\n cfg->scl "}, {"node_id": 17, "universal_type": "function", "name": "unknown", "text_snippet": "eddriver6_cfg_setup ( leddriver6_cfg_t *cfg )\r"}, {"node_id": 74, "universal_type": "function", "name": "unknown", "text_snippet": "rr_t leddriver6_init ( leddriver6_t *ctx, leddriver6_cfg_t *cfg )\r\n{\r\n pwm_config_t pwm_cfg;\r\n\r\n "}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "eddriver6_init ( leddriver6_t *ctx, leddriver6_cfg_t *cfg )\r"}, {"node_id": 274, "universal_type": "function", "name": "unknown", "text_snippet": "rr_t leddriver6_set_duty_cycle ( leddriver6_t *ctx, float duty_cycle )\r\n{\r\n return pwm_set_duty( "}, {"node_id": 276, "universal_type": "function", "name": "unknown", "text_snippet": "eddriver6_set_duty_cycle ( leddriver6_t *ctx, float duty_cycle )\r"}, {"node_id": 298, "universal_type": "function", "name": "unknown", "text_snippet": "rr_t leddriver6_pwm_stop ( leddriver6_t *ctx )\r\n{\r\n return pwm_stop( &ctx->pwm );\r\n}\r"}, {"node_id": 300, "universal_type": "function", "name": "unknown", "text_snippet": "eddriver6_pwm_stop ( leddriver6_t *ctx )\r"}, {"node_id": 318, "universal_type": "function", "name": "unknown", "text_snippet": "rr_t leddriver6_pwm_start ( leddriver6_t *ctx )\r\n{\r\n return pwm_start( &ctx->pwm );\r\n}\r"}, {"node_id": 320, "universal_type": "function", "name": "unknown", "text_snippet": "eddriver6_pwm_start ( leddriver6_t *ctx )\r"}, {"node_id": 338, "universal_type": "function", "name": "unknown", "text_snippet": "rr_t leddriver6_read_adc ( leddriver6_t *ctx, uint16_t *data_out )\r\n{\r\n uint8_t read_data[ 2 ];\r\n"}, {"node_id": 340, "universal_type": "function", "name": "unknown", "text_snippet": "eddriver6_read_adc ( leddriver6_t *ctx, uint16_t *data_out )\r"}, {"node_id": 399, "universal_type": "function", "name": "unknown", "text_snippet": "rr_t leddriver6_get_pg_voltage ( leddriver6_t *ctx, float *data_out )\r\n{\r\n uint16_t adc_data;\r\n\r\n"}, {"node_id": 401, "universal_type": "function", "name": "unknown", "text_snippet": "eddriver6_get_pg_voltage ( leddriver6_t *ctx, float *data_out )\r"}, {"node_id": 448, "universal_type": "function", "name": "unknown", "text_snippet": "int8_t leddriver6_get_interrupt_state ( leddriver6_t *ctx )\r\n{\r\n return digital_in_read( &ctx->in"}, {"node_id": 450, "universal_type": "function", "name": "unknown", "text_snippet": "eddriver6_get_interrupt_state ( leddriver6_t *ctx )\r"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "include \"leddriver6.h\"\r\n\r"}, {"node_id": 1, "text": "include "}]}, "original_source_code": "/*\r\n * MikroSDK - MikroE Software Development Kit\r\n * Copyright\u00a9 2020 MikroElektronika d.o.o.\r\n * \r\n * Permission is hereby granted, free of charge, to any person \r\n * obtaining a copy of this software and associated documentation \r\n * files (the \"Software\"), to deal in the Software without restriction, \r\n * including without limitation the rights to use, copy, modify, merge, \r\n * publish, distribute, sublicense, and/or sell copies of the Software, \r\n * and to permit persons to whom the Software is furnished to do so, \r\n * subject to the following conditions:\r\n * \r\n * The above copyright notice and this permission notice shall be \r\n * included in all copies or substantial portions of the Software.\r\n * \r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, \r\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. \r\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\r\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, \r\n * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE \r\n * OR OTHER DEALINGS IN THE SOFTWARE. \r\n */\r\n\r\n/*!\r\n * \\file\r\n *\r\n */\r\n\r\n#include \"leddriver6.h\"\r\n\r\n#define LEDDRIVER6_SLAVE_ADDR 0x4D\r\n\r\n#define LEDDRIVER6_ADC_RES 4096\r\n#define LEDDRIVER6_ADC_VREF 3.3\r\n\r\nvoid leddriver6_cfg_setup ( leddriver6_cfg_t *cfg )\r\n{\r\n cfg->pwm = HAL_PIN_NC;\r\n cfg->scl = HAL_PIN_NC;\r\n cfg->sda = HAL_PIN_NC;\r\n cfg->int_pin = HAL_PIN_NC;\r\n\r\n cfg->dev_pwm_freq = LEDDRIVER6_DEF_FREQ;\r\n cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;\r\n cfg->i2c_address = LEDDRIVER6_SLAVE_ADDR;\r\n}\r\n\r\nerr_t leddriver6_init ( leddriver6_t *ctx, leddriver6_cfg_t *cfg )\r\n{\r\n pwm_config_t pwm_cfg;\r\n\r\n pwm_configure_default( &pwm_cfg );\r\n\r\n pwm_cfg.pin = cfg->pwm;\r\n\r\n ctx->pwm_freq = cfg->dev_pwm_freq;\r\n\r\n if ( pwm_open( &ctx->pwm, &pwm_cfg ) == PWM_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n if ( pwm_set_freq( &ctx->pwm, cfg->dev_pwm_freq ) == PWM_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n i2c_master_config_t i2c_cfg;\r\n\r\n i2c_master_configure_default( &i2c_cfg );\r\n\r\n i2c_cfg.scl = cfg->scl;\r\n i2c_cfg.sda = cfg->sda;\r\n\r\n ctx->slave_address = cfg->i2c_address;\r\n\r\n if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n if ( i2c_master_set_slave_address( &ctx->i2c, cfg->i2c_address ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n if ( i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n if ( digital_in_init( &ctx->int_pin, cfg->int_pin ) == DIGITAL_IN_UNSUPPORTED_PIN )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n return LEDDRIVER6_OK;\r\n}\r\n\r\nerr_t leddriver6_set_duty_cycle ( leddriver6_t *ctx, float duty_cycle )\r\n{\r\n return pwm_set_duty( &ctx->pwm, duty_cycle );\r\n}\r\n\r\nerr_t leddriver6_pwm_stop ( leddriver6_t *ctx )\r\n{\r\n return pwm_stop( &ctx->pwm );\r\n}\r\n\r\nerr_t leddriver6_pwm_start ( leddriver6_t *ctx )\r\n{\r\n return pwm_start( &ctx->pwm );\r\n}\r\n\r\nerr_t leddriver6_read_adc ( leddriver6_t *ctx, uint16_t *data_out )\r\n{\r\n uint8_t read_data[ 2 ];\r\n\r\n if ( i2c_master_read( &ctx->i2c, read_data, 2 ) == I2C_MASTER_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n *data_out = read_data[ 0 ];\r\n *data_out <<= 8;\r\n *data_out |= read_data[ 1 ];\r\n\r\n return LEDDRIVER6_OK;\r\n}\r\n\r\nerr_t leddriver6_get_pg_voltage ( leddriver6_t *ctx, float *data_out )\r\n{\r\n uint16_t adc_data;\r\n\r\n if ( leddriver6_read_adc( ctx, &adc_data ) == LEDDRIVER6_INIT_ERROR )\r\n {\r\n return LEDDRIVER6_INIT_ERROR;\r\n }\r\n\r\n *data_out = (float)adc_data / LEDDRIVER6_ADC_RES * LEDDRIVER6_ADC_VREF;\r\n\r\n return LEDDRIVER6_OK;\r\n}\r\n\r\nuint8_t leddriver6_get_interrupt_state ( leddriver6_t *ctx )\r\n{\r\n return digital_in_read( &ctx->int_pin );\r\n}\r\n\r\n// ------------------------------------------------------------------------ END\r\n"}
307
c
#include "triangle_helper.h" #include "triangle_internal.h" int triangle_check_context(context* ctx) { if (ctx == NULL) { return TRI_FAILURE; } if (ctx->b == NULL || ctx->m == NULL) { return TRI_FAILURE; } return TRI_OK; } int triangle_check_behavior(behavior* b) { if (b->fixedarea && b->maxarea <= 0.0) { return TRI_OPTIONS; } return TRI_OK; } int triangle_check_triangleio(triangleio* io, int firstnumber) { int i; int a, b, c; REAL x1, y1, x2, y2; int invertices = io->numberofpoints; int insegments = io->numberofsegments; int inelements = io->numberoftriangles; int corners = io->numberofcorners; for (i = 0; i < insegments; i++) { a = io->segmentlist[2 * i]; b = io->segmentlist[2 * i + 1]; if ((a < firstnumber) || (a >= firstnumber + invertices)) { // TODO: Warning: Invalid first endpoint of segment (firstnumber + i). return TRI_FAILURE; } else if ((b < firstnumber) || (b >= firstnumber + invertices)) { // TODO: Warning: Invalid second endpoint of segment (firstnumber + i). return TRI_FAILURE; } else if (a == b) { // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident. return TRI_FAILURE; } else { x1 = io->pointlist[2 * a]; x2 = io->pointlist[2 * a + 1]; y1 = io->pointlist[2 * b]; y2 = io->pointlist[2 * b + 1]; if ((x1 == x2) && (y1 == y2)) { // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident. return TRI_FAILURE; } } } for (i = 0; i < inelements; i++) { a = io->trianglelist[corners * i]; b = io->trianglelist[corners * i + 1]; c = io->trianglelist[corners * i + 2]; if ((a < firstnumber) || (a >= firstnumber + invertices) || (b < firstnumber) || (b >= firstnumber + invertices) || (c < firstnumber) || (c >= firstnumber + invertices)) { // TODO: Error: Triangle (i) has an invalid vertex index. return TRI_FAILURE; } } return TRI_OK; } void triangle_restore_pointmarkers(context* ctx, int *pointmarkers) { mesh *m; behavior *b; vertex vertexloop; int vertexnumber; m = ctx->m; b = ctx->b; traversalinit(&m->vertices); vertexnumber = 0; vertexloop = vertextraverse(m); while (vertexloop != (vertex)NULL) { if (!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)) { setvertexmark(vertexloop, pointmarkers[vertexnumber]); vertexnumber++; } vertexloop = vertextraverse(m); } }
27.57
83
(translation_unit) "#include "triangle_helper.h"\n#include "triangle_internal.h"\n\nint triangle_check_context(context* ctx)\n{\n if (ctx == NULL) {\n return TRI_FAILURE;\n }\n if (ctx->b == NULL || ctx->m == NULL) {\n return TRI_FAILURE;\n }\n\n return TRI_OK;\n}\n\nint triangle_check_behavior(behavior* b)\n{\n if (b->fixedarea && b->maxarea <= 0.0) {\n return TRI_OPTIONS;\n }\n return TRI_OK;\n}\n\nint triangle_check_triangleio(triangleio* io, int firstnumber)\n{\n int i;\n int a, b, c;\n REAL x1, y1, x2, y2;\n\n int invertices = io->numberofpoints;\n int insegments = io->numberofsegments;\n int inelements = io->numberoftriangles;\n int corners = io->numberofcorners;\n\n for (i = 0; i < insegments; i++) {\n a = io->segmentlist[2 * i];\n b = io->segmentlist[2 * i + 1];\n if ((a < firstnumber) || (a >= firstnumber + invertices)) {\n // TODO: Warning: Invalid first endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n // TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if (a == b) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n } else {\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }\n }\n\n for (i = 0; i < inelements; i++) {\n a = io->trianglelist[corners * i];\n b = io->trianglelist[corners * i + 1];\n c = io->trianglelist[corners * i + 2];\n\n if ((a < firstnumber) || (a >= firstnumber + invertices) ||\n (b < firstnumber) || (b >= firstnumber + invertices) ||\n (c < firstnumber) || (c >= firstnumber + invertices)) {\n // TODO: Error: Triangle (i) has an invalid vertex index.\n return TRI_FAILURE;\n }\n }\n\n return TRI_OK;\n}\n\nvoid triangle_restore_pointmarkers(context* ctx, int *pointmarkers)\n{\n mesh *m;\n behavior *b;\n vertex vertexloop;\n int vertexnumber;\n\n m = ctx->m;\n b = ctx->b;\n\n traversalinit(&m->vertices);\n vertexnumber = 0;\n vertexloop = vertextraverse(m);\n while (vertexloop != (vertex)NULL) {\n if (!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)) {\n setvertexmark(vertexloop, pointmarkers[vertexnumber]);\n vertexnumber++;\n }\n vertexloop = vertextraverse(m);\n }\n}\n" (preproc_include) "#include "triangle_helper.h"\n" (#include) "#include" (string_literal) ""triangle_helper.h"" (") """ (string_content) "triangle_helper.h" (") """ (preproc_include) "#include "triangle_internal.h"\n" (#include) "#include" (string_literal) ""triangle_internal.h"" (") """ (string_content) "triangle_internal.h" (") """ (function_definition) "int triangle_check_context(context* ctx)\n{\n if (ctx == NULL) {\n return TRI_FAILURE;\n }\n if (ctx->b == NULL || ctx->m == NULL) {\n return TRI_FAILURE;\n }\n\n return TRI_OK;\n}" (primitive_type) "int" (function_declarator) "triangle_check_context(context* ctx)" (identifier) "triangle_check_context" (parameter_list) "(context* ctx)" (() "(" (parameter_declaration) "context* ctx" (type_identifier) "context" (pointer_declarator) "* ctx" (*) "*" (identifier) "ctx" ()) ")" (compound_statement) "{\n if (ctx == NULL) {\n return TRI_FAILURE;\n }\n if (ctx->b == NULL || ctx->m == NULL) {\n return TRI_FAILURE;\n }\n\n return TRI_OK;\n}" ({) "{" (if_statement) "if (ctx == NULL) {\n return TRI_FAILURE;\n }" (if) "if" (parenthesized_expression) "(ctx == NULL)" (() "(" (binary_expression) "ctx == NULL" (identifier) "ctx" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n return TRI_FAILURE;\n }" ({) "{" (return_statement) "return TRI_FAILURE;" (return) "return" (identifier) "TRI_FAILURE" (;) ";" (}) "}" (if_statement) "if (ctx->b == NULL || ctx->m == NULL) {\n return TRI_FAILURE;\n }" (if) "if" (parenthesized_expression) "(ctx->b == NULL || ctx->m == NULL)" (() "(" (binary_expression) "ctx->b == NULL || ctx->m == NULL" (binary_expression) "ctx->b == NULL" (field_expression) "ctx->b" (identifier) "ctx" (->) "->" (field_identifier) "b" (==) "==" (null) "NULL" (NULL) "NULL" (||) "||" (binary_expression) "ctx->m == NULL" (field_expression) "ctx->m" (identifier) "ctx" (->) "->" (field_identifier) "m" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n return TRI_FAILURE;\n }" ({) "{" (return_statement) "return TRI_FAILURE;" (return) "return" (identifier) "TRI_FAILURE" (;) ";" (}) "}" (return_statement) "return TRI_OK;" (return) "return" (identifier) "TRI_OK" (;) ";" (}) "}" (function_definition) "int triangle_check_behavior(behavior* b)\n{\n if (b->fixedarea && b->maxarea <= 0.0) {\n return TRI_OPTIONS;\n }\n return TRI_OK;\n}" (primitive_type) "int" (function_declarator) "triangle_check_behavior(behavior* b)" (identifier) "triangle_check_behavior" (parameter_list) "(behavior* b)" (() "(" (parameter_declaration) "behavior* b" (type_identifier) "behavior" (pointer_declarator) "* b" (*) "*" (identifier) "b" ()) ")" (compound_statement) "{\n if (b->fixedarea && b->maxarea <= 0.0) {\n return TRI_OPTIONS;\n }\n return TRI_OK;\n}" ({) "{" (if_statement) "if (b->fixedarea && b->maxarea <= 0.0) {\n return TRI_OPTIONS;\n }" (if) "if" (parenthesized_expression) "(b->fixedarea && b->maxarea <= 0.0)" (() "(" (binary_expression) "b->fixedarea && b->maxarea <= 0.0" (field_expression) "b->fixedarea" (identifier) "b" (->) "->" (field_identifier) "fixedarea" (&&) "&&" (binary_expression) "b->maxarea <= 0.0" (field_expression) "b->maxarea" (identifier) "b" (->) "->" (field_identifier) "maxarea" (<=) "<=" (number_literal) "0.0" ()) ")" (compound_statement) "{\n return TRI_OPTIONS;\n }" ({) "{" (return_statement) "return TRI_OPTIONS;" (return) "return" (identifier) "TRI_OPTIONS" (;) ";" (}) "}" (return_statement) "return TRI_OK;" (return) "return" (identifier) "TRI_OK" (;) ";" (}) "}" (function_definition) "int triangle_check_triangleio(triangleio* io, int firstnumber)\n{\n int i;\n int a, b, c;\n REAL x1, y1, x2, y2;\n\n int invertices = io->numberofpoints;\n int insegments = io->numberofsegments;\n int inelements = io->numberoftriangles;\n int corners = io->numberofcorners;\n\n for (i = 0; i < insegments; i++) {\n a = io->segmentlist[2 * i];\n b = io->segmentlist[2 * i + 1];\n if ((a < firstnumber) || (a >= firstnumber + invertices)) {\n // TODO: Warning: Invalid first endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n // TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if (a == b) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n } else {\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }\n }\n\n for (i = 0; i < inelements; i++) {\n a = io->trianglelist[corners * i];\n b = io->trianglelist[corners * i + 1];\n c = io->trianglelist[corners * i + 2];\n\n if ((a < firstnumber) || (a >= firstnumber + invertices) ||\n (b < firstnumber) || (b >= firstnumber + invertices) ||\n (c < firstnumber) || (c >= firstnumber + invertices)) {\n // TODO: Error: Triangle (i) has an invalid vertex index.\n return TRI_FAILURE;\n }\n }\n\n return TRI_OK;\n}" (primitive_type) "int" (function_declarator) "triangle_check_triangleio(triangleio* io, int firstnumber)" (identifier) "triangle_check_triangleio" (parameter_list) "(triangleio* io, int firstnumber)" (() "(" (parameter_declaration) "triangleio* io" (type_identifier) "triangleio" (pointer_declarator) "* io" (*) "*" (identifier) "io" (,) "," (parameter_declaration) "int firstnumber" (primitive_type) "int" (identifier) "firstnumber" ()) ")" (compound_statement) "{\n int i;\n int a, b, c;\n REAL x1, y1, x2, y2;\n\n int invertices = io->numberofpoints;\n int insegments = io->numberofsegments;\n int inelements = io->numberoftriangles;\n int corners = io->numberofcorners;\n\n for (i = 0; i < insegments; i++) {\n a = io->segmentlist[2 * i];\n b = io->segmentlist[2 * i + 1];\n if ((a < firstnumber) || (a >= firstnumber + invertices)) {\n // TODO: Warning: Invalid first endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n // TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if (a == b) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n } else {\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }\n }\n\n for (i = 0; i < inelements; i++) {\n a = io->trianglelist[corners * i];\n b = io->trianglelist[corners * i + 1];\n c = io->trianglelist[corners * i + 2];\n\n if ((a < firstnumber) || (a >= firstnumber + invertices) ||\n (b < firstnumber) || (b >= firstnumber + invertices) ||\n (c < firstnumber) || (c >= firstnumber + invertices)) {\n // TODO: Error: Triangle (i) has an invalid vertex index.\n return TRI_FAILURE;\n }\n }\n\n return TRI_OK;\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (declaration) "int a, b, c;" (primitive_type) "int" (identifier) "a" (,) "," (identifier) "b" (,) "," (identifier) "c" (;) ";" (declaration) "REAL x1, y1, x2, y2;" (type_identifier) "REAL" (identifier) "x1" (,) "," (identifier) "y1" (,) "," (identifier) "x2" (,) "," (identifier) "y2" (;) ";" (declaration) "int invertices = io->numberofpoints;" (primitive_type) "int" (init_declarator) "invertices = io->numberofpoints" (identifier) "invertices" (=) "=" (field_expression) "io->numberofpoints" (identifier) "io" (->) "->" (field_identifier) "numberofpoints" (;) ";" (declaration) "int insegments = io->numberofsegments;" (primitive_type) "int" (init_declarator) "insegments = io->numberofsegments" (identifier) "insegments" (=) "=" (field_expression) "io->numberofsegments" (identifier) "io" (->) "->" (field_identifier) "numberofsegments" (;) ";" (declaration) "int inelements = io->numberoftriangles;" (primitive_type) "int" (init_declarator) "inelements = io->numberoftriangles" (identifier) "inelements" (=) "=" (field_expression) "io->numberoftriangles" (identifier) "io" (->) "->" (field_identifier) "numberoftriangles" (;) ";" (declaration) "int corners = io->numberofcorners;" (primitive_type) "int" (init_declarator) "corners = io->numberofcorners" (identifier) "corners" (=) "=" (field_expression) "io->numberofcorners" (identifier) "io" (->) "->" (field_identifier) "numberofcorners" (;) ";" (for_statement) "for (i = 0; i < insegments; i++) {\n a = io->segmentlist[2 * i];\n b = io->segmentlist[2 * i + 1];\n if ((a < firstnumber) || (a >= firstnumber + invertices)) {\n // TODO: Warning: Invalid first endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n // TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if (a == b) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n } else {\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < insegments" (identifier) "i" (<) "<" (identifier) "insegments" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n a = io->segmentlist[2 * i];\n b = io->segmentlist[2 * i + 1];\n if ((a < firstnumber) || (a >= firstnumber + invertices)) {\n // TODO: Warning: Invalid first endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n // TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if (a == b) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n } else {\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }\n }" ({) "{" (expression_statement) "a = io->segmentlist[2 * i];" (assignment_expression) "a = io->segmentlist[2 * i]" (identifier) "a" (=) "=" (subscript_expression) "io->segmentlist[2 * i]" (field_expression) "io->segmentlist" (identifier) "io" (->) "->" (field_identifier) "segmentlist" ([) "[" (binary_expression) "2 * i" (number_literal) "2" (*) "*" (identifier) "i" (]) "]" (;) ";" (expression_statement) "b = io->segmentlist[2 * i + 1];" (assignment_expression) "b = io->segmentlist[2 * i + 1]" (identifier) "b" (=) "=" (subscript_expression) "io->segmentlist[2 * i + 1]" (field_expression) "io->segmentlist" (identifier) "io" (->) "->" (field_identifier) "segmentlist" ([) "[" (binary_expression) "2 * i + 1" (binary_expression) "2 * i" (number_literal) "2" (*) "*" (identifier) "i" (+) "+" (number_literal) "1" (]) "]" (;) ";" (if_statement) "if ((a < firstnumber) || (a >= firstnumber + invertices)) {\n // TODO: Warning: Invalid first endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n // TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if (a == b) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n } else {\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }" (if) "if" (parenthesized_expression) "((a < firstnumber) || (a >= firstnumber + invertices))" (() "(" (binary_expression) "(a < firstnumber) || (a >= firstnumber + invertices)" (parenthesized_expression) "(a < firstnumber)" (() "(" (binary_expression) "a < firstnumber" (identifier) "a" (<) "<" (identifier) "firstnumber" ()) ")" (||) "||" (parenthesized_expression) "(a >= firstnumber + invertices)" (() "(" (binary_expression) "a >= firstnumber + invertices" (identifier) "a" (>=) ">=" (binary_expression) "firstnumber + invertices" (identifier) "firstnumber" (+) "+" (identifier) "invertices" ()) ")" ()) ")" (compound_statement) "{\n // TODO: Warning: Invalid first endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n }" ({) "{" (comment) "// TODO: Warning: Invalid first endpoint of segment (firstnumber + i)." (return_statement) "return TRI_FAILURE;" (return) "return" (identifier) "TRI_FAILURE" (;) ";" (}) "}" (else_clause) "else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n // TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if (a == b) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n } else {\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }" (else) "else" (if_statement) "if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n // TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n } else if (a == b) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n } else {\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }" (if) "if" (parenthesized_expression) "((b < firstnumber) || (b >= firstnumber + invertices))" (() "(" (binary_expression) "(b < firstnumber) || (b >= firstnumber + invertices)" (parenthesized_expression) "(b < firstnumber)" (() "(" (binary_expression) "b < firstnumber" (identifier) "b" (<) "<" (identifier) "firstnumber" ()) ")" (||) "||" (parenthesized_expression) "(b >= firstnumber + invertices)" (() "(" (binary_expression) "b >= firstnumber + invertices" (identifier) "b" (>=) ">=" (binary_expression) "firstnumber + invertices" (identifier) "firstnumber" (+) "+" (identifier) "invertices" ()) ")" ()) ")" (compound_statement) "{\n // TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n return TRI_FAILURE;\n }" ({) "{" (comment) "// TODO: Warning: Invalid second endpoint of segment (firstnumber + i)." (return_statement) "return TRI_FAILURE;" (return) "return" (identifier) "TRI_FAILURE" (;) ";" (}) "}" (else_clause) "else if (a == b) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n } else {\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }" (else) "else" (if_statement) "if (a == b) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n } else {\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }" (if) "if" (parenthesized_expression) "(a == b)" (() "(" (binary_expression) "a == b" (identifier) "a" (==) "==" (identifier) "b" ()) ")" (compound_statement) "{\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }" ({) "{" (comment) "// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident." (return_statement) "return TRI_FAILURE;" (return) "return" (identifier) "TRI_FAILURE" (;) ";" (}) "}" (else_clause) "else {\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }" (else) "else" (compound_statement) "{\n x1 = io->pointlist[2 * a];\n x2 = io->pointlist[2 * a + 1];\n y1 = io->pointlist[2 * b];\n y2 = io->pointlist[2 * b + 1];\n\n if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }\n }" ({) "{" (expression_statement) "x1 = io->pointlist[2 * a];" (assignment_expression) "x1 = io->pointlist[2 * a]" (identifier) "x1" (=) "=" (subscript_expression) "io->pointlist[2 * a]" (field_expression) "io->pointlist" (identifier) "io" (->) "->" (field_identifier) "pointlist" ([) "[" (binary_expression) "2 * a" (number_literal) "2" (*) "*" (identifier) "a" (]) "]" (;) ";" (expression_statement) "x2 = io->pointlist[2 * a + 1];" (assignment_expression) "x2 = io->pointlist[2 * a + 1]" (identifier) "x2" (=) "=" (subscript_expression) "io->pointlist[2 * a + 1]" (field_expression) "io->pointlist" (identifier) "io" (->) "->" (field_identifier) "pointlist" ([) "[" (binary_expression) "2 * a + 1" (binary_expression) "2 * a" (number_literal) "2" (*) "*" (identifier) "a" (+) "+" (number_literal) "1" (]) "]" (;) ";" (expression_statement) "y1 = io->pointlist[2 * b];" (assignment_expression) "y1 = io->pointlist[2 * b]" (identifier) "y1" (=) "=" (subscript_expression) "io->pointlist[2 * b]" (field_expression) "io->pointlist" (identifier) "io" (->) "->" (field_identifier) "pointlist" ([) "[" (binary_expression) "2 * b" (number_literal) "2" (*) "*" (identifier) "b" (]) "]" (;) ";" (expression_statement) "y2 = io->pointlist[2 * b + 1];" (assignment_expression) "y2 = io->pointlist[2 * b + 1]" (identifier) "y2" (=) "=" (subscript_expression) "io->pointlist[2 * b + 1]" (field_expression) "io->pointlist" (identifier) "io" (->) "->" (field_identifier) "pointlist" ([) "[" (binary_expression) "2 * b + 1" (binary_expression) "2 * b" (number_literal) "2" (*) "*" (identifier) "b" (+) "+" (number_literal) "1" (]) "]" (;) ";" (if_statement) "if ((x1 == x2) && (y1 == y2)) {\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }" (if) "if" (parenthesized_expression) "((x1 == x2) && (y1 == y2))" (() "(" (binary_expression) "(x1 == x2) && (y1 == y2)" (parenthesized_expression) "(x1 == x2)" (() "(" (binary_expression) "x1 == x2" (identifier) "x1" (==) "==" (identifier) "x2" ()) ")" (&&) "&&" (parenthesized_expression) "(y1 == y2)" (() "(" (binary_expression) "y1 == y2" (identifier) "y1" (==) "==" (identifier) "y2" ()) ")" ()) ")" (compound_statement) "{\n // TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n return TRI_FAILURE;\n }" ({) "{" (comment) "// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident." (return_statement) "return TRI_FAILURE;" (return) "return" (identifier) "TRI_FAILURE" (;) ";" (}) "}" (}) "}" (}) "}" (for_statement) "for (i = 0; i < inelements; i++) {\n a = io->trianglelist[corners * i];\n b = io->trianglelist[corners * i + 1];\n c = io->trianglelist[corners * i + 2];\n\n if ((a < firstnumber) || (a >= firstnumber + invertices) ||\n (b < firstnumber) || (b >= firstnumber + invertices) ||\n (c < firstnumber) || (c >= firstnumber + invertices)) {\n // TODO: Error: Triangle (i) has an invalid vertex index.\n return TRI_FAILURE;\n }\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < inelements" (identifier) "i" (<) "<" (identifier) "inelements" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n a = io->trianglelist[corners * i];\n b = io->trianglelist[corners * i + 1];\n c = io->trianglelist[corners * i + 2];\n\n if ((a < firstnumber) || (a >= firstnumber + invertices) ||\n (b < firstnumber) || (b >= firstnumber + invertices) ||\n (c < firstnumber) || (c >= firstnumber + invertices)) {\n // TODO: Error: Triangle (i) has an invalid vertex index.\n return TRI_FAILURE;\n }\n }" ({) "{" (expression_statement) "a = io->trianglelist[corners * i];" (assignment_expression) "a = io->trianglelist[corners * i]" (identifier) "a" (=) "=" (subscript_expression) "io->trianglelist[corners * i]" (field_expression) "io->trianglelist" (identifier) "io" (->) "->" (field_identifier) "trianglelist" ([) "[" (binary_expression) "corners * i" (identifier) "corners" (*) "*" (identifier) "i" (]) "]" (;) ";" (expression_statement) "b = io->trianglelist[corners * i + 1];" (assignment_expression) "b = io->trianglelist[corners * i + 1]" (identifier) "b" (=) "=" (subscript_expression) "io->trianglelist[corners * i + 1]" (field_expression) "io->trianglelist" (identifier) "io" (->) "->" (field_identifier) "trianglelist" ([) "[" (binary_expression) "corners * i + 1" (binary_expression) "corners * i" (identifier) "corners" (*) "*" (identifier) "i" (+) "+" (number_literal) "1" (]) "]" (;) ";" (expression_statement) "c = io->trianglelist[corners * i + 2];" (assignment_expression) "c = io->trianglelist[corners * i + 2]" (identifier) "c" (=) "=" (subscript_expression) "io->trianglelist[corners * i + 2]" (field_expression) "io->trianglelist" (identifier) "io" (->) "->" (field_identifier) "trianglelist" ([) "[" (binary_expression) "corners * i + 2" (binary_expression) "corners * i" (identifier) "corners" (*) "*" (identifier) "i" (+) "+" (number_literal) "2" (]) "]" (;) ";" (if_statement) "if ((a < firstnumber) || (a >= firstnumber + invertices) ||\n (b < firstnumber) || (b >= firstnumber + invertices) ||\n (c < firstnumber) || (c >= firstnumber + invertices)) {\n // TODO: Error: Triangle (i) has an invalid vertex index.\n return TRI_FAILURE;\n }" (if) "if" (parenthesized_expression) "((a < firstnumber) || (a >= firstnumber + invertices) ||\n (b < firstnumber) || (b >= firstnumber + invertices) ||\n (c < firstnumber) || (c >= firstnumber + invertices))" (() "(" (binary_expression) "(a < firstnumber) || (a >= firstnumber + invertices) ||\n (b < firstnumber) || (b >= firstnumber + invertices) ||\n (c < firstnumber) || (c >= firstnumber + invertices)" (binary_expression) "(a < firstnumber) || (a >= firstnumber + invertices) ||\n (b < firstnumber) || (b >= firstnumber + invertices) ||\n (c < firstnumber)" (binary_expression) "(a < firstnumber) || (a >= firstnumber + invertices) ||\n (b < firstnumber) || (b >= firstnumber + invertices)" (binary_expression) "(a < firstnumber) || (a >= firstnumber + invertices) ||\n (b < firstnumber)" (binary_expression) "(a < firstnumber) || (a >= firstnumber + invertices)" (parenthesized_expression) "(a < firstnumber)" (() "(" (binary_expression) "a < firstnumber" (identifier) "a" (<) "<" (identifier) "firstnumber" ()) ")" (||) "||" (parenthesized_expression) "(a >= firstnumber + invertices)" (() "(" (binary_expression) "a >= firstnumber + invertices" (identifier) "a" (>=) ">=" (binary_expression) "firstnumber + invertices" (identifier) "firstnumber" (+) "+" (identifier) "invertices" ()) ")" (||) "||" (parenthesized_expression) "(b < firstnumber)" (() "(" (binary_expression) "b < firstnumber" (identifier) "b" (<) "<" (identifier) "firstnumber" ()) ")" (||) "||" (parenthesized_expression) "(b >= firstnumber + invertices)" (() "(" (binary_expression) "b >= firstnumber + invertices" (identifier) "b" (>=) ">=" (binary_expression) "firstnumber + invertices" (identifier) "firstnumber" (+) "+" (identifier) "invertices" ()) ")" (||) "||" (parenthesized_expression) "(c < firstnumber)" (() "(" (binary_expression) "c < firstnumber" (identifier) "c" (<) "<" (identifier) "firstnumber" ()) ")" (||) "||" (parenthesized_expression) "(c >= firstnumber + invertices)" (() "(" (binary_expression) "c >= firstnumber + invertices" (identifier) "c" (>=) ">=" (binary_expression) "firstnumber + invertices" (identifier) "firstnumber" (+) "+" (identifier) "invertices" ()) ")" ()) ")" (compound_statement) "{\n // TODO: Error: Triangle (i) has an invalid vertex index.\n return TRI_FAILURE;\n }" ({) "{" (comment) "// TODO: Error: Triangle (i) has an invalid vertex index." (return_statement) "return TRI_FAILURE;" (return) "return" (identifier) "TRI_FAILURE" (;) ";" (}) "}" (}) "}" (return_statement) "return TRI_OK;" (return) "return" (identifier) "TRI_OK" (;) ";" (}) "}" (function_definition) "void triangle_restore_pointmarkers(context* ctx, int *pointmarkers)\n{\n mesh *m;\n behavior *b;\n vertex vertexloop;\n int vertexnumber;\n\n m = ctx->m;\n b = ctx->b;\n\n traversalinit(&m->vertices);\n vertexnumber = 0;\n vertexloop = vertextraverse(m);\n while (vertexloop != (vertex)NULL) {\n if (!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)) {\n setvertexmark(vertexloop, pointmarkers[vertexnumber]);\n vertexnumber++;\n }\n vertexloop = vertextraverse(m);\n }\n}" (primitive_type) "void" (function_declarator) "triangle_restore_pointmarkers(context* ctx, int *pointmarkers)" (identifier) "triangle_restore_pointmarkers" (parameter_list) "(context* ctx, int *pointmarkers)" (() "(" (parameter_declaration) "context* ctx" (type_identifier) "context" (pointer_declarator) "* ctx" (*) "*" (identifier) "ctx" (,) "," (parameter_declaration) "int *pointmarkers" (primitive_type) "int" (pointer_declarator) "*pointmarkers" (*) "*" (identifier) "pointmarkers" ()) ")" (compound_statement) "{\n mesh *m;\n behavior *b;\n vertex vertexloop;\n int vertexnumber;\n\n m = ctx->m;\n b = ctx->b;\n\n traversalinit(&m->vertices);\n vertexnumber = 0;\n vertexloop = vertextraverse(m);\n while (vertexloop != (vertex)NULL) {\n if (!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)) {\n setvertexmark(vertexloop, pointmarkers[vertexnumber]);\n vertexnumber++;\n }\n vertexloop = vertextraverse(m);\n }\n}" ({) "{" (declaration) "mesh *m;" (type_identifier) "mesh" (pointer_declarator) "*m" (*) "*" (identifier) "m" (;) ";" (declaration) "behavior *b;" (type_identifier) "behavior" (pointer_declarator) "*b" (*) "*" (identifier) "b" (;) ";" (declaration) "vertex vertexloop;" (type_identifier) "vertex" (identifier) "vertexloop" (;) ";" (declaration) "int vertexnumber;" (primitive_type) "int" (identifier) "vertexnumber" (;) ";" (expression_statement) "m = ctx->m;" (assignment_expression) "m = ctx->m" (identifier) "m" (=) "=" (field_expression) "ctx->m" (identifier) "ctx" (->) "->" (field_identifier) "m" (;) ";" (expression_statement) "b = ctx->b;" (assignment_expression) "b = ctx->b" (identifier) "b" (=) "=" (field_expression) "ctx->b" (identifier) "ctx" (->) "->" (field_identifier) "b" (;) ";" (expression_statement) "traversalinit(&m->vertices);" (call_expression) "traversalinit(&m->vertices)" (identifier) "traversalinit" (argument_list) "(&m->vertices)" (() "(" (pointer_expression) "&m->vertices" (&) "&" (field_expression) "m->vertices" (identifier) "m" (->) "->" (field_identifier) "vertices" ()) ")" (;) ";" (expression_statement) "vertexnumber = 0;" (assignment_expression) "vertexnumber = 0" (identifier) "vertexnumber" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "vertexloop = vertextraverse(m);" (assignment_expression) "vertexloop = vertextraverse(m)" (identifier) "vertexloop" (=) "=" (call_expression) "vertextraverse(m)" (identifier) "vertextraverse" (argument_list) "(m)" (() "(" (identifier) "m" ()) ")" (;) ";" (while_statement) "while (vertexloop != (vertex)NULL) {\n if (!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)) {\n setvertexmark(vertexloop, pointmarkers[vertexnumber]);\n vertexnumber++;\n }\n vertexloop = vertextraverse(m);\n }" (while) "while" (parenthesized_expression) "(vertexloop != (vertex)NULL)" (() "(" (binary_expression) "vertexloop != (vertex)NULL" (identifier) "vertexloop" (!=) "!=" (cast_expression) "(vertex)NULL" (() "(" (type_descriptor) "vertex" (type_identifier) "vertex" ()) ")" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n if (!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)) {\n setvertexmark(vertexloop, pointmarkers[vertexnumber]);\n vertexnumber++;\n }\n vertexloop = vertextraverse(m);\n }" ({) "{" (if_statement) "if (!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)) {\n setvertexmark(vertexloop, pointmarkers[vertexnumber]);\n vertexnumber++;\n }" (if) "if" (parenthesized_expression) "(!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX))" (() "(" (binary_expression) "!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)" (unary_expression) "!b->jettison" (!) "!" (field_expression) "b->jettison" (identifier) "b" (->) "->" (field_identifier) "jettison" (||) "||" (parenthesized_expression) "(vertextype(vertexloop) != UNDEADVERTEX)" (() "(" (binary_expression) "vertextype(vertexloop) != UNDEADVERTEX" (call_expression) "vertextype(vertexloop)" (identifier) "vertextype" (argument_list) "(vertexloop)" (() "(" (identifier) "vertexloop" ()) ")" (!=) "!=" (identifier) "UNDEADVERTEX" ()) ")" ()) ")" (compound_statement) "{\n setvertexmark(vertexloop, pointmarkers[vertexnumber]);\n vertexnumber++;\n }" ({) "{" (expression_statement) "setvertexmark(vertexloop, pointmarkers[vertexnumber]);" (call_expression) "setvertexmark(vertexloop, pointmarkers[vertexnumber])" (identifier) "setvertexmark" (argument_list) "(vertexloop, pointmarkers[vertexnumber])" (() "(" (identifier) "vertexloop" (,) "," (subscript_expression) "pointmarkers[vertexnumber]" (identifier) "pointmarkers" ([) "[" (identifier) "vertexnumber" (]) "]" ()) ")" (;) ";" (expression_statement) "vertexnumber++;" (update_expression) "vertexnumber++" (identifier) "vertexnumber" (++) "++" (;) ";" (}) "}" (expression_statement) "vertexloop = vertextraverse(m);" (assignment_expression) "vertexloop = vertextraverse(m)" (identifier) "vertexloop" (=) "=" (call_expression) "vertextraverse(m)" (identifier) "vertextraverse" (argument_list) "(m)" (() "(" (identifier) "m" ()) ")" (;) ";" (}) "}" (}) "}"
765
0
{"language": "c", "success": true, "metadata": {"lines": 83, "avg_line_length": 27.57, "nodes": 496, "errors": 0, "source_hash": "0bca8264c47bc42b047c8804594433d299bf6bb9af9d860996c276834b6ff0ce", "categorized_nodes": 369}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"triangle_helper.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"triangle_helper.h\"", "parent": 0, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 28}}, {"id": 3, "type": "preproc_include", "text": "#include \"triangle_internal.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": "\"triangle_internal.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 30}}, {"id": 6, "type": "function_definition", "text": "int triangle_check_context(context* ctx)\n{\n\tif (ctx == NULL) {\n\t\treturn TRI_FAILURE;\n\t}\n\tif (ctx->b == NULL || ctx->m == NULL) {\n\t\treturn TRI_FAILURE;\n\t}\n\n\treturn TRI_OK;\n}", "parent": null, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 3}}, {"id": 8, "type": "function_declarator", "text": "triangle_check_context(context* ctx)", "parent": 6, "children": [9, 10], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 40}}, {"id": 9, "type": "identifier", "text": "triangle_check_context", "parent": 8, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 26}}, {"id": 10, "type": "parameter_list", "text": "(context* ctx)", "parent": 8, "children": [11], "start_point": {"row": 4, "column": 26}, "end_point": {"row": 4, "column": 40}}, {"id": 11, "type": "parameter_declaration", "text": "context* ctx", "parent": 10, "children": [12, 13], "start_point": {"row": 4, "column": 27}, "end_point": {"row": 4, "column": 39}}, {"id": 12, "type": "type_identifier", "text": "context", "parent": 11, "children": [], "start_point": {"row": 4, "column": 27}, "end_point": {"row": 4, "column": 34}}, {"id": 13, "type": "pointer_declarator", "text": "* ctx", "parent": 11, "children": [14, 15], "start_point": {"row": 4, "column": 34}, "end_point": {"row": 4, "column": 39}}, {"id": 14, "type": "*", "text": "*", "parent": 13, "children": [], "start_point": {"row": 4, "column": 34}, "end_point": {"row": 4, "column": 35}}, {"id": 15, "type": "identifier", "text": "ctx", "parent": 13, "children": [], "start_point": {"row": 4, "column": 36}, "end_point": {"row": 4, "column": 39}}, {"id": 16, "type": "if_statement", "text": "if (ctx == NULL) {\n\t\treturn TRI_FAILURE;\n\t}", "parent": 6, "children": [17], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 8, "column": 2}}, {"id": 17, "type": "parenthesized_expression", "text": "(ctx == NULL)", "parent": 16, "children": [18], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 17}}, {"id": 18, "type": "binary_expression", "text": "ctx == NULL", "parent": 17, "children": [19, 20, 21], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 16}}, {"id": 19, "type": "identifier", "text": "ctx", "parent": 18, "children": [], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 8}}, {"id": 20, "type": "==", "text": "==", "parent": 18, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 11}}, {"id": 21, "type": "null", "text": "NULL", "parent": 18, "children": [22], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 16}}, {"id": 22, "type": "NULL", "text": "NULL", "parent": 21, "children": [], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 16}}, {"id": 23, "type": "return_statement", "text": "return TRI_FAILURE;", "parent": 16, "children": [24], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 21}}, {"id": 24, "type": "identifier", "text": "TRI_FAILURE", "parent": 23, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 20}}, {"id": 25, "type": "if_statement", "text": "if (ctx->b == NULL || ctx->m == NULL) {\n\t\treturn TRI_FAILURE;\n\t}", "parent": 6, "children": [26], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 11, "column": 2}}, {"id": 26, "type": "parenthesized_expression", "text": "(ctx->b == NULL || ctx->m == NULL)", "parent": 25, "children": [27], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 38}}, {"id": 27, "type": "binary_expression", "text": "ctx->b == NULL || ctx->m == NULL", "parent": 26, "children": [28, 35, 36], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 37}}, {"id": 28, "type": "binary_expression", "text": "ctx->b == NULL", "parent": 27, "children": [29, 32, 33], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 19}}, {"id": 29, "type": "field_expression", "text": "ctx->b", "parent": 28, "children": [30, 31], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 11}}, {"id": 30, "type": "identifier", "text": "ctx", "parent": 29, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 8}}, {"id": 31, "type": "field_identifier", "text": "b", "parent": 29, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 11}}, {"id": 32, "type": "==", "text": "==", "parent": 28, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 14}}, {"id": 33, "type": "null", "text": "NULL", "parent": 28, "children": [34], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 19}}, {"id": 34, "type": "NULL", "text": "NULL", "parent": 33, "children": [], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 19}}, {"id": 35, "type": "||", "text": "||", "parent": 27, "children": [], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 22}}, {"id": 36, "type": "binary_expression", "text": "ctx->m == NULL", "parent": 27, "children": [37, 40, 41], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 37}}, {"id": 37, "type": "field_expression", "text": "ctx->m", "parent": 36, "children": [38, 39], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 29}}, {"id": 38, "type": "identifier", "text": "ctx", "parent": 37, "children": [], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 26}}, {"id": 39, "type": "field_identifier", "text": "m", "parent": 37, "children": [], "start_point": {"row": 9, "column": 28}, "end_point": {"row": 9, "column": 29}}, {"id": 40, "type": "==", "text": "==", "parent": 36, "children": [], "start_point": {"row": 9, "column": 30}, "end_point": {"row": 9, "column": 32}}, {"id": 41, "type": "null", "text": "NULL", "parent": 36, "children": [42], "start_point": {"row": 9, "column": 33}, "end_point": {"row": 9, "column": 37}}, {"id": 42, "type": "NULL", "text": "NULL", "parent": 41, "children": [], "start_point": {"row": 9, "column": 33}, "end_point": {"row": 9, "column": 37}}, {"id": 43, "type": "return_statement", "text": "return TRI_FAILURE;", "parent": 25, "children": [44], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 21}}, {"id": 44, "type": "identifier", "text": "TRI_FAILURE", "parent": 43, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 20}}, {"id": 45, "type": "return_statement", "text": "return TRI_OK;", "parent": 6, "children": [46], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 15}}, {"id": 46, "type": "identifier", "text": "TRI_OK", "parent": 45, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 14}}, {"id": 47, "type": "function_definition", "text": "int triangle_check_behavior(behavior* b)\n{\n\tif (b->fixedarea && b->maxarea <= 0.0) {\n\t\treturn TRI_OPTIONS;\n\t}\n\treturn TRI_OK;\n}", "parent": null, "children": [48, 49], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 48, "type": "primitive_type", "text": "int", "parent": 47, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 3}}, {"id": 49, "type": "function_declarator", "text": "triangle_check_behavior(behavior* b)", "parent": 47, "children": [50, 51], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 40}}, {"id": 50, "type": "identifier", "text": "triangle_check_behavior", "parent": 49, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 27}}, {"id": 51, "type": "parameter_list", "text": "(behavior* b)", "parent": 49, "children": [52], "start_point": {"row": 16, "column": 27}, "end_point": {"row": 16, "column": 40}}, {"id": 52, "type": "parameter_declaration", "text": "behavior* b", "parent": 51, "children": [53, 54], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 39}}, {"id": 53, "type": "type_identifier", "text": "behavior", "parent": 52, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 36}}, {"id": 54, "type": "pointer_declarator", "text": "* b", "parent": 52, "children": [55, 56], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 39}}, {"id": 55, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 37}}, {"id": 56, "type": "identifier", "text": "b", "parent": 54, "children": [], "start_point": {"row": 16, "column": 38}, "end_point": {"row": 16, "column": 39}}, {"id": 57, "type": "if_statement", "text": "if (b->fixedarea && b->maxarea <= 0.0) {\n\t\treturn TRI_OPTIONS;\n\t}", "parent": 47, "children": [58], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 20, "column": 2}}, {"id": 58, "type": "parenthesized_expression", "text": "(b->fixedarea && b->maxarea <= 0.0)", "parent": 57, "children": [59], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 39}}, {"id": 59, "type": "binary_expression", "text": "b->fixedarea && b->maxarea <= 0.0", "parent": 58, "children": [60, 63, 64], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 38}}, {"id": 60, "type": "field_expression", "text": "b->fixedarea", "parent": 59, "children": [61, 62], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 17}}, {"id": 61, "type": "identifier", "text": "b", "parent": 60, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 6}}, {"id": 62, "type": "field_identifier", "text": "fixedarea", "parent": 60, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 17}}, {"id": 63, "type": "&&", "text": "&&", "parent": 59, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 20}}, {"id": 64, "type": "binary_expression", "text": "b->maxarea <= 0.0", "parent": 59, "children": [65, 68, 69], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 38}}, {"id": 65, "type": "field_expression", "text": "b->maxarea", "parent": 64, "children": [66, 67], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 31}}, {"id": 66, "type": "identifier", "text": "b", "parent": 65, "children": [], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 22}}, {"id": 67, "type": "field_identifier", "text": "maxarea", "parent": 65, "children": [], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 31}}, {"id": 68, "type": "<=", "text": "<=", "parent": 64, "children": [], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 34}}, {"id": 69, "type": "number_literal", "text": "0.0", "parent": 64, "children": [], "start_point": {"row": 18, "column": 35}, "end_point": {"row": 18, "column": 38}}, {"id": 70, "type": "return_statement", "text": "return TRI_OPTIONS;", "parent": 57, "children": [71], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 21}}, {"id": 71, "type": "identifier", "text": "TRI_OPTIONS", "parent": 70, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 20}}, {"id": 72, "type": "return_statement", "text": "return TRI_OK;", "parent": 47, "children": [73], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 15}}, {"id": 73, "type": "identifier", "text": "TRI_OK", "parent": 72, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 14}}, {"id": 74, "type": "function_definition", "text": "int triangle_check_triangleio(triangleio* io, int firstnumber)\n{\n\tint i;\n\tint a, b, c;\n\tREAL x1, y1, x2, y2;\n\n\tint invertices = io->numberofpoints;\n\tint insegments = io->numberofsegments;\n\tint inelements = io->numberoftriangles;\n\tint corners = io->numberofcorners;\n\n\tfor (i = 0; i < insegments; i++) {\n\t\ta = io->segmentlist[2 * i];\n\t\tb = io->segmentlist[2 * i + 1];\n\t\tif ((a < firstnumber) || (a >= firstnumber + invertices)) {\n\t\t\t// TODO: Warning: Invalid first endpoint of segment (firstnumber + i).\n\t\t\treturn TRI_FAILURE;\n\t\t} else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n\t\t\t// TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n\t\t\treturn TRI_FAILURE;\n\t\t} else if (a == b) {\n\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\treturn TRI_FAILURE;\n\t\t} else {\n\t\t\tx1 = io->pointlist[2 * a];\n\t\t\tx2 = io->pointlist[2 * a + 1];\n\t\t\ty1 = io->pointlist[2 * b];\n\t\t\ty2 = io->pointlist[2 * b + 1];\n\n\t\t\tif ((x1 == x2) && (y1 == y2)) {\n\t\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\t\treturn TRI_FAILURE;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i = 0; i < inelements; i++) {\n\t\ta = io->trianglelist[corners * i];\n\t\tb = io->trianglelist[corners * i + 1];\n\t\tc = io->trianglelist[corners * i + 2];\n\n\t\tif ((a < firstnumber) || (a >= firstnumber + invertices) ||\n\t\t\t(b < firstnumber) || (b >= firstnumber + invertices) ||\n\t\t\t(c < firstnumber) || (c >= firstnumber + invertices)) {\n\t\t\t\t// TODO: Error: Triangle (i) has an invalid vertex index.\n\t\t\t\treturn TRI_FAILURE;\n\t\t}\n\t}\n\n\treturn TRI_OK;\n}", "parent": null, "children": [75, 76], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 74, "column": 1}}, {"id": 75, "type": "primitive_type", "text": "int", "parent": 74, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 3}}, {"id": 76, "type": "function_declarator", "text": "triangle_check_triangleio(triangleio* io, int firstnumber)", "parent": 74, "children": [77, 78], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 62}}, {"id": 77, "type": "identifier", "text": "triangle_check_triangleio", "parent": 76, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 29}}, {"id": 78, "type": "parameter_list", "text": "(triangleio* io, int firstnumber)", "parent": 76, "children": [79, 84], "start_point": {"row": 24, "column": 29}, "end_point": {"row": 24, "column": 62}}, {"id": 79, "type": "parameter_declaration", "text": "triangleio* io", "parent": 78, "children": [80, 81], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 44}}, {"id": 80, "type": "type_identifier", "text": "triangleio", "parent": 79, "children": [], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 40}}, {"id": 81, "type": "pointer_declarator", "text": "* io", "parent": 79, "children": [82, 83], "start_point": {"row": 24, "column": 40}, "end_point": {"row": 24, "column": 44}}, {"id": 82, "type": "*", "text": "*", "parent": 81, "children": [], "start_point": {"row": 24, "column": 40}, "end_point": {"row": 24, "column": 41}}, {"id": 83, "type": "identifier", "text": "io", "parent": 81, "children": [], "start_point": {"row": 24, "column": 42}, "end_point": {"row": 24, "column": 44}}, {"id": 84, "type": "parameter_declaration", "text": "int firstnumber", "parent": 78, "children": [85, 86], "start_point": {"row": 24, "column": 46}, "end_point": {"row": 24, "column": 61}}, {"id": 85, "type": "primitive_type", "text": "int", "parent": 84, "children": [], "start_point": {"row": 24, "column": 46}, "end_point": {"row": 24, "column": 49}}, {"id": 86, "type": "identifier", "text": "firstnumber", "parent": 84, "children": [], "start_point": {"row": 24, "column": 50}, "end_point": {"row": 24, "column": 61}}, {"id": 87, "type": "declaration", "text": "int i;", "parent": 74, "children": [88, 89], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 7}}, {"id": 88, "type": "primitive_type", "text": "int", "parent": 87, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 4}}, {"id": 89, "type": "identifier", "text": "i", "parent": 87, "children": [], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 26, "column": 6}}, {"id": 90, "type": "declaration", "text": "int a, b, c;", "parent": 74, "children": [91, 92, 93, 94], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 13}}, {"id": 91, "type": "primitive_type", "text": "int", "parent": 90, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 4}}, {"id": 92, "type": "identifier", "text": "a", "parent": 90, "children": [], "start_point": {"row": 27, "column": 5}, "end_point": {"row": 27, "column": 6}}, {"id": 93, "type": "identifier", "text": "b", "parent": 90, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 9}}, {"id": 94, "type": "identifier", "text": "c", "parent": 90, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 12}}, {"id": 95, "type": "declaration", "text": "REAL x1, y1, x2, y2;", "parent": 74, "children": [96, 97, 98, 99, 100], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 21}}, {"id": 96, "type": "type_identifier", "text": "REAL", "parent": 95, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 5}}, {"id": 97, "type": "identifier", "text": "x1", "parent": 95, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 8}}, {"id": 98, "type": "identifier", "text": "y1", "parent": 95, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 12}}, {"id": 99, "type": "identifier", "text": "x2", "parent": 95, "children": [], "start_point": {"row": 28, "column": 14}, "end_point": {"row": 28, "column": 16}}, {"id": 100, "type": "identifier", "text": "y2", "parent": 95, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 20}}, {"id": 101, "type": "declaration", "text": "int invertices = io->numberofpoints;", "parent": 74, "children": [102, 103], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 37}}, {"id": 102, "type": "primitive_type", "text": "int", "parent": 101, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 4}}, {"id": 103, "type": "init_declarator", "text": "invertices = io->numberofpoints", "parent": 101, "children": [104, 105, 106], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 36}}, {"id": 104, "type": "identifier", "text": "invertices", "parent": 103, "children": [], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 15}}, {"id": 105, "type": "=", "text": "=", "parent": 103, "children": [], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 17}}, {"id": 106, "type": "field_expression", "text": "io->numberofpoints", "parent": 103, "children": [107, 108], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 36}}, {"id": 107, "type": "identifier", "text": "io", "parent": 106, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 20}}, {"id": 108, "type": "field_identifier", "text": "numberofpoints", "parent": 106, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 36}}, {"id": 109, "type": "declaration", "text": "int insegments = io->numberofsegments;", "parent": 74, "children": [110, 111], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 39}}, {"id": 110, "type": "primitive_type", "text": "int", "parent": 109, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 4}}, {"id": 111, "type": "init_declarator", "text": "insegments = io->numberofsegments", "parent": 109, "children": [112, 113, 114], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 38}}, {"id": 112, "type": "identifier", "text": "insegments", "parent": 111, "children": [], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 15}}, {"id": 113, "type": "=", "text": "=", "parent": 111, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 17}}, {"id": 114, "type": "field_expression", "text": "io->numberofsegments", "parent": 111, "children": [115, 116], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 38}}, {"id": 115, "type": "identifier", "text": "io", "parent": 114, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 20}}, {"id": 116, "type": "field_identifier", "text": "numberofsegments", "parent": 114, "children": [], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 38}}, {"id": 117, "type": "declaration", "text": "int inelements = io->numberoftriangles;", "parent": 74, "children": [118, 119], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 40}}, {"id": 118, "type": "primitive_type", "text": "int", "parent": 117, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 4}}, {"id": 119, "type": "init_declarator", "text": "inelements = io->numberoftriangles", "parent": 117, "children": [120, 121, 122], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 39}}, {"id": 120, "type": "identifier", "text": "inelements", "parent": 119, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 15}}, {"id": 121, "type": "=", "text": "=", "parent": 119, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 17}}, {"id": 122, "type": "field_expression", "text": "io->numberoftriangles", "parent": 119, "children": [123, 124], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 39}}, {"id": 123, "type": "identifier", "text": "io", "parent": 122, "children": [], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 20}}, {"id": 124, "type": "field_identifier", "text": "numberoftriangles", "parent": 122, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 39}}, {"id": 125, "type": "declaration", "text": "int corners = io->numberofcorners;", "parent": 74, "children": [126, 127], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 35}}, {"id": 126, "type": "primitive_type", "text": "int", "parent": 125, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 4}}, {"id": 127, "type": "init_declarator", "text": "corners = io->numberofcorners", "parent": 125, "children": [128, 129, 130], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 34}}, {"id": 128, "type": "identifier", "text": "corners", "parent": 127, "children": [], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 12}}, {"id": 129, "type": "=", "text": "=", "parent": 127, "children": [], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 14}}, {"id": 130, "type": "field_expression", "text": "io->numberofcorners", "parent": 127, "children": [131, 132], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 34}}, {"id": 131, "type": "identifier", "text": "io", "parent": 130, "children": [], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 17}}, {"id": 132, "type": "field_identifier", "text": "numberofcorners", "parent": 130, "children": [], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 34}}, {"id": 133, "type": "for_statement", "text": "for (i = 0; i < insegments; i++) {\n\t\ta = io->segmentlist[2 * i];\n\t\tb = io->segmentlist[2 * i + 1];\n\t\tif ((a < firstnumber) || (a >= firstnumber + invertices)) {\n\t\t\t// TODO: Warning: Invalid first endpoint of segment (firstnumber + i).\n\t\t\treturn TRI_FAILURE;\n\t\t} else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n\t\t\t// TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n\t\t\treturn TRI_FAILURE;\n\t\t} else if (a == b) {\n\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\treturn TRI_FAILURE;\n\t\t} else {\n\t\t\tx1 = io->pointlist[2 * a];\n\t\t\tx2 = io->pointlist[2 * a + 1];\n\t\t\ty1 = io->pointlist[2 * b];\n\t\t\ty2 = io->pointlist[2 * b + 1];\n\n\t\t\tif ((x1 == x2) && (y1 == y2)) {\n\t\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\t\treturn TRI_FAILURE;\n\t\t\t}\n\t\t}\n\t}", "parent": 74, "children": [134, 138, 142], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 58, "column": 2}}, {"id": 134, "type": "assignment_expression", "text": "i = 0", "parent": 133, "children": [135, 136, 137], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 11}}, {"id": 135, "type": "identifier", "text": "i", "parent": 134, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 7}}, {"id": 136, "type": "=", "text": "=", "parent": 134, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 9}}, {"id": 137, "type": "number_literal", "text": "0", "parent": 134, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 11}}, {"id": 138, "type": "binary_expression", "text": "i < insegments", "parent": 133, "children": [139, 140, 141], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 27}}, {"id": 139, "type": "identifier", "text": "i", "parent": 138, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 14}}, {"id": 140, "type": "<", "text": "<", "parent": 138, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 16}}, {"id": 141, "type": "identifier", "text": "insegments", "parent": 138, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 27}}, {"id": 142, "type": "update_expression", "text": "i++", "parent": 133, "children": [143, 144], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 32}}, {"id": 143, "type": "identifier", "text": "i", "parent": 142, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 30}}, {"id": 144, "type": "++", "text": "++", "parent": 142, "children": [], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 32}}, {"id": 145, "type": "assignment_expression", "text": "a = io->segmentlist[2 * i]", "parent": 133, "children": [146, 147, 148], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 28}}, {"id": 146, "type": "identifier", "text": "a", "parent": 145, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 3}}, {"id": 147, "type": "=", "text": "=", "parent": 145, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 5}}, {"id": 148, "type": "subscript_expression", "text": "io->segmentlist[2 * i]", "parent": 145, "children": [149, 152], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 28}}, {"id": 149, "type": "field_expression", "text": "io->segmentlist", "parent": 148, "children": [150, 151], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 21}}, {"id": 150, "type": "identifier", "text": "io", "parent": 149, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 8}}, {"id": 151, "type": "field_identifier", "text": "segmentlist", "parent": 149, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 21}}, {"id": 152, "type": "binary_expression", "text": "2 * i", "parent": 148, "children": [153, 154, 155], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 27}}, {"id": 153, "type": "number_literal", "text": "2", "parent": 152, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 23}}, {"id": 154, "type": "*", "text": "*", "parent": 152, "children": [], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 25}}, {"id": 155, "type": "identifier", "text": "i", "parent": 152, "children": [], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 27}}, {"id": 156, "type": "assignment_expression", "text": "b = io->segmentlist[2 * i + 1]", "parent": 133, "children": [157, 158, 159], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 32}}, {"id": 157, "type": "identifier", "text": "b", "parent": 156, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 3}}, {"id": 158, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 5}}, {"id": 159, "type": "subscript_expression", "text": "io->segmentlist[2 * i + 1]", "parent": 156, "children": [160, 163], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 32}}, {"id": 160, "type": "field_expression", "text": "io->segmentlist", "parent": 159, "children": [161, 162], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 21}}, {"id": 161, "type": "identifier", "text": "io", "parent": 160, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 8}}, {"id": 162, "type": "field_identifier", "text": "segmentlist", "parent": 160, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 21}}, {"id": 163, "type": "binary_expression", "text": "2 * i + 1", "parent": 159, "children": [164, 168, 169], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 31}}, {"id": 164, "type": "binary_expression", "text": "2 * i", "parent": 163, "children": [165, 166, 167], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 27}}, {"id": 165, "type": "number_literal", "text": "2", "parent": 164, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 23}}, {"id": 166, "type": "*", "text": "*", "parent": 164, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 25}}, {"id": 167, "type": "identifier", "text": "i", "parent": 164, "children": [], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 27}}, {"id": 168, "type": "+", "text": "+", "parent": 163, "children": [], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 29}}, {"id": 169, "type": "number_literal", "text": "1", "parent": 163, "children": [], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 31}}, {"id": 170, "type": "if_statement", "text": "if ((a < firstnumber) || (a >= firstnumber + invertices)) {\n\t\t\t// TODO: Warning: Invalid first endpoint of segment (firstnumber + i).\n\t\t\treturn TRI_FAILURE;\n\t\t} else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n\t\t\t// TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n\t\t\treturn TRI_FAILURE;\n\t\t} else if (a == b) {\n\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\treturn TRI_FAILURE;\n\t\t} else {\n\t\t\tx1 = io->pointlist[2 * a];\n\t\t\tx2 = io->pointlist[2 * a + 1];\n\t\t\ty1 = io->pointlist[2 * b];\n\t\t\ty2 = io->pointlist[2 * b + 1];\n\n\t\t\tif ((x1 == x2) && (y1 == y2)) {\n\t\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\t\treturn TRI_FAILURE;\n\t\t\t}\n\t\t}", "parent": 133, "children": [171, 189], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 57, "column": 3}}, {"id": 171, "type": "parenthesized_expression", "text": "((a < firstnumber) || (a >= firstnumber + invertices))", "parent": 170, "children": [172], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 59}}, {"id": 172, "type": "binary_expression", "text": "(a < firstnumber) || (a >= firstnumber + invertices)", "parent": 171, "children": [173, 178, 179], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 58}}, {"id": 173, "type": "parenthesized_expression", "text": "(a < firstnumber)", "parent": 172, "children": [174], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 23}}, {"id": 174, "type": "binary_expression", "text": "a < firstnumber", "parent": 173, "children": [175, 176, 177], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 22}}, {"id": 175, "type": "identifier", "text": "a", "parent": 174, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 8}}, {"id": 176, "type": "<", "text": "<", "parent": 174, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 10}}, {"id": 177, "type": "identifier", "text": "firstnumber", "parent": 174, "children": [], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 22}}, {"id": 178, "type": "||", "text": "||", "parent": 172, "children": [], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 26}}, {"id": 179, "type": "parenthesized_expression", "text": "(a >= firstnumber + invertices)", "parent": 172, "children": [180], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 58}}, {"id": 180, "type": "binary_expression", "text": "a >= firstnumber + invertices", "parent": 179, "children": [181, 182, 183], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 57}}, {"id": 181, "type": "identifier", "text": "a", "parent": 180, "children": [], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 29}}, {"id": 182, "type": ">=", "text": ">=", "parent": 180, "children": [], "start_point": {"row": 38, "column": 30}, "end_point": {"row": 38, "column": 32}}, {"id": 183, "type": "binary_expression", "text": "firstnumber + invertices", "parent": 180, "children": [184, 185, 186], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 57}}, {"id": 184, "type": "identifier", "text": "firstnumber", "parent": 183, "children": [], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 44}}, {"id": 185, "type": "+", "text": "+", "parent": 183, "children": [], "start_point": {"row": 38, "column": 45}, "end_point": {"row": 38, "column": 46}}, {"id": 186, "type": "identifier", "text": "invertices", "parent": 183, "children": [], "start_point": {"row": 38, "column": 47}, "end_point": {"row": 38, "column": 57}}, {"id": 187, "type": "return_statement", "text": "return TRI_FAILURE;", "parent": 170, "children": [188], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 22}}, {"id": 188, "type": "identifier", "text": "TRI_FAILURE", "parent": 187, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 21}}, {"id": 189, "type": "else_clause", "text": "else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n\t\t\t// TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n\t\t\treturn TRI_FAILURE;\n\t\t} else if (a == b) {\n\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\treturn TRI_FAILURE;\n\t\t} else {\n\t\t\tx1 = io->pointlist[2 * a];\n\t\t\tx2 = io->pointlist[2 * a + 1];\n\t\t\ty1 = io->pointlist[2 * b];\n\t\t\ty2 = io->pointlist[2 * b + 1];\n\n\t\t\tif ((x1 == x2) && (y1 == y2)) {\n\t\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\t\treturn TRI_FAILURE;\n\t\t\t}\n\t\t}", "parent": 170, "children": [190], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 57, "column": 3}}, {"id": 190, "type": "if_statement", "text": "if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n\t\t\t// TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n\t\t\treturn TRI_FAILURE;\n\t\t} else if (a == b) {\n\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\treturn TRI_FAILURE;\n\t\t} else {\n\t\t\tx1 = io->pointlist[2 * a];\n\t\t\tx2 = io->pointlist[2 * a + 1];\n\t\t\ty1 = io->pointlist[2 * b];\n\t\t\ty2 = io->pointlist[2 * b + 1];\n\n\t\t\tif ((x1 == x2) && (y1 == y2)) {\n\t\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\t\treturn TRI_FAILURE;\n\t\t\t}\n\t\t}", "parent": 189, "children": [191, 209], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 57, "column": 3}}, {"id": 191, "type": "parenthesized_expression", "text": "((b < firstnumber) || (b >= firstnumber + invertices))", "parent": 190, "children": [192], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 66}}, {"id": 192, "type": "binary_expression", "text": "(b < firstnumber) || (b >= firstnumber + invertices)", "parent": 191, "children": [193, 198, 199], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 65}}, {"id": 193, "type": "parenthesized_expression", "text": "(b < firstnumber)", "parent": 192, "children": [194], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 30}}, {"id": 194, "type": "binary_expression", "text": "b < firstnumber", "parent": 193, "children": [195, 196, 197], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 29}}, {"id": 195, "type": "identifier", "text": "b", "parent": 194, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 15}}, {"id": 196, "type": "<", "text": "<", "parent": 194, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 17}}, {"id": 197, "type": "identifier", "text": "firstnumber", "parent": 194, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 29}}, {"id": 198, "type": "||", "text": "||", "parent": 192, "children": [], "start_point": {"row": 41, "column": 31}, "end_point": {"row": 41, "column": 33}}, {"id": 199, "type": "parenthesized_expression", "text": "(b >= firstnumber + invertices)", "parent": 192, "children": [200], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 65}}, {"id": 200, "type": "binary_expression", "text": "b >= firstnumber + invertices", "parent": 199, "children": [201, 202, 203], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 64}}, {"id": 201, "type": "identifier", "text": "b", "parent": 200, "children": [], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 36}}, {"id": 202, "type": ">=", "text": ">=", "parent": 200, "children": [], "start_point": {"row": 41, "column": 37}, "end_point": {"row": 41, "column": 39}}, {"id": 203, "type": "binary_expression", "text": "firstnumber + invertices", "parent": 200, "children": [204, 205, 206], "start_point": {"row": 41, "column": 40}, "end_point": {"row": 41, "column": 64}}, {"id": 204, "type": "identifier", "text": "firstnumber", "parent": 203, "children": [], "start_point": {"row": 41, "column": 40}, "end_point": {"row": 41, "column": 51}}, {"id": 205, "type": "+", "text": "+", "parent": 203, "children": [], "start_point": {"row": 41, "column": 52}, "end_point": {"row": 41, "column": 53}}, {"id": 206, "type": "identifier", "text": "invertices", "parent": 203, "children": [], "start_point": {"row": 41, "column": 54}, "end_point": {"row": 41, "column": 64}}, {"id": 207, "type": "return_statement", "text": "return TRI_FAILURE;", "parent": 190, "children": [208], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 22}}, {"id": 208, "type": "identifier", "text": "TRI_FAILURE", "parent": 207, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 21}}, {"id": 209, "type": "else_clause", "text": "else if (a == b) {\n\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\treturn TRI_FAILURE;\n\t\t} else {\n\t\t\tx1 = io->pointlist[2 * a];\n\t\t\tx2 = io->pointlist[2 * a + 1];\n\t\t\ty1 = io->pointlist[2 * b];\n\t\t\ty2 = io->pointlist[2 * b + 1];\n\n\t\t\tif ((x1 == x2) && (y1 == y2)) {\n\t\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\t\treturn TRI_FAILURE;\n\t\t\t}\n\t\t}", "parent": 190, "children": [210], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 57, "column": 3}}, {"id": 210, "type": "if_statement", "text": "if (a == b) {\n\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\treturn TRI_FAILURE;\n\t\t} else {\n\t\t\tx1 = io->pointlist[2 * a];\n\t\t\tx2 = io->pointlist[2 * a + 1];\n\t\t\ty1 = io->pointlist[2 * b];\n\t\t\ty2 = io->pointlist[2 * b + 1];\n\n\t\t\tif ((x1 == x2) && (y1 == y2)) {\n\t\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\t\treturn TRI_FAILURE;\n\t\t\t}\n\t\t}", "parent": 209, "children": [211, 218], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 57, "column": 3}}, {"id": 211, "type": "parenthesized_expression", "text": "(a == b)", "parent": 210, "children": [212], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 20}}, {"id": 212, "type": "binary_expression", "text": "a == b", "parent": 211, "children": [213, 214, 215], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 19}}, {"id": 213, "type": "identifier", "text": "a", "parent": 212, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 14}}, {"id": 214, "type": "==", "text": "==", "parent": 212, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 17}}, {"id": 215, "type": "identifier", "text": "b", "parent": 212, "children": [], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 19}}, {"id": 216, "type": "return_statement", "text": "return TRI_FAILURE;", "parent": 210, "children": [217], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 22}}, {"id": 217, "type": "identifier", "text": "TRI_FAILURE", "parent": 216, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 21}}, {"id": 218, "type": "else_clause", "text": "else {\n\t\t\tx1 = io->pointlist[2 * a];\n\t\t\tx2 = io->pointlist[2 * a + 1];\n\t\t\ty1 = io->pointlist[2 * b];\n\t\t\ty2 = io->pointlist[2 * b + 1];\n\n\t\t\tif ((x1 == x2) && (y1 == y2)) {\n\t\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\t\treturn TRI_FAILURE;\n\t\t\t}\n\t\t}", "parent": 210, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 57, "column": 3}}, {"id": 219, "type": "assignment_expression", "text": "x1 = io->pointlist[2 * a]", "parent": 218, "children": [220, 221, 222], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 28}}, {"id": 220, "type": "identifier", "text": "x1", "parent": 219, "children": [], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 5}}, {"id": 221, "type": "=", "text": "=", "parent": 219, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 7}}, {"id": 222, "type": "subscript_expression", "text": "io->pointlist[2 * a]", "parent": 219, "children": [223, 226], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 28}}, {"id": 223, "type": "field_expression", "text": "io->pointlist", "parent": 222, "children": [224, 225], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 21}}, {"id": 224, "type": "identifier", "text": "io", "parent": 223, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 10}}, {"id": 225, "type": "field_identifier", "text": "pointlist", "parent": 223, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 21}}, {"id": 226, "type": "binary_expression", "text": "2 * a", "parent": 222, "children": [227, 228, 229], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 27}}, {"id": 227, "type": "number_literal", "text": "2", "parent": 226, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 23}}, {"id": 228, "type": "*", "text": "*", "parent": 226, "children": [], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 25}}, {"id": 229, "type": "identifier", "text": "a", "parent": 226, "children": [], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 27}}, {"id": 230, "type": "assignment_expression", "text": "x2 = io->pointlist[2 * a + 1]", "parent": 218, "children": [231, 232, 233], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 32}}, {"id": 231, "type": "identifier", "text": "x2", "parent": 230, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 5}}, {"id": 232, "type": "=", "text": "=", "parent": 230, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 7}}, {"id": 233, "type": "subscript_expression", "text": "io->pointlist[2 * a + 1]", "parent": 230, "children": [234, 237], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 32}}, {"id": 234, "type": "field_expression", "text": "io->pointlist", "parent": 233, "children": [235, 236], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 21}}, {"id": 235, "type": "identifier", "text": "io", "parent": 234, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 10}}, {"id": 236, "type": "field_identifier", "text": "pointlist", "parent": 234, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 21}}, {"id": 237, "type": "binary_expression", "text": "2 * a + 1", "parent": 233, "children": [238, 242, 243], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 31}}, {"id": 238, "type": "binary_expression", "text": "2 * a", "parent": 237, "children": [239, 240, 241], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 27}}, {"id": 239, "type": "number_literal", "text": "2", "parent": 238, "children": [], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 23}}, {"id": 240, "type": "*", "text": "*", "parent": 238, "children": [], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 25}}, {"id": 241, "type": "identifier", "text": "a", "parent": 238, "children": [], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 27}}, {"id": 242, "type": "+", "text": "+", "parent": 237, "children": [], "start_point": {"row": 49, "column": 28}, "end_point": {"row": 49, "column": 29}}, {"id": 243, "type": "number_literal", "text": "1", "parent": 237, "children": [], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 31}}, {"id": 244, "type": "assignment_expression", "text": "y1 = io->pointlist[2 * b]", "parent": 218, "children": [245, 246, 247], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 28}}, {"id": 245, "type": "identifier", "text": "y1", "parent": 244, "children": [], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 5}}, {"id": 246, "type": "=", "text": "=", "parent": 244, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 7}}, {"id": 247, "type": "subscript_expression", "text": "io->pointlist[2 * b]", "parent": 244, "children": [248, 251], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 28}}, {"id": 248, "type": "field_expression", "text": "io->pointlist", "parent": 247, "children": [249, 250], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 21}}, {"id": 249, "type": "identifier", "text": "io", "parent": 248, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 10}}, {"id": 250, "type": "field_identifier", "text": "pointlist", "parent": 248, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 21}}, {"id": 251, "type": "binary_expression", "text": "2 * b", "parent": 247, "children": [252, 253, 254], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 27}}, {"id": 252, "type": "number_literal", "text": "2", "parent": 251, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 23}}, {"id": 253, "type": "*", "text": "*", "parent": 251, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 25}}, {"id": 254, "type": "identifier", "text": "b", "parent": 251, "children": [], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 27}}, {"id": 255, "type": "assignment_expression", "text": "y2 = io->pointlist[2 * b + 1]", "parent": 218, "children": [256, 257, 258], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 32}}, {"id": 256, "type": "identifier", "text": "y2", "parent": 255, "children": [], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 5}}, {"id": 257, "type": "=", "text": "=", "parent": 255, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 7}}, {"id": 258, "type": "subscript_expression", "text": "io->pointlist[2 * b + 1]", "parent": 255, "children": [259, 262], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 32}}, {"id": 259, "type": "field_expression", "text": "io->pointlist", "parent": 258, "children": [260, 261], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 21}}, {"id": 260, "type": "identifier", "text": "io", "parent": 259, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 10}}, {"id": 261, "type": "field_identifier", "text": "pointlist", "parent": 259, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 21}}, {"id": 262, "type": "binary_expression", "text": "2 * b + 1", "parent": 258, "children": [263, 267, 268], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 31}}, {"id": 263, "type": "binary_expression", "text": "2 * b", "parent": 262, "children": [264, 265, 266], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 27}}, {"id": 264, "type": "number_literal", "text": "2", "parent": 263, "children": [], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 23}}, {"id": 265, "type": "*", "text": "*", "parent": 263, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 25}}, {"id": 266, "type": "identifier", "text": "b", "parent": 263, "children": [], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 27}}, {"id": 267, "type": "+", "text": "+", "parent": 262, "children": [], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 29}}, {"id": 268, "type": "number_literal", "text": "1", "parent": 262, "children": [], "start_point": {"row": 51, "column": 30}, "end_point": {"row": 51, "column": 31}}, {"id": 269, "type": "if_statement", "text": "if ((x1 == x2) && (y1 == y2)) {\n\t\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\t\treturn TRI_FAILURE;\n\t\t\t}", "parent": 218, "children": [270], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 56, "column": 4}}, {"id": 270, "type": "parenthesized_expression", "text": "((x1 == x2) && (y1 == y2))", "parent": 269, "children": [271], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 32}}, {"id": 271, "type": "binary_expression", "text": "(x1 == x2) && (y1 == y2)", "parent": 270, "children": [272, 277, 278], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 31}}, {"id": 272, "type": "parenthesized_expression", "text": "(x1 == x2)", "parent": 271, "children": [273], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 17}}, {"id": 273, "type": "binary_expression", "text": "x1 == x2", "parent": 272, "children": [274, 275, 276], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 16}}, {"id": 274, "type": "identifier", "text": "x1", "parent": 273, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 10}}, {"id": 275, "type": "==", "text": "==", "parent": 273, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 13}}, {"id": 276, "type": "identifier", "text": "x2", "parent": 273, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 16}}, {"id": 277, "type": "&&", "text": "&&", "parent": 271, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 20}}, {"id": 278, "type": "parenthesized_expression", "text": "(y1 == y2)", "parent": 271, "children": [279], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 31}}, {"id": 279, "type": "binary_expression", "text": "y1 == y2", "parent": 278, "children": [280, 281, 282], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 30}}, {"id": 280, "type": "identifier", "text": "y1", "parent": 279, "children": [], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 24}}, {"id": 281, "type": "==", "text": "==", "parent": 279, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 27}}, {"id": 282, "type": "identifier", "text": "y2", "parent": 279, "children": [], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 30}}, {"id": 283, "type": "return_statement", "text": "return TRI_FAILURE;", "parent": 269, "children": [284], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 23}}, {"id": 284, "type": "identifier", "text": "TRI_FAILURE", "parent": 283, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 22}}, {"id": 285, "type": "for_statement", "text": "for (i = 0; i < inelements; i++) {\n\t\ta = io->trianglelist[corners * i];\n\t\tb = io->trianglelist[corners * i + 1];\n\t\tc = io->trianglelist[corners * i + 2];\n\n\t\tif ((a < firstnumber) || (a >= firstnumber + invertices) ||\n\t\t\t(b < firstnumber) || (b >= firstnumber + invertices) ||\n\t\t\t(c < firstnumber) || (c >= firstnumber + invertices)) {\n\t\t\t\t// TODO: Error: Triangle (i) has an invalid vertex index.\n\t\t\t\treturn TRI_FAILURE;\n\t\t}\n\t}", "parent": 74, "children": [286, 290, 294], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 71, "column": 2}}, {"id": 286, "type": "assignment_expression", "text": "i = 0", "parent": 285, "children": [287, 288, 289], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 11}}, {"id": 287, "type": "identifier", "text": "i", "parent": 286, "children": [], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 7}}, {"id": 288, "type": "=", "text": "=", "parent": 286, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 9}}, {"id": 289, "type": "number_literal", "text": "0", "parent": 286, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 11}}, {"id": 290, "type": "binary_expression", "text": "i < inelements", "parent": 285, "children": [291, 292, 293], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 27}}, {"id": 291, "type": "identifier", "text": "i", "parent": 290, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 14}}, {"id": 292, "type": "<", "text": "<", "parent": 290, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 16}}, {"id": 293, "type": "identifier", "text": "inelements", "parent": 290, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 27}}, {"id": 294, "type": "update_expression", "text": "i++", "parent": 285, "children": [295, 296], "start_point": {"row": 60, "column": 29}, "end_point": {"row": 60, "column": 32}}, {"id": 295, "type": "identifier", "text": "i", "parent": 294, "children": [], "start_point": {"row": 60, "column": 29}, "end_point": {"row": 60, "column": 30}}, {"id": 296, "type": "++", "text": "++", "parent": 294, "children": [], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 32}}, {"id": 297, "type": "assignment_expression", "text": "a = io->trianglelist[corners * i]", "parent": 285, "children": [298, 299, 300], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 35}}, {"id": 298, "type": "identifier", "text": "a", "parent": 297, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 3}}, {"id": 299, "type": "=", "text": "=", "parent": 297, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 5}}, {"id": 300, "type": "subscript_expression", "text": "io->trianglelist[corners * i]", "parent": 297, "children": [301, 304], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 35}}, {"id": 301, "type": "field_expression", "text": "io->trianglelist", "parent": 300, "children": [302, 303], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 22}}, {"id": 302, "type": "identifier", "text": "io", "parent": 301, "children": [], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 8}}, {"id": 303, "type": "field_identifier", "text": "trianglelist", "parent": 301, "children": [], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 22}}, {"id": 304, "type": "binary_expression", "text": "corners * i", "parent": 300, "children": [305, 306, 307], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 34}}, {"id": 305, "type": "identifier", "text": "corners", "parent": 304, "children": [], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 30}}, {"id": 306, "type": "*", "text": "*", "parent": 304, "children": [], "start_point": {"row": 61, "column": 31}, "end_point": {"row": 61, "column": 32}}, {"id": 307, "type": "identifier", "text": "i", "parent": 304, "children": [], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 34}}, {"id": 308, "type": "assignment_expression", "text": "b = io->trianglelist[corners * i + 1]", "parent": 285, "children": [309, 310, 311], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 39}}, {"id": 309, "type": "identifier", "text": "b", "parent": 308, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 3}}, {"id": 310, "type": "=", "text": "=", "parent": 308, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 5}}, {"id": 311, "type": "subscript_expression", "text": "io->trianglelist[corners * i + 1]", "parent": 308, "children": [312, 315], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 39}}, {"id": 312, "type": "field_expression", "text": "io->trianglelist", "parent": 311, "children": [313, 314], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 22}}, {"id": 313, "type": "identifier", "text": "io", "parent": 312, "children": [], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 8}}, {"id": 314, "type": "field_identifier", "text": "trianglelist", "parent": 312, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 22}}, {"id": 315, "type": "binary_expression", "text": "corners * i + 1", "parent": 311, "children": [316, 320, 321], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 38}}, {"id": 316, "type": "binary_expression", "text": "corners * i", "parent": 315, "children": [317, 318, 319], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 34}}, {"id": 317, "type": "identifier", "text": "corners", "parent": 316, "children": [], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 30}}, {"id": 318, "type": "*", "text": "*", "parent": 316, "children": [], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 32}}, {"id": 319, "type": "identifier", "text": "i", "parent": 316, "children": [], "start_point": {"row": 62, "column": 33}, "end_point": {"row": 62, "column": 34}}, {"id": 320, "type": "+", "text": "+", "parent": 315, "children": [], "start_point": {"row": 62, "column": 35}, "end_point": {"row": 62, "column": 36}}, {"id": 321, "type": "number_literal", "text": "1", "parent": 315, "children": [], "start_point": {"row": 62, "column": 37}, "end_point": {"row": 62, "column": 38}}, {"id": 322, "type": "assignment_expression", "text": "c = io->trianglelist[corners * i + 2]", "parent": 285, "children": [323, 324, 325], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 39}}, {"id": 323, "type": "identifier", "text": "c", "parent": 322, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 3}}, {"id": 324, "type": "=", "text": "=", "parent": 322, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 5}}, {"id": 325, "type": "subscript_expression", "text": "io->trianglelist[corners * i + 2]", "parent": 322, "children": [326, 329], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 39}}, {"id": 326, "type": "field_expression", "text": "io->trianglelist", "parent": 325, "children": [327, 328], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 22}}, {"id": 327, "type": "identifier", "text": "io", "parent": 326, "children": [], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 8}}, {"id": 328, "type": "field_identifier", "text": "trianglelist", "parent": 326, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 22}}, {"id": 329, "type": "binary_expression", "text": "corners * i + 2", "parent": 325, "children": [330, 334, 335], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 38}}, {"id": 330, "type": "binary_expression", "text": "corners * i", "parent": 329, "children": [331, 332, 333], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 34}}, {"id": 331, "type": "identifier", "text": "corners", "parent": 330, "children": [], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 30}}, {"id": 332, "type": "*", "text": "*", "parent": 330, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 32}}, {"id": 333, "type": "identifier", "text": "i", "parent": 330, "children": [], "start_point": {"row": 63, "column": 33}, "end_point": {"row": 63, "column": 34}}, {"id": 334, "type": "+", "text": "+", "parent": 329, "children": [], "start_point": {"row": 63, "column": 35}, "end_point": {"row": 63, "column": 36}}, {"id": 335, "type": "number_literal", "text": "2", "parent": 329, "children": [], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 38}}, {"id": 336, "type": "if_statement", "text": "if ((a < firstnumber) || (a >= firstnumber + invertices) ||\n\t\t\t(b < firstnumber) || (b >= firstnumber + invertices) ||\n\t\t\t(c < firstnumber) || (c >= firstnumber + invertices)) {\n\t\t\t\t// TODO: Error: Triangle (i) has an invalid vertex index.\n\t\t\t\treturn TRI_FAILURE;\n\t\t}", "parent": 285, "children": [337], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 70, "column": 3}}, {"id": 337, "type": "parenthesized_expression", "text": "((a < firstnumber) || (a >= firstnumber + invertices) ||\n\t\t\t(b < firstnumber) || (b >= firstnumber + invertices) ||\n\t\t\t(c < firstnumber) || (c >= firstnumber + invertices))", "parent": 336, "children": [338], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 67, "column": 56}}, {"id": 338, "type": "binary_expression", "text": "(a < firstnumber) || (a >= firstnumber + invertices) ||\n\t\t\t(b < firstnumber) || (b >= firstnumber + invertices) ||\n\t\t\t(c < firstnumber) || (c >= firstnumber + invertices)", "parent": 337, "children": [339, 378, 379], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 67, "column": 55}}, {"id": 339, "type": "binary_expression", "text": "(a < firstnumber) || (a >= firstnumber + invertices) ||\n\t\t\t(b < firstnumber) || (b >= firstnumber + invertices) ||\n\t\t\t(c < firstnumber)", "parent": 338, "children": [340, 372, 373], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 67, "column": 20}}, {"id": 340, "type": "binary_expression", "text": "(a < firstnumber) || (a >= firstnumber + invertices) ||\n\t\t\t(b < firstnumber) || (b >= firstnumber + invertices)", "parent": 339, "children": [341, 363, 364], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 66, "column": 55}}, {"id": 341, "type": "binary_expression", "text": "(a < firstnumber) || (a >= firstnumber + invertices) ||\n\t\t\t(b < firstnumber)", "parent": 340, "children": [342, 357, 358], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 66, "column": 20}}, {"id": 342, "type": "binary_expression", "text": "(a < firstnumber) || (a >= firstnumber + invertices)", "parent": 341, "children": [343, 348, 349], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 58}}, {"id": 343, "type": "parenthesized_expression", "text": "(a < firstnumber)", "parent": 342, "children": [344], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 23}}, {"id": 344, "type": "binary_expression", "text": "a < firstnumber", "parent": 343, "children": [345, 346, 347], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 22}}, {"id": 345, "type": "identifier", "text": "a", "parent": 344, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 8}}, {"id": 346, "type": "<", "text": "<", "parent": 344, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 10}}, {"id": 347, "type": "identifier", "text": "firstnumber", "parent": 344, "children": [], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 22}}, {"id": 348, "type": "||", "text": "||", "parent": 342, "children": [], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 26}}, {"id": 349, "type": "parenthesized_expression", "text": "(a >= firstnumber + invertices)", "parent": 342, "children": [350], "start_point": {"row": 65, "column": 27}, "end_point": {"row": 65, "column": 58}}, {"id": 350, "type": "binary_expression", "text": "a >= firstnumber + invertices", "parent": 349, "children": [351, 352, 353], "start_point": {"row": 65, "column": 28}, "end_point": {"row": 65, "column": 57}}, {"id": 351, "type": "identifier", "text": "a", "parent": 350, "children": [], "start_point": {"row": 65, "column": 28}, "end_point": {"row": 65, "column": 29}}, {"id": 352, "type": ">=", "text": ">=", "parent": 350, "children": [], "start_point": {"row": 65, "column": 30}, "end_point": {"row": 65, "column": 32}}, {"id": 353, "type": "binary_expression", "text": "firstnumber + invertices", "parent": 350, "children": [354, 355, 356], "start_point": {"row": 65, "column": 33}, "end_point": {"row": 65, "column": 57}}, {"id": 354, "type": "identifier", "text": "firstnumber", "parent": 353, "children": [], "start_point": {"row": 65, "column": 33}, "end_point": {"row": 65, "column": 44}}, {"id": 355, "type": "+", "text": "+", "parent": 353, "children": [], "start_point": {"row": 65, "column": 45}, "end_point": {"row": 65, "column": 46}}, {"id": 356, "type": "identifier", "text": "invertices", "parent": 353, "children": [], "start_point": {"row": 65, "column": 47}, "end_point": {"row": 65, "column": 57}}, {"id": 357, "type": "||", "text": "||", "parent": 341, "children": [], "start_point": {"row": 65, "column": 59}, "end_point": {"row": 65, "column": 61}}, {"id": 358, "type": "parenthesized_expression", "text": "(b < firstnumber)", "parent": 341, "children": [359], "start_point": {"row": 66, "column": 3}, "end_point": {"row": 66, "column": 20}}, {"id": 359, "type": "binary_expression", "text": "b < firstnumber", "parent": 358, "children": [360, 361, 362], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 19}}, {"id": 360, "type": "identifier", "text": "b", "parent": 359, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 5}}, {"id": 361, "type": "<", "text": "<", "parent": 359, "children": [], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 7}}, {"id": 362, "type": "identifier", "text": "firstnumber", "parent": 359, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 19}}, {"id": 363, "type": "||", "text": "||", "parent": 340, "children": [], "start_point": {"row": 66, "column": 21}, "end_point": {"row": 66, "column": 23}}, {"id": 364, "type": "parenthesized_expression", "text": "(b >= firstnumber + invertices)", "parent": 340, "children": [365], "start_point": {"row": 66, "column": 24}, "end_point": {"row": 66, "column": 55}}, {"id": 365, "type": "binary_expression", "text": "b >= firstnumber + invertices", "parent": 364, "children": [366, 367, 368], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 54}}, {"id": 366, "type": "identifier", "text": "b", "parent": 365, "children": [], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 26}}, {"id": 367, "type": ">=", "text": ">=", "parent": 365, "children": [], "start_point": {"row": 66, "column": 27}, "end_point": {"row": 66, "column": 29}}, {"id": 368, "type": "binary_expression", "text": "firstnumber + invertices", "parent": 365, "children": [369, 370, 371], "start_point": {"row": 66, "column": 30}, "end_point": {"row": 66, "column": 54}}, {"id": 369, "type": "identifier", "text": "firstnumber", "parent": 368, "children": [], "start_point": {"row": 66, "column": 30}, "end_point": {"row": 66, "column": 41}}, {"id": 370, "type": "+", "text": "+", "parent": 368, "children": [], "start_point": {"row": 66, "column": 42}, "end_point": {"row": 66, "column": 43}}, {"id": 371, "type": "identifier", "text": "invertices", "parent": 368, "children": [], "start_point": {"row": 66, "column": 44}, "end_point": {"row": 66, "column": 54}}, {"id": 372, "type": "||", "text": "||", "parent": 339, "children": [], "start_point": {"row": 66, "column": 56}, "end_point": {"row": 66, "column": 58}}, {"id": 373, "type": "parenthesized_expression", "text": "(c < firstnumber)", "parent": 339, "children": [374], "start_point": {"row": 67, "column": 3}, "end_point": {"row": 67, "column": 20}}, {"id": 374, "type": "binary_expression", "text": "c < firstnumber", "parent": 373, "children": [375, 376, 377], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 19}}, {"id": 375, "type": "identifier", "text": "c", "parent": 374, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 5}}, {"id": 376, "type": "<", "text": "<", "parent": 374, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 7}}, {"id": 377, "type": "identifier", "text": "firstnumber", "parent": 374, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 19}}, {"id": 378, "type": "||", "text": "||", "parent": 338, "children": [], "start_point": {"row": 67, "column": 21}, "end_point": {"row": 67, "column": 23}}, {"id": 379, "type": "parenthesized_expression", "text": "(c >= firstnumber + invertices)", "parent": 338, "children": [380], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 67, "column": 55}}, {"id": 380, "type": "binary_expression", "text": "c >= firstnumber + invertices", "parent": 379, "children": [381, 382, 383], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 54}}, {"id": 381, "type": "identifier", "text": "c", "parent": 380, "children": [], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 26}}, {"id": 382, "type": ">=", "text": ">=", "parent": 380, "children": [], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 29}}, {"id": 383, "type": "binary_expression", "text": "firstnumber + invertices", "parent": 380, "children": [384, 385, 386], "start_point": {"row": 67, "column": 30}, "end_point": {"row": 67, "column": 54}}, {"id": 384, "type": "identifier", "text": "firstnumber", "parent": 383, "children": [], "start_point": {"row": 67, "column": 30}, "end_point": {"row": 67, "column": 41}}, {"id": 385, "type": "+", "text": "+", "parent": 383, "children": [], "start_point": {"row": 67, "column": 42}, "end_point": {"row": 67, "column": 43}}, {"id": 386, "type": "identifier", "text": "invertices", "parent": 383, "children": [], "start_point": {"row": 67, "column": 44}, "end_point": {"row": 67, "column": 54}}, {"id": 387, "type": "return_statement", "text": "return TRI_FAILURE;", "parent": 336, "children": [388], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 23}}, {"id": 388, "type": "identifier", "text": "TRI_FAILURE", "parent": 387, "children": [], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 22}}, {"id": 389, "type": "return_statement", "text": "return TRI_OK;", "parent": 74, "children": [390], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 15}}, {"id": 390, "type": "identifier", "text": "TRI_OK", "parent": 389, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 14}}, {"id": 391, "type": "function_definition", "text": "void triangle_restore_pointmarkers(context* ctx, int *pointmarkers)\n{\n\tmesh *m;\n\tbehavior *b;\n\tvertex vertexloop;\n\tint vertexnumber;\n\n\tm = ctx->m;\n\tb = ctx->b;\n\n\ttraversalinit(&m->vertices);\n\tvertexnumber = 0;\n\tvertexloop = vertextraverse(m);\n\twhile (vertexloop != (vertex)NULL) {\n\t\tif (!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)) {\n\t\t\tsetvertexmark(vertexloop, pointmarkers[vertexnumber]);\n\t\t\tvertexnumber++;\n\t\t}\n\t\tvertexloop = vertextraverse(m);\n\t}\n}", "parent": null, "children": [392, 393], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 96, "column": 1}}, {"id": 392, "type": "primitive_type", "text": "void", "parent": 391, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 4}}, {"id": 393, "type": "function_declarator", "text": "triangle_restore_pointmarkers(context* ctx, int *pointmarkers)", "parent": 391, "children": [394, 395], "start_point": {"row": 76, "column": 5}, "end_point": {"row": 76, "column": 67}}, {"id": 394, "type": "identifier", "text": "triangle_restore_pointmarkers", "parent": 393, "children": [], "start_point": {"row": 76, "column": 5}, "end_point": {"row": 76, "column": 34}}, {"id": 395, "type": "parameter_list", "text": "(context* ctx, int *pointmarkers)", "parent": 393, "children": [396, 401], "start_point": {"row": 76, "column": 34}, "end_point": {"row": 76, "column": 67}}, {"id": 396, "type": "parameter_declaration", "text": "context* ctx", "parent": 395, "children": [397, 398], "start_point": {"row": 76, "column": 35}, "end_point": {"row": 76, "column": 47}}, {"id": 397, "type": "type_identifier", "text": "context", "parent": 396, "children": [], "start_point": {"row": 76, "column": 35}, "end_point": {"row": 76, "column": 42}}, {"id": 398, "type": "pointer_declarator", "text": "* ctx", "parent": 396, "children": [399, 400], "start_point": {"row": 76, "column": 42}, "end_point": {"row": 76, "column": 47}}, {"id": 399, "type": "*", "text": "*", "parent": 398, "children": [], "start_point": {"row": 76, "column": 42}, "end_point": {"row": 76, "column": 43}}, {"id": 400, "type": "identifier", "text": "ctx", "parent": 398, "children": [], "start_point": {"row": 76, "column": 44}, "end_point": {"row": 76, "column": 47}}, {"id": 401, "type": "parameter_declaration", "text": "int *pointmarkers", "parent": 395, "children": [402, 403], "start_point": {"row": 76, "column": 49}, "end_point": {"row": 76, "column": 66}}, {"id": 402, "type": "primitive_type", "text": "int", "parent": 401, "children": [], "start_point": {"row": 76, "column": 49}, "end_point": {"row": 76, "column": 52}}, {"id": 403, "type": "pointer_declarator", "text": "*pointmarkers", "parent": 401, "children": [404, 405], "start_point": {"row": 76, "column": 53}, "end_point": {"row": 76, "column": 66}}, {"id": 404, "type": "*", "text": "*", "parent": 403, "children": [], "start_point": {"row": 76, "column": 53}, "end_point": {"row": 76, "column": 54}}, {"id": 405, "type": "identifier", "text": "pointmarkers", "parent": 403, "children": [], "start_point": {"row": 76, "column": 54}, "end_point": {"row": 76, "column": 66}}, {"id": 406, "type": "declaration", "text": "mesh *m;", "parent": 391, "children": [407, 408], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 9}}, {"id": 407, "type": "type_identifier", "text": "mesh", "parent": 406, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 5}}, {"id": 408, "type": "pointer_declarator", "text": "*m", "parent": 406, "children": [409, 410], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 8}}, {"id": 409, "type": "*", "text": "*", "parent": 408, "children": [], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 7}}, {"id": 410, "type": "identifier", "text": "m", "parent": 408, "children": [], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 8}}, {"id": 411, "type": "declaration", "text": "behavior *b;", "parent": 391, "children": [412, 413], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 13}}, {"id": 412, "type": "type_identifier", "text": "behavior", "parent": 411, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 9}}, {"id": 413, "type": "pointer_declarator", "text": "*b", "parent": 411, "children": [414, 415], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 12}}, {"id": 414, "type": "*", "text": "*", "parent": 413, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 11}}, {"id": 415, "type": "identifier", "text": "b", "parent": 413, "children": [], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 12}}, {"id": 416, "type": "declaration", "text": "vertex vertexloop;", "parent": 391, "children": [417, 418], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 19}}, {"id": 417, "type": "type_identifier", "text": "vertex", "parent": 416, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 7}}, {"id": 418, "type": "identifier", "text": "vertexloop", "parent": 416, "children": [], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 18}}, {"id": 419, "type": "declaration", "text": "int vertexnumber;", "parent": 391, "children": [420, 421], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 18}}, {"id": 420, "type": "primitive_type", "text": "int", "parent": 419, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 4}}, {"id": 421, "type": "identifier", "text": "vertexnumber", "parent": 419, "children": [], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 17}}, {"id": 422, "type": "assignment_expression", "text": "m = ctx->m", "parent": 391, "children": [423, 424, 425], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 11}}, {"id": 423, "type": "identifier", "text": "m", "parent": 422, "children": [], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 2}}, {"id": 424, "type": "=", "text": "=", "parent": 422, "children": [], "start_point": {"row": 83, "column": 3}, "end_point": {"row": 83, "column": 4}}, {"id": 425, "type": "field_expression", "text": "ctx->m", "parent": 422, "children": [426, 427], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 11}}, {"id": 426, "type": "identifier", "text": "ctx", "parent": 425, "children": [], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 8}}, {"id": 427, "type": "field_identifier", "text": "m", "parent": 425, "children": [], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 11}}, {"id": 428, "type": "assignment_expression", "text": "b = ctx->b", "parent": 391, "children": [429, 430, 431], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 11}}, {"id": 429, "type": "identifier", "text": "b", "parent": 428, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 2}}, {"id": 430, "type": "=", "text": "=", "parent": 428, "children": [], "start_point": {"row": 84, "column": 3}, "end_point": {"row": 84, "column": 4}}, {"id": 431, "type": "field_expression", "text": "ctx->b", "parent": 428, "children": [432, 433], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 11}}, {"id": 432, "type": "identifier", "text": "ctx", "parent": 431, "children": [], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 8}}, {"id": 433, "type": "field_identifier", "text": "b", "parent": 431, "children": [], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 11}}, {"id": 434, "type": "call_expression", "text": "traversalinit(&m->vertices)", "parent": 391, "children": [435, 436], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 28}}, {"id": 435, "type": "identifier", "text": "traversalinit", "parent": 434, "children": [], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 14}}, {"id": 436, "type": "argument_list", "text": "(&m->vertices)", "parent": 434, "children": [437], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 28}}, {"id": 437, "type": "pointer_expression", "text": "&m->vertices", "parent": 436, "children": [438], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 86, "column": 27}}, {"id": 438, "type": "field_expression", "text": "m->vertices", "parent": 437, "children": [439, 440], "start_point": {"row": 86, "column": 16}, "end_point": {"row": 86, "column": 27}}, {"id": 439, "type": "identifier", "text": "m", "parent": 438, "children": [], "start_point": {"row": 86, "column": 16}, "end_point": {"row": 86, "column": 17}}, {"id": 440, "type": "field_identifier", "text": "vertices", "parent": 438, "children": [], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 27}}, {"id": 441, "type": "assignment_expression", "text": "vertexnumber = 0", "parent": 391, "children": [442, 443, 444], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 17}}, {"id": 442, "type": "identifier", "text": "vertexnumber", "parent": 441, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 13}}, {"id": 443, "type": "=", "text": "=", "parent": 441, "children": [], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 15}}, {"id": 444, "type": "number_literal", "text": "0", "parent": 441, "children": [], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 17}}, {"id": 445, "type": "assignment_expression", "text": "vertexloop = vertextraverse(m)", "parent": 391, "children": [446, 447, 448], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 31}}, {"id": 446, "type": "identifier", "text": "vertexloop", "parent": 445, "children": [], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 11}}, {"id": 447, "type": "=", "text": "=", "parent": 445, "children": [], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 13}}, {"id": 448, "type": "call_expression", "text": "vertextraverse(m)", "parent": 445, "children": [449, 450], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 31}}, {"id": 449, "type": "identifier", "text": "vertextraverse", "parent": 448, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 28}}, {"id": 450, "type": "argument_list", "text": "(m)", "parent": 448, "children": [451], "start_point": {"row": 88, "column": 28}, "end_point": {"row": 88, "column": 31}}, {"id": 451, "type": "identifier", "text": "m", "parent": 450, "children": [], "start_point": {"row": 88, "column": 29}, "end_point": {"row": 88, "column": 30}}, {"id": 452, "type": "while_statement", "text": "while (vertexloop != (vertex)NULL) {\n\t\tif (!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)) {\n\t\t\tsetvertexmark(vertexloop, pointmarkers[vertexnumber]);\n\t\t\tvertexnumber++;\n\t\t}\n\t\tvertexloop = vertextraverse(m);\n\t}", "parent": 391, "children": [453], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 95, "column": 2}}, {"id": 453, "type": "parenthesized_expression", "text": "(vertexloop != (vertex)NULL)", "parent": 452, "children": [454], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 35}}, {"id": 454, "type": "binary_expression", "text": "vertexloop != (vertex)NULL", "parent": 453, "children": [455, 456, 457], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 34}}, {"id": 455, "type": "identifier", "text": "vertexloop", "parent": 454, "children": [], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 18}}, {"id": 456, "type": "!=", "text": "!=", "parent": 454, "children": [], "start_point": {"row": 89, "column": 19}, "end_point": {"row": 89, "column": 21}}, {"id": 457, "type": "cast_expression", "text": "(vertex)NULL", "parent": 454, "children": [458, 460], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 34}}, {"id": 458, "type": "type_descriptor", "text": "vertex", "parent": 457, "children": [459], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 29}}, {"id": 459, "type": "type_identifier", "text": "vertex", "parent": 458, "children": [], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 29}}, {"id": 460, "type": "null", "text": "NULL", "parent": 457, "children": [461], "start_point": {"row": 89, "column": 30}, "end_point": {"row": 89, "column": 34}}, {"id": 461, "type": "NULL", "text": "NULL", "parent": 460, "children": [], "start_point": {"row": 89, "column": 30}, "end_point": {"row": 89, "column": 34}}, {"id": 462, "type": "if_statement", "text": "if (!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)) {\n\t\t\tsetvertexmark(vertexloop, pointmarkers[vertexnumber]);\n\t\t\tvertexnumber++;\n\t\t}", "parent": 452, "children": [463], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 93, "column": 3}}, {"id": 463, "type": "parenthesized_expression", "text": "(!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX))", "parent": 462, "children": [464], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 63}}, {"id": 464, "type": "binary_expression", "text": "!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)", "parent": 463, "children": [465, 470, 471], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 62}}, {"id": 465, "type": "unary_expression", "text": "!b->jettison", "parent": 464, "children": [466, 467], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 18}}, {"id": 466, "type": "!", "text": "!", "parent": 465, "children": [], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 7}}, {"id": 467, "type": "field_expression", "text": "b->jettison", "parent": 465, "children": [468, 469], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 18}}, {"id": 468, "type": "identifier", "text": "b", "parent": 467, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 8}}, {"id": 469, "type": "field_identifier", "text": "jettison", "parent": 467, "children": [], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 18}}, {"id": 470, "type": "||", "text": "||", "parent": 464, "children": [], "start_point": {"row": 90, "column": 19}, "end_point": {"row": 90, "column": 21}}, {"id": 471, "type": "parenthesized_expression", "text": "(vertextype(vertexloop) != UNDEADVERTEX)", "parent": 464, "children": [472], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 62}}, {"id": 472, "type": "binary_expression", "text": "vertextype(vertexloop) != UNDEADVERTEX", "parent": 471, "children": [473, 477, 478], "start_point": {"row": 90, "column": 23}, "end_point": {"row": 90, "column": 61}}, {"id": 473, "type": "call_expression", "text": "vertextype(vertexloop)", "parent": 472, "children": [474, 475], "start_point": {"row": 90, "column": 23}, "end_point": {"row": 90, "column": 45}}, {"id": 474, "type": "identifier", "text": "vertextype", "parent": 473, "children": [], "start_point": {"row": 90, "column": 23}, "end_point": {"row": 90, "column": 33}}, {"id": 475, "type": "argument_list", "text": "(vertexloop)", "parent": 473, "children": [476], "start_point": {"row": 90, "column": 33}, "end_point": {"row": 90, "column": 45}}, {"id": 476, "type": "identifier", "text": "vertexloop", "parent": 475, "children": [], "start_point": {"row": 90, "column": 34}, "end_point": {"row": 90, "column": 44}}, {"id": 477, "type": "!=", "text": "!=", "parent": 472, "children": [], "start_point": {"row": 90, "column": 46}, "end_point": {"row": 90, "column": 48}}, {"id": 478, "type": "identifier", "text": "UNDEADVERTEX", "parent": 472, "children": [], "start_point": {"row": 90, "column": 49}, "end_point": {"row": 90, "column": 61}}, {"id": 479, "type": "call_expression", "text": "setvertexmark(vertexloop, pointmarkers[vertexnumber])", "parent": 462, "children": [480, 481], "start_point": {"row": 91, "column": 3}, "end_point": {"row": 91, "column": 56}}, {"id": 480, "type": "identifier", "text": "setvertexmark", "parent": 479, "children": [], "start_point": {"row": 91, "column": 3}, "end_point": {"row": 91, "column": 16}}, {"id": 481, "type": "argument_list", "text": "(vertexloop, pointmarkers[vertexnumber])", "parent": 479, "children": [482, 483], "start_point": {"row": 91, "column": 16}, "end_point": {"row": 91, "column": 56}}, {"id": 482, "type": "identifier", "text": "vertexloop", "parent": 481, "children": [], "start_point": {"row": 91, "column": 17}, "end_point": {"row": 91, "column": 27}}, {"id": 483, "type": "subscript_expression", "text": "pointmarkers[vertexnumber]", "parent": 481, "children": [484, 485], "start_point": {"row": 91, "column": 29}, "end_point": {"row": 91, "column": 55}}, {"id": 484, "type": "identifier", "text": "pointmarkers", "parent": 483, "children": [], "start_point": {"row": 91, "column": 29}, "end_point": {"row": 91, "column": 41}}, {"id": 485, "type": "identifier", "text": "vertexnumber", "parent": 483, "children": [], "start_point": {"row": 91, "column": 42}, "end_point": {"row": 91, "column": 54}}, {"id": 486, "type": "update_expression", "text": "vertexnumber++", "parent": 462, "children": [487, 488], "start_point": {"row": 92, "column": 3}, "end_point": {"row": 92, "column": 17}}, {"id": 487, "type": "identifier", "text": "vertexnumber", "parent": 486, "children": [], "start_point": {"row": 92, "column": 3}, "end_point": {"row": 92, "column": 15}}, {"id": 488, "type": "++", "text": "++", "parent": 486, "children": [], "start_point": {"row": 92, "column": 15}, "end_point": {"row": 92, "column": 17}}, {"id": 489, "type": "assignment_expression", "text": "vertexloop = vertextraverse(m)", "parent": 452, "children": [490, 491, 492], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 32}}, {"id": 490, "type": "identifier", "text": "vertexloop", "parent": 489, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 12}}, {"id": 491, "type": "=", "text": "=", "parent": 489, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 14}}, {"id": 492, "type": "call_expression", "text": "vertextraverse(m)", "parent": 489, "children": [493, 494], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 32}}, {"id": 493, "type": "identifier", "text": "vertextraverse", "parent": 492, "children": [], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 29}}, {"id": 494, "type": "argument_list", "text": "(m)", "parent": 492, "children": [495], "start_point": {"row": 94, "column": 29}, "end_point": {"row": 94, "column": 32}}, {"id": 495, "type": "identifier", "text": "m", "parent": 494, "children": [], "start_point": {"row": 94, "column": 30}, "end_point": {"row": 94, "column": 31}}]}, "node_categories": {"declarations": {"functions": [6, 8, 47, 49, 74, 76, 391, 393], "variables": [11, 52, 79, 84, 87, 90, 95, 101, 109, 117, 125, 396, 401, 406, 411, 416, 419], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [17, 18, 26, 27, 28, 29, 36, 37, 58, 59, 60, 64, 65, 106, 114, 122, 130, 138, 142, 148, 149, 152, 159, 160, 163, 164, 171, 172, 173, 174, 179, 180, 183, 191, 192, 193, 194, 199, 200, 203, 211, 212, 222, 223, 226, 233, 234, 237, 238, 247, 248, 251, 258, 259, 262, 263, 270, 271, 272, 273, 278, 279, 290, 294, 300, 301, 304, 311, 312, 315, 316, 325, 326, 329, 330, 337, 338, 339, 340, 341, 342, 343, 344, 349, 350, 353, 358, 359, 364, 365, 368, 373, 374, 379, 380, 383, 425, 431, 434, 437, 438, 448, 453, 454, 457, 463, 464, 465, 467, 471, 472, 473, 479, 483, 486, 492], "assignments": [134, 145, 156, 219, 230, 244, 255, 286, 297, 308, 322, 422, 428, 441, 445, 489], "loops": [133, 285, 452], "conditionals": [9, 12, 15, 16, 19, 24, 25, 30, 31, 38, 39, 44, 46, 50, 53, 56, 57, 61, 62, 66, 67, 71, 73, 77, 80, 83, 86, 89, 92, 93, 94, 96, 97, 98, 99, 100, 104, 107, 108, 112, 115, 116, 120, 123, 124, 128, 131, 132, 135, 139, 141, 143, 146, 150, 151, 155, 157, 161, 162, 167, 170, 175, 177, 181, 184, 186, 188, 190, 195, 197, 201, 204, 206, 208, 210, 213, 215, 217, 220, 224, 225, 229, 231, 235, 236, 241, 245, 249, 250, 254, 256, 260, 261, 266, 269, 274, 276, 280, 282, 284, 287, 291, 293, 295, 298, 302, 303, 305, 307, 309, 313, 314, 317, 319, 323, 327, 328, 331, 333, 336, 345, 347, 351, 354, 356, 360, 362, 366, 369, 371, 375, 377, 381, 384, 386, 388, 390, 394, 397, 400, 405, 407, 410, 412, 415, 417, 418, 421, 423, 426, 427, 429, 432, 433, 435, 439, 440, 442, 446, 449, 451, 455, 459, 462, 468, 469, 474, 476, 478, 480, 482, 484, 485, 487, 490, 493, 495], "returns": [23, 43, 45, 70, 72, 187, 207, 216, 283, 387, 389], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 69, 137, 153, 165, 169, 227, 239, 243, 252, 264, 268, 289, 321, 335, 444], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "triangle_check_context", "text_snippet": "int triangle_check_context(context* ctx)\n{\n\tif (ctx == NULL) {\n\t\treturn TRI_FAILURE;\n\t}\n\tif (ctx->b "}, {"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "triangle_check_context(context* ctx)"}, {"node_id": 47, "universal_type": "function", "name": "triangle_check_behavior", "text_snippet": "int triangle_check_behavior(behavior* b)\n{\n\tif (b->fixedarea && b->maxarea <= 0.0) {\n\t\treturn TRI_OP"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "triangle_check_behavior(behavior* b)"}, {"node_id": 74, "universal_type": "function", "name": "triangle_check_triangleio", "text_snippet": "int triangle_check_triangleio(triangleio* io, int firstnumber)\n{\n\tint i;\n\tint a, b, c;\n\tREAL x1, y1,"}, {"node_id": 76, "universal_type": "function", "name": "firstnumber)", "text_snippet": "triangle_check_triangleio(triangleio* io, int firstnumber)"}, {"node_id": 391, "universal_type": "function", "name": "triangle_restore_pointmarkers", "text_snippet": "void triangle_restore_pointmarkers(context* ctx, int *pointmarkers)\n{\n\tmesh *m;\n\tbehavior *b;\n\tverte"}, {"node_id": 393, "universal_type": "function", "name": "*pointmarkers)", "text_snippet": "triangle_restore_pointmarkers(context* ctx, int *pointmarkers)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"triangle_helper.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"triangle_internal.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "\n#include \"triangle_helper.h\"\n#include \"triangle_internal.h\"\n\nint triangle_check_context(context* ctx)\n{\n\tif (ctx == NULL) {\n\t\treturn TRI_FAILURE;\n\t}\n\tif (ctx->b == NULL || ctx->m == NULL) {\n\t\treturn TRI_FAILURE;\n\t}\n\n\treturn TRI_OK;\n}\n\nint triangle_check_behavior(behavior* b)\n{\n\tif (b->fixedarea && b->maxarea <= 0.0) {\n\t\treturn TRI_OPTIONS;\n\t}\n\treturn TRI_OK;\n}\n\nint triangle_check_triangleio(triangleio* io, int firstnumber)\n{\n\tint i;\n\tint a, b, c;\n\tREAL x1, y1, x2, y2;\n\n\tint invertices = io->numberofpoints;\n\tint insegments = io->numberofsegments;\n\tint inelements = io->numberoftriangles;\n\tint corners = io->numberofcorners;\n\n\tfor (i = 0; i < insegments; i++) {\n\t\ta = io->segmentlist[2 * i];\n\t\tb = io->segmentlist[2 * i + 1];\n\t\tif ((a < firstnumber) || (a >= firstnumber + invertices)) {\n\t\t\t// TODO: Warning: Invalid first endpoint of segment (firstnumber + i).\n\t\t\treturn TRI_FAILURE;\n\t\t} else if ((b < firstnumber) || (b >= firstnumber + invertices)) {\n\t\t\t// TODO: Warning: Invalid second endpoint of segment (firstnumber + i).\n\t\t\treturn TRI_FAILURE;\n\t\t} else if (a == b) {\n\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\treturn TRI_FAILURE;\n\t\t} else {\n\t\t\tx1 = io->pointlist[2 * a];\n\t\t\tx2 = io->pointlist[2 * a + 1];\n\t\t\ty1 = io->pointlist[2 * b];\n\t\t\ty2 = io->pointlist[2 * b + 1];\n\n\t\t\tif ((x1 == x2) && (y1 == y2)) {\n\t\t\t\t// TODO: Warning: Endpoints of segment (firstnumber + i) are coincident.\n\t\t\t\treturn TRI_FAILURE;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i = 0; i < inelements; i++) {\n\t\ta = io->trianglelist[corners * i];\n\t\tb = io->trianglelist[corners * i + 1];\n\t\tc = io->trianglelist[corners * i + 2];\n\n\t\tif ((a < firstnumber) || (a >= firstnumber + invertices) ||\n\t\t\t(b < firstnumber) || (b >= firstnumber + invertices) ||\n\t\t\t(c < firstnumber) || (c >= firstnumber + invertices)) {\n\t\t\t\t// TODO: Error: Triangle (i) has an invalid vertex index.\n\t\t\t\treturn TRI_FAILURE;\n\t\t}\n\t}\n\n\treturn TRI_OK;\n}\n\nvoid triangle_restore_pointmarkers(context* ctx, int *pointmarkers)\n{\n\tmesh *m;\n\tbehavior *b;\n\tvertex vertexloop;\n\tint vertexnumber;\n\n\tm = ctx->m;\n\tb = ctx->b;\n\n\ttraversalinit(&m->vertices);\n\tvertexnumber = 0;\n\tvertexloop = vertextraverse(m);\n\twhile (vertexloop != (vertex)NULL) {\n\t\tif (!b->jettison || (vertextype(vertexloop) != UNDEADVERTEX)) {\n\t\t\tsetvertexmark(vertexloop, pointmarkers[vertexnumber]);\n\t\t\tvertexnumber++;\n\t\t}\n\t\tvertexloop = vertextraverse(m);\n\t}\n}\n"}
308
c
#include "headers.h" #include "utils.h" static uint64_t freq = 0; static uint64_t get_cpu_freq(void) { if(freq) return freq; FILE *fd; float freqf = 0; char *line = NULL; size_t len = 0; fd = fopen("/proc/cpuinfo", "r"); if (!fd) { fprintf(stderr, "failed to get cpu frequency\n"); perror(NULL); return freq; } while (getline(&line, &len, fd) != EOF) { if (sscanf(line, "cpu MHz\t: %f", &freqf) == 1) { freqf = freqf * 1000000UL; freq = (uint64_t) freqf; break; } } fclose(fd); return freq; } uint64_t cycles_to_us(uint64_t cycles) { return cycles*1000000LU/get_cpu_freq(); } void shuffle(size_t *array, size_t n) { if (n > 1) { size_t i; for (i = 0; i < n - 1; i++) { size_t j = i + rand() / (RAND_MAX / (n - i) + 1); size_t t = array[j]; array[j] = array[i]; array[i] = t; } } } void pin_me_on(int core) { if(!PINNING) return; cpu_set_t cpuset; pthread_t thread = pthread_self(); CPU_ZERO(&cpuset); CPU_SET(core, &cpuset); int s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset); if (s != 0) die("Cannot pin thread on core %d\n", core); }
23
52
(translation_unit) "#include "headers.h"\n#include "utils.h"\n\nstatic uint64_t freq = 0;\nstatic uint64_t get_cpu_freq(void) {\n if(freq)\n return freq;\n\n FILE *fd;\n float freqf = 0;\n char *line = NULL;\n size_t len = 0;\n\n fd = fopen("/proc/cpuinfo", "r");\n if (!fd) {\n fprintf(stderr, "failed to get cpu frequency\n");\n perror(NULL);\n return freq;\n }\n\n while (getline(&line, &len, fd) != EOF) {\n if (sscanf(line, "cpu MHz\t: %f", &freqf) == 1) {\n freqf = freqf * 1000000UL;\n freq = (uint64_t) freqf;\n break;\n }\n }\n\n fclose(fd);\n return freq;\n}\n\n\nuint64_t cycles_to_us(uint64_t cycles) {\n return cycles*1000000LU/get_cpu_freq();\n}\n\nvoid shuffle(size_t *array, size_t n) {\n if (n > 1) {\n size_t i;\n for (i = 0; i < n - 1; i++) {\n size_t j = i + rand() / (RAND_MAX / (n - i) + 1);\n size_t t = array[j];\n array[j] = array[i];\n array[i] = t;\n }\n }\n}\n\nvoid pin_me_on(int core) {\n if(!PINNING)\n return;\n\n cpu_set_t cpuset;\n pthread_t thread = pthread_self();\n\n CPU_ZERO(&cpuset);\n CPU_SET(core, &cpuset);\n\n int s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n if (s != 0)\n die("Cannot pin thread on core %d\n", core);\n\n}\n" (preproc_include) "#include "headers.h"\n" (#include) "#include" (string_literal) ""headers.h"" (") """ (string_content) "headers.h" (") """ (preproc_include) "#include "utils.h"\n" (#include) "#include" (string_literal) ""utils.h"" (") """ (string_content) "utils.h" (") """ (declaration) "static uint64_t freq = 0;" (storage_class_specifier) "static" (static) "static" (primitive_type) "uint64_t" (init_declarator) "freq = 0" (identifier) "freq" (=) "=" (number_literal) "0" (;) ";" (function_definition) "static uint64_t get_cpu_freq(void) {\n if(freq)\n return freq;\n\n FILE *fd;\n float freqf = 0;\n char *line = NULL;\n size_t len = 0;\n\n fd = fopen("/proc/cpuinfo", "r");\n if (!fd) {\n fprintf(stderr, "failed to get cpu frequency\n");\n perror(NULL);\n return freq;\n }\n\n while (getline(&line, &len, fd) != EOF) {\n if (sscanf(line, "cpu MHz\t: %f", &freqf) == 1) {\n freqf = freqf * 1000000UL;\n freq = (uint64_t) freqf;\n break;\n }\n }\n\n fclose(fd);\n return freq;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "uint64_t" (function_declarator) "get_cpu_freq(void)" (identifier) "get_cpu_freq" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n if(freq)\n return freq;\n\n FILE *fd;\n float freqf = 0;\n char *line = NULL;\n size_t len = 0;\n\n fd = fopen("/proc/cpuinfo", "r");\n if (!fd) {\n fprintf(stderr, "failed to get cpu frequency\n");\n perror(NULL);\n return freq;\n }\n\n while (getline(&line, &len, fd) != EOF) {\n if (sscanf(line, "cpu MHz\t: %f", &freqf) == 1) {\n freqf = freqf * 1000000UL;\n freq = (uint64_t) freqf;\n break;\n }\n }\n\n fclose(fd);\n return freq;\n}" ({) "{" (if_statement) "if(freq)\n return freq;" (if) "if" (parenthesized_expression) "(freq)" (() "(" (identifier) "freq" ()) ")" (return_statement) "return freq;" (return) "return" (identifier) "freq" (;) ";" (declaration) "FILE *fd;" (type_identifier) "FILE" (pointer_declarator) "*fd" (*) "*" (identifier) "fd" (;) ";" (declaration) "float freqf = 0;" (primitive_type) "float" (init_declarator) "freqf = 0" (identifier) "freqf" (=) "=" (number_literal) "0" (;) ";" (declaration) "char *line = NULL;" (primitive_type) "char" (init_declarator) "*line = NULL" (pointer_declarator) "*line" (*) "*" (identifier) "line" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "size_t len = 0;" (primitive_type) "size_t" (init_declarator) "len = 0" (identifier) "len" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "fd = fopen("/proc/cpuinfo", "r");" (assignment_expression) "fd = fopen("/proc/cpuinfo", "r")" (identifier) "fd" (=) "=" (call_expression) "fopen("/proc/cpuinfo", "r")" (identifier) "fopen" (argument_list) "("/proc/cpuinfo", "r")" (() "(" (string_literal) ""/proc/cpuinfo"" (") """ (string_content) "/proc/cpuinfo" (") """ (,) "," (string_literal) ""r"" (") """ (string_content) "r" (") """ ()) ")" (;) ";" (if_statement) "if (!fd) {\n fprintf(stderr, "failed to get cpu frequency\n");\n perror(NULL);\n return freq;\n }" (if) "if" (parenthesized_expression) "(!fd)" (() "(" (unary_expression) "!fd" (!) "!" (identifier) "fd" ()) ")" (compound_statement) "{\n fprintf(stderr, "failed to get cpu frequency\n");\n perror(NULL);\n return freq;\n }" ({) "{" (expression_statement) "fprintf(stderr, "failed to get cpu frequency\n");" (call_expression) "fprintf(stderr, "failed to get cpu frequency\n")" (identifier) "fprintf" (argument_list) "(stderr, "failed to get cpu frequency\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""failed to get cpu frequency\n"" (") """ (string_content) "failed to get cpu frequency" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "perror(NULL);" (call_expression) "perror(NULL)" (identifier) "perror" (argument_list) "(NULL)" (() "(" (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (return_statement) "return freq;" (return) "return" (identifier) "freq" (;) ";" (}) "}" (while_statement) "while (getline(&line, &len, fd) != EOF) {\n if (sscanf(line, "cpu MHz\t: %f", &freqf) == 1) {\n freqf = freqf * 1000000UL;\n freq = (uint64_t) freqf;\n break;\n }\n }" (while) "while" (parenthesized_expression) "(getline(&line, &len, fd) != EOF)" (() "(" (binary_expression) "getline(&line, &len, fd) != EOF" (call_expression) "getline(&line, &len, fd)" (identifier) "getline" (argument_list) "(&line, &len, fd)" (() "(" (pointer_expression) "&line" (&) "&" (identifier) "line" (,) "," (pointer_expression) "&len" (&) "&" (identifier) "len" (,) "," (identifier) "fd" ()) ")" (!=) "!=" (identifier) "EOF" ()) ")" (compound_statement) "{\n if (sscanf(line, "cpu MHz\t: %f", &freqf) == 1) {\n freqf = freqf * 1000000UL;\n freq = (uint64_t) freqf;\n break;\n }\n }" ({) "{" (if_statement) "if (sscanf(line, "cpu MHz\t: %f", &freqf) == 1) {\n freqf = freqf * 1000000UL;\n freq = (uint64_t) freqf;\n break;\n }" (if) "if" (parenthesized_expression) "(sscanf(line, "cpu MHz\t: %f", &freqf) == 1)" (() "(" (binary_expression) "sscanf(line, "cpu MHz\t: %f", &freqf) == 1" (call_expression) "sscanf(line, "cpu MHz\t: %f", &freqf)" (identifier) "sscanf" (argument_list) "(line, "cpu MHz\t: %f", &freqf)" (() "(" (identifier) "line" (,) "," (string_literal) ""cpu MHz\t: %f"" (") """ (string_content) "cpu MHz" (escape_sequence) "\t" (string_content) ": %f" (") """ (,) "," (pointer_expression) "&freqf" (&) "&" (identifier) "freqf" ()) ")" (==) "==" (number_literal) "1" ()) ")" (compound_statement) "{\n freqf = freqf * 1000000UL;\n freq = (uint64_t) freqf;\n break;\n }" ({) "{" (expression_statement) "freqf = freqf * 1000000UL;" (assignment_expression) "freqf = freqf * 1000000UL" (identifier) "freqf" (=) "=" (binary_expression) "freqf * 1000000UL" (identifier) "freqf" (*) "*" (number_literal) "1000000UL" (;) ";" (expression_statement) "freq = (uint64_t) freqf;" (assignment_expression) "freq = (uint64_t) freqf" (identifier) "freq" (=) "=" (cast_expression) "(uint64_t) freqf" (() "(" (type_descriptor) "uint64_t" (primitive_type) "uint64_t" ()) ")" (identifier) "freqf" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (expression_statement) "fclose(fd);" (call_expression) "fclose(fd)" (identifier) "fclose" (argument_list) "(fd)" (() "(" (identifier) "fd" ()) ")" (;) ";" (return_statement) "return freq;" (return) "return" (identifier) "freq" (;) ";" (}) "}" (function_definition) "uint64_t cycles_to_us(uint64_t cycles) {\n return cycles*1000000LU/get_cpu_freq();\n}" (primitive_type) "uint64_t" (function_declarator) "cycles_to_us(uint64_t cycles)" (identifier) "cycles_to_us" (parameter_list) "(uint64_t cycles)" (() "(" (parameter_declaration) "uint64_t cycles" (primitive_type) "uint64_t" (identifier) "cycles" ()) ")" (compound_statement) "{\n return cycles*1000000LU/get_cpu_freq();\n}" ({) "{" (return_statement) "return cycles*1000000LU/get_cpu_freq();" (return) "return" (binary_expression) "cycles*1000000LU/get_cpu_freq()" (binary_expression) "cycles*1000000LU" (identifier) "cycles" (*) "*" (number_literal) "1000000LU" (/) "/" (call_expression) "get_cpu_freq()" (identifier) "get_cpu_freq" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "void shuffle(size_t *array, size_t n) {\n if (n > 1) {\n size_t i;\n for (i = 0; i < n - 1; i++) {\n size_t j = i + rand() / (RAND_MAX / (n - i) + 1);\n size_t t = array[j];\n array[j] = array[i];\n array[i] = t;\n }\n }\n}" (primitive_type) "void" (function_declarator) "shuffle(size_t *array, size_t n)" (identifier) "shuffle" (parameter_list) "(size_t *array, size_t n)" (() "(" (parameter_declaration) "size_t *array" (primitive_type) "size_t" (pointer_declarator) "*array" (*) "*" (identifier) "array" (,) "," (parameter_declaration) "size_t n" (primitive_type) "size_t" (identifier) "n" ()) ")" (compound_statement) "{\n if (n > 1) {\n size_t i;\n for (i = 0; i < n - 1; i++) {\n size_t j = i + rand() / (RAND_MAX / (n - i) + 1);\n size_t t = array[j];\n array[j] = array[i];\n array[i] = t;\n }\n }\n}" ({) "{" (if_statement) "if (n > 1) {\n size_t i;\n for (i = 0; i < n - 1; i++) {\n size_t j = i + rand() / (RAND_MAX / (n - i) + 1);\n size_t t = array[j];\n array[j] = array[i];\n array[i] = t;\n }\n }" (if) "if" (parenthesized_expression) "(n > 1)" (() "(" (binary_expression) "n > 1" (identifier) "n" (>) ">" (number_literal) "1" ()) ")" (compound_statement) "{\n size_t i;\n for (i = 0; i < n - 1; i++) {\n size_t j = i + rand() / (RAND_MAX / (n - i) + 1);\n size_t t = array[j];\n array[j] = array[i];\n array[i] = t;\n }\n }" ({) "{" (declaration) "size_t i;" (primitive_type) "size_t" (identifier) "i" (;) ";" (for_statement) "for (i = 0; i < n - 1; i++) {\n size_t j = i + rand() / (RAND_MAX / (n - i) + 1);\n size_t t = array[j];\n array[j] = array[i];\n array[i] = t;\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < n - 1" (identifier) "i" (<) "<" (binary_expression) "n - 1" (identifier) "n" (-) "-" (number_literal) "1" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n size_t j = i + rand() / (RAND_MAX / (n - i) + 1);\n size_t t = array[j];\n array[j] = array[i];\n array[i] = t;\n }" ({) "{" (declaration) "size_t j = i + rand() / (RAND_MAX / (n - i) + 1);" (primitive_type) "size_t" (init_declarator) "j = i + rand() / (RAND_MAX / (n - i) + 1)" (identifier) "j" (=) "=" (binary_expression) "i + rand() / (RAND_MAX / (n - i) + 1)" (identifier) "i" (+) "+" (binary_expression) "rand() / (RAND_MAX / (n - i) + 1)" (call_expression) "rand()" (identifier) "rand" (argument_list) "()" (() "(" ()) ")" (/) "/" (parenthesized_expression) "(RAND_MAX / (n - i) + 1)" (() "(" (binary_expression) "RAND_MAX / (n - i) + 1" (binary_expression) "RAND_MAX / (n - i)" (identifier) "RAND_MAX" (/) "/" (parenthesized_expression) "(n - i)" (() "(" (binary_expression) "n - i" (identifier) "n" (-) "-" (identifier) "i" ()) ")" (+) "+" (number_literal) "1" ()) ")" (;) ";" (declaration) "size_t t = array[j];" (primitive_type) "size_t" (init_declarator) "t = array[j]" (identifier) "t" (=) "=" (subscript_expression) "array[j]" (identifier) "array" ([) "[" (identifier) "j" (]) "]" (;) ";" (expression_statement) "array[j] = array[i];" (assignment_expression) "array[j] = array[i]" (subscript_expression) "array[j]" (identifier) "array" ([) "[" (identifier) "j" (]) "]" (=) "=" (subscript_expression) "array[i]" (identifier) "array" ([) "[" (identifier) "i" (]) "]" (;) ";" (expression_statement) "array[i] = t;" (assignment_expression) "array[i] = t" (subscript_expression) "array[i]" (identifier) "array" ([) "[" (identifier) "i" (]) "]" (=) "=" (identifier) "t" (;) ";" (}) "}" (}) "}" (}) "}" (function_definition) "void pin_me_on(int core) {\n if(!PINNING)\n return;\n\n cpu_set_t cpuset;\n pthread_t thread = pthread_self();\n\n CPU_ZERO(&cpuset);\n CPU_SET(core, &cpuset);\n\n int s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n if (s != 0)\n die("Cannot pin thread on core %d\n", core);\n\n}" (primitive_type) "void" (function_declarator) "pin_me_on(int core)" (identifier) "pin_me_on" (parameter_list) "(int core)" (() "(" (parameter_declaration) "int core" (primitive_type) "int" (identifier) "core" ()) ")" (compound_statement) "{\n if(!PINNING)\n return;\n\n cpu_set_t cpuset;\n pthread_t thread = pthread_self();\n\n CPU_ZERO(&cpuset);\n CPU_SET(core, &cpuset);\n\n int s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n if (s != 0)\n die("Cannot pin thread on core %d\n", core);\n\n}" ({) "{" (if_statement) "if(!PINNING)\n return;" (if) "if" (parenthesized_expression) "(!PINNING)" (() "(" (unary_expression) "!PINNING" (!) "!" (identifier) "PINNING" ()) ")" (return_statement) "return;" (return) "return" (;) ";" (declaration) "cpu_set_t cpuset;" (type_identifier) "cpu_set_t" (identifier) "cpuset" (;) ";" (declaration) "pthread_t thread = pthread_self();" (type_identifier) "pthread_t" (init_declarator) "thread = pthread_self()" (identifier) "thread" (=) "=" (call_expression) "pthread_self()" (identifier) "pthread_self" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "CPU_ZERO(&cpuset);" (call_expression) "CPU_ZERO(&cpuset)" (identifier) "CPU_ZERO" (argument_list) "(&cpuset)" (() "(" (pointer_expression) "&cpuset" (&) "&" (identifier) "cpuset" ()) ")" (;) ";" (expression_statement) "CPU_SET(core, &cpuset);" (call_expression) "CPU_SET(core, &cpuset)" (identifier) "CPU_SET" (argument_list) "(core, &cpuset)" (() "(" (identifier) "core" (,) "," (pointer_expression) "&cpuset" (&) "&" (identifier) "cpuset" ()) ")" (;) ";" (declaration) "int s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);" (primitive_type) "int" (init_declarator) "s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset)" (identifier) "s" (=) "=" (call_expression) "pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset)" (identifier) "pthread_setaffinity_np" (argument_list) "(thread, sizeof(cpu_set_t), &cpuset)" (() "(" (identifier) "thread" (,) "," (sizeof_expression) "sizeof(cpu_set_t)" (sizeof) "sizeof" (parenthesized_expression) "(cpu_set_t)" (() "(" (identifier) "cpu_set_t" ()) ")" (,) "," (pointer_expression) "&cpuset" (&) "&" (identifier) "cpuset" ()) ")" (;) ";" (if_statement) "if (s != 0)\n die("Cannot pin thread on core %d\n", core);" (if) "if" (parenthesized_expression) "(s != 0)" (() "(" (binary_expression) "s != 0" (identifier) "s" (!=) "!=" (number_literal) "0" ()) ")" (expression_statement) "die("Cannot pin thread on core %d\n", core);" (call_expression) "die("Cannot pin thread on core %d\n", core)" (identifier) "die" (argument_list) "("Cannot pin thread on core %d\n", core)" (() "(" (string_literal) ""Cannot pin thread on core %d\n"" (") """ (string_content) "Cannot pin thread on core %d" (escape_sequence) "\n" (") """ (,) "," (identifier) "core" ()) ")" (;) ";" (}) "}"
480
0
{"language": "c", "success": true, "metadata": {"lines": 52, "avg_line_length": 23.0, "nodes": 288, "errors": 0, "source_hash": "b436489b3c41a2ee0c2034d1527127be67976465f12779bbd64cd9ef6dcb6935", "categorized_nodes": 198}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"headers.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": "\"headers.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "preproc_include", "text": "#include \"utils.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": "\"utils.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 18}}, {"id": 6, "type": "declaration", "text": "static uint64_t freq = 0;", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 25}}, {"id": 7, "type": "primitive_type", "text": "uint64_t", "parent": 6, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 15}}, {"id": 8, "type": "init_declarator", "text": "freq = 0", "parent": 6, "children": [9, 10, 11], "start_point": {"row": 3, "column": 16}, "end_point": {"row": 3, "column": 24}}, {"id": 9, "type": "identifier", "text": "freq", "parent": 8, "children": [], "start_point": {"row": 3, "column": 16}, "end_point": {"row": 3, "column": 20}}, {"id": 10, "type": "=", "text": "=", "parent": 8, "children": [], "start_point": {"row": 3, "column": 21}, "end_point": {"row": 3, "column": 22}}, {"id": 11, "type": "number_literal", "text": "0", "parent": 8, "children": [], "start_point": {"row": 3, "column": 23}, "end_point": {"row": 3, "column": 24}}, {"id": 12, "type": "function_definition", "text": "static uint64_t get_cpu_freq(void) {\n if(freq)\n return freq;\n\n FILE *fd;\n float freqf = 0;\n char *line = NULL;\n size_t len = 0;\n\n fd = fopen(\"/proc/cpuinfo\", \"r\");\n if (!fd) {\n fprintf(stderr, \"failed to get cpu frequency\\n\");\n perror(NULL);\n return freq;\n }\n\n while (getline(&line, &len, fd) != EOF) {\n if (sscanf(line, \"cpu MHz\\t: %f\", &freqf) == 1) {\n freqf = freqf * 1000000UL;\n freq = (uint64_t) freqf;\n break;\n }\n }\n\n fclose(fd);\n return freq;\n}", "parent": null, "children": [13, 14], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 13, "type": "primitive_type", "text": "uint64_t", "parent": 12, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 15}}, {"id": 14, "type": "function_declarator", "text": "get_cpu_freq(void)", "parent": 12, "children": [15, 16], "start_point": {"row": 4, "column": 16}, "end_point": {"row": 4, "column": 34}}, {"id": 15, "type": "identifier", "text": "get_cpu_freq", "parent": 14, "children": [], "start_point": {"row": 4, "column": 16}, "end_point": {"row": 4, "column": 28}}, {"id": 16, "type": "parameter_list", "text": "(void)", "parent": 14, "children": [17], "start_point": {"row": 4, "column": 28}, "end_point": {"row": 4, "column": 34}}, {"id": 17, "type": "parameter_declaration", "text": "void", "parent": 16, "children": [18], "start_point": {"row": 4, "column": 29}, "end_point": {"row": 4, "column": 33}}, {"id": 18, "type": "primitive_type", "text": "void", "parent": 17, "children": [], "start_point": {"row": 4, "column": 29}, "end_point": {"row": 4, "column": 33}}, {"id": 19, "type": "if_statement", "text": "if(freq)\n return freq;", "parent": 12, "children": [20, 22], "start_point": {"row": 5, "column": 3}, "end_point": {"row": 6, "column": 18}}, {"id": 20, "type": "parenthesized_expression", "text": "(freq)", "parent": 19, "children": [21], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 11}}, {"id": 21, "type": "identifier", "text": "freq", "parent": 20, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 10}}, {"id": 22, "type": "return_statement", "text": "return freq;", "parent": 19, "children": [23], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 18}}, {"id": 23, "type": "identifier", "text": "freq", "parent": 22, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 17}}, {"id": 24, "type": "declaration", "text": "FILE *fd;", "parent": 12, "children": [25, 26], "start_point": {"row": 8, "column": 3}, "end_point": {"row": 8, "column": 12}}, {"id": 25, "type": "type_identifier", "text": "FILE", "parent": 24, "children": [], "start_point": {"row": 8, "column": 3}, "end_point": {"row": 8, "column": 7}}, {"id": 26, "type": "pointer_declarator", "text": "*fd", "parent": 24, "children": [27, 28], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 11}}, {"id": 27, "type": "*", "text": "*", "parent": 26, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 9}}, {"id": 28, "type": "identifier", "text": "fd", "parent": 26, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 11}}, {"id": 29, "type": "declaration", "text": "float freqf = 0;", "parent": 12, "children": [30, 31], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 9, "column": 19}}, {"id": 30, "type": "primitive_type", "text": "float", "parent": 29, "children": [], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 9, "column": 8}}, {"id": 31, "type": "init_declarator", "text": "freqf = 0", "parent": 29, "children": [32, 33, 34], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 18}}, {"id": 32, "type": "identifier", "text": "freqf", "parent": 31, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 14}}, {"id": 33, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 16}}, {"id": 34, "type": "number_literal", "text": "0", "parent": 31, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 18}}, {"id": 35, "type": "declaration", "text": "char *line = NULL;", "parent": 12, "children": [36, 37], "start_point": {"row": 10, "column": 3}, "end_point": {"row": 10, "column": 21}}, {"id": 36, "type": "primitive_type", "text": "char", "parent": 35, "children": [], "start_point": {"row": 10, "column": 3}, "end_point": {"row": 10, "column": 7}}, {"id": 37, "type": "init_declarator", "text": "*line = NULL", "parent": 35, "children": [38, 41, 42], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 20}}, {"id": 38, "type": "pointer_declarator", "text": "*line", "parent": 37, "children": [39, 40], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 13}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 9}}, {"id": 40, "type": "identifier", "text": "line", "parent": 38, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 13}}, {"id": 41, "type": "=", "text": "=", "parent": 37, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 15}}, {"id": 42, "type": "null", "text": "NULL", "parent": 37, "children": [43], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 20}}, {"id": 43, "type": "NULL", "text": "NULL", "parent": 42, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 20}}, {"id": 44, "type": "declaration", "text": "size_t len = 0;", "parent": 12, "children": [45, 46], "start_point": {"row": 11, "column": 3}, "end_point": {"row": 11, "column": 18}}, {"id": 45, "type": "primitive_type", "text": "size_t", "parent": 44, "children": [], "start_point": {"row": 11, "column": 3}, "end_point": {"row": 11, "column": 9}}, {"id": 46, "type": "init_declarator", "text": "len = 0", "parent": 44, "children": [47, 48, 49], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 17}}, {"id": 47, "type": "identifier", "text": "len", "parent": 46, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 13}}, {"id": 48, "type": "=", "text": "=", "parent": 46, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 15}}, {"id": 49, "type": "number_literal", "text": "0", "parent": 46, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 17}}, {"id": 50, "type": "assignment_expression", "text": "fd = fopen(\"/proc/cpuinfo\", \"r\")", "parent": 12, "children": [51, 52, 53], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 35}}, {"id": 51, "type": "identifier", "text": "fd", "parent": 50, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 5}}, {"id": 52, "type": "=", "text": "=", "parent": 50, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 7}}, {"id": 53, "type": "call_expression", "text": "fopen(\"/proc/cpuinfo\", \"r\")", "parent": 50, "children": [54, 55], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 35}}, {"id": 54, "type": "identifier", "text": "fopen", "parent": 53, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 13}}, {"id": 55, "type": "argument_list", "text": "(\"/proc/cpuinfo\", \"r\")", "parent": 53, "children": [56, 57], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 35}}, {"id": 56, "type": "string_literal", "text": "\"/proc/cpuinfo\"", "parent": 55, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 29}}, {"id": 57, "type": "string_literal", "text": "\"r\"", "parent": 55, "children": [], "start_point": {"row": 13, "column": 31}, "end_point": {"row": 13, "column": 34}}, {"id": 58, "type": "if_statement", "text": "if (!fd) {\n fprintf(stderr, \"failed to get cpu frequency\\n\");\n perror(NULL);\n return freq;\n }", "parent": 12, "children": [59], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 18, "column": 4}}, {"id": 59, "type": "parenthesized_expression", "text": "(!fd)", "parent": 58, "children": [60], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 11}}, {"id": 60, "type": "unary_expression", "text": "!fd", "parent": 59, "children": [61, 62], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 10}}, {"id": 61, "type": "!", "text": "!", "parent": 60, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 8}}, {"id": 62, "type": "identifier", "text": "fd", "parent": 60, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 10}}, {"id": 63, "type": "call_expression", "text": "fprintf(stderr, \"failed to get cpu frequency\\n\")", "parent": 58, "children": [64, 65], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 54}}, {"id": 64, "type": "identifier", "text": "fprintf", "parent": 63, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 13}}, {"id": 65, "type": "argument_list", "text": "(stderr, \"failed to get cpu frequency\\n\")", "parent": 63, "children": [66, 67], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 54}}, {"id": 66, "type": "identifier", "text": "stderr", "parent": 65, "children": [], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 20}}, {"id": 67, "type": "string_literal", "text": "\"failed to get cpu frequency\\n\"", "parent": 65, "children": [68], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 53}}, {"id": 68, "type": "escape_sequence", "text": "\\n", "parent": 67, "children": [], "start_point": {"row": 15, "column": 50}, "end_point": {"row": 15, "column": 52}}, {"id": 69, "type": "call_expression", "text": "perror(NULL)", "parent": 58, "children": [70, 71], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 18}}, {"id": 70, "type": "identifier", "text": "perror", "parent": 69, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 12}}, {"id": 71, "type": "argument_list", "text": "(NULL)", "parent": 69, "children": [72], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 18}}, {"id": 72, "type": "null", "text": "NULL", "parent": 71, "children": [73], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 17}}, {"id": 73, "type": "NULL", "text": "NULL", "parent": 72, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 17}}, {"id": 74, "type": "return_statement", "text": "return freq;", "parent": 58, "children": [75], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 18}}, {"id": 75, "type": "identifier", "text": "freq", "parent": 74, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 17}}, {"id": 76, "type": "while_statement", "text": "while (getline(&line, &len, fd) != EOF) {\n if (sscanf(line, \"cpu MHz\\t: %f\", &freqf) == 1) {\n freqf = freqf * 1000000UL;\n freq = (uint64_t) freqf;\n break;\n }\n }", "parent": 12, "children": [77], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 26, "column": 4}}, {"id": 77, "type": "parenthesized_expression", "text": "(getline(&line, &len, fd) != EOF)", "parent": 76, "children": [78], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 42}}, {"id": 78, "type": "binary_expression", "text": "getline(&line, &len, fd) != EOF", "parent": 77, "children": [79, 87, 88], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 41}}, {"id": 79, "type": "call_expression", "text": "getline(&line, &len, fd)", "parent": 78, "children": [80, 81], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 34}}, {"id": 80, "type": "identifier", "text": "getline", "parent": 79, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 17}}, {"id": 81, "type": "argument_list", "text": "(&line, &len, fd)", "parent": 79, "children": [82, 84, 86], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 34}}, {"id": 82, "type": "pointer_expression", "text": "&line", "parent": 81, "children": [83], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 23}}, {"id": 83, "type": "identifier", "text": "line", "parent": 82, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 23}}, {"id": 84, "type": "pointer_expression", "text": "&len", "parent": 81, "children": [85], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 29}}, {"id": 85, "type": "identifier", "text": "len", "parent": 84, "children": [], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 29}}, {"id": 86, "type": "identifier", "text": "fd", "parent": 81, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 33}}, {"id": 87, "type": "!=", "text": "!=", "parent": 78, "children": [], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 37}}, {"id": 88, "type": "identifier", "text": "EOF", "parent": 78, "children": [], "start_point": {"row": 20, "column": 38}, "end_point": {"row": 20, "column": 41}}, {"id": 89, "type": "if_statement", "text": "if (sscanf(line, \"cpu MHz\\t: %f\", &freqf) == 1) {\n freqf = freqf * 1000000UL;\n freq = (uint64_t) freqf;\n break;\n }", "parent": 76, "children": [90], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 25, "column": 7}}, {"id": 90, "type": "parenthesized_expression", "text": "(sscanf(line, \"cpu MHz\\t: %f\", &freqf) == 1)", "parent": 89, "children": [91], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 53}}, {"id": 91, "type": "binary_expression", "text": "sscanf(line, \"cpu MHz\\t: %f\", &freqf) == 1", "parent": 90, "children": [92, 100, 101], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 52}}, {"id": 92, "type": "call_expression", "text": "sscanf(line, \"cpu MHz\\t: %f\", &freqf)", "parent": 91, "children": [93, 94], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 47}}, {"id": 93, "type": "identifier", "text": "sscanf", "parent": 92, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 16}}, {"id": 94, "type": "argument_list", "text": "(line, \"cpu MHz\\t: %f\", &freqf)", "parent": 92, "children": [95, 96, 98], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 47}}, {"id": 95, "type": "identifier", "text": "line", "parent": 94, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 21}}, {"id": 96, "type": "string_literal", "text": "\"cpu MHz\\t: %f\"", "parent": 94, "children": [97], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 38}}, {"id": 97, "type": "escape_sequence", "text": "\\t", "parent": 96, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 33}}, {"id": 98, "type": "pointer_expression", "text": "&freqf", "parent": 94, "children": [99], "start_point": {"row": 21, "column": 40}, "end_point": {"row": 21, "column": 46}}, {"id": 99, "type": "identifier", "text": "freqf", "parent": 98, "children": [], "start_point": {"row": 21, "column": 41}, "end_point": {"row": 21, "column": 46}}, {"id": 100, "type": "==", "text": "==", "parent": 91, "children": [], "start_point": {"row": 21, "column": 48}, "end_point": {"row": 21, "column": 50}}, {"id": 101, "type": "number_literal", "text": "1", "parent": 91, "children": [], "start_point": {"row": 21, "column": 51}, "end_point": {"row": 21, "column": 52}}, {"id": 102, "type": "assignment_expression", "text": "freqf = freqf * 1000000UL", "parent": 89, "children": [103, 104, 105], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 34}}, {"id": 103, "type": "identifier", "text": "freqf", "parent": 102, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 14}}, {"id": 104, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 16}}, {"id": 105, "type": "binary_expression", "text": "freqf * 1000000UL", "parent": 102, "children": [106, 107, 108], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 34}}, {"id": 106, "type": "identifier", "text": "freqf", "parent": 105, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 22}}, {"id": 107, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 24}}, {"id": 108, "type": "number_literal", "text": "1000000UL", "parent": 105, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 34}}, {"id": 109, "type": "assignment_expression", "text": "freq = (uint64_t) freqf", "parent": 89, "children": [110, 111, 112], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 32}}, {"id": 110, "type": "identifier", "text": "freq", "parent": 109, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 13}}, {"id": 111, "type": "=", "text": "=", "parent": 109, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 15}}, {"id": 112, "type": "cast_expression", "text": "(uint64_t) freqf", "parent": 109, "children": [113, 115], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 32}}, {"id": 113, "type": "type_descriptor", "text": "uint64_t", "parent": 112, "children": [114], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 25}}, {"id": 114, "type": "primitive_type", "text": "uint64_t", "parent": 113, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 25}}, {"id": 115, "type": "identifier", "text": "freqf", "parent": 112, "children": [], "start_point": {"row": 23, "column": 27}, "end_point": {"row": 23, "column": 32}}, {"id": 116, "type": "break_statement", "text": "break;", "parent": 89, "children": [117], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 15}}, {"id": 117, "type": "break", "text": "break", "parent": 116, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 14}}, {"id": 118, "type": "call_expression", "text": "fclose(fd)", "parent": 12, "children": [119, 120], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 13}}, {"id": 119, "type": "identifier", "text": "fclose", "parent": 118, "children": [], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 9}}, {"id": 120, "type": "argument_list", "text": "(fd)", "parent": 118, "children": [121], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 13}}, {"id": 121, "type": "identifier", "text": "fd", "parent": 120, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 12}}, {"id": 122, "type": "return_statement", "text": "return freq;", "parent": 12, "children": [123], "start_point": {"row": 29, "column": 3}, "end_point": {"row": 29, "column": 15}}, {"id": 123, "type": "identifier", "text": "freq", "parent": 122, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 14}}, {"id": 124, "type": "function_definition", "text": "uint64_t cycles_to_us(uint64_t cycles) {\n return cycles*1000000LU/get_cpu_freq();\n}", "parent": null, "children": [125, 126], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 125, "type": "primitive_type", "text": "uint64_t", "parent": 124, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 126, "type": "function_declarator", "text": "cycles_to_us(uint64_t cycles)", "parent": 124, "children": [127, 128], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 38}}, {"id": 127, "type": "identifier", "text": "cycles_to_us", "parent": 126, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 21}}, {"id": 128, "type": "parameter_list", "text": "(uint64_t cycles)", "parent": 126, "children": [129], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 38}}, {"id": 129, "type": "parameter_declaration", "text": "uint64_t cycles", "parent": 128, "children": [130, 131], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 37}}, {"id": 130, "type": "primitive_type", "text": "uint64_t", "parent": 129, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 30}}, {"id": 131, "type": "identifier", "text": "cycles", "parent": 129, "children": [], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 37}}, {"id": 132, "type": "return_statement", "text": "return cycles*1000000LU/get_cpu_freq();", "parent": 124, "children": [133], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 42}}, {"id": 133, "type": "binary_expression", "text": "cycles*1000000LU/get_cpu_freq()", "parent": 132, "children": [134, 138, 139], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 41}}, {"id": 134, "type": "binary_expression", "text": "cycles*1000000LU", "parent": 133, "children": [135, 136, 137], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 26}}, {"id": 135, "type": "identifier", "text": "cycles", "parent": 134, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 16}}, {"id": 136, "type": "*", "text": "*", "parent": 134, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 17}}, {"id": 137, "type": "number_literal", "text": "1000000LU", "parent": 134, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 26}}, {"id": 138, "type": "/", "text": "/", "parent": 133, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 27}}, {"id": 139, "type": "call_expression", "text": "get_cpu_freq()", "parent": 133, "children": [140, 141], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 41}}, {"id": 140, "type": "identifier", "text": "get_cpu_freq", "parent": 139, "children": [], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 39}}, {"id": 141, "type": "argument_list", "text": "()", "parent": 139, "children": [], "start_point": {"row": 34, "column": 39}, "end_point": {"row": 34, "column": 41}}, {"id": 142, "type": "function_definition", "text": "void shuffle(size_t *array, size_t n) {\n if (n > 1) {\n size_t i;\n for (i = 0; i < n - 1; i++) {\n size_t j = i + rand() / (RAND_MAX / (n - i) + 1);\n size_t t = array[j];\n array[j] = array[i];\n array[i] = t;\n }\n }\n}", "parent": null, "children": [143, 144], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 143, "type": "primitive_type", "text": "void", "parent": 142, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 4}}, {"id": 144, "type": "function_declarator", "text": "shuffle(size_t *array, size_t n)", "parent": 142, "children": [145, 146], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 37}}, {"id": 145, "type": "identifier", "text": "shuffle", "parent": 144, "children": [], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 12}}, {"id": 146, "type": "parameter_list", "text": "(size_t *array, size_t n)", "parent": 144, "children": [147, 152], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 37}}, {"id": 147, "type": "parameter_declaration", "text": "size_t *array", "parent": 146, "children": [148, 149], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 26}}, {"id": 148, "type": "primitive_type", "text": "size_t", "parent": 147, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 19}}, {"id": 149, "type": "pointer_declarator", "text": "*array", "parent": 147, "children": [150, 151], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 26}}, {"id": 150, "type": "*", "text": "*", "parent": 149, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 21}}, {"id": 151, "type": "identifier", "text": "array", "parent": 149, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 26}}, {"id": 152, "type": "parameter_declaration", "text": "size_t n", "parent": 146, "children": [153, 154], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 36}}, {"id": 153, "type": "primitive_type", "text": "size_t", "parent": 152, "children": [], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 34}}, {"id": 154, "type": "identifier", "text": "n", "parent": 152, "children": [], "start_point": {"row": 37, "column": 35}, "end_point": {"row": 37, "column": 36}}, {"id": 155, "type": "if_statement", "text": "if (n > 1) {\n size_t i;\n for (i = 0; i < n - 1; i++) {\n size_t j = i + rand() / (RAND_MAX / (n - i) + 1);\n size_t t = array[j];\n array[j] = array[i];\n array[i] = t;\n }\n }", "parent": 142, "children": [156], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 46, "column": 4}}, {"id": 156, "type": "parenthesized_expression", "text": "(n > 1)", "parent": 155, "children": [157], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 13}}, {"id": 157, "type": "binary_expression", "text": "n > 1", "parent": 156, "children": [158, 159, 160], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 12}}, {"id": 158, "type": "identifier", "text": "n", "parent": 157, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 8}}, {"id": 159, "type": ">", "text": ">", "parent": 157, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 10}}, {"id": 160, "type": "number_literal", "text": "1", "parent": 157, "children": [], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 12}}, {"id": 161, "type": "declaration", "text": "size_t i;", "parent": 155, "children": [162, 163], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 15}}, {"id": 162, "type": "primitive_type", "text": "size_t", "parent": 161, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 12}}, {"id": 163, "type": "identifier", "text": "i", "parent": 161, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 14}}, {"id": 164, "type": "for_statement", "text": "for (i = 0; i < n - 1; i++) {\n size_t j = i + rand() / (RAND_MAX / (n - i) + 1);\n size_t t = array[j];\n array[j] = array[i];\n array[i] = t;\n }", "parent": 155, "children": [165, 169, 176], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 45, "column": 7}}, {"id": 165, "type": "assignment_expression", "text": "i = 0", "parent": 164, "children": [166, 167, 168], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 16}}, {"id": 166, "type": "identifier", "text": "i", "parent": 165, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 12}}, {"id": 167, "type": "=", "text": "=", "parent": 165, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 14}}, {"id": 168, "type": "number_literal", "text": "0", "parent": 165, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 16}}, {"id": 169, "type": "binary_expression", "text": "i < n - 1", "parent": 164, "children": [170, 171, 172], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 27}}, {"id": 170, "type": "identifier", "text": "i", "parent": 169, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 19}}, {"id": 171, "type": "<", "text": "<", "parent": 169, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 21}}, {"id": 172, "type": "binary_expression", "text": "n - 1", "parent": 169, "children": [173, 174, 175], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 27}}, {"id": 173, "type": "identifier", "text": "n", "parent": 172, "children": [], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 23}}, {"id": 174, "type": "-", "text": "-", "parent": 172, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 25}}, {"id": 175, "type": "number_literal", "text": "1", "parent": 172, "children": [], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 27}}, {"id": 176, "type": "update_expression", "text": "i++", "parent": 164, "children": [177, 178], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 32}}, {"id": 177, "type": "identifier", "text": "i", "parent": 176, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 30}}, {"id": 178, "type": "++", "text": "++", "parent": 176, "children": [], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 32}}, {"id": 179, "type": "declaration", "text": "size_t j = i + rand() / (RAND_MAX / (n - i) + 1);", "parent": 164, "children": [180, 181], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 58}}, {"id": 180, "type": "primitive_type", "text": "size_t", "parent": 179, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 15}}, {"id": 181, "type": "init_declarator", "text": "j = i + rand() / (RAND_MAX / (n - i) + 1)", "parent": 179, "children": [182, 183, 184], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 57}}, {"id": 182, "type": "identifier", "text": "j", "parent": 181, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 17}}, {"id": 183, "type": "=", "text": "=", "parent": 181, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 19}}, {"id": 184, "type": "binary_expression", "text": "i + rand() / (RAND_MAX / (n - i) + 1)", "parent": 181, "children": [185, 186, 187], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 57}}, {"id": 185, "type": "identifier", "text": "i", "parent": 184, "children": [], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 21}}, {"id": 186, "type": "+", "text": "+", "parent": 184, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 23}}, {"id": 187, "type": "binary_expression", "text": "rand() / (RAND_MAX / (n - i) + 1)", "parent": 184, "children": [188, 191, 192], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 57}}, {"id": 188, "type": "call_expression", "text": "rand()", "parent": 187, "children": [189, 190], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 30}}, {"id": 189, "type": "identifier", "text": "rand", "parent": 188, "children": [], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 28}}, {"id": 190, "type": "argument_list", "text": "()", "parent": 188, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 30}}, {"id": 191, "type": "/", "text": "/", "parent": 187, "children": [], "start_point": {"row": 41, "column": 31}, "end_point": {"row": 41, "column": 32}}, {"id": 192, "type": "parenthesized_expression", "text": "(RAND_MAX / (n - i) + 1)", "parent": 187, "children": [193], "start_point": {"row": 41, "column": 33}, "end_point": {"row": 41, "column": 57}}, {"id": 193, "type": "binary_expression", "text": "RAND_MAX / (n - i) + 1", "parent": 192, "children": [194, 202, 203], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 56}}, {"id": 194, "type": "binary_expression", "text": "RAND_MAX / (n - i)", "parent": 193, "children": [195, 196, 197], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 52}}, {"id": 195, "type": "identifier", "text": "RAND_MAX", "parent": 194, "children": [], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 42}}, {"id": 196, "type": "/", "text": "/", "parent": 194, "children": [], "start_point": {"row": 41, "column": 43}, "end_point": {"row": 41, "column": 44}}, {"id": 197, "type": "parenthesized_expression", "text": "(n - i)", "parent": 194, "children": [198], "start_point": {"row": 41, "column": 45}, "end_point": {"row": 41, "column": 52}}, {"id": 198, "type": "binary_expression", "text": "n - i", "parent": 197, "children": [199, 200, 201], "start_point": {"row": 41, "column": 46}, "end_point": {"row": 41, "column": 51}}, {"id": 199, "type": "identifier", "text": "n", "parent": 198, "children": [], "start_point": {"row": 41, "column": 46}, "end_point": {"row": 41, "column": 47}}, {"id": 200, "type": "-", "text": "-", "parent": 198, "children": [], "start_point": {"row": 41, "column": 48}, "end_point": {"row": 41, "column": 49}}, {"id": 201, "type": "identifier", "text": "i", "parent": 198, "children": [], "start_point": {"row": 41, "column": 50}, "end_point": {"row": 41, "column": 51}}, {"id": 202, "type": "+", "text": "+", "parent": 193, "children": [], "start_point": {"row": 41, "column": 53}, "end_point": {"row": 41, "column": 54}}, {"id": 203, "type": "number_literal", "text": "1", "parent": 193, "children": [], "start_point": {"row": 41, "column": 55}, "end_point": {"row": 41, "column": 56}}, {"id": 204, "type": "declaration", "text": "size_t t = array[j];", "parent": 164, "children": [205, 206], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 29}}, {"id": 205, "type": "primitive_type", "text": "size_t", "parent": 204, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 15}}, {"id": 206, "type": "init_declarator", "text": "t = array[j]", "parent": 204, "children": [207, 208, 209], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 28}}, {"id": 207, "type": "identifier", "text": "t", "parent": 206, "children": [], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 17}}, {"id": 208, "type": "=", "text": "=", "parent": 206, "children": [], "start_point": {"row": 42, "column": 18}, "end_point": {"row": 42, "column": 19}}, {"id": 209, "type": "subscript_expression", "text": "array[j]", "parent": 206, "children": [210, 211], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 28}}, {"id": 210, "type": "identifier", "text": "array", "parent": 209, "children": [], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 25}}, {"id": 211, "type": "identifier", "text": "j", "parent": 209, "children": [], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 27}}, {"id": 212, "type": "assignment_expression", "text": "array[j] = array[i]", "parent": 164, "children": [213, 216, 217], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 28}}, {"id": 213, "type": "subscript_expression", "text": "array[j]", "parent": 212, "children": [214, 215], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 17}}, {"id": 214, "type": "identifier", "text": "array", "parent": 213, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 14}}, {"id": 215, "type": "identifier", "text": "j", "parent": 213, "children": [], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 16}}, {"id": 216, "type": "=", "text": "=", "parent": 212, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 19}}, {"id": 217, "type": "subscript_expression", "text": "array[i]", "parent": 212, "children": [218, 219], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 28}}, {"id": 218, "type": "identifier", "text": "array", "parent": 217, "children": [], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 25}}, {"id": 219, "type": "identifier", "text": "i", "parent": 217, "children": [], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 27}}, {"id": 220, "type": "assignment_expression", "text": "array[i] = t", "parent": 164, "children": [221, 224, 225], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 21}}, {"id": 221, "type": "subscript_expression", "text": "array[i]", "parent": 220, "children": [222, 223], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 17}}, {"id": 222, "type": "identifier", "text": "array", "parent": 221, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 14}}, {"id": 223, "type": "identifier", "text": "i", "parent": 221, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 16}}, {"id": 224, "type": "=", "text": "=", "parent": 220, "children": [], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 19}}, {"id": 225, "type": "identifier", "text": "t", "parent": 220, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 21}}, {"id": 226, "type": "function_definition", "text": "void pin_me_on(int core) {\n if(!PINNING)\n return;\n\n cpu_set_t cpuset;\n pthread_t thread = pthread_self();\n\n CPU_ZERO(&cpuset);\n CPU_SET(core, &cpuset);\n\n int s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n if (s != 0)\n die(\"Cannot pin thread on core %d\\n\", core);\n\n}", "parent": null, "children": [227, 228], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 63, "column": 1}}, {"id": 227, "type": "primitive_type", "text": "void", "parent": 226, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 4}}, {"id": 228, "type": "function_declarator", "text": "pin_me_on(int core)", "parent": 226, "children": [229, 230], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 24}}, {"id": 229, "type": "identifier", "text": "pin_me_on", "parent": 228, "children": [], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 14}}, {"id": 230, "type": "parameter_list", "text": "(int core)", "parent": 228, "children": [231], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 24}}, {"id": 231, "type": "parameter_declaration", "text": "int core", "parent": 230, "children": [232, 233], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 23}}, {"id": 232, "type": "primitive_type", "text": "int", "parent": 231, "children": [], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 18}}, {"id": 233, "type": "identifier", "text": "core", "parent": 231, "children": [], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 23}}, {"id": 234, "type": "if_statement", "text": "if(!PINNING)\n return;", "parent": 226, "children": [235, 239], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 51, "column": 13}}, {"id": 235, "type": "parenthesized_expression", "text": "(!PINNING)", "parent": 234, "children": [236], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 15}}, {"id": 236, "type": "unary_expression", "text": "!PINNING", "parent": 235, "children": [237, 238], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 14}}, {"id": 237, "type": "!", "text": "!", "parent": 236, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 7}}, {"id": 238, "type": "identifier", "text": "PINNING", "parent": 236, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 14}}, {"id": 239, "type": "return_statement", "text": "return;", "parent": 234, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 13}}, {"id": 240, "type": "declaration", "text": "cpu_set_t cpuset;", "parent": 226, "children": [241, 242], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 20}}, {"id": 241, "type": "type_identifier", "text": "cpu_set_t", "parent": 240, "children": [], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 12}}, {"id": 242, "type": "identifier", "text": "cpuset", "parent": 240, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 19}}, {"id": 243, "type": "declaration", "text": "pthread_t thread = pthread_self();", "parent": 226, "children": [244, 245], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 37}}, {"id": 244, "type": "type_identifier", "text": "pthread_t", "parent": 243, "children": [], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 12}}, {"id": 245, "type": "init_declarator", "text": "thread = pthread_self()", "parent": 243, "children": [246, 247, 248], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 36}}, {"id": 246, "type": "identifier", "text": "thread", "parent": 245, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 19}}, {"id": 247, "type": "=", "text": "=", "parent": 245, "children": [], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 21}}, {"id": 248, "type": "call_expression", "text": "pthread_self()", "parent": 245, "children": [249, 250], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 36}}, {"id": 249, "type": "identifier", "text": "pthread_self", "parent": 248, "children": [], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 34}}, {"id": 250, "type": "argument_list", "text": "()", "parent": 248, "children": [], "start_point": {"row": 54, "column": 34}, "end_point": {"row": 54, "column": 36}}, {"id": 251, "type": "call_expression", "text": "CPU_ZERO(&cpuset)", "parent": 226, "children": [252, 253], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 20}}, {"id": 252, "type": "identifier", "text": "CPU_ZERO", "parent": 251, "children": [], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 11}}, {"id": 253, "type": "argument_list", "text": "(&cpuset)", "parent": 251, "children": [254], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 20}}, {"id": 254, "type": "pointer_expression", "text": "&cpuset", "parent": 253, "children": [255], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 19}}, {"id": 255, "type": "identifier", "text": "cpuset", "parent": 254, "children": [], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 19}}, {"id": 256, "type": "call_expression", "text": "CPU_SET(core, &cpuset)", "parent": 226, "children": [257, 258], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 25}}, {"id": 257, "type": "identifier", "text": "CPU_SET", "parent": 256, "children": [], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 10}}, {"id": 258, "type": "argument_list", "text": "(core, &cpuset)", "parent": 256, "children": [259, 260], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 25}}, {"id": 259, "type": "identifier", "text": "core", "parent": 258, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 15}}, {"id": 260, "type": "pointer_expression", "text": "&cpuset", "parent": 258, "children": [261], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 24}}, {"id": 261, "type": "identifier", "text": "cpuset", "parent": 260, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 24}}, {"id": 262, "type": "declaration", "text": "int s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);", "parent": 226, "children": [263, 264], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 70}}, {"id": 263, "type": "primitive_type", "text": "int", "parent": 262, "children": [], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 6}}, {"id": 264, "type": "init_declarator", "text": "s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset)", "parent": 262, "children": [265, 266, 267], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 69}}, {"id": 265, "type": "identifier", "text": "s", "parent": 264, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 8}}, {"id": 266, "type": "=", "text": "=", "parent": 264, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 10}}, {"id": 267, "type": "call_expression", "text": "pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset)", "parent": 264, "children": [268, 269], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 69}}, {"id": 268, "type": "identifier", "text": "pthread_setaffinity_np", "parent": 267, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 33}}, {"id": 269, "type": "argument_list", "text": "(thread, sizeof(cpu_set_t), &cpuset)", "parent": 267, "children": [270, 271, 274], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 69}}, {"id": 270, "type": "identifier", "text": "thread", "parent": 269, "children": [], "start_point": {"row": 59, "column": 34}, "end_point": {"row": 59, "column": 40}}, {"id": 271, "type": "sizeof_expression", "text": "sizeof(cpu_set_t)", "parent": 269, "children": [272], "start_point": {"row": 59, "column": 42}, "end_point": {"row": 59, "column": 59}}, {"id": 272, "type": "parenthesized_expression", "text": "(cpu_set_t)", "parent": 271, "children": [273], "start_point": {"row": 59, "column": 48}, "end_point": {"row": 59, "column": 59}}, {"id": 273, "type": "identifier", "text": "cpu_set_t", "parent": 272, "children": [], "start_point": {"row": 59, "column": 49}, "end_point": {"row": 59, "column": 58}}, {"id": 274, "type": "pointer_expression", "text": "&cpuset", "parent": 269, "children": [275], "start_point": {"row": 59, "column": 61}, "end_point": {"row": 59, "column": 68}}, {"id": 275, "type": "identifier", "text": "cpuset", "parent": 274, "children": [], "start_point": {"row": 59, "column": 62}, "end_point": {"row": 59, "column": 68}}, {"id": 276, "type": "if_statement", "text": "if (s != 0)\n die(\"Cannot pin thread on core %d\\n\", core);", "parent": 226, "children": [277], "start_point": {"row": 60, "column": 3}, "end_point": {"row": 61, "column": 50}}, {"id": 277, "type": "parenthesized_expression", "text": "(s != 0)", "parent": 276, "children": [278], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 14}}, {"id": 278, "type": "binary_expression", "text": "s != 0", "parent": 277, "children": [279, 280, 281], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 13}}, {"id": 279, "type": "identifier", "text": "s", "parent": 278, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 8}}, {"id": 280, "type": "!=", "text": "!=", "parent": 278, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 11}}, {"id": 281, "type": "number_literal", "text": "0", "parent": 278, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 13}}, {"id": 282, "type": "call_expression", "text": "die(\"Cannot pin thread on core %d\\n\", core)", "parent": 276, "children": [283, 284], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 49}}, {"id": 283, "type": "identifier", "text": "die", "parent": 282, "children": [], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 9}}, {"id": 284, "type": "argument_list", "text": "(\"Cannot pin thread on core %d\\n\", core)", "parent": 282, "children": [285, 287], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 49}}, {"id": 285, "type": "string_literal", "text": "\"Cannot pin thread on core %d\\n\"", "parent": 284, "children": [286], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 42}}, {"id": 286, "type": "escape_sequence", "text": "\\n", "parent": 285, "children": [], "start_point": {"row": 61, "column": 39}, "end_point": {"row": 61, "column": 41}}, {"id": 287, "type": "identifier", "text": "core", "parent": 284, "children": [], "start_point": {"row": 61, "column": 44}, "end_point": {"row": 61, "column": 48}}]}, "node_categories": {"declarations": {"functions": [12, 14, 124, 126, 142, 144, 226, 228], "variables": [6, 17, 24, 29, 35, 44, 129, 147, 152, 161, 179, 204, 231, 240, 243, 262], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [20, 53, 59, 60, 63, 69, 77, 78, 79, 82, 84, 90, 91, 92, 98, 105, 112, 118, 133, 134, 139, 156, 157, 169, 172, 176, 184, 187, 188, 192, 193, 194, 197, 198, 209, 213, 217, 221, 235, 236, 248, 251, 254, 256, 260, 267, 271, 272, 274, 277, 278, 282], "assignments": [50, 102, 109, 165, 212, 220], "loops": [76, 164], "conditionals": [9, 15, 19, 21, 23, 25, 28, 32, 40, 47, 51, 54, 58, 62, 64, 66, 70, 75, 80, 83, 85, 86, 88, 89, 93, 95, 99, 103, 106, 110, 115, 119, 121, 123, 127, 131, 135, 140, 145, 151, 154, 155, 158, 163, 166, 170, 173, 177, 182, 185, 189, 195, 199, 201, 207, 210, 211, 214, 215, 218, 219, 222, 223, 225, 229, 233, 234, 238, 241, 242, 244, 246, 249, 252, 255, 257, 259, 261, 265, 268, 270, 273, 275, 276, 279, 283, 287], "returns": [22, 74, 122, 132, 239], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 11, 34, 49, 56, 57, 67, 96, 101, 108, 137, 160, 168, 175, 203, 281, 285], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "unknown", "text_snippet": "static uint64_t get_cpu_freq(void) {\n if(freq)\n return freq;\n\n FILE *fd;\n float freqf = 0"}, {"node_id": 14, "universal_type": "function", "name": "unknown", "text_snippet": "get_cpu_freq(void)"}, {"node_id": 124, "universal_type": "function", "name": "unknown", "text_snippet": "uint64_t cycles_to_us(uint64_t cycles) {\n return cycles*1000000LU/get_cpu_freq();\n}"}, {"node_id": 126, "universal_type": "function", "name": "unknown", "text_snippet": "cycles_to_us(uint64_t cycles)"}, {"node_id": 142, "universal_type": "function", "name": "shuffle", "text_snippet": "void shuffle(size_t *array, size_t n) {\n if (n > 1) {\n size_t i;\n for (i = 0; i < n - 1;"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "shuffle(size_t *array, size_t n)"}, {"node_id": 226, "universal_type": "function", "name": "pin_me_on", "text_snippet": "void pin_me_on(int core) {\n if(!PINNING)\n return;\n\n cpu_set_t cpuset;\n pthread_t thread ="}, {"node_id": 228, "universal_type": "function", "name": "unknown", "text_snippet": "pin_me_on(int core)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"headers.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"utils.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include \"headers.h\"\n#include \"utils.h\"\n\nstatic uint64_t freq = 0;\nstatic uint64_t get_cpu_freq(void) {\n if(freq)\n return freq;\n\n FILE *fd;\n float freqf = 0;\n char *line = NULL;\n size_t len = 0;\n\n fd = fopen(\"/proc/cpuinfo\", \"r\");\n if (!fd) {\n fprintf(stderr, \"failed to get cpu frequency\\n\");\n perror(NULL);\n return freq;\n }\n\n while (getline(&line, &len, fd) != EOF) {\n if (sscanf(line, \"cpu MHz\\t: %f\", &freqf) == 1) {\n freqf = freqf * 1000000UL;\n freq = (uint64_t) freqf;\n break;\n }\n }\n\n fclose(fd);\n return freq;\n}\n\n\nuint64_t cycles_to_us(uint64_t cycles) {\n return cycles*1000000LU/get_cpu_freq();\n}\n\nvoid shuffle(size_t *array, size_t n) {\n if (n > 1) {\n size_t i;\n for (i = 0; i < n - 1; i++) {\n size_t j = i + rand() / (RAND_MAX / (n - i) + 1);\n size_t t = array[j];\n array[j] = array[i];\n array[i] = t;\n }\n }\n}\n\nvoid pin_me_on(int core) {\n if(!PINNING)\n return;\n\n cpu_set_t cpuset;\n pthread_t thread = pthread_self();\n\n CPU_ZERO(&cpuset);\n CPU_SET(core, &cpuset);\n\n int s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n if (s != 0)\n die(\"Cannot pin thread on core %d\\n\", core);\n\n}\n"}
309
c
#ifndef SolveSimpleLinearInequalityListFunction_H #define SolveSimpleLinearInequalityListFunction_H #include <limits> #include "type_defs.h" #include "double_vec.h" // DoubleVec, DoubleVec_IT, DoubleVec_ConstIT class DeltaRange { public: const bool SolutionExists; const double MinDelta; const double MaxDelta; DeltaRange(bool, double, double); }; DeltaRange SolveSimpleLinearInequalityListFunction(const DoubleVec & A, const DoubleVec & B, const DoubleVec & C, const double Epsilon); #endif // SolveSimpleLinearInequalityListFunction_H
31.71
17
(translation_unit) "#ifndef SolveSimpleLinearInequalityListFunction_H\n#define SolveSimpleLinearInequalityListFunction_H\n\n\n#include <limits>\n\n#include "type_defs.h" \n#include "double_vec.h" // DoubleVec, DoubleVec_IT, DoubleVec_ConstIT\n\nclass DeltaRange\n{\npublic:\n const bool SolutionExists;\n const double MinDelta;\n const double MaxDelta;\n DeltaRange(bool, double, double);\n};\n\nDeltaRange SolveSimpleLinearInequalityListFunction(const DoubleVec & A, const DoubleVec & B, const DoubleVec & C, const double Epsilon);\n\n\n#endif // SolveSimpleLinearInequalityListFunction_H\n" (preproc_ifdef) "#ifndef SolveSimpleLinearInequalityListFunction_H\n#define SolveSimpleLinearInequalityListFunction_H\n\n\n#include <limits>\n\n#include "type_defs.h" \n#include "double_vec.h" // DoubleVec, DoubleVec_IT, DoubleVec_ConstIT\n\nclass DeltaRange\n{\npublic:\n const bool SolutionExists;\n const double MinDelta;\n const double MaxDelta;\n DeltaRange(bool, double, double);\n};\n\nDeltaRange SolveSimpleLinearInequalityListFunction(const DoubleVec & A, const DoubleVec & B, const DoubleVec & C, const double Epsilon);\n\n\n#endif" (#ifndef) "#ifndef" (identifier) "SolveSimpleLinearInequalityListFunction_H" (preproc_def) "#define SolveSimpleLinearInequalityListFunction_H\n" (#define) "#define" (identifier) "SolveSimpleLinearInequalityListFunction_H" (preproc_include) "#include <limits>\n" (#include) "#include" (system_lib_string) "<limits>" (preproc_include) "#include "type_defs.h"" (#include) "#include" (string_literal) ""type_defs.h"" (") """ (string_content) "type_defs.h" (") """ (preproc_include) "#include "double_vec.h" // DoubleVec, DoubleVec_IT, DoubleVec_ConstIT\n" (#include) "#include" (string_literal) ""double_vec.h"" (") """ (string_content) "double_vec.h" (") """ (comment) "// DoubleVec, DoubleVec_IT, DoubleVec_ConstIT" (function_definition) "class DeltaRange\n{\npublic:\n const bool SolutionExists;\n const double MinDelta;\n const double MaxDelta;\n DeltaRange(bool, double, double);\n}" (type_identifier) "class" (identifier) "DeltaRange" (compound_statement) "{\npublic:\n const bool SolutionExists;\n const double MinDelta;\n const double MaxDelta;\n DeltaRange(bool, double, double);\n}" ({) "{" (labeled_statement) "public:\n const bool SolutionExists;" (statement_identifier) "public" (:) ":" (declaration) "const bool SolutionExists;" (type_qualifier) "const" (const) "const" (primitive_type) "bool" (identifier) "SolutionExists" (;) ";" (declaration) "const double MinDelta;" (type_qualifier) "const" (const) "const" (primitive_type) "double" (identifier) "MinDelta" (;) ";" (declaration) "const double MaxDelta;" (type_qualifier) "const" (const) "const" (primitive_type) "double" (identifier) "MaxDelta" (;) ";" (expression_statement) "DeltaRange(bool, double, double);" (call_expression) "DeltaRange(bool, double, double)" (identifier) "DeltaRange" (argument_list) "(bool, double, double)" (() "(" (identifier) "bool" (,) "," (identifier) "double" (,) "," (identifier) "double" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (declaration) "DeltaRange SolveSimpleLinearInequalityListFunction(const DoubleVec & A, const DoubleVec & B, const DoubleVec & C, const double Epsilon);" (type_identifier) "DeltaRange" (function_declarator) "SolveSimpleLinearInequalityListFunction(const DoubleVec & A, const DoubleVec & B, const DoubleVec & C, const double Epsilon)" (identifier) "SolveSimpleLinearInequalityListFunction" (parameter_list) "(const DoubleVec & A, const DoubleVec & B, const DoubleVec & C, const double Epsilon)" (() "(" (parameter_declaration) "const DoubleVec & A" (type_qualifier) "const" (const) "const" (type_identifier) "DoubleVec" (ERROR) "&" (&) "&" (identifier) "A" (,) "," (parameter_declaration) "const DoubleVec & B" (type_qualifier) "const" (const) "const" (type_identifier) "DoubleVec" (ERROR) "&" (&) "&" (identifier) "B" (,) "," (parameter_declaration) "const DoubleVec & C" (type_qualifier) "const" (const) "const" (type_identifier) "DoubleVec" (ERROR) "&" (&) "&" (identifier) "C" (,) "," (parameter_declaration) "const double Epsilon" (type_qualifier) "const" (const) "const" (primitive_type) "double" (identifier) "Epsilon" ()) ")" (;) ";" (#endif) "#endif" (comment) "// SolveSimpleLinearInequalityListFunction_H"
103
3
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 31.71, "nodes": 51, "errors": 0, "source_hash": "1d22bede3d0abf767998cc5a838aaadeff0db6fd71ea0432bf3ae39ae4cee372", "categorized_nodes": 42}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SolveSimpleLinearInequalityListFunction_H\n#define SolveSimpleLinearInequalityListFunction_H\n\n\n#include <limits>\n\n#include \"type_defs.h\" \n#include \"double_vec.h\" // DoubleVec, DoubleVec_IT, DoubleVec_ConstIT\n\nclass DeltaRange\n{\npublic:\n const bool SolutionExists;\n const double MinDelta;\n const double MaxDelta;\n DeltaRange(bool, double, double);\n};\n\nDeltaRange SolveSimpleLinearInequalityListFunction(const DoubleVec & A, const DoubleVec & B, const DoubleVec & C, const double Epsilon);\n\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 33, 50], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "SolveSimpleLinearInequalityListFunction_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 49}}, {"id": 3, "type": "preproc_def", "text": "#define SolveSimpleLinearInequalityListFunction_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": "SolveSimpleLinearInequalityListFunction_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 49}}, {"id": 6, "type": "preproc_include", "text": "#include <limits>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<limits>", "parent": 6, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include \"type_defs.h\"", "parent": 0, "children": [10, 11], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 22}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"type_defs.h\"", "parent": 9, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 22}}, {"id": 12, "type": "preproc_include", "text": "#include \"double_vec.h\" // DoubleVec, DoubleVec_IT, DoubleVec_ConstIT\n", "parent": 0, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"double_vec.h\"", "parent": 12, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 23}}, {"id": 15, "type": "function_definition", "text": "class DeltaRange\n{\npublic:\n const bool SolutionExists;\n const double MinDelta;\n const double MaxDelta;\n DeltaRange(bool, double, double);\n}", "parent": 0, "children": [16], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 16, "type": "identifier", "text": "DeltaRange", "parent": 15, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 16}}, {"id": 17, "type": "labeled_statement", "text": "public:\n const bool SolutionExists;", "parent": 15, "children": [18], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 30}}, {"id": 18, "type": "declaration", "text": "const bool SolutionExists;", "parent": 17, "children": [19, 20], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 30}}, {"id": 19, "type": "primitive_type", "text": "bool", "parent": 18, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 14}}, {"id": 20, "type": "identifier", "text": "SolutionExists", "parent": 18, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 29}}, {"id": 21, "type": "declaration", "text": "const double MinDelta;", "parent": 15, "children": [22, 23], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 26}}, {"id": 22, "type": "primitive_type", "text": "double", "parent": 21, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 16}}, {"id": 23, "type": "identifier", "text": "MinDelta", "parent": 21, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 25}}, {"id": 24, "type": "declaration", "text": "const double MaxDelta;", "parent": 15, "children": [25, 26], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 26}}, {"id": 25, "type": "primitive_type", "text": "double", "parent": 24, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 16}}, {"id": 26, "type": "identifier", "text": "MaxDelta", "parent": 24, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 25}}, {"id": 27, "type": "call_expression", "text": "DeltaRange(bool, double, double)", "parent": 15, "children": [28, 29], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 36}}, {"id": 28, "type": "identifier", "text": "DeltaRange", "parent": 27, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 14}}, {"id": 29, "type": "argument_list", "text": "(bool, double, double)", "parent": 27, "children": [30, 31, 32], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 36}}, {"id": 30, "type": "identifier", "text": "bool", "parent": 29, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 19}}, {"id": 31, "type": "identifier", "text": "double", "parent": 29, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 27}}, {"id": 32, "type": "identifier", "text": "double", "parent": 29, "children": [], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 35}}, {"id": 33, "type": "declaration", "text": "DeltaRange SolveSimpleLinearInequalityListFunction(const DoubleVec & A, const DoubleVec & B, const DoubleVec & C, const double Epsilon);", "parent": 0, "children": [34, 35], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 136}}, {"id": 34, "type": "type_identifier", "text": "DeltaRange", "parent": 33, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 10}}, {"id": 35, "type": "function_declarator", "text": "SolveSimpleLinearInequalityListFunction(const DoubleVec & A, const DoubleVec & B, const DoubleVec & C, const double Epsilon)", "parent": 33, "children": [36, 37], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 135}}, {"id": 36, "type": "identifier", "text": "SolveSimpleLinearInequalityListFunction", "parent": 35, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 50}}, {"id": 37, "type": "parameter_list", "text": "(const DoubleVec & A, const DoubleVec & B, const DoubleVec & C, const double Epsilon)", "parent": 35, "children": [38, 41, 44, 47], "start_point": {"row": 18, "column": 50}, "end_point": {"row": 18, "column": 135}}, {"id": 38, "type": "parameter_declaration", "text": "const DoubleVec & A", "parent": 37, "children": [39, 40], "start_point": {"row": 18, "column": 51}, "end_point": {"row": 18, "column": 70}}, {"id": 39, "type": "type_identifier", "text": "DoubleVec", "parent": 38, "children": [], "start_point": {"row": 18, "column": 57}, "end_point": {"row": 18, "column": 66}}, {"id": 40, "type": "identifier", "text": "A", "parent": 38, "children": [], "start_point": {"row": 18, "column": 69}, "end_point": {"row": 18, "column": 70}}, {"id": 41, "type": "parameter_declaration", "text": "const DoubleVec & B", "parent": 37, "children": [42, 43], "start_point": {"row": 18, "column": 72}, "end_point": {"row": 18, "column": 91}}, {"id": 42, "type": "type_identifier", "text": "DoubleVec", "parent": 41, "children": [], "start_point": {"row": 18, "column": 78}, "end_point": {"row": 18, "column": 87}}, {"id": 43, "type": "identifier", "text": "B", "parent": 41, "children": [], "start_point": {"row": 18, "column": 90}, "end_point": {"row": 18, "column": 91}}, {"id": 44, "type": "parameter_declaration", "text": "const DoubleVec & C", "parent": 37, "children": [45, 46], "start_point": {"row": 18, "column": 93}, "end_point": {"row": 18, "column": 112}}, {"id": 45, "type": "type_identifier", "text": "DoubleVec", "parent": 44, "children": [], "start_point": {"row": 18, "column": 99}, "end_point": {"row": 18, "column": 108}}, {"id": 46, "type": "identifier", "text": "C", "parent": 44, "children": [], "start_point": {"row": 18, "column": 111}, "end_point": {"row": 18, "column": 112}}, {"id": 47, "type": "parameter_declaration", "text": "const double Epsilon", "parent": 37, "children": [48, 49], "start_point": {"row": 18, "column": 114}, "end_point": {"row": 18, "column": 134}}, {"id": 48, "type": "primitive_type", "text": "double", "parent": 47, "children": [], "start_point": {"row": 18, "column": 120}, "end_point": {"row": 18, "column": 126}}, {"id": 49, "type": "identifier", "text": "Epsilon", "parent": 47, "children": [], "start_point": {"row": 18, "column": 127}, "end_point": {"row": 18, "column": 134}}, {"id": 50, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 35], "variables": [18, 21, 24, 33, 38, 41, 44, 47], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [27], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 16, 20, 23, 26, 28, 30, 31, 32, 34, 36, 39, 40, 42, 43, 45, 46, 49, 50], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "DeltaRange", "text_snippet": "class DeltaRange\n{\npublic:\n const bool SolutionExists;\n const double MinDelta;\n const doubl"}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "SolveSimpleLinearInequalityListFunction(const DoubleVec & A, const DoubleVec & B, const DoubleVec & "}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <limits>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"type_defs.h\""}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"double_vec.h\" // DoubleVec, DoubleVec_IT, DoubleVec_ConstIT\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#ifndef SolveSimpleLinearInequalityListFunction_H\n#define SolveSimpleLinearInequalityListFunction_H\n\n\n#include <limits>\n\n#include \"type_defs.h\" \n#include \"double_vec.h\" // DoubleVec, DoubleVec_IT, DoubleVec_ConstIT\n\nclass DeltaRange\n{\npublic:\n const bool SolutionExists;\n const double MinDelta;\n const double MaxDelta;\n DeltaRange(bool, double, double);\n};\n\nDeltaRange SolveSimpleLinearInequalityListFunction(const DoubleVec & A, const DoubleVec & B, const DoubleVec & C, const double Epsilon);\n\n\n#endif // SolveSimpleLinearInequalityListFunction_H\n"}
310
c
/** *Copyright (c) 2000-2001, <NAME> *All rights reserved. *Redistribution and use in source and binary forms, with or without *modification, are permitted provided that the following conditions *are met: * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * *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 REGENTS *OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * *NB: This software will not save the world. */ /* Generated by Together */ #ifndef DEFAULTLISTITEM_H #define DEFAULTLISTITEM_H namespace VCF{ #define DEFAULTLISTITEM_CLASSID "ED88C0AC-26AB-11d4-B539-00C04F0196DA" class APPKIT_API DefaultListItem : public ListItem { public: BEGIN_CLASSINFO(DefaultListItem, "VCF::DefaultListItem", "VCF::ListItem", DEFAULTLISTITEM_CLASSID) END_CLASSINFO(DefaultListItem) DefaultListItem(); DefaultListItem( Model* model ); DefaultListItem( Model* model, const String& caption ); virtual ~DefaultListItem(); void init(); virtual bool containsPoint( Point * pt ); EVENT_HANDLER_LIST(ItemPaint); EVENT_HANDLER_LIST(ItemChanged); EVENT_HANDLER_LIST(ItemSelected); EVENT_HANDLER_LIST(ItemAdded); EVENT_HANDLER_LIST(ItemDeleted); virtual void addItemPaintHandler( EventHandler* handler ){ ADD_EVENT_IMPL(ItemPaint) } virtual void addItemChangedHandler( EventHandler* handler ){ ADD_EVENT_IMPL(ItemChanged) } virtual void addItemSelectedHandler( EventHandler* handler ){ ADD_EVENT_IMPL(ItemSelected) } virtual void addItemAddedHandler( EventHandler* handler ){ ADD_EVENT_IMPL(ItemAdded) } virtual void addItemDeletedHandler( EventHandler* handler ){ ADD_EVENT_IMPL(ItemDeleted) } virtual void removeItemPaintHandler( EventHandler* handler ){ REMOVE_EVENT_IMPL(ItemPaint) } virtual void removeItemChangedHandler( EventHandler* handler ){ REMOVE_EVENT_IMPL(ItemChanged) } virtual void removeItemSelectedHandler( EventHandler* handler ){ REMOVE_EVENT_IMPL(ItemSelected) } virtual void removeItemAddedHandler( EventHandler* handler ){ REMOVE_EVENT_IMPL(ItemAdded) } virtual void removeItemDeletedHandler( EventHandler* handler ){ REMOVE_EVENT_IMPL(ItemDeleted) } FIRE_EVENT(ItemPaint,ItemEvent) FIRE_EVENT(ItemChanged,ItemEvent) FIRE_EVENT(ItemSelected,ItemEvent) FIRE_EVENT(ItemAdded,ItemEvent) FIRE_EVENT(ItemDeleted,ItemEvent) virtual Image* getImage(); virtual unsigned long getIndex(); virtual void setIndex( const unsigned long& index ); virtual void* getData(); virtual void setData( void* data ); virtual String getCaption(); virtual void setCaption( const String& caption ); virtual Model* getModel(); virtual void setModel( Model* model ); virtual void paint( GraphicsContext* context, Rect* paintRect ); virtual bool isSelected(); virtual void setSelected( const bool& selected ); virtual ulong32 getImageIndex() { return m_imageIndex; } virtual void setImageIndex( const ulong32& imageIndex ); virtual Rect* getBounds() { return &m_bounds; } virtual Control* getControl() { return m_owningControl; } virtual void setControl( Control* control ) { m_owningControl = control; } virtual bool canPaint() { return false; } private: Image* m_image; Control* m_owningControl; String m_caption; void* m_data; unsigned long m_index; Rect m_bounds; Model* m_model; bool m_selected; ulong32 m_imageIndex; }; }; #endif //DEFAULTLISTITEM_H
25.42
171
(translation_unit) "/** \n*Copyright (c) 2000-2001, <NAME> \n*All rights reserved. \n*Redistribution and use in source and binary forms, with or without \n*modification, are permitted provided that the following conditions \n*are met: \n* 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 copyright \n* notice, this list of conditions and the following disclaimer in \n* the documentation and/or other materials provided with the distribution. \n* \n*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" \n*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 REGENTS \n*OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, \n*EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, \n*PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \n*PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF \n*LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \n*NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \n* \n*NB: This software will not save the world. \n*/ \n \n/* Generated by Together */ \n \n#ifndef DEFAULTLISTITEM_H \n#define DEFAULTLISTITEM_H \n \n \n \n \nnamespace VCF{ \n \n#define DEFAULTLISTITEM_CLASSID "ED88C0AC-26AB-11d4-B539-00C04F0196DA" \n \nclass APPKIT_API DefaultListItem : public ListItem { \npublic: \n \n BEGIN_CLASSINFO(DefaultListItem, "VCF::DefaultListItem", "VCF::ListItem", DEFAULTLISTITEM_CLASSID) \n END_CLASSINFO(DefaultListItem) \n \n DefaultListItem(); \n \n DefaultListItem( Model* model ); \n \n DefaultListItem( Model* model, const String& caption ); \n \n virtual ~DefaultListItem(); \n \n void init(); \n \n virtual bool containsPoint( Point * pt ); \n \n EVENT_HANDLER_LIST(ItemPaint); \n EVENT_HANDLER_LIST(ItemChanged); \n EVENT_HANDLER_LIST(ItemSelected); \n EVENT_HANDLER_LIST(ItemAdded); \n EVENT_HANDLER_LIST(ItemDeleted); \n \n virtual void addItemPaintHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemPaint) \n } \n \n virtual void addItemChangedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemChanged) \n } \n \n virtual void addItemSelectedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemSelected) \n } \n \n virtual void addItemAddedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemAdded) \n } \n \n virtual void addItemDeletedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemDeleted) \n } \n \n virtual void removeItemPaintHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemPaint) \n } \n \n virtual void removeItemChangedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemChanged) \n } \n \n virtual void removeItemSelectedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemSelected) \n } \n \n virtual void removeItemAddedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemAdded) \n } \n \n virtual void removeItemDeletedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemDeleted) \n } \n \n FIRE_EVENT(ItemPaint,ItemEvent) \n FIRE_EVENT(ItemChanged,ItemEvent) \n FIRE_EVENT(ItemSelected,ItemEvent) \n FIRE_EVENT(ItemAdded,ItemEvent) \n FIRE_EVENT(ItemDeleted,ItemEvent) \n \n virtual Image* getImage(); \n \n virtual unsigned long getIndex(); \n \n virtual void setIndex( const unsigned long& index ); \n \n virtual void* getData(); \n \n virtual void setData( void* data ); \n \n virtual String getCaption(); \n \n virtual void setCaption( const String& caption ); \n \n virtual Model* getModel(); \n \n virtual void setModel( Model* model ); \n \n virtual void paint( GraphicsContext* context, Rect* paintRect ); \n \n virtual bool isSelected(); \n \n virtual void setSelected( const bool& selected ); \n \n virtual ulong32 getImageIndex() { \n return m_imageIndex; \n } \n \n virtual void setImageIndex( const ulong32& imageIndex ); \n \n virtual Rect* getBounds() { \n return &m_bounds; \n } \n \n virtual Control* getControl() { \n return m_owningControl; \n } \n \n \n virtual void setControl( Control* control ) { \n m_owningControl = control; \n } \n \n virtual bool canPaint() { \n return false; \n } \nprivate: \n Image* m_image; \n Control* m_owningControl; \n String m_caption; \n void* m_data; \n unsigned long m_index; \n Rect m_bounds; \n Model* m_model; \n bool m_selected; \n ulong32 m_imageIndex; \n}; \n \n}; \n \n#endif //DEFAULTLISTITEM_H \n" (comment) "/** \n*Copyright (c) 2000-2001, <NAME> \n*All rights reserved. \n*Redistribution and use in source and binary forms, with or without \n*modification, are permitted provided that the following conditions \n*are met: \n* 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 copyright \n* notice, this list of conditions and the following disclaimer in \n* the documentation and/or other materials provided with the distribution. \n* \n*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" \n*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 REGENTS \n*OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, \n*EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, \n*PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \n*PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF \n*LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \n*NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \n* \n*NB: This software will not save the world. \n*/" (comment) "/* Generated by Together */" (ERROR) "#ifndef DEFAULTLISTITEM_H \n#define DEFAULTLISTITEM_H \n \n \n \n \nnamespace VCF{ \n \n#define DEFAULTLISTITEM_CLASSID "ED88C0AC-26AB-11d4-B539-00C04F0196DA" \n \nclass APPKIT_API DefaultListItem : public ListItem { \npublic: \n \n BEGIN_CLASSINFO(DefaultListItem, "VCF::DefaultListItem", "VCF::ListItem", DEFAULTLISTITEM_CLASSID) \n END_CLASSINFO(DefaultListItem) \n \n DefaultListItem(); \n \n DefaultListItem( Model* model ); \n \n DefaultListItem( Model* model, const String& caption ); \n \n virtual ~DefaultListItem(); \n \n void init(); \n \n virtual bool containsPoint( Point * pt ); \n \n EVENT_HANDLER_LIST(ItemPaint); \n EVENT_HANDLER_LIST(ItemChanged); \n EVENT_HANDLER_LIST(ItemSelected); \n EVENT_HANDLER_LIST(ItemAdded); \n EVENT_HANDLER_LIST(ItemDeleted); \n \n virtual void addItemPaintHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemPaint) \n } \n \n virtual void addItemChangedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemChanged) \n } \n \n virtual void addItemSelectedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemSelected) \n } \n \n virtual void addItemAddedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemAdded) \n } \n \n virtual void addItemDeletedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemDeleted) \n } \n \n virtual void removeItemPaintHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemPaint) \n } \n \n virtual void removeItemChangedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemChanged) \n } \n \n virtual void removeItemSelectedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemSelected) \n } \n \n virtual void removeItemAddedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemAdded) \n } \n \n virtual void removeItemDeletedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemDeleted) \n } \n \n FIRE_EVENT(ItemPaint,ItemEvent) \n FIRE_EVENT(ItemChanged,ItemEvent) \n FIRE_EVENT(ItemSelected,ItemEvent) \n FIRE_EVENT(ItemAdded,ItemEvent) \n FIRE_EVENT(ItemDeleted,ItemEvent) \n \n virtual Image* getImage(); \n \n virtual unsigned long getIndex(); \n \n virtual void setIndex( const unsigned long& index ); \n \n virtual void* getData(); \n \n virtual void setData( void* data ); \n \n virtual String getCaption(); \n \n virtual void setCaption( const String& caption ); \n \n virtual Model* getModel(); \n \n virtual void setModel( Model* model ); \n \n virtual void paint( GraphicsContext* context, Rect* paintRect ); \n \n virtual bool isSelected(); \n \n virtual void setSelected( const bool& selected ); \n \n virtual ulong32 getImageIndex() { \n return m_imageIndex; \n } \n \n virtual void setImageIndex( const ulong32& imageIndex ); \n \n virtual Rect* getBounds() { \n return &m_bounds; \n } \n \n virtual Control* getControl() { \n return m_owningControl; \n } \n \n \n virtual void setControl( Control* control ) { \n m_owningControl = control; \n } \n \n virtual bool canPaint() { \n return false; \n } \nprivate: \n Image* m_image; \n Control* m_owningControl; \n String m_caption; \n void* m_data; \n unsigned long m_index; \n Rect m_bounds; \n Model* m_model; \n bool m_selected; \n ulong32 m_imageIndex; \n}; \n \n}; \n \n#endif //DEFAULTLISTITEM_H \n" (#ifndef) "#ifndef" (identifier) "DEFAULTLISTITEM_H" (preproc_def) "#define DEFAULTLISTITEM_H \n" (#define) "#define" (identifier) "DEFAULTLISTITEM_H" (type_identifier) "namespace" (identifier) "VCF" ({) "{" (preproc_def) "#define DEFAULTLISTITEM_CLASSID "ED88C0AC-26AB-11d4-B539-00C04F0196DA" \n" (#define) "#define" (identifier) "DEFAULTLISTITEM_CLASSID" (preproc_arg) ""ED88C0AC-26AB-11d4-B539-00C04F0196DA" " (declaration) "class APPKIT_API" (type_identifier) "class" (identifier) "APPKIT_API" (;) "" (labeled_statement) "DefaultListItem : public ListItem { \npublic: \n \n BEGIN_CLASSINFO(DefaultListItem, "VCF::DefaultListItem", "VCF::ListItem", DEFAULTLISTITEM_CLASSID) \n END_CLASSINFO(DefaultListItem) \n \n DefaultListItem(); \n \n DefaultListItem( Model* model ); \n \n DefaultListItem( Model* model, const String& caption ); \n \n virtual ~DefaultListItem(); \n \n void init(); \n \n virtual bool containsPoint( Point * pt ); \n \n EVENT_HANDLER_LIST(ItemPaint); \n EVENT_HANDLER_LIST(ItemChanged); \n EVENT_HANDLER_LIST(ItemSelected); \n EVENT_HANDLER_LIST(ItemAdded); \n EVENT_HANDLER_LIST(ItemDeleted); \n \n virtual void addItemPaintHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemPaint) \n } \n \n virtual void addItemChangedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemChanged) \n } \n \n virtual void addItemSelectedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemSelected) \n } \n \n virtual void addItemAddedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemAdded) \n } \n \n virtual void addItemDeletedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemDeleted) \n } \n \n virtual void removeItemPaintHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemPaint) \n } \n \n virtual void removeItemChangedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemChanged) \n } \n \n virtual void removeItemSelectedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemSelected) \n } \n \n virtual void removeItemAddedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemAdded) \n } \n \n virtual void removeItemDeletedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemDeleted) \n } \n \n FIRE_EVENT(ItemPaint,ItemEvent) \n FIRE_EVENT(ItemChanged,ItemEvent) \n FIRE_EVENT(ItemSelected,ItemEvent) \n FIRE_EVENT(ItemAdded,ItemEvent) \n FIRE_EVENT(ItemDeleted,ItemEvent) \n \n virtual Image* getImage(); \n \n virtual unsigned long getIndex(); \n \n virtual void setIndex( const unsigned long& index ); \n \n virtual void* getData(); \n \n virtual void setData( void* data ); \n \n virtual String getCaption(); \n \n virtual void setCaption( const String& caption ); \n \n virtual Model* getModel(); \n \n virtual void setModel( Model* model ); \n \n virtual void paint( GraphicsContext* context, Rect* paintRect ); \n \n virtual bool isSelected(); \n \n virtual void setSelected( const bool& selected ); \n \n virtual ulong32 getImageIndex() { \n return m_imageIndex; \n } \n \n virtual void setImageIndex( const ulong32& imageIndex ); \n \n virtual Rect* getBounds() { \n return &m_bounds; \n } \n \n virtual Control* getControl() { \n return m_owningControl; \n } \n \n \n virtual void setControl( Control* control ) { \n m_owningControl = control; \n } \n \n virtual bool canPaint() { \n return false; \n } \nprivate: \n Image* m_image; \n Control* m_owningControl; \n String m_caption; \n void* m_data; \n unsigned long m_index; \n Rect m_bounds; \n Model* m_model; \n bool m_selected; \n ulong32 m_imageIndex; \n}; \n \n}" (statement_identifier) "DefaultListItem" (:) ":" (ERROR) "public ListItem" (type_identifier) "public" (identifier) "ListItem" (compound_statement) "{ \npublic: \n \n BEGIN_CLASSINFO(DefaultListItem, "VCF::DefaultListItem", "VCF::ListItem", DEFAULTLISTITEM_CLASSID) \n END_CLASSINFO(DefaultListItem) \n \n DefaultListItem(); \n \n DefaultListItem( Model* model ); \n \n DefaultListItem( Model* model, const String& caption ); \n \n virtual ~DefaultListItem(); \n \n void init(); \n \n virtual bool containsPoint( Point * pt ); \n \n EVENT_HANDLER_LIST(ItemPaint); \n EVENT_HANDLER_LIST(ItemChanged); \n EVENT_HANDLER_LIST(ItemSelected); \n EVENT_HANDLER_LIST(ItemAdded); \n EVENT_HANDLER_LIST(ItemDeleted); \n \n virtual void addItemPaintHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemPaint) \n } \n \n virtual void addItemChangedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemChanged) \n } \n \n virtual void addItemSelectedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemSelected) \n } \n \n virtual void addItemAddedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemAdded) \n } \n \n virtual void addItemDeletedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemDeleted) \n } \n \n virtual void removeItemPaintHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemPaint) \n } \n \n virtual void removeItemChangedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemChanged) \n } \n \n virtual void removeItemSelectedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemSelected) \n } \n \n virtual void removeItemAddedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemAdded) \n } \n \n virtual void removeItemDeletedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemDeleted) \n } \n \n FIRE_EVENT(ItemPaint,ItemEvent) \n FIRE_EVENT(ItemChanged,ItemEvent) \n FIRE_EVENT(ItemSelected,ItemEvent) \n FIRE_EVENT(ItemAdded,ItemEvent) \n FIRE_EVENT(ItemDeleted,ItemEvent) \n \n virtual Image* getImage(); \n \n virtual unsigned long getIndex(); \n \n virtual void setIndex( const unsigned long& index ); \n \n virtual void* getData(); \n \n virtual void setData( void* data ); \n \n virtual String getCaption(); \n \n virtual void setCaption( const String& caption ); \n \n virtual Model* getModel(); \n \n virtual void setModel( Model* model ); \n \n virtual void paint( GraphicsContext* context, Rect* paintRect ); \n \n virtual bool isSelected(); \n \n virtual void setSelected( const bool& selected ); \n \n virtual ulong32 getImageIndex() { \n return m_imageIndex; \n } \n \n virtual void setImageIndex( const ulong32& imageIndex ); \n \n virtual Rect* getBounds() { \n return &m_bounds; \n } \n \n virtual Control* getControl() { \n return m_owningControl; \n } \n \n \n virtual void setControl( Control* control ) { \n m_owningControl = control; \n } \n \n virtual bool canPaint() { \n return false; \n } \nprivate: \n Image* m_image; \n Control* m_owningControl; \n String m_caption; \n void* m_data; \n unsigned long m_index; \n Rect m_bounds; \n Model* m_model; \n bool m_selected; \n ulong32 m_imageIndex; \n}; \n \n}" ({) "{" (labeled_statement) "public: \n \n BEGIN_CLASSINFO(DefaultListItem, "VCF::DefaultListItem", "VCF::ListItem", DEFAULTLISTITEM_CLASSID)" (statement_identifier) "public" (:) ":" (expression_statement) "BEGIN_CLASSINFO(DefaultListItem, "VCF::DefaultListItem", "VCF::ListItem", DEFAULTLISTITEM_CLASSID)" (call_expression) "BEGIN_CLASSINFO(DefaultListItem, "VCF::DefaultListItem", "VCF::ListItem", DEFAULTLISTITEM_CLASSID)" (identifier) "BEGIN_CLASSINFO" (argument_list) "(DefaultListItem, "VCF::DefaultListItem", "VCF::ListItem", DEFAULTLISTITEM_CLASSID)" (() "(" (identifier) "DefaultListItem" (,) "," (string_literal) ""VCF::DefaultListItem"" (") """ (string_content) "VCF::DefaultListItem" (") """ (,) "," (string_literal) ""VCF::ListItem"" (") """ (string_content) "VCF::ListItem" (") """ (,) "," (identifier) "DEFAULTLISTITEM_CLASSID" ()) ")" (;) "" (declaration) "END_CLASSINFO(DefaultListItem) \n \n DefaultListItem();" (macro_type_specifier) "END_CLASSINFO(DefaultListItem)" (identifier) "END_CLASSINFO" (() "(" (type_descriptor) "DefaultListItem" (type_identifier) "DefaultListItem" ()) ")" (function_declarator) "DefaultListItem()" (identifier) "DefaultListItem" (parameter_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "DefaultListItem( Model* model );" (call_expression) "DefaultListItem( Model* model )" (identifier) "DefaultListItem" (argument_list) "( Model* model )" (() "(" (binary_expression) "Model* model" (identifier) "Model" (*) "*" (identifier) "model" ()) ")" (;) ";" (expression_statement) "DefaultListItem( Model* model, const String& caption );" (call_expression) "DefaultListItem( Model* model, const String& caption )" (identifier) "DefaultListItem" (argument_list) "( Model* model, const String& caption )" (() "(" (binary_expression) "Model* model" (identifier) "Model" (*) "*" (identifier) "model" (,) "," (ERROR) "const" (identifier) "const" (binary_expression) "String& caption" (identifier) "String" (&) "&" (identifier) "caption" ()) ")" (;) ";" (declaration) "virtual ~DefaultListItem();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "DefaultListItem()" (identifier) "DefaultListItem" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void init();" (primitive_type) "void" (function_declarator) "init()" (identifier) "init" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual bool containsPoint( Point * pt );" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (function_declarator) "containsPoint( Point * pt )" (identifier) "containsPoint" (parameter_list) "( Point * pt )" (() "(" (parameter_declaration) "Point * pt" (type_identifier) "Point" (pointer_declarator) "* pt" (*) "*" (identifier) "pt" ()) ")" (;) ";" (expression_statement) "EVENT_HANDLER_LIST(ItemPaint);" (call_expression) "EVENT_HANDLER_LIST(ItemPaint)" (identifier) "EVENT_HANDLER_LIST" (argument_list) "(ItemPaint)" (() "(" (identifier) "ItemPaint" ()) ")" (;) ";" (expression_statement) "EVENT_HANDLER_LIST(ItemChanged);" (call_expression) "EVENT_HANDLER_LIST(ItemChanged)" (identifier) "EVENT_HANDLER_LIST" (argument_list) "(ItemChanged)" (() "(" (identifier) "ItemChanged" ()) ")" (;) ";" (expression_statement) "EVENT_HANDLER_LIST(ItemSelected);" (call_expression) "EVENT_HANDLER_LIST(ItemSelected)" (identifier) "EVENT_HANDLER_LIST" (argument_list) "(ItemSelected)" (() "(" (identifier) "ItemSelected" ()) ")" (;) ";" (expression_statement) "EVENT_HANDLER_LIST(ItemAdded);" (call_expression) "EVENT_HANDLER_LIST(ItemAdded)" (identifier) "EVENT_HANDLER_LIST" (argument_list) "(ItemAdded)" (() "(" (identifier) "ItemAdded" ()) ")" (;) ";" (expression_statement) "EVENT_HANDLER_LIST(ItemDeleted);" (call_expression) "EVENT_HANDLER_LIST(ItemDeleted)" (identifier) "EVENT_HANDLER_LIST" (argument_list) "(ItemDeleted)" (() "(" (identifier) "ItemDeleted" ()) ")" (;) ";" (function_definition) "virtual void addItemPaintHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemPaint) \n }" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "addItemPaintHandler( EventHandler* handler )" (identifier) "addItemPaintHandler" (parameter_list) "( EventHandler* handler )" (() "(" (parameter_declaration) "EventHandler* handler" (type_identifier) "EventHandler" (pointer_declarator) "* handler" (*) "*" (identifier) "handler" ()) ")" (compound_statement) "{ \n ADD_EVENT_IMPL(ItemPaint) \n }" ({) "{" (macro_type_specifier) "ADD_EVENT_IMPL(ItemPaint)" (identifier) "ADD_EVENT_IMPL" (() "(" (type_descriptor) "ItemPaint" (type_identifier) "ItemPaint" ()) ")" (;) "" (}) "}" (function_definition) "virtual void addItemChangedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemChanged) \n }" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "addItemChangedHandler( EventHandler* handler )" (identifier) "addItemChangedHandler" (parameter_list) "( EventHandler* handler )" (() "(" (parameter_declaration) "EventHandler* handler" (type_identifier) "EventHandler" (pointer_declarator) "* handler" (*) "*" (identifier) "handler" ()) ")" (compound_statement) "{ \n ADD_EVENT_IMPL(ItemChanged) \n }" ({) "{" (macro_type_specifier) "ADD_EVENT_IMPL(ItemChanged)" (identifier) "ADD_EVENT_IMPL" (() "(" (type_descriptor) "ItemChanged" (type_identifier) "ItemChanged" ()) ")" (;) "" (}) "}" (function_definition) "virtual void addItemSelectedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemSelected) \n }" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "addItemSelectedHandler( EventHandler* handler )" (identifier) "addItemSelectedHandler" (parameter_list) "( EventHandler* handler )" (() "(" (parameter_declaration) "EventHandler* handler" (type_identifier) "EventHandler" (pointer_declarator) "* handler" (*) "*" (identifier) "handler" ()) ")" (compound_statement) "{ \n ADD_EVENT_IMPL(ItemSelected) \n }" ({) "{" (macro_type_specifier) "ADD_EVENT_IMPL(ItemSelected)" (identifier) "ADD_EVENT_IMPL" (() "(" (type_descriptor) "ItemSelected" (type_identifier) "ItemSelected" ()) ")" (;) "" (}) "}" (function_definition) "virtual void addItemAddedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemAdded) \n }" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "addItemAddedHandler( EventHandler* handler )" (identifier) "addItemAddedHandler" (parameter_list) "( EventHandler* handler )" (() "(" (parameter_declaration) "EventHandler* handler" (type_identifier) "EventHandler" (pointer_declarator) "* handler" (*) "*" (identifier) "handler" ()) ")" (compound_statement) "{ \n ADD_EVENT_IMPL(ItemAdded) \n }" ({) "{" (macro_type_specifier) "ADD_EVENT_IMPL(ItemAdded)" (identifier) "ADD_EVENT_IMPL" (() "(" (type_descriptor) "ItemAdded" (type_identifier) "ItemAdded" ()) ")" (;) "" (}) "}" (function_definition) "virtual void addItemDeletedHandler( EventHandler* handler ){ \n ADD_EVENT_IMPL(ItemDeleted) \n }" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "addItemDeletedHandler( EventHandler* handler )" (identifier) "addItemDeletedHandler" (parameter_list) "( EventHandler* handler )" (() "(" (parameter_declaration) "EventHandler* handler" (type_identifier) "EventHandler" (pointer_declarator) "* handler" (*) "*" (identifier) "handler" ()) ")" (compound_statement) "{ \n ADD_EVENT_IMPL(ItemDeleted) \n }" ({) "{" (macro_type_specifier) "ADD_EVENT_IMPL(ItemDeleted)" (identifier) "ADD_EVENT_IMPL" (() "(" (type_descriptor) "ItemDeleted" (type_identifier) "ItemDeleted" ()) ")" (;) "" (}) "}" (function_definition) "virtual void removeItemPaintHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemPaint) \n }" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "removeItemPaintHandler( EventHandler* handler )" (identifier) "removeItemPaintHandler" (parameter_list) "( EventHandler* handler )" (() "(" (parameter_declaration) "EventHandler* handler" (type_identifier) "EventHandler" (pointer_declarator) "* handler" (*) "*" (identifier) "handler" ()) ")" (compound_statement) "{ \n REMOVE_EVENT_IMPL(ItemPaint) \n }" ({) "{" (macro_type_specifier) "REMOVE_EVENT_IMPL(ItemPaint)" (identifier) "REMOVE_EVENT_IMPL" (() "(" (type_descriptor) "ItemPaint" (type_identifier) "ItemPaint" ()) ")" (;) "" (}) "}" (function_definition) "virtual void removeItemChangedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemChanged) \n }" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "removeItemChangedHandler( EventHandler* handler )" (identifier) "removeItemChangedHandler" (parameter_list) "( EventHandler* handler )" (() "(" (parameter_declaration) "EventHandler* handler" (type_identifier) "EventHandler" (pointer_declarator) "* handler" (*) "*" (identifier) "handler" ()) ")" (compound_statement) "{ \n REMOVE_EVENT_IMPL(ItemChanged) \n }" ({) "{" (macro_type_specifier) "REMOVE_EVENT_IMPL(ItemChanged)" (identifier) "REMOVE_EVENT_IMPL" (() "(" (type_descriptor) "ItemChanged" (type_identifier) "ItemChanged" ()) ")" (;) "" (}) "}" (function_definition) "virtual void removeItemSelectedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemSelected) \n }" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "removeItemSelectedHandler( EventHandler* handler )" (identifier) "removeItemSelectedHandler" (parameter_list) "( EventHandler* handler )" (() "(" (parameter_declaration) "EventHandler* handler" (type_identifier) "EventHandler" (pointer_declarator) "* handler" (*) "*" (identifier) "handler" ()) ")" (compound_statement) "{ \n REMOVE_EVENT_IMPL(ItemSelected) \n }" ({) "{" (macro_type_specifier) "REMOVE_EVENT_IMPL(ItemSelected)" (identifier) "REMOVE_EVENT_IMPL" (() "(" (type_descriptor) "ItemSelected" (type_identifier) "ItemSelected" ()) ")" (;) "" (}) "}" (function_definition) "virtual void removeItemAddedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemAdded) \n }" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "removeItemAddedHandler( EventHandler* handler )" (identifier) "removeItemAddedHandler" (parameter_list) "( EventHandler* handler )" (() "(" (parameter_declaration) "EventHandler* handler" (type_identifier) "EventHandler" (pointer_declarator) "* handler" (*) "*" (identifier) "handler" ()) ")" (compound_statement) "{ \n REMOVE_EVENT_IMPL(ItemAdded) \n }" ({) "{" (macro_type_specifier) "REMOVE_EVENT_IMPL(ItemAdded)" (identifier) "REMOVE_EVENT_IMPL" (() "(" (type_descriptor) "ItemAdded" (type_identifier) "ItemAdded" ()) ")" (;) "" (}) "}" (function_definition) "virtual void removeItemDeletedHandler( EventHandler* handler ){ \n REMOVE_EVENT_IMPL(ItemDeleted) \n } \n \n FIRE_EVENT(ItemPaint,ItemEvent) \n FIRE_EVENT(ItemChanged,ItemEvent) \n FIRE_EVENT(ItemSelected,ItemEvent) \n FIRE_EVENT(ItemAdded,ItemEvent) \n FIRE_EVENT(ItemDeleted,ItemEvent) \n \n virtual Image* getImage(); \n \n virtual unsigned long getIndex(); \n \n virtual void setIndex( const unsigned long& index ); \n \n virtual void* getData(); \n \n virtual void setData( void* data ); \n \n virtual String getCaption(); \n \n virtual void setCaption( const String& caption ); \n \n virtual Model* getModel(); \n \n virtual void setModel( Model* model ); \n \n virtual void paint( GraphicsContext* context, Rect* paintRect ); \n \n virtual bool isSelected(); \n \n virtual void setSelected( const bool& selected ); \n \n virtual ulong32 getImageIndex() { \n return m_imageIndex; \n } \n \n virtual void setImageIndex( const ulong32& imageIndex ); \n \n virtual Rect* getBounds() { \n return &m_bounds; \n } \n \n virtual Control* getControl() { \n return m_owningControl; \n } \n \n \n virtual void setControl( Control* control ) { \n m_owningControl = control; \n } \n \n virtual bool canPaint() { \n return false; \n } \nprivate: \n Image* m_image; \n Control* m_owningControl; \n String m_caption; \n void* m_data; \n unsigned long m_index; \n Rect m_bounds; \n Model* m_model; \n bool m_selected; \n ulong32 m_imageIndex; \n}" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "removeItemDeletedHandler( EventHandler* handler )" (identifier) "removeItemDeletedHandler" (parameter_list) "( EventHandler* handler )" (() "(" (parameter_declaration) "EventHandler* handler" (type_identifier) "EventHandler" (pointer_declarator) "* handler" (*) "*" (identifier) "handler" ()) ")" (compound_statement) "{ \n REMOVE_EVENT_IMPL(ItemDeleted) \n } \n \n FIRE_EVENT(ItemPaint,ItemEvent) \n FIRE_EVENT(ItemChanged,ItemEvent) \n FIRE_EVENT(ItemSelected,ItemEvent) \n FIRE_EVENT(ItemAdded,ItemEvent) \n FIRE_EVENT(ItemDeleted,ItemEvent) \n \n virtual Image* getImage(); \n \n virtual unsigned long getIndex(); \n \n virtual void setIndex( const unsigned long& index ); \n \n virtual void* getData(); \n \n virtual void setData( void* data ); \n \n virtual String getCaption(); \n \n virtual void setCaption( const String& caption ); \n \n virtual Model* getModel(); \n \n virtual void setModel( Model* model ); \n \n virtual void paint( GraphicsContext* context, Rect* paintRect ); \n \n virtual bool isSelected(); \n \n virtual void setSelected( const bool& selected ); \n \n virtual ulong32 getImageIndex() { \n return m_imageIndex; \n } \n \n virtual void setImageIndex( const ulong32& imageIndex ); \n \n virtual Rect* getBounds() { \n return &m_bounds; \n } \n \n virtual Control* getControl() { \n return m_owningControl; \n } \n \n \n virtual void setControl( Control* control ) { \n m_owningControl = control; \n } \n \n virtual bool canPaint() { \n return false; \n } \nprivate: \n Image* m_image; \n Control* m_owningControl; \n String m_caption; \n void* m_data; \n unsigned long m_index; \n Rect m_bounds; \n Model* m_model; \n bool m_selected; \n ulong32 m_imageIndex; \n}" ({) "{" (declaration) "REMOVE_EVENT_IMPL(ItemDeleted) \n } \n \n FIRE_EVENT(ItemPaint,ItemEvent) \n FIRE_EVENT(ItemChanged,ItemEvent) \n FIRE_EVENT(ItemSelected,ItemEvent) \n FIRE_EVENT(ItemAdded,ItemEvent) \n FIRE_EVENT(ItemDeleted,ItemEvent) \n \n virtual Image* getImage();" (macro_type_specifier) "REMOVE_EVENT_IMPL(ItemDeleted)" (identifier) "REMOVE_EVENT_IMPL" (() "(" (type_descriptor) "ItemDeleted" (type_identifier) "ItemDeleted" ()) ")" (ERROR) "} \n \n FIRE_EVENT(ItemPaint,ItemEvent) \n FIRE_EVENT(ItemChanged,ItemEvent) \n FIRE_EVENT(ItemSelected,ItemEvent) \n FIRE_EVENT(ItemAdded,ItemEvent) \n FIRE_EVENT(ItemDeleted,ItemEvent) \n \n virtual Image" (}) "}" (function_declarator) "FIRE_EVENT(ItemPaint,ItemEvent) \n FIRE_EVENT(ItemChanged,ItemEvent) \n FIRE_EVENT(ItemSelected,ItemEvent) \n FIRE_EVENT(ItemAdded,ItemEvent) \n FIRE_EVENT(ItemDeleted,ItemEvent) \n \n virtual Image" (identifier) "FIRE_EVENT" (parameter_list) "(ItemPaint,ItemEvent)" (() "(" (parameter_declaration) "ItemPaint" (type_identifier) "ItemPaint" (,) "," (parameter_declaration) "ItemEvent" (type_identifier) "ItemEvent" ()) ")" (call_expression) "FIRE_EVENT(ItemChanged,ItemEvent)" (identifier) "FIRE_EVENT" (argument_list) "(ItemChanged,ItemEvent)" (() "(" (identifier) "ItemChanged" (,) "," (identifier) "ItemEvent" ()) ")" (call_expression) "FIRE_EVENT(ItemSelected,ItemEvent)" (identifier) "FIRE_EVENT" (argument_list) "(ItemSelected,ItemEvent)" (() "(" (identifier) "ItemSelected" (,) "," (identifier) "ItemEvent" ()) ")" (call_expression) "FIRE_EVENT(ItemAdded,ItemEvent)" (identifier) "FIRE_EVENT" (argument_list) "(ItemAdded,ItemEvent)" (() "(" (identifier) "ItemAdded" (,) "," (identifier) "ItemEvent" ()) ")" (call_expression) "FIRE_EVENT(ItemDeleted,ItemEvent)" (identifier) "FIRE_EVENT" (argument_list) "(ItemDeleted,ItemEvent)" (() "(" (identifier) "ItemDeleted" (,) "," (identifier) "ItemEvent" ()) ")" (identifier) "virtual" (identifier) "Image" (pointer_declarator) "* getImage()" (*) "*" (function_declarator) "getImage()" (identifier) "getImage" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual unsigned long getIndex();" (sized_type_specifier) "virtual unsigned long" (type_identifier) "virtual" (unsigned) "unsigned" (long) "long" (function_declarator) "getIndex()" (identifier) "getIndex" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual void setIndex( const unsigned long& index );" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "setIndex( const unsigned long& index )" (identifier) "setIndex" (parameter_list) "( const unsigned long& index )" (() "(" (parameter_declaration) "const unsigned long& index" (type_qualifier) "const" (const) "const" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (ERROR) "&" (&) "&" (identifier) "index" ()) ")" (;) ";" (declaration) "virtual void* getData();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (pointer_declarator) "* getData()" (*) "*" (function_declarator) "getData()" (identifier) "getData" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual void setData( void* data );" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "setData( void* data )" (identifier) "setData" (parameter_list) "( void* data )" (() "(" (parameter_declaration) "void* data" (primitive_type) "void" (pointer_declarator) "* data" (*) "*" (identifier) "data" ()) ")" (;) ";" (declaration) "virtual String getCaption();" (type_identifier) "virtual" (ERROR) "String" (identifier) "String" (function_declarator) "getCaption()" (identifier) "getCaption" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual void setCaption( const String& caption );" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "setCaption( const String& caption )" (identifier) "setCaption" (parameter_list) "( const String& caption )" (() "(" (parameter_declaration) "const String& caption" (type_qualifier) "const" (const) "const" (type_identifier) "String" (ERROR) "&" (&) "&" (identifier) "caption" ()) ")" (;) ";" (declaration) "virtual Model* getModel();" (type_identifier) "virtual" (ERROR) "Model" (identifier) "Model" (pointer_declarator) "* getModel()" (*) "*" (function_declarator) "getModel()" (identifier) "getModel" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual void setModel( Model* model );" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "setModel( Model* model )" (identifier) "setModel" (parameter_list) "( Model* model )" (() "(" (parameter_declaration) "Model* model" (type_identifier) "Model" (pointer_declarator) "* model" (*) "*" (identifier) "model" ()) ")" (;) ";" (declaration) "virtual void paint( GraphicsContext* context, Rect* paintRect );" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "paint( GraphicsContext* context, Rect* paintRect )" (identifier) "paint" (parameter_list) "( GraphicsContext* context, Rect* paintRect )" (() "(" (parameter_declaration) "GraphicsContext* context" (type_identifier) "GraphicsContext" (pointer_declarator) "* context" (*) "*" (identifier) "context" (,) "," (parameter_declaration) "Rect* paintRect" (type_identifier) "Rect" (pointer_declarator) "* paintRect" (*) "*" (identifier) "paintRect" ()) ")" (;) ";" (declaration) "virtual bool isSelected();" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (function_declarator) "isSelected()" (identifier) "isSelected" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual void setSelected( const bool& selected );" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "setSelected( const bool& selected )" (identifier) "setSelected" (parameter_list) "( const bool& selected )" (() "(" (parameter_declaration) "const bool& selected" (type_qualifier) "const" (const) "const" (primitive_type) "bool" (ERROR) "&" (&) "&" (identifier) "selected" ()) ")" (;) ";" (function_definition) "virtual ulong32 getImageIndex() { \n return m_imageIndex; \n }" (type_identifier) "virtual" (ERROR) "ulong32" (identifier) "ulong32" (function_declarator) "getImageIndex()" (identifier) "getImageIndex" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ \n return m_imageIndex; \n }" ({) "{" (return_statement) "return m_imageIndex;" (return) "return" (identifier) "m_imageIndex" (;) ";" (}) "}" (declaration) "virtual void setImageIndex( const ulong32& imageIndex );" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "setImageIndex( const ulong32& imageIndex )" (identifier) "setImageIndex" (parameter_list) "( const ulong32& imageIndex )" (() "(" (parameter_declaration) "const ulong32& imageIndex" (type_qualifier) "const" (const) "const" (type_identifier) "ulong32" (ERROR) "&" (&) "&" (identifier) "imageIndex" ()) ")" (;) ";" (function_definition) "virtual Rect* getBounds() { \n return &m_bounds; \n }" (type_identifier) "virtual" (ERROR) "Rect" (identifier) "Rect" (pointer_declarator) "* getBounds()" (*) "*" (function_declarator) "getBounds()" (identifier) "getBounds" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ \n return &m_bounds; \n }" ({) "{" (return_statement) "return &m_bounds;" (return) "return" (pointer_expression) "&m_bounds" (&) "&" (identifier) "m_bounds" (;) ";" (}) "}" (function_definition) "virtual Control* getControl() { \n return m_owningControl; \n }" (type_identifier) "virtual" (ERROR) "Control" (identifier) "Control" (pointer_declarator) "* getControl()" (*) "*" (function_declarator) "getControl()" (identifier) "getControl" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ \n return m_owningControl; \n }" ({) "{" (return_statement) "return m_owningControl;" (return) "return" (identifier) "m_owningControl" (;) ";" (}) "}" (function_definition) "virtual void setControl( Control* control ) { \n m_owningControl = control; \n }" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "setControl( Control* control )" (identifier) "setControl" (parameter_list) "( Control* control )" (() "(" (parameter_declaration) "Control* control" (type_identifier) "Control" (pointer_declarator) "* control" (*) "*" (identifier) "control" ()) ")" (compound_statement) "{ \n m_owningControl = control; \n }" ({) "{" (expression_statement) "m_owningControl = control;" (assignment_expression) "m_owningControl = control" (identifier) "m_owningControl" (=) "=" (identifier) "control" (;) ";" (}) "}" (function_definition) "virtual bool canPaint() { \n return false; \n }" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (function_declarator) "canPaint()" (identifier) "canPaint" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ \n return false; \n }" ({) "{" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (labeled_statement) "private: \n Image* m_image;" (statement_identifier) "private" (:) ":" (declaration) "Image* m_image;" (type_identifier) "Image" (pointer_declarator) "* m_image" (*) "*" (identifier) "m_image" (;) ";" (declaration) "Control* m_owningControl;" (type_identifier) "Control" (pointer_declarator) "* m_owningControl" (*) "*" (identifier) "m_owningControl" (;) ";" (declaration) "String m_caption;" (type_identifier) "String" (identifier) "m_caption" (;) ";" (declaration) "void* m_data;" (primitive_type) "void" (pointer_declarator) "* m_data" (*) "*" (identifier) "m_data" (;) ";" (declaration) "unsigned long m_index;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "m_index" (;) ";" (declaration) "Rect m_bounds;" (type_identifier) "Rect" (identifier) "m_bounds" (;) ";" (declaration) "Model* m_model;" (type_identifier) "Model" (pointer_declarator) "* m_model" (*) "*" (identifier) "m_model" (;) ";" (declaration) "bool m_selected;" (primitive_type) "bool" (identifier) "m_selected" (;) ";" (declaration) "ulong32 m_imageIndex;" (type_identifier) "ulong32" (identifier) "m_imageIndex" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (preproc_call) "#endif //DEFAULTLISTITEM_H \n" (preproc_directive) "#endif" (comment) "//DEFAULTLISTITEM_H "
786
36
{"language": "c", "success": true, "metadata": {"lines": 171, "avg_line_length": 25.42, "nodes": 511, "errors": 0, "source_hash": "005109128a018569bfc2c7be0f237a233541656d82ed659d8d82cfd3c2101ed6", "categorized_nodes": 349}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "ERROR", "text": "#ifndef DEFAULTLISTITEM_H\r\n#define DEFAULTLISTITEM_H\r\n\r\n\r\n\r\n\r\nnamespace VCF{\r\n\r\n#define DEFAULTLISTITEM_CLASSID\t\t\"ED88C0AC-26AB-11d4-B539-00C04F0196DA\"\r\n\r\nclass APPKIT_API DefaultListItem : public ListItem {\r\npublic:\r\n\r\n\tBEGIN_CLASSINFO(DefaultListItem, \"VCF::DefaultListItem\", \"VCF::ListItem\", DEFAULTLISTITEM_CLASSID)\r\n\tEND_CLASSINFO(DefaultListItem)\r\n\r\n\tDefaultListItem();\r\n\r\n\tDefaultListItem( Model* model );\r\n\r\n\tDefaultListItem( Model* model, const String& caption );\r\n\r\n\tvirtual ~DefaultListItem();\r\n\r\n\tvoid init();\r\n\r\n virtual bool containsPoint( Point * pt );\r\n\r\n\tEVENT_HANDLER_LIST(ItemPaint);\r\n\tEVENT_HANDLER_LIST(ItemChanged);\r\n\tEVENT_HANDLER_LIST(ItemSelected);\r\n\tEVENT_HANDLER_LIST(ItemAdded);\r\n\tEVENT_HANDLER_LIST(ItemDeleted);\r\n\r\n\tvirtual void addItemPaintHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemPaint) \r\n\t}\r\n\r\n\tvirtual void addItemChangedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemChanged) \r\n\t}\r\n\r\n\tvirtual void addItemSelectedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemSelected) \r\n\t}\r\n\r\n\tvirtual void addItemAddedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemAdded) \r\n\t}\r\n\r\n\tvirtual void addItemDeletedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemDeleted) \r\n\t}\r\n \r\n\tvirtual void removeItemPaintHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemPaint) \r\n\t}\r\n\r\n\tvirtual void removeItemChangedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemChanged) \r\n\t}\r\n\r\n\tvirtual void removeItemSelectedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemSelected) \r\n\t}\r\n\r\n\tvirtual void removeItemAddedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemAdded) \r\n\t}\r\n\r\n\tvirtual void removeItemDeletedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemDeleted) \r\n\t}\r\n\r\n\tFIRE_EVENT(ItemPaint,ItemEvent)\r\n\tFIRE_EVENT(ItemChanged,ItemEvent)\r\n\tFIRE_EVENT(ItemSelected,ItemEvent)\r\n\tFIRE_EVENT(ItemAdded,ItemEvent)\r\n\tFIRE_EVENT(ItemDeleted,ItemEvent)\r\n\t\r\n\tvirtual Image* getImage();\r\n\r\n virtual unsigned long getIndex();\r\n\r\n\tvirtual void setIndex( const unsigned long& index );\r\n\r\n virtual void* getData();\r\n\r\n\tvirtual void setData( void* data );\t\r\n\r\n\tvirtual String getCaption();\r\n\t\r\n\tvirtual void setCaption( const String& caption );\r\n\r\n\tvirtual Model* getModel();\r\n\r\n\tvirtual void setModel( Model* model );\r\n\r\n\tvirtual void paint( GraphicsContext* context, Rect* paintRect );\r\n\t\r\n\tvirtual bool isSelected();\r\n\r\n\tvirtual void setSelected( const bool& selected );\r\n\r\n\tvirtual ulong32 getImageIndex() {\r\n\t\treturn m_imageIndex;\r\n\t}\r\n\r\n\tvirtual void setImageIndex( const ulong32& imageIndex );\r\n\r\n\tvirtual Rect* getBounds() {\r\n\t\treturn &m_bounds;\r\n\t}\r\n\r\n\tvirtual Control* getControl() {\r\n\t\treturn m_owningControl;\r\n\t}\r\n\r\n\r\n\tvirtual void setControl( Control* control ) {\r\n\t\tm_owningControl = control;\r\n\t}\r\n\r\n\tvirtual bool canPaint() {\r\n\t\treturn false;\t\r\n\t}\r\nprivate:\r\n\tImage* m_image;\r\n\tControl* m_owningControl;\r\n\tString m_caption;\r\n\tvoid* m_data;\r\n\tunsigned long m_index;\r\n\tRect m_bounds;\r\n\tModel* m_model;\r\n\tbool m_selected;\r\n\tulong32 m_imageIndex;\r\n};\r\n\r\n};\r\n\r\n#endif //DEFAULTLISTITEM_H\r\n", "parent": null, "children": [1, 2, 3, 6, 7, 8, 12, 14, 509], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 171, "column": 0}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 2, "type": "identifier", "text": "DEFAULTLISTITEM_H", "parent": 0, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define DEFAULTLISTITEM_H\r\n", "parent": 0, "children": [4, 5], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 5, "type": "identifier", "text": "DEFAULTLISTITEM_H", "parent": 3, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 25}}, {"id": 6, "type": "type_identifier", "text": "namespace", "parent": 0, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 9}}, {"id": 7, "type": "identifier", "text": "VCF", "parent": 0, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 13}}, {"id": 8, "type": "preproc_def", "text": "#define DEFAULTLISTITEM_CLASSID\t\t\"ED88C0AC-26AB-11d4-B539-00C04F0196DA\"\r\n", "parent": 0, "children": [9, 10, 11], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 9, "type": "#define", "text": "#define", "parent": 8, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 10, "type": "identifier", "text": "DEFAULTLISTITEM_CLASSID", "parent": 8, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 31}}, {"id": 11, "type": "preproc_arg", "text": "\"ED88C0AC-26AB-11d4-B539-00C04F0196DA\"\r", "parent": 8, "children": [], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 72}}, {"id": 12, "type": "declaration", "text": "class APPKIT_API", "parent": 0, "children": [13], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 16}}, {"id": 13, "type": "identifier", "text": "APPKIT_API", "parent": 12, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 16}}, {"id": 14, "type": "labeled_statement", "text": "DefaultListItem : public ListItem {\r\npublic:\r\n\r\n\tBEGIN_CLASSINFO(DefaultListItem, \"VCF::DefaultListItem\", \"VCF::ListItem\", DEFAULTLISTITEM_CLASSID)\r\n\tEND_CLASSINFO(DefaultListItem)\r\n\r\n\tDefaultListItem();\r\n\r\n\tDefaultListItem( Model* model );\r\n\r\n\tDefaultListItem( Model* model, const String& caption );\r\n\r\n\tvirtual ~DefaultListItem();\r\n\r\n\tvoid init();\r\n\r\n virtual bool containsPoint( Point * pt );\r\n\r\n\tEVENT_HANDLER_LIST(ItemPaint);\r\n\tEVENT_HANDLER_LIST(ItemChanged);\r\n\tEVENT_HANDLER_LIST(ItemSelected);\r\n\tEVENT_HANDLER_LIST(ItemAdded);\r\n\tEVENT_HANDLER_LIST(ItemDeleted);\r\n\r\n\tvirtual void addItemPaintHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemPaint) \r\n\t}\r\n\r\n\tvirtual void addItemChangedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemChanged) \r\n\t}\r\n\r\n\tvirtual void addItemSelectedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemSelected) \r\n\t}\r\n\r\n\tvirtual void addItemAddedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemAdded) \r\n\t}\r\n\r\n\tvirtual void addItemDeletedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemDeleted) \r\n\t}\r\n \r\n\tvirtual void removeItemPaintHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemPaint) \r\n\t}\r\n\r\n\tvirtual void removeItemChangedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemChanged) \r\n\t}\r\n\r\n\tvirtual void removeItemSelectedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemSelected) \r\n\t}\r\n\r\n\tvirtual void removeItemAddedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemAdded) \r\n\t}\r\n\r\n\tvirtual void removeItemDeletedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemDeleted) \r\n\t}\r\n\r\n\tFIRE_EVENT(ItemPaint,ItemEvent)\r\n\tFIRE_EVENT(ItemChanged,ItemEvent)\r\n\tFIRE_EVENT(ItemSelected,ItemEvent)\r\n\tFIRE_EVENT(ItemAdded,ItemEvent)\r\n\tFIRE_EVENT(ItemDeleted,ItemEvent)\r\n\t\r\n\tvirtual Image* getImage();\r\n\r\n virtual unsigned long getIndex();\r\n\r\n\tvirtual void setIndex( const unsigned long& index );\r\n\r\n virtual void* getData();\r\n\r\n\tvirtual void setData( void* data );\t\r\n\r\n\tvirtual String getCaption();\r\n\t\r\n\tvirtual void setCaption( const String& caption );\r\n\r\n\tvirtual Model* getModel();\r\n\r\n\tvirtual void setModel( Model* model );\r\n\r\n\tvirtual void paint( GraphicsContext* context, Rect* paintRect );\r\n\t\r\n\tvirtual bool isSelected();\r\n\r\n\tvirtual void setSelected( const bool& selected );\r\n\r\n\tvirtual ulong32 getImageIndex() {\r\n\t\treturn m_imageIndex;\r\n\t}\r\n\r\n\tvirtual void setImageIndex( const ulong32& imageIndex );\r\n\r\n\tvirtual Rect* getBounds() {\r\n\t\treturn &m_bounds;\r\n\t}\r\n\r\n\tvirtual Control* getControl() {\r\n\t\treturn m_owningControl;\r\n\t}\r\n\r\n\r\n\tvirtual void setControl( Control* control ) {\r\n\t\tm_owningControl = control;\r\n\t}\r\n\r\n\tvirtual bool canPaint() {\r\n\t\treturn false;\t\r\n\t}\r\nprivate:\r\n\tImage* m_image;\r\n\tControl* m_owningControl;\r\n\tString m_caption;\r\n\tvoid* m_data;\r\n\tunsigned long m_index;\r\n\tRect m_bounds;\r\n\tModel* m_model;\r\n\tbool m_selected;\r\n\tulong32 m_imageIndex;\r\n};\r\n\r\n}", "parent": 0, "children": [15, 16], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 168, "column": 1}}, {"id": 15, "type": "statement_identifier", "text": "DefaultListItem", "parent": 14, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 32}}, {"id": 16, "type": "ERROR", "text": "public ListItem", "parent": 14, "children": [17], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 50}}, {"id": 17, "type": "identifier", "text": "ListItem", "parent": 16, "children": [], "start_point": {"row": 40, "column": 42}, "end_point": {"row": 40, "column": 50}}, {"id": 18, "type": "labeled_statement", "text": "public:\r\n\r\n\tBEGIN_CLASSINFO(DefaultListItem, \"VCF::DefaultListItem\", \"VCF::ListItem\", DEFAULTLISTITEM_CLASSID)", "parent": 14, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 43, "column": 99}}, {"id": 19, "type": "call_expression", "text": "BEGIN_CLASSINFO(DefaultListItem, \"VCF::DefaultListItem\", \"VCF::ListItem\", DEFAULTLISTITEM_CLASSID)", "parent": 18, "children": [20, 21], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 99}}, {"id": 20, "type": "identifier", "text": "BEGIN_CLASSINFO", "parent": 19, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 16}}, {"id": 21, "type": "argument_list", "text": "(DefaultListItem, \"VCF::DefaultListItem\", \"VCF::ListItem\", DEFAULTLISTITEM_CLASSID)", "parent": 19, "children": [22, 23, 24, 25], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 99}}, {"id": 22, "type": "identifier", "text": "DefaultListItem", "parent": 21, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 32}}, {"id": 23, "type": "string_literal", "text": "\"VCF::DefaultListItem\"", "parent": 21, "children": [], "start_point": {"row": 43, "column": 34}, "end_point": {"row": 43, "column": 56}}, {"id": 24, "type": "string_literal", "text": "\"VCF::ListItem\"", "parent": 21, "children": [], "start_point": {"row": 43, "column": 58}, "end_point": {"row": 43, "column": 73}}, {"id": 25, "type": "identifier", "text": "DEFAULTLISTITEM_CLASSID", "parent": 21, "children": [], "start_point": {"row": 43, "column": 75}, "end_point": {"row": 43, "column": 98}}, {"id": 26, "type": "declaration", "text": "END_CLASSINFO(DefaultListItem)\r\n\r\n\tDefaultListItem();", "parent": 14, "children": [27, 31], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 46, "column": 19}}, {"id": 27, "type": "macro_type_specifier", "text": "END_CLASSINFO(DefaultListItem)", "parent": 26, "children": [28, 29], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 31}}, {"id": 28, "type": "identifier", "text": "END_CLASSINFO", "parent": 27, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 14}}, {"id": 29, "type": "type_descriptor", "text": "DefaultListItem", "parent": 27, "children": [30], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 30}}, {"id": 30, "type": "type_identifier", "text": "DefaultListItem", "parent": 29, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 30}}, {"id": 31, "type": "function_declarator", "text": "DefaultListItem()", "parent": 26, "children": [32, 33], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 18}}, {"id": 32, "type": "identifier", "text": "DefaultListItem", "parent": 31, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 16}}, {"id": 33, "type": "parameter_list", "text": "()", "parent": 31, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 18}}, {"id": 34, "type": "call_expression", "text": "DefaultListItem( Model* model )", "parent": 14, "children": [35, 36], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 32}}, {"id": 35, "type": "identifier", "text": "DefaultListItem", "parent": 34, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 16}}, {"id": 36, "type": "argument_list", "text": "( Model* model )", "parent": 34, "children": [37], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 32}}, {"id": 37, "type": "binary_expression", "text": "Model* model", "parent": 36, "children": [38, 39, 40], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 30}}, {"id": 38, "type": "identifier", "text": "Model", "parent": 37, "children": [], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 23}}, {"id": 39, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 24}}, {"id": 40, "type": "identifier", "text": "model", "parent": 37, "children": [], "start_point": {"row": 48, "column": 25}, "end_point": {"row": 48, "column": 30}}, {"id": 41, "type": "call_expression", "text": "DefaultListItem( Model* model, const String& caption )", "parent": 14, "children": [42, 43], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 55}}, {"id": 42, "type": "identifier", "text": "DefaultListItem", "parent": 41, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 16}}, {"id": 43, "type": "argument_list", "text": "( Model* model, const String& caption )", "parent": 41, "children": [44, 48], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 55}}, {"id": 44, "type": "binary_expression", "text": "Model* model", "parent": 43, "children": [45, 46, 47], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 30}}, {"id": 45, "type": "identifier", "text": "Model", "parent": 44, "children": [], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 23}}, {"id": 46, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 24}}, {"id": 47, "type": "identifier", "text": "model", "parent": 44, "children": [], "start_point": {"row": 50, "column": 25}, "end_point": {"row": 50, "column": 30}}, {"id": 48, "type": "binary_expression", "text": "String& caption", "parent": 43, "children": [49, 50], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 50, "column": 53}}, {"id": 49, "type": "identifier", "text": "String", "parent": 48, "children": [], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 50, "column": 44}}, {"id": 50, "type": "identifier", "text": "caption", "parent": 48, "children": [], "start_point": {"row": 50, "column": 46}, "end_point": {"row": 50, "column": 53}}, {"id": 51, "type": "declaration", "text": "virtual ~DefaultListItem();", "parent": 14, "children": [52, 53, 55], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 28}}, {"id": 52, "type": "type_identifier", "text": "virtual", "parent": 51, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 8}}, {"id": 53, "type": "ERROR", "text": "~", "parent": 51, "children": [54], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 10}}, {"id": 54, "type": "~", "text": "~", "parent": 53, "children": [], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 10}}, {"id": 55, "type": "function_declarator", "text": "DefaultListItem()", "parent": 51, "children": [56, 57], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 27}}, {"id": 56, "type": "identifier", "text": "DefaultListItem", "parent": 55, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 25}}, {"id": 57, "type": "parameter_list", "text": "()", "parent": 55, "children": [], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 27}}, {"id": 58, "type": "declaration", "text": "void init();", "parent": 14, "children": [59, 60], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 13}}, {"id": 59, "type": "primitive_type", "text": "void", "parent": 58, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 5}}, {"id": 60, "type": "function_declarator", "text": "init()", "parent": 58, "children": [61, 62], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 12}}, {"id": 61, "type": "identifier", "text": "init", "parent": 60, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 10}}, {"id": 62, "type": "parameter_list", "text": "()", "parent": 60, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 12}}, {"id": 63, "type": "declaration", "text": "virtual bool containsPoint( Point * pt );", "parent": 14, "children": [64, 65, 67], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 45}}, {"id": 64, "type": "type_identifier", "text": "virtual", "parent": 63, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 11}}, {"id": 65, "type": "ERROR", "text": "bool", "parent": 63, "children": [66], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 16}}, {"id": 66, "type": "identifier", "text": "bool", "parent": 65, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 16}}, {"id": 67, "type": "function_declarator", "text": "containsPoint( Point * pt )", "parent": 63, "children": [68, 69], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 44}}, {"id": 68, "type": "identifier", "text": "containsPoint", "parent": 67, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 30}}, {"id": 69, "type": "parameter_list", "text": "( Point * pt )", "parent": 67, "children": [70], "start_point": {"row": 56, "column": 30}, "end_point": {"row": 56, "column": 44}}, {"id": 70, "type": "parameter_declaration", "text": "Point * pt", "parent": 69, "children": [71, 72], "start_point": {"row": 56, "column": 32}, "end_point": {"row": 56, "column": 42}}, {"id": 71, "type": "type_identifier", "text": "Point", "parent": 70, "children": [], "start_point": {"row": 56, "column": 32}, "end_point": {"row": 56, "column": 37}}, {"id": 72, "type": "pointer_declarator", "text": "* pt", "parent": 70, "children": [73, 74], "start_point": {"row": 56, "column": 38}, "end_point": {"row": 56, "column": 42}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 56, "column": 38}, "end_point": {"row": 56, "column": 39}}, {"id": 74, "type": "identifier", "text": "pt", "parent": 72, "children": [], "start_point": {"row": 56, "column": 40}, "end_point": {"row": 56, "column": 42}}, {"id": 75, "type": "call_expression", "text": "EVENT_HANDLER_LIST(ItemPaint)", "parent": 14, "children": [76, 77], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 30}}, {"id": 76, "type": "identifier", "text": "EVENT_HANDLER_LIST", "parent": 75, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 19}}, {"id": 77, "type": "argument_list", "text": "(ItemPaint)", "parent": 75, "children": [78], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 30}}, {"id": 78, "type": "identifier", "text": "ItemPaint", "parent": 77, "children": [], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 29}}, {"id": 79, "type": "call_expression", "text": "EVENT_HANDLER_LIST(ItemChanged)", "parent": 14, "children": [80, 81], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 32}}, {"id": 80, "type": "identifier", "text": "EVENT_HANDLER_LIST", "parent": 79, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 19}}, {"id": 81, "type": "argument_list", "text": "(ItemChanged)", "parent": 79, "children": [82], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 32}}, {"id": 82, "type": "identifier", "text": "ItemChanged", "parent": 81, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 31}}, {"id": 83, "type": "call_expression", "text": "EVENT_HANDLER_LIST(ItemSelected)", "parent": 14, "children": [84, 85], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 33}}, {"id": 84, "type": "identifier", "text": "EVENT_HANDLER_LIST", "parent": 83, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 19}}, {"id": 85, "type": "argument_list", "text": "(ItemSelected)", "parent": 83, "children": [86], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 33}}, {"id": 86, "type": "identifier", "text": "ItemSelected", "parent": 85, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 32}}, {"id": 87, "type": "call_expression", "text": "EVENT_HANDLER_LIST(ItemAdded)", "parent": 14, "children": [88, 89], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 30}}, {"id": 88, "type": "identifier", "text": "EVENT_HANDLER_LIST", "parent": 87, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 19}}, {"id": 89, "type": "argument_list", "text": "(ItemAdded)", "parent": 87, "children": [90], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 30}}, {"id": 90, "type": "identifier", "text": "ItemAdded", "parent": 89, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 29}}, {"id": 91, "type": "call_expression", "text": "EVENT_HANDLER_LIST(ItemDeleted)", "parent": 14, "children": [92, 93], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 32}}, {"id": 92, "type": "identifier", "text": "EVENT_HANDLER_LIST", "parent": 91, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 19}}, {"id": 93, "type": "argument_list", "text": "(ItemDeleted)", "parent": 91, "children": [94], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 32}}, {"id": 94, "type": "identifier", "text": "ItemDeleted", "parent": 93, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 31}}, {"id": 95, "type": "function_definition", "text": "virtual void addItemPaintHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemPaint) \r\n\t}", "parent": 14, "children": [96, 97, 99], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 66, "column": 2}}, {"id": 96, "type": "type_identifier", "text": "virtual", "parent": 95, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 8}}, {"id": 97, "type": "ERROR", "text": "void", "parent": 95, "children": [98], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 13}}, {"id": 98, "type": "identifier", "text": "void", "parent": 97, "children": [], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 13}}, {"id": 99, "type": "function_declarator", "text": "addItemPaintHandler( EventHandler* handler )", "parent": 95, "children": [100, 101], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 58}}, {"id": 100, "type": "identifier", "text": "addItemPaintHandler", "parent": 99, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 33}}, {"id": 101, "type": "parameter_list", "text": "( EventHandler* handler )", "parent": 99, "children": [102], "start_point": {"row": 64, "column": 33}, "end_point": {"row": 64, "column": 58}}, {"id": 102, "type": "parameter_declaration", "text": "EventHandler* handler", "parent": 101, "children": [103, 104], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 56}}, {"id": 103, "type": "type_identifier", "text": "EventHandler", "parent": 102, "children": [], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 47}}, {"id": 104, "type": "pointer_declarator", "text": "* handler", "parent": 102, "children": [105, 106], "start_point": {"row": 64, "column": 47}, "end_point": {"row": 64, "column": 56}}, {"id": 105, "type": "*", "text": "*", "parent": 104, "children": [], "start_point": {"row": 64, "column": 47}, "end_point": {"row": 64, "column": 48}}, {"id": 106, "type": "identifier", "text": "handler", "parent": 104, "children": [], "start_point": {"row": 64, "column": 49}, "end_point": {"row": 64, "column": 56}}, {"id": 107, "type": "macro_type_specifier", "text": "ADD_EVENT_IMPL(ItemPaint)", "parent": 95, "children": [108, 109], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 27}}, {"id": 108, "type": "identifier", "text": "ADD_EVENT_IMPL", "parent": 107, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 16}}, {"id": 109, "type": "type_descriptor", "text": "ItemPaint", "parent": 107, "children": [110], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 26}}, {"id": 110, "type": "type_identifier", "text": "ItemPaint", "parent": 109, "children": [], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 26}}, {"id": 111, "type": "function_definition", "text": "virtual void addItemChangedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemChanged) \r\n\t}", "parent": 14, "children": [112, 113, 115], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 70, "column": 2}}, {"id": 112, "type": "type_identifier", "text": "virtual", "parent": 111, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 8}}, {"id": 113, "type": "ERROR", "text": "void", "parent": 111, "children": [114], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 13}}, {"id": 114, "type": "identifier", "text": "void", "parent": 113, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 13}}, {"id": 115, "type": "function_declarator", "text": "addItemChangedHandler( EventHandler* handler )", "parent": 111, "children": [116, 117], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 60}}, {"id": 116, "type": "identifier", "text": "addItemChangedHandler", "parent": 115, "children": [], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 35}}, {"id": 117, "type": "parameter_list", "text": "( EventHandler* handler )", "parent": 115, "children": [118], "start_point": {"row": 68, "column": 35}, "end_point": {"row": 68, "column": 60}}, {"id": 118, "type": "parameter_declaration", "text": "EventHandler* handler", "parent": 117, "children": [119, 120], "start_point": {"row": 68, "column": 37}, "end_point": {"row": 68, "column": 58}}, {"id": 119, "type": "type_identifier", "text": "EventHandler", "parent": 118, "children": [], "start_point": {"row": 68, "column": 37}, "end_point": {"row": 68, "column": 49}}, {"id": 120, "type": "pointer_declarator", "text": "* handler", "parent": 118, "children": [121, 122], "start_point": {"row": 68, "column": 49}, "end_point": {"row": 68, "column": 58}}, {"id": 121, "type": "*", "text": "*", "parent": 120, "children": [], "start_point": {"row": 68, "column": 49}, "end_point": {"row": 68, "column": 50}}, {"id": 122, "type": "identifier", "text": "handler", "parent": 120, "children": [], "start_point": {"row": 68, "column": 51}, "end_point": {"row": 68, "column": 58}}, {"id": 123, "type": "macro_type_specifier", "text": "ADD_EVENT_IMPL(ItemChanged)", "parent": 111, "children": [124, 125], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 29}}, {"id": 124, "type": "identifier", "text": "ADD_EVENT_IMPL", "parent": 123, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 16}}, {"id": 125, "type": "type_descriptor", "text": "ItemChanged", "parent": 123, "children": [126], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 28}}, {"id": 126, "type": "type_identifier", "text": "ItemChanged", "parent": 125, "children": [], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 28}}, {"id": 127, "type": "function_definition", "text": "virtual void addItemSelectedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemSelected) \r\n\t}", "parent": 14, "children": [128, 129, 131], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 74, "column": 2}}, {"id": 128, "type": "type_identifier", "text": "virtual", "parent": 127, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 8}}, {"id": 129, "type": "ERROR", "text": "void", "parent": 127, "children": [130], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 13}}, {"id": 130, "type": "identifier", "text": "void", "parent": 129, "children": [], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 13}}, {"id": 131, "type": "function_declarator", "text": "addItemSelectedHandler( EventHandler* handler )", "parent": 127, "children": [132, 133], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 61}}, {"id": 132, "type": "identifier", "text": "addItemSelectedHandler", "parent": 131, "children": [], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 36}}, {"id": 133, "type": "parameter_list", "text": "( EventHandler* handler )", "parent": 131, "children": [134], "start_point": {"row": 72, "column": 36}, "end_point": {"row": 72, "column": 61}}, {"id": 134, "type": "parameter_declaration", "text": "EventHandler* handler", "parent": 133, "children": [135, 136], "start_point": {"row": 72, "column": 38}, "end_point": {"row": 72, "column": 59}}, {"id": 135, "type": "type_identifier", "text": "EventHandler", "parent": 134, "children": [], "start_point": {"row": 72, "column": 38}, "end_point": {"row": 72, "column": 50}}, {"id": 136, "type": "pointer_declarator", "text": "* handler", "parent": 134, "children": [137, 138], "start_point": {"row": 72, "column": 50}, "end_point": {"row": 72, "column": 59}}, {"id": 137, "type": "*", "text": "*", "parent": 136, "children": [], "start_point": {"row": 72, "column": 50}, "end_point": {"row": 72, "column": 51}}, {"id": 138, "type": "identifier", "text": "handler", "parent": 136, "children": [], "start_point": {"row": 72, "column": 52}, "end_point": {"row": 72, "column": 59}}, {"id": 139, "type": "macro_type_specifier", "text": "ADD_EVENT_IMPL(ItemSelected)", "parent": 127, "children": [140, 141], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 30}}, {"id": 140, "type": "identifier", "text": "ADD_EVENT_IMPL", "parent": 139, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 16}}, {"id": 141, "type": "type_descriptor", "text": "ItemSelected", "parent": 139, "children": [142], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 29}}, {"id": 142, "type": "type_identifier", "text": "ItemSelected", "parent": 141, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 29}}, {"id": 143, "type": "function_definition", "text": "virtual void addItemAddedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemAdded) \r\n\t}", "parent": 14, "children": [144, 145, 147], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 78, "column": 2}}, {"id": 144, "type": "type_identifier", "text": "virtual", "parent": 143, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 8}}, {"id": 145, "type": "ERROR", "text": "void", "parent": 143, "children": [146], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 13}}, {"id": 146, "type": "identifier", "text": "void", "parent": 145, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 13}}, {"id": 147, "type": "function_declarator", "text": "addItemAddedHandler( EventHandler* handler )", "parent": 143, "children": [148, 149], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 58}}, {"id": 148, "type": "identifier", "text": "addItemAddedHandler", "parent": 147, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 33}}, {"id": 149, "type": "parameter_list", "text": "( EventHandler* handler )", "parent": 147, "children": [150], "start_point": {"row": 76, "column": 33}, "end_point": {"row": 76, "column": 58}}, {"id": 150, "type": "parameter_declaration", "text": "EventHandler* handler", "parent": 149, "children": [151, 152], "start_point": {"row": 76, "column": 35}, "end_point": {"row": 76, "column": 56}}, {"id": 151, "type": "type_identifier", "text": "EventHandler", "parent": 150, "children": [], "start_point": {"row": 76, "column": 35}, "end_point": {"row": 76, "column": 47}}, {"id": 152, "type": "pointer_declarator", "text": "* handler", "parent": 150, "children": [153, 154], "start_point": {"row": 76, "column": 47}, "end_point": {"row": 76, "column": 56}}, {"id": 153, "type": "*", "text": "*", "parent": 152, "children": [], "start_point": {"row": 76, "column": 47}, "end_point": {"row": 76, "column": 48}}, {"id": 154, "type": "identifier", "text": "handler", "parent": 152, "children": [], "start_point": {"row": 76, "column": 49}, "end_point": {"row": 76, "column": 56}}, {"id": 155, "type": "macro_type_specifier", "text": "ADD_EVENT_IMPL(ItemAdded)", "parent": 143, "children": [156, 157], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 27}}, {"id": 156, "type": "identifier", "text": "ADD_EVENT_IMPL", "parent": 155, "children": [], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 16}}, {"id": 157, "type": "type_descriptor", "text": "ItemAdded", "parent": 155, "children": [158], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 26}}, {"id": 158, "type": "type_identifier", "text": "ItemAdded", "parent": 157, "children": [], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 26}}, {"id": 159, "type": "function_definition", "text": "virtual void addItemDeletedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemDeleted) \r\n\t}", "parent": 14, "children": [160, 161, 163], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 82, "column": 2}}, {"id": 160, "type": "type_identifier", "text": "virtual", "parent": 159, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 8}}, {"id": 161, "type": "ERROR", "text": "void", "parent": 159, "children": [162], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 13}}, {"id": 162, "type": "identifier", "text": "void", "parent": 161, "children": [], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 13}}, {"id": 163, "type": "function_declarator", "text": "addItemDeletedHandler( EventHandler* handler )", "parent": 159, "children": [164, 165], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 60}}, {"id": 164, "type": "identifier", "text": "addItemDeletedHandler", "parent": 163, "children": [], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 35}}, {"id": 165, "type": "parameter_list", "text": "( EventHandler* handler )", "parent": 163, "children": [166], "start_point": {"row": 80, "column": 35}, "end_point": {"row": 80, "column": 60}}, {"id": 166, "type": "parameter_declaration", "text": "EventHandler* handler", "parent": 165, "children": [167, 168], "start_point": {"row": 80, "column": 37}, "end_point": {"row": 80, "column": 58}}, {"id": 167, "type": "type_identifier", "text": "EventHandler", "parent": 166, "children": [], "start_point": {"row": 80, "column": 37}, "end_point": {"row": 80, "column": 49}}, {"id": 168, "type": "pointer_declarator", "text": "* handler", "parent": 166, "children": [169, 170], "start_point": {"row": 80, "column": 49}, "end_point": {"row": 80, "column": 58}}, {"id": 169, "type": "*", "text": "*", "parent": 168, "children": [], "start_point": {"row": 80, "column": 49}, "end_point": {"row": 80, "column": 50}}, {"id": 170, "type": "identifier", "text": "handler", "parent": 168, "children": [], "start_point": {"row": 80, "column": 51}, "end_point": {"row": 80, "column": 58}}, {"id": 171, "type": "macro_type_specifier", "text": "ADD_EVENT_IMPL(ItemDeleted)", "parent": 159, "children": [172, 173], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 29}}, {"id": 172, "type": "identifier", "text": "ADD_EVENT_IMPL", "parent": 171, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 16}}, {"id": 173, "type": "type_descriptor", "text": "ItemDeleted", "parent": 171, "children": [174], "start_point": {"row": 81, "column": 17}, "end_point": {"row": 81, "column": 28}}, {"id": 174, "type": "type_identifier", "text": "ItemDeleted", "parent": 173, "children": [], "start_point": {"row": 81, "column": 17}, "end_point": {"row": 81, "column": 28}}, {"id": 175, "type": "function_definition", "text": "virtual void removeItemPaintHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemPaint) \r\n\t}", "parent": 14, "children": [176, 177, 179], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 86, "column": 2}}, {"id": 176, "type": "type_identifier", "text": "virtual", "parent": 175, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 8}}, {"id": 177, "type": "ERROR", "text": "void", "parent": 175, "children": [178], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 13}}, {"id": 178, "type": "identifier", "text": "void", "parent": 177, "children": [], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 13}}, {"id": 179, "type": "function_declarator", "text": "removeItemPaintHandler( EventHandler* handler )", "parent": 175, "children": [180, 181], "start_point": {"row": 84, "column": 14}, "end_point": {"row": 84, "column": 61}}, {"id": 180, "type": "identifier", "text": "removeItemPaintHandler", "parent": 179, "children": [], "start_point": {"row": 84, "column": 14}, "end_point": {"row": 84, "column": 36}}, {"id": 181, "type": "parameter_list", "text": "( EventHandler* handler )", "parent": 179, "children": [182], "start_point": {"row": 84, "column": 36}, "end_point": {"row": 84, "column": 61}}, {"id": 182, "type": "parameter_declaration", "text": "EventHandler* handler", "parent": 181, "children": [183, 184], "start_point": {"row": 84, "column": 38}, "end_point": {"row": 84, "column": 59}}, {"id": 183, "type": "type_identifier", "text": "EventHandler", "parent": 182, "children": [], "start_point": {"row": 84, "column": 38}, "end_point": {"row": 84, "column": 50}}, {"id": 184, "type": "pointer_declarator", "text": "* handler", "parent": 182, "children": [185, 186], "start_point": {"row": 84, "column": 50}, "end_point": {"row": 84, "column": 59}}, {"id": 185, "type": "*", "text": "*", "parent": 184, "children": [], "start_point": {"row": 84, "column": 50}, "end_point": {"row": 84, "column": 51}}, {"id": 186, "type": "identifier", "text": "handler", "parent": 184, "children": [], "start_point": {"row": 84, "column": 52}, "end_point": {"row": 84, "column": 59}}, {"id": 187, "type": "macro_type_specifier", "text": "REMOVE_EVENT_IMPL(ItemPaint)", "parent": 175, "children": [188, 189], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 30}}, {"id": 188, "type": "identifier", "text": "REMOVE_EVENT_IMPL", "parent": 187, "children": [], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 19}}, {"id": 189, "type": "type_descriptor", "text": "ItemPaint", "parent": 187, "children": [190], "start_point": {"row": 85, "column": 20}, "end_point": {"row": 85, "column": 29}}, {"id": 190, "type": "type_identifier", "text": "ItemPaint", "parent": 189, "children": [], "start_point": {"row": 85, "column": 20}, "end_point": {"row": 85, "column": 29}}, {"id": 191, "type": "function_definition", "text": "virtual void removeItemChangedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemChanged) \r\n\t}", "parent": 14, "children": [192, 193, 195], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 90, "column": 2}}, {"id": 192, "type": "type_identifier", "text": "virtual", "parent": 191, "children": [], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 8}}, {"id": 193, "type": "ERROR", "text": "void", "parent": 191, "children": [194], "start_point": {"row": 88, "column": 9}, "end_point": {"row": 88, "column": 13}}, {"id": 194, "type": "identifier", "text": "void", "parent": 193, "children": [], "start_point": {"row": 88, "column": 9}, "end_point": {"row": 88, "column": 13}}, {"id": 195, "type": "function_declarator", "text": "removeItemChangedHandler( EventHandler* handler )", "parent": 191, "children": [196, 197], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 63}}, {"id": 196, "type": "identifier", "text": "removeItemChangedHandler", "parent": 195, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 38}}, {"id": 197, "type": "parameter_list", "text": "( EventHandler* handler )", "parent": 195, "children": [198], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 63}}, {"id": 198, "type": "parameter_declaration", "text": "EventHandler* handler", "parent": 197, "children": [199, 200], "start_point": {"row": 88, "column": 40}, "end_point": {"row": 88, "column": 61}}, {"id": 199, "type": "type_identifier", "text": "EventHandler", "parent": 198, "children": [], "start_point": {"row": 88, "column": 40}, "end_point": {"row": 88, "column": 52}}, {"id": 200, "type": "pointer_declarator", "text": "* handler", "parent": 198, "children": [201, 202], "start_point": {"row": 88, "column": 52}, "end_point": {"row": 88, "column": 61}}, {"id": 201, "type": "*", "text": "*", "parent": 200, "children": [], "start_point": {"row": 88, "column": 52}, "end_point": {"row": 88, "column": 53}}, {"id": 202, "type": "identifier", "text": "handler", "parent": 200, "children": [], "start_point": {"row": 88, "column": 54}, "end_point": {"row": 88, "column": 61}}, {"id": 203, "type": "macro_type_specifier", "text": "REMOVE_EVENT_IMPL(ItemChanged)", "parent": 191, "children": [204, 205], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 32}}, {"id": 204, "type": "identifier", "text": "REMOVE_EVENT_IMPL", "parent": 203, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 19}}, {"id": 205, "type": "type_descriptor", "text": "ItemChanged", "parent": 203, "children": [206], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 31}}, {"id": 206, "type": "type_identifier", "text": "ItemChanged", "parent": 205, "children": [], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 31}}, {"id": 207, "type": "function_definition", "text": "virtual void removeItemSelectedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemSelected) \r\n\t}", "parent": 14, "children": [208, 209, 211], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 94, "column": 2}}, {"id": 208, "type": "type_identifier", "text": "virtual", "parent": 207, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 8}}, {"id": 209, "type": "ERROR", "text": "void", "parent": 207, "children": [210], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 13}}, {"id": 210, "type": "identifier", "text": "void", "parent": 209, "children": [], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 13}}, {"id": 211, "type": "function_declarator", "text": "removeItemSelectedHandler( EventHandler* handler )", "parent": 207, "children": [212, 213], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 64}}, {"id": 212, "type": "identifier", "text": "removeItemSelectedHandler", "parent": 211, "children": [], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 39}}, {"id": 213, "type": "parameter_list", "text": "( EventHandler* handler )", "parent": 211, "children": [214], "start_point": {"row": 92, "column": 39}, "end_point": {"row": 92, "column": 64}}, {"id": 214, "type": "parameter_declaration", "text": "EventHandler* handler", "parent": 213, "children": [215, 216], "start_point": {"row": 92, "column": 41}, "end_point": {"row": 92, "column": 62}}, {"id": 215, "type": "type_identifier", "text": "EventHandler", "parent": 214, "children": [], "start_point": {"row": 92, "column": 41}, "end_point": {"row": 92, "column": 53}}, {"id": 216, "type": "pointer_declarator", "text": "* handler", "parent": 214, "children": [217, 218], "start_point": {"row": 92, "column": 53}, "end_point": {"row": 92, "column": 62}}, {"id": 217, "type": "*", "text": "*", "parent": 216, "children": [], "start_point": {"row": 92, "column": 53}, "end_point": {"row": 92, "column": 54}}, {"id": 218, "type": "identifier", "text": "handler", "parent": 216, "children": [], "start_point": {"row": 92, "column": 55}, "end_point": {"row": 92, "column": 62}}, {"id": 219, "type": "macro_type_specifier", "text": "REMOVE_EVENT_IMPL(ItemSelected)", "parent": 207, "children": [220, 221], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 33}}, {"id": 220, "type": "identifier", "text": "REMOVE_EVENT_IMPL", "parent": 219, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 19}}, {"id": 221, "type": "type_descriptor", "text": "ItemSelected", "parent": 219, "children": [222], "start_point": {"row": 93, "column": 20}, "end_point": {"row": 93, "column": 32}}, {"id": 222, "type": "type_identifier", "text": "ItemSelected", "parent": 221, "children": [], "start_point": {"row": 93, "column": 20}, "end_point": {"row": 93, "column": 32}}, {"id": 223, "type": "function_definition", "text": "virtual void removeItemAddedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemAdded) \r\n\t}", "parent": 14, "children": [224, 225, 227], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 98, "column": 2}}, {"id": 224, "type": "type_identifier", "text": "virtual", "parent": 223, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 8}}, {"id": 225, "type": "ERROR", "text": "void", "parent": 223, "children": [226], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 13}}, {"id": 226, "type": "identifier", "text": "void", "parent": 225, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 13}}, {"id": 227, "type": "function_declarator", "text": "removeItemAddedHandler( EventHandler* handler )", "parent": 223, "children": [228, 229], "start_point": {"row": 96, "column": 14}, "end_point": {"row": 96, "column": 61}}, {"id": 228, "type": "identifier", "text": "removeItemAddedHandler", "parent": 227, "children": [], "start_point": {"row": 96, "column": 14}, "end_point": {"row": 96, "column": 36}}, {"id": 229, "type": "parameter_list", "text": "( EventHandler* handler )", "parent": 227, "children": [230], "start_point": {"row": 96, "column": 36}, "end_point": {"row": 96, "column": 61}}, {"id": 230, "type": "parameter_declaration", "text": "EventHandler* handler", "parent": 229, "children": [231, 232], "start_point": {"row": 96, "column": 38}, "end_point": {"row": 96, "column": 59}}, {"id": 231, "type": "type_identifier", "text": "EventHandler", "parent": 230, "children": [], "start_point": {"row": 96, "column": 38}, "end_point": {"row": 96, "column": 50}}, {"id": 232, "type": "pointer_declarator", "text": "* handler", "parent": 230, "children": [233, 234], "start_point": {"row": 96, "column": 50}, "end_point": {"row": 96, "column": 59}}, {"id": 233, "type": "*", "text": "*", "parent": 232, "children": [], "start_point": {"row": 96, "column": 50}, "end_point": {"row": 96, "column": 51}}, {"id": 234, "type": "identifier", "text": "handler", "parent": 232, "children": [], "start_point": {"row": 96, "column": 52}, "end_point": {"row": 96, "column": 59}}, {"id": 235, "type": "macro_type_specifier", "text": "REMOVE_EVENT_IMPL(ItemAdded)", "parent": 223, "children": [236, 237], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 30}}, {"id": 236, "type": "identifier", "text": "REMOVE_EVENT_IMPL", "parent": 235, "children": [], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 19}}, {"id": 237, "type": "type_descriptor", "text": "ItemAdded", "parent": 235, "children": [238], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 29}}, {"id": 238, "type": "type_identifier", "text": "ItemAdded", "parent": 237, "children": [], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 29}}, {"id": 239, "type": "function_definition", "text": "virtual void removeItemDeletedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemDeleted) \r\n\t}\r\n\r\n\tFIRE_EVENT(ItemPaint,ItemEvent)\r\n\tFIRE_EVENT(ItemChanged,ItemEvent)\r\n\tFIRE_EVENT(ItemSelected,ItemEvent)\r\n\tFIRE_EVENT(ItemAdded,ItemEvent)\r\n\tFIRE_EVENT(ItemDeleted,ItemEvent)\r\n\t\r\n\tvirtual Image* getImage();\r\n\r\n virtual unsigned long getIndex();\r\n\r\n\tvirtual void setIndex( const unsigned long& index );\r\n\r\n virtual void* getData();\r\n\r\n\tvirtual void setData( void* data );\t\r\n\r\n\tvirtual String getCaption();\r\n\t\r\n\tvirtual void setCaption( const String& caption );\r\n\r\n\tvirtual Model* getModel();\r\n\r\n\tvirtual void setModel( Model* model );\r\n\r\n\tvirtual void paint( GraphicsContext* context, Rect* paintRect );\r\n\t\r\n\tvirtual bool isSelected();\r\n\r\n\tvirtual void setSelected( const bool& selected );\r\n\r\n\tvirtual ulong32 getImageIndex() {\r\n\t\treturn m_imageIndex;\r\n\t}\r\n\r\n\tvirtual void setImageIndex( const ulong32& imageIndex );\r\n\r\n\tvirtual Rect* getBounds() {\r\n\t\treturn &m_bounds;\r\n\t}\r\n\r\n\tvirtual Control* getControl() {\r\n\t\treturn m_owningControl;\r\n\t}\r\n\r\n\r\n\tvirtual void setControl( Control* control ) {\r\n\t\tm_owningControl = control;\r\n\t}\r\n\r\n\tvirtual bool canPaint() {\r\n\t\treturn false;\t\r\n\t}\r\nprivate:\r\n\tImage* m_image;\r\n\tControl* m_owningControl;\r\n\tString m_caption;\r\n\tvoid* m_data;\r\n\tunsigned long m_index;\r\n\tRect m_bounds;\r\n\tModel* m_model;\r\n\tbool m_selected;\r\n\tulong32 m_imageIndex;\r\n}", "parent": 14, "children": [240, 241, 243], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 166, "column": 1}}, {"id": 240, "type": "type_identifier", "text": "virtual", "parent": 239, "children": [], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 8}}, {"id": 241, "type": "ERROR", "text": "void", "parent": 239, "children": [242], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 13}}, {"id": 242, "type": "identifier", "text": "void", "parent": 241, "children": [], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 13}}, {"id": 243, "type": "function_declarator", "text": "removeItemDeletedHandler( EventHandler* handler )", "parent": 239, "children": [244, 245], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 63}}, {"id": 244, "type": "identifier", "text": "removeItemDeletedHandler", "parent": 243, "children": [], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 38}}, {"id": 245, "type": "parameter_list", "text": "( EventHandler* handler )", "parent": 243, "children": [246], "start_point": {"row": 100, "column": 38}, "end_point": {"row": 100, "column": 63}}, {"id": 246, "type": "parameter_declaration", "text": "EventHandler* handler", "parent": 245, "children": [247, 248], "start_point": {"row": 100, "column": 40}, "end_point": {"row": 100, "column": 61}}, {"id": 247, "type": "type_identifier", "text": "EventHandler", "parent": 246, "children": [], "start_point": {"row": 100, "column": 40}, "end_point": {"row": 100, "column": 52}}, {"id": 248, "type": "pointer_declarator", "text": "* handler", "parent": 246, "children": [249, 250], "start_point": {"row": 100, "column": 52}, "end_point": {"row": 100, "column": 61}}, {"id": 249, "type": "*", "text": "*", "parent": 248, "children": [], "start_point": {"row": 100, "column": 52}, "end_point": {"row": 100, "column": 53}}, {"id": 250, "type": "identifier", "text": "handler", "parent": 248, "children": [], "start_point": {"row": 100, "column": 54}, "end_point": {"row": 100, "column": 61}}, {"id": 251, "type": "declaration", "text": "REMOVE_EVENT_IMPL(ItemDeleted) \r\n\t}\r\n\r\n\tFIRE_EVENT(ItemPaint,ItemEvent)\r\n\tFIRE_EVENT(ItemChanged,ItemEvent)\r\n\tFIRE_EVENT(ItemSelected,ItemEvent)\r\n\tFIRE_EVENT(ItemAdded,ItemEvent)\r\n\tFIRE_EVENT(ItemDeleted,ItemEvent)\r\n\t\r\n\tvirtual Image* getImage();", "parent": 239, "children": [252, 256, 286], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 110, "column": 27}}, {"id": 252, "type": "macro_type_specifier", "text": "REMOVE_EVENT_IMPL(ItemDeleted)", "parent": 251, "children": [253, 254], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 32}}, {"id": 253, "type": "identifier", "text": "REMOVE_EVENT_IMPL", "parent": 252, "children": [], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 19}}, {"id": 254, "type": "type_descriptor", "text": "ItemDeleted", "parent": 252, "children": [255], "start_point": {"row": 101, "column": 20}, "end_point": {"row": 101, "column": 31}}, {"id": 255, "type": "type_identifier", "text": "ItemDeleted", "parent": 254, "children": [], "start_point": {"row": 101, "column": 20}, "end_point": {"row": 101, "column": 31}}, {"id": 256, "type": "ERROR", "text": "}\r\n\r\n\tFIRE_EVENT(ItemPaint,ItemEvent)\r\n\tFIRE_EVENT(ItemChanged,ItemEvent)\r\n\tFIRE_EVENT(ItemSelected,ItemEvent)\r\n\tFIRE_EVENT(ItemAdded,ItemEvent)\r\n\tFIRE_EVENT(ItemDeleted,ItemEvent)\r\n\t\r\n\tvirtual Image", "parent": 251, "children": [257], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 110, "column": 14}}, {"id": 257, "type": "function_declarator", "text": "FIRE_EVENT(ItemPaint,ItemEvent)\r\n\tFIRE_EVENT(ItemChanged,ItemEvent)\r\n\tFIRE_EVENT(ItemSelected,ItemEvent)\r\n\tFIRE_EVENT(ItemAdded,ItemEvent)\r\n\tFIRE_EVENT(ItemDeleted,ItemEvent)\r\n\t\r\n\tvirtual Image", "parent": 256, "children": [258, 259, 264, 269, 274, 279, 284, 285], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 110, "column": 14}}, {"id": 258, "type": "identifier", "text": "FIRE_EVENT", "parent": 257, "children": [], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 104, "column": 11}}, {"id": 259, "type": "parameter_list", "text": "(ItemPaint,ItemEvent)", "parent": 257, "children": [260, 262], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 32}}, {"id": 260, "type": "parameter_declaration", "text": "ItemPaint", "parent": 259, "children": [261], "start_point": {"row": 104, "column": 12}, "end_point": {"row": 104, "column": 21}}, {"id": 261, "type": "type_identifier", "text": "ItemPaint", "parent": 260, "children": [], "start_point": {"row": 104, "column": 12}, "end_point": {"row": 104, "column": 21}}, {"id": 262, "type": "parameter_declaration", "text": "ItemEvent", "parent": 259, "children": [263], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 31}}, {"id": 263, "type": "type_identifier", "text": "ItemEvent", "parent": 262, "children": [], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 31}}, {"id": 264, "type": "call_expression", "text": "FIRE_EVENT(ItemChanged,ItemEvent)", "parent": 257, "children": [265, 266], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 34}}, {"id": 265, "type": "identifier", "text": "FIRE_EVENT", "parent": 264, "children": [], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 11}}, {"id": 266, "type": "argument_list", "text": "(ItemChanged,ItemEvent)", "parent": 264, "children": [267, 268], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 34}}, {"id": 267, "type": "identifier", "text": "ItemChanged", "parent": 266, "children": [], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 23}}, {"id": 268, "type": "identifier", "text": "ItemEvent", "parent": 266, "children": [], "start_point": {"row": 105, "column": 24}, "end_point": {"row": 105, "column": 33}}, {"id": 269, "type": "call_expression", "text": "FIRE_EVENT(ItemSelected,ItemEvent)", "parent": 257, "children": [270, 271], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 35}}, {"id": 270, "type": "identifier", "text": "FIRE_EVENT", "parent": 269, "children": [], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 11}}, {"id": 271, "type": "argument_list", "text": "(ItemSelected,ItemEvent)", "parent": 269, "children": [272, 273], "start_point": {"row": 106, "column": 11}, "end_point": {"row": 106, "column": 35}}, {"id": 272, "type": "identifier", "text": "ItemSelected", "parent": 271, "children": [], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 24}}, {"id": 273, "type": "identifier", "text": "ItemEvent", "parent": 271, "children": [], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 34}}, {"id": 274, "type": "call_expression", "text": "FIRE_EVENT(ItemAdded,ItemEvent)", "parent": 257, "children": [275, 276], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 32}}, {"id": 275, "type": "identifier", "text": "FIRE_EVENT", "parent": 274, "children": [], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 11}}, {"id": 276, "type": "argument_list", "text": "(ItemAdded,ItemEvent)", "parent": 274, "children": [277, 278], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 32}}, {"id": 277, "type": "identifier", "text": "ItemAdded", "parent": 276, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 21}}, {"id": 278, "type": "identifier", "text": "ItemEvent", "parent": 276, "children": [], "start_point": {"row": 107, "column": 22}, "end_point": {"row": 107, "column": 31}}, {"id": 279, "type": "call_expression", "text": "FIRE_EVENT(ItemDeleted,ItemEvent)", "parent": 257, "children": [280, 281], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 34}}, {"id": 280, "type": "identifier", "text": "FIRE_EVENT", "parent": 279, "children": [], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 11}}, {"id": 281, "type": "argument_list", "text": "(ItemDeleted,ItemEvent)", "parent": 279, "children": [282, 283], "start_point": {"row": 108, "column": 11}, "end_point": {"row": 108, "column": 34}}, {"id": 282, "type": "identifier", "text": "ItemDeleted", "parent": 281, "children": [], "start_point": {"row": 108, "column": 12}, "end_point": {"row": 108, "column": 23}}, {"id": 283, "type": "identifier", "text": "ItemEvent", "parent": 281, "children": [], "start_point": {"row": 108, "column": 24}, "end_point": {"row": 108, "column": 33}}, {"id": 284, "type": "identifier", "text": "virtual", "parent": 257, "children": [], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 8}}, {"id": 285, "type": "identifier", "text": "Image", "parent": 257, "children": [], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 14}}, {"id": 286, "type": "pointer_declarator", "text": "* getImage()", "parent": 251, "children": [287, 288], "start_point": {"row": 110, "column": 14}, "end_point": {"row": 110, "column": 26}}, {"id": 287, "type": "*", "text": "*", "parent": 286, "children": [], "start_point": {"row": 110, "column": 14}, "end_point": {"row": 110, "column": 15}}, {"id": 288, "type": "function_declarator", "text": "getImage()", "parent": 286, "children": [289, 290], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 26}}, {"id": 289, "type": "identifier", "text": "getImage", "parent": 288, "children": [], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 24}}, {"id": 290, "type": "parameter_list", "text": "()", "parent": 288, "children": [], "start_point": {"row": 110, "column": 24}, "end_point": {"row": 110, "column": 26}}, {"id": 291, "type": "declaration", "text": "virtual unsigned long getIndex();", "parent": 239, "children": [292, 296], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 37}}, {"id": 292, "type": "sized_type_specifier", "text": "virtual unsigned long", "parent": 291, "children": [293, 294, 295], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 25}}, {"id": 293, "type": "type_identifier", "text": "virtual", "parent": 292, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 11}}, {"id": 294, "type": "unsigned", "text": "unsigned", "parent": 292, "children": [], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 20}}, {"id": 295, "type": "long", "text": "long", "parent": 292, "children": [], "start_point": {"row": 112, "column": 21}, "end_point": {"row": 112, "column": 25}}, {"id": 296, "type": "function_declarator", "text": "getIndex()", "parent": 291, "children": [297, 298], "start_point": {"row": 112, "column": 26}, "end_point": {"row": 112, "column": 36}}, {"id": 297, "type": "identifier", "text": "getIndex", "parent": 296, "children": [], "start_point": {"row": 112, "column": 26}, "end_point": {"row": 112, "column": 34}}, {"id": 298, "type": "parameter_list", "text": "()", "parent": 296, "children": [], "start_point": {"row": 112, "column": 34}, "end_point": {"row": 112, "column": 36}}, {"id": 299, "type": "declaration", "text": "virtual void setIndex( const unsigned long& index );", "parent": 239, "children": [300, 301, 303], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 53}}, {"id": 300, "type": "type_identifier", "text": "virtual", "parent": 299, "children": [], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 8}}, {"id": 301, "type": "ERROR", "text": "void", "parent": 299, "children": [302], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 13}}, {"id": 302, "type": "identifier", "text": "void", "parent": 301, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 13}}, {"id": 303, "type": "function_declarator", "text": "setIndex( const unsigned long& index )", "parent": 299, "children": [304, 305], "start_point": {"row": 114, "column": 14}, "end_point": {"row": 114, "column": 52}}, {"id": 304, "type": "identifier", "text": "setIndex", "parent": 303, "children": [], "start_point": {"row": 114, "column": 14}, "end_point": {"row": 114, "column": 22}}, {"id": 305, "type": "parameter_list", "text": "( const unsigned long& index )", "parent": 303, "children": [306], "start_point": {"row": 114, "column": 22}, "end_point": {"row": 114, "column": 52}}, {"id": 306, "type": "parameter_declaration", "text": "const unsigned long& index", "parent": 305, "children": [307, 310], "start_point": {"row": 114, "column": 24}, "end_point": {"row": 114, "column": 50}}, {"id": 307, "type": "sized_type_specifier", "text": "unsigned long", "parent": 306, "children": [308, 309], "start_point": {"row": 114, "column": 30}, "end_point": {"row": 114, "column": 43}}, {"id": 308, "type": "unsigned", "text": "unsigned", "parent": 307, "children": [], "start_point": {"row": 114, "column": 30}, "end_point": {"row": 114, "column": 38}}, {"id": 309, "type": "long", "text": "long", "parent": 307, "children": [], "start_point": {"row": 114, "column": 39}, "end_point": {"row": 114, "column": 43}}, {"id": 310, "type": "identifier", "text": "index", "parent": 306, "children": [], "start_point": {"row": 114, "column": 45}, "end_point": {"row": 114, "column": 50}}, {"id": 311, "type": "declaration", "text": "virtual void* getData();", "parent": 239, "children": [312, 313, 315], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 28}}, {"id": 312, "type": "type_identifier", "text": "virtual", "parent": 311, "children": [], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 11}}, {"id": 313, "type": "ERROR", "text": "void", "parent": 311, "children": [314], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 16}}, {"id": 314, "type": "identifier", "text": "void", "parent": 313, "children": [], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 16}}, {"id": 315, "type": "pointer_declarator", "text": "* getData()", "parent": 311, "children": [316, 317], "start_point": {"row": 116, "column": 16}, "end_point": {"row": 116, "column": 27}}, {"id": 316, "type": "*", "text": "*", "parent": 315, "children": [], "start_point": {"row": 116, "column": 16}, "end_point": {"row": 116, "column": 17}}, {"id": 317, "type": "function_declarator", "text": "getData()", "parent": 315, "children": [318, 319], "start_point": {"row": 116, "column": 18}, "end_point": {"row": 116, "column": 27}}, {"id": 318, "type": "identifier", "text": "getData", "parent": 317, "children": [], "start_point": {"row": 116, "column": 18}, "end_point": {"row": 116, "column": 25}}, {"id": 319, "type": "parameter_list", "text": "()", "parent": 317, "children": [], "start_point": {"row": 116, "column": 25}, "end_point": {"row": 116, "column": 27}}, {"id": 320, "type": "declaration", "text": "virtual void setData( void* data );", "parent": 239, "children": [321, 322, 324], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 36}}, {"id": 321, "type": "type_identifier", "text": "virtual", "parent": 320, "children": [], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 8}}, {"id": 322, "type": "ERROR", "text": "void", "parent": 320, "children": [323], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 13}}, {"id": 323, "type": "identifier", "text": "void", "parent": 322, "children": [], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 13}}, {"id": 324, "type": "function_declarator", "text": "setData( void* data )", "parent": 320, "children": [325, 326], "start_point": {"row": 118, "column": 14}, "end_point": {"row": 118, "column": 35}}, {"id": 325, "type": "identifier", "text": "setData", "parent": 324, "children": [], "start_point": {"row": 118, "column": 14}, "end_point": {"row": 118, "column": 21}}, {"id": 326, "type": "parameter_list", "text": "( void* data )", "parent": 324, "children": [327], "start_point": {"row": 118, "column": 21}, "end_point": {"row": 118, "column": 35}}, {"id": 327, "type": "parameter_declaration", "text": "void* data", "parent": 326, "children": [328, 329], "start_point": {"row": 118, "column": 23}, "end_point": {"row": 118, "column": 33}}, {"id": 328, "type": "primitive_type", "text": "void", "parent": 327, "children": [], "start_point": {"row": 118, "column": 23}, "end_point": {"row": 118, "column": 27}}, {"id": 329, "type": "pointer_declarator", "text": "* data", "parent": 327, "children": [330, 331], "start_point": {"row": 118, "column": 27}, "end_point": {"row": 118, "column": 33}}, {"id": 330, "type": "*", "text": "*", "parent": 329, "children": [], "start_point": {"row": 118, "column": 27}, "end_point": {"row": 118, "column": 28}}, {"id": 331, "type": "identifier", "text": "data", "parent": 329, "children": [], "start_point": {"row": 118, "column": 29}, "end_point": {"row": 118, "column": 33}}, {"id": 332, "type": "declaration", "text": "virtual String getCaption();", "parent": 239, "children": [333, 334, 336], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 120, "column": 29}}, {"id": 333, "type": "type_identifier", "text": "virtual", "parent": 332, "children": [], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 120, "column": 8}}, {"id": 334, "type": "ERROR", "text": "String", "parent": 332, "children": [335], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 15}}, {"id": 335, "type": "identifier", "text": "String", "parent": 334, "children": [], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 15}}, {"id": 336, "type": "function_declarator", "text": "getCaption()", "parent": 332, "children": [337, 338], "start_point": {"row": 120, "column": 16}, "end_point": {"row": 120, "column": 28}}, {"id": 337, "type": "identifier", "text": "getCaption", "parent": 336, "children": [], "start_point": {"row": 120, "column": 16}, "end_point": {"row": 120, "column": 26}}, {"id": 338, "type": "parameter_list", "text": "()", "parent": 336, "children": [], "start_point": {"row": 120, "column": 26}, "end_point": {"row": 120, "column": 28}}, {"id": 339, "type": "declaration", "text": "virtual void setCaption( const String& caption );", "parent": 239, "children": [340, 341, 343], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 50}}, {"id": 340, "type": "type_identifier", "text": "virtual", "parent": 339, "children": [], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 8}}, {"id": 341, "type": "ERROR", "text": "void", "parent": 339, "children": [342], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 13}}, {"id": 342, "type": "identifier", "text": "void", "parent": 341, "children": [], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 13}}, {"id": 343, "type": "function_declarator", "text": "setCaption( const String& caption )", "parent": 339, "children": [344, 345], "start_point": {"row": 122, "column": 14}, "end_point": {"row": 122, "column": 49}}, {"id": 344, "type": "identifier", "text": "setCaption", "parent": 343, "children": [], "start_point": {"row": 122, "column": 14}, "end_point": {"row": 122, "column": 24}}, {"id": 345, "type": "parameter_list", "text": "( const String& caption )", "parent": 343, "children": [346], "start_point": {"row": 122, "column": 24}, "end_point": {"row": 122, "column": 49}}, {"id": 346, "type": "parameter_declaration", "text": "const String& caption", "parent": 345, "children": [347, 348], "start_point": {"row": 122, "column": 26}, "end_point": {"row": 122, "column": 47}}, {"id": 347, "type": "type_identifier", "text": "String", "parent": 346, "children": [], "start_point": {"row": 122, "column": 32}, "end_point": {"row": 122, "column": 38}}, {"id": 348, "type": "identifier", "text": "caption", "parent": 346, "children": [], "start_point": {"row": 122, "column": 40}, "end_point": {"row": 122, "column": 47}}, {"id": 349, "type": "declaration", "text": "virtual Model* getModel();", "parent": 239, "children": [350, 351, 353], "start_point": {"row": 124, "column": 1}, "end_point": {"row": 124, "column": 27}}, {"id": 350, "type": "type_identifier", "text": "virtual", "parent": 349, "children": [], "start_point": {"row": 124, "column": 1}, "end_point": {"row": 124, "column": 8}}, {"id": 351, "type": "ERROR", "text": "Model", "parent": 349, "children": [352], "start_point": {"row": 124, "column": 9}, "end_point": {"row": 124, "column": 14}}, {"id": 352, "type": "identifier", "text": "Model", "parent": 351, "children": [], "start_point": {"row": 124, "column": 9}, "end_point": {"row": 124, "column": 14}}, {"id": 353, "type": "pointer_declarator", "text": "* getModel()", "parent": 349, "children": [354, 355], "start_point": {"row": 124, "column": 14}, "end_point": {"row": 124, "column": 26}}, {"id": 354, "type": "*", "text": "*", "parent": 353, "children": [], "start_point": {"row": 124, "column": 14}, "end_point": {"row": 124, "column": 15}}, {"id": 355, "type": "function_declarator", "text": "getModel()", "parent": 353, "children": [356, 357], "start_point": {"row": 124, "column": 16}, "end_point": {"row": 124, "column": 26}}, {"id": 356, "type": "identifier", "text": "getModel", "parent": 355, "children": [], "start_point": {"row": 124, "column": 16}, "end_point": {"row": 124, "column": 24}}, {"id": 357, "type": "parameter_list", "text": "()", "parent": 355, "children": [], "start_point": {"row": 124, "column": 24}, "end_point": {"row": 124, "column": 26}}, {"id": 358, "type": "declaration", "text": "virtual void setModel( Model* model );", "parent": 239, "children": [359, 360, 362], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 39}}, {"id": 359, "type": "type_identifier", "text": "virtual", "parent": 358, "children": [], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 8}}, {"id": 360, "type": "ERROR", "text": "void", "parent": 358, "children": [361], "start_point": {"row": 126, "column": 9}, "end_point": {"row": 126, "column": 13}}, {"id": 361, "type": "identifier", "text": "void", "parent": 360, "children": [], "start_point": {"row": 126, "column": 9}, "end_point": {"row": 126, "column": 13}}, {"id": 362, "type": "function_declarator", "text": "setModel( Model* model )", "parent": 358, "children": [363, 364], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 38}}, {"id": 363, "type": "identifier", "text": "setModel", "parent": 362, "children": [], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 22}}, {"id": 364, "type": "parameter_list", "text": "( Model* model )", "parent": 362, "children": [365], "start_point": {"row": 126, "column": 22}, "end_point": {"row": 126, "column": 38}}, {"id": 365, "type": "parameter_declaration", "text": "Model* model", "parent": 364, "children": [366, 367], "start_point": {"row": 126, "column": 24}, "end_point": {"row": 126, "column": 36}}, {"id": 366, "type": "type_identifier", "text": "Model", "parent": 365, "children": [], "start_point": {"row": 126, "column": 24}, "end_point": {"row": 126, "column": 29}}, {"id": 367, "type": "pointer_declarator", "text": "* model", "parent": 365, "children": [368, 369], "start_point": {"row": 126, "column": 29}, "end_point": {"row": 126, "column": 36}}, {"id": 368, "type": "*", "text": "*", "parent": 367, "children": [], "start_point": {"row": 126, "column": 29}, "end_point": {"row": 126, "column": 30}}, {"id": 369, "type": "identifier", "text": "model", "parent": 367, "children": [], "start_point": {"row": 126, "column": 31}, "end_point": {"row": 126, "column": 36}}, {"id": 370, "type": "declaration", "text": "virtual void paint( GraphicsContext* context, Rect* paintRect );", "parent": 239, "children": [371, 372, 374], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 65}}, {"id": 371, "type": "type_identifier", "text": "virtual", "parent": 370, "children": [], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 8}}, {"id": 372, "type": "ERROR", "text": "void", "parent": 370, "children": [373], "start_point": {"row": 128, "column": 9}, "end_point": {"row": 128, "column": 13}}, {"id": 373, "type": "identifier", "text": "void", "parent": 372, "children": [], "start_point": {"row": 128, "column": 9}, "end_point": {"row": 128, "column": 13}}, {"id": 374, "type": "function_declarator", "text": "paint( GraphicsContext* context, Rect* paintRect )", "parent": 370, "children": [375, 376], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 64}}, {"id": 375, "type": "identifier", "text": "paint", "parent": 374, "children": [], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 19}}, {"id": 376, "type": "parameter_list", "text": "( GraphicsContext* context, Rect* paintRect )", "parent": 374, "children": [377, 382], "start_point": {"row": 128, "column": 19}, "end_point": {"row": 128, "column": 64}}, {"id": 377, "type": "parameter_declaration", "text": "GraphicsContext* context", "parent": 376, "children": [378, 379], "start_point": {"row": 128, "column": 21}, "end_point": {"row": 128, "column": 45}}, {"id": 378, "type": "type_identifier", "text": "GraphicsContext", "parent": 377, "children": [], "start_point": {"row": 128, "column": 21}, "end_point": {"row": 128, "column": 36}}, {"id": 379, "type": "pointer_declarator", "text": "* context", "parent": 377, "children": [380, 381], "start_point": {"row": 128, "column": 36}, "end_point": {"row": 128, "column": 45}}, {"id": 380, "type": "*", "text": "*", "parent": 379, "children": [], "start_point": {"row": 128, "column": 36}, "end_point": {"row": 128, "column": 37}}, {"id": 381, "type": "identifier", "text": "context", "parent": 379, "children": [], "start_point": {"row": 128, "column": 38}, "end_point": {"row": 128, "column": 45}}, {"id": 382, "type": "parameter_declaration", "text": "Rect* paintRect", "parent": 376, "children": [383, 384], "start_point": {"row": 128, "column": 47}, "end_point": {"row": 128, "column": 62}}, {"id": 383, "type": "type_identifier", "text": "Rect", "parent": 382, "children": [], "start_point": {"row": 128, "column": 47}, "end_point": {"row": 128, "column": 51}}, {"id": 384, "type": "pointer_declarator", "text": "* paintRect", "parent": 382, "children": [385, 386], "start_point": {"row": 128, "column": 51}, "end_point": {"row": 128, "column": 62}}, {"id": 385, "type": "*", "text": "*", "parent": 384, "children": [], "start_point": {"row": 128, "column": 51}, "end_point": {"row": 128, "column": 52}}, {"id": 386, "type": "identifier", "text": "paintRect", "parent": 384, "children": [], "start_point": {"row": 128, "column": 53}, "end_point": {"row": 128, "column": 62}}, {"id": 387, "type": "declaration", "text": "virtual bool isSelected();", "parent": 239, "children": [388, 389, 391], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 130, "column": 27}}, {"id": 388, "type": "type_identifier", "text": "virtual", "parent": 387, "children": [], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 130, "column": 8}}, {"id": 389, "type": "ERROR", "text": "bool", "parent": 387, "children": [390], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 13}}, {"id": 390, "type": "identifier", "text": "bool", "parent": 389, "children": [], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 13}}, {"id": 391, "type": "function_declarator", "text": "isSelected()", "parent": 387, "children": [392, 393], "start_point": {"row": 130, "column": 14}, "end_point": {"row": 130, "column": 26}}, {"id": 392, "type": "identifier", "text": "isSelected", "parent": 391, "children": [], "start_point": {"row": 130, "column": 14}, "end_point": {"row": 130, "column": 24}}, {"id": 393, "type": "parameter_list", "text": "()", "parent": 391, "children": [], "start_point": {"row": 130, "column": 24}, "end_point": {"row": 130, "column": 26}}, {"id": 394, "type": "declaration", "text": "virtual void setSelected( const bool& selected );", "parent": 239, "children": [395, 396, 398], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 132, "column": 50}}, {"id": 395, "type": "type_identifier", "text": "virtual", "parent": 394, "children": [], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 132, "column": 8}}, {"id": 396, "type": "ERROR", "text": "void", "parent": 394, "children": [397], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 13}}, {"id": 397, "type": "identifier", "text": "void", "parent": 396, "children": [], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 13}}, {"id": 398, "type": "function_declarator", "text": "setSelected( const bool& selected )", "parent": 394, "children": [399, 400], "start_point": {"row": 132, "column": 14}, "end_point": {"row": 132, "column": 49}}, {"id": 399, "type": "identifier", "text": "setSelected", "parent": 398, "children": [], "start_point": {"row": 132, "column": 14}, "end_point": {"row": 132, "column": 25}}, {"id": 400, "type": "parameter_list", "text": "( const bool& selected )", "parent": 398, "children": [401], "start_point": {"row": 132, "column": 25}, "end_point": {"row": 132, "column": 49}}, {"id": 401, "type": "parameter_declaration", "text": "const bool& selected", "parent": 400, "children": [402, 403], "start_point": {"row": 132, "column": 27}, "end_point": {"row": 132, "column": 47}}, {"id": 402, "type": "primitive_type", "text": "bool", "parent": 401, "children": [], "start_point": {"row": 132, "column": 33}, "end_point": {"row": 132, "column": 37}}, {"id": 403, "type": "identifier", "text": "selected", "parent": 401, "children": [], "start_point": {"row": 132, "column": 39}, "end_point": {"row": 132, "column": 47}}, {"id": 404, "type": "function_definition", "text": "virtual ulong32 getImageIndex() {\r\n\t\treturn m_imageIndex;\r\n\t}", "parent": 239, "children": [405, 406, 408], "start_point": {"row": 134, "column": 1}, "end_point": {"row": 136, "column": 2}}, {"id": 405, "type": "type_identifier", "text": "virtual", "parent": 404, "children": [], "start_point": {"row": 134, "column": 1}, "end_point": {"row": 134, "column": 8}}, {"id": 406, "type": "ERROR", "text": "ulong32", "parent": 404, "children": [407], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 16}}, {"id": 407, "type": "identifier", "text": "ulong32", "parent": 406, "children": [], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 16}}, {"id": 408, "type": "function_declarator", "text": "getImageIndex()", "parent": 404, "children": [409, 410], "start_point": {"row": 134, "column": 17}, "end_point": {"row": 134, "column": 32}}, {"id": 409, "type": "identifier", "text": "getImageIndex", "parent": 408, "children": [], "start_point": {"row": 134, "column": 17}, "end_point": {"row": 134, "column": 30}}, {"id": 410, "type": "parameter_list", "text": "()", "parent": 408, "children": [], "start_point": {"row": 134, "column": 30}, "end_point": {"row": 134, "column": 32}}, {"id": 411, "type": "return_statement", "text": "return m_imageIndex;", "parent": 404, "children": [412], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 22}}, {"id": 412, "type": "identifier", "text": "m_imageIndex", "parent": 411, "children": [], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 21}}, {"id": 413, "type": "declaration", "text": "virtual void setImageIndex( const ulong32& imageIndex );", "parent": 239, "children": [414, 415, 417], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 57}}, {"id": 414, "type": "type_identifier", "text": "virtual", "parent": 413, "children": [], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 8}}, {"id": 415, "type": "ERROR", "text": "void", "parent": 413, "children": [416], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 138, "column": 13}}, {"id": 416, "type": "identifier", "text": "void", "parent": 415, "children": [], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 138, "column": 13}}, {"id": 417, "type": "function_declarator", "text": "setImageIndex( const ulong32& imageIndex )", "parent": 413, "children": [418, 419], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 56}}, {"id": 418, "type": "identifier", "text": "setImageIndex", "parent": 417, "children": [], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 27}}, {"id": 419, "type": "parameter_list", "text": "( const ulong32& imageIndex )", "parent": 417, "children": [420], "start_point": {"row": 138, "column": 27}, "end_point": {"row": 138, "column": 56}}, {"id": 420, "type": "parameter_declaration", "text": "const ulong32& imageIndex", "parent": 419, "children": [421, 422], "start_point": {"row": 138, "column": 29}, "end_point": {"row": 138, "column": 54}}, {"id": 421, "type": "type_identifier", "text": "ulong32", "parent": 420, "children": [], "start_point": {"row": 138, "column": 35}, "end_point": {"row": 138, "column": 42}}, {"id": 422, "type": "identifier", "text": "imageIndex", "parent": 420, "children": [], "start_point": {"row": 138, "column": 44}, "end_point": {"row": 138, "column": 54}}, {"id": 423, "type": "function_definition", "text": "virtual Rect* getBounds() {\r\n\t\treturn &m_bounds;\r\n\t}", "parent": 239, "children": [424, 425, 427], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 142, "column": 2}}, {"id": 424, "type": "type_identifier", "text": "virtual", "parent": 423, "children": [], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 140, "column": 8}}, {"id": 425, "type": "ERROR", "text": "Rect", "parent": 423, "children": [426], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 13}}, {"id": 426, "type": "identifier", "text": "Rect", "parent": 425, "children": [], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 13}}, {"id": 427, "type": "pointer_declarator", "text": "* getBounds()", "parent": 423, "children": [428, 429], "start_point": {"row": 140, "column": 13}, "end_point": {"row": 140, "column": 26}}, {"id": 428, "type": "*", "text": "*", "parent": 427, "children": [], "start_point": {"row": 140, "column": 13}, "end_point": {"row": 140, "column": 14}}, {"id": 429, "type": "function_declarator", "text": "getBounds()", "parent": 427, "children": [430, 431], "start_point": {"row": 140, "column": 15}, "end_point": {"row": 140, "column": 26}}, {"id": 430, "type": "identifier", "text": "getBounds", "parent": 429, "children": [], "start_point": {"row": 140, "column": 15}, "end_point": {"row": 140, "column": 24}}, {"id": 431, "type": "parameter_list", "text": "()", "parent": 429, "children": [], "start_point": {"row": 140, "column": 24}, "end_point": {"row": 140, "column": 26}}, {"id": 432, "type": "return_statement", "text": "return &m_bounds;", "parent": 423, "children": [433], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 19}}, {"id": 433, "type": "pointer_expression", "text": "&m_bounds", "parent": 432, "children": [434], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 18}}, {"id": 434, "type": "identifier", "text": "m_bounds", "parent": 433, "children": [], "start_point": {"row": 141, "column": 10}, "end_point": {"row": 141, "column": 18}}, {"id": 435, "type": "function_definition", "text": "virtual Control* getControl() {\r\n\t\treturn m_owningControl;\r\n\t}", "parent": 239, "children": [436, 437, 439], "start_point": {"row": 144, "column": 1}, "end_point": {"row": 146, "column": 2}}, {"id": 436, "type": "type_identifier", "text": "virtual", "parent": 435, "children": [], "start_point": {"row": 144, "column": 1}, "end_point": {"row": 144, "column": 8}}, {"id": 437, "type": "ERROR", "text": "Control", "parent": 435, "children": [438], "start_point": {"row": 144, "column": 9}, "end_point": {"row": 144, "column": 16}}, {"id": 438, "type": "identifier", "text": "Control", "parent": 437, "children": [], "start_point": {"row": 144, "column": 9}, "end_point": {"row": 144, "column": 16}}, {"id": 439, "type": "pointer_declarator", "text": "* getControl()", "parent": 435, "children": [440, 441], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 30}}, {"id": 440, "type": "*", "text": "*", "parent": 439, "children": [], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 17}}, {"id": 441, "type": "function_declarator", "text": "getControl()", "parent": 439, "children": [442, 443], "start_point": {"row": 144, "column": 18}, "end_point": {"row": 144, "column": 30}}, {"id": 442, "type": "identifier", "text": "getControl", "parent": 441, "children": [], "start_point": {"row": 144, "column": 18}, "end_point": {"row": 144, "column": 28}}, {"id": 443, "type": "parameter_list", "text": "()", "parent": 441, "children": [], "start_point": {"row": 144, "column": 28}, "end_point": {"row": 144, "column": 30}}, {"id": 444, "type": "return_statement", "text": "return m_owningControl;", "parent": 435, "children": [445], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 145, "column": 25}}, {"id": 445, "type": "identifier", "text": "m_owningControl", "parent": 444, "children": [], "start_point": {"row": 145, "column": 9}, "end_point": {"row": 145, "column": 24}}, {"id": 446, "type": "function_definition", "text": "virtual void setControl( Control* control ) {\r\n\t\tm_owningControl = control;\r\n\t}", "parent": 239, "children": [447, 448, 450], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 151, "column": 2}}, {"id": 447, "type": "type_identifier", "text": "virtual", "parent": 446, "children": [], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 149, "column": 8}}, {"id": 448, "type": "ERROR", "text": "void", "parent": 446, "children": [449], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 13}}, {"id": 449, "type": "identifier", "text": "void", "parent": 448, "children": [], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 13}}, {"id": 450, "type": "function_declarator", "text": "setControl( Control* control )", "parent": 446, "children": [451, 452], "start_point": {"row": 149, "column": 14}, "end_point": {"row": 149, "column": 44}}, {"id": 451, "type": "identifier", "text": "setControl", "parent": 450, "children": [], "start_point": {"row": 149, "column": 14}, "end_point": {"row": 149, "column": 24}}, {"id": 452, "type": "parameter_list", "text": "( Control* control )", "parent": 450, "children": [453], "start_point": {"row": 149, "column": 24}, "end_point": {"row": 149, "column": 44}}, {"id": 453, "type": "parameter_declaration", "text": "Control* control", "parent": 452, "children": [454, 455], "start_point": {"row": 149, "column": 26}, "end_point": {"row": 149, "column": 42}}, {"id": 454, "type": "type_identifier", "text": "Control", "parent": 453, "children": [], "start_point": {"row": 149, "column": 26}, "end_point": {"row": 149, "column": 33}}, {"id": 455, "type": "pointer_declarator", "text": "* control", "parent": 453, "children": [456, 457], "start_point": {"row": 149, "column": 33}, "end_point": {"row": 149, "column": 42}}, {"id": 456, "type": "*", "text": "*", "parent": 455, "children": [], "start_point": {"row": 149, "column": 33}, "end_point": {"row": 149, "column": 34}}, {"id": 457, "type": "identifier", "text": "control", "parent": 455, "children": [], "start_point": {"row": 149, "column": 35}, "end_point": {"row": 149, "column": 42}}, {"id": 458, "type": "assignment_expression", "text": "m_owningControl = control", "parent": 446, "children": [459, 460, 461], "start_point": {"row": 150, "column": 2}, "end_point": {"row": 150, "column": 27}}, {"id": 459, "type": "identifier", "text": "m_owningControl", "parent": 458, "children": [], "start_point": {"row": 150, "column": 2}, "end_point": {"row": 150, "column": 17}}, {"id": 460, "type": "=", "text": "=", "parent": 458, "children": [], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 19}}, {"id": 461, "type": "identifier", "text": "control", "parent": 458, "children": [], "start_point": {"row": 150, "column": 20}, "end_point": {"row": 150, "column": 27}}, {"id": 462, "type": "function_definition", "text": "virtual bool canPaint() {\r\n\t\treturn false;\t\r\n\t}", "parent": 239, "children": [463, 464, 466], "start_point": {"row": 153, "column": 1}, "end_point": {"row": 155, "column": 2}}, {"id": 463, "type": "type_identifier", "text": "virtual", "parent": 462, "children": [], "start_point": {"row": 153, "column": 1}, "end_point": {"row": 153, "column": 8}}, {"id": 464, "type": "ERROR", "text": "bool", "parent": 462, "children": [465], "start_point": {"row": 153, "column": 9}, "end_point": {"row": 153, "column": 13}}, {"id": 465, "type": "identifier", "text": "bool", "parent": 464, "children": [], "start_point": {"row": 153, "column": 9}, "end_point": {"row": 153, "column": 13}}, {"id": 466, "type": "function_declarator", "text": "canPaint()", "parent": 462, "children": [467, 468], "start_point": {"row": 153, "column": 14}, "end_point": {"row": 153, "column": 24}}, {"id": 467, "type": "identifier", "text": "canPaint", "parent": 466, "children": [], "start_point": {"row": 153, "column": 14}, "end_point": {"row": 153, "column": 22}}, {"id": 468, "type": "parameter_list", "text": "()", "parent": 466, "children": [], "start_point": {"row": 153, "column": 22}, "end_point": {"row": 153, "column": 24}}, {"id": 469, "type": "return_statement", "text": "return false;", "parent": 462, "children": [470], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 154, "column": 15}}, {"id": 470, "type": "false", "text": "false", "parent": 469, "children": [], "start_point": {"row": 154, "column": 9}, "end_point": {"row": 154, "column": 14}}, {"id": 471, "type": "labeled_statement", "text": "private:\r\n\tImage* m_image;", "parent": 239, "children": [472], "start_point": {"row": 156, "column": 0}, "end_point": {"row": 157, "column": 16}}, {"id": 472, "type": "declaration", "text": "Image* m_image;", "parent": 471, "children": [473, 474], "start_point": {"row": 157, "column": 1}, "end_point": {"row": 157, "column": 16}}, {"id": 473, "type": "type_identifier", "text": "Image", "parent": 472, "children": [], "start_point": {"row": 157, "column": 1}, "end_point": {"row": 157, "column": 6}}, {"id": 474, "type": "pointer_declarator", "text": "* m_image", "parent": 472, "children": [475, 476], "start_point": {"row": 157, "column": 6}, "end_point": {"row": 157, "column": 15}}, {"id": 475, "type": "*", "text": "*", "parent": 474, "children": [], "start_point": {"row": 157, "column": 6}, "end_point": {"row": 157, "column": 7}}, {"id": 476, "type": "identifier", "text": "m_image", "parent": 474, "children": [], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 15}}, {"id": 477, "type": "declaration", "text": "Control* m_owningControl;", "parent": 239, "children": [478, 479], "start_point": {"row": 158, "column": 1}, "end_point": {"row": 158, "column": 26}}, {"id": 478, "type": "type_identifier", "text": "Control", "parent": 477, "children": [], "start_point": {"row": 158, "column": 1}, "end_point": {"row": 158, "column": 8}}, {"id": 479, "type": "pointer_declarator", "text": "* m_owningControl", "parent": 477, "children": [480, 481], "start_point": {"row": 158, "column": 8}, "end_point": {"row": 158, "column": 25}}, {"id": 480, "type": "*", "text": "*", "parent": 479, "children": [], "start_point": {"row": 158, "column": 8}, "end_point": {"row": 158, "column": 9}}, {"id": 481, "type": "identifier", "text": "m_owningControl", "parent": 479, "children": [], "start_point": {"row": 158, "column": 10}, "end_point": {"row": 158, "column": 25}}, {"id": 482, "type": "declaration", "text": "String m_caption;", "parent": 239, "children": [483, 484], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 18}}, {"id": 483, "type": "type_identifier", "text": "String", "parent": 482, "children": [], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 7}}, {"id": 484, "type": "identifier", "text": "m_caption", "parent": 482, "children": [], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 17}}, {"id": 485, "type": "declaration", "text": "void* m_data;", "parent": 239, "children": [486, 487], "start_point": {"row": 160, "column": 1}, "end_point": {"row": 160, "column": 14}}, {"id": 486, "type": "primitive_type", "text": "void", "parent": 485, "children": [], "start_point": {"row": 160, "column": 1}, "end_point": {"row": 160, "column": 5}}, {"id": 487, "type": "pointer_declarator", "text": "* m_data", "parent": 485, "children": [488, 489], "start_point": {"row": 160, "column": 5}, "end_point": {"row": 160, "column": 13}}, {"id": 488, "type": "*", "text": "*", "parent": 487, "children": [], "start_point": {"row": 160, "column": 5}, "end_point": {"row": 160, "column": 6}}, {"id": 489, "type": "identifier", "text": "m_data", "parent": 487, "children": [], "start_point": {"row": 160, "column": 7}, "end_point": {"row": 160, "column": 13}}, {"id": 490, "type": "declaration", "text": "unsigned long m_index;", "parent": 239, "children": [491, 494], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 23}}, {"id": 491, "type": "sized_type_specifier", "text": "unsigned long", "parent": 490, "children": [492, 493], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 14}}, {"id": 492, "type": "unsigned", "text": "unsigned", "parent": 491, "children": [], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 9}}, {"id": 493, "type": "long", "text": "long", "parent": 491, "children": [], "start_point": {"row": 161, "column": 10}, "end_point": {"row": 161, "column": 14}}, {"id": 494, "type": "identifier", "text": "m_index", "parent": 490, "children": [], "start_point": {"row": 161, "column": 15}, "end_point": {"row": 161, "column": 22}}, {"id": 495, "type": "declaration", "text": "Rect m_bounds;", "parent": 239, "children": [496, 497], "start_point": {"row": 162, "column": 1}, "end_point": {"row": 162, "column": 15}}, {"id": 496, "type": "type_identifier", "text": "Rect", "parent": 495, "children": [], "start_point": {"row": 162, "column": 1}, "end_point": {"row": 162, "column": 5}}, {"id": 497, "type": "identifier", "text": "m_bounds", "parent": 495, "children": [], "start_point": {"row": 162, "column": 6}, "end_point": {"row": 162, "column": 14}}, {"id": 498, "type": "declaration", "text": "Model* m_model;", "parent": 239, "children": [499, 500], "start_point": {"row": 163, "column": 1}, "end_point": {"row": 163, "column": 16}}, {"id": 499, "type": "type_identifier", "text": "Model", "parent": 498, "children": [], "start_point": {"row": 163, "column": 1}, "end_point": {"row": 163, "column": 6}}, {"id": 500, "type": "pointer_declarator", "text": "* m_model", "parent": 498, "children": [501, 502], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 15}}, {"id": 501, "type": "*", "text": "*", "parent": 500, "children": [], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 7}}, {"id": 502, "type": "identifier", "text": "m_model", "parent": 500, "children": [], "start_point": {"row": 163, "column": 8}, "end_point": {"row": 163, "column": 15}}, {"id": 503, "type": "declaration", "text": "bool m_selected;", "parent": 239, "children": [504, 505], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 17}}, {"id": 504, "type": "primitive_type", "text": "bool", "parent": 503, "children": [], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 5}}, {"id": 505, "type": "identifier", "text": "m_selected", "parent": 503, "children": [], "start_point": {"row": 164, "column": 6}, "end_point": {"row": 164, "column": 16}}, {"id": 506, "type": "declaration", "text": "ulong32 m_imageIndex;", "parent": 239, "children": [507, 508], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 22}}, {"id": 507, "type": "type_identifier", "text": "ulong32", "parent": 506, "children": [], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 8}}, {"id": 508, "type": "identifier", "text": "m_imageIndex", "parent": 506, "children": [], "start_point": {"row": 165, "column": 9}, "end_point": {"row": 165, "column": 21}}, {"id": 509, "type": "preproc_call", "text": "#endif //DEFAULTLISTITEM_H\r\n", "parent": 0, "children": [510], "start_point": {"row": 170, "column": 0}, "end_point": {"row": 171, "column": 0}}, {"id": 510, "type": "preproc_directive", "text": "#endif", "parent": 509, "children": [], "start_point": {"row": 170, "column": 0}, "end_point": {"row": 170, "column": 6}}]}, "node_categories": {"declarations": {"functions": [31, 55, 60, 67, 95, 99, 111, 115, 127, 131, 143, 147, 159, 163, 175, 179, 191, 195, 207, 211, 223, 227, 239, 243, 257, 288, 296, 303, 317, 324, 336, 343, 355, 362, 374, 391, 398, 404, 408, 417, 423, 429, 435, 441, 446, 450, 462, 466], "variables": [12, 26, 51, 58, 63, 70, 102, 118, 134, 150, 166, 182, 198, 214, 230, 246, 251, 260, 262, 291, 299, 306, 311, 320, 327, 332, 339, 346, 349, 358, 365, 370, 377, 382, 387, 394, 401, 413, 420, 453, 472, 477, 482, 485, 490, 495, 498, 503, 506], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [19, 34, 37, 41, 44, 48, 75, 79, 83, 87, 91, 264, 269, 274, 279, 433], "assignments": [458], "loops": [], "conditionals": [1, 2, 5, 6, 7, 10, 13, 15, 17, 20, 22, 25, 27, 28, 30, 32, 35, 38, 40, 42, 45, 47, 49, 50, 52, 56, 61, 64, 66, 68, 71, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 103, 106, 107, 108, 110, 112, 114, 116, 119, 122, 123, 124, 126, 128, 130, 132, 135, 138, 139, 140, 142, 144, 146, 148, 151, 154, 155, 156, 158, 160, 162, 164, 167, 170, 171, 172, 174, 176, 178, 180, 183, 186, 187, 188, 190, 192, 194, 196, 199, 202, 203, 204, 206, 208, 210, 212, 215, 218, 219, 220, 222, 224, 226, 228, 231, 234, 235, 236, 238, 240, 242, 244, 247, 250, 252, 253, 255, 258, 261, 263, 265, 267, 268, 270, 272, 273, 275, 277, 278, 280, 282, 283, 284, 285, 289, 292, 293, 297, 300, 302, 304, 307, 310, 312, 314, 318, 321, 323, 325, 331, 333, 335, 337, 340, 342, 344, 347, 348, 350, 352, 356, 359, 361, 363, 366, 369, 371, 373, 375, 378, 381, 383, 386, 388, 390, 392, 395, 397, 399, 403, 405, 407, 409, 412, 414, 416, 418, 421, 422, 424, 426, 430, 434, 436, 438, 442, 445, 447, 449, 451, 454, 457, 459, 461, 463, 465, 467, 473, 476, 478, 481, 483, 484, 489, 491, 494, 496, 497, 499, 502, 505, 507, 508], "returns": [411, 432, 444, 469], "exceptions": []}, "expressions": {"calls": [509], "literals": [23, 24], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "DefaultListItem()"}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "DefaultListItem()"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "init()"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "containsPoint( Point * pt )"}, {"node_id": 95, "universal_type": "function", "name": "addItemPaintHandler", "text_snippet": "virtual void addItemPaintHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemPaint) \r\n\t}"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "addItemPaintHandler( EventHandler* handler )"}, {"node_id": 111, "universal_type": "function", "name": "addItemChangedHandler", "text_snippet": "virtual void addItemChangedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemChanged) \r\n\t}"}, {"node_id": 115, "universal_type": "function", "name": "unknown", "text_snippet": "addItemChangedHandler( EventHandler* handler )"}, {"node_id": 127, "universal_type": "function", "name": "addItemSelectedHandler", "text_snippet": "virtual void addItemSelectedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemSelected) \r\n\t}"}, {"node_id": 131, "universal_type": "function", "name": "unknown", "text_snippet": "addItemSelectedHandler( EventHandler* handler )"}, {"node_id": 143, "universal_type": "function", "name": "addItemAddedHandler", "text_snippet": "virtual void addItemAddedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemAdded) \r\n\t}"}, {"node_id": 147, "universal_type": "function", "name": "unknown", "text_snippet": "addItemAddedHandler( EventHandler* handler )"}, {"node_id": 159, "universal_type": "function", "name": "addItemDeletedHandler", "text_snippet": "virtual void addItemDeletedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemDeleted) \r\n\t}"}, {"node_id": 163, "universal_type": "function", "name": "unknown", "text_snippet": "addItemDeletedHandler( EventHandler* handler )"}, {"node_id": 175, "universal_type": "function", "name": "removeItemPaintHandler", "text_snippet": "virtual void removeItemPaintHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemPaint) \r\n\t}"}, {"node_id": 179, "universal_type": "function", "name": "unknown", "text_snippet": "removeItemPaintHandler( EventHandler* handler )"}, {"node_id": 191, "universal_type": "function", "name": "removeItemChangedHandler", "text_snippet": "virtual void removeItemChangedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemChanged) \r\n"}, {"node_id": 195, "universal_type": "function", "name": "unknown", "text_snippet": "removeItemChangedHandler( EventHandler* handler )"}, {"node_id": 207, "universal_type": "function", "name": "removeItemSelectedHandler", "text_snippet": "virtual void removeItemSelectedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemSelected) "}, {"node_id": 211, "universal_type": "function", "name": "unknown", "text_snippet": "removeItemSelectedHandler( EventHandler* handler )"}, {"node_id": 223, "universal_type": "function", "name": "removeItemAddedHandler", "text_snippet": "virtual void removeItemAddedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemAdded) \r\n\t}"}, {"node_id": 227, "universal_type": "function", "name": "unknown", "text_snippet": "removeItemAddedHandler( EventHandler* handler )"}, {"node_id": 239, "universal_type": "function", "name": "removeItemDeletedHandler", "text_snippet": "virtual void removeItemDeletedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemDeleted) \r\n"}, {"node_id": 243, "universal_type": "function", "name": "unknown", "text_snippet": "removeItemDeletedHandler( EventHandler* handler )"}, {"node_id": 257, "universal_type": "function", "name": "unknown", "text_snippet": "FIRE_EVENT(ItemPaint,ItemEvent)\r\n\tFIRE_EVENT(ItemChanged,ItemEvent)\r\n\tFIRE_EVENT(ItemSelected,ItemEv"}, {"node_id": 288, "universal_type": "function", "name": "unknown", "text_snippet": "getImage()"}, {"node_id": 296, "universal_type": "function", "name": "unknown", "text_snippet": "getIndex()"}, {"node_id": 303, "universal_type": "function", "name": "unknown", "text_snippet": "setIndex( const unsigned long& index )"}, {"node_id": 317, "universal_type": "function", "name": "unknown", "text_snippet": "getData()"}, {"node_id": 324, "universal_type": "function", "name": "unknown", "text_snippet": "setData( void* data )"}, {"node_id": 336, "universal_type": "function", "name": "unknown", "text_snippet": "getCaption()"}, {"node_id": 343, "universal_type": "function", "name": "unknown", "text_snippet": "setCaption( const String& caption )"}, {"node_id": 355, "universal_type": "function", "name": "unknown", "text_snippet": "getModel()"}, {"node_id": 362, "universal_type": "function", "name": "unknown", "text_snippet": "setModel( Model* model )"}, {"node_id": 374, "universal_type": "function", "name": "unknown", "text_snippet": "paint( GraphicsContext* context, Rect* paintRect )"}, {"node_id": 391, "universal_type": "function", "name": "unknown", "text_snippet": "isSelected()"}, {"node_id": 398, "universal_type": "function", "name": "unknown", "text_snippet": "setSelected( const bool& selected )"}, {"node_id": 404, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ulong32 getImageIndex() {\r\n\t\treturn m_imageIndex;\r\n\t}"}, {"node_id": 408, "universal_type": "function", "name": "unknown", "text_snippet": "getImageIndex()"}, {"node_id": 417, "universal_type": "function", "name": "unknown", "text_snippet": "setImageIndex( const ulong32& imageIndex )"}, {"node_id": 423, "universal_type": "function", "name": "unknown", "text_snippet": "virtual Rect* getBounds() {\r\n\t\treturn &m_bounds;\r\n\t}"}, {"node_id": 429, "universal_type": "function", "name": "unknown", "text_snippet": "getBounds()"}, {"node_id": 435, "universal_type": "function", "name": "unknown", "text_snippet": "virtual Control* getControl() {\r\n\t\treturn m_owningControl;\r\n\t}"}, {"node_id": 441, "universal_type": "function", "name": "unknown", "text_snippet": "getControl()"}, {"node_id": 446, "universal_type": "function", "name": "setControl", "text_snippet": "virtual void setControl( Control* control ) {\r\n\t\tm_owningControl = control;\r\n\t}"}, {"node_id": 450, "universal_type": "function", "name": "unknown", "text_snippet": "setControl( Control* control )"}, {"node_id": 462, "universal_type": "function", "name": "canPaint", "text_snippet": "virtual bool canPaint() {\r\n\t\treturn false;\t\r\n\t}"}, {"node_id": 466, "universal_type": "function", "name": "unknown", "text_snippet": "canPaint()"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/**\r\n*Copyright (c) 2000-2001, <NAME>\r\n*All rights reserved.\r\n*Redistribution and use in source and binary forms, with or without\r\n*modification, are permitted provided that the following conditions\r\n*are met:\r\n*\tRedistributions of source code must retain the above copyright\r\n*\tnotice, this list of conditions and the following disclaimer.\r\n*\r\n*\tRedistributions in binary form must reproduce the above copyright\r\n*\tnotice, this list of conditions and the following disclaimer in \r\n*\tthe documentation and/or other materials provided with the distribution.\r\n*\r\n*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" \r\n*AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n*A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS\r\n*OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r\n*EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\n*PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r\n*PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r\n*LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r\n*NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \r\n*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n*\r\n*NB: This software will not save the world.\r\n*/\r\n\r\n/* Generated by Together */\r\n\r\n#ifndef DEFAULTLISTITEM_H\r\n#define DEFAULTLISTITEM_H\r\n\r\n\r\n\r\n\r\nnamespace VCF{\r\n\r\n#define DEFAULTLISTITEM_CLASSID\t\t\"ED88C0AC-26AB-11d4-B539-00C04F0196DA\"\r\n\r\nclass APPKIT_API DefaultListItem : public ListItem {\r\npublic:\r\n\r\n\tBEGIN_CLASSINFO(DefaultListItem, \"VCF::DefaultListItem\", \"VCF::ListItem\", DEFAULTLISTITEM_CLASSID)\r\n\tEND_CLASSINFO(DefaultListItem)\r\n\r\n\tDefaultListItem();\r\n\r\n\tDefaultListItem( Model* model );\r\n\r\n\tDefaultListItem( Model* model, const String& caption );\r\n\r\n\tvirtual ~DefaultListItem();\r\n\r\n\tvoid init();\r\n\r\n virtual bool containsPoint( Point * pt );\r\n\r\n\tEVENT_HANDLER_LIST(ItemPaint);\r\n\tEVENT_HANDLER_LIST(ItemChanged);\r\n\tEVENT_HANDLER_LIST(ItemSelected);\r\n\tEVENT_HANDLER_LIST(ItemAdded);\r\n\tEVENT_HANDLER_LIST(ItemDeleted);\r\n\r\n\tvirtual void addItemPaintHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemPaint) \r\n\t}\r\n\r\n\tvirtual void addItemChangedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemChanged) \r\n\t}\r\n\r\n\tvirtual void addItemSelectedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemSelected) \r\n\t}\r\n\r\n\tvirtual void addItemAddedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemAdded) \r\n\t}\r\n\r\n\tvirtual void addItemDeletedHandler( EventHandler* handler ){\r\n\t\tADD_EVENT_IMPL(ItemDeleted) \r\n\t}\r\n \r\n\tvirtual void removeItemPaintHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemPaint) \r\n\t}\r\n\r\n\tvirtual void removeItemChangedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemChanged) \r\n\t}\r\n\r\n\tvirtual void removeItemSelectedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemSelected) \r\n\t}\r\n\r\n\tvirtual void removeItemAddedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemAdded) \r\n\t}\r\n\r\n\tvirtual void removeItemDeletedHandler( EventHandler* handler ){\r\n\t\tREMOVE_EVENT_IMPL(ItemDeleted) \r\n\t}\r\n\r\n\tFIRE_EVENT(ItemPaint,ItemEvent)\r\n\tFIRE_EVENT(ItemChanged,ItemEvent)\r\n\tFIRE_EVENT(ItemSelected,ItemEvent)\r\n\tFIRE_EVENT(ItemAdded,ItemEvent)\r\n\tFIRE_EVENT(ItemDeleted,ItemEvent)\r\n\t\r\n\tvirtual Image* getImage();\r\n\r\n virtual unsigned long getIndex();\r\n\r\n\tvirtual void setIndex( const unsigned long& index );\r\n\r\n virtual void* getData();\r\n\r\n\tvirtual void setData( void* data );\t\r\n\r\n\tvirtual String getCaption();\r\n\t\r\n\tvirtual void setCaption( const String& caption );\r\n\r\n\tvirtual Model* getModel();\r\n\r\n\tvirtual void setModel( Model* model );\r\n\r\n\tvirtual void paint( GraphicsContext* context, Rect* paintRect );\r\n\t\r\n\tvirtual bool isSelected();\r\n\r\n\tvirtual void setSelected( const bool& selected );\r\n\r\n\tvirtual ulong32 getImageIndex() {\r\n\t\treturn m_imageIndex;\r\n\t}\r\n\r\n\tvirtual void setImageIndex( const ulong32& imageIndex );\r\n\r\n\tvirtual Rect* getBounds() {\r\n\t\treturn &m_bounds;\r\n\t}\r\n\r\n\tvirtual Control* getControl() {\r\n\t\treturn m_owningControl;\r\n\t}\r\n\r\n\r\n\tvirtual void setControl( Control* control ) {\r\n\t\tm_owningControl = control;\r\n\t}\r\n\r\n\tvirtual bool canPaint() {\r\n\t\treturn false;\t\r\n\t}\r\nprivate:\r\n\tImage* m_image;\r\n\tControl* m_owningControl;\r\n\tString m_caption;\r\n\tvoid* m_data;\r\n\tunsigned long m_index;\r\n\tRect m_bounds;\r\n\tModel* m_model;\r\n\tbool m_selected;\r\n\tulong32 m_imageIndex;\r\n};\r\n\r\n};\r\n\r\n#endif //DEFAULTLISTITEM_H\r\n"}
311
c
#include "Queue.h" queue_t * create_queue(uint32_t capacity){ queue_t * queue = (queue_t *)malloc(sizeof(queue_t)); if(queue == NULL){ return NULL; } queue -> capacity = capacity; queue -> front_index = 0; queue -> back_index = queue -> capacity - 1; queue -> size = 0; queue -> data = (queue_data_type_t *)malloc(capacity * sizeof(queue_data_type_t)); if(queue -> data == NULL){ return NULL; } return queue; } void *free_queue(queue_t * queue){ if(queue != NULL){ queue = NULL; if (queue ->data != NULL){ queue -> data = NULL; } } return NULL; } bool isEmpty(queue_t * queue){ return queue -> size == 0; } bool isFull(queue_t * queue){ return (queue -> size == queue -> capacity); } queue_data_type_t push(queue_t * queue, queue_data_type_t value){ if(isFull(queue) == false){ //Mapping the back index to the real place in memory. queue -> back_index = (queue -> back_index + 1u) % queue -> capacity; queue -> data[queue -> back_index] = value; queue -> size ++; }else{ return NOVALUE; } return value; } queue_data_type_t pop(queue_t * queue){ if(isEmpty(queue) == true){ printf("Queue is now empty.\n"); return NOVALUE; } //Mapping the back index to the real place in memory. queue -> front_index = (queue -> front_index + 1u) % queue -> capacity; queue_data_type_t temp = queue -> data[queue -> front_index]; queue -> size --; return temp; } queue_data_type_t front(queue_t * queue){ if(isEmpty(queue) == true){ return NOVALUE; } return queue -> data[queue -> front_index]; } queue_data_type_t back(queue_t * queue){ if(isEmpty(queue) == true){ return NOVALUE; } return queue -> data[queue -> back_index]; } void print_queue(queue_t * queue){ if(queue == NULL){ return NULL; } for(uint32_t i = 0; i < queue -> size; i++){ uint32_t index = (i + queue -> front_index) % queue -> capacity; printf("INDEX: %d: %f\n", i, queue -> data[index]); } printf("\n"); }
27.79
75
(translation_unit) "#include "Queue.h"\n\nqueue_t * create_queue(uint32_t capacity){\n\n queue_t * queue = (queue_t *)malloc(sizeof(queue_t));\n\n if(queue == NULL){\n return NULL;\n }\n\n queue -> capacity = capacity;\n queue -> front_index = 0;\n queue -> back_index = queue -> capacity - 1;\n queue -> size = 0;\n queue -> data = (queue_data_type_t *)malloc(capacity * sizeof(queue_data_type_t));\n\n if(queue -> data == NULL){\n return NULL;\n }\n return queue;\n}\n\nvoid *free_queue(queue_t * queue){\n\n if(queue != NULL){\n queue = NULL;\n if (queue ->data != NULL){\n queue -> data = NULL;\n }\n }\n\n return NULL;\n}\n\nbool isEmpty(queue_t * queue){\n return queue -> size == 0;\n}\n\nbool isFull(queue_t * queue){\n return (queue -> size == queue -> capacity);\n}\n\nqueue_data_type_t push(queue_t * queue, queue_data_type_t value){\n\n if(isFull(queue) == false){\n\n //Mapping the back index to the real place in memory.\n queue -> back_index = (queue -> back_index + 1u) % queue -> capacity;\n queue -> data[queue -> back_index] = value;\n queue -> size ++;\n }else{\n return NOVALUE;\n }\n\n return value;\n}\n\nqueue_data_type_t pop(queue_t * queue){\n\n if(isEmpty(queue) == true){\n printf("Queue is now empty.\n");\n return NOVALUE;\n }\n\n //Mapping the back index to the real place in memory.\n\n queue -> front_index = (queue -> front_index + 1u) % queue -> capacity;\n queue_data_type_t temp = queue -> data[queue -> front_index];\n queue -> size --;\n\n return temp;\n}\n\nqueue_data_type_t front(queue_t * queue){\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n }\n\n return queue -> data[queue -> front_index];\n}\n\nqueue_data_type_t back(queue_t * queue){\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n }\n\n return queue -> data[queue -> back_index];\n}\n\nvoid print_queue(queue_t * queue){\n\n if(queue == NULL){\n return NULL;\n }\n\n for(uint32_t i = 0; i < queue -> size; i++){\n\n uint32_t index = (i + queue -> front_index) % queue -> capacity;\n printf("INDEX: %d: %f\n", i, queue -> data[index]);\n }\n\n printf("\n");\n}\n" (preproc_include) "#include "Queue.h"\n" (#include) "#include" (string_literal) ""Queue.h"" (") """ (string_content) "Queue.h" (") """ (function_definition) "queue_t * create_queue(uint32_t capacity){\n\n queue_t * queue = (queue_t *)malloc(sizeof(queue_t));\n\n if(queue == NULL){\n return NULL;\n }\n\n queue -> capacity = capacity;\n queue -> front_index = 0;\n queue -> back_index = queue -> capacity - 1;\n queue -> size = 0;\n queue -> data = (queue_data_type_t *)malloc(capacity * sizeof(queue_data_type_t));\n\n if(queue -> data == NULL){\n return NULL;\n }\n return queue;\n}" (type_identifier) "queue_t" (pointer_declarator) "* create_queue(uint32_t capacity)" (*) "*" (function_declarator) "create_queue(uint32_t capacity)" (identifier) "create_queue" (parameter_list) "(uint32_t capacity)" (() "(" (parameter_declaration) "uint32_t capacity" (primitive_type) "uint32_t" (identifier) "capacity" ()) ")" (compound_statement) "{\n\n queue_t * queue = (queue_t *)malloc(sizeof(queue_t));\n\n if(queue == NULL){\n return NULL;\n }\n\n queue -> capacity = capacity;\n queue -> front_index = 0;\n queue -> back_index = queue -> capacity - 1;\n queue -> size = 0;\n queue -> data = (queue_data_type_t *)malloc(capacity * sizeof(queue_data_type_t));\n\n if(queue -> data == NULL){\n return NULL;\n }\n return queue;\n}" ({) "{" (declaration) "queue_t * queue = (queue_t *)malloc(sizeof(queue_t));" (type_identifier) "queue_t" (init_declarator) "* queue = (queue_t *)malloc(sizeof(queue_t))" (pointer_declarator) "* queue" (*) "*" (identifier) "queue" (=) "=" (cast_expression) "(queue_t *)malloc(sizeof(queue_t))" (() "(" (type_descriptor) "queue_t *" (type_identifier) "queue_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(sizeof(queue_t))" (identifier) "malloc" (argument_list) "(sizeof(queue_t))" (() "(" (sizeof_expression) "sizeof(queue_t)" (sizeof) "sizeof" (parenthesized_expression) "(queue_t)" (() "(" (identifier) "queue_t" ()) ")" ()) ")" (;) ";" (if_statement) "if(queue == NULL){\n return NULL;\n }" (if) "if" (parenthesized_expression) "(queue == NULL)" (() "(" (binary_expression) "queue == NULL" (identifier) "queue" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n return NULL;\n }" ({) "{" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "queue -> capacity = capacity;" (assignment_expression) "queue -> capacity = capacity" (field_expression) "queue -> capacity" (identifier) "queue" (->) "->" (field_identifier) "capacity" (=) "=" (identifier) "capacity" (;) ";" (expression_statement) "queue -> front_index = 0;" (assignment_expression) "queue -> front_index = 0" (field_expression) "queue -> front_index" (identifier) "queue" (->) "->" (field_identifier) "front_index" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "queue -> back_index = queue -> capacity - 1;" (assignment_expression) "queue -> back_index = queue -> capacity - 1" (field_expression) "queue -> back_index" (identifier) "queue" (->) "->" (field_identifier) "back_index" (=) "=" (binary_expression) "queue -> capacity - 1" (field_expression) "queue -> capacity" (identifier) "queue" (->) "->" (field_identifier) "capacity" (-) "-" (number_literal) "1" (;) ";" (expression_statement) "queue -> size = 0;" (assignment_expression) "queue -> size = 0" (field_expression) "queue -> size" (identifier) "queue" (->) "->" (field_identifier) "size" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "queue -> data = (queue_data_type_t *)malloc(capacity * sizeof(queue_data_type_t));" (assignment_expression) "queue -> data = (queue_data_type_t *)malloc(capacity * sizeof(queue_data_type_t))" (field_expression) "queue -> data" (identifier) "queue" (->) "->" (field_identifier) "data" (=) "=" (cast_expression) "(queue_data_type_t *)malloc(capacity * sizeof(queue_data_type_t))" (() "(" (type_descriptor) "queue_data_type_t *" (type_identifier) "queue_data_type_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(capacity * sizeof(queue_data_type_t))" (identifier) "malloc" (argument_list) "(capacity * sizeof(queue_data_type_t))" (() "(" (binary_expression) "capacity * sizeof(queue_data_type_t)" (identifier) "capacity" (*) "*" (sizeof_expression) "sizeof(queue_data_type_t)" (sizeof) "sizeof" (parenthesized_expression) "(queue_data_type_t)" (() "(" (identifier) "queue_data_type_t" ()) ")" ()) ")" (;) ";" (if_statement) "if(queue -> data == NULL){\n return NULL;\n }" (if) "if" (parenthesized_expression) "(queue -> data == NULL)" (() "(" (binary_expression) "queue -> data == NULL" (field_expression) "queue -> data" (identifier) "queue" (->) "->" (field_identifier) "data" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n return NULL;\n }" ({) "{" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (return_statement) "return queue;" (return) "return" (identifier) "queue" (;) ";" (}) "}" (function_definition) "void *free_queue(queue_t * queue){\n\n if(queue != NULL){\n queue = NULL;\n if (queue ->data != NULL){\n queue -> data = NULL;\n }\n }\n\n return NULL;\n}" (primitive_type) "void" (pointer_declarator) "*free_queue(queue_t * queue)" (*) "*" (function_declarator) "free_queue(queue_t * queue)" (identifier) "free_queue" (parameter_list) "(queue_t * queue)" (() "(" (parameter_declaration) "queue_t * queue" (type_identifier) "queue_t" (pointer_declarator) "* queue" (*) "*" (identifier) "queue" ()) ")" (compound_statement) "{\n\n if(queue != NULL){\n queue = NULL;\n if (queue ->data != NULL){\n queue -> data = NULL;\n }\n }\n\n return NULL;\n}" ({) "{" (if_statement) "if(queue != NULL){\n queue = NULL;\n if (queue ->data != NULL){\n queue -> data = NULL;\n }\n }" (if) "if" (parenthesized_expression) "(queue != NULL)" (() "(" (binary_expression) "queue != NULL" (identifier) "queue" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n queue = NULL;\n if (queue ->data != NULL){\n queue -> data = NULL;\n }\n }" ({) "{" (expression_statement) "queue = NULL;" (assignment_expression) "queue = NULL" (identifier) "queue" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (if_statement) "if (queue ->data != NULL){\n queue -> data = NULL;\n }" (if) "if" (parenthesized_expression) "(queue ->data != NULL)" (() "(" (binary_expression) "queue ->data != NULL" (field_expression) "queue ->data" (identifier) "queue" (->) "->" (field_identifier) "data" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n queue -> data = NULL;\n }" ({) "{" (expression_statement) "queue -> data = NULL;" (assignment_expression) "queue -> data = NULL" (field_expression) "queue -> data" (identifier) "queue" (->) "->" (field_identifier) "data" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (}) "}" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (function_definition) "bool isEmpty(queue_t * queue){\n return queue -> size == 0;\n}" (primitive_type) "bool" (function_declarator) "isEmpty(queue_t * queue)" (identifier) "isEmpty" (parameter_list) "(queue_t * queue)" (() "(" (parameter_declaration) "queue_t * queue" (type_identifier) "queue_t" (pointer_declarator) "* queue" (*) "*" (identifier) "queue" ()) ")" (compound_statement) "{\n return queue -> size == 0;\n}" ({) "{" (return_statement) "return queue -> size == 0;" (return) "return" (binary_expression) "queue -> size == 0" (field_expression) "queue -> size" (identifier) "queue" (->) "->" (field_identifier) "size" (==) "==" (number_literal) "0" (;) ";" (}) "}" (function_definition) "bool isFull(queue_t * queue){\n return (queue -> size == queue -> capacity);\n}" (primitive_type) "bool" (function_declarator) "isFull(queue_t * queue)" (identifier) "isFull" (parameter_list) "(queue_t * queue)" (() "(" (parameter_declaration) "queue_t * queue" (type_identifier) "queue_t" (pointer_declarator) "* queue" (*) "*" (identifier) "queue" ()) ")" (compound_statement) "{\n return (queue -> size == queue -> capacity);\n}" ({) "{" (return_statement) "return (queue -> size == queue -> capacity);" (return) "return" (parenthesized_expression) "(queue -> size == queue -> capacity)" (() "(" (binary_expression) "queue -> size == queue -> capacity" (field_expression) "queue -> size" (identifier) "queue" (->) "->" (field_identifier) "size" (==) "==" (field_expression) "queue -> capacity" (identifier) "queue" (->) "->" (field_identifier) "capacity" ()) ")" (;) ";" (}) "}" (function_definition) "queue_data_type_t push(queue_t * queue, queue_data_type_t value){\n\n if(isFull(queue) == false){\n\n //Mapping the back index to the real place in memory.\n queue -> back_index = (queue -> back_index + 1u) % queue -> capacity;\n queue -> data[queue -> back_index] = value;\n queue -> size ++;\n }else{\n return NOVALUE;\n }\n\n return value;\n}" (type_identifier) "queue_data_type_t" (function_declarator) "push(queue_t * queue, queue_data_type_t value)" (identifier) "push" (parameter_list) "(queue_t * queue, queue_data_type_t value)" (() "(" (parameter_declaration) "queue_t * queue" (type_identifier) "queue_t" (pointer_declarator) "* queue" (*) "*" (identifier) "queue" (,) "," (parameter_declaration) "queue_data_type_t value" (type_identifier) "queue_data_type_t" (identifier) "value" ()) ")" (compound_statement) "{\n\n if(isFull(queue) == false){\n\n //Mapping the back index to the real place in memory.\n queue -> back_index = (queue -> back_index + 1u) % queue -> capacity;\n queue -> data[queue -> back_index] = value;\n queue -> size ++;\n }else{\n return NOVALUE;\n }\n\n return value;\n}" ({) "{" (if_statement) "if(isFull(queue) == false){\n\n //Mapping the back index to the real place in memory.\n queue -> back_index = (queue -> back_index + 1u) % queue -> capacity;\n queue -> data[queue -> back_index] = value;\n queue -> size ++;\n }else{\n return NOVALUE;\n }" (if) "if" (parenthesized_expression) "(isFull(queue) == false)" (() "(" (binary_expression) "isFull(queue) == false" (call_expression) "isFull(queue)" (identifier) "isFull" (argument_list) "(queue)" (() "(" (identifier) "queue" ()) ")" (==) "==" (false) "false" ()) ")" (compound_statement) "{\n\n //Mapping the back index to the real place in memory.\n queue -> back_index = (queue -> back_index + 1u) % queue -> capacity;\n queue -> data[queue -> back_index] = value;\n queue -> size ++;\n }" ({) "{" (comment) "//Mapping the back index to the real place in memory." (expression_statement) "queue -> back_index = (queue -> back_index + 1u) % queue -> capacity;" (assignment_expression) "queue -> back_index = (queue -> back_index + 1u) % queue -> capacity" (field_expression) "queue -> back_index" (identifier) "queue" (->) "->" (field_identifier) "back_index" (=) "=" (binary_expression) "(queue -> back_index + 1u) % queue -> capacity" (parenthesized_expression) "(queue -> back_index + 1u)" (() "(" (binary_expression) "queue -> back_index + 1u" (field_expression) "queue -> back_index" (identifier) "queue" (->) "->" (field_identifier) "back_index" (+) "+" (number_literal) "1u" ()) ")" (%) "%" (field_expression) "queue -> capacity" (identifier) "queue" (->) "->" (field_identifier) "capacity" (;) ";" (expression_statement) "queue -> data[queue -> back_index] = value;" (assignment_expression) "queue -> data[queue -> back_index] = value" (subscript_expression) "queue -> data[queue -> back_index]" (field_expression) "queue -> data" (identifier) "queue" (->) "->" (field_identifier) "data" ([) "[" (field_expression) "queue -> back_index" (identifier) "queue" (->) "->" (field_identifier) "back_index" (]) "]" (=) "=" (identifier) "value" (;) ";" (expression_statement) "queue -> size ++;" (update_expression) "queue -> size ++" (field_expression) "queue -> size" (identifier) "queue" (->) "->" (field_identifier) "size" (++) "++" (;) ";" (}) "}" (else_clause) "else{\n return NOVALUE;\n }" (else) "else" (compound_statement) "{\n return NOVALUE;\n }" ({) "{" (return_statement) "return NOVALUE;" (return) "return" (identifier) "NOVALUE" (;) ";" (}) "}" (return_statement) "return value;" (return) "return" (identifier) "value" (;) ";" (}) "}" (function_definition) "queue_data_type_t pop(queue_t * queue){\n\n if(isEmpty(queue) == true){\n printf("Queue is now empty.\n");\n return NOVALUE;\n }\n\n //Mapping the back index to the real place in memory.\n\n queue -> front_index = (queue -> front_index + 1u) % queue -> capacity;\n queue_data_type_t temp = queue -> data[queue -> front_index];\n queue -> size --;\n\n return temp;\n}" (type_identifier) "queue_data_type_t" (function_declarator) "pop(queue_t * queue)" (identifier) "pop" (parameter_list) "(queue_t * queue)" (() "(" (parameter_declaration) "queue_t * queue" (type_identifier) "queue_t" (pointer_declarator) "* queue" (*) "*" (identifier) "queue" ()) ")" (compound_statement) "{\n\n if(isEmpty(queue) == true){\n printf("Queue is now empty.\n");\n return NOVALUE;\n }\n\n //Mapping the back index to the real place in memory.\n\n queue -> front_index = (queue -> front_index + 1u) % queue -> capacity;\n queue_data_type_t temp = queue -> data[queue -> front_index];\n queue -> size --;\n\n return temp;\n}" ({) "{" (if_statement) "if(isEmpty(queue) == true){\n printf("Queue is now empty.\n");\n return NOVALUE;\n }" (if) "if" (parenthesized_expression) "(isEmpty(queue) == true)" (() "(" (binary_expression) "isEmpty(queue) == true" (call_expression) "isEmpty(queue)" (identifier) "isEmpty" (argument_list) "(queue)" (() "(" (identifier) "queue" ()) ")" (==) "==" (true) "true" ()) ")" (compound_statement) "{\n printf("Queue is now empty.\n");\n return NOVALUE;\n }" ({) "{" (expression_statement) "printf("Queue is now empty.\n");" (call_expression) "printf("Queue is now empty.\n")" (identifier) "printf" (argument_list) "("Queue is now empty.\n")" (() "(" (string_literal) ""Queue is now empty.\n"" (") """ (string_content) "Queue is now empty." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return NOVALUE;" (return) "return" (identifier) "NOVALUE" (;) ";" (}) "}" (comment) "//Mapping the back index to the real place in memory." (expression_statement) "queue -> front_index = (queue -> front_index + 1u) % queue -> capacity;" (assignment_expression) "queue -> front_index = (queue -> front_index + 1u) % queue -> capacity" (field_expression) "queue -> front_index" (identifier) "queue" (->) "->" (field_identifier) "front_index" (=) "=" (binary_expression) "(queue -> front_index + 1u) % queue -> capacity" (parenthesized_expression) "(queue -> front_index + 1u)" (() "(" (binary_expression) "queue -> front_index + 1u" (field_expression) "queue -> front_index" (identifier) "queue" (->) "->" (field_identifier) "front_index" (+) "+" (number_literal) "1u" ()) ")" (%) "%" (field_expression) "queue -> capacity" (identifier) "queue" (->) "->" (field_identifier) "capacity" (;) ";" (declaration) "queue_data_type_t temp = queue -> data[queue -> front_index];" (type_identifier) "queue_data_type_t" (init_declarator) "temp = queue -> data[queue -> front_index]" (identifier) "temp" (=) "=" (subscript_expression) "queue -> data[queue -> front_index]" (field_expression) "queue -> data" (identifier) "queue" (->) "->" (field_identifier) "data" ([) "[" (field_expression) "queue -> front_index" (identifier) "queue" (->) "->" (field_identifier) "front_index" (]) "]" (;) ";" (expression_statement) "queue -> size --;" (update_expression) "queue -> size --" (field_expression) "queue -> size" (identifier) "queue" (->) "->" (field_identifier) "size" (--) "--" (;) ";" (return_statement) "return temp;" (return) "return" (identifier) "temp" (;) ";" (}) "}" (function_definition) "queue_data_type_t front(queue_t * queue){\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n }\n\n return queue -> data[queue -> front_index];\n}" (type_identifier) "queue_data_type_t" (function_declarator) "front(queue_t * queue)" (identifier) "front" (parameter_list) "(queue_t * queue)" (() "(" (parameter_declaration) "queue_t * queue" (type_identifier) "queue_t" (pointer_declarator) "* queue" (*) "*" (identifier) "queue" ()) ")" (compound_statement) "{\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n }\n\n return queue -> data[queue -> front_index];\n}" ({) "{" (if_statement) "if(isEmpty(queue) == true){\n return NOVALUE;\n }" (if) "if" (parenthesized_expression) "(isEmpty(queue) == true)" (() "(" (binary_expression) "isEmpty(queue) == true" (call_expression) "isEmpty(queue)" (identifier) "isEmpty" (argument_list) "(queue)" (() "(" (identifier) "queue" ()) ")" (==) "==" (true) "true" ()) ")" (compound_statement) "{\n return NOVALUE;\n }" ({) "{" (return_statement) "return NOVALUE;" (return) "return" (identifier) "NOVALUE" (;) ";" (}) "}" (return_statement) "return queue -> data[queue -> front_index];" (return) "return" (subscript_expression) "queue -> data[queue -> front_index]" (field_expression) "queue -> data" (identifier) "queue" (->) "->" (field_identifier) "data" ([) "[" (field_expression) "queue -> front_index" (identifier) "queue" (->) "->" (field_identifier) "front_index" (]) "]" (;) ";" (}) "}" (function_definition) "queue_data_type_t back(queue_t * queue){\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n }\n\n return queue -> data[queue -> back_index];\n}" (type_identifier) "queue_data_type_t" (function_declarator) "back(queue_t * queue)" (identifier) "back" (parameter_list) "(queue_t * queue)" (() "(" (parameter_declaration) "queue_t * queue" (type_identifier) "queue_t" (pointer_declarator) "* queue" (*) "*" (identifier) "queue" ()) ")" (compound_statement) "{\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n }\n\n return queue -> data[queue -> back_index];\n}" ({) "{" (if_statement) "if(isEmpty(queue) == true){\n return NOVALUE;\n }" (if) "if" (parenthesized_expression) "(isEmpty(queue) == true)" (() "(" (binary_expression) "isEmpty(queue) == true" (call_expression) "isEmpty(queue)" (identifier) "isEmpty" (argument_list) "(queue)" (() "(" (identifier) "queue" ()) ")" (==) "==" (true) "true" ()) ")" (compound_statement) "{\n return NOVALUE;\n }" ({) "{" (return_statement) "return NOVALUE;" (return) "return" (identifier) "NOVALUE" (;) ";" (}) "}" (return_statement) "return queue -> data[queue -> back_index];" (return) "return" (subscript_expression) "queue -> data[queue -> back_index]" (field_expression) "queue -> data" (identifier) "queue" (->) "->" (field_identifier) "data" ([) "[" (field_expression) "queue -> back_index" (identifier) "queue" (->) "->" (field_identifier) "back_index" (]) "]" (;) ";" (}) "}" (function_definition) "void print_queue(queue_t * queue){\n\n if(queue == NULL){\n return NULL;\n }\n\n for(uint32_t i = 0; i < queue -> size; i++){\n\n uint32_t index = (i + queue -> front_index) % queue -> capacity;\n printf("INDEX: %d: %f\n", i, queue -> data[index]);\n }\n\n printf("\n");\n}" (primitive_type) "void" (function_declarator) "print_queue(queue_t * queue)" (identifier) "print_queue" (parameter_list) "(queue_t * queue)" (() "(" (parameter_declaration) "queue_t * queue" (type_identifier) "queue_t" (pointer_declarator) "* queue" (*) "*" (identifier) "queue" ()) ")" (compound_statement) "{\n\n if(queue == NULL){\n return NULL;\n }\n\n for(uint32_t i = 0; i < queue -> size; i++){\n\n uint32_t index = (i + queue -> front_index) % queue -> capacity;\n printf("INDEX: %d: %f\n", i, queue -> data[index]);\n }\n\n printf("\n");\n}" ({) "{" (if_statement) "if(queue == NULL){\n return NULL;\n }" (if) "if" (parenthesized_expression) "(queue == NULL)" (() "(" (binary_expression) "queue == NULL" (identifier) "queue" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n return NULL;\n }" ({) "{" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (for_statement) "for(uint32_t i = 0; i < queue -> size; i++){\n\n uint32_t index = (i + queue -> front_index) % queue -> capacity;\n printf("INDEX: %d: %f\n", i, queue -> data[index]);\n }" (for) "for" (() "(" (declaration) "uint32_t i = 0;" (primitive_type) "uint32_t" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < queue -> size" (identifier) "i" (<) "<" (field_expression) "queue -> size" (identifier) "queue" (->) "->" (field_identifier) "size" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n\n uint32_t index = (i + queue -> front_index) % queue -> capacity;\n printf("INDEX: %d: %f\n", i, queue -> data[index]);\n }" ({) "{" (declaration) "uint32_t index = (i + queue -> front_index) % queue -> capacity;" (primitive_type) "uint32_t" (init_declarator) "index = (i + queue -> front_index) % queue -> capacity" (identifier) "index" (=) "=" (binary_expression) "(i + queue -> front_index) % queue -> capacity" (parenthesized_expression) "(i + queue -> front_index)" (() "(" (binary_expression) "i + queue -> front_index" (identifier) "i" (+) "+" (field_expression) "queue -> front_index" (identifier) "queue" (->) "->" (field_identifier) "front_index" ()) ")" (%) "%" (field_expression) "queue -> capacity" (identifier) "queue" (->) "->" (field_identifier) "capacity" (;) ";" (expression_statement) "printf("INDEX: %d: %f\n", i, queue -> data[index]);" (call_expression) "printf("INDEX: %d: %f\n", i, queue -> data[index])" (identifier) "printf" (argument_list) "("INDEX: %d: %f\n", i, queue -> data[index])" (() "(" (string_literal) ""INDEX: %d: %f\n"" (") """ (string_content) "INDEX: %d: %f" (escape_sequence) "\n" (") """ (,) "," (identifier) "i" (,) "," (subscript_expression) "queue -> data[index]" (field_expression) "queue -> data" (identifier) "queue" (->) "->" (field_identifier) "data" ([) "[" (identifier) "index" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}"
700
0
{"language": "c", "success": true, "metadata": {"lines": 75, "avg_line_length": 27.79, "nodes": 431, "errors": 0, "source_hash": "397957d591ab83d2391a34b599d1e784ecc3027378546c18c24684ec2104b64d", "categorized_nodes": 307}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"Queue.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": "\"Queue.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "function_definition", "text": "queue_t * create_queue(uint32_t capacity){\n\n queue_t * queue = (queue_t *)malloc(sizeof(queue_t));\n\n if(queue == NULL){\n return NULL;\n }\n\n queue -> capacity = capacity;\n queue -> front_index = 0;\n queue -> back_index = queue -> capacity - 1;\n queue -> size = 0;\n queue -> data = (queue_data_type_t *)malloc(capacity * sizeof(queue_data_type_t));\n\n if(queue -> data == NULL){\n return NULL;\n }\n return queue;\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 4, "type": "type_identifier", "text": "queue_t", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 5, "type": "pointer_declarator", "text": "* create_queue(uint32_t capacity)", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 41}}, {"id": 6, "type": "*", "text": "*", "parent": 5, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 9}}, {"id": 7, "type": "function_declarator", "text": "create_queue(uint32_t capacity)", "parent": 5, "children": [8, 9], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 2, "column": 41}}, {"id": 8, "type": "identifier", "text": "create_queue", "parent": 7, "children": [], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 2, "column": 22}}, {"id": 9, "type": "parameter_list", "text": "(uint32_t capacity)", "parent": 7, "children": [10], "start_point": {"row": 2, "column": 22}, "end_point": {"row": 2, "column": 41}}, {"id": 10, "type": "parameter_declaration", "text": "uint32_t capacity", "parent": 9, "children": [11, 12], "start_point": {"row": 2, "column": 23}, "end_point": {"row": 2, "column": 40}}, {"id": 11, "type": "primitive_type", "text": "uint32_t", "parent": 10, "children": [], "start_point": {"row": 2, "column": 23}, "end_point": {"row": 2, "column": 31}}, {"id": 12, "type": "identifier", "text": "capacity", "parent": 10, "children": [], "start_point": {"row": 2, "column": 32}, "end_point": {"row": 2, "column": 40}}, {"id": 13, "type": "declaration", "text": "queue_t * queue = (queue_t *)malloc(sizeof(queue_t));", "parent": 3, "children": [14, 15], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 57}}, {"id": 14, "type": "type_identifier", "text": "queue_t", "parent": 13, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 11}}, {"id": 15, "type": "init_declarator", "text": "* queue = (queue_t *)malloc(sizeof(queue_t))", "parent": 13, "children": [16, 19, 20], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 56}}, {"id": 16, "type": "pointer_declarator", "text": "* queue", "parent": 15, "children": [17, 18], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 19}}, {"id": 17, "type": "*", "text": "*", "parent": 16, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 13}}, {"id": 18, "type": "identifier", "text": "queue", "parent": 16, "children": [], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 19}}, {"id": 19, "type": "=", "text": "=", "parent": 15, "children": [], "start_point": {"row": 4, "column": 20}, "end_point": {"row": 4, "column": 21}}, {"id": 20, "type": "cast_expression", "text": "(queue_t *)malloc(sizeof(queue_t))", "parent": 15, "children": [21, 25], "start_point": {"row": 4, "column": 22}, "end_point": {"row": 4, "column": 56}}, {"id": 21, "type": "type_descriptor", "text": "queue_t *", "parent": 20, "children": [22, 23], "start_point": {"row": 4, "column": 23}, "end_point": {"row": 4, "column": 32}}, {"id": 22, "type": "type_identifier", "text": "queue_t", "parent": 21, "children": [], "start_point": {"row": 4, "column": 23}, "end_point": {"row": 4, "column": 30}}, {"id": 23, "type": "abstract_pointer_declarator", "text": "*", "parent": 21, "children": [24], "start_point": {"row": 4, "column": 31}, "end_point": {"row": 4, "column": 32}}, {"id": 24, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 4, "column": 31}, "end_point": {"row": 4, "column": 32}}, {"id": 25, "type": "call_expression", "text": "malloc(sizeof(queue_t))", "parent": 20, "children": [26, 27], "start_point": {"row": 4, "column": 33}, "end_point": {"row": 4, "column": 56}}, {"id": 26, "type": "identifier", "text": "malloc", "parent": 25, "children": [], "start_point": {"row": 4, "column": 33}, "end_point": {"row": 4, "column": 39}}, {"id": 27, "type": "argument_list", "text": "(sizeof(queue_t))", "parent": 25, "children": [28], "start_point": {"row": 4, "column": 39}, "end_point": {"row": 4, "column": 56}}, {"id": 28, "type": "sizeof_expression", "text": "sizeof(queue_t)", "parent": 27, "children": [29], "start_point": {"row": 4, "column": 40}, "end_point": {"row": 4, "column": 55}}, {"id": 29, "type": "parenthesized_expression", "text": "(queue_t)", "parent": 28, "children": [30], "start_point": {"row": 4, "column": 46}, "end_point": {"row": 4, "column": 55}}, {"id": 30, "type": "identifier", "text": "queue_t", "parent": 29, "children": [], "start_point": {"row": 4, "column": 47}, "end_point": {"row": 4, "column": 54}}, {"id": 31, "type": "if_statement", "text": "if(queue == NULL){\n return NULL;\n }", "parent": 3, "children": [32], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 8, "column": 5}}, {"id": 32, "type": "parenthesized_expression", "text": "(queue == NULL)", "parent": 31, "children": [33], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 21}}, {"id": 33, "type": "binary_expression", "text": "queue == NULL", "parent": 32, "children": [34, 35, 36], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 20}}, {"id": 34, "type": "identifier", "text": "queue", "parent": 33, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 12}}, {"id": 35, "type": "==", "text": "==", "parent": 33, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 15}}, {"id": 36, "type": "null", "text": "NULL", "parent": 33, "children": [37], "start_point": {"row": 6, "column": 16}, "end_point": {"row": 6, "column": 20}}, {"id": 37, "type": "NULL", "text": "NULL", "parent": 36, "children": [], "start_point": {"row": 6, "column": 16}, "end_point": {"row": 6, "column": 20}}, {"id": 38, "type": "return_statement", "text": "return NULL;", "parent": 31, "children": [39], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 20}}, {"id": 39, "type": "null", "text": "NULL", "parent": 38, "children": [40], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 19}}, {"id": 40, "type": "NULL", "text": "NULL", "parent": 39, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 19}}, {"id": 41, "type": "assignment_expression", "text": "queue -> capacity = capacity", "parent": 3, "children": [42, 45, 46], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 32}}, {"id": 42, "type": "field_expression", "text": "queue -> capacity", "parent": 41, "children": [43, 44], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 21}}, {"id": 43, "type": "identifier", "text": "queue", "parent": 42, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 9}}, {"id": 44, "type": "field_identifier", "text": "capacity", "parent": 42, "children": [], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 21}}, {"id": 45, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 23}}, {"id": 46, "type": "identifier", "text": "capacity", "parent": 41, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 32}}, {"id": 47, "type": "assignment_expression", "text": "queue -> front_index = 0", "parent": 3, "children": [48, 51, 52], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 28}}, {"id": 48, "type": "field_expression", "text": "queue -> front_index", "parent": 47, "children": [49, 50], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 24}}, {"id": 49, "type": "identifier", "text": "queue", "parent": 48, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 9}}, {"id": 50, "type": "field_identifier", "text": "front_index", "parent": 48, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 24}}, {"id": 51, "type": "=", "text": "=", "parent": 47, "children": [], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 26}}, {"id": 52, "type": "number_literal", "text": "0", "parent": 47, "children": [], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 28}}, {"id": 53, "type": "assignment_expression", "text": "queue -> back_index = queue -> capacity - 1", "parent": 3, "children": [54, 57, 58], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 47}}, {"id": 54, "type": "field_expression", "text": "queue -> back_index", "parent": 53, "children": [55, 56], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 23}}, {"id": 55, "type": "identifier", "text": "queue", "parent": 54, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 9}}, {"id": 56, "type": "field_identifier", "text": "back_index", "parent": 54, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 23}}, {"id": 57, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 25}}, {"id": 58, "type": "binary_expression", "text": "queue -> capacity - 1", "parent": 53, "children": [59, 62, 63], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 47}}, {"id": 59, "type": "field_expression", "text": "queue -> capacity", "parent": 58, "children": [60, 61], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 43}}, {"id": 60, "type": "identifier", "text": "queue", "parent": 59, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 31}}, {"id": 61, "type": "field_identifier", "text": "capacity", "parent": 59, "children": [], "start_point": {"row": 12, "column": 35}, "end_point": {"row": 12, "column": 43}}, {"id": 62, "type": "-", "text": "-", "parent": 58, "children": [], "start_point": {"row": 12, "column": 44}, "end_point": {"row": 12, "column": 45}}, {"id": 63, "type": "number_literal", "text": "1", "parent": 58, "children": [], "start_point": {"row": 12, "column": 46}, "end_point": {"row": 12, "column": 47}}, {"id": 64, "type": "assignment_expression", "text": "queue -> size = 0", "parent": 3, "children": [65, 68, 69], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 21}}, {"id": 65, "type": "field_expression", "text": "queue -> size", "parent": 64, "children": [66, 67], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 17}}, {"id": 66, "type": "identifier", "text": "queue", "parent": 65, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 9}}, {"id": 67, "type": "field_identifier", "text": "size", "parent": 65, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 17}}, {"id": 68, "type": "=", "text": "=", "parent": 64, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 19}}, {"id": 69, "type": "number_literal", "text": "0", "parent": 64, "children": [], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 21}}, {"id": 70, "type": "assignment_expression", "text": "queue -> data = (queue_data_type_t *)malloc(capacity * sizeof(queue_data_type_t))", "parent": 3, "children": [71, 74, 75], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 85}}, {"id": 71, "type": "field_expression", "text": "queue -> data", "parent": 70, "children": [72, 73], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 17}}, {"id": 72, "type": "identifier", "text": "queue", "parent": 71, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 9}}, {"id": 73, "type": "field_identifier", "text": "data", "parent": 71, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 17}}, {"id": 74, "type": "=", "text": "=", "parent": 70, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 19}}, {"id": 75, "type": "cast_expression", "text": "(queue_data_type_t *)malloc(capacity * sizeof(queue_data_type_t))", "parent": 70, "children": [76, 80], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 85}}, {"id": 76, "type": "type_descriptor", "text": "queue_data_type_t *", "parent": 75, "children": [77, 78], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 40}}, {"id": 77, "type": "type_identifier", "text": "queue_data_type_t", "parent": 76, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 38}}, {"id": 78, "type": "abstract_pointer_declarator", "text": "*", "parent": 76, "children": [79], "start_point": {"row": 14, "column": 39}, "end_point": {"row": 14, "column": 40}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 14, "column": 39}, "end_point": {"row": 14, "column": 40}}, {"id": 80, "type": "call_expression", "text": "malloc(capacity * sizeof(queue_data_type_t))", "parent": 75, "children": [81, 82], "start_point": {"row": 14, "column": 41}, "end_point": {"row": 14, "column": 85}}, {"id": 81, "type": "identifier", "text": "malloc", "parent": 80, "children": [], "start_point": {"row": 14, "column": 41}, "end_point": {"row": 14, "column": 47}}, {"id": 82, "type": "argument_list", "text": "(capacity * sizeof(queue_data_type_t))", "parent": 80, "children": [83], "start_point": {"row": 14, "column": 47}, "end_point": {"row": 14, "column": 85}}, {"id": 83, "type": "binary_expression", "text": "capacity * sizeof(queue_data_type_t)", "parent": 82, "children": [84, 85, 86], "start_point": {"row": 14, "column": 48}, "end_point": {"row": 14, "column": 84}}, {"id": 84, "type": "identifier", "text": "capacity", "parent": 83, "children": [], "start_point": {"row": 14, "column": 48}, "end_point": {"row": 14, "column": 56}}, {"id": 85, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 14, "column": 57}, "end_point": {"row": 14, "column": 58}}, {"id": 86, "type": "sizeof_expression", "text": "sizeof(queue_data_type_t)", "parent": 83, "children": [87], "start_point": {"row": 14, "column": 59}, "end_point": {"row": 14, "column": 84}}, {"id": 87, "type": "parenthesized_expression", "text": "(queue_data_type_t)", "parent": 86, "children": [88], "start_point": {"row": 14, "column": 65}, "end_point": {"row": 14, "column": 84}}, {"id": 88, "type": "identifier", "text": "queue_data_type_t", "parent": 87, "children": [], "start_point": {"row": 14, "column": 66}, "end_point": {"row": 14, "column": 83}}, {"id": 89, "type": "if_statement", "text": "if(queue -> data == NULL){\n return NULL;\n }", "parent": 3, "children": [90], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 18, "column": 5}}, {"id": 90, "type": "parenthesized_expression", "text": "(queue -> data == NULL)", "parent": 89, "children": [91], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 29}}, {"id": 91, "type": "binary_expression", "text": "queue -> data == NULL", "parent": 90, "children": [92, 95, 96], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 28}}, {"id": 92, "type": "field_expression", "text": "queue -> data", "parent": 91, "children": [93, 94], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 20}}, {"id": 93, "type": "identifier", "text": "queue", "parent": 92, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 12}}, {"id": 94, "type": "field_identifier", "text": "data", "parent": 92, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 20}}, {"id": 95, "type": "==", "text": "==", "parent": 91, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 23}}, {"id": 96, "type": "null", "text": "NULL", "parent": 91, "children": [97], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 28}}, {"id": 97, "type": "NULL", "text": "NULL", "parent": 96, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 28}}, {"id": 98, "type": "return_statement", "text": "return NULL;", "parent": 89, "children": [99], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 20}}, {"id": 99, "type": "null", "text": "NULL", "parent": 98, "children": [100], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 19}}, {"id": 100, "type": "NULL", "text": "NULL", "parent": 99, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 19}}, {"id": 101, "type": "return_statement", "text": "return queue;", "parent": 3, "children": [102], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 17}}, {"id": 102, "type": "identifier", "text": "queue", "parent": 101, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 16}}, {"id": 103, "type": "function_definition", "text": "void *free_queue(queue_t * queue){\n\n if(queue != NULL){\n queue = NULL;\n if (queue ->data != NULL){\n queue -> data = NULL;\n }\n }\n\n return NULL;\n}", "parent": null, "children": [104, 105], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 32, "column": 1}}, {"id": 104, "type": "primitive_type", "text": "void", "parent": 103, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 105, "type": "pointer_declarator", "text": "*free_queue(queue_t * queue)", "parent": 103, "children": [106, 107], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 33}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 6}}, {"id": 107, "type": "function_declarator", "text": "free_queue(queue_t * queue)", "parent": 105, "children": [108, 109], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 33}}, {"id": 108, "type": "identifier", "text": "free_queue", "parent": 107, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 16}}, {"id": 109, "type": "parameter_list", "text": "(queue_t * queue)", "parent": 107, "children": [110], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 33}}, {"id": 110, "type": "parameter_declaration", "text": "queue_t * queue", "parent": 109, "children": [111, 112], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 32}}, {"id": 111, "type": "type_identifier", "text": "queue_t", "parent": 110, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 24}}, {"id": 112, "type": "pointer_declarator", "text": "* queue", "parent": 110, "children": [113, 114], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 32}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 26}}, {"id": 114, "type": "identifier", "text": "queue", "parent": 112, "children": [], "start_point": {"row": 22, "column": 27}, "end_point": {"row": 22, "column": 32}}, {"id": 115, "type": "if_statement", "text": "if(queue != NULL){\n queue = NULL;\n if (queue ->data != NULL){\n queue -> data = NULL;\n }\n }", "parent": 103, "children": [116], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 29, "column": 5}}, {"id": 116, "type": "parenthesized_expression", "text": "(queue != NULL)", "parent": 115, "children": [117], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 21}}, {"id": 117, "type": "binary_expression", "text": "queue != NULL", "parent": 116, "children": [118, 119, 120], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 20}}, {"id": 118, "type": "identifier", "text": "queue", "parent": 117, "children": [], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 12}}, {"id": 119, "type": "!=", "text": "!=", "parent": 117, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 15}}, {"id": 120, "type": "null", "text": "NULL", "parent": 117, "children": [121], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 20}}, {"id": 121, "type": "NULL", "text": "NULL", "parent": 120, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 20}}, {"id": 122, "type": "assignment_expression", "text": "queue = NULL", "parent": 115, "children": [123, 124, 125], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 20}}, {"id": 123, "type": "identifier", "text": "queue", "parent": 122, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 13}}, {"id": 124, "type": "=", "text": "=", "parent": 122, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 15}}, {"id": 125, "type": "null", "text": "NULL", "parent": 122, "children": [126], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 20}}, {"id": 126, "type": "NULL", "text": "NULL", "parent": 125, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 20}}, {"id": 127, "type": "if_statement", "text": "if (queue ->data != NULL){\n queue -> data = NULL;\n }", "parent": 115, "children": [128], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 28, "column": 9}}, {"id": 128, "type": "parenthesized_expression", "text": "(queue ->data != NULL)", "parent": 127, "children": [129], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 33}}, {"id": 129, "type": "binary_expression", "text": "queue ->data != NULL", "parent": 128, "children": [130, 133, 134], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 32}}, {"id": 130, "type": "field_expression", "text": "queue ->data", "parent": 129, "children": [131, 132], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 24}}, {"id": 131, "type": "identifier", "text": "queue", "parent": 130, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 17}}, {"id": 132, "type": "field_identifier", "text": "data", "parent": 130, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 24}}, {"id": 133, "type": "!=", "text": "!=", "parent": 129, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 27}}, {"id": 134, "type": "null", "text": "NULL", "parent": 129, "children": [135], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 32}}, {"id": 135, "type": "NULL", "text": "NULL", "parent": 134, "children": [], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 32}}, {"id": 136, "type": "assignment_expression", "text": "queue -> data = NULL", "parent": 127, "children": [137, 140, 141], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 32}}, {"id": 137, "type": "field_expression", "text": "queue -> data", "parent": 136, "children": [138, 139], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 25}}, {"id": 138, "type": "identifier", "text": "queue", "parent": 137, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 17}}, {"id": 139, "type": "field_identifier", "text": "data", "parent": 137, "children": [], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 25}}, {"id": 140, "type": "=", "text": "=", "parent": 136, "children": [], "start_point": {"row": 27, "column": 26}, "end_point": {"row": 27, "column": 27}}, {"id": 141, "type": "null", "text": "NULL", "parent": 136, "children": [142], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 32}}, {"id": 142, "type": "NULL", "text": "NULL", "parent": 141, "children": [], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 32}}, {"id": 143, "type": "return_statement", "text": "return NULL;", "parent": 103, "children": [144], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 16}}, {"id": 144, "type": "null", "text": "NULL", "parent": 143, "children": [145], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 15}}, {"id": 145, "type": "NULL", "text": "NULL", "parent": 144, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 15}}, {"id": 146, "type": "function_definition", "text": "bool isEmpty(queue_t * queue){\n return queue -> size == 0;\n}", "parent": null, "children": [147, 148], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 147, "type": "primitive_type", "text": "bool", "parent": 146, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 4}}, {"id": 148, "type": "function_declarator", "text": "isEmpty(queue_t * queue)", "parent": 146, "children": [149, 150], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 29}}, {"id": 149, "type": "identifier", "text": "isEmpty", "parent": 148, "children": [], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 12}}, {"id": 150, "type": "parameter_list", "text": "(queue_t * queue)", "parent": 148, "children": [151], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 29}}, {"id": 151, "type": "parameter_declaration", "text": "queue_t * queue", "parent": 150, "children": [152, 153], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 28}}, {"id": 152, "type": "type_identifier", "text": "queue_t", "parent": 151, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 20}}, {"id": 153, "type": "pointer_declarator", "text": "* queue", "parent": 151, "children": [154, 155], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 28}}, {"id": 154, "type": "*", "text": "*", "parent": 153, "children": [], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 22}}, {"id": 155, "type": "identifier", "text": "queue", "parent": 153, "children": [], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 28}}, {"id": 156, "type": "return_statement", "text": "return queue -> size == 0;", "parent": 146, "children": [157], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 30}}, {"id": 157, "type": "binary_expression", "text": "queue -> size == 0", "parent": 156, "children": [158, 161, 162], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 29}}, {"id": 158, "type": "field_expression", "text": "queue -> size", "parent": 157, "children": [159, 160], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 24}}, {"id": 159, "type": "identifier", "text": "queue", "parent": 158, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 16}}, {"id": 160, "type": "field_identifier", "text": "size", "parent": 158, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 24}}, {"id": 161, "type": "==", "text": "==", "parent": 157, "children": [], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 27}}, {"id": 162, "type": "number_literal", "text": "0", "parent": 157, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 29}}, {"id": 163, "type": "function_definition", "text": "bool isFull(queue_t * queue){\n return (queue -> size == queue -> capacity);\n}", "parent": null, "children": [164, 165], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 164, "type": "primitive_type", "text": "bool", "parent": 163, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 4}}, {"id": 165, "type": "function_declarator", "text": "isFull(queue_t * queue)", "parent": 163, "children": [166, 167], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 28}}, {"id": 166, "type": "identifier", "text": "isFull", "parent": 165, "children": [], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 11}}, {"id": 167, "type": "parameter_list", "text": "(queue_t * queue)", "parent": 165, "children": [168], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 28}}, {"id": 168, "type": "parameter_declaration", "text": "queue_t * queue", "parent": 167, "children": [169, 170], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 27}}, {"id": 169, "type": "type_identifier", "text": "queue_t", "parent": 168, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 19}}, {"id": 170, "type": "pointer_declarator", "text": "* queue", "parent": 168, "children": [171, 172], "start_point": {"row": 38, "column": 20}, "end_point": {"row": 38, "column": 27}}, {"id": 171, "type": "*", "text": "*", "parent": 170, "children": [], "start_point": {"row": 38, "column": 20}, "end_point": {"row": 38, "column": 21}}, {"id": 172, "type": "identifier", "text": "queue", "parent": 170, "children": [], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 27}}, {"id": 173, "type": "return_statement", "text": "return (queue -> size == queue -> capacity);", "parent": 163, "children": [174], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 48}}, {"id": 174, "type": "parenthesized_expression", "text": "(queue -> size == queue -> capacity)", "parent": 173, "children": [175], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 47}}, {"id": 175, "type": "binary_expression", "text": "queue -> size == queue -> capacity", "parent": 174, "children": [176, 179, 180], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 46}}, {"id": 176, "type": "field_expression", "text": "queue -> size", "parent": 175, "children": [177, 178], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 25}}, {"id": 177, "type": "identifier", "text": "queue", "parent": 176, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 17}}, {"id": 178, "type": "field_identifier", "text": "size", "parent": 176, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 25}}, {"id": 179, "type": "==", "text": "==", "parent": 175, "children": [], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 28}}, {"id": 180, "type": "field_expression", "text": "queue -> capacity", "parent": 175, "children": [181, 182], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 46}}, {"id": 181, "type": "identifier", "text": "queue", "parent": 180, "children": [], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 34}}, {"id": 182, "type": "field_identifier", "text": "capacity", "parent": 180, "children": [], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 39, "column": 46}}, {"id": 183, "type": "function_definition", "text": "queue_data_type_t push(queue_t * queue, queue_data_type_t value){\n\n if(isFull(queue) == false){\n\n //Mapping the back index to the real place in memory.\n queue -> back_index = (queue -> back_index + 1u) % queue -> capacity;\n queue -> data[queue -> back_index] = value;\n queue -> size ++;\n }else{\n return NOVALUE;\n }\n\n return value;\n}", "parent": null, "children": [184, 185], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 184, "type": "type_identifier", "text": "queue_data_type_t", "parent": 183, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 17}}, {"id": 185, "type": "function_declarator", "text": "push(queue_t * queue, queue_data_type_t value)", "parent": 183, "children": [186, 187], "start_point": {"row": 42, "column": 18}, "end_point": {"row": 42, "column": 64}}, {"id": 186, "type": "identifier", "text": "push", "parent": 185, "children": [], "start_point": {"row": 42, "column": 18}, "end_point": {"row": 42, "column": 22}}, {"id": 187, "type": "parameter_list", "text": "(queue_t * queue, queue_data_type_t value)", "parent": 185, "children": [188, 193], "start_point": {"row": 42, "column": 22}, "end_point": {"row": 42, "column": 64}}, {"id": 188, "type": "parameter_declaration", "text": "queue_t * queue", "parent": 187, "children": [189, 190], "start_point": {"row": 42, "column": 23}, "end_point": {"row": 42, "column": 38}}, {"id": 189, "type": "type_identifier", "text": "queue_t", "parent": 188, "children": [], "start_point": {"row": 42, "column": 23}, "end_point": {"row": 42, "column": 30}}, {"id": 190, "type": "pointer_declarator", "text": "* queue", "parent": 188, "children": [191, 192], "start_point": {"row": 42, "column": 31}, "end_point": {"row": 42, "column": 38}}, {"id": 191, "type": "*", "text": "*", "parent": 190, "children": [], "start_point": {"row": 42, "column": 31}, "end_point": {"row": 42, "column": 32}}, {"id": 192, "type": "identifier", "text": "queue", "parent": 190, "children": [], "start_point": {"row": 42, "column": 33}, "end_point": {"row": 42, "column": 38}}, {"id": 193, "type": "parameter_declaration", "text": "queue_data_type_t value", "parent": 187, "children": [194, 195], "start_point": {"row": 42, "column": 40}, "end_point": {"row": 42, "column": 63}}, {"id": 194, "type": "type_identifier", "text": "queue_data_type_t", "parent": 193, "children": [], "start_point": {"row": 42, "column": 40}, "end_point": {"row": 42, "column": 57}}, {"id": 195, "type": "identifier", "text": "value", "parent": 193, "children": [], "start_point": {"row": 42, "column": 58}, "end_point": {"row": 42, "column": 63}}, {"id": 196, "type": "if_statement", "text": "if(isFull(queue) == false){\n\n //Mapping the back index to the real place in memory.\n queue -> back_index = (queue -> back_index + 1u) % queue -> capacity;\n queue -> data[queue -> back_index] = value;\n queue -> size ++;\n }else{\n return NOVALUE;\n }", "parent": 183, "children": [197, 237], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 52, "column": 5}}, {"id": 197, "type": "parenthesized_expression", "text": "(isFull(queue) == false)", "parent": 196, "children": [198], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 30}}, {"id": 198, "type": "binary_expression", "text": "isFull(queue) == false", "parent": 197, "children": [199, 203, 204], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 29}}, {"id": 199, "type": "call_expression", "text": "isFull(queue)", "parent": 198, "children": [200, 201], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 20}}, {"id": 200, "type": "identifier", "text": "isFull", "parent": 199, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 13}}, {"id": 201, "type": "argument_list", "text": "(queue)", "parent": 199, "children": [202], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 20}}, {"id": 202, "type": "identifier", "text": "queue", "parent": 201, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 19}}, {"id": 203, "type": "==", "text": "==", "parent": 198, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 23}}, {"id": 204, "type": "false", "text": "false", "parent": 198, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 29}}, {"id": 205, "type": "assignment_expression", "text": "queue -> back_index = (queue -> back_index + 1u) % queue -> capacity", "parent": 196, "children": [206, 209, 210], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 76}}, {"id": 206, "type": "field_expression", "text": "queue -> back_index", "parent": 205, "children": [207, 208], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 27}}, {"id": 207, "type": "identifier", "text": "queue", "parent": 206, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 13}}, {"id": 208, "type": "field_identifier", "text": "back_index", "parent": 206, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 27}}, {"id": 209, "type": "=", "text": "=", "parent": 205, "children": [], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 29}}, {"id": 210, "type": "binary_expression", "text": "(queue -> back_index + 1u) % queue -> capacity", "parent": 205, "children": [211, 218, 219], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 76}}, {"id": 211, "type": "parenthesized_expression", "text": "(queue -> back_index + 1u)", "parent": 210, "children": [212], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 56}}, {"id": 212, "type": "binary_expression", "text": "queue -> back_index + 1u", "parent": 211, "children": [213, 216, 217], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 55}}, {"id": 213, "type": "field_expression", "text": "queue -> back_index", "parent": 212, "children": [214, 215], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 50}}, {"id": 214, "type": "identifier", "text": "queue", "parent": 213, "children": [], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 36}}, {"id": 215, "type": "field_identifier", "text": "back_index", "parent": 213, "children": [], "start_point": {"row": 47, "column": 40}, "end_point": {"row": 47, "column": 50}}, {"id": 216, "type": "+", "text": "+", "parent": 212, "children": [], "start_point": {"row": 47, "column": 51}, "end_point": {"row": 47, "column": 52}}, {"id": 217, "type": "number_literal", "text": "1u", "parent": 212, "children": [], "start_point": {"row": 47, "column": 53}, "end_point": {"row": 47, "column": 55}}, {"id": 218, "type": "%", "text": "%", "parent": 210, "children": [], "start_point": {"row": 47, "column": 57}, "end_point": {"row": 47, "column": 58}}, {"id": 219, "type": "field_expression", "text": "queue -> capacity", "parent": 210, "children": [220, 221], "start_point": {"row": 47, "column": 59}, "end_point": {"row": 47, "column": 76}}, {"id": 220, "type": "identifier", "text": "queue", "parent": 219, "children": [], "start_point": {"row": 47, "column": 59}, "end_point": {"row": 47, "column": 64}}, {"id": 221, "type": "field_identifier", "text": "capacity", "parent": 219, "children": [], "start_point": {"row": 47, "column": 68}, "end_point": {"row": 47, "column": 76}}, {"id": 222, "type": "assignment_expression", "text": "queue -> data[queue -> back_index] = value", "parent": 196, "children": [223, 230, 231], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 50}}, {"id": 223, "type": "subscript_expression", "text": "queue -> data[queue -> back_index]", "parent": 222, "children": [224, 227], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 42}}, {"id": 224, "type": "field_expression", "text": "queue -> data", "parent": 223, "children": [225, 226], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 21}}, {"id": 225, "type": "identifier", "text": "queue", "parent": 224, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 13}}, {"id": 226, "type": "field_identifier", "text": "data", "parent": 224, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 21}}, {"id": 227, "type": "field_expression", "text": "queue -> back_index", "parent": 223, "children": [228, 229], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 41}}, {"id": 228, "type": "identifier", "text": "queue", "parent": 227, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 27}}, {"id": 229, "type": "field_identifier", "text": "back_index", "parent": 227, "children": [], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 41}}, {"id": 230, "type": "=", "text": "=", "parent": 222, "children": [], "start_point": {"row": 48, "column": 43}, "end_point": {"row": 48, "column": 44}}, {"id": 231, "type": "identifier", "text": "value", "parent": 222, "children": [], "start_point": {"row": 48, "column": 45}, "end_point": {"row": 48, "column": 50}}, {"id": 232, "type": "update_expression", "text": "queue -> size ++", "parent": 196, "children": [233, 236], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 24}}, {"id": 233, "type": "field_expression", "text": "queue -> size", "parent": 232, "children": [234, 235], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 21}}, {"id": 234, "type": "identifier", "text": "queue", "parent": 233, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 13}}, {"id": 235, "type": "field_identifier", "text": "size", "parent": 233, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 21}}, {"id": 236, "type": "++", "text": "++", "parent": 232, "children": [], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 24}}, {"id": 237, "type": "else_clause", "text": "else{\n return NOVALUE;\n }", "parent": 196, "children": [], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 52, "column": 5}}, {"id": 238, "type": "return_statement", "text": "return NOVALUE;", "parent": 237, "children": [239], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 23}}, {"id": 239, "type": "identifier", "text": "NOVALUE", "parent": 238, "children": [], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 22}}, {"id": 240, "type": "return_statement", "text": "return value;", "parent": 183, "children": [241], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 17}}, {"id": 241, "type": "identifier", "text": "value", "parent": 240, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 16}}, {"id": 242, "type": "function_definition", "text": "queue_data_type_t pop(queue_t * queue){\n\n if(isEmpty(queue) == true){\n printf(\"Queue is now empty.\\n\");\n return NOVALUE;\n }\n\n //Mapping the back index to the real place in memory.\n\n queue -> front_index = (queue -> front_index + 1u) % queue -> capacity;\n queue_data_type_t temp = queue -> data[queue -> front_index];\n queue -> size --;\n\n return temp;\n}", "parent": null, "children": [243, 244], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 71, "column": 1}}, {"id": 243, "type": "type_identifier", "text": "queue_data_type_t", "parent": 242, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 17}}, {"id": 244, "type": "function_declarator", "text": "pop(queue_t * queue)", "parent": 242, "children": [245, 246], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 38}}, {"id": 245, "type": "identifier", "text": "pop", "parent": 244, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 21}}, {"id": 246, "type": "parameter_list", "text": "(queue_t * queue)", "parent": 244, "children": [247], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 38}}, {"id": 247, "type": "parameter_declaration", "text": "queue_t * queue", "parent": 246, "children": [248, 249], "start_point": {"row": 57, "column": 22}, "end_point": {"row": 57, "column": 37}}, {"id": 248, "type": "type_identifier", "text": "queue_t", "parent": 247, "children": [], "start_point": {"row": 57, "column": 22}, "end_point": {"row": 57, "column": 29}}, {"id": 249, "type": "pointer_declarator", "text": "* queue", "parent": 247, "children": [250, 251], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 37}}, {"id": 250, "type": "*", "text": "*", "parent": 249, "children": [], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 31}}, {"id": 251, "type": "identifier", "text": "queue", "parent": 249, "children": [], "start_point": {"row": 57, "column": 32}, "end_point": {"row": 57, "column": 37}}, {"id": 252, "type": "if_statement", "text": "if(isEmpty(queue) == true){\n printf(\"Queue is now empty.\\n\");\n return NOVALUE;\n }", "parent": 242, "children": [253], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 62, "column": 5}}, {"id": 253, "type": "parenthesized_expression", "text": "(isEmpty(queue) == true)", "parent": 252, "children": [254], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 29}}, {"id": 254, "type": "binary_expression", "text": "isEmpty(queue) == true", "parent": 253, "children": [255, 259, 260], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 28}}, {"id": 255, "type": "call_expression", "text": "isEmpty(queue)", "parent": 254, "children": [256, 257], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 20}}, {"id": 256, "type": "identifier", "text": "isEmpty", "parent": 255, "children": [], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 13}}, {"id": 257, "type": "argument_list", "text": "(queue)", "parent": 255, "children": [258], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 20}}, {"id": 258, "type": "identifier", "text": "queue", "parent": 257, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 19}}, {"id": 259, "type": "==", "text": "==", "parent": 254, "children": [], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 23}}, {"id": 260, "type": "true", "text": "true", "parent": 254, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 28}}, {"id": 261, "type": "call_expression", "text": "printf(\"Queue is now empty.\\n\")", "parent": 252, "children": [262, 263], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 39}}, {"id": 262, "type": "identifier", "text": "printf", "parent": 261, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 14}}, {"id": 263, "type": "argument_list", "text": "(\"Queue is now empty.\\n\")", "parent": 261, "children": [264], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 39}}, {"id": 264, "type": "string_literal", "text": "\"Queue is now empty.\\n\"", "parent": 263, "children": [265], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 38}}, {"id": 265, "type": "escape_sequence", "text": "\\n", "parent": 264, "children": [], "start_point": {"row": 60, "column": 35}, "end_point": {"row": 60, "column": 37}}, {"id": 266, "type": "return_statement", "text": "return NOVALUE;", "parent": 252, "children": [267], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 23}}, {"id": 267, "type": "identifier", "text": "NOVALUE", "parent": 266, "children": [], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 22}}, {"id": 268, "type": "assignment_expression", "text": "queue -> front_index = (queue -> front_index + 1u) % queue -> capacity", "parent": 242, "children": [269, 272, 273], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 74}}, {"id": 269, "type": "field_expression", "text": "queue -> front_index", "parent": 268, "children": [270, 271], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 24}}, {"id": 270, "type": "identifier", "text": "queue", "parent": 269, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 9}}, {"id": 271, "type": "field_identifier", "text": "front_index", "parent": 269, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 24}}, {"id": 272, "type": "=", "text": "=", "parent": 268, "children": [], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 26}}, {"id": 273, "type": "binary_expression", "text": "(queue -> front_index + 1u) % queue -> capacity", "parent": 268, "children": [274, 281, 282], "start_point": {"row": 66, "column": 27}, "end_point": {"row": 66, "column": 74}}, {"id": 274, "type": "parenthesized_expression", "text": "(queue -> front_index + 1u)", "parent": 273, "children": [275], "start_point": {"row": 66, "column": 27}, "end_point": {"row": 66, "column": 54}}, {"id": 275, "type": "binary_expression", "text": "queue -> front_index + 1u", "parent": 274, "children": [276, 279, 280], "start_point": {"row": 66, "column": 28}, "end_point": {"row": 66, "column": 53}}, {"id": 276, "type": "field_expression", "text": "queue -> front_index", "parent": 275, "children": [277, 278], "start_point": {"row": 66, "column": 28}, "end_point": {"row": 66, "column": 48}}, {"id": 277, "type": "identifier", "text": "queue", "parent": 276, "children": [], "start_point": {"row": 66, "column": 28}, "end_point": {"row": 66, "column": 33}}, {"id": 278, "type": "field_identifier", "text": "front_index", "parent": 276, "children": [], "start_point": {"row": 66, "column": 37}, "end_point": {"row": 66, "column": 48}}, {"id": 279, "type": "+", "text": "+", "parent": 275, "children": [], "start_point": {"row": 66, "column": 49}, "end_point": {"row": 66, "column": 50}}, {"id": 280, "type": "number_literal", "text": "1u", "parent": 275, "children": [], "start_point": {"row": 66, "column": 51}, "end_point": {"row": 66, "column": 53}}, {"id": 281, "type": "%", "text": "%", "parent": 273, "children": [], "start_point": {"row": 66, "column": 55}, "end_point": {"row": 66, "column": 56}}, {"id": 282, "type": "field_expression", "text": "queue -> capacity", "parent": 273, "children": [283, 284], "start_point": {"row": 66, "column": 57}, "end_point": {"row": 66, "column": 74}}, {"id": 283, "type": "identifier", "text": "queue", "parent": 282, "children": [], "start_point": {"row": 66, "column": 57}, "end_point": {"row": 66, "column": 62}}, {"id": 284, "type": "field_identifier", "text": "capacity", "parent": 282, "children": [], "start_point": {"row": 66, "column": 66}, "end_point": {"row": 66, "column": 74}}, {"id": 285, "type": "declaration", "text": "queue_data_type_t temp = queue -> data[queue -> front_index];", "parent": 242, "children": [286, 287], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 65}}, {"id": 286, "type": "type_identifier", "text": "queue_data_type_t", "parent": 285, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 21}}, {"id": 287, "type": "init_declarator", "text": "temp = queue -> data[queue -> front_index]", "parent": 285, "children": [288, 289, 290], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 64}}, {"id": 288, "type": "identifier", "text": "temp", "parent": 287, "children": [], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 26}}, {"id": 289, "type": "=", "text": "=", "parent": 287, "children": [], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 28}}, {"id": 290, "type": "subscript_expression", "text": "queue -> data[queue -> front_index]", "parent": 287, "children": [291, 294], "start_point": {"row": 67, "column": 29}, "end_point": {"row": 67, "column": 64}}, {"id": 291, "type": "field_expression", "text": "queue -> data", "parent": 290, "children": [292, 293], "start_point": {"row": 67, "column": 29}, "end_point": {"row": 67, "column": 42}}, {"id": 292, "type": "identifier", "text": "queue", "parent": 291, "children": [], "start_point": {"row": 67, "column": 29}, "end_point": {"row": 67, "column": 34}}, {"id": 293, "type": "field_identifier", "text": "data", "parent": 291, "children": [], "start_point": {"row": 67, "column": 38}, "end_point": {"row": 67, "column": 42}}, {"id": 294, "type": "field_expression", "text": "queue -> front_index", "parent": 290, "children": [295, 296], "start_point": {"row": 67, "column": 43}, "end_point": {"row": 67, "column": 63}}, {"id": 295, "type": "identifier", "text": "queue", "parent": 294, "children": [], "start_point": {"row": 67, "column": 43}, "end_point": {"row": 67, "column": 48}}, {"id": 296, "type": "field_identifier", "text": "front_index", "parent": 294, "children": [], "start_point": {"row": 67, "column": 52}, "end_point": {"row": 67, "column": 63}}, {"id": 297, "type": "update_expression", "text": "queue -> size --", "parent": 242, "children": [298, 301], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 20}}, {"id": 298, "type": "field_expression", "text": "queue -> size", "parent": 297, "children": [299, 300], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 17}}, {"id": 299, "type": "identifier", "text": "queue", "parent": 298, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 9}}, {"id": 300, "type": "field_identifier", "text": "size", "parent": 298, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 17}}, {"id": 301, "type": "--", "text": "--", "parent": 297, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 20}}, {"id": 302, "type": "return_statement", "text": "return temp;", "parent": 242, "children": [303], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 16}}, {"id": 303, "type": "identifier", "text": "temp", "parent": 302, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 15}}, {"id": 304, "type": "function_definition", "text": "queue_data_type_t front(queue_t * queue){\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n }\n\n return queue -> data[queue -> front_index];\n}", "parent": null, "children": [305, 306], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 305, "type": "type_identifier", "text": "queue_data_type_t", "parent": 304, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 17}}, {"id": 306, "type": "function_declarator", "text": "front(queue_t * queue)", "parent": 304, "children": [307, 308], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 40}}, {"id": 307, "type": "identifier", "text": "front", "parent": 306, "children": [], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 23}}, {"id": 308, "type": "parameter_list", "text": "(queue_t * queue)", "parent": 306, "children": [309], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 40}}, {"id": 309, "type": "parameter_declaration", "text": "queue_t * queue", "parent": 308, "children": [310, 311], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 39}}, {"id": 310, "type": "type_identifier", "text": "queue_t", "parent": 309, "children": [], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 31}}, {"id": 311, "type": "pointer_declarator", "text": "* queue", "parent": 309, "children": [312, 313], "start_point": {"row": 73, "column": 32}, "end_point": {"row": 73, "column": 39}}, {"id": 312, "type": "*", "text": "*", "parent": 311, "children": [], "start_point": {"row": 73, "column": 32}, "end_point": {"row": 73, "column": 33}}, {"id": 313, "type": "identifier", "text": "queue", "parent": 311, "children": [], "start_point": {"row": 73, "column": 34}, "end_point": {"row": 73, "column": 39}}, {"id": 314, "type": "if_statement", "text": "if(isEmpty(queue) == true){\n return NOVALUE;\n }", "parent": 304, "children": [315], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 77, "column": 5}}, {"id": 315, "type": "parenthesized_expression", "text": "(isEmpty(queue) == true)", "parent": 314, "children": [316], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 30}}, {"id": 316, "type": "binary_expression", "text": "isEmpty(queue) == true", "parent": 315, "children": [317, 321, 322], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 29}}, {"id": 317, "type": "call_expression", "text": "isEmpty(queue)", "parent": 316, "children": [318, 319], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 21}}, {"id": 318, "type": "identifier", "text": "isEmpty", "parent": 317, "children": [], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 14}}, {"id": 319, "type": "argument_list", "text": "(queue)", "parent": 317, "children": [320], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 21}}, {"id": 320, "type": "identifier", "text": "queue", "parent": 319, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 20}}, {"id": 321, "type": "==", "text": "==", "parent": 316, "children": [], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 24}}, {"id": 322, "type": "true", "text": "true", "parent": 316, "children": [], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 29}}, {"id": 323, "type": "return_statement", "text": "return NOVALUE;", "parent": 314, "children": [324], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 23}}, {"id": 324, "type": "identifier", "text": "NOVALUE", "parent": 323, "children": [], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 22}}, {"id": 325, "type": "return_statement", "text": "return queue -> data[queue -> front_index];", "parent": 304, "children": [326], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 47}}, {"id": 326, "type": "subscript_expression", "text": "queue -> data[queue -> front_index]", "parent": 325, "children": [327, 330], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 46}}, {"id": 327, "type": "field_expression", "text": "queue -> data", "parent": 326, "children": [328, 329], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 24}}, {"id": 328, "type": "identifier", "text": "queue", "parent": 327, "children": [], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 16}}, {"id": 329, "type": "field_identifier", "text": "data", "parent": 327, "children": [], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 24}}, {"id": 330, "type": "field_expression", "text": "queue -> front_index", "parent": 326, "children": [331, 332], "start_point": {"row": 79, "column": 25}, "end_point": {"row": 79, "column": 45}}, {"id": 331, "type": "identifier", "text": "queue", "parent": 330, "children": [], "start_point": {"row": 79, "column": 25}, "end_point": {"row": 79, "column": 30}}, {"id": 332, "type": "field_identifier", "text": "front_index", "parent": 330, "children": [], "start_point": {"row": 79, "column": 34}, "end_point": {"row": 79, "column": 45}}, {"id": 333, "type": "function_definition", "text": "queue_data_type_t back(queue_t * queue){\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n }\n\n return queue -> data[queue -> back_index];\n}", "parent": null, "children": [334, 335], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 89, "column": 1}}, {"id": 334, "type": "type_identifier", "text": "queue_data_type_t", "parent": 333, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 17}}, {"id": 335, "type": "function_declarator", "text": "back(queue_t * queue)", "parent": 333, "children": [336, 337], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 39}}, {"id": 336, "type": "identifier", "text": "back", "parent": 335, "children": [], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 22}}, {"id": 337, "type": "parameter_list", "text": "(queue_t * queue)", "parent": 335, "children": [338], "start_point": {"row": 82, "column": 22}, "end_point": {"row": 82, "column": 39}}, {"id": 338, "type": "parameter_declaration", "text": "queue_t * queue", "parent": 337, "children": [339, 340], "start_point": {"row": 82, "column": 23}, "end_point": {"row": 82, "column": 38}}, {"id": 339, "type": "type_identifier", "text": "queue_t", "parent": 338, "children": [], "start_point": {"row": 82, "column": 23}, "end_point": {"row": 82, "column": 30}}, {"id": 340, "type": "pointer_declarator", "text": "* queue", "parent": 338, "children": [341, 342], "start_point": {"row": 82, "column": 31}, "end_point": {"row": 82, "column": 38}}, {"id": 341, "type": "*", "text": "*", "parent": 340, "children": [], "start_point": {"row": 82, "column": 31}, "end_point": {"row": 82, "column": 32}}, {"id": 342, "type": "identifier", "text": "queue", "parent": 340, "children": [], "start_point": {"row": 82, "column": 33}, "end_point": {"row": 82, "column": 38}}, {"id": 343, "type": "if_statement", "text": "if(isEmpty(queue) == true){\n return NOVALUE;\n }", "parent": 333, "children": [344], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 86, "column": 5}}, {"id": 344, "type": "parenthesized_expression", "text": "(isEmpty(queue) == true)", "parent": 343, "children": [345], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 30}}, {"id": 345, "type": "binary_expression", "text": "isEmpty(queue) == true", "parent": 344, "children": [346, 350, 351], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 84, "column": 29}}, {"id": 346, "type": "call_expression", "text": "isEmpty(queue)", "parent": 345, "children": [347, 348], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 84, "column": 21}}, {"id": 347, "type": "identifier", "text": "isEmpty", "parent": 346, "children": [], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 84, "column": 14}}, {"id": 348, "type": "argument_list", "text": "(queue)", "parent": 346, "children": [349], "start_point": {"row": 84, "column": 14}, "end_point": {"row": 84, "column": 21}}, {"id": 349, "type": "identifier", "text": "queue", "parent": 348, "children": [], "start_point": {"row": 84, "column": 15}, "end_point": {"row": 84, "column": 20}}, {"id": 350, "type": "==", "text": "==", "parent": 345, "children": [], "start_point": {"row": 84, "column": 22}, "end_point": {"row": 84, "column": 24}}, {"id": 351, "type": "true", "text": "true", "parent": 345, "children": [], "start_point": {"row": 84, "column": 25}, "end_point": {"row": 84, "column": 29}}, {"id": 352, "type": "return_statement", "text": "return NOVALUE;", "parent": 343, "children": [353], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 23}}, {"id": 353, "type": "identifier", "text": "NOVALUE", "parent": 352, "children": [], "start_point": {"row": 85, "column": 15}, "end_point": {"row": 85, "column": 22}}, {"id": 354, "type": "return_statement", "text": "return queue -> data[queue -> back_index];", "parent": 333, "children": [355], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 46}}, {"id": 355, "type": "subscript_expression", "text": "queue -> data[queue -> back_index]", "parent": 354, "children": [356, 359], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 45}}, {"id": 356, "type": "field_expression", "text": "queue -> data", "parent": 355, "children": [357, 358], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 24}}, {"id": 357, "type": "identifier", "text": "queue", "parent": 356, "children": [], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 16}}, {"id": 358, "type": "field_identifier", "text": "data", "parent": 356, "children": [], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 24}}, {"id": 359, "type": "field_expression", "text": "queue -> back_index", "parent": 355, "children": [360, 361], "start_point": {"row": 88, "column": 25}, "end_point": {"row": 88, "column": 44}}, {"id": 360, "type": "identifier", "text": "queue", "parent": 359, "children": [], "start_point": {"row": 88, "column": 25}, "end_point": {"row": 88, "column": 30}}, {"id": 361, "type": "field_identifier", "text": "back_index", "parent": 359, "children": [], "start_point": {"row": 88, "column": 34}, "end_point": {"row": 88, "column": 44}}, {"id": 362, "type": "function_definition", "text": "void print_queue(queue_t * queue){\n\n if(queue == NULL){\n return NULL;\n }\n\n for(uint32_t i = 0; i < queue -> size; i++){\n\n uint32_t index = (i + queue -> front_index) % queue -> capacity;\n printf(\"INDEX: %d: %f\\n\", i, queue -> data[index]);\n }\n\n printf(\"\\n\");\n}", "parent": null, "children": [363, 364], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 104, "column": 1}}, {"id": 363, "type": "primitive_type", "text": "void", "parent": 362, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 4}}, {"id": 364, "type": "function_declarator", "text": "print_queue(queue_t * queue)", "parent": 362, "children": [365, 366], "start_point": {"row": 91, "column": 5}, "end_point": {"row": 91, "column": 33}}, {"id": 365, "type": "identifier", "text": "print_queue", "parent": 364, "children": [], "start_point": {"row": 91, "column": 5}, "end_point": {"row": 91, "column": 16}}, {"id": 366, "type": "parameter_list", "text": "(queue_t * queue)", "parent": 364, "children": [367], "start_point": {"row": 91, "column": 16}, "end_point": {"row": 91, "column": 33}}, {"id": 367, "type": "parameter_declaration", "text": "queue_t * queue", "parent": 366, "children": [368, 369], "start_point": {"row": 91, "column": 17}, "end_point": {"row": 91, "column": 32}}, {"id": 368, "type": "type_identifier", "text": "queue_t", "parent": 367, "children": [], "start_point": {"row": 91, "column": 17}, "end_point": {"row": 91, "column": 24}}, {"id": 369, "type": "pointer_declarator", "text": "* queue", "parent": 367, "children": [370, 371], "start_point": {"row": 91, "column": 25}, "end_point": {"row": 91, "column": 32}}, {"id": 370, "type": "*", "text": "*", "parent": 369, "children": [], "start_point": {"row": 91, "column": 25}, "end_point": {"row": 91, "column": 26}}, {"id": 371, "type": "identifier", "text": "queue", "parent": 369, "children": [], "start_point": {"row": 91, "column": 27}, "end_point": {"row": 91, "column": 32}}, {"id": 372, "type": "if_statement", "text": "if(queue == NULL){\n return NULL;\n }", "parent": 362, "children": [373], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 95, "column": 5}}, {"id": 373, "type": "parenthesized_expression", "text": "(queue == NULL)", "parent": 372, "children": [374], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 21}}, {"id": 374, "type": "binary_expression", "text": "queue == NULL", "parent": 373, "children": [375, 376, 377], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 20}}, {"id": 375, "type": "identifier", "text": "queue", "parent": 374, "children": [], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 12}}, {"id": 376, "type": "==", "text": "==", "parent": 374, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 15}}, {"id": 377, "type": "null", "text": "NULL", "parent": 374, "children": [378], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 20}}, {"id": 378, "type": "NULL", "text": "NULL", "parent": 377, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 20}}, {"id": 379, "type": "return_statement", "text": "return NULL;", "parent": 372, "children": [380], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 20}}, {"id": 380, "type": "null", "text": "NULL", "parent": 379, "children": [381], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 19}}, {"id": 381, "type": "NULL", "text": "NULL", "parent": 380, "children": [], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 19}}, {"id": 382, "type": "for_statement", "text": "for(uint32_t i = 0; i < queue -> size; i++){\n\n uint32_t index = (i + queue -> front_index) % queue -> capacity;\n printf(\"INDEX: %d: %f\\n\", i, queue -> data[index]);\n }", "parent": 362, "children": [383, 389, 395], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 101, "column": 5}}, {"id": 383, "type": "declaration", "text": "uint32_t i = 0;", "parent": 382, "children": [384, 385], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 23}}, {"id": 384, "type": "primitive_type", "text": "uint32_t", "parent": 383, "children": [], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 16}}, {"id": 385, "type": "init_declarator", "text": "i = 0", "parent": 383, "children": [386, 387, 388], "start_point": {"row": 97, "column": 17}, "end_point": {"row": 97, "column": 22}}, {"id": 386, "type": "identifier", "text": "i", "parent": 385, "children": [], "start_point": {"row": 97, "column": 17}, "end_point": {"row": 97, "column": 18}}, {"id": 387, "type": "=", "text": "=", "parent": 385, "children": [], "start_point": {"row": 97, "column": 19}, "end_point": {"row": 97, "column": 20}}, {"id": 388, "type": "number_literal", "text": "0", "parent": 385, "children": [], "start_point": {"row": 97, "column": 21}, "end_point": {"row": 97, "column": 22}}, {"id": 389, "type": "binary_expression", "text": "i < queue -> size", "parent": 382, "children": [390, 391, 392], "start_point": {"row": 97, "column": 24}, "end_point": {"row": 97, "column": 41}}, {"id": 390, "type": "identifier", "text": "i", "parent": 389, "children": [], "start_point": {"row": 97, "column": 24}, "end_point": {"row": 97, "column": 25}}, {"id": 391, "type": "<", "text": "<", "parent": 389, "children": [], "start_point": {"row": 97, "column": 26}, "end_point": {"row": 97, "column": 27}}, {"id": 392, "type": "field_expression", "text": "queue -> size", "parent": 389, "children": [393, 394], "start_point": {"row": 97, "column": 28}, "end_point": {"row": 97, "column": 41}}, {"id": 393, "type": "identifier", "text": "queue", "parent": 392, "children": [], "start_point": {"row": 97, "column": 28}, "end_point": {"row": 97, "column": 33}}, {"id": 394, "type": "field_identifier", "text": "size", "parent": 392, "children": [], "start_point": {"row": 97, "column": 37}, "end_point": {"row": 97, "column": 41}}, {"id": 395, "type": "update_expression", "text": "i++", "parent": 382, "children": [396, 397], "start_point": {"row": 97, "column": 43}, "end_point": {"row": 97, "column": 46}}, {"id": 396, "type": "identifier", "text": "i", "parent": 395, "children": [], "start_point": {"row": 97, "column": 43}, "end_point": {"row": 97, "column": 44}}, {"id": 397, "type": "++", "text": "++", "parent": 395, "children": [], "start_point": {"row": 97, "column": 44}, "end_point": {"row": 97, "column": 46}}, {"id": 398, "type": "declaration", "text": "uint32_t index = (i + queue -> front_index) % queue -> capacity;", "parent": 382, "children": [399, 400], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 72}}, {"id": 399, "type": "primitive_type", "text": "uint32_t", "parent": 398, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 16}}, {"id": 400, "type": "init_declarator", "text": "index = (i + queue -> front_index) % queue -> capacity", "parent": 398, "children": [401, 402, 403], "start_point": {"row": 99, "column": 17}, "end_point": {"row": 99, "column": 71}}, {"id": 401, "type": "identifier", "text": "index", "parent": 400, "children": [], "start_point": {"row": 99, "column": 17}, "end_point": {"row": 99, "column": 22}}, {"id": 402, "type": "=", "text": "=", "parent": 400, "children": [], "start_point": {"row": 99, "column": 23}, "end_point": {"row": 99, "column": 24}}, {"id": 403, "type": "binary_expression", "text": "(i + queue -> front_index) % queue -> capacity", "parent": 400, "children": [404, 411, 412], "start_point": {"row": 99, "column": 25}, "end_point": {"row": 99, "column": 71}}, {"id": 404, "type": "parenthesized_expression", "text": "(i + queue -> front_index)", "parent": 403, "children": [405], "start_point": {"row": 99, "column": 25}, "end_point": {"row": 99, "column": 51}}, {"id": 405, "type": "binary_expression", "text": "i + queue -> front_index", "parent": 404, "children": [406, 407, 408], "start_point": {"row": 99, "column": 26}, "end_point": {"row": 99, "column": 50}}, {"id": 406, "type": "identifier", "text": "i", "parent": 405, "children": [], "start_point": {"row": 99, "column": 26}, "end_point": {"row": 99, "column": 27}}, {"id": 407, "type": "+", "text": "+", "parent": 405, "children": [], "start_point": {"row": 99, "column": 28}, "end_point": {"row": 99, "column": 29}}, {"id": 408, "type": "field_expression", "text": "queue -> front_index", "parent": 405, "children": [409, 410], "start_point": {"row": 99, "column": 30}, "end_point": {"row": 99, "column": 50}}, {"id": 409, "type": "identifier", "text": "queue", "parent": 408, "children": [], "start_point": {"row": 99, "column": 30}, "end_point": {"row": 99, "column": 35}}, {"id": 410, "type": "field_identifier", "text": "front_index", "parent": 408, "children": [], "start_point": {"row": 99, "column": 39}, "end_point": {"row": 99, "column": 50}}, {"id": 411, "type": "%", "text": "%", "parent": 403, "children": [], "start_point": {"row": 99, "column": 52}, "end_point": {"row": 99, "column": 53}}, {"id": 412, "type": "field_expression", "text": "queue -> capacity", "parent": 403, "children": [413, 414], "start_point": {"row": 99, "column": 54}, "end_point": {"row": 99, "column": 71}}, {"id": 413, "type": "identifier", "text": "queue", "parent": 412, "children": [], "start_point": {"row": 99, "column": 54}, "end_point": {"row": 99, "column": 59}}, {"id": 414, "type": "field_identifier", "text": "capacity", "parent": 412, "children": [], "start_point": {"row": 99, "column": 63}, "end_point": {"row": 99, "column": 71}}, {"id": 415, "type": "call_expression", "text": "printf(\"INDEX: %d: %f\\n\", i, queue -> data[index])", "parent": 382, "children": [416, 417], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 58}}, {"id": 416, "type": "identifier", "text": "printf", "parent": 415, "children": [], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 14}}, {"id": 417, "type": "argument_list", "text": "(\"INDEX: %d: %f\\n\", i, queue -> data[index])", "parent": 415, "children": [418, 420, 421], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 58}}, {"id": 418, "type": "string_literal", "text": "\"INDEX: %d: %f\\n\"", "parent": 417, "children": [419], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 32}}, {"id": 419, "type": "escape_sequence", "text": "\\n", "parent": 418, "children": [], "start_point": {"row": 100, "column": 29}, "end_point": {"row": 100, "column": 31}}, {"id": 420, "type": "identifier", "text": "i", "parent": 417, "children": [], "start_point": {"row": 100, "column": 34}, "end_point": {"row": 100, "column": 35}}, {"id": 421, "type": "subscript_expression", "text": "queue -> data[index]", "parent": 417, "children": [422, 425], "start_point": {"row": 100, "column": 37}, "end_point": {"row": 100, "column": 57}}, {"id": 422, "type": "field_expression", "text": "queue -> data", "parent": 421, "children": [423, 424], "start_point": {"row": 100, "column": 37}, "end_point": {"row": 100, "column": 50}}, {"id": 423, "type": "identifier", "text": "queue", "parent": 422, "children": [], "start_point": {"row": 100, "column": 37}, "end_point": {"row": 100, "column": 42}}, {"id": 424, "type": "field_identifier", "text": "data", "parent": 422, "children": [], "start_point": {"row": 100, "column": 46}, "end_point": {"row": 100, "column": 50}}, {"id": 425, "type": "identifier", "text": "index", "parent": 421, "children": [], "start_point": {"row": 100, "column": 51}, "end_point": {"row": 100, "column": 56}}, {"id": 426, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 362, "children": [427, 428], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 16}}, {"id": 427, "type": "identifier", "text": "printf", "parent": 426, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 10}}, {"id": 428, "type": "argument_list", "text": "(\"\\n\")", "parent": 426, "children": [429], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 16}}, {"id": 429, "type": "string_literal", "text": "\"\\n\"", "parent": 428, "children": [430], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 15}}, {"id": 430, "type": "escape_sequence", "text": "\\n", "parent": 429, "children": [], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 103, "column": 14}}]}, "node_categories": {"declarations": {"functions": [3, 7, 103, 107, 146, 148, 163, 165, 183, 185, 242, 244, 304, 306, 333, 335, 362, 364], "variables": [10, 13, 110, 151, 168, 188, 193, 247, 285, 309, 338, 367, 383, 398], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [20, 25, 28, 29, 32, 33, 42, 48, 54, 58, 59, 65, 71, 75, 80, 83, 86, 87, 90, 91, 92, 116, 117, 128, 129, 130, 137, 157, 158, 174, 175, 176, 180, 197, 198, 199, 206, 210, 211, 212, 213, 219, 223, 224, 227, 232, 233, 253, 254, 255, 261, 269, 273, 274, 275, 276, 282, 290, 291, 294, 297, 298, 315, 316, 317, 326, 327, 330, 344, 345, 346, 355, 356, 359, 373, 374, 389, 392, 395, 403, 404, 405, 408, 412, 415, 421, 422, 426], "assignments": [41, 47, 53, 64, 70, 122, 136, 205, 222, 268], "loops": [382], "conditionals": [4, 8, 12, 14, 18, 22, 26, 30, 31, 34, 43, 44, 46, 49, 50, 55, 56, 60, 61, 66, 67, 72, 73, 77, 81, 84, 88, 89, 93, 94, 102, 108, 111, 114, 115, 118, 123, 127, 131, 132, 138, 139, 149, 152, 155, 159, 160, 166, 169, 172, 177, 178, 181, 182, 184, 186, 189, 192, 194, 195, 196, 200, 202, 207, 208, 214, 215, 220, 221, 225, 226, 228, 229, 231, 234, 235, 239, 241, 243, 245, 248, 251, 252, 256, 258, 262, 267, 270, 271, 277, 278, 283, 284, 286, 288, 292, 293, 295, 296, 299, 300, 303, 305, 307, 310, 313, 314, 318, 320, 324, 328, 329, 331, 332, 334, 336, 339, 342, 343, 347, 349, 353, 357, 358, 360, 361, 365, 368, 371, 372, 375, 386, 390, 393, 394, 396, 401, 406, 409, 410, 413, 414, 416, 420, 423, 424, 425, 427], "returns": [38, 98, 101, 143, 156, 173, 238, 240, 266, 302, 323, 325, 352, 354, 379], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 52, 63, 69, 162, 217, 264, 280, 388, 418, 429], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "unknown", "text_snippet": "queue_t * create_queue(uint32_t capacity){\n\n queue_t * queue = (queue_t *)malloc(sizeof(queue_t))"}, {"node_id": 7, "universal_type": "function", "name": "unknown", "text_snippet": "create_queue(uint32_t capacity)"}, {"node_id": 103, "universal_type": "function", "name": "*free_queue", "text_snippet": "void *free_queue(queue_t * queue){\n\n if(queue != NULL){\n queue = NULL;\n if (queue -"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "free_queue(queue_t * queue)"}, {"node_id": 146, "universal_type": "function", "name": "isEmpty", "text_snippet": "bool isEmpty(queue_t * queue){\n return queue -> size == 0;\n}"}, {"node_id": 148, "universal_type": "function", "name": "unknown", "text_snippet": "isEmpty(queue_t * queue)"}, {"node_id": 163, "universal_type": "function", "name": "isFull", "text_snippet": "bool isFull(queue_t * queue){\n return (queue -> size == queue -> capacity);\n}"}, {"node_id": 165, "universal_type": "function", "name": "unknown", "text_snippet": "isFull(queue_t * queue)"}, {"node_id": 183, "universal_type": "function", "name": "unknown", "text_snippet": "queue_data_type_t push(queue_t * queue, queue_data_type_t value){\n\n if(isFull(queue) == false){\n\n"}, {"node_id": 185, "universal_type": "function", "name": "unknown", "text_snippet": "push(queue_t * queue, queue_data_type_t value)"}, {"node_id": 242, "universal_type": "function", "name": "unknown", "text_snippet": "queue_data_type_t pop(queue_t * queue){\n\n if(isEmpty(queue) == true){\n printf(\"Queue is now"}, {"node_id": 244, "universal_type": "function", "name": "unknown", "text_snippet": "pop(queue_t * queue)"}, {"node_id": 304, "universal_type": "function", "name": "unknown", "text_snippet": "queue_data_type_t front(queue_t * queue){\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n "}, {"node_id": 306, "universal_type": "function", "name": "unknown", "text_snippet": "front(queue_t * queue)"}, {"node_id": 333, "universal_type": "function", "name": "unknown", "text_snippet": "queue_data_type_t back(queue_t * queue){\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n "}, {"node_id": 335, "universal_type": "function", "name": "unknown", "text_snippet": "back(queue_t * queue)"}, {"node_id": 362, "universal_type": "function", "name": "print_queue", "text_snippet": "void print_queue(queue_t * queue){\n\n if(queue == NULL){\n return NULL;\n }\n\n for(uint3"}, {"node_id": 364, "universal_type": "function", "name": "unknown", "text_snippet": "print_queue(queue_t * queue)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"Queue.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include \"Queue.h\"\n\nqueue_t * create_queue(uint32_t capacity){\n\n queue_t * queue = (queue_t *)malloc(sizeof(queue_t));\n\n if(queue == NULL){\n return NULL;\n }\n\n queue -> capacity = capacity;\n queue -> front_index = 0;\n queue -> back_index = queue -> capacity - 1;\n queue -> size = 0;\n queue -> data = (queue_data_type_t *)malloc(capacity * sizeof(queue_data_type_t));\n\n if(queue -> data == NULL){\n return NULL;\n }\n return queue;\n}\n\nvoid *free_queue(queue_t * queue){\n\n if(queue != NULL){\n queue = NULL;\n if (queue ->data != NULL){\n queue -> data = NULL;\n }\n }\n\n return NULL;\n}\n\nbool isEmpty(queue_t * queue){\n return queue -> size == 0;\n}\n\nbool isFull(queue_t * queue){\n return (queue -> size == queue -> capacity);\n}\n\nqueue_data_type_t push(queue_t * queue, queue_data_type_t value){\n\n if(isFull(queue) == false){\n\n //Mapping the back index to the real place in memory.\n queue -> back_index = (queue -> back_index + 1u) % queue -> capacity;\n queue -> data[queue -> back_index] = value;\n queue -> size ++;\n }else{\n return NOVALUE;\n }\n\n return value;\n}\n\nqueue_data_type_t pop(queue_t * queue){\n\n if(isEmpty(queue) == true){\n printf(\"Queue is now empty.\\n\");\n return NOVALUE;\n }\n\n //Mapping the back index to the real place in memory.\n\n queue -> front_index = (queue -> front_index + 1u) % queue -> capacity;\n queue_data_type_t temp = queue -> data[queue -> front_index];\n queue -> size --;\n\n return temp;\n}\n\nqueue_data_type_t front(queue_t * queue){\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n }\n\n return queue -> data[queue -> front_index];\n}\n\nqueue_data_type_t back(queue_t * queue){\n\n if(isEmpty(queue) == true){\n return NOVALUE;\n }\n\n return queue -> data[queue -> back_index];\n}\n\nvoid print_queue(queue_t * queue){\n\n if(queue == NULL){\n return NULL;\n }\n\n for(uint32_t i = 0; i < queue -> size; i++){\n\n uint32_t index = (i + queue -> front_index) % queue -> capacity;\n printf(\"INDEX: %d: %f\\n\", i, queue -> data[index]);\n }\n\n printf(\"\\n\");\n}\n"}
312
c
#pragma once #ifdef __cplusplus extern "C" { #endif typedef unsigned (*checkRestart_t)(); typedef void (*reportSuccess_t)(mpz_t, unsigned); void rh_oneTimeInit(reportSuccess_t, checkRestart_t); void rh_search(mpz_t); #ifdef __cplusplus } #endif
21.27
11
(translation_unit) "#pragma once\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\ntypedef unsigned (*checkRestart_t)();\ntypedef void (*reportSuccess_t)(mpz_t, unsigned);\n\nvoid rh_oneTimeInit(reportSuccess_t, checkRestart_t);\nvoid rh_search(mpz_t);\n\n#ifdef __cplusplus\n}\n#endif\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_ifdef) "#ifdef __cplusplus\nextern "C" {\n#endif\n\ntypedef unsigned (*checkRestart_t)();\ntypedef void (*reportSuccess_t)(mpz_t, unsigned);\n\nvoid rh_oneTimeInit(reportSuccess_t, checkRestart_t);\nvoid rh_search(mpz_t);\n\n#ifdef __cplusplus\n}\n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (linkage_specification) "extern "C" {\n#endif\n\ntypedef unsigned (*checkRestart_t)();\ntypedef void (*reportSuccess_t)(mpz_t, unsigned);\n\nvoid rh_oneTimeInit(reportSuccess_t, checkRestart_t);\nvoid rh_search(mpz_t);\n\n#ifdef __cplusplus\n}" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ (declaration_list) "{\n#endif\n\ntypedef unsigned (*checkRestart_t)();\ntypedef void (*reportSuccess_t)(mpz_t, unsigned);\n\nvoid rh_oneTimeInit(reportSuccess_t, checkRestart_t);\nvoid rh_search(mpz_t);\n\n#ifdef __cplusplus\n}" ({) "{" (preproc_call) "#endif\n" (preproc_directive) "#endif" (type_definition) "typedef unsigned (*checkRestart_t)();" (typedef) "typedef" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "(*checkRestart_t)()" (parenthesized_declarator) "(*checkRestart_t)" (() "(" (pointer_declarator) "*checkRestart_t" (*) "*" (type_identifier) "checkRestart_t" ()) ")" (parameter_list) "()" (() "(" ()) ")" (;) ";" (type_definition) "typedef void (*reportSuccess_t)(mpz_t, unsigned);" (typedef) "typedef" (primitive_type) "void" (function_declarator) "(*reportSuccess_t)(mpz_t, unsigned)" (parenthesized_declarator) "(*reportSuccess_t)" (() "(" (pointer_declarator) "*reportSuccess_t" (*) "*" (type_identifier) "reportSuccess_t" ()) ")" (parameter_list) "(mpz_t, unsigned)" (() "(" (parameter_declaration) "mpz_t" (type_identifier) "mpz_t" (,) "," (parameter_declaration) "unsigned" (sized_type_specifier) "unsigned" (unsigned) "unsigned" ()) ")" (;) ";" (declaration) "void rh_oneTimeInit(reportSuccess_t, checkRestart_t);" (primitive_type) "void" (function_declarator) "rh_oneTimeInit(reportSuccess_t, checkRestart_t)" (identifier) "rh_oneTimeInit" (parameter_list) "(reportSuccess_t, checkRestart_t)" (() "(" (parameter_declaration) "reportSuccess_t" (type_identifier) "reportSuccess_t" (,) "," (parameter_declaration) "checkRestart_t" (type_identifier) "checkRestart_t" ()) ")" (;) ";" (declaration) "void rh_search(mpz_t);" (primitive_type) "void" (function_declarator) "rh_search(mpz_t)" (identifier) "rh_search" (parameter_list) "(mpz_t)" (() "(" (parameter_declaration) "mpz_t" (type_identifier) "mpz_t" ()) ")" (;) ";" (preproc_ifdef) "#ifdef __cplusplus" (#ifdef) "#ifdef" (identifier) "__cplusplus" (#endif) "" (}) "}" (#endif) "#endif"
81
0
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 21.27, "nodes": 56, "errors": 0, "source_hash": "893a7d5cf505f2a73545963361bed47bb347b79dbc4b55d5a98e5456a276524c", "categorized_nodes": 35}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 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": "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef unsigned (*checkRestart_t)();\ntypedef void (*reportSuccess_t)(mpz_t, unsigned);\n\nvoid rh_oneTimeInit(reportSuccess_t, checkRestart_t);\nvoid rh_search(mpz_t);\n\n#ifdef __cplusplus\n}\n#endif", "parent": null, "children": [4, 5, 6, 55], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 4, "type": "#ifdef", "text": "#ifdef", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 6}}, {"id": 5, "type": "identifier", "text": "__cplusplus", "parent": 3, "children": [], "start_point": {"row": 2, "column": 7}, "end_point": {"row": 2, "column": 18}}, {"id": 6, "type": "linkage_specification", "text": "extern \"C\" {\n#endif\n\ntypedef unsigned (*checkRestart_t)();\ntypedef void (*reportSuccess_t)(mpz_t, unsigned);\n\nvoid rh_oneTimeInit(reportSuccess_t, checkRestart_t);\nvoid rh_search(mpz_t);\n\n#ifdef __cplusplus\n}", "parent": 3, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 7, "type": "extern", "text": "extern", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 8, "type": "string_literal", "text": "\"C\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 10}}, {"id": 9, "type": "preproc_call", "text": "#endif\n", "parent": 6, "children": [10], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "preproc_directive", "text": "#endif", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 11, "type": "type_definition", "text": "typedef unsigned (*checkRestart_t)();", "parent": 6, "children": [12, 13, 15], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 37}}, {"id": 12, "type": "typedef", "text": "typedef", "parent": 11, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 13, "type": "sized_type_specifier", "text": "unsigned", "parent": 11, "children": [14], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 16}}, {"id": 14, "type": "unsigned", "text": "unsigned", "parent": 13, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 16}}, {"id": 15, "type": "function_declarator", "text": "(*checkRestart_t)()", "parent": 11, "children": [16, 20], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 36}}, {"id": 16, "type": "parenthesized_declarator", "text": "(*checkRestart_t)", "parent": 15, "children": [17], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 34}}, {"id": 17, "type": "pointer_declarator", "text": "*checkRestart_t", "parent": 16, "children": [18, 19], "start_point": {"row": 6, "column": 18}, "end_point": {"row": 6, "column": 33}}, {"id": 18, "type": "*", "text": "*", "parent": 17, "children": [], "start_point": {"row": 6, "column": 18}, "end_point": {"row": 6, "column": 19}}, {"id": 19, "type": "type_identifier", "text": "checkRestart_t", "parent": 17, "children": [], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 33}}, {"id": 20, "type": "parameter_list", "text": "()", "parent": 15, "children": [], "start_point": {"row": 6, "column": 34}, "end_point": {"row": 6, "column": 36}}, {"id": 21, "type": "type_definition", "text": "typedef void (*reportSuccess_t)(mpz_t, unsigned);", "parent": 6, "children": [22, 23, 24], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 49}}, {"id": 22, "type": "typedef", "text": "typedef", "parent": 21, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 23, "type": "primitive_type", "text": "void", "parent": 21, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 12}}, {"id": 24, "type": "function_declarator", "text": "(*reportSuccess_t)(mpz_t, unsigned)", "parent": 21, "children": [25, 29], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 48}}, {"id": 25, "type": "parenthesized_declarator", "text": "(*reportSuccess_t)", "parent": 24, "children": [26], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 31}}, {"id": 26, "type": "pointer_declarator", "text": "*reportSuccess_t", "parent": 25, "children": [27, 28], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 30}}, {"id": 27, "type": "*", "text": "*", "parent": 26, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 15}}, {"id": 28, "type": "type_identifier", "text": "reportSuccess_t", "parent": 26, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 30}}, {"id": 29, "type": "parameter_list", "text": "(mpz_t, unsigned)", "parent": 24, "children": [30, 32], "start_point": {"row": 7, "column": 31}, "end_point": {"row": 7, "column": 48}}, {"id": 30, "type": "parameter_declaration", "text": "mpz_t", "parent": 29, "children": [31], "start_point": {"row": 7, "column": 32}, "end_point": {"row": 7, "column": 37}}, {"id": 31, "type": "type_identifier", "text": "mpz_t", "parent": 30, "children": [], "start_point": {"row": 7, "column": 32}, "end_point": {"row": 7, "column": 37}}, {"id": 32, "type": "parameter_declaration", "text": "unsigned", "parent": 29, "children": [33], "start_point": {"row": 7, "column": 39}, "end_point": {"row": 7, "column": 47}}, {"id": 33, "type": "sized_type_specifier", "text": "unsigned", "parent": 32, "children": [34], "start_point": {"row": 7, "column": 39}, "end_point": {"row": 7, "column": 47}}, {"id": 34, "type": "unsigned", "text": "unsigned", "parent": 33, "children": [], "start_point": {"row": 7, "column": 39}, "end_point": {"row": 7, "column": 47}}, {"id": 35, "type": "declaration", "text": "void rh_oneTimeInit(reportSuccess_t, checkRestart_t);", "parent": 6, "children": [36, 37], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 53}}, {"id": 36, "type": "primitive_type", "text": "void", "parent": 35, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 4}}, {"id": 37, "type": "function_declarator", "text": "rh_oneTimeInit(reportSuccess_t, checkRestart_t)", "parent": 35, "children": [38, 39], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 52}}, {"id": 38, "type": "identifier", "text": "rh_oneTimeInit", "parent": 37, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 19}}, {"id": 39, "type": "parameter_list", "text": "(reportSuccess_t, checkRestart_t)", "parent": 37, "children": [40, 42], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 52}}, {"id": 40, "type": "parameter_declaration", "text": "reportSuccess_t", "parent": 39, "children": [41], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 35}}, {"id": 41, "type": "type_identifier", "text": "reportSuccess_t", "parent": 40, "children": [], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 35}}, {"id": 42, "type": "parameter_declaration", "text": "checkRestart_t", "parent": 39, "children": [43], "start_point": {"row": 9, "column": 37}, "end_point": {"row": 9, "column": 51}}, {"id": 43, "type": "type_identifier", "text": "checkRestart_t", "parent": 42, "children": [], "start_point": {"row": 9, "column": 37}, "end_point": {"row": 9, "column": 51}}, {"id": 44, "type": "declaration", "text": "void rh_search(mpz_t);", "parent": 6, "children": [45, 46], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 22}}, {"id": 45, "type": "primitive_type", "text": "void", "parent": 44, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 4}}, {"id": 46, "type": "function_declarator", "text": "rh_search(mpz_t)", "parent": 44, "children": [47, 48], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 21}}, {"id": 47, "type": "identifier", "text": "rh_search", "parent": 46, "children": [], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 14}}, {"id": 48, "type": "parameter_list", "text": "(mpz_t)", "parent": 46, "children": [49], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 21}}, {"id": 49, "type": "parameter_declaration", "text": "mpz_t", "parent": 48, "children": [50], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 20}}, {"id": 50, "type": "type_identifier", "text": "mpz_t", "parent": 49, "children": [], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 20}}, {"id": 51, "type": "preproc_ifdef", "text": "#ifdef __cplusplus", "parent": 6, "children": [52, 53, 54], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 18}}, {"id": 52, "type": "#ifdef", "text": "#ifdef", "parent": 51, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 53, "type": "identifier", "text": "__cplusplus", "parent": 51, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 18}}, {"id": 54, "type": "#endif", "text": "", "parent": 51, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 18}}, {"id": 55, "type": "#endif", "text": "#endif", "parent": 3, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 24, 37, 46], "variables": [11, 21, 30, 32, 35, 40, 42, 44, 49], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [3, 4, 5, 6, 13, 19, 28, 31, 33, 38, 41, 43, 47, 50, 51, 52, 53, 54, 55], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 9], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "unknown", "text_snippet": "(*checkRestart_t)()"}, {"node_id": 24, "universal_type": "function", "name": "unknown", "text_snippet": "(*reportSuccess_t)(mpz_t, unsigned)"}, {"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "rh_oneTimeInit(reportSuccess_t, checkRestart_t)"}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "rh_search(mpz_t)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "#pragma once\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef unsigned (*checkRestart_t)();\ntypedef void (*reportSuccess_t)(mpz_t, unsigned);\n\nvoid rh_oneTimeInit(reportSuccess_t, checkRestart_t);\nvoid rh_search(mpz_t);\n\n#ifdef __cplusplus\n}\n#endif\n"}
313
c
/* vglyph - library for visualize glyphs * * File: vglyph-format.h * Copyright (C) 2016 <NAME> */ #ifndef VGLYPH_FORMAT_H #define VGLYPH_FORMAT_H #include "vglyph-object.h" typedef struct _vglyph_format_backend { vglyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format); } vglyph_format_backend_t; struct _vglyph_format { vglyph_object_t object; const vglyph_format_backend_t* backend; vglyph_packaging_bytes_t packaging_bytes; }; void _vglyph_format_init(vglyph_format_t* format, const vglyph_object_backend_t* object_backend, const vglyph_format_backend_t* format_backend, const vglyph_packaging_bytes_t* packaging_bytes); void _vglyph_format_ctor(vglyph_format_t* format); void _vglyph_format_dtor(vglyph_format_t* format); vglyph_bool_t _vglyph_format_is_cast(vglyph_type_t* type); static inline vglyph_format_t* _vglyph_format_reference(vglyph_format_t* format) { assert(format); return (vglyph_format_t*)_vglyph_object_reference(&format->object); } static inline void _vglyph_format_destroy(vglyph_format_t* format) { assert(format); _vglyph_object_destroy(&format->object); } static inline int _vglyph_format_get_reference_count(vglyph_format_t* format) { assert(format); return _vglyph_object_get_reference_count(&format->object); } static inline vglyph_state_t _vglyph_format_get_state(vglyph_format_t* format) { assert(format); return _vglyph_object_get_state(&format->object); } static inline void _vglyph_format_set_state(vglyph_format_t* format, vglyph_state_t state) { assert(format); _vglyph_object_set_state(&format->object, state); } static inline vglyph_bool_t _vglyph_format_is_valid(vglyph_format_t* format) { assert(format); return _vglyph_object_is_valid(&format->object); } #endif
26.82
67
(translation_unit) " vglyph - library for visualize glyphs\n *\n * File: vglyph-format.h\n * Copyright (C) 2016 <NAME>\n */\n\n#ifndef VGLYPH_FORMAT_H\n#define VGLYPH_FORMAT_H\n\n#include "vglyph-object.h"\n\ntypedef struct _vglyph_format_backend\n{\n vglyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n} vglyph_format_backend_t;\n\nstruct _vglyph_format\n{\n vglyph_object_t object;\n const vglyph_format_backend_t* backend;\n vglyph_packaging_bytes_t packaging_bytes;\n};\n\nvoid\n_vglyph_format_init(vglyph_format_t* format,\n const vglyph_object_backend_t* object_backend,\n const vglyph_format_backend_t* format_backend,\n const vglyph_packaging_bytes_t* packaging_bytes);\n\nvoid\n_vglyph_format_ctor(vglyph_format_t* format);\n\nvoid\n_vglyph_format_dtor(vglyph_format_t* format);\n\nvglyph_bool_t\n_vglyph_format_is_cast(vglyph_type_t* type);\n\nstatic inline vglyph_format_t*\n_vglyph_format_reference(vglyph_format_t* format)\n{\n assert(format);\n return (vglyph_format_t*)_vglyph_object_reference(&format->object);\n}\n\nstatic inline void\n_vglyph_format_destroy(vglyph_format_t* format)\n{\n assert(format);\n _vglyph_object_destroy(&format->object);\n}\n\nstatic inline int\n_vglyph_format_get_reference_count(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_reference_count(&format->object);\n}\n\nstatic inline vglyph_state_t\n_vglyph_format_get_state(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_state(&format->object);\n}\n\nstatic inline void\n_vglyph_format_set_state(vglyph_format_t* format,\n vglyph_state_t state)\n{\n assert(format);\n _vglyph_object_set_state(&format->object, state);\n}\n\nstatic inline vglyph_bool_t\n_vglyph_format_is_valid(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_is_valid(&format->object);\n}\n\n#endif\n" (comment) " vglyph - library for visualize glyphs\n *\n * File: vglyph-format.h\n * Copyright (C) 2016 <NAME>\n */\n\n" (preproc_ifdef) "fndef VGLYPH_FORMAT_H\n#define VGLYPH_FORMAT_H\n\n#include "vglyph-object.h"\n\ntypedef struct _vglyph_format_backend\n{\n vglyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n} vglyph_format_backend_t;\n\nstruct _vglyph_format\n{\n vglyph_object_t object;\n const vglyph_format_backend_t* backend;\n vglyph_packaging_bytes_t packaging_bytes;\n};\n\nvoid\n_vglyph_format_init(vglyph_format_t* format,\n const vglyph_object_backend_t* object_backend,\n const vglyph_format_backend_t* format_backend,\n const vglyph_packaging_bytes_t* packaging_bytes);\n\nvoid\n_vglyph_format_ctor(vglyph_format_t* format);\n\nvoid\n_vglyph_format_dtor(vglyph_format_t* format);\n\nvglyph_bool_t\n_vglyph_format_is_cast(vglyph_type_t* type);\n\nstatic inline vglyph_format_t*\n_vglyph_format_reference(vglyph_format_t* format)\n{\n assert(format);\n return (vglyph_format_t*)_vglyph_object_reference(&format->object);\n}\n\nstatic inline void\n_vglyph_format_destroy(vglyph_format_t* format)\n{\n assert(format);\n _vglyph_object_destroy(&format->object);\n}\n\nstatic inline int\n_vglyph_format_get_reference_count(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_reference_count(&format->object);\n}\n\nstatic inline vglyph_state_t\n_vglyph_format_get_state(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_state(&format->object);\n}\n\nstatic inline void\n_vglyph_format_set_state(vglyph_format_t* format,\n vglyph_state_t state)\n{\n assert(format);\n _vglyph_object_set_state(&format->object, state);\n}\n\nstatic inline vglyph_bool_t\n_vglyph_format_is_valid(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_is_valid(&format->object);\n}\n\n#endif\n" (#ifndef) "fndef V" (identifier) "LYPH_FORMAT_H\n#" (preproc_def) "efine VGLYPH_FORMAT_H\n\n#" (#define) "efine V" (identifier) "LYPH_FORMAT_H\n\n" (preproc_include) "nclude "vglyph-object.h"\n\nt" (#include) "nclude "" (string_literal) "glyph-object.h"\n\n" (") "g" (string_content) "lyph-object.h"\n" (") "\n" (type_definition) "pedef struct _vglyph_format_backend\n{\n vglyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n} vglyph_format_backend_t;\n\n" (typedef) "pedef s" (struct_specifier) "ruct _vglyph_format_backend\n{\n vglyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n} v" (struct) "ruct _" (type_identifier) "glyph_format_backend\n{" (field_declaration_list) " vglyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n} v" ({) " " (field_declaration) "lyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n}" (type_identifier) "lyph_uint32_t (" (function_declarator) "get_bits_per_pixel)(vglyph_format_t* format);\n" (parenthesized_declarator) "get_bits_per_pixel)(v" (() "g" (pointer_declarator) "et_bits_per_pixel)(" (*) "e" (field_identifier) "t_bits_per_pixel)(" ()) "v" (parameter_list) "glyph_format_t* format);\n" (() "g" (parameter_declaration) "lyph_format_t* format);" (type_identifier) "lyph_format_t* " (pointer_declarator) "format);" (*) "f" (identifier) "rmat);" ()) "\n" (;) "}" (}) "v" (type_identifier) "lyph_format_backend_t;\n" (;) "\n" (struct_specifier) "ruct _vglyph_format\n{\n vglyph_object_t object;\n const vglyph_format_backend_t* backend;\n vglyph_packaging_bytes_t packaging_bytes;\n};\n" (struct) "ruct _" (type_identifier) "glyph_format\n{" (field_declaration_list) " vglyph_object_t object;\n const vglyph_format_backend_t* backend;\n vglyph_packaging_bytes_t packaging_bytes;\n};\n" ({) " " (field_declaration) "lyph_object_t object;\n " (type_identifier) "lyph_object_t o" (field_identifier) "ject;\n" (;) " " (field_declaration) "nst vglyph_format_backend_t* backend;\n " (type_qualifier) "nst v" (const) "nst v" (type_identifier) "lyph_format_backend_t* " (pointer_declarator) "backend;\n" (*) "b" (field_identifier) "ckend;\n" (;) " " (field_declaration) "lyph_packaging_bytes_t packaging_bytes;\n}" (type_identifier) "lyph_packaging_bytes_t p" (field_identifier) "ckaging_bytes;\n" (;) "}" (}) "\n" (;) "\n" (declaration) "id\n_vglyph_format_init(vglyph_format_t* format,\n const vglyph_object_backend_t* object_backend,\n const vglyph_format_backend_t* format_backend,\n const vglyph_packaging_bytes_t* packaging_bytes);\n\n" (primitive_type) "id\n_" (function_declarator) "glyph_format_init(vglyph_format_t* format,\n const vglyph_object_backend_t* object_backend,\n const vglyph_format_backend_t* format_backend,\n const vglyph_packaging_bytes_t* packaging_bytes);\n" (identifier) "glyph_format_init(v" (parameter_list) "glyph_format_t* format,\n const vglyph_object_backend_t* object_backend,\n const vglyph_format_backend_t* format_backend,\n const vglyph_packaging_bytes_t* packaging_bytes);\n" (() "g" (parameter_declaration) "lyph_format_t* format,\n" (type_identifier) "lyph_format_t* " (pointer_declarator) "format,\n" (*) "f" (identifier) "rmat,\n" (,) " " (parameter_declaration) "nst vglyph_object_backend_t* object_backend,\n" (type_qualifier) "nst v" (const) "nst v" (type_identifier) "lyph_object_backend_t* " (pointer_declarator) "object_backend,\n" (*) "o" (identifier) "ject_backend,\n" (,) " " (parameter_declaration) "nst vglyph_format_backend_t* format_backend,\n" (type_qualifier) "nst v" (const) "nst v" (type_identifier) "lyph_format_backend_t* " (pointer_declarator) "format_backend,\n" (*) "f" (identifier) "rmat_backend,\n" (,) " " (parameter_declaration) "nst vglyph_packaging_bytes_t* packaging_bytes);" (type_qualifier) "nst v" (const) "nst v" (type_identifier) "lyph_packaging_bytes_t* " (pointer_declarator) "packaging_bytes);" (*) "p" (identifier) "ckaging_bytes);" ()) "\n" (;) "\n" (declaration) "id\n_vglyph_format_ctor(vglyph_format_t* format);\n\n" (primitive_type) "id\n_" (function_declarator) "glyph_format_ctor(vglyph_format_t* format);\n" (identifier) "glyph_format_ctor(v" (parameter_list) "glyph_format_t* format);\n" (() "g" (parameter_declaration) "lyph_format_t* format);" (type_identifier) "lyph_format_t* " (pointer_declarator) "format);" (*) "f" (identifier) "rmat);" ()) "\n" (;) "\n" (declaration) "id\n_vglyph_format_dtor(vglyph_format_t* format);\n\n" (primitive_type) "id\n_" (function_declarator) "glyph_format_dtor(vglyph_format_t* format);\n" (identifier) "glyph_format_dtor(v" (parameter_list) "glyph_format_t* format);\n" (() "g" (parameter_declaration) "lyph_format_t* format);" (type_identifier) "lyph_format_t* " (pointer_declarator) "format);" (*) "f" (identifier) "rmat);" ()) "\n" (;) "\n" (declaration) "lyph_bool_t\n_vglyph_format_is_cast(vglyph_type_t* type);\n\n" (type_identifier) "lyph_bool_t\n_" (function_declarator) "glyph_format_is_cast(vglyph_type_t* type);\n" (identifier) "glyph_format_is_cast(v" (parameter_list) "glyph_type_t* type);\n" (() "g" (parameter_declaration) "lyph_type_t* type);" (type_identifier) "lyph_type_t* " (pointer_declarator) "type);" (*) "t" (identifier) "pe);" ()) "\n" (;) "\n" (function_definition) "atic inline vglyph_format_t*\n_vglyph_format_reference(vglyph_format_t* format)\n{\n assert(format);\n return (vglyph_format_t*)_vglyph_object_reference(&format->object);\n}\n\n" (storage_class_specifier) "atic i" (static) "atic i" (storage_class_specifier) "line v" (inline) "line v" (type_identifier) "lyph_format_t*\n" (pointer_declarator) "_vglyph_format_reference(vglyph_format_t* format)\n{" (*) "_" (function_declarator) "glyph_format_reference(vglyph_format_t* format)\n{" (identifier) "glyph_format_reference(v" (parameter_list) "glyph_format_t* format)\n{" (() "g" (parameter_declaration) "lyph_format_t* format)\n" (type_identifier) "lyph_format_t* " (pointer_declarator) "format)\n" (*) "f" (identifier) "rmat)\n" ()) "{" (compound_statement) " assert(format);\n return (vglyph_format_t*)_vglyph_object_reference(&format->object);\n}\n\n" ({) " " (expression_statement) "sert(format);\n " (call_expression) "sert(format);\n" (identifier) "sert(f" (argument_list) "ormat);\n" (() "o" (identifier) "rmat);" ()) "\n" (;) " " (return_statement) "turn (vglyph_format_t*)_vglyph_object_reference(&format->object);\n}" (return) "turn (" (cast_expression) "glyph_format_t*)_vglyph_object_reference(&format->object);\n" (() "g" (type_descriptor) "lyph_format_t*)_" (type_identifier) "lyph_format_t*)" (abstract_pointer_declarator) "_" (*) "_" ()) "v" (call_expression) "glyph_object_reference(&format->object);\n" (identifier) "glyph_object_reference(&" (argument_list) "format->object);\n" (() "f" (pointer_expression) "ormat->object);" (&) "o" (field_expression) "rmat->object);" (identifier) "rmat->" (->) "ob" (field_identifier) "ject);" ()) "\n" (;) "}" (}) "\n" (function_definition) "atic inline void\n_vglyph_format_destroy(vglyph_format_t* format)\n{\n assert(format);\n _vglyph_object_destroy(&format->object);\n}\n\n" (storage_class_specifier) "atic i" (static) "atic i" (storage_class_specifier) "line v" (inline) "line v" (primitive_type) "id\n_" (function_declarator) "glyph_format_destroy(vglyph_format_t* format)\n{" (identifier) "glyph_format_destroy(v" (parameter_list) "glyph_format_t* format)\n{" (() "g" (parameter_declaration) "lyph_format_t* format)\n" (type_identifier) "lyph_format_t* " (pointer_declarator) "format)\n" (*) "f" (identifier) "rmat)\n" ()) "{" (compound_statement) " assert(format);\n _vglyph_object_destroy(&format->object);\n}\n\n" ({) " " (expression_statement) "sert(format);\n " (call_expression) "sert(format);\n" (identifier) "sert(f" (argument_list) "ormat);\n" (() "o" (identifier) "rmat);" ()) "\n" (;) " " (expression_statement) "glyph_object_destroy(&format->object);\n}" (call_expression) "glyph_object_destroy(&format->object);\n" (identifier) "glyph_object_destroy(&" (argument_list) "format->object);\n" (() "f" (pointer_expression) "ormat->object);" (&) "o" (field_expression) "rmat->object);" (identifier) "rmat->" (->) "ob" (field_identifier) "ject);" ()) "\n" (;) "}" (}) "\n" (function_definition) "atic inline int\n_vglyph_format_get_reference_count(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_reference_count(&format->object);\n}\n\n" (storage_class_specifier) "atic i" (static) "atic i" (storage_class_specifier) "line i" (inline) "line i" (primitive_type) "t\n_" (function_declarator) "glyph_format_get_reference_count(vglyph_format_t* format)\n{" (identifier) "glyph_format_get_reference_count(v" (parameter_list) "glyph_format_t* format)\n{" (() "g" (parameter_declaration) "lyph_format_t* format)\n" (type_identifier) "lyph_format_t* " (pointer_declarator) "format)\n" (*) "f" (identifier) "rmat)\n" ()) "{" (compound_statement) " assert(format);\n return _vglyph_object_get_reference_count(&format->object);\n}\n\n" ({) " " (expression_statement) "sert(format);\n " (call_expression) "sert(format);\n" (identifier) "sert(f" (argument_list) "ormat);\n" (() "o" (identifier) "rmat);" ()) "\n" (;) " " (return_statement) "turn _vglyph_object_get_reference_count(&format->object);\n}" (return) "turn _" (call_expression) "glyph_object_get_reference_count(&format->object);\n" (identifier) "glyph_object_get_reference_count(&" (argument_list) "format->object);\n" (() "f" (pointer_expression) "ormat->object);" (&) "o" (field_expression) "rmat->object);" (identifier) "rmat->" (->) "ob" (field_identifier) "ject);" ()) "\n" (;) "}" (}) "\n" (function_definition) "atic inline vglyph_state_t\n_vglyph_format_get_state(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_state(&format->object);\n}\n\n" (storage_class_specifier) "atic i" (static) "atic i" (storage_class_specifier) "line v" (inline) "line v" (type_identifier) "lyph_state_t\n_" (function_declarator) "glyph_format_get_state(vglyph_format_t* format)\n{" (identifier) "glyph_format_get_state(v" (parameter_list) "glyph_format_t* format)\n{" (() "g" (parameter_declaration) "lyph_format_t* format)\n" (type_identifier) "lyph_format_t* " (pointer_declarator) "format)\n" (*) "f" (identifier) "rmat)\n" ()) "{" (compound_statement) " assert(format);\n return _vglyph_object_get_state(&format->object);\n}\n\n" ({) " " (expression_statement) "sert(format);\n " (call_expression) "sert(format);\n" (identifier) "sert(f" (argument_list) "ormat);\n" (() "o" (identifier) "rmat);" ()) "\n" (;) " " (return_statement) "turn _vglyph_object_get_state(&format->object);\n}" (return) "turn _" (call_expression) "glyph_object_get_state(&format->object);\n" (identifier) "glyph_object_get_state(&" (argument_list) "format->object);\n" (() "f" (pointer_expression) "ormat->object);" (&) "o" (field_expression) "rmat->object);" (identifier) "rmat->" (->) "ob" (field_identifier) "ject);" ()) "\n" (;) "}" (}) "\n" (function_definition) "atic inline void\n_vglyph_format_set_state(vglyph_format_t* format,\n vglyph_state_t state)\n{\n assert(format);\n _vglyph_object_set_state(&format->object, state);\n}\n\n" (storage_class_specifier) "atic i" (static) "atic i" (storage_class_specifier) "line v" (inline) "line v" (primitive_type) "id\n_" (function_declarator) "glyph_format_set_state(vglyph_format_t* format,\n vglyph_state_t state)\n{" (identifier) "glyph_format_set_state(v" (parameter_list) "glyph_format_t* format,\n vglyph_state_t state)\n{" (() "g" (parameter_declaration) "lyph_format_t* format,\n" (type_identifier) "lyph_format_t* " (pointer_declarator) "format,\n" (*) "f" (identifier) "rmat,\n" (,) " " (parameter_declaration) "lyph_state_t state)\n" (type_identifier) "lyph_state_t s" (identifier) "ate)\n" ()) "{" (compound_statement) " assert(format);\n _vglyph_object_set_state(&format->object, state);\n}\n\n" ({) " " (expression_statement) "sert(format);\n " (call_expression) "sert(format);\n" (identifier) "sert(f" (argument_list) "ormat);\n" (() "o" (identifier) "rmat);" ()) "\n" (;) " " (expression_statement) "glyph_object_set_state(&format->object, state);\n}" (call_expression) "glyph_object_set_state(&format->object, state);\n" (identifier) "glyph_object_set_state(&" (argument_list) "format->object, state);\n" (() "f" (pointer_expression) "ormat->object, " (&) "o" (field_expression) "rmat->object, " (identifier) "rmat->" (->) "ob" (field_identifier) "ject, " (,) "s" (identifier) "ate);" ()) "\n" (;) "}" (}) "\n" (function_definition) "atic inline vglyph_bool_t\n_vglyph_format_is_valid(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_is_valid(&format->object);\n}\n\n" (storage_class_specifier) "atic i" (static) "atic i" (storage_class_specifier) "line v" (inline) "line v" (type_identifier) "lyph_bool_t\n_" (function_declarator) "glyph_format_is_valid(vglyph_format_t* format)\n{" (identifier) "glyph_format_is_valid(v" (parameter_list) "glyph_format_t* format)\n{" (() "g" (parameter_declaration) "lyph_format_t* format)\n" (type_identifier) "lyph_format_t* " (pointer_declarator) "format)\n" (*) "f" (identifier) "rmat)\n" ()) "{" (compound_statement) " assert(format);\n return _vglyph_object_is_valid(&format->object);\n}\n\n" ({) " " (expression_statement) "sert(format);\n " (call_expression) "sert(format);\n" (identifier) "sert(f" (argument_list) "ormat);\n" (() "o" (identifier) "rmat);" ()) "\n" (;) " " (return_statement) "turn _vglyph_object_is_valid(&format->object);\n}" (return) "turn _" (call_expression) "glyph_object_is_valid(&format->object);\n" (identifier) "glyph_object_is_valid(&" (argument_list) "format->object);\n" (() "f" (pointer_expression) "ormat->object);" (&) "o" (field_expression) "rmat->object);" (identifier) "rmat->" (->) "ob" (field_identifier) "ject);" ()) "\n" (;) "}" (}) "\n" (#endif) "ndif\n"
401
0
{"language": "c", "success": true, "metadata": {"lines": 67, "avg_line_length": 26.82, "nodes": 273, "errors": 0, "source_hash": "a9f4fdf77a4754e6e15a0a30c3cda0da31c59f5ef632734978e131e693403516", "categorized_nodes": 185}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "fndef VGLYPH_FORMAT_H\n#define VGLYPH_FORMAT_H\n\n#include \"vglyph-object.h\"\n\ntypedef struct _vglyph_format_backend\n{\n vglyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n} vglyph_format_backend_t;\n\nstruct _vglyph_format\n{\n vglyph_object_t object;\n const vglyph_format_backend_t* backend;\n vglyph_packaging_bytes_t packaging_bytes;\n};\n\nvoid\n_vglyph_format_init(vglyph_format_t* format,\n const vglyph_object_backend_t* object_backend,\n const vglyph_format_backend_t* format_backend,\n const vglyph_packaging_bytes_t* packaging_bytes);\n\nvoid\n_vglyph_format_ctor(vglyph_format_t* format);\n\nvoid\n_vglyph_format_dtor(vglyph_format_t* format);\n\nvglyph_bool_t\n_vglyph_format_is_cast(vglyph_type_t* type);\n\nstatic inline vglyph_format_t*\n_vglyph_format_reference(vglyph_format_t* format)\n{\n assert(format);\n return (vglyph_format_t*)_vglyph_object_reference(&format->object);\n}\n\nstatic inline void\n_vglyph_format_destroy(vglyph_format_t* format)\n{\n assert(format);\n _vglyph_object_destroy(&format->object);\n}\n\nstatic inline int\n_vglyph_format_get_reference_count(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_reference_count(&format->object);\n}\n\nstatic inline vglyph_state_t\n_vglyph_format_get_state(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_state(&format->object);\n}\n\nstatic inline void\n_vglyph_format_set_state(vglyph_format_t* format,\n vglyph_state_t state)\n{\n assert(format);\n _vglyph_object_set_state(&format->object, state);\n}\n\nstatic inline vglyph_bool_t\n_vglyph_format_is_valid(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_is_valid(&format->object);\n}\n\n#endif\n", "parent": null, "children": [1, 2, 3, 6, 9, 28, 43, 71, 81, 91, 101, 135, 161, 188, 215, 245, 272], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 81, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "fndef V", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "identifier", "text": "LYPH_FORMAT_H\n#", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 23}}, {"id": 3, "type": "preproc_def", "text": "efine VGLYPH_FORMAT_H\n\n#", "parent": 0, "children": [4, 5], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 4, "type": "#define", "text": "efine V", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 5, "type": "identifier", "text": "LYPH_FORMAT_H\n\n", "parent": 3, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "nclude \"vglyph-object.h\"\n\nt", "parent": 0, "children": [7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 7, "type": "#include", "text": "nclude \"", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 8, "type": "string_literal", "text": "glyph-object.h\"\n\n", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 26}}, {"id": 9, "type": "type_definition", "text": "pedef struct _vglyph_format_backend\n{\n vglyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n} vglyph_format_backend_t;\n\n", "parent": 0, "children": [10, 11, 27], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 14, "column": 26}}, {"id": 10, "type": "typedef", "text": "pedef s", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 11, "type": "struct_specifier", "text": "ruct _vglyph_format_backend\n{\n vglyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n} v", "parent": 9, "children": [12, 13], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 14, "column": 1}}, {"id": 12, "type": "struct", "text": "ruct _", "parent": 11, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 14}}, {"id": 13, "type": "type_identifier", "text": "glyph_format_backend\n{", "parent": 11, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 37}}, {"id": 14, "type": "field_declaration", "text": "lyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n}", "parent": 11, "children": [15, 16], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 67}}, {"id": 15, "type": "type_identifier", "text": "lyph_uint32_t (", "parent": 14, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 19}}, {"id": 16, "type": "function_declarator", "text": "get_bits_per_pixel)(vglyph_format_t* format);\n", "parent": 14, "children": [17, 21], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 66}}, {"id": 17, "type": "parenthesized_declarator", "text": "get_bits_per_pixel)(v", "parent": 16, "children": [18], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 41}}, {"id": 18, "type": "pointer_declarator", "text": "et_bits_per_pixel)(", "parent": 17, "children": [19, 20], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 40}}, {"id": 19, "type": "*", "text": "e", "parent": 18, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 22}}, {"id": 20, "type": "field_identifier", "text": "t_bits_per_pixel)(", "parent": 18, "children": [], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 40}}, {"id": 21, "type": "parameter_list", "text": "glyph_format_t* format);\n", "parent": 16, "children": [22], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 66}}, {"id": 22, "type": "parameter_declaration", "text": "lyph_format_t* format);", "parent": 21, "children": [23, 24], "start_point": {"row": 13, "column": 42}, "end_point": {"row": 13, "column": 65}}, {"id": 23, "type": "type_identifier", "text": "lyph_format_t* ", "parent": 22, "children": [], "start_point": {"row": 13, "column": 42}, "end_point": {"row": 13, "column": 57}}, {"id": 24, "type": "pointer_declarator", "text": "format);", "parent": 22, "children": [25, 26], "start_point": {"row": 13, "column": 57}, "end_point": {"row": 13, "column": 65}}, {"id": 25, "type": "*", "text": "f", "parent": 24, "children": [], "start_point": {"row": 13, "column": 57}, "end_point": {"row": 13, "column": 58}}, {"id": 26, "type": "identifier", "text": "rmat);", "parent": 24, "children": [], "start_point": {"row": 13, "column": 59}, "end_point": {"row": 13, "column": 65}}, {"id": 27, "type": "type_identifier", "text": "lyph_format_backend_t;\n", "parent": 9, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 25}}, {"id": 28, "type": "struct_specifier", "text": "ruct _vglyph_format\n{\n vglyph_object_t object;\n const vglyph_format_backend_t* backend;\n vglyph_packaging_bytes_t packaging_bytes;\n};\n", "parent": 0, "children": [29, 30], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 29, "type": "struct", "text": "ruct _", "parent": 28, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 30, "type": "type_identifier", "text": "glyph_format\n{", "parent": 28, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 21}}, {"id": 31, "type": "field_declaration", "text": "lyph_object_t object;\n ", "parent": 28, "children": [32, 33], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 27}}, {"id": 32, "type": "type_identifier", "text": "lyph_object_t o", "parent": 31, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 19}}, {"id": 33, "type": "field_identifier", "text": "ject;\n", "parent": 31, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 26}}, {"id": 34, "type": "field_declaration", "text": "nst vglyph_format_backend_t* backend;\n ", "parent": 28, "children": [35, 36, 37], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 43}}, {"id": 35, "type": "type_qualifier", "text": "nst v", "parent": 34, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 9}}, {"id": 36, "type": "type_identifier", "text": "lyph_format_backend_t* ", "parent": 34, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 33}}, {"id": 37, "type": "pointer_declarator", "text": "backend;\n", "parent": 34, "children": [38, 39], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 42}}, {"id": 38, "type": "*", "text": "b", "parent": 37, "children": [], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 34}}, {"id": 39, "type": "field_identifier", "text": "ckend;\n", "parent": 37, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 42}}, {"id": 40, "type": "field_declaration", "text": "lyph_packaging_bytes_t packaging_bytes;\n}", "parent": 28, "children": [41, 42], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 45}}, {"id": 41, "type": "type_identifier", "text": "lyph_packaging_bytes_t p", "parent": 40, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 28}}, {"id": 42, "type": "field_identifier", "text": "ckaging_bytes;\n", "parent": 40, "children": [], "start_point": {"row": 20, "column": 29}, "end_point": {"row": 20, "column": 44}}, {"id": 43, "type": "declaration", "text": "id\n_vglyph_format_init(vglyph_format_t* format,\n const vglyph_object_backend_t* object_backend,\n const vglyph_format_backend_t* format_backend,\n const vglyph_packaging_bytes_t* packaging_bytes);\n\n", "parent": 0, "children": [44, 45], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 27, "column": 69}}, {"id": 44, "type": "primitive_type", "text": "id\n_", "parent": 43, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 4}}, {"id": 45, "type": "function_declarator", "text": "glyph_format_init(vglyph_format_t* format,\n const vglyph_object_backend_t* object_backend,\n const vglyph_format_backend_t* format_backend,\n const vglyph_packaging_bytes_t* packaging_bytes);\n", "parent": 43, "children": [46, 47], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 27, "column": 68}}, {"id": 46, "type": "identifier", "text": "glyph_format_init(v", "parent": 45, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 19}}, {"id": 47, "type": "parameter_list", "text": "glyph_format_t* format,\n const vglyph_object_backend_t* object_backend,\n const vglyph_format_backend_t* format_backend,\n const vglyph_packaging_bytes_t* packaging_bytes);\n", "parent": 45, "children": [48, 53, 59, 65], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 27, "column": 68}}, {"id": 48, "type": "parameter_declaration", "text": "lyph_format_t* format,\n", "parent": 47, "children": [49, 50], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 43}}, {"id": 49, "type": "type_identifier", "text": "lyph_format_t* ", "parent": 48, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 35}}, {"id": 50, "type": "pointer_declarator", "text": "format,\n", "parent": 48, "children": [51, 52], "start_point": {"row": 24, "column": 35}, "end_point": {"row": 24, "column": 43}}, {"id": 51, "type": "*", "text": "f", "parent": 50, "children": [], "start_point": {"row": 24, "column": 35}, "end_point": {"row": 24, "column": 36}}, {"id": 52, "type": "identifier", "text": "rmat,\n", "parent": 50, "children": [], "start_point": {"row": 24, "column": 37}, "end_point": {"row": 24, "column": 43}}, {"id": 53, "type": "parameter_declaration", "text": "nst vglyph_object_backend_t* object_backend,\n", "parent": 47, "children": [54, 55, 56], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 65}}, {"id": 54, "type": "type_qualifier", "text": "nst v", "parent": 53, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 25}}, {"id": 55, "type": "type_identifier", "text": "lyph_object_backend_t* ", "parent": 53, "children": [], "start_point": {"row": 25, "column": 26}, "end_point": {"row": 25, "column": 49}}, {"id": 56, "type": "pointer_declarator", "text": "object_backend,\n", "parent": 53, "children": [57, 58], "start_point": {"row": 25, "column": 49}, "end_point": {"row": 25, "column": 65}}, {"id": 57, "type": "*", "text": "o", "parent": 56, "children": [], "start_point": {"row": 25, "column": 49}, "end_point": {"row": 25, "column": 50}}, {"id": 58, "type": "identifier", "text": "ject_backend,\n", "parent": 56, "children": [], "start_point": {"row": 25, "column": 51}, "end_point": {"row": 25, "column": 65}}, {"id": 59, "type": "parameter_declaration", "text": "nst vglyph_format_backend_t* format_backend,\n", "parent": 47, "children": [60, 61, 62], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 65}}, {"id": 60, "type": "type_qualifier", "text": "nst v", "parent": 59, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 25}}, {"id": 61, "type": "type_identifier", "text": "lyph_format_backend_t* ", "parent": 59, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 49}}, {"id": 62, "type": "pointer_declarator", "text": "format_backend,\n", "parent": 59, "children": [63, 64], "start_point": {"row": 26, "column": 49}, "end_point": {"row": 26, "column": 65}}, {"id": 63, "type": "*", "text": "f", "parent": 62, "children": [], "start_point": {"row": 26, "column": 49}, "end_point": {"row": 26, "column": 50}}, {"id": 64, "type": "identifier", "text": "rmat_backend,\n", "parent": 62, "children": [], "start_point": {"row": 26, "column": 51}, "end_point": {"row": 26, "column": 65}}, {"id": 65, "type": "parameter_declaration", "text": "nst vglyph_packaging_bytes_t* packaging_bytes);", "parent": 47, "children": [66, 67, 68], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 67}}, {"id": 66, "type": "type_qualifier", "text": "nst v", "parent": 65, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 25}}, {"id": 67, "type": "type_identifier", "text": "lyph_packaging_bytes_t* ", "parent": 65, "children": [], "start_point": {"row": 27, "column": 26}, "end_point": {"row": 27, "column": 50}}, {"id": 68, "type": "pointer_declarator", "text": "packaging_bytes);", "parent": 65, "children": [69, 70], "start_point": {"row": 27, "column": 50}, "end_point": {"row": 27, "column": 67}}, {"id": 69, "type": "*", "text": "p", "parent": 68, "children": [], "start_point": {"row": 27, "column": 50}, "end_point": {"row": 27, "column": 51}}, {"id": 70, "type": "identifier", "text": "ckaging_bytes);", "parent": 68, "children": [], "start_point": {"row": 27, "column": 52}, "end_point": {"row": 27, "column": 67}}, {"id": 71, "type": "declaration", "text": "id\n_vglyph_format_ctor(vglyph_format_t* format);\n\n", "parent": 0, "children": [72, 73], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 45}}, {"id": 72, "type": "primitive_type", "text": "id\n_", "parent": 71, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 4}}, {"id": 73, "type": "function_declarator", "text": "glyph_format_ctor(vglyph_format_t* format);\n", "parent": 71, "children": [74, 75], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 44}}, {"id": 74, "type": "identifier", "text": "glyph_format_ctor(v", "parent": 73, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 19}}, {"id": 75, "type": "parameter_list", "text": "glyph_format_t* format);\n", "parent": 73, "children": [76], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 44}}, {"id": 76, "type": "parameter_declaration", "text": "lyph_format_t* format);", "parent": 75, "children": [77, 78], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 43}}, {"id": 77, "type": "type_identifier", "text": "lyph_format_t* ", "parent": 76, "children": [], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 35}}, {"id": 78, "type": "pointer_declarator", "text": "format);", "parent": 76, "children": [79, 80], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 43}}, {"id": 79, "type": "*", "text": "f", "parent": 78, "children": [], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 36}}, {"id": 80, "type": "identifier", "text": "rmat);", "parent": 78, "children": [], "start_point": {"row": 30, "column": 37}, "end_point": {"row": 30, "column": 43}}, {"id": 81, "type": "declaration", "text": "id\n_vglyph_format_dtor(vglyph_format_t* format);\n\n", "parent": 0, "children": [82, 83], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 45}}, {"id": 82, "type": "primitive_type", "text": "id\n_", "parent": 81, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 4}}, {"id": 83, "type": "function_declarator", "text": "glyph_format_dtor(vglyph_format_t* format);\n", "parent": 81, "children": [84, 85], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 44}}, {"id": 84, "type": "identifier", "text": "glyph_format_dtor(v", "parent": 83, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 19}}, {"id": 85, "type": "parameter_list", "text": "glyph_format_t* format);\n", "parent": 83, "children": [86], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 44}}, {"id": 86, "type": "parameter_declaration", "text": "lyph_format_t* format);", "parent": 85, "children": [87, 88], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 43}}, {"id": 87, "type": "type_identifier", "text": "lyph_format_t* ", "parent": 86, "children": [], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 35}}, {"id": 88, "type": "pointer_declarator", "text": "format);", "parent": 86, "children": [89, 90], "start_point": {"row": 33, "column": 35}, "end_point": {"row": 33, "column": 43}}, {"id": 89, "type": "*", "text": "f", "parent": 88, "children": [], "start_point": {"row": 33, "column": 35}, "end_point": {"row": 33, "column": 36}}, {"id": 90, "type": "identifier", "text": "rmat);", "parent": 88, "children": [], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 43}}, {"id": 91, "type": "declaration", "text": "lyph_bool_t\n_vglyph_format_is_cast(vglyph_type_t* type);\n\n", "parent": 0, "children": [92, 93], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 44}}, {"id": 92, "type": "type_identifier", "text": "lyph_bool_t\n_", "parent": 91, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 13}}, {"id": 93, "type": "function_declarator", "text": "glyph_format_is_cast(vglyph_type_t* type);\n", "parent": 91, "children": [94, 95], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 43}}, {"id": 94, "type": "identifier", "text": "glyph_format_is_cast(v", "parent": 93, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 22}}, {"id": 95, "type": "parameter_list", "text": "glyph_type_t* type);\n", "parent": 93, "children": [96], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 43}}, {"id": 96, "type": "parameter_declaration", "text": "lyph_type_t* type);", "parent": 95, "children": [97, 98], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 42}}, {"id": 97, "type": "type_identifier", "text": "lyph_type_t* ", "parent": 96, "children": [], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 36}}, {"id": 98, "type": "pointer_declarator", "text": "type);", "parent": 96, "children": [99, 100], "start_point": {"row": 36, "column": 36}, "end_point": {"row": 36, "column": 42}}, {"id": 99, "type": "*", "text": "t", "parent": 98, "children": [], "start_point": {"row": 36, "column": 36}, "end_point": {"row": 36, "column": 37}}, {"id": 100, "type": "identifier", "text": "pe);", "parent": 98, "children": [], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 42}}, {"id": 101, "type": "function_definition", "text": "atic inline vglyph_format_t*\n_vglyph_format_reference(vglyph_format_t* format)\n{\n assert(format);\n return (vglyph_format_t*)_vglyph_object_reference(&format->object);\n}\n\n", "parent": 0, "children": [102, 103, 105, 106], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 102, "type": "storage_class_specifier", "text": "atic i", "parent": 101, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 103, "type": "storage_class_specifier", "text": "line v", "parent": 101, "children": [104], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 13}}, {"id": 104, "type": "inline", "text": "line v", "parent": 103, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 13}}, {"id": 105, "type": "type_identifier", "text": "lyph_format_t*\n", "parent": 101, "children": [], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 29}}, {"id": 106, "type": "pointer_declarator", "text": "_vglyph_format_reference(vglyph_format_t* format)\n{", "parent": 101, "children": [107, 108], "start_point": {"row": 38, "column": 29}, "end_point": {"row": 39, "column": 49}}, {"id": 107, "type": "*", "text": "_", "parent": 106, "children": [], "start_point": {"row": 38, "column": 29}, "end_point": {"row": 38, "column": 30}}, {"id": 108, "type": "function_declarator", "text": "glyph_format_reference(vglyph_format_t* format)\n{", "parent": 106, "children": [109, 110], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 49}}, {"id": 109, "type": "identifier", "text": "glyph_format_reference(v", "parent": 108, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 24}}, {"id": 110, "type": "parameter_list", "text": "glyph_format_t* format)\n{", "parent": 108, "children": [111], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 49}}, {"id": 111, "type": "parameter_declaration", "text": "lyph_format_t* format)\n", "parent": 110, "children": [112, 113], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 48}}, {"id": 112, "type": "type_identifier", "text": "lyph_format_t* ", "parent": 111, "children": [], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 40}}, {"id": 113, "type": "pointer_declarator", "text": "format)\n", "parent": 111, "children": [114, 115], "start_point": {"row": 39, "column": 40}, "end_point": {"row": 39, "column": 48}}, {"id": 114, "type": "*", "text": "f", "parent": 113, "children": [], "start_point": {"row": 39, "column": 40}, "end_point": {"row": 39, "column": 41}}, {"id": 115, "type": "identifier", "text": "rmat)\n", "parent": 113, "children": [], "start_point": {"row": 39, "column": 42}, "end_point": {"row": 39, "column": 48}}, {"id": 116, "type": "call_expression", "text": "sert(format);\n", "parent": 101, "children": [117, 118], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 18}}, {"id": 117, "type": "identifier", "text": "sert(f", "parent": 116, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 10}}, {"id": 118, "type": "argument_list", "text": "ormat);\n", "parent": 116, "children": [119], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 18}}, {"id": 119, "type": "identifier", "text": "rmat);", "parent": 118, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 17}}, {"id": 120, "type": "return_statement", "text": "turn (vglyph_format_t*)_vglyph_object_reference(&format->object);\n}", "parent": 101, "children": [121], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 71}}, {"id": 121, "type": "cast_expression", "text": "glyph_format_t*)_vglyph_object_reference(&format->object);\n", "parent": 120, "children": [122, 126], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 70}}, {"id": 122, "type": "type_descriptor", "text": "lyph_format_t*)_", "parent": 121, "children": [123, 124], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 28}}, {"id": 123, "type": "type_identifier", "text": "lyph_format_t*)", "parent": 122, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 27}}, {"id": 124, "type": "abstract_pointer_declarator", "text": "_", "parent": 122, "children": [125], "start_point": {"row": 42, "column": 27}, "end_point": {"row": 42, "column": 28}}, {"id": 125, "type": "*", "text": "_", "parent": 124, "children": [], "start_point": {"row": 42, "column": 27}, "end_point": {"row": 42, "column": 28}}, {"id": 126, "type": "call_expression", "text": "glyph_object_reference(&format->object);\n", "parent": 121, "children": [127, 128], "start_point": {"row": 42, "column": 29}, "end_point": {"row": 42, "column": 70}}, {"id": 127, "type": "identifier", "text": "glyph_object_reference(&", "parent": 126, "children": [], "start_point": {"row": 42, "column": 29}, "end_point": {"row": 42, "column": 53}}, {"id": 128, "type": "argument_list", "text": "format->object);\n", "parent": 126, "children": [129], "start_point": {"row": 42, "column": 53}, "end_point": {"row": 42, "column": 70}}, {"id": 129, "type": "pointer_expression", "text": "ormat->object);", "parent": 128, "children": [130, 131], "start_point": {"row": 42, "column": 54}, "end_point": {"row": 42, "column": 69}}, {"id": 130, "type": "&", "text": "o", "parent": 129, "children": [], "start_point": {"row": 42, "column": 54}, "end_point": {"row": 42, "column": 55}}, {"id": 131, "type": "field_expression", "text": "rmat->object);", "parent": 129, "children": [132, 133, 134], "start_point": {"row": 42, "column": 55}, "end_point": {"row": 42, "column": 69}}, {"id": 132, "type": "identifier", "text": "rmat->", "parent": 131, "children": [], "start_point": {"row": 42, "column": 55}, "end_point": {"row": 42, "column": 61}}, {"id": 133, "type": "->", "text": "ob", "parent": 131, "children": [], "start_point": {"row": 42, "column": 61}, "end_point": {"row": 42, "column": 63}}, {"id": 134, "type": "field_identifier", "text": "ject);", "parent": 131, "children": [], "start_point": {"row": 42, "column": 63}, "end_point": {"row": 42, "column": 69}}, {"id": 135, "type": "function_definition", "text": "atic inline void\n_vglyph_format_destroy(vglyph_format_t* format)\n{\n assert(format);\n _vglyph_object_destroy(&format->object);\n}\n\n", "parent": 0, "children": [136, 137, 139, 140], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 136, "type": "storage_class_specifier", "text": "atic i", "parent": 135, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 6}}, {"id": 137, "type": "storage_class_specifier", "text": "line v", "parent": 135, "children": [138], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 13}}, {"id": 138, "type": "inline", "text": "line v", "parent": 137, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 13}}, {"id": 139, "type": "primitive_type", "text": "id\n_", "parent": 135, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 18}}, {"id": 140, "type": "function_declarator", "text": "glyph_format_destroy(vglyph_format_t* format)\n{", "parent": 135, "children": [141, 142], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 47}}, {"id": 141, "type": "identifier", "text": "glyph_format_destroy(v", "parent": 140, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 22}}, {"id": 142, "type": "parameter_list", "text": "glyph_format_t* format)\n{", "parent": 140, "children": [143], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 47}}, {"id": 143, "type": "parameter_declaration", "text": "lyph_format_t* format)\n", "parent": 142, "children": [144, 145], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 46}}, {"id": 144, "type": "type_identifier", "text": "lyph_format_t* ", "parent": 143, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 38}}, {"id": 145, "type": "pointer_declarator", "text": "format)\n", "parent": 143, "children": [146, 147], "start_point": {"row": 46, "column": 38}, "end_point": {"row": 46, "column": 46}}, {"id": 146, "type": "*", "text": "f", "parent": 145, "children": [], "start_point": {"row": 46, "column": 38}, "end_point": {"row": 46, "column": 39}}, {"id": 147, "type": "identifier", "text": "rmat)\n", "parent": 145, "children": [], "start_point": {"row": 46, "column": 40}, "end_point": {"row": 46, "column": 46}}, {"id": 148, "type": "call_expression", "text": "sert(format);\n", "parent": 135, "children": [149, 150], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 18}}, {"id": 149, "type": "identifier", "text": "sert(f", "parent": 148, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 10}}, {"id": 150, "type": "argument_list", "text": "ormat);\n", "parent": 148, "children": [151], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 18}}, {"id": 151, "type": "identifier", "text": "rmat);", "parent": 150, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 17}}, {"id": 152, "type": "call_expression", "text": "glyph_object_destroy(&format->object);\n", "parent": 135, "children": [153, 154], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 43}}, {"id": 153, "type": "identifier", "text": "glyph_object_destroy(&", "parent": 152, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 26}}, {"id": 154, "type": "argument_list", "text": "format->object);\n", "parent": 152, "children": [155], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 43}}, {"id": 155, "type": "pointer_expression", "text": "ormat->object);", "parent": 154, "children": [156, 157], "start_point": {"row": 49, "column": 27}, "end_point": {"row": 49, "column": 42}}, {"id": 156, "type": "&", "text": "o", "parent": 155, "children": [], "start_point": {"row": 49, "column": 27}, "end_point": {"row": 49, "column": 28}}, {"id": 157, "type": "field_expression", "text": "rmat->object);", "parent": 155, "children": [158, 159, 160], "start_point": {"row": 49, "column": 28}, "end_point": {"row": 49, "column": 42}}, {"id": 158, "type": "identifier", "text": "rmat->", "parent": 157, "children": [], "start_point": {"row": 49, "column": 28}, "end_point": {"row": 49, "column": 34}}, {"id": 159, "type": "->", "text": "ob", "parent": 157, "children": [], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 36}}, {"id": 160, "type": "field_identifier", "text": "ject);", "parent": 157, "children": [], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 42}}, {"id": 161, "type": "function_definition", "text": "atic inline int\n_vglyph_format_get_reference_count(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_reference_count(&format->object);\n}\n\n", "parent": 0, "children": [162, 163, 165, 166], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 57, "column": 1}}, {"id": 162, "type": "storage_class_specifier", "text": "atic i", "parent": 161, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 163, "type": "storage_class_specifier", "text": "line i", "parent": 161, "children": [164], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 13}}, {"id": 164, "type": "inline", "text": "line i", "parent": 163, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 13}}, {"id": 165, "type": "primitive_type", "text": "t\n_", "parent": 161, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 17}}, {"id": 166, "type": "function_declarator", "text": "glyph_format_get_reference_count(vglyph_format_t* format)\n{", "parent": 161, "children": [167, 168], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 59}}, {"id": 167, "type": "identifier", "text": "glyph_format_get_reference_count(v", "parent": 166, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 34}}, {"id": 168, "type": "parameter_list", "text": "glyph_format_t* format)\n{", "parent": 166, "children": [169], "start_point": {"row": 53, "column": 34}, "end_point": {"row": 53, "column": 59}}, {"id": 169, "type": "parameter_declaration", "text": "lyph_format_t* format)\n", "parent": 168, "children": [170, 171], "start_point": {"row": 53, "column": 35}, "end_point": {"row": 53, "column": 58}}, {"id": 170, "type": "type_identifier", "text": "lyph_format_t* ", "parent": 169, "children": [], "start_point": {"row": 53, "column": 35}, "end_point": {"row": 53, "column": 50}}, {"id": 171, "type": "pointer_declarator", "text": "format)\n", "parent": 169, "children": [172, 173], "start_point": {"row": 53, "column": 50}, "end_point": {"row": 53, "column": 58}}, {"id": 172, "type": "*", "text": "f", "parent": 171, "children": [], "start_point": {"row": 53, "column": 50}, "end_point": {"row": 53, "column": 51}}, {"id": 173, "type": "identifier", "text": "rmat)\n", "parent": 171, "children": [], "start_point": {"row": 53, "column": 52}, "end_point": {"row": 53, "column": 58}}, {"id": 174, "type": "call_expression", "text": "sert(format);\n", "parent": 161, "children": [175, 176], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 18}}, {"id": 175, "type": "identifier", "text": "sert(f", "parent": 174, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 10}}, {"id": 176, "type": "argument_list", "text": "ormat);\n", "parent": 174, "children": [177], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 18}}, {"id": 177, "type": "identifier", "text": "rmat);", "parent": 176, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 17}}, {"id": 178, "type": "return_statement", "text": "turn _vglyph_object_get_reference_count(&format->object);\n}", "parent": 161, "children": [179], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 63}}, {"id": 179, "type": "call_expression", "text": "glyph_object_get_reference_count(&format->object);\n", "parent": 178, "children": [180, 181], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 62}}, {"id": 180, "type": "identifier", "text": "glyph_object_get_reference_count(&", "parent": 179, "children": [], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 45}}, {"id": 181, "type": "argument_list", "text": "format->object);\n", "parent": 179, "children": [182], "start_point": {"row": 56, "column": 45}, "end_point": {"row": 56, "column": 62}}, {"id": 182, "type": "pointer_expression", "text": "ormat->object);", "parent": 181, "children": [183, 184], "start_point": {"row": 56, "column": 46}, "end_point": {"row": 56, "column": 61}}, {"id": 183, "type": "&", "text": "o", "parent": 182, "children": [], "start_point": {"row": 56, "column": 46}, "end_point": {"row": 56, "column": 47}}, {"id": 184, "type": "field_expression", "text": "rmat->object);", "parent": 182, "children": [185, 186, 187], "start_point": {"row": 56, "column": 47}, "end_point": {"row": 56, "column": 61}}, {"id": 185, "type": "identifier", "text": "rmat->", "parent": 184, "children": [], "start_point": {"row": 56, "column": 47}, "end_point": {"row": 56, "column": 53}}, {"id": 186, "type": "->", "text": "ob", "parent": 184, "children": [], "start_point": {"row": 56, "column": 53}, "end_point": {"row": 56, "column": 55}}, {"id": 187, "type": "field_identifier", "text": "ject);", "parent": 184, "children": [], "start_point": {"row": 56, "column": 55}, "end_point": {"row": 56, "column": 61}}, {"id": 188, "type": "function_definition", "text": "atic inline vglyph_state_t\n_vglyph_format_get_state(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_state(&format->object);\n}\n\n", "parent": 0, "children": [189, 190, 192, 193], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 189, "type": "storage_class_specifier", "text": "atic i", "parent": 188, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 6}}, {"id": 190, "type": "storage_class_specifier", "text": "line v", "parent": 188, "children": [191], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 13}}, {"id": 191, "type": "inline", "text": "line v", "parent": 190, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 13}}, {"id": 192, "type": "type_identifier", "text": "lyph_state_t\n_", "parent": 188, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 28}}, {"id": 193, "type": "function_declarator", "text": "glyph_format_get_state(vglyph_format_t* format)\n{", "parent": 188, "children": [194, 195], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 49}}, {"id": 194, "type": "identifier", "text": "glyph_format_get_state(v", "parent": 193, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 24}}, {"id": 195, "type": "parameter_list", "text": "glyph_format_t* format)\n{", "parent": 193, "children": [196], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 49}}, {"id": 196, "type": "parameter_declaration", "text": "lyph_format_t* format)\n", "parent": 195, "children": [197, 198], "start_point": {"row": 60, "column": 25}, "end_point": {"row": 60, "column": 48}}, {"id": 197, "type": "type_identifier", "text": "lyph_format_t* ", "parent": 196, "children": [], "start_point": {"row": 60, "column": 25}, "end_point": {"row": 60, "column": 40}}, {"id": 198, "type": "pointer_declarator", "text": "format)\n", "parent": 196, "children": [199, 200], "start_point": {"row": 60, "column": 40}, "end_point": {"row": 60, "column": 48}}, {"id": 199, "type": "*", "text": "f", "parent": 198, "children": [], "start_point": {"row": 60, "column": 40}, "end_point": {"row": 60, "column": 41}}, {"id": 200, "type": "identifier", "text": "rmat)\n", "parent": 198, "children": [], "start_point": {"row": 60, "column": 42}, "end_point": {"row": 60, "column": 48}}, {"id": 201, "type": "call_expression", "text": "sert(format);\n", "parent": 188, "children": [202, 203], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 18}}, {"id": 202, "type": "identifier", "text": "sert(f", "parent": 201, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 10}}, {"id": 203, "type": "argument_list", "text": "ormat);\n", "parent": 201, "children": [204], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 18}}, {"id": 204, "type": "identifier", "text": "rmat);", "parent": 203, "children": [], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 17}}, {"id": 205, "type": "return_statement", "text": "turn _vglyph_object_get_state(&format->object);\n}", "parent": 188, "children": [206], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 53}}, {"id": 206, "type": "call_expression", "text": "glyph_object_get_state(&format->object);\n", "parent": 205, "children": [207, 208], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 52}}, {"id": 207, "type": "identifier", "text": "glyph_object_get_state(&", "parent": 206, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 35}}, {"id": 208, "type": "argument_list", "text": "format->object);\n", "parent": 206, "children": [209], "start_point": {"row": 63, "column": 35}, "end_point": {"row": 63, "column": 52}}, {"id": 209, "type": "pointer_expression", "text": "ormat->object);", "parent": 208, "children": [210, 211], "start_point": {"row": 63, "column": 36}, "end_point": {"row": 63, "column": 51}}, {"id": 210, "type": "&", "text": "o", "parent": 209, "children": [], "start_point": {"row": 63, "column": 36}, "end_point": {"row": 63, "column": 37}}, {"id": 211, "type": "field_expression", "text": "rmat->object);", "parent": 209, "children": [212, 213, 214], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 51}}, {"id": 212, "type": "identifier", "text": "rmat->", "parent": 211, "children": [], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 43}}, {"id": 213, "type": "->", "text": "ob", "parent": 211, "children": [], "start_point": {"row": 63, "column": 43}, "end_point": {"row": 63, "column": 45}}, {"id": 214, "type": "field_identifier", "text": "ject);", "parent": 211, "children": [], "start_point": {"row": 63, "column": 45}, "end_point": {"row": 63, "column": 51}}, {"id": 215, "type": "function_definition", "text": "atic inline void\n_vglyph_format_set_state(vglyph_format_t* format,\n vglyph_state_t state)\n{\n assert(format);\n _vglyph_object_set_state(&format->object, state);\n}\n\n", "parent": 0, "children": [216, 217, 219, 220], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 72, "column": 1}}, {"id": 216, "type": "storage_class_specifier", "text": "atic i", "parent": 215, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 217, "type": "storage_class_specifier", "text": "line v", "parent": 215, "children": [218], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 13}}, {"id": 218, "type": "inline", "text": "line v", "parent": 217, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 13}}, {"id": 219, "type": "primitive_type", "text": "id\n_", "parent": 215, "children": [], "start_point": {"row": 66, "column": 14}, "end_point": {"row": 66, "column": 18}}, {"id": 220, "type": "function_declarator", "text": "glyph_format_set_state(vglyph_format_t* format,\n vglyph_state_t state)\n{", "parent": 215, "children": [221, 222], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 68, "column": 46}}, {"id": 221, "type": "identifier", "text": "glyph_format_set_state(v", "parent": 220, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 24}}, {"id": 222, "type": "parameter_list", "text": "glyph_format_t* format,\n vglyph_state_t state)\n{", "parent": 220, "children": [223, 228], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 68, "column": 46}}, {"id": 223, "type": "parameter_declaration", "text": "lyph_format_t* format,\n", "parent": 222, "children": [224, 225], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 48}}, {"id": 224, "type": "type_identifier", "text": "lyph_format_t* ", "parent": 223, "children": [], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 40}}, {"id": 225, "type": "pointer_declarator", "text": "format,\n", "parent": 223, "children": [226, 227], "start_point": {"row": 67, "column": 40}, "end_point": {"row": 67, "column": 48}}, {"id": 226, "type": "*", "text": "f", "parent": 225, "children": [], "start_point": {"row": 67, "column": 40}, "end_point": {"row": 67, "column": 41}}, {"id": 227, "type": "identifier", "text": "rmat,\n", "parent": 225, "children": [], "start_point": {"row": 67, "column": 42}, "end_point": {"row": 67, "column": 48}}, {"id": 228, "type": "parameter_declaration", "text": "lyph_state_t state)\n", "parent": 222, "children": [229, 230], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 45}}, {"id": 229, "type": "type_identifier", "text": "lyph_state_t s", "parent": 228, "children": [], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 39}}, {"id": 230, "type": "identifier", "text": "ate)\n", "parent": 228, "children": [], "start_point": {"row": 68, "column": 40}, "end_point": {"row": 68, "column": 45}}, {"id": 231, "type": "call_expression", "text": "sert(format);\n", "parent": 215, "children": [232, 233], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 18}}, {"id": 232, "type": "identifier", "text": "sert(f", "parent": 231, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 10}}, {"id": 233, "type": "argument_list", "text": "ormat);\n", "parent": 231, "children": [234], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 18}}, {"id": 234, "type": "identifier", "text": "rmat);", "parent": 233, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 17}}, {"id": 235, "type": "call_expression", "text": "glyph_object_set_state(&format->object, state);\n", "parent": 215, "children": [236, 237], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 52}}, {"id": 236, "type": "identifier", "text": "glyph_object_set_state(&", "parent": 235, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 28}}, {"id": 237, "type": "argument_list", "text": "format->object, state);\n", "parent": 235, "children": [238, 244], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 52}}, {"id": 238, "type": "pointer_expression", "text": "ormat->object, ", "parent": 237, "children": [239, 240], "start_point": {"row": 71, "column": 29}, "end_point": {"row": 71, "column": 44}}, {"id": 239, "type": "&", "text": "o", "parent": 238, "children": [], "start_point": {"row": 71, "column": 29}, "end_point": {"row": 71, "column": 30}}, {"id": 240, "type": "field_expression", "text": "rmat->object, ", "parent": 238, "children": [241, 242, 243], "start_point": {"row": 71, "column": 30}, "end_point": {"row": 71, "column": 44}}, {"id": 241, "type": "identifier", "text": "rmat->", "parent": 240, "children": [], "start_point": {"row": 71, "column": 30}, "end_point": {"row": 71, "column": 36}}, {"id": 242, "type": "->", "text": "ob", "parent": 240, "children": [], "start_point": {"row": 71, "column": 36}, "end_point": {"row": 71, "column": 38}}, {"id": 243, "type": "field_identifier", "text": "ject, ", "parent": 240, "children": [], "start_point": {"row": 71, "column": 38}, "end_point": {"row": 71, "column": 44}}, {"id": 244, "type": "identifier", "text": "ate);", "parent": 237, "children": [], "start_point": {"row": 71, "column": 46}, "end_point": {"row": 71, "column": 51}}, {"id": 245, "type": "function_definition", "text": "atic inline vglyph_bool_t\n_vglyph_format_is_valid(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_is_valid(&format->object);\n}\n\n", "parent": 0, "children": [246, 247, 249, 250], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 79, "column": 1}}, {"id": 246, "type": "storage_class_specifier", "text": "atic i", "parent": 245, "children": [], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 6}}, {"id": 247, "type": "storage_class_specifier", "text": "line v", "parent": 245, "children": [248], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 13}}, {"id": 248, "type": "inline", "text": "line v", "parent": 247, "children": [], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 13}}, {"id": 249, "type": "type_identifier", "text": "lyph_bool_t\n_", "parent": 245, "children": [], "start_point": {"row": 74, "column": 14}, "end_point": {"row": 74, "column": 27}}, {"id": 250, "type": "function_declarator", "text": "glyph_format_is_valid(vglyph_format_t* format)\n{", "parent": 245, "children": [251, 252], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 48}}, {"id": 251, "type": "identifier", "text": "glyph_format_is_valid(v", "parent": 250, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 23}}, {"id": 252, "type": "parameter_list", "text": "glyph_format_t* format)\n{", "parent": 250, "children": [253], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 48}}, {"id": 253, "type": "parameter_declaration", "text": "lyph_format_t* format)\n", "parent": 252, "children": [254, 255], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 47}}, {"id": 254, "type": "type_identifier", "text": "lyph_format_t* ", "parent": 253, "children": [], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 39}}, {"id": 255, "type": "pointer_declarator", "text": "format)\n", "parent": 253, "children": [256, 257], "start_point": {"row": 75, "column": 39}, "end_point": {"row": 75, "column": 47}}, {"id": 256, "type": "*", "text": "f", "parent": 255, "children": [], "start_point": {"row": 75, "column": 39}, "end_point": {"row": 75, "column": 40}}, {"id": 257, "type": "identifier", "text": "rmat)\n", "parent": 255, "children": [], "start_point": {"row": 75, "column": 41}, "end_point": {"row": 75, "column": 47}}, {"id": 258, "type": "call_expression", "text": "sert(format);\n", "parent": 245, "children": [259, 260], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 18}}, {"id": 259, "type": "identifier", "text": "sert(f", "parent": 258, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 10}}, {"id": 260, "type": "argument_list", "text": "ormat);\n", "parent": 258, "children": [261], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 18}}, {"id": 261, "type": "identifier", "text": "rmat);", "parent": 260, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 17}}, {"id": 262, "type": "return_statement", "text": "turn _vglyph_object_is_valid(&format->object);\n}", "parent": 245, "children": [263], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 52}}, {"id": 263, "type": "call_expression", "text": "glyph_object_is_valid(&format->object);\n", "parent": 262, "children": [264, 265], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 51}}, {"id": 264, "type": "identifier", "text": "glyph_object_is_valid(&", "parent": 263, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 34}}, {"id": 265, "type": "argument_list", "text": "format->object);\n", "parent": 263, "children": [266], "start_point": {"row": 78, "column": 34}, "end_point": {"row": 78, "column": 51}}, {"id": 266, "type": "pointer_expression", "text": "ormat->object);", "parent": 265, "children": [267, 268], "start_point": {"row": 78, "column": 35}, "end_point": {"row": 78, "column": 50}}, {"id": 267, "type": "&", "text": "o", "parent": 266, "children": [], "start_point": {"row": 78, "column": 35}, "end_point": {"row": 78, "column": 36}}, {"id": 268, "type": "field_expression", "text": "rmat->object);", "parent": 266, "children": [269, 270, 271], "start_point": {"row": 78, "column": 36}, "end_point": {"row": 78, "column": 50}}, {"id": 269, "type": "identifier", "text": "rmat->", "parent": 268, "children": [], "start_point": {"row": 78, "column": 36}, "end_point": {"row": 78, "column": 42}}, {"id": 270, "type": "->", "text": "ob", "parent": 268, "children": [], "start_point": {"row": 78, "column": 42}, "end_point": {"row": 78, "column": 44}}, {"id": 271, "type": "field_identifier", "text": "ject);", "parent": 268, "children": [], "start_point": {"row": 78, "column": 44}, "end_point": {"row": 78, "column": 50}}, {"id": 272, "type": "#endif", "text": "ndif\n", "parent": 0, "children": [], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 6}}]}, "node_categories": {"declarations": {"functions": [16, 45, 73, 83, 93, 101, 108, 135, 140, 161, 166, 188, 193, 215, 220, 245, 250], "variables": [9, 14, 22, 31, 34, 40, 43, 48, 53, 59, 65, 71, 76, 81, 86, 91, 96, 111, 143, 169, 196, 223, 228, 253], "classes": [11, 12, 28, 29, 102, 103, 136, 137, 162, 163, 189, 190, 216, 217, 246, 247], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [116, 121, 126, 129, 131, 148, 152, 155, 157, 174, 179, 182, 184, 201, 206, 209, 211, 231, 235, 238, 240, 258, 263, 266, 268], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 13, 15, 20, 23, 26, 27, 30, 32, 33, 35, 36, 39, 41, 42, 46, 49, 52, 54, 55, 58, 60, 61, 64, 66, 67, 70, 74, 77, 80, 84, 87, 90, 92, 94, 97, 100, 105, 109, 112, 115, 117, 119, 123, 127, 132, 134, 141, 144, 147, 149, 151, 153, 158, 160, 167, 170, 173, 175, 177, 180, 185, 187, 192, 194, 197, 200, 202, 204, 207, 212, 214, 221, 224, 227, 229, 230, 232, 234, 236, 241, 243, 244, 249, 251, 254, 257, 259, 261, 264, 269, 271, 272], "returns": [120, 178, 205, 262], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 16, "universal_type": "function", "name": "unknown", "text_snippet": "get_bits_per_pixel)(vglyph_format_t* format);\n"}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "glyph_format_init(vglyph_format_t* format,\n const vglyph_object_backend_t* object"}, {"node_id": 73, "universal_type": "function", "name": "unknown", "text_snippet": "glyph_format_ctor(vglyph_format_t* format);\n"}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "glyph_format_dtor(vglyph_format_t* format);\n"}, {"node_id": 93, "universal_type": "function", "name": "unknown", "text_snippet": "glyph_format_is_cast(vglyph_type_t* type);\n"}, {"node_id": 101, "universal_type": "function", "name": "unknown", "text_snippet": "atic inline vglyph_format_t*\n_vglyph_format_reference(vglyph_format_t* format)\n{\n assert(format);"}, {"node_id": 108, "universal_type": "function", "name": "unknown", "text_snippet": "glyph_format_reference(vglyph_format_t* format)\n{"}, {"node_id": 135, "universal_type": "function", "name": "_vglyph_format_destroy", "text_snippet": "atic inline void\n_vglyph_format_destroy(vglyph_format_t* format)\n{\n assert(format);\n _vglyph_o"}, {"node_id": 140, "universal_type": "function", "name": "unknown", "text_snippet": "glyph_format_destroy(vglyph_format_t* format)\n{"}, {"node_id": 161, "universal_type": "function", "name": "_vglyph_format_get_reference_count", "text_snippet": "atic inline int\n_vglyph_format_get_reference_count(vglyph_format_t* format)\n{\n assert(format);\n "}, {"node_id": 166, "universal_type": "function", "name": "unknown", "text_snippet": "glyph_format_get_reference_count(vglyph_format_t* format)\n{"}, {"node_id": 188, "universal_type": "function", "name": "unknown", "text_snippet": "atic inline vglyph_state_t\n_vglyph_format_get_state(vglyph_format_t* format)\n{\n assert(format);\n "}, {"node_id": 193, "universal_type": "function", "name": "unknown", "text_snippet": "glyph_format_get_state(vglyph_format_t* format)\n{"}, {"node_id": 215, "universal_type": "function", "name": "_vglyph_format_set_state", "text_snippet": "atic inline void\n_vglyph_format_set_state(vglyph_format_t* format,\n vglyph_s"}, {"node_id": 220, "universal_type": "function", "name": "unknown", "text_snippet": "glyph_format_set_state(vglyph_format_t* format,\n vglyph_state_t state)\n{"}, {"node_id": 245, "universal_type": "function", "name": "unknown", "text_snippet": "atic inline vglyph_bool_t\n_vglyph_format_is_valid(vglyph_format_t* format)\n{\n assert(format);\n "}, {"node_id": 250, "universal_type": "function", "name": "unknown", "text_snippet": "glyph_format_is_valid(vglyph_format_t* format)\n{"}], "class_declarations": [{"node_id": 11, "universal_type": "class", "name": "unknown", "text_snippet": "ruct _vglyph_format_backend\n{\n vglyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n} "}, {"node_id": 12, "universal_type": "class", "name": "unknown", "text_snippet": "ruct _"}, {"node_id": 28, "universal_type": "class", "name": "unknown", "text_snippet": "ruct _vglyph_format\n{\n vglyph_object_t object;\n const vglyph_format_backend_t* backend;\n vg"}, {"node_id": 29, "universal_type": "class", "name": "unknown", "text_snippet": "ruct _"}, {"node_id": 102, "universal_type": "class", "name": "unknown", "text_snippet": "atic i"}, {"node_id": 103, "universal_type": "class", "name": "unknown", "text_snippet": "line v"}, {"node_id": 136, "universal_type": "class", "name": "unknown", "text_snippet": "atic i"}, {"node_id": 137, "universal_type": "class", "name": "unknown", "text_snippet": "line v"}, {"node_id": 162, "universal_type": "class", "name": "unknown", "text_snippet": "atic i"}, {"node_id": 163, "universal_type": "class", "name": "unknown", "text_snippet": "line i"}, {"node_id": 189, "universal_type": "class", "name": "unknown", "text_snippet": "atic i"}, {"node_id": 190, "universal_type": "class", "name": "unknown", "text_snippet": "line v"}, {"node_id": 216, "universal_type": "class", "name": "unknown", "text_snippet": "atic i"}, {"node_id": 217, "universal_type": "class", "name": "unknown", "text_snippet": "line v"}, {"node_id": 246, "universal_type": "class", "name": "unknown", "text_snippet": "atic i"}, {"node_id": 247, "universal_type": "class", "name": "unknown", "text_snippet": "line v"}], "import_statements": [{"node_id": 6, "text": "nclude \"vglyph-object.h\"\n\nt"}, {"node_id": 7, "text": "nclude \""}]}, "original_source_code": "\ufeff/* vglyph - library for visualize glyphs\n *\n * File: vglyph-format.h\n * Copyright (C) 2016 <NAME>\n */\n\n#ifndef VGLYPH_FORMAT_H\n#define VGLYPH_FORMAT_H\n\n#include \"vglyph-object.h\"\n\ntypedef struct _vglyph_format_backend\n{\n vglyph_uint32_t (*get_bits_per_pixel)(vglyph_format_t* format);\n} vglyph_format_backend_t;\n\nstruct _vglyph_format\n{\n vglyph_object_t object;\n const vglyph_format_backend_t* backend;\n vglyph_packaging_bytes_t packaging_bytes;\n};\n\nvoid\n_vglyph_format_init(vglyph_format_t* format,\n const vglyph_object_backend_t* object_backend,\n const vglyph_format_backend_t* format_backend,\n const vglyph_packaging_bytes_t* packaging_bytes);\n\nvoid\n_vglyph_format_ctor(vglyph_format_t* format);\n\nvoid\n_vglyph_format_dtor(vglyph_format_t* format);\n\nvglyph_bool_t\n_vglyph_format_is_cast(vglyph_type_t* type);\n\nstatic inline vglyph_format_t*\n_vglyph_format_reference(vglyph_format_t* format)\n{\n assert(format);\n return (vglyph_format_t*)_vglyph_object_reference(&format->object);\n}\n\nstatic inline void\n_vglyph_format_destroy(vglyph_format_t* format)\n{\n assert(format);\n _vglyph_object_destroy(&format->object);\n}\n\nstatic inline int\n_vglyph_format_get_reference_count(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_reference_count(&format->object);\n}\n\nstatic inline vglyph_state_t\n_vglyph_format_get_state(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_get_state(&format->object);\n}\n\nstatic inline void\n_vglyph_format_set_state(vglyph_format_t* format,\n vglyph_state_t state)\n{\n assert(format);\n _vglyph_object_set_state(&format->object, state);\n}\n\nstatic inline vglyph_bool_t\n_vglyph_format_is_valid(vglyph_format_t* format)\n{\n assert(format);\n return _vglyph_object_is_valid(&format->object);\n}\n\n#endif\n"}
314
c
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_ #define ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/cdrs/CDRSExport.h> namespace AlibabaCloud { namespace CDRS { namespace Model { class ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult { public: struct Data { struct BodyListItem { std::string targetImageUrl; int rightBottomX; std::string deviceID; int rightBottomY; std::string sourceImageUrl; int leftTopY; int leftTopX; float deviceLongitude; std::string objectType; float score; std::string personId; float deviceLatitude; std::string shotTime; std::string deviceName; }; struct FaceListItem { std::string targetImageUrl; int rightBottomX; std::string deviceID; int rightBottomY; std::string sourceImageUrl; int leftTopY; int leftTopX; float deviceLongitude; std::string objectType; float score; std::string personId; float deviceLatitude; std::string shotTime; std::string deviceName; }; struct MotorListItem { std::string targetImageUrl; int rightBottomX; std::string deviceID; int rightBottomY; std::string sourceImageUrl; int leftTopY; int leftTopX; float deviceLongitude; std::string objectType; float score; std::string personId; float deviceLatitude; std::string shotTime; std::string deviceName; }; struct NonMotorListItem { std::string targetImageUrl; int rightBottomX; std::string deviceID; int rightBottomY; std::string sourceImageUrl; int leftTopY; int leftTopX; float deviceLongitude; std::string objectType; float score; std::string personId; float deviceLatitude; std::string shotTime; std::string deviceName; }; std::vector<NonMotorListItem> nonMotorList; std::vector<BodyListItem> bodyList; std::vector<FaceListItem> faceList; std::vector<MotorListItem> motorList; }; SearchAggregateObjectResult(); explicit SearchAggregateObjectResult(const std::string &payload); ~SearchAggregateObjectResult(); std::string getMessage()const; long getPageSize()const; int getTotal()const; Data getData()const; std::string getCode()const; bool getSuccess()const; protected: void parse(const std::string &payload); private: std::string message_; long pageSize_; int total_; Data data_; std::string code_; bool success_; }; } } } #endif // !ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_
26.08
130
(translation_unit) "/*\n * Copyright 2009-2017 Alibaba Cloud All rights reserved.\n * \n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_\n#define ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_\n\n#include <string>\n#include <vector>\n#include <utility>\n#include <alibabacloud/core/ServiceResult.h>\n#include <alibabacloud/cdrs/CDRSExport.h>\n\nnamespace AlibabaCloud\n{\n namespace CDRS\n {\n namespace Model\n {\n class ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n {\n public:\n struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();\n explicit SearchAggregateObjectResult(const std::string &payload);\n ~SearchAggregateObjectResult();\n std::string getMessage()const;\n long getPageSize()const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);\n private:\n std::string message_;\n long pageSize_;\n int total_;\n Data data_;\n std::string code_;\n bool success_;\n\n };\n }\n }\n}\n#endif // !ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_" (comment) "/*\n * Copyright 2009-2017 Alibaba Cloud All rights reserved.\n * \n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */" (preproc_ifdef) "#ifndef ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_\n#define ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_\n\n#include <string>\n#include <vector>\n#include <utility>\n#include <alibabacloud/core/ServiceResult.h>\n#include <alibabacloud/cdrs/CDRSExport.h>\n\nnamespace AlibabaCloud\n{\n namespace CDRS\n {\n namespace Model\n {\n class ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n {\n public:\n struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();\n explicit SearchAggregateObjectResult(const std::string &payload);\n ~SearchAggregateObjectResult();\n std::string getMessage()const;\n long getPageSize()const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);\n private:\n std::string message_;\n long pageSize_;\n int total_;\n Data data_;\n std::string code_;\n bool success_;\n\n };\n }\n }\n}\n#endif" (#ifndef) "#ifndef" (identifier) "ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_" (preproc_def) "#define ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_\n" (#define) "#define" (identifier) "ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (preproc_include) "#include <utility>\n" (#include) "#include" (system_lib_string) "<utility>" (preproc_include) "#include <alibabacloud/core/ServiceResult.h>\n" (#include) "#include" (system_lib_string) "<alibabacloud/core/ServiceResult.h>" (preproc_include) "#include <alibabacloud/cdrs/CDRSExport.h>\n" (#include) "#include" (system_lib_string) "<alibabacloud/cdrs/CDRSExport.h>" (function_definition) "namespace AlibabaCloud\n{\n namespace CDRS\n {\n namespace Model\n {\n class ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n {\n public:\n struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();\n explicit SearchAggregateObjectResult(const std::string &payload);\n ~SearchAggregateObjectResult();\n std::string getMessage()const;\n long getPageSize()const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);\n private:\n std::string message_;\n long pageSize_;\n int total_;\n Data data_;\n std::string code_;\n bool success_;\n\n };\n }\n }\n}" (type_identifier) "namespace" (identifier) "AlibabaCloud" (compound_statement) "{\n namespace CDRS\n {\n namespace Model\n {\n class ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n {\n public:\n struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();\n explicit SearchAggregateObjectResult(const std::string &payload);\n ~SearchAggregateObjectResult();\n std::string getMessage()const;\n long getPageSize()const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);\n private:\n std::string message_;\n long pageSize_;\n int total_;\n Data data_;\n std::string code_;\n bool success_;\n\n };\n }\n }\n}" ({) "{" (function_definition) "namespace CDRS\n {\n namespace Model\n {\n class ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n {\n public:\n struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();\n explicit SearchAggregateObjectResult(const std::string &payload);\n ~SearchAggregateObjectResult();\n std::string getMessage()const;\n long getPageSize()const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);\n private:\n std::string message_;\n long pageSize_;\n int total_;\n Data data_;\n std::string code_;\n bool success_;\n\n };\n }\n }" (type_identifier) "namespace" (identifier) "CDRS" (compound_statement) "{\n namespace Model\n {\n class ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n {\n public:\n struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();\n explicit SearchAggregateObjectResult(const std::string &payload);\n ~SearchAggregateObjectResult();\n std::string getMessage()const;\n long getPageSize()const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);\n private:\n std::string message_;\n long pageSize_;\n int total_;\n Data data_;\n std::string code_;\n bool success_;\n\n };\n }\n }" ({) "{" (function_definition) "namespace Model\n {\n class ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n {\n public:\n struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();\n explicit SearchAggregateObjectResult(const std::string &payload);\n ~SearchAggregateObjectResult();\n std::string getMessage()const;\n long getPageSize()const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);\n private:\n std::string message_;\n long pageSize_;\n int total_;\n Data data_;\n std::string code_;\n bool success_;\n\n };\n }" (type_identifier) "namespace" (identifier) "Model" (compound_statement) "{\n class ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n {\n public:\n struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();\n explicit SearchAggregateObjectResult(const std::string &payload);\n ~SearchAggregateObjectResult();\n std::string getMessage()const;\n long getPageSize()const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);\n private:\n std::string message_;\n long pageSize_;\n int total_;\n Data data_;\n std::string code_;\n bool success_;\n\n };\n }" ({) "{" (declaration) "class ALIBABACLOUD_CDRS_EXPORT" (type_identifier) "class" (identifier) "ALIBABACLOUD_CDRS_EXPORT" (;) "" (labeled_statement) "SearchAggregateObjectResult : public ServiceResult\n {\n public:\n struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();\n explicit SearchAggregateObjectResult(const std::string &payload);\n ~SearchAggregateObjectResult();\n std::string getMessage()const;\n long getPageSize()const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);\n private:\n std::string message_;\n long pageSize_;\n int total_;\n Data data_;\n std::string code_;\n bool success_;\n\n }" (statement_identifier) "SearchAggregateObjectResult" (:) ":" (ERROR) "public ServiceResult" (type_identifier) "public" (identifier) "ServiceResult" (compound_statement) "{\n public:\n struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();\n explicit SearchAggregateObjectResult(const std::string &payload);\n ~SearchAggregateObjectResult();\n std::string getMessage()const;\n long getPageSize()const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);\n private:\n std::string message_;\n long pageSize_;\n int total_;\n Data data_;\n std::string code_;\n bool success_;\n\n }" ({) "{" (labeled_statement) "public:\n struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();" (statement_identifier) "public" (:) ":" (declaration) "struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n };\n\n\n SearchAggregateObjectResult();" (struct_specifier) "struct Data\n {\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n }" (struct) "struct" (type_identifier) "Data" (field_declaration_list) "{\n struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };\n std::vector<NonMotorListItem> nonMotorList;\n std::vector<BodyListItem> bodyList;\n std::vector<FaceListItem> faceList;\n std::vector<MotorListItem> motorList;\n }" ({) "{" (field_declaration) "struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };" (struct_specifier) "struct BodyListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n }" (struct) "struct" (type_identifier) "BodyListItem" (field_declaration_list) "{\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n }" ({) "{" (field_declaration) "std::string targetImageUrl;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "targetImageUrl" (;) ";" (field_declaration) "int rightBottomX;" (primitive_type) "int" (field_identifier) "rightBottomX" (;) ";" (field_declaration) "std::string deviceID;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "deviceID" (;) ";" (field_declaration) "int rightBottomY;" (primitive_type) "int" (field_identifier) "rightBottomY" (;) ";" (field_declaration) "std::string sourceImageUrl;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "sourceImageUrl" (;) ";" (field_declaration) "int leftTopY;" (primitive_type) "int" (field_identifier) "leftTopY" (;) ";" (field_declaration) "int leftTopX;" (primitive_type) "int" (field_identifier) "leftTopX" (;) ";" (field_declaration) "float deviceLongitude;" (primitive_type) "float" (field_identifier) "deviceLongitude" (;) ";" (field_declaration) "std::string objectType;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "objectType" (;) ";" (field_declaration) "float score;" (primitive_type) "float" (field_identifier) "score" (;) ";" (field_declaration) "std::string personId;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "personId" (;) ";" (field_declaration) "float deviceLatitude;" (primitive_type) "float" (field_identifier) "deviceLatitude" (;) ";" (field_declaration) "std::string shotTime;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "shotTime" (;) ";" (field_declaration) "std::string deviceName;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "deviceName" (;) ";" (}) "}" (;) ";" (field_declaration) "struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };" (struct_specifier) "struct FaceListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n }" (struct) "struct" (type_identifier) "FaceListItem" (field_declaration_list) "{\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n }" ({) "{" (field_declaration) "std::string targetImageUrl;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "targetImageUrl" (;) ";" (field_declaration) "int rightBottomX;" (primitive_type) "int" (field_identifier) "rightBottomX" (;) ";" (field_declaration) "std::string deviceID;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "deviceID" (;) ";" (field_declaration) "int rightBottomY;" (primitive_type) "int" (field_identifier) "rightBottomY" (;) ";" (field_declaration) "std::string sourceImageUrl;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "sourceImageUrl" (;) ";" (field_declaration) "int leftTopY;" (primitive_type) "int" (field_identifier) "leftTopY" (;) ";" (field_declaration) "int leftTopX;" (primitive_type) "int" (field_identifier) "leftTopX" (;) ";" (field_declaration) "float deviceLongitude;" (primitive_type) "float" (field_identifier) "deviceLongitude" (;) ";" (field_declaration) "std::string objectType;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "objectType" (;) ";" (field_declaration) "float score;" (primitive_type) "float" (field_identifier) "score" (;) ";" (field_declaration) "std::string personId;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "personId" (;) ";" (field_declaration) "float deviceLatitude;" (primitive_type) "float" (field_identifier) "deviceLatitude" (;) ";" (field_declaration) "std::string shotTime;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "shotTime" (;) ";" (field_declaration) "std::string deviceName;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "deviceName" (;) ";" (}) "}" (;) ";" (field_declaration) "struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };" (struct_specifier) "struct MotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n }" (struct) "struct" (type_identifier) "MotorListItem" (field_declaration_list) "{\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n }" ({) "{" (field_declaration) "std::string targetImageUrl;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "targetImageUrl" (;) ";" (field_declaration) "int rightBottomX;" (primitive_type) "int" (field_identifier) "rightBottomX" (;) ";" (field_declaration) "std::string deviceID;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "deviceID" (;) ";" (field_declaration) "int rightBottomY;" (primitive_type) "int" (field_identifier) "rightBottomY" (;) ";" (field_declaration) "std::string sourceImageUrl;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "sourceImageUrl" (;) ";" (field_declaration) "int leftTopY;" (primitive_type) "int" (field_identifier) "leftTopY" (;) ";" (field_declaration) "int leftTopX;" (primitive_type) "int" (field_identifier) "leftTopX" (;) ";" (field_declaration) "float deviceLongitude;" (primitive_type) "float" (field_identifier) "deviceLongitude" (;) ";" (field_declaration) "std::string objectType;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "objectType" (;) ";" (field_declaration) "float score;" (primitive_type) "float" (field_identifier) "score" (;) ";" (field_declaration) "std::string personId;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "personId" (;) ";" (field_declaration) "float deviceLatitude;" (primitive_type) "float" (field_identifier) "deviceLatitude" (;) ";" (field_declaration) "std::string shotTime;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "shotTime" (;) ";" (field_declaration) "std::string deviceName;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "deviceName" (;) ";" (}) "}" (;) ";" (field_declaration) "struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n };" (struct_specifier) "struct NonMotorListItem\n {\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n }" (struct) "struct" (type_identifier) "NonMotorListItem" (field_declaration_list) "{\n std::string targetImageUrl;\n int rightBottomX;\n std::string deviceID;\n int rightBottomY;\n std::string sourceImageUrl;\n int leftTopY;\n int leftTopX;\n float deviceLongitude;\n std::string objectType;\n float score;\n std::string personId;\n float deviceLatitude;\n std::string shotTime;\n std::string deviceName;\n }" ({) "{" (field_declaration) "std::string targetImageUrl;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "targetImageUrl" (;) ";" (field_declaration) "int rightBottomX;" (primitive_type) "int" (field_identifier) "rightBottomX" (;) ";" (field_declaration) "std::string deviceID;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "deviceID" (;) ";" (field_declaration) "int rightBottomY;" (primitive_type) "int" (field_identifier) "rightBottomY" (;) ";" (field_declaration) "std::string sourceImageUrl;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "sourceImageUrl" (;) ";" (field_declaration) "int leftTopY;" (primitive_type) "int" (field_identifier) "leftTopY" (;) ";" (field_declaration) "int leftTopX;" (primitive_type) "int" (field_identifier) "leftTopX" (;) ";" (field_declaration) "float deviceLongitude;" (primitive_type) "float" (field_identifier) "deviceLongitude" (;) ";" (field_declaration) "std::string objectType;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "objectType" (;) ";" (field_declaration) "float score;" (primitive_type) "float" (field_identifier) "score" (;) ";" (field_declaration) "std::string personId;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "personId" (;) ";" (field_declaration) "float deviceLatitude;" (primitive_type) "float" (field_identifier) "deviceLatitude" (;) ";" (field_declaration) "std::string shotTime;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "shotTime" (;) ";" (field_declaration) "std::string deviceName;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "deviceName" (;) ";" (}) "}" (;) ";" (field_declaration) "std::vector<NonMotorListItem> nonMotorList;" (type_identifier) "std" (ERROR) "::vector<NonMotorListItem>" (:) ":" (:) ":" (field_identifier) "vector" (<) "<" (field_identifier) "NonMotorListItem" (>) ">" (field_identifier) "nonMotorList" (;) ";" (field_declaration) "std::vector<BodyListItem> bodyList;" (type_identifier) "std" (ERROR) "::vector<BodyListItem>" (:) ":" (:) ":" (field_identifier) "vector" (<) "<" (field_identifier) "BodyListItem" (>) ">" (field_identifier) "bodyList" (;) ";" (field_declaration) "std::vector<FaceListItem> faceList;" (type_identifier) "std" (ERROR) "::vector<FaceListItem>" (:) ":" (:) ":" (field_identifier) "vector" (<) "<" (field_identifier) "FaceListItem" (>) ">" (field_identifier) "faceList" (;) ";" (field_declaration) "std::vector<MotorListItem> motorList;" (type_identifier) "std" (ERROR) "::vector<MotorListItem>" (:) ":" (:) ":" (field_identifier) "vector" (<) "<" (field_identifier) "MotorListItem" (>) ">" (field_identifier) "motorList" (;) ";" (}) "}" (ERROR) ";" (;) ";" (function_declarator) "SearchAggregateObjectResult()" (identifier) "SearchAggregateObjectResult" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "explicit SearchAggregateObjectResult(const std::string &payload);" (type_identifier) "explicit" (function_declarator) "SearchAggregateObjectResult(const std::string &payload)" (identifier) "SearchAggregateObjectResult" (parameter_list) "(const std::string &payload)" (() "(" (parameter_declaration) "const std::string &payload" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "payload" ()) ")" (;) ";" (expression_statement) "~SearchAggregateObjectResult();" (unary_expression) "~SearchAggregateObjectResult()" (~) "~" (call_expression) "SearchAggregateObjectResult()" (identifier) "SearchAggregateObjectResult" (argument_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "std::string getMessage()const;" (statement_identifier) "std" (:) ":" (ERROR) ":string getMessage()const" (:) ":" (type_identifier) "string" (function_declarator) "getMessage()const" (identifier) "getMessage" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "long getPageSize()const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);\n private:\n std::string message_;\n long pageSize_;\n int total_;\n Data data_;\n std::string code_;\n bool success_;" (sized_type_specifier) "long" (long) "long" (function_declarator) "getPageSize()" (identifier) "getPageSize" (parameter_list) "()" (() "(" ()) ")" (declaration) "const;\n int getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void parse(const std::string &payload);" (type_qualifier) "const" (const) "const" (ERROR) ";" (;) ";" (primitive_type) "int" (ERROR) "getTotal()const;\n Data getData()const;\n std::string getCode()const;\n bool getSuccess()const;\n\n protected:\n void" (function_declarator) "getTotal()const" (identifier) "getTotal" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "Data" (function_declarator) "getData()const" (identifier) "getData" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (function_declarator) "getCode()const" (identifier) "getCode" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (primitive_type) "bool" (function_declarator) "getSuccess()const" (identifier) "getSuccess" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "protected" (:) ":" (primitive_type) "void" (function_declarator) "parse(const std::string &payload)" (identifier) "parse" (parameter_list) "(const std::string &payload)" (() "(" (parameter_declaration) "const std::string &payload" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "payload" ()) ")" (;) ";" (declaration) "private:\n std::string message_;" (type_identifier) "private" (ERROR) ":\n std::string" (:) ":" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (identifier) "message_" (;) ";" (declaration) "long pageSize_;" (sized_type_specifier) "long" (long) "long" (identifier) "pageSize_" (;) ";" (declaration) "int total_;" (primitive_type) "int" (identifier) "total_" (;) ";" (declaration) "Data data_;" (type_identifier) "Data" (identifier) "data_" (;) ";" (declaration) "std::string code_;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (identifier) "code_" (;) ";" (declaration) "bool success_;" (primitive_type) "bool" (identifier) "success_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (}) "}" (}) "}" (#endif) "#endif" (comment) "// !ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_"
632
42
{"language": "c", "success": true, "metadata": {"lines": 130, "avg_line_length": 26.08, "nodes": 396, "errors": 0, "source_hash": "2caa8d51f31a4d7269ecf63a14d408eb105e254b645c07d999e755dfad07aab4", "categorized_nodes": 297}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_\n#define ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_\n\n#include <string>\n#include <vector>\n#include <utility>\n#include <alibabacloud/core/ServiceResult.h>\n#include <alibabacloud/cdrs/CDRSExport.h>\n\nnamespace AlibabaCloud\n{\n\tnamespace CDRS\n\t{\n\t\tnamespace Model\n\t\t{\n\t\t\tclass ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n\t\t\t{\n\t\t\tpublic:\n\t\t\t\tstruct Data\n\t\t\t\t{\n\t\t\t\t\tstruct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstd::vector<NonMotorListItem> nonMotorList;\n\t\t\t\t\tstd::vector<BodyListItem> bodyList;\n\t\t\t\t\tstd::vector<FaceListItem> faceList;\n\t\t\t\t\tstd::vector<MotorListItem> motorList;\n\t\t\t\t};\n\n\n\t\t\t\tSearchAggregateObjectResult();\n\t\t\t\texplicit SearchAggregateObjectResult(const std::string &payload);\n\t\t\t\t~SearchAggregateObjectResult();\n\t\t\t\tstd::string getMessage()const;\n\t\t\t\tlong getPageSize()const;\n\t\t\t\tint getTotal()const;\n\t\t\t\tData getData()const;\n\t\t\t\tstd::string getCode()const;\n\t\t\t\tbool getSuccess()const;\n\n\t\t\tprotected:\n\t\t\t\tvoid parse(const std::string &payload);\n\t\t\tprivate:\n\t\t\t\tstd::string message_;\n\t\t\t\tlong pageSize_;\n\t\t\t\tint total_;\n\t\t\t\tData data_;\n\t\t\t\tstd::string code_;\n\t\t\t\tbool success_;\n\n\t\t\t};\n\t\t}\n\t}\n}\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 395], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 135, "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": "ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_", "parent": 0, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 62}}, {"id": 3, "type": "preproc_def", "text": "#define ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_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": "ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_", "parent": 3, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 62}}, {"id": 6, "type": "preproc_include", "text": "#include <string>\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": "<string>", "parent": 6, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <vector>\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": "<vector>", "parent": 9, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include <utility>\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": "<utility>", "parent": 12, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include <alibabacloud/core/ServiceResult.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": "<alibabacloud/core/ServiceResult.h>", "parent": 15, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 44}}, {"id": 18, "type": "preproc_include", "text": "#include <alibabacloud/cdrs/CDRSExport.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": "<alibabacloud/cdrs/CDRSExport.h>", "parent": 18, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 41}}, {"id": 21, "type": "function_definition", "text": "namespace AlibabaCloud\n{\n\tnamespace CDRS\n\t{\n\t\tnamespace Model\n\t\t{\n\t\t\tclass ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n\t\t\t{\n\t\t\tpublic:\n\t\t\t\tstruct Data\n\t\t\t\t{\n\t\t\t\t\tstruct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstd::vector<NonMotorListItem> nonMotorList;\n\t\t\t\t\tstd::vector<BodyListItem> bodyList;\n\t\t\t\t\tstd::vector<FaceListItem> faceList;\n\t\t\t\t\tstd::vector<MotorListItem> motorList;\n\t\t\t\t};\n\n\n\t\t\t\tSearchAggregateObjectResult();\n\t\t\t\texplicit SearchAggregateObjectResult(const std::string &payload);\n\t\t\t\t~SearchAggregateObjectResult();\n\t\t\t\tstd::string getMessage()const;\n\t\t\t\tlong getPageSize()const;\n\t\t\t\tint getTotal()const;\n\t\t\t\tData getData()const;\n\t\t\t\tstd::string getCode()const;\n\t\t\t\tbool getSuccess()const;\n\n\t\t\tprotected:\n\t\t\t\tvoid parse(const std::string &payload);\n\t\t\tprivate:\n\t\t\t\tstd::string message_;\n\t\t\t\tlong pageSize_;\n\t\t\t\tint total_;\n\t\t\t\tData data_;\n\t\t\t\tstd::string code_;\n\t\t\t\tbool success_;\n\n\t\t\t};\n\t\t}\n\t}\n}", "parent": 0, "children": [22, 23], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 134, "column": 1}}, {"id": 22, "type": "type_identifier", "text": "namespace", "parent": 21, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 9}}, {"id": 23, "type": "identifier", "text": "AlibabaCloud", "parent": 21, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 22}}, {"id": 24, "type": "function_definition", "text": "namespace CDRS\n\t{\n\t\tnamespace Model\n\t\t{\n\t\t\tclass ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n\t\t\t{\n\t\t\tpublic:\n\t\t\t\tstruct Data\n\t\t\t\t{\n\t\t\t\t\tstruct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstd::vector<NonMotorListItem> nonMotorList;\n\t\t\t\t\tstd::vector<BodyListItem> bodyList;\n\t\t\t\t\tstd::vector<FaceListItem> faceList;\n\t\t\t\t\tstd::vector<MotorListItem> motorList;\n\t\t\t\t};\n\n\n\t\t\t\tSearchAggregateObjectResult();\n\t\t\t\texplicit SearchAggregateObjectResult(const std::string &payload);\n\t\t\t\t~SearchAggregateObjectResult();\n\t\t\t\tstd::string getMessage()const;\n\t\t\t\tlong getPageSize()const;\n\t\t\t\tint getTotal()const;\n\t\t\t\tData getData()const;\n\t\t\t\tstd::string getCode()const;\n\t\t\t\tbool getSuccess()const;\n\n\t\t\tprotected:\n\t\t\t\tvoid parse(const std::string &payload);\n\t\t\tprivate:\n\t\t\t\tstd::string message_;\n\t\t\t\tlong pageSize_;\n\t\t\t\tint total_;\n\t\t\t\tData data_;\n\t\t\t\tstd::string code_;\n\t\t\t\tbool success_;\n\n\t\t\t};\n\t\t}\n\t}", "parent": 21, "children": [25, 26], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 133, "column": 2}}, {"id": 25, "type": "type_identifier", "text": "namespace", "parent": 24, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 10}}, {"id": 26, "type": "identifier", "text": "CDRS", "parent": 24, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 15}}, {"id": 27, "type": "function_definition", "text": "namespace Model\n\t\t{\n\t\t\tclass ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n\t\t\t{\n\t\t\tpublic:\n\t\t\t\tstruct Data\n\t\t\t\t{\n\t\t\t\t\tstruct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstd::vector<NonMotorListItem> nonMotorList;\n\t\t\t\t\tstd::vector<BodyListItem> bodyList;\n\t\t\t\t\tstd::vector<FaceListItem> faceList;\n\t\t\t\t\tstd::vector<MotorListItem> motorList;\n\t\t\t\t};\n\n\n\t\t\t\tSearchAggregateObjectResult();\n\t\t\t\texplicit SearchAggregateObjectResult(const std::string &payload);\n\t\t\t\t~SearchAggregateObjectResult();\n\t\t\t\tstd::string getMessage()const;\n\t\t\t\tlong getPageSize()const;\n\t\t\t\tint getTotal()const;\n\t\t\t\tData getData()const;\n\t\t\t\tstd::string getCode()const;\n\t\t\t\tbool getSuccess()const;\n\n\t\t\tprotected:\n\t\t\t\tvoid parse(const std::string &payload);\n\t\t\tprivate:\n\t\t\t\tstd::string message_;\n\t\t\t\tlong pageSize_;\n\t\t\t\tint total_;\n\t\t\t\tData data_;\n\t\t\t\tstd::string code_;\n\t\t\t\tbool success_;\n\n\t\t\t};\n\t\t}", "parent": 24, "children": [28, 29], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 132, "column": 3}}, {"id": 28, "type": "type_identifier", "text": "namespace", "parent": 27, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 11}}, {"id": 29, "type": "identifier", "text": "Model", "parent": 27, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 17}}, {"id": 30, "type": "declaration", "text": "class ALIBABACLOUD_CDRS_EXPORT", "parent": 27, "children": [31], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 33}}, {"id": 31, "type": "identifier", "text": "ALIBABACLOUD_CDRS_EXPORT", "parent": 30, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 33}}, {"id": 32, "type": "labeled_statement", "text": "SearchAggregateObjectResult : public ServiceResult\n\t\t\t{\n\t\t\tpublic:\n\t\t\t\tstruct Data\n\t\t\t\t{\n\t\t\t\t\tstruct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstd::vector<NonMotorListItem> nonMotorList;\n\t\t\t\t\tstd::vector<BodyListItem> bodyList;\n\t\t\t\t\tstd::vector<FaceListItem> faceList;\n\t\t\t\t\tstd::vector<MotorListItem> motorList;\n\t\t\t\t};\n\n\n\t\t\t\tSearchAggregateObjectResult();\n\t\t\t\texplicit SearchAggregateObjectResult(const std::string &payload);\n\t\t\t\t~SearchAggregateObjectResult();\n\t\t\t\tstd::string getMessage()const;\n\t\t\t\tlong getPageSize()const;\n\t\t\t\tint getTotal()const;\n\t\t\t\tData getData()const;\n\t\t\t\tstd::string getCode()const;\n\t\t\t\tbool getSuccess()const;\n\n\t\t\tprotected:\n\t\t\t\tvoid parse(const std::string &payload);\n\t\t\tprivate:\n\t\t\t\tstd::string message_;\n\t\t\t\tlong pageSize_;\n\t\t\t\tint total_;\n\t\t\t\tData data_;\n\t\t\t\tstd::string code_;\n\t\t\t\tbool success_;\n\n\t\t\t}", "parent": 27, "children": [33, 34], "start_point": {"row": 31, "column": 34}, "end_point": {"row": 131, "column": 4}}, {"id": 33, "type": "statement_identifier", "text": "SearchAggregateObjectResult", "parent": 32, "children": [], "start_point": {"row": 31, "column": 34}, "end_point": {"row": 31, "column": 61}}, {"id": 34, "type": "ERROR", "text": "public ServiceResult", "parent": 32, "children": [35], "start_point": {"row": 31, "column": 64}, "end_point": {"row": 31, "column": 84}}, {"id": 35, "type": "identifier", "text": "ServiceResult", "parent": 34, "children": [], "start_point": {"row": 31, "column": 71}, "end_point": {"row": 31, "column": 84}}, {"id": 36, "type": "labeled_statement", "text": "public:\n\t\t\t\tstruct Data\n\t\t\t\t{\n\t\t\t\t\tstruct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstd::vector<NonMotorListItem> nonMotorList;\n\t\t\t\t\tstd::vector<BodyListItem> bodyList;\n\t\t\t\t\tstd::vector<FaceListItem> faceList;\n\t\t\t\t\tstd::vector<MotorListItem> motorList;\n\t\t\t\t};\n\n\n\t\t\t\tSearchAggregateObjectResult();", "parent": 32, "children": [37], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 111, "column": 34}}, {"id": 37, "type": "declaration", "text": "struct Data\n\t\t\t\t{\n\t\t\t\t\tstruct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstd::vector<NonMotorListItem> nonMotorList;\n\t\t\t\t\tstd::vector<BodyListItem> bodyList;\n\t\t\t\t\tstd::vector<FaceListItem> faceList;\n\t\t\t\t\tstd::vector<MotorListItem> motorList;\n\t\t\t\t};\n\n\n\t\t\t\tSearchAggregateObjectResult();", "parent": 36, "children": [38, 313], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 111, "column": 34}}, {"id": 38, "type": "struct_specifier", "text": "struct Data\n\t\t\t\t{\n\t\t\t\t\tstruct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstd::vector<NonMotorListItem> nonMotorList;\n\t\t\t\t\tstd::vector<BodyListItem> bodyList;\n\t\t\t\t\tstd::vector<FaceListItem> faceList;\n\t\t\t\t\tstd::vector<MotorListItem> motorList;\n\t\t\t\t}", "parent": 37, "children": [39, 40], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 108, "column": 5}}, {"id": 39, "type": "struct", "text": "struct", "parent": 38, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 40, "type": "type_identifier", "text": "Data", "parent": 38, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 15}}, {"id": 41, "type": "field_declaration", "text": "struct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};", "parent": 38, "children": [42], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 52, "column": 7}}, {"id": 42, "type": "struct_specifier", "text": "struct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t}", "parent": 41, "children": [43, 44], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 52, "column": 6}}, {"id": 43, "type": "struct", "text": "struct", "parent": 42, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 11}}, {"id": 44, "type": "type_identifier", "text": "BodyListItem", "parent": 42, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 24}}, {"id": 45, "type": "field_declaration", "text": "std::string targetImageUrl;", "parent": 42, "children": [46, 47, 49], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 33}}, {"id": 46, "type": "type_identifier", "text": "std", "parent": 45, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 9}}, {"id": 47, "type": "ERROR", "text": "::string", "parent": 45, "children": [48], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 17}}, {"id": 48, "type": "field_identifier", "text": "string", "parent": 47, "children": [], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 17}}, {"id": 49, "type": "field_identifier", "text": "targetImageUrl", "parent": 45, "children": [], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 32}}, {"id": 50, "type": "field_declaration", "text": "int rightBottomX;", "parent": 42, "children": [51, 52], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 23}}, {"id": 51, "type": "primitive_type", "text": "int", "parent": 50, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 9}}, {"id": 52, "type": "field_identifier", "text": "rightBottomX", "parent": 50, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 22}}, {"id": 53, "type": "field_declaration", "text": "std::string deviceID;", "parent": 42, "children": [54, 55, 57], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 27}}, {"id": 54, "type": "type_identifier", "text": "std", "parent": 53, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 9}}, {"id": 55, "type": "ERROR", "text": "::string", "parent": 53, "children": [56], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 17}}, {"id": 56, "type": "field_identifier", "text": "string", "parent": 55, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 17}}, {"id": 57, "type": "field_identifier", "text": "deviceID", "parent": 53, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 26}}, {"id": 58, "type": "field_declaration", "text": "int rightBottomY;", "parent": 42, "children": [59, 60], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 23}}, {"id": 59, "type": "primitive_type", "text": "int", "parent": 58, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 9}}, {"id": 60, "type": "field_identifier", "text": "rightBottomY", "parent": 58, "children": [], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 22}}, {"id": 61, "type": "field_declaration", "text": "std::string sourceImageUrl;", "parent": 42, "children": [62, 63, 65], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 33}}, {"id": 62, "type": "type_identifier", "text": "std", "parent": 61, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 9}}, {"id": 63, "type": "ERROR", "text": "::string", "parent": 61, "children": [64], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 17}}, {"id": 64, "type": "field_identifier", "text": "string", "parent": 63, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 17}}, {"id": 65, "type": "field_identifier", "text": "sourceImageUrl", "parent": 61, "children": [], "start_point": {"row": 42, "column": 18}, "end_point": {"row": 42, "column": 32}}, {"id": 66, "type": "field_declaration", "text": "int leftTopY;", "parent": 42, "children": [67, 68], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 19}}, {"id": 67, "type": "primitive_type", "text": "int", "parent": 66, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 9}}, {"id": 68, "type": "field_identifier", "text": "leftTopY", "parent": 66, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 18}}, {"id": 69, "type": "field_declaration", "text": "int leftTopX;", "parent": 42, "children": [70, 71], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 19}}, {"id": 70, "type": "primitive_type", "text": "int", "parent": 69, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 9}}, {"id": 71, "type": "field_identifier", "text": "leftTopX", "parent": 69, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 18}}, {"id": 72, "type": "field_declaration", "text": "float deviceLongitude;", "parent": 42, "children": [73, 74], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 28}}, {"id": 73, "type": "primitive_type", "text": "float", "parent": 72, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 11}}, {"id": 74, "type": "field_identifier", "text": "deviceLongitude", "parent": 72, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 27}}, {"id": 75, "type": "field_declaration", "text": "std::string objectType;", "parent": 42, "children": [76, 77, 79], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 29}}, {"id": 76, "type": "type_identifier", "text": "std", "parent": 75, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 9}}, {"id": 77, "type": "ERROR", "text": "::string", "parent": 75, "children": [78], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 17}}, {"id": 78, "type": "field_identifier", "text": "string", "parent": 77, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 17}}, {"id": 79, "type": "field_identifier", "text": "objectType", "parent": 75, "children": [], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 28}}, {"id": 80, "type": "field_declaration", "text": "float score;", "parent": 42, "children": [81, 82], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 18}}, {"id": 81, "type": "primitive_type", "text": "float", "parent": 80, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 11}}, {"id": 82, "type": "field_identifier", "text": "score", "parent": 80, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 17}}, {"id": 83, "type": "field_declaration", "text": "std::string personId;", "parent": 42, "children": [84, 85, 87], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 27}}, {"id": 84, "type": "type_identifier", "text": "std", "parent": 83, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 9}}, {"id": 85, "type": "ERROR", "text": "::string", "parent": 83, "children": [86], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 17}}, {"id": 86, "type": "field_identifier", "text": "string", "parent": 85, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 17}}, {"id": 87, "type": "field_identifier", "text": "personId", "parent": 83, "children": [], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 26}}, {"id": 88, "type": "field_declaration", "text": "float deviceLatitude;", "parent": 42, "children": [89, 90], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 27}}, {"id": 89, "type": "primitive_type", "text": "float", "parent": 88, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 11}}, {"id": 90, "type": "field_identifier", "text": "deviceLatitude", "parent": 88, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 26}}, {"id": 91, "type": "field_declaration", "text": "std::string shotTime;", "parent": 42, "children": [92, 93, 95], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 27}}, {"id": 92, "type": "type_identifier", "text": "std", "parent": 91, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 9}}, {"id": 93, "type": "ERROR", "text": "::string", "parent": 91, "children": [94], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 17}}, {"id": 94, "type": "field_identifier", "text": "string", "parent": 93, "children": [], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 17}}, {"id": 95, "type": "field_identifier", "text": "shotTime", "parent": 91, "children": [], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 26}}, {"id": 96, "type": "field_declaration", "text": "std::string deviceName;", "parent": 42, "children": [97, 98, 100], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 29}}, {"id": 97, "type": "type_identifier", "text": "std", "parent": 96, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 9}}, {"id": 98, "type": "ERROR", "text": "::string", "parent": 96, "children": [99], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 17}}, {"id": 99, "type": "field_identifier", "text": "string", "parent": 98, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 17}}, {"id": 100, "type": "field_identifier", "text": "deviceName", "parent": 96, "children": [], "start_point": {"row": 51, "column": 18}, "end_point": {"row": 51, "column": 28}}, {"id": 101, "type": "field_declaration", "text": "struct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};", "parent": 38, "children": [102], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 69, "column": 7}}, {"id": 102, "type": "struct_specifier", "text": "struct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t}", "parent": 101, "children": [103, 104], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 69, "column": 6}}, {"id": 103, "type": "struct", "text": "struct", "parent": 102, "children": [], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 11}}, {"id": 104, "type": "type_identifier", "text": "FaceListItem", "parent": 102, "children": [], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 24}}, {"id": 105, "type": "field_declaration", "text": "std::string targetImageUrl;", "parent": 102, "children": [106, 107, 109], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 33}}, {"id": 106, "type": "type_identifier", "text": "std", "parent": 105, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 9}}, {"id": 107, "type": "ERROR", "text": "::string", "parent": 105, "children": [108], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 17}}, {"id": 108, "type": "field_identifier", "text": "string", "parent": 107, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 17}}, {"id": 109, "type": "field_identifier", "text": "targetImageUrl", "parent": 105, "children": [], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 32}}, {"id": 110, "type": "field_declaration", "text": "int rightBottomX;", "parent": 102, "children": [111, 112], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 23}}, {"id": 111, "type": "primitive_type", "text": "int", "parent": 110, "children": [], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 9}}, {"id": 112, "type": "field_identifier", "text": "rightBottomX", "parent": 110, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 22}}, {"id": 113, "type": "field_declaration", "text": "std::string deviceID;", "parent": 102, "children": [114, 115, 117], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 27}}, {"id": 114, "type": "type_identifier", "text": "std", "parent": 113, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 9}}, {"id": 115, "type": "ERROR", "text": "::string", "parent": 113, "children": [116], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 17}}, {"id": 116, "type": "field_identifier", "text": "string", "parent": 115, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 17}}, {"id": 117, "type": "field_identifier", "text": "deviceID", "parent": 113, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 26}}, {"id": 118, "type": "field_declaration", "text": "int rightBottomY;", "parent": 102, "children": [119, 120], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 23}}, {"id": 119, "type": "primitive_type", "text": "int", "parent": 118, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 9}}, {"id": 120, "type": "field_identifier", "text": "rightBottomY", "parent": 118, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 22}}, {"id": 121, "type": "field_declaration", "text": "std::string sourceImageUrl;", "parent": 102, "children": [122, 123, 125], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 33}}, {"id": 122, "type": "type_identifier", "text": "std", "parent": 121, "children": [], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 9}}, {"id": 123, "type": "ERROR", "text": "::string", "parent": 121, "children": [124], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 17}}, {"id": 124, "type": "field_identifier", "text": "string", "parent": 123, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 17}}, {"id": 125, "type": "field_identifier", "text": "sourceImageUrl", "parent": 121, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 32}}, {"id": 126, "type": "field_declaration", "text": "int leftTopY;", "parent": 102, "children": [127, 128], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 19}}, {"id": 127, "type": "primitive_type", "text": "int", "parent": 126, "children": [], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 9}}, {"id": 128, "type": "field_identifier", "text": "leftTopY", "parent": 126, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 18}}, {"id": 129, "type": "field_declaration", "text": "int leftTopX;", "parent": 102, "children": [130, 131], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 19}}, {"id": 130, "type": "primitive_type", "text": "int", "parent": 129, "children": [], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 9}}, {"id": 131, "type": "field_identifier", "text": "leftTopX", "parent": 129, "children": [], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 18}}, {"id": 132, "type": "field_declaration", "text": "float deviceLongitude;", "parent": 102, "children": [133, 134], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 28}}, {"id": 133, "type": "primitive_type", "text": "float", "parent": 132, "children": [], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 11}}, {"id": 134, "type": "field_identifier", "text": "deviceLongitude", "parent": 132, "children": [], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 27}}, {"id": 135, "type": "field_declaration", "text": "std::string objectType;", "parent": 102, "children": [136, 137, 139], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 29}}, {"id": 136, "type": "type_identifier", "text": "std", "parent": 135, "children": [], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 9}}, {"id": 137, "type": "ERROR", "text": "::string", "parent": 135, "children": [138], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 17}}, {"id": 138, "type": "field_identifier", "text": "string", "parent": 137, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 17}}, {"id": 139, "type": "field_identifier", "text": "objectType", "parent": 135, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 28}}, {"id": 140, "type": "field_declaration", "text": "float score;", "parent": 102, "children": [141, 142], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 18}}, {"id": 141, "type": "primitive_type", "text": "float", "parent": 140, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 11}}, {"id": 142, "type": "field_identifier", "text": "score", "parent": 140, "children": [], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 17}}, {"id": 143, "type": "field_declaration", "text": "std::string personId;", "parent": 102, "children": [144, 145, 147], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 27}}, {"id": 144, "type": "type_identifier", "text": "std", "parent": 143, "children": [], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 9}}, {"id": 145, "type": "ERROR", "text": "::string", "parent": 143, "children": [146], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 17}}, {"id": 146, "type": "field_identifier", "text": "string", "parent": 145, "children": [], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 17}}, {"id": 147, "type": "field_identifier", "text": "personId", "parent": 143, "children": [], "start_point": {"row": 65, "column": 18}, "end_point": {"row": 65, "column": 26}}, {"id": 148, "type": "field_declaration", "text": "float deviceLatitude;", "parent": 102, "children": [149, 150], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 27}}, {"id": 149, "type": "primitive_type", "text": "float", "parent": 148, "children": [], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 11}}, {"id": 150, "type": "field_identifier", "text": "deviceLatitude", "parent": 148, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 26}}, {"id": 151, "type": "field_declaration", "text": "std::string shotTime;", "parent": 102, "children": [152, 153, 155], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 27}}, {"id": 152, "type": "type_identifier", "text": "std", "parent": 151, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 9}}, {"id": 153, "type": "ERROR", "text": "::string", "parent": 151, "children": [154], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 17}}, {"id": 154, "type": "field_identifier", "text": "string", "parent": 153, "children": [], "start_point": {"row": 67, "column": 11}, "end_point": {"row": 67, "column": 17}}, {"id": 155, "type": "field_identifier", "text": "shotTime", "parent": 151, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 26}}, {"id": 156, "type": "field_declaration", "text": "std::string deviceName;", "parent": 102, "children": [157, 158, 160], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 29}}, {"id": 157, "type": "type_identifier", "text": "std", "parent": 156, "children": [], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 9}}, {"id": 158, "type": "ERROR", "text": "::string", "parent": 156, "children": [159], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 17}}, {"id": 159, "type": "field_identifier", "text": "string", "parent": 158, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 17}}, {"id": 160, "type": "field_identifier", "text": "deviceName", "parent": 156, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 28}}, {"id": 161, "type": "field_declaration", "text": "struct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};", "parent": 38, "children": [162], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 86, "column": 7}}, {"id": 162, "type": "struct_specifier", "text": "struct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t}", "parent": 161, "children": [163, 164], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 86, "column": 6}}, {"id": 163, "type": "struct", "text": "struct", "parent": 162, "children": [], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 11}}, {"id": 164, "type": "type_identifier", "text": "MotorListItem", "parent": 162, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 25}}, {"id": 165, "type": "field_declaration", "text": "std::string targetImageUrl;", "parent": 162, "children": [166, 167, 169], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 33}}, {"id": 166, "type": "type_identifier", "text": "std", "parent": 165, "children": [], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 9}}, {"id": 167, "type": "ERROR", "text": "::string", "parent": 165, "children": [168], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 17}}, {"id": 168, "type": "field_identifier", "text": "string", "parent": 167, "children": [], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 17}}, {"id": 169, "type": "field_identifier", "text": "targetImageUrl", "parent": 165, "children": [], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 32}}, {"id": 170, "type": "field_declaration", "text": "int rightBottomX;", "parent": 162, "children": [171, 172], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 23}}, {"id": 171, "type": "primitive_type", "text": "int", "parent": 170, "children": [], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 9}}, {"id": 172, "type": "field_identifier", "text": "rightBottomX", "parent": 170, "children": [], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 22}}, {"id": 173, "type": "field_declaration", "text": "std::string deviceID;", "parent": 162, "children": [174, 175, 177], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 27}}, {"id": 174, "type": "type_identifier", "text": "std", "parent": 173, "children": [], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 9}}, {"id": 175, "type": "ERROR", "text": "::string", "parent": 173, "children": [176], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 17}}, {"id": 176, "type": "field_identifier", "text": "string", "parent": 175, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 17}}, {"id": 177, "type": "field_identifier", "text": "deviceID", "parent": 173, "children": [], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 26}}, {"id": 178, "type": "field_declaration", "text": "int rightBottomY;", "parent": 162, "children": [179, 180], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 23}}, {"id": 179, "type": "primitive_type", "text": "int", "parent": 178, "children": [], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 9}}, {"id": 180, "type": "field_identifier", "text": "rightBottomY", "parent": 178, "children": [], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 22}}, {"id": 181, "type": "field_declaration", "text": "std::string sourceImageUrl;", "parent": 162, "children": [182, 183, 185], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 33}}, {"id": 182, "type": "type_identifier", "text": "std", "parent": 181, "children": [], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 9}}, {"id": 183, "type": "ERROR", "text": "::string", "parent": 181, "children": [184], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 17}}, {"id": 184, "type": "field_identifier", "text": "string", "parent": 183, "children": [], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 17}}, {"id": 185, "type": "field_identifier", "text": "sourceImageUrl", "parent": 181, "children": [], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 32}}, {"id": 186, "type": "field_declaration", "text": "int leftTopY;", "parent": 162, "children": [187, 188], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 19}}, {"id": 187, "type": "primitive_type", "text": "int", "parent": 186, "children": [], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 9}}, {"id": 188, "type": "field_identifier", "text": "leftTopY", "parent": 186, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 18}}, {"id": 189, "type": "field_declaration", "text": "int leftTopX;", "parent": 162, "children": [190, 191], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 19}}, {"id": 190, "type": "primitive_type", "text": "int", "parent": 189, "children": [], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 9}}, {"id": 191, "type": "field_identifier", "text": "leftTopX", "parent": 189, "children": [], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 18}}, {"id": 192, "type": "field_declaration", "text": "float deviceLongitude;", "parent": 162, "children": [193, 194], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 79, "column": 28}}, {"id": 193, "type": "primitive_type", "text": "float", "parent": 192, "children": [], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 79, "column": 11}}, {"id": 194, "type": "field_identifier", "text": "deviceLongitude", "parent": 192, "children": [], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 27}}, {"id": 195, "type": "field_declaration", "text": "std::string objectType;", "parent": 162, "children": [196, 197, 199], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 29}}, {"id": 196, "type": "type_identifier", "text": "std", "parent": 195, "children": [], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 9}}, {"id": 197, "type": "ERROR", "text": "::string", "parent": 195, "children": [198], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 17}}, {"id": 198, "type": "field_identifier", "text": "string", "parent": 197, "children": [], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 17}}, {"id": 199, "type": "field_identifier", "text": "objectType", "parent": 195, "children": [], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 28}}, {"id": 200, "type": "field_declaration", "text": "float score;", "parent": 162, "children": [201, 202], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 18}}, {"id": 201, "type": "primitive_type", "text": "float", "parent": 200, "children": [], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 11}}, {"id": 202, "type": "field_identifier", "text": "score", "parent": 200, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 17}}, {"id": 203, "type": "field_declaration", "text": "std::string personId;", "parent": 162, "children": [204, 205, 207], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 27}}, {"id": 204, "type": "type_identifier", "text": "std", "parent": 203, "children": [], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 9}}, {"id": 205, "type": "ERROR", "text": "::string", "parent": 203, "children": [206], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 17}}, {"id": 206, "type": "field_identifier", "text": "string", "parent": 205, "children": [], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 17}}, {"id": 207, "type": "field_identifier", "text": "personId", "parent": 203, "children": [], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 26}}, {"id": 208, "type": "field_declaration", "text": "float deviceLatitude;", "parent": 162, "children": [209, 210], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 27}}, {"id": 209, "type": "primitive_type", "text": "float", "parent": 208, "children": [], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 11}}, {"id": 210, "type": "field_identifier", "text": "deviceLatitude", "parent": 208, "children": [], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 26}}, {"id": 211, "type": "field_declaration", "text": "std::string shotTime;", "parent": 162, "children": [212, 213, 215], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 27}}, {"id": 212, "type": "type_identifier", "text": "std", "parent": 211, "children": [], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 9}}, {"id": 213, "type": "ERROR", "text": "::string", "parent": 211, "children": [214], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 17}}, {"id": 214, "type": "field_identifier", "text": "string", "parent": 213, "children": [], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 17}}, {"id": 215, "type": "field_identifier", "text": "shotTime", "parent": 211, "children": [], "start_point": {"row": 84, "column": 18}, "end_point": {"row": 84, "column": 26}}, {"id": 216, "type": "field_declaration", "text": "std::string deviceName;", "parent": 162, "children": [217, 218, 220], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 29}}, {"id": 217, "type": "type_identifier", "text": "std", "parent": 216, "children": [], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 9}}, {"id": 218, "type": "ERROR", "text": "::string", "parent": 216, "children": [219], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 17}}, {"id": 219, "type": "field_identifier", "text": "string", "parent": 218, "children": [], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 85, "column": 17}}, {"id": 220, "type": "field_identifier", "text": "deviceName", "parent": 216, "children": [], "start_point": {"row": 85, "column": 18}, "end_point": {"row": 85, "column": 28}}, {"id": 221, "type": "field_declaration", "text": "struct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};", "parent": 38, "children": [222], "start_point": {"row": 87, "column": 5}, "end_point": {"row": 103, "column": 7}}, {"id": 222, "type": "struct_specifier", "text": "struct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t}", "parent": 221, "children": [223, 224], "start_point": {"row": 87, "column": 5}, "end_point": {"row": 103, "column": 6}}, {"id": 223, "type": "struct", "text": "struct", "parent": 222, "children": [], "start_point": {"row": 87, "column": 5}, "end_point": {"row": 87, "column": 11}}, {"id": 224, "type": "type_identifier", "text": "NonMotorListItem", "parent": 222, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 28}}, {"id": 225, "type": "field_declaration", "text": "std::string targetImageUrl;", "parent": 222, "children": [226, 227, 229], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 33}}, {"id": 226, "type": "type_identifier", "text": "std", "parent": 225, "children": [], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 9}}, {"id": 227, "type": "ERROR", "text": "::string", "parent": 225, "children": [228], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 17}}, {"id": 228, "type": "field_identifier", "text": "string", "parent": 227, "children": [], "start_point": {"row": 89, "column": 11}, "end_point": {"row": 89, "column": 17}}, {"id": 229, "type": "field_identifier", "text": "targetImageUrl", "parent": 225, "children": [], "start_point": {"row": 89, "column": 18}, "end_point": {"row": 89, "column": 32}}, {"id": 230, "type": "field_declaration", "text": "int rightBottomX;", "parent": 222, "children": [231, 232], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 23}}, {"id": 231, "type": "primitive_type", "text": "int", "parent": 230, "children": [], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 9}}, {"id": 232, "type": "field_identifier", "text": "rightBottomX", "parent": 230, "children": [], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 22}}, {"id": 233, "type": "field_declaration", "text": "std::string deviceID;", "parent": 222, "children": [234, 235, 237], "start_point": {"row": 91, "column": 6}, "end_point": {"row": 91, "column": 27}}, {"id": 234, "type": "type_identifier", "text": "std", "parent": 233, "children": [], "start_point": {"row": 91, "column": 6}, "end_point": {"row": 91, "column": 9}}, {"id": 235, "type": "ERROR", "text": "::string", "parent": 233, "children": [236], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 17}}, {"id": 236, "type": "field_identifier", "text": "string", "parent": 235, "children": [], "start_point": {"row": 91, "column": 11}, "end_point": {"row": 91, "column": 17}}, {"id": 237, "type": "field_identifier", "text": "deviceID", "parent": 233, "children": [], "start_point": {"row": 91, "column": 18}, "end_point": {"row": 91, "column": 26}}, {"id": 238, "type": "field_declaration", "text": "int rightBottomY;", "parent": 222, "children": [239, 240], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 92, "column": 23}}, {"id": 239, "type": "primitive_type", "text": "int", "parent": 238, "children": [], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 92, "column": 9}}, {"id": 240, "type": "field_identifier", "text": "rightBottomY", "parent": 238, "children": [], "start_point": {"row": 92, "column": 10}, "end_point": {"row": 92, "column": 22}}, {"id": 241, "type": "field_declaration", "text": "std::string sourceImageUrl;", "parent": 222, "children": [242, 243, 245], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 33}}, {"id": 242, "type": "type_identifier", "text": "std", "parent": 241, "children": [], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 9}}, {"id": 243, "type": "ERROR", "text": "::string", "parent": 241, "children": [244], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 17}}, {"id": 244, "type": "field_identifier", "text": "string", "parent": 243, "children": [], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 17}}, {"id": 245, "type": "field_identifier", "text": "sourceImageUrl", "parent": 241, "children": [], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 32}}, {"id": 246, "type": "field_declaration", "text": "int leftTopY;", "parent": 222, "children": [247, 248], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 19}}, {"id": 247, "type": "primitive_type", "text": "int", "parent": 246, "children": [], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 9}}, {"id": 248, "type": "field_identifier", "text": "leftTopY", "parent": 246, "children": [], "start_point": {"row": 94, "column": 10}, "end_point": {"row": 94, "column": 18}}, {"id": 249, "type": "field_declaration", "text": "int leftTopX;", "parent": 222, "children": [250, 251], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 19}}, {"id": 250, "type": "primitive_type", "text": "int", "parent": 249, "children": [], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 9}}, {"id": 251, "type": "field_identifier", "text": "leftTopX", "parent": 249, "children": [], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 18}}, {"id": 252, "type": "field_declaration", "text": "float deviceLongitude;", "parent": 222, "children": [253, 254], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 28}}, {"id": 253, "type": "primitive_type", "text": "float", "parent": 252, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 11}}, {"id": 254, "type": "field_identifier", "text": "deviceLongitude", "parent": 252, "children": [], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 27}}, {"id": 255, "type": "field_declaration", "text": "std::string objectType;", "parent": 222, "children": [256, 257, 259], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 29}}, {"id": 256, "type": "type_identifier", "text": "std", "parent": 255, "children": [], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 9}}, {"id": 257, "type": "ERROR", "text": "::string", "parent": 255, "children": [258], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 17}}, {"id": 258, "type": "field_identifier", "text": "string", "parent": 257, "children": [], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 17}}, {"id": 259, "type": "field_identifier", "text": "objectType", "parent": 255, "children": [], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 28}}, {"id": 260, "type": "field_declaration", "text": "float score;", "parent": 222, "children": [261, 262], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 18}}, {"id": 261, "type": "primitive_type", "text": "float", "parent": 260, "children": [], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 11}}, {"id": 262, "type": "field_identifier", "text": "score", "parent": 260, "children": [], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 17}}, {"id": 263, "type": "field_declaration", "text": "std::string personId;", "parent": 222, "children": [264, 265, 267], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 27}}, {"id": 264, "type": "type_identifier", "text": "std", "parent": 263, "children": [], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 9}}, {"id": 265, "type": "ERROR", "text": "::string", "parent": 263, "children": [266], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 99, "column": 17}}, {"id": 266, "type": "field_identifier", "text": "string", "parent": 265, "children": [], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 17}}, {"id": 267, "type": "field_identifier", "text": "personId", "parent": 263, "children": [], "start_point": {"row": 99, "column": 18}, "end_point": {"row": 99, "column": 26}}, {"id": 268, "type": "field_declaration", "text": "float deviceLatitude;", "parent": 222, "children": [269, 270], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 27}}, {"id": 269, "type": "primitive_type", "text": "float", "parent": 268, "children": [], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 11}}, {"id": 270, "type": "field_identifier", "text": "deviceLatitude", "parent": 268, "children": [], "start_point": {"row": 100, "column": 12}, "end_point": {"row": 100, "column": 26}}, {"id": 271, "type": "field_declaration", "text": "std::string shotTime;", "parent": 222, "children": [272, 273, 275], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 27}}, {"id": 272, "type": "type_identifier", "text": "std", "parent": 271, "children": [], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 9}}, {"id": 273, "type": "ERROR", "text": "::string", "parent": 271, "children": [274], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 17}}, {"id": 274, "type": "field_identifier", "text": "string", "parent": 273, "children": [], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 17}}, {"id": 275, "type": "field_identifier", "text": "shotTime", "parent": 271, "children": [], "start_point": {"row": 101, "column": 18}, "end_point": {"row": 101, "column": 26}}, {"id": 276, "type": "field_declaration", "text": "std::string deviceName;", "parent": 222, "children": [277, 278, 280], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 29}}, {"id": 277, "type": "type_identifier", "text": "std", "parent": 276, "children": [], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 9}}, {"id": 278, "type": "ERROR", "text": "::string", "parent": 276, "children": [279], "start_point": {"row": 102, "column": 9}, "end_point": {"row": 102, "column": 17}}, {"id": 279, "type": "field_identifier", "text": "string", "parent": 278, "children": [], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 17}}, {"id": 280, "type": "field_identifier", "text": "deviceName", "parent": 276, "children": [], "start_point": {"row": 102, "column": 18}, "end_point": {"row": 102, "column": 28}}, {"id": 281, "type": "field_declaration", "text": "std::vector<NonMotorListItem> nonMotorList;", "parent": 38, "children": [282, 283, 288], "start_point": {"row": 104, "column": 5}, "end_point": {"row": 104, "column": 48}}, {"id": 282, "type": "type_identifier", "text": "std", "parent": 281, "children": [], "start_point": {"row": 104, "column": 5}, "end_point": {"row": 104, "column": 8}}, {"id": 283, "type": "ERROR", "text": "::vector<NonMotorListItem>", "parent": 281, "children": [284, 285, 286, 287], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 34}}, {"id": 284, "type": "field_identifier", "text": "vector", "parent": 283, "children": [], "start_point": {"row": 104, "column": 10}, "end_point": {"row": 104, "column": 16}}, {"id": 285, "type": "<", "text": "<", "parent": 283, "children": [], "start_point": {"row": 104, "column": 16}, "end_point": {"row": 104, "column": 17}}, {"id": 286, "type": "field_identifier", "text": "NonMotorListItem", "parent": 283, "children": [], "start_point": {"row": 104, "column": 17}, "end_point": {"row": 104, "column": 33}}, {"id": 287, "type": ">", "text": ">", "parent": 283, "children": [], "start_point": {"row": 104, "column": 33}, "end_point": {"row": 104, "column": 34}}, {"id": 288, "type": "field_identifier", "text": "nonMotorList", "parent": 281, "children": [], "start_point": {"row": 104, "column": 35}, "end_point": {"row": 104, "column": 47}}, {"id": 289, "type": "field_declaration", "text": "std::vector<BodyListItem> bodyList;", "parent": 38, "children": [290, 291, 296], "start_point": {"row": 105, "column": 5}, "end_point": {"row": 105, "column": 40}}, {"id": 290, "type": "type_identifier", "text": "std", "parent": 289, "children": [], "start_point": {"row": 105, "column": 5}, "end_point": {"row": 105, "column": 8}}, {"id": 291, "type": "ERROR", "text": "::vector<BodyListItem>", "parent": 289, "children": [292, 293, 294, 295], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 30}}, {"id": 292, "type": "field_identifier", "text": "vector", "parent": 291, "children": [], "start_point": {"row": 105, "column": 10}, "end_point": {"row": 105, "column": 16}}, {"id": 293, "type": "<", "text": "<", "parent": 291, "children": [], "start_point": {"row": 105, "column": 16}, "end_point": {"row": 105, "column": 17}}, {"id": 294, "type": "field_identifier", "text": "BodyListItem", "parent": 291, "children": [], "start_point": {"row": 105, "column": 17}, "end_point": {"row": 105, "column": 29}}, {"id": 295, "type": ">", "text": ">", "parent": 291, "children": [], "start_point": {"row": 105, "column": 29}, "end_point": {"row": 105, "column": 30}}, {"id": 296, "type": "field_identifier", "text": "bodyList", "parent": 289, "children": [], "start_point": {"row": 105, "column": 31}, "end_point": {"row": 105, "column": 39}}, {"id": 297, "type": "field_declaration", "text": "std::vector<FaceListItem> faceList;", "parent": 38, "children": [298, 299, 304], "start_point": {"row": 106, "column": 5}, "end_point": {"row": 106, "column": 40}}, {"id": 298, "type": "type_identifier", "text": "std", "parent": 297, "children": [], "start_point": {"row": 106, "column": 5}, "end_point": {"row": 106, "column": 8}}, {"id": 299, "type": "ERROR", "text": "::vector<FaceListItem>", "parent": 297, "children": [300, 301, 302, 303], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 30}}, {"id": 300, "type": "field_identifier", "text": "vector", "parent": 299, "children": [], "start_point": {"row": 106, "column": 10}, "end_point": {"row": 106, "column": 16}}, {"id": 301, "type": "<", "text": "<", "parent": 299, "children": [], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 106, "column": 17}}, {"id": 302, "type": "field_identifier", "text": "FaceListItem", "parent": 299, "children": [], "start_point": {"row": 106, "column": 17}, "end_point": {"row": 106, "column": 29}}, {"id": 303, "type": ">", "text": ">", "parent": 299, "children": [], "start_point": {"row": 106, "column": 29}, "end_point": {"row": 106, "column": 30}}, {"id": 304, "type": "field_identifier", "text": "faceList", "parent": 297, "children": [], "start_point": {"row": 106, "column": 31}, "end_point": {"row": 106, "column": 39}}, {"id": 305, "type": "field_declaration", "text": "std::vector<MotorListItem> motorList;", "parent": 38, "children": [306, 307, 312], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 42}}, {"id": 306, "type": "type_identifier", "text": "std", "parent": 305, "children": [], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 8}}, {"id": 307, "type": "ERROR", "text": "::vector<MotorListItem>", "parent": 305, "children": [308, 309, 310, 311], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 31}}, {"id": 308, "type": "field_identifier", "text": "vector", "parent": 307, "children": [], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 16}}, {"id": 309, "type": "<", "text": "<", "parent": 307, "children": [], "start_point": {"row": 107, "column": 16}, "end_point": {"row": 107, "column": 17}}, {"id": 310, "type": "field_identifier", "text": "MotorListItem", "parent": 307, "children": [], "start_point": {"row": 107, "column": 17}, "end_point": {"row": 107, "column": 30}}, {"id": 311, "type": ">", "text": ">", "parent": 307, "children": [], "start_point": {"row": 107, "column": 30}, "end_point": {"row": 107, "column": 31}}, {"id": 312, "type": "field_identifier", "text": "motorList", "parent": 305, "children": [], "start_point": {"row": 107, "column": 32}, "end_point": {"row": 107, "column": 41}}, {"id": 313, "type": "function_declarator", "text": "SearchAggregateObjectResult()", "parent": 37, "children": [314, 315], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 33}}, {"id": 314, "type": "identifier", "text": "SearchAggregateObjectResult", "parent": 313, "children": [], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 31}}, {"id": 315, "type": "parameter_list", "text": "()", "parent": 313, "children": [], "start_point": {"row": 111, "column": 31}, "end_point": {"row": 111, "column": 33}}, {"id": 316, "type": "declaration", "text": "explicit SearchAggregateObjectResult(const std::string &payload);", "parent": 32, "children": [317, 318], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 69}}, {"id": 317, "type": "type_identifier", "text": "explicit", "parent": 316, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 12}}, {"id": 318, "type": "function_declarator", "text": "SearchAggregateObjectResult(const std::string &payload)", "parent": 316, "children": [319, 320], "start_point": {"row": 112, "column": 13}, "end_point": {"row": 112, "column": 68}}, {"id": 319, "type": "identifier", "text": "SearchAggregateObjectResult", "parent": 318, "children": [], "start_point": {"row": 112, "column": 13}, "end_point": {"row": 112, "column": 40}}, {"id": 320, "type": "parameter_list", "text": "(const std::string &payload)", "parent": 318, "children": [321], "start_point": {"row": 112, "column": 40}, "end_point": {"row": 112, "column": 68}}, {"id": 321, "type": "parameter_declaration", "text": "const std::string &payload", "parent": 320, "children": [322, 323, 325], "start_point": {"row": 112, "column": 41}, "end_point": {"row": 112, "column": 67}}, {"id": 322, "type": "type_identifier", "text": "std", "parent": 321, "children": [], "start_point": {"row": 112, "column": 47}, "end_point": {"row": 112, "column": 50}}, {"id": 323, "type": "ERROR", "text": "::string &", "parent": 321, "children": [324], "start_point": {"row": 112, "column": 50}, "end_point": {"row": 112, "column": 60}}, {"id": 324, "type": "identifier", "text": "string", "parent": 323, "children": [], "start_point": {"row": 112, "column": 52}, "end_point": {"row": 112, "column": 58}}, {"id": 325, "type": "identifier", "text": "payload", "parent": 321, "children": [], "start_point": {"row": 112, "column": 60}, "end_point": {"row": 112, "column": 67}}, {"id": 326, "type": "unary_expression", "text": "~SearchAggregateObjectResult()", "parent": 32, "children": [327, 328], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 34}}, {"id": 327, "type": "~", "text": "~", "parent": 326, "children": [], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 5}}, {"id": 328, "type": "call_expression", "text": "SearchAggregateObjectResult()", "parent": 326, "children": [329, 330], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 34}}, {"id": 329, "type": "identifier", "text": "SearchAggregateObjectResult", "parent": 328, "children": [], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 32}}, {"id": 330, "type": "argument_list", "text": "()", "parent": 328, "children": [], "start_point": {"row": 113, "column": 32}, "end_point": {"row": 113, "column": 34}}, {"id": 331, "type": "labeled_statement", "text": "std::string getMessage()const;", "parent": 32, "children": [332, 333], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 34}}, {"id": 332, "type": "statement_identifier", "text": "std", "parent": 331, "children": [], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 7}}, {"id": 333, "type": "ERROR", "text": ":string getMessage()const", "parent": 331, "children": [334, 335], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 33}}, {"id": 334, "type": "type_identifier", "text": "string", "parent": 333, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 15}}, {"id": 335, "type": "function_declarator", "text": "getMessage()const", "parent": 333, "children": [336, 337], "start_point": {"row": 114, "column": 16}, "end_point": {"row": 114, "column": 33}}, {"id": 336, "type": "identifier", "text": "getMessage", "parent": 335, "children": [], "start_point": {"row": 114, "column": 16}, "end_point": {"row": 114, "column": 26}}, {"id": 337, "type": "parameter_list", "text": "()", "parent": 335, "children": [], "start_point": {"row": 114, "column": 26}, "end_point": {"row": 114, "column": 28}}, {"id": 338, "type": "ERROR", "text": "long getPageSize()const;\n\t\t\t\tint getTotal()const;\n\t\t\t\tData getData()const;\n\t\t\t\tstd::string getCode()const;\n\t\t\t\tbool getSuccess()const;\n\n\t\t\tprotected:\n\t\t\t\tvoid parse(const std::string &payload);\n\t\t\tprivate:\n\t\t\t\tstd::string message_;\n\t\t\t\tlong pageSize_;\n\t\t\t\tint total_;\n\t\t\t\tData data_;\n\t\t\t\tstd::string code_;\n\t\t\t\tbool success_;", "parent": 32, "children": [339, 341, 344, 372, 377, 381, 384, 387, 392], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 129, "column": 18}}, {"id": 339, "type": "sized_type_specifier", "text": "long", "parent": 338, "children": [340], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 8}}, {"id": 340, "type": "long", "text": "long", "parent": 339, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 8}}, {"id": 341, "type": "function_declarator", "text": "getPageSize()", "parent": 338, "children": [342, 343], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 22}}, {"id": 342, "type": "identifier", "text": "getPageSize", "parent": 341, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 20}}, {"id": 343, "type": "parameter_list", "text": "()", "parent": 341, "children": [], "start_point": {"row": 115, "column": 20}, "end_point": {"row": 115, "column": 22}}, {"id": 344, "type": "declaration", "text": "const;\n\t\t\t\tint getTotal()const;\n\t\t\t\tData getData()const;\n\t\t\t\tstd::string getCode()const;\n\t\t\t\tbool getSuccess()const;\n\n\t\t\tprotected:\n\t\t\t\tvoid parse(const std::string &payload);", "parent": 338, "children": [345, 346, 364], "start_point": {"row": 115, "column": 22}, "end_point": {"row": 122, "column": 43}}, {"id": 345, "type": "primitive_type", "text": "int", "parent": 344, "children": [], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 7}}, {"id": 346, "type": "ERROR", "text": "getTotal()const;\n\t\t\t\tData getData()const;\n\t\t\t\tstd::string getCode()const;\n\t\t\t\tbool getSuccess()const;\n\n\t\t\tprotected:\n\t\t\t\tvoid", "parent": 344, "children": [347, 350, 351, 354, 355, 356, 359, 360, 363], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 122, "column": 8}}, {"id": 347, "type": "function_declarator", "text": "getTotal()const", "parent": 346, "children": [348, 349], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 23}}, {"id": 348, "type": "identifier", "text": "getTotal", "parent": 347, "children": [], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 16}}, {"id": 349, "type": "parameter_list", "text": "()", "parent": 347, "children": [], "start_point": {"row": 116, "column": 16}, "end_point": {"row": 116, "column": 18}}, {"id": 350, "type": "identifier", "text": "Data", "parent": 346, "children": [], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 8}}, {"id": 351, "type": "function_declarator", "text": "getData()const", "parent": 346, "children": [352, 353], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 23}}, {"id": 352, "type": "identifier", "text": "getData", "parent": 351, "children": [], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 16}}, {"id": 353, "type": "parameter_list", "text": "()", "parent": 351, "children": [], "start_point": {"row": 117, "column": 16}, "end_point": {"row": 117, "column": 18}}, {"id": 354, "type": "identifier", "text": "std", "parent": 346, "children": [], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 7}}, {"id": 355, "type": "identifier", "text": "string", "parent": 346, "children": [], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 15}}, {"id": 356, "type": "function_declarator", "text": "getCode()const", "parent": 346, "children": [357, 358], "start_point": {"row": 118, "column": 16}, "end_point": {"row": 118, "column": 30}}, {"id": 357, "type": "identifier", "text": "getCode", "parent": 356, "children": [], "start_point": {"row": 118, "column": 16}, "end_point": {"row": 118, "column": 23}}, {"id": 358, "type": "parameter_list", "text": "()", "parent": 356, "children": [], "start_point": {"row": 118, "column": 23}, "end_point": {"row": 118, "column": 25}}, {"id": 359, "type": "primitive_type", "text": "bool", "parent": 346, "children": [], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 119, "column": 8}}, {"id": 360, "type": "function_declarator", "text": "getSuccess()const", "parent": 346, "children": [361, 362], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 26}}, {"id": 361, "type": "identifier", "text": "getSuccess", "parent": 360, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 19}}, {"id": 362, "type": "parameter_list", "text": "()", "parent": 360, "children": [], "start_point": {"row": 119, "column": 19}, "end_point": {"row": 119, "column": 21}}, {"id": 363, "type": "primitive_type", "text": "void", "parent": 346, "children": [], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 8}}, {"id": 364, "type": "function_declarator", "text": "parse(const std::string &payload)", "parent": 344, "children": [365, 366], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 42}}, {"id": 365, "type": "identifier", "text": "parse", "parent": 364, "children": [], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 14}}, {"id": 366, "type": "parameter_list", "text": "(const std::string &payload)", "parent": 364, "children": [367], "start_point": {"row": 122, "column": 14}, "end_point": {"row": 122, "column": 42}}, {"id": 367, "type": "parameter_declaration", "text": "const std::string &payload", "parent": 366, "children": [368, 369, 371], "start_point": {"row": 122, "column": 15}, "end_point": {"row": 122, "column": 41}}, {"id": 368, "type": "type_identifier", "text": "std", "parent": 367, "children": [], "start_point": {"row": 122, "column": 21}, "end_point": {"row": 122, "column": 24}}, {"id": 369, "type": "ERROR", "text": "::string &", "parent": 367, "children": [370], "start_point": {"row": 122, "column": 24}, "end_point": {"row": 122, "column": 34}}, {"id": 370, "type": "identifier", "text": "string", "parent": 369, "children": [], "start_point": {"row": 122, "column": 26}, "end_point": {"row": 122, "column": 32}}, {"id": 371, "type": "identifier", "text": "payload", "parent": 367, "children": [], "start_point": {"row": 122, "column": 34}, "end_point": {"row": 122, "column": 41}}, {"id": 372, "type": "declaration", "text": "private:\n\t\t\t\tstd::string message_;", "parent": 338, "children": [373, 376], "start_point": {"row": 123, "column": 3}, "end_point": {"row": 124, "column": 25}}, {"id": 373, "type": "ERROR", "text": ":\n\t\t\t\tstd::string", "parent": 372, "children": [374, 375], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 124, "column": 15}}, {"id": 374, "type": "identifier", "text": "std", "parent": 373, "children": [], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 7}}, {"id": 375, "type": "identifier", "text": "string", "parent": 373, "children": [], "start_point": {"row": 124, "column": 9}, "end_point": {"row": 124, "column": 15}}, {"id": 376, "type": "identifier", "text": "message_", "parent": 372, "children": [], "start_point": {"row": 124, "column": 16}, "end_point": {"row": 124, "column": 24}}, {"id": 377, "type": "declaration", "text": "long pageSize_;", "parent": 338, "children": [378, 380], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 19}}, {"id": 378, "type": "sized_type_specifier", "text": "long", "parent": 377, "children": [379], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 8}}, {"id": 379, "type": "long", "text": "long", "parent": 378, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 8}}, {"id": 380, "type": "identifier", "text": "pageSize_", "parent": 377, "children": [], "start_point": {"row": 125, "column": 9}, "end_point": {"row": 125, "column": 18}}, {"id": 381, "type": "declaration", "text": "int total_;", "parent": 338, "children": [382, 383], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 15}}, {"id": 382, "type": "primitive_type", "text": "int", "parent": 381, "children": [], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 7}}, {"id": 383, "type": "identifier", "text": "total_", "parent": 381, "children": [], "start_point": {"row": 126, "column": 8}, "end_point": {"row": 126, "column": 14}}, {"id": 384, "type": "declaration", "text": "Data data_;", "parent": 338, "children": [385, 386], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 15}}, {"id": 385, "type": "type_identifier", "text": "Data", "parent": 384, "children": [], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 8}}, {"id": 386, "type": "identifier", "text": "data_", "parent": 384, "children": [], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 14}}, {"id": 387, "type": "declaration", "text": "std::string code_;", "parent": 338, "children": [388, 389, 391], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 22}}, {"id": 388, "type": "type_identifier", "text": "std", "parent": 387, "children": [], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 7}}, {"id": 389, "type": "ERROR", "text": "::string", "parent": 387, "children": [390], "start_point": {"row": 128, "column": 7}, "end_point": {"row": 128, "column": 15}}, {"id": 390, "type": "identifier", "text": "string", "parent": 389, "children": [], "start_point": {"row": 128, "column": 9}, "end_point": {"row": 128, "column": 15}}, {"id": 391, "type": "identifier", "text": "code_", "parent": 387, "children": [], "start_point": {"row": 128, "column": 16}, "end_point": {"row": 128, "column": 21}}, {"id": 392, "type": "declaration", "text": "bool success_;", "parent": 338, "children": [393, 394], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 18}}, {"id": 393, "type": "primitive_type", "text": "bool", "parent": 392, "children": [], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 8}}, {"id": 394, "type": "identifier", "text": "success_", "parent": 392, "children": [], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 17}}, {"id": 395, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 135, "column": 0}, "end_point": {"row": 135, "column": 6}}]}, "node_categories": {"declarations": {"functions": [21, 24, 27, 313, 318, 335, 341, 347, 351, 356, 360, 364], "variables": [30, 37, 41, 45, 50, 53, 58, 61, 66, 69, 72, 75, 80, 83, 88, 91, 96, 101, 105, 110, 113, 118, 121, 126, 129, 132, 135, 140, 143, 148, 151, 156, 161, 165, 170, 173, 178, 181, 186, 189, 192, 195, 200, 203, 208, 211, 216, 221, 225, 230, 233, 238, 241, 246, 249, 252, 255, 260, 263, 268, 271, 276, 281, 289, 297, 305, 316, 321, 344, 367, 372, 377, 381, 384, 387, 392], "classes": [38, 39, 42, 43, 102, 103, 162, 163, 222, 223], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [326, 328], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 22, 23, 25, 26, 28, 29, 31, 33, 35, 40, 44, 46, 48, 49, 52, 54, 56, 57, 60, 62, 64, 65, 68, 71, 74, 76, 78, 79, 82, 84, 86, 87, 90, 92, 94, 95, 97, 99, 100, 104, 106, 108, 109, 112, 114, 116, 117, 120, 122, 124, 125, 128, 131, 134, 136, 138, 139, 142, 144, 146, 147, 150, 152, 154, 155, 157, 159, 160, 164, 166, 168, 169, 172, 174, 176, 177, 180, 182, 184, 185, 188, 191, 194, 196, 198, 199, 202, 204, 206, 207, 210, 212, 214, 215, 217, 219, 220, 224, 226, 228, 229, 232, 234, 236, 237, 240, 242, 244, 245, 248, 251, 254, 256, 258, 259, 262, 264, 266, 267, 270, 272, 274, 275, 277, 279, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, 306, 308, 310, 312, 314, 317, 319, 322, 324, 325, 329, 332, 334, 336, 339, 342, 348, 350, 352, 354, 355, 357, 361, 365, 368, 370, 371, 374, 375, 376, 378, 380, 383, 385, 386, 388, 390, 391, 394, 395], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "ALIBABACLOUD_CDRS_EXPORT", "text_snippet": "namespace AlibabaCloud\n{\n\tnamespace CDRS\n\t{\n\t\tnamespace Model\n\t\t{\n\t\t\tclass ALIBABACLOUD_CDRS_EXPORT "}, {"node_id": 24, "universal_type": "function", "name": "ALIBABACLOUD_CDRS_EXPORT", "text_snippet": "namespace CDRS\n\t{\n\t\tnamespace Model\n\t\t{\n\t\t\tclass ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResul"}, {"node_id": 27, "universal_type": "function", "name": "ALIBABACLOUD_CDRS_EXPORT", "text_snippet": "namespace Model\n\t\t{\n\t\t\tclass ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceRe"}, {"node_id": 313, "universal_type": "function", "name": "unknown", "text_snippet": "SearchAggregateObjectResult()"}, {"node_id": 318, "universal_type": "function", "name": "unknown", "text_snippet": "SearchAggregateObjectResult(const std::string &payload)"}, {"node_id": 335, "universal_type": "function", "name": "unknown", "text_snippet": "getMessage()const"}, {"node_id": 341, "universal_type": "function", "name": "unknown", "text_snippet": "getPageSize()"}, {"node_id": 347, "universal_type": "function", "name": "unknown", "text_snippet": "getTotal()const"}, {"node_id": 351, "universal_type": "function", "name": "unknown", "text_snippet": "getData()const"}, {"node_id": 356, "universal_type": "function", "name": "unknown", "text_snippet": "getCode()const"}, {"node_id": 360, "universal_type": "function", "name": "unknown", "text_snippet": "getSuccess()const"}, {"node_id": 364, "universal_type": "function", "name": "unknown", "text_snippet": "parse(const std::string &payload)"}], "class_declarations": [{"node_id": 38, "universal_type": "class", "name": "Data", "text_snippet": "struct Data\n\t\t\t\t{\n\t\t\t\t\tstruct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightB"}, {"node_id": 39, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 42, "universal_type": "class", "name": "BodyListItem", "text_snippet": "struct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::stri"}, {"node_id": 43, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 102, "universal_type": "class", "name": "FaceListItem", "text_snippet": "struct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::stri"}, {"node_id": 103, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 162, "universal_type": "class", "name": "MotorListItem", "text_snippet": "struct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::str"}, {"node_id": 163, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 222, "universal_type": "class", "name": "NonMotorListItem", "text_snippet": "struct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::"}, {"node_id": 223, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <string>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <vector>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <utility>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <alibabacloud/core/ServiceResult.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <alibabacloud/cdrs/CDRSExport.h>\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "/*\n * Copyright 2009-2017 Alibaba Cloud All rights reserved.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_\n#define ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_\n\n#include <string>\n#include <vector>\n#include <utility>\n#include <alibabacloud/core/ServiceResult.h>\n#include <alibabacloud/cdrs/CDRSExport.h>\n\nnamespace AlibabaCloud\n{\n\tnamespace CDRS\n\t{\n\t\tnamespace Model\n\t\t{\n\t\t\tclass ALIBABACLOUD_CDRS_EXPORT SearchAggregateObjectResult : public ServiceResult\n\t\t\t{\n\t\t\tpublic:\n\t\t\t\tstruct Data\n\t\t\t\t{\n\t\t\t\t\tstruct BodyListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct FaceListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct MotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstruct NonMotorListItem\n\t\t\t\t\t{\n\t\t\t\t\t\tstd::string targetImageUrl;\n\t\t\t\t\t\tint rightBottomX;\n\t\t\t\t\t\tstd::string deviceID;\n\t\t\t\t\t\tint rightBottomY;\n\t\t\t\t\t\tstd::string sourceImageUrl;\n\t\t\t\t\t\tint leftTopY;\n\t\t\t\t\t\tint leftTopX;\n\t\t\t\t\t\tfloat deviceLongitude;\n\t\t\t\t\t\tstd::string objectType;\n\t\t\t\t\t\tfloat score;\n\t\t\t\t\t\tstd::string personId;\n\t\t\t\t\t\tfloat deviceLatitude;\n\t\t\t\t\t\tstd::string shotTime;\n\t\t\t\t\t\tstd::string deviceName;\n\t\t\t\t\t};\n\t\t\t\t\tstd::vector<NonMotorListItem> nonMotorList;\n\t\t\t\t\tstd::vector<BodyListItem> bodyList;\n\t\t\t\t\tstd::vector<FaceListItem> faceList;\n\t\t\t\t\tstd::vector<MotorListItem> motorList;\n\t\t\t\t};\n\n\n\t\t\t\tSearchAggregateObjectResult();\n\t\t\t\texplicit SearchAggregateObjectResult(const std::string &payload);\n\t\t\t\t~SearchAggregateObjectResult();\n\t\t\t\tstd::string getMessage()const;\n\t\t\t\tlong getPageSize()const;\n\t\t\t\tint getTotal()const;\n\t\t\t\tData getData()const;\n\t\t\t\tstd::string getCode()const;\n\t\t\t\tbool getSuccess()const;\n\n\t\t\tprotected:\n\t\t\t\tvoid parse(const std::string &payload);\n\t\t\tprivate:\n\t\t\t\tstd::string message_;\n\t\t\t\tlong pageSize_;\n\t\t\t\tint total_;\n\t\t\t\tData data_;\n\t\t\t\tstd::string code_;\n\t\t\t\tbool success_;\n\n\t\t\t};\n\t\t}\n\t}\n}\n#endif // !ALIBABACLOUD_CDRS_MODEL_SEARCHAGGREGATEOBJECTRESULT_H_"}
315
c
// // Created by Administrator on 2018/5/6. // #ifndef SAMPLE7_5_OBJOBJECTUT_H #define SAMPLE7_5_OBJOBJECTUT_H #include <vulkan/vulkan.h> #include "vulkan_wrapper.h" #include <string> class ObjObjectUt { public: float * pushConstantData; VkDevice* devicePointer; float* vdata; int vCount; VkBuffer vertexDatabuf; VkDeviceMemory vertexDataMem; VkDescriptorBufferInfo vertexDataBufferInfo; ObjObjectUt(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties); ~ObjObjectUt(); void drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer); }; #endif //SAMPLE7_5_OBJOBJECTUT_H
30.74
23
(translation_unit) "//\n// Created by Administrator on 2018/5/6.\n//\n\n#ifndef SAMPLE7_5_OBJOBJECTUT_H\n#define SAMPLE7_5_OBJOBJECTUT_H\n#include <vulkan/vulkan.h>\n#include "vulkan_wrapper.h"\n#include <string>\n\nclass ObjObjectUt {\npublic:\n float * pushConstantData;\n VkDevice* devicePointer;\n float* vdata;\n int vCount;\n VkBuffer vertexDatabuf;\n VkDeviceMemory vertexDataMem;\n VkDescriptorBufferInfo vertexDataBufferInfo;\n ObjObjectUt(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties);\n ~ObjObjectUt();\n void drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer);\n};\n\n\n#endif //SAMPLE7_5_OBJOBJECTUT_H\n" (comment) "//" (comment) "// Created by Administrator on 2018/5/6." (comment) "//" (preproc_ifdef) "#ifndef SAMPLE7_5_OBJOBJECTUT_H\n#define SAMPLE7_5_OBJOBJECTUT_H\n#include <vulkan/vulkan.h>\n#include "vulkan_wrapper.h"\n#include <string>\n\nclass ObjObjectUt {\npublic:\n float * pushConstantData;\n VkDevice* devicePointer;\n float* vdata;\n int vCount;\n VkBuffer vertexDatabuf;\n VkDeviceMemory vertexDataMem;\n VkDescriptorBufferInfo vertexDataBufferInfo;\n ObjObjectUt(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties);\n ~ObjObjectUt();\n void drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer);\n};\n\n\n#endif" (#ifndef) "#ifndef" (identifier) "SAMPLE7_5_OBJOBJECTUT_H" (preproc_def) "#define SAMPLE7_5_OBJOBJECTUT_H\n" (#define) "#define" (identifier) "SAMPLE7_5_OBJOBJECTUT_H" (preproc_include) "#include <vulkan/vulkan.h>\n" (#include) "#include" (system_lib_string) "<vulkan/vulkan.h>" (preproc_include) "#include "vulkan_wrapper.h"\n" (#include) "#include" (string_literal) ""vulkan_wrapper.h"" (") """ (string_content) "vulkan_wrapper.h" (") """ (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (function_definition) "class ObjObjectUt {\npublic:\n float * pushConstantData;\n VkDevice* devicePointer;\n float* vdata;\n int vCount;\n VkBuffer vertexDatabuf;\n VkDeviceMemory vertexDataMem;\n VkDescriptorBufferInfo vertexDataBufferInfo;\n ObjObjectUt(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties);\n ~ObjObjectUt();\n void drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer);\n}" (type_identifier) "class" (identifier) "ObjObjectUt" (compound_statement) "{\npublic:\n float * pushConstantData;\n VkDevice* devicePointer;\n float* vdata;\n int vCount;\n VkBuffer vertexDatabuf;\n VkDeviceMemory vertexDataMem;\n VkDescriptorBufferInfo vertexDataBufferInfo;\n ObjObjectUt(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties);\n ~ObjObjectUt();\n void drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer);\n}" ({) "{" (labeled_statement) "public:\n float * pushConstantData;" (statement_identifier) "public" (:) ":" (declaration) "float * pushConstantData;" (primitive_type) "float" (pointer_declarator) "* pushConstantData" (*) "*" (identifier) "pushConstantData" (;) ";" (declaration) "VkDevice* devicePointer;" (type_identifier) "VkDevice" (pointer_declarator) "* devicePointer" (*) "*" (identifier) "devicePointer" (;) ";" (declaration) "float* vdata;" (primitive_type) "float" (pointer_declarator) "* vdata" (*) "*" (identifier) "vdata" (;) ";" (declaration) "int vCount;" (primitive_type) "int" (identifier) "vCount" (;) ";" (declaration) "VkBuffer vertexDatabuf;" (type_identifier) "VkBuffer" (identifier) "vertexDatabuf" (;) ";" (declaration) "VkDeviceMemory vertexDataMem;" (type_identifier) "VkDeviceMemory" (identifier) "vertexDataMem" (;) ";" (declaration) "VkDescriptorBufferInfo vertexDataBufferInfo;" (type_identifier) "VkDescriptorBufferInfo" (identifier) "vertexDataBufferInfo" (;) ";" (expression_statement) "ObjObjectUt(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties);" (call_expression) "ObjObjectUt(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties)" (identifier) "ObjObjectUt" (argument_list) "(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties)" (() "(" (binary_expression) "float* vdataIn" (identifier) "float" (*) "*" (identifier) "vdataIn" (,) "," (ERROR) "int" (identifier) "int" (identifier) "dataByteCount" (,) "," (ERROR) "int" (identifier) "int" (identifier) "vCountIn" (,) "," (binary_expression) "VkDevice& device" (identifier) "VkDevice" (&) "&" (identifier) "device" (,) "," (binary_expression) "VkPhysicalDeviceMemoryProperties& memoryroperties" (identifier) "VkPhysicalDeviceMemoryProperties" (&) "&" (identifier) "memoryroperties" ()) ")" (;) ";" (expression_statement) "~ObjObjectUt();" (unary_expression) "~ObjObjectUt()" (~) "~" (call_expression) "ObjObjectUt()" (identifier) "ObjObjectUt" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer);" (primitive_type) "void" (function_declarator) "drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer)" (identifier) "drawSelf" (parameter_list) "(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer)" (() "(" (parameter_declaration) "VkCommandBuffer& cmd" (type_identifier) "VkCommandBuffer" (ERROR) "&" (&) "&" (identifier) "cmd" (,) "," (parameter_declaration) "VkPipelineLayout& pipelineLayout" (type_identifier) "VkPipelineLayout" (ERROR) "&" (&) "&" (identifier) "pipelineLayout" (,) "," (parameter_declaration) "VkPipeline& pipeline" (type_identifier) "VkPipeline" (ERROR) "&" (&) "&" (identifier) "pipeline" (,) "," (parameter_declaration) "VkDescriptorSet* desSetPointer" (type_identifier) "VkDescriptorSet" (pointer_declarator) "* desSetPointer" (*) "*" (identifier) "desSetPointer" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "//SAMPLE7_5_OBJOBJECTUT_H"
138
5
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 30.74, "nodes": 89, "errors": 0, "source_hash": "6c490d860322f7e1aaa1d812d0a8e74536fc2293f7ad90425b472bc34f14cd66", "categorized_nodes": 67}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SAMPLE7_5_OBJOBJECTUT_H\n#define SAMPLE7_5_OBJOBJECTUT_H\n#include <vulkan/vulkan.h>\n#include \"vulkan_wrapper.h\"\n#include <string>\n\nclass ObjObjectUt {\npublic:\n float * pushConstantData;\n VkDevice* devicePointer;\n float* vdata;\n int vCount;\n VkBuffer vertexDatabuf;\n VkDeviceMemory vertexDataMem;\n VkDescriptorBufferInfo vertexDataBufferInfo;\n ObjObjectUt(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties);\n ~ObjObjectUt();\n void drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer);\n};\n\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 88], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "SAMPLE7_5_OBJOBJECTUT_H", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 31}}, {"id": 3, "type": "preproc_def", "text": "#define SAMPLE7_5_OBJOBJECTUT_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": "SAMPLE7_5_OBJOBJECTUT_H", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 31}}, {"id": 6, "type": "preproc_include", "text": "#include <vulkan/vulkan.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": "system_lib_string", "text": "<vulkan/vulkan.h>", "parent": 6, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 26}}, {"id": 9, "type": "preproc_include", "text": "#include \"vulkan_wrapper.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"vulkan_wrapper.h\"", "parent": 9, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 27}}, {"id": 12, "type": "preproc_include", "text": "#include <string>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<string>", "parent": 12, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 17}}, {"id": 15, "type": "function_definition", "text": "class ObjObjectUt {\npublic:\n float * pushConstantData;\n VkDevice* devicePointer;\n float* vdata;\n int vCount;\n VkBuffer vertexDatabuf;\n VkDeviceMemory vertexDataMem;\n VkDescriptorBufferInfo vertexDataBufferInfo;\n ObjObjectUt(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties);\n ~ObjObjectUt();\n void drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer);\n}", "parent": 0, "children": [16], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 16, "type": "identifier", "text": "ObjObjectUt", "parent": 15, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 17}}, {"id": 17, "type": "labeled_statement", "text": "public:\n float * pushConstantData;", "parent": 15, "children": [18], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 29}}, {"id": 18, "type": "declaration", "text": "float * pushConstantData;", "parent": 17, "children": [19, 20], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 29}}, {"id": 19, "type": "primitive_type", "text": "float", "parent": 18, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 9}}, {"id": 20, "type": "pointer_declarator", "text": "* pushConstantData", "parent": 18, "children": [21, 22], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 28}}, {"id": 21, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 11}}, {"id": 22, "type": "identifier", "text": "pushConstantData", "parent": 20, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 28}}, {"id": 23, "type": "declaration", "text": "VkDevice* devicePointer;", "parent": 15, "children": [24, 25], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 28}}, {"id": 24, "type": "type_identifier", "text": "VkDevice", "parent": 23, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 12}}, {"id": 25, "type": "pointer_declarator", "text": "* devicePointer", "parent": 23, "children": [26, 27], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 27}}, {"id": 26, "type": "*", "text": "*", "parent": 25, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 13}}, {"id": 27, "type": "identifier", "text": "devicePointer", "parent": 25, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 27}}, {"id": 28, "type": "declaration", "text": "float* vdata;", "parent": 15, "children": [29, 30], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 17}}, {"id": 29, "type": "primitive_type", "text": "float", "parent": 28, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 9}}, {"id": 30, "type": "pointer_declarator", "text": "* vdata", "parent": 28, "children": [31, 32], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 16}}, {"id": 31, "type": "*", "text": "*", "parent": 30, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 10}}, {"id": 32, "type": "identifier", "text": "vdata", "parent": 30, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 16}}, {"id": 33, "type": "declaration", "text": "int vCount;", "parent": 15, "children": [34, 35], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 15}}, {"id": 34, "type": "primitive_type", "text": "int", "parent": 33, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 7}}, {"id": 35, "type": "identifier", "text": "vCount", "parent": 33, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 14}}, {"id": 36, "type": "declaration", "text": "VkBuffer vertexDatabuf;", "parent": 15, "children": [37, 38], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 27}}, {"id": 37, "type": "type_identifier", "text": "VkBuffer", "parent": 36, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 12}}, {"id": 38, "type": "identifier", "text": "vertexDatabuf", "parent": 36, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 26}}, {"id": 39, "type": "declaration", "text": "VkDeviceMemory vertexDataMem;", "parent": 15, "children": [40, 41], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 33}}, {"id": 40, "type": "type_identifier", "text": "VkDeviceMemory", "parent": 39, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 18}}, {"id": 41, "type": "identifier", "text": "vertexDataMem", "parent": 39, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 32}}, {"id": 42, "type": "declaration", "text": "VkDescriptorBufferInfo vertexDataBufferInfo;", "parent": 15, "children": [43, 44], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 48}}, {"id": 43, "type": "type_identifier", "text": "VkDescriptorBufferInfo", "parent": 42, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 26}}, {"id": 44, "type": "identifier", "text": "vertexDataBufferInfo", "parent": 42, "children": [], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 47}}, {"id": 45, "type": "call_expression", "text": "ObjObjectUt(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties)", "parent": 15, "children": [46, 47], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 129}}, {"id": 46, "type": "identifier", "text": "ObjObjectUt", "parent": 45, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 15}}, {"id": 47, "type": "argument_list", "text": "(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties)", "parent": 45, "children": [48, 52, 54, 55, 57, 58, 61], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 129}}, {"id": 48, "type": "binary_expression", "text": "float* vdataIn", "parent": 47, "children": [49, 50, 51], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 30}}, {"id": 49, "type": "identifier", "text": "float", "parent": 48, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 21}}, {"id": 50, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 22}}, {"id": 51, "type": "identifier", "text": "vdataIn", "parent": 48, "children": [], "start_point": {"row": 19, "column": 23}, "end_point": {"row": 19, "column": 30}}, {"id": 52, "type": "ERROR", "text": "int", "parent": 47, "children": [53], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 34}}, {"id": 53, "type": "identifier", "text": "int", "parent": 52, "children": [], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 34}}, {"id": 54, "type": "identifier", "text": "dataByteCount", "parent": 47, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 48}}, {"id": 55, "type": "ERROR", "text": "int", "parent": 47, "children": [56], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 52}}, {"id": 56, "type": "identifier", "text": "int", "parent": 55, "children": [], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 52}}, {"id": 57, "type": "identifier", "text": "vCountIn", "parent": 47, "children": [], "start_point": {"row": 19, "column": 53}, "end_point": {"row": 19, "column": 61}}, {"id": 58, "type": "binary_expression", "text": "VkDevice& device", "parent": 47, "children": [59, 60], "start_point": {"row": 19, "column": 62}, "end_point": {"row": 19, "column": 78}}, {"id": 59, "type": "identifier", "text": "VkDevice", "parent": 58, "children": [], "start_point": {"row": 19, "column": 62}, "end_point": {"row": 19, "column": 70}}, {"id": 60, "type": "identifier", "text": "device", "parent": 58, "children": [], "start_point": {"row": 19, "column": 72}, "end_point": {"row": 19, "column": 78}}, {"id": 61, "type": "binary_expression", "text": "VkPhysicalDeviceMemoryProperties& memoryroperties", "parent": 47, "children": [62, 63], "start_point": {"row": 19, "column": 79}, "end_point": {"row": 19, "column": 128}}, {"id": 62, "type": "identifier", "text": "VkPhysicalDeviceMemoryProperties", "parent": 61, "children": [], "start_point": {"row": 19, "column": 79}, "end_point": {"row": 19, "column": 111}}, {"id": 63, "type": "identifier", "text": "memoryroperties", "parent": 61, "children": [], "start_point": {"row": 19, "column": 113}, "end_point": {"row": 19, "column": 128}}, {"id": 64, "type": "unary_expression", "text": "~ObjObjectUt()", "parent": 15, "children": [65, 66], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 18}}, {"id": 65, "type": "~", "text": "~", "parent": 64, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 5}}, {"id": 66, "type": "call_expression", "text": "ObjObjectUt()", "parent": 64, "children": [67, 68], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 18}}, {"id": 67, "type": "identifier", "text": "ObjObjectUt", "parent": 66, "children": [], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 16}}, {"id": 68, "type": "argument_list", "text": "()", "parent": 66, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 18}}, {"id": 69, "type": "declaration", "text": "void drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer);", "parent": 15, "children": [70, 71], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 125}}, {"id": 70, "type": "primitive_type", "text": "void", "parent": 69, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 8}}, {"id": 71, "type": "function_declarator", "text": "drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer)", "parent": 69, "children": [72, 73], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 124}}, {"id": 72, "type": "identifier", "text": "drawSelf", "parent": 71, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 17}}, {"id": 73, "type": "parameter_list", "text": "(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer)", "parent": 71, "children": [74, 77, 80, 83], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 124}}, {"id": 74, "type": "parameter_declaration", "text": "VkCommandBuffer& cmd", "parent": 73, "children": [75, 76], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 38}}, {"id": 75, "type": "type_identifier", "text": "VkCommandBuffer", "parent": 74, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 33}}, {"id": 76, "type": "identifier", "text": "cmd", "parent": 74, "children": [], "start_point": {"row": 21, "column": 35}, "end_point": {"row": 21, "column": 38}}, {"id": 77, "type": "parameter_declaration", "text": "VkPipelineLayout& pipelineLayout", "parent": 73, "children": [78, 79], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 71}}, {"id": 78, "type": "type_identifier", "text": "VkPipelineLayout", "parent": 77, "children": [], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 55}}, {"id": 79, "type": "identifier", "text": "pipelineLayout", "parent": 77, "children": [], "start_point": {"row": 21, "column": 57}, "end_point": {"row": 21, "column": 71}}, {"id": 80, "type": "parameter_declaration", "text": "VkPipeline& pipeline", "parent": 73, "children": [81, 82], "start_point": {"row": 21, "column": 72}, "end_point": {"row": 21, "column": 92}}, {"id": 81, "type": "type_identifier", "text": "VkPipeline", "parent": 80, "children": [], "start_point": {"row": 21, "column": 72}, "end_point": {"row": 21, "column": 82}}, {"id": 82, "type": "identifier", "text": "pipeline", "parent": 80, "children": [], "start_point": {"row": 21, "column": 84}, "end_point": {"row": 21, "column": 92}}, {"id": 83, "type": "parameter_declaration", "text": "VkDescriptorSet* desSetPointer", "parent": 73, "children": [84, 85], "start_point": {"row": 21, "column": 93}, "end_point": {"row": 21, "column": 123}}, {"id": 84, "type": "type_identifier", "text": "VkDescriptorSet", "parent": 83, "children": [], "start_point": {"row": 21, "column": 93}, "end_point": {"row": 21, "column": 108}}, {"id": 85, "type": "pointer_declarator", "text": "* desSetPointer", "parent": 83, "children": [86, 87], "start_point": {"row": 21, "column": 108}, "end_point": {"row": 21, "column": 123}}, {"id": 86, "type": "*", "text": "*", "parent": 85, "children": [], "start_point": {"row": 21, "column": 108}, "end_point": {"row": 21, "column": 109}}, {"id": 87, "type": "identifier", "text": "desSetPointer", "parent": 85, "children": [], "start_point": {"row": 21, "column": 110}, "end_point": {"row": 21, "column": 123}}, {"id": 88, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 71], "variables": [18, 23, 28, 33, 36, 39, 42, 69, 74, 77, 80, 83], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [45, 48, 58, 61, 64, 66], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 16, 22, 24, 27, 32, 35, 37, 38, 40, 41, 43, 44, 46, 49, 51, 53, 54, 56, 57, 59, 60, 62, 63, 67, 72, 75, 76, 78, 79, 81, 82, 84, 87, 88], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "ObjObjectUt", "text_snippet": "class ObjObjectUt {\npublic:\n float * pushConstantData;\n VkDevice* devicePointer;\n float* vd"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet*"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <vulkan/vulkan.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"vulkan_wrapper.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <string>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "//\n// Created by Administrator on 2018/5/6.\n//\n\n#ifndef SAMPLE7_5_OBJOBJECTUT_H\n#define SAMPLE7_5_OBJOBJECTUT_H\n#include <vulkan/vulkan.h>\n#include \"vulkan_wrapper.h\"\n#include <string>\n\nclass ObjObjectUt {\npublic:\n float * pushConstantData;\n VkDevice* devicePointer;\n float* vdata;\n int vCount;\n VkBuffer vertexDatabuf;\n VkDeviceMemory vertexDataMem;\n VkDescriptorBufferInfo vertexDataBufferInfo;\n ObjObjectUt(float* vdataIn,int dataByteCount,int vCountIn,VkDevice& device,VkPhysicalDeviceMemoryProperties& memoryroperties);\n ~ObjObjectUt();\n void drawSelf(VkCommandBuffer& cmd,VkPipelineLayout& pipelineLayout,VkPipeline& pipeline,VkDescriptorSet* desSetPointer);\n};\n\n\n#endif //SAMPLE7_5_OBJOBJECTUT_H\n"}
316
c
#ifndef __PETSCMATHYPRE_H #define __PETSCMATHYPRE_H #include <petscmat.h> #include <_hypre_parcsr_mv.h> PETSC_EXTERN PetscErrorCode MatCreateFromParCSR(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*); PETSC_EXTERN PetscErrorCode MatHYPREGetParCSR(Mat,hypre_ParCSRMatrix**); #endif
39.14
7
(translation_unit) "#ifndef __PETSCMATHYPRE_H\n#define __PETSCMATHYPRE_H\n\n#include <petscmat.h>\n#include <_hypre_parcsr_mv.h>\n\nPETSC_EXTERN PetscErrorCode MatCreateFromParCSR(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*);\nPETSC_EXTERN PetscErrorCode MatHYPREGetParCSR(Mat,hypre_ParCSRMatrix**);\n\n#endif\n" (preproc_ifdef) "#ifndef __PETSCMATHYPRE_H\n#define __PETSCMATHYPRE_H\n\n#include <petscmat.h>\n#include <_hypre_parcsr_mv.h>\n\nPETSC_EXTERN PetscErrorCode MatCreateFromParCSR(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*);\nPETSC_EXTERN PetscErrorCode MatHYPREGetParCSR(Mat,hypre_ParCSRMatrix**);\n\n#endif" (#ifndef) "#ifndef" (identifier) "__PETSCMATHYPRE_H" (preproc_def) "#define __PETSCMATHYPRE_H\n" (#define) "#define" (identifier) "__PETSCMATHYPRE_H" (preproc_include) "#include <petscmat.h>\n" (#include) "#include" (system_lib_string) "<petscmat.h>" (preproc_include) "#include <_hypre_parcsr_mv.h>\n" (#include) "#include" (system_lib_string) "<_hypre_parcsr_mv.h>" (declaration) "PETSC_EXTERN PetscErrorCode MatCreateFromParCSR(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*);" (type_identifier) "PETSC_EXTERN" (ERROR) "PetscErrorCode" (identifier) "PetscErrorCode" (function_declarator) "MatCreateFromParCSR(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*)" (identifier) "MatCreateFromParCSR" (parameter_list) "(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*)" (() "(" (parameter_declaration) "hypre_ParCSRMatrix*" (type_identifier) "hypre_ParCSRMatrix" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "MatType" (type_identifier) "MatType" (,) "," (parameter_declaration) "PetscCopyMode" (type_identifier) "PetscCopyMode" (,) "," (parameter_declaration) "Mat*" (type_identifier) "Mat" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (declaration) "PETSC_EXTERN PetscErrorCode MatHYPREGetParCSR(Mat,hypre_ParCSRMatrix**);" (type_identifier) "PETSC_EXTERN" (ERROR) "PetscErrorCode" (identifier) "PetscErrorCode" (function_declarator) "MatHYPREGetParCSR(Mat,hypre_ParCSRMatrix**)" (identifier) "MatHYPREGetParCSR" (parameter_list) "(Mat,hypre_ParCSRMatrix**)" (() "(" (parameter_declaration) "Mat" (type_identifier) "Mat" (,) "," (parameter_declaration) "hypre_ParCSRMatrix**" (type_identifier) "hypre_ParCSRMatrix" (abstract_pointer_declarator) "**" (*) "*" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (#endif) "#endif"
58
2
{"language": "c", "success": true, "metadata": {"lines": 7, "avg_line_length": 39.14, "nodes": 47, "errors": 0, "source_hash": "af6362c37c1d7bbd8cd9b8e950cdd1ff332a5569ab4dfaab583f7540db60ea59", "categorized_nodes": 33}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __PETSCMATHYPRE_H\n#define __PETSCMATHYPRE_H\n\n#include <petscmat.h>\n#include <_hypre_parcsr_mv.h>\n\nPETSC_EXTERN PetscErrorCode MatCreateFromParCSR(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*);\nPETSC_EXTERN PetscErrorCode MatHYPREGetParCSR(Mat,hypre_ParCSRMatrix**);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 31, 46], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "__PETSCMATHYPRE_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define __PETSCMATHYPRE_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": "__PETSCMATHYPRE_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include <petscmat.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": "<petscmat.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 21}}, {"id": 9, "type": "preproc_include", "text": "#include <_hypre_parcsr_mv.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": "<_hypre_parcsr_mv.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 29}}, {"id": 12, "type": "declaration", "text": "PETSC_EXTERN PetscErrorCode MatCreateFromParCSR(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*);", "parent": 0, "children": [13, 14, 16], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 96}}, {"id": 13, "type": "type_identifier", "text": "PETSC_EXTERN", "parent": 12, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 12}}, {"id": 14, "type": "ERROR", "text": "PetscErrorCode", "parent": 12, "children": [15], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 27}}, {"id": 15, "type": "identifier", "text": "PetscErrorCode", "parent": 14, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 27}}, {"id": 16, "type": "function_declarator", "text": "MatCreateFromParCSR(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*)", "parent": 12, "children": [17, 18], "start_point": {"row": 6, "column": 28}, "end_point": {"row": 6, "column": 95}}, {"id": 17, "type": "identifier", "text": "MatCreateFromParCSR", "parent": 16, "children": [], "start_point": {"row": 6, "column": 28}, "end_point": {"row": 6, "column": 47}}, {"id": 18, "type": "parameter_list", "text": "(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*)", "parent": 16, "children": [19, 23, 25, 27], "start_point": {"row": 6, "column": 47}, "end_point": {"row": 6, "column": 95}}, {"id": 19, "type": "parameter_declaration", "text": "hypre_ParCSRMatrix*", "parent": 18, "children": [20, 21], "start_point": {"row": 6, "column": 48}, "end_point": {"row": 6, "column": 67}}, {"id": 20, "type": "type_identifier", "text": "hypre_ParCSRMatrix", "parent": 19, "children": [], "start_point": {"row": 6, "column": 48}, "end_point": {"row": 6, "column": 66}}, {"id": 21, "type": "abstract_pointer_declarator", "text": "*", "parent": 19, "children": [22], "start_point": {"row": 6, "column": 66}, "end_point": {"row": 6, "column": 67}}, {"id": 22, "type": "*", "text": "*", "parent": 21, "children": [], "start_point": {"row": 6, "column": 66}, "end_point": {"row": 6, "column": 67}}, {"id": 23, "type": "parameter_declaration", "text": "MatType", "parent": 18, "children": [24], "start_point": {"row": 6, "column": 68}, "end_point": {"row": 6, "column": 75}}, {"id": 24, "type": "type_identifier", "text": "MatType", "parent": 23, "children": [], "start_point": {"row": 6, "column": 68}, "end_point": {"row": 6, "column": 75}}, {"id": 25, "type": "parameter_declaration", "text": "PetscCopyMode", "parent": 18, "children": [26], "start_point": {"row": 6, "column": 76}, "end_point": {"row": 6, "column": 89}}, {"id": 26, "type": "type_identifier", "text": "PetscCopyMode", "parent": 25, "children": [], "start_point": {"row": 6, "column": 76}, "end_point": {"row": 6, "column": 89}}, {"id": 27, "type": "parameter_declaration", "text": "Mat*", "parent": 18, "children": [28, 29], "start_point": {"row": 6, "column": 90}, "end_point": {"row": 6, "column": 94}}, {"id": 28, "type": "type_identifier", "text": "Mat", "parent": 27, "children": [], "start_point": {"row": 6, "column": 90}, "end_point": {"row": 6, "column": 93}}, {"id": 29, "type": "abstract_pointer_declarator", "text": "*", "parent": 27, "children": [30], "start_point": {"row": 6, "column": 93}, "end_point": {"row": 6, "column": 94}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 6, "column": 93}, "end_point": {"row": 6, "column": 94}}, {"id": 31, "type": "declaration", "text": "PETSC_EXTERN PetscErrorCode MatHYPREGetParCSR(Mat,hypre_ParCSRMatrix**);", "parent": 0, "children": [32, 33, 35], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 72}}, {"id": 32, "type": "type_identifier", "text": "PETSC_EXTERN", "parent": 31, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 12}}, {"id": 33, "type": "ERROR", "text": "PetscErrorCode", "parent": 31, "children": [34], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 27}}, {"id": 34, "type": "identifier", "text": "PetscErrorCode", "parent": 33, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 27}}, {"id": 35, "type": "function_declarator", "text": "MatHYPREGetParCSR(Mat,hypre_ParCSRMatrix**)", "parent": 31, "children": [36, 37], "start_point": {"row": 7, "column": 28}, "end_point": {"row": 7, "column": 71}}, {"id": 36, "type": "identifier", "text": "MatHYPREGetParCSR", "parent": 35, "children": [], "start_point": {"row": 7, "column": 28}, "end_point": {"row": 7, "column": 45}}, {"id": 37, "type": "parameter_list", "text": "(Mat,hypre_ParCSRMatrix**)", "parent": 35, "children": [38, 40], "start_point": {"row": 7, "column": 45}, "end_point": {"row": 7, "column": 71}}, {"id": 38, "type": "parameter_declaration", "text": "Mat", "parent": 37, "children": [39], "start_point": {"row": 7, "column": 46}, "end_point": {"row": 7, "column": 49}}, {"id": 39, "type": "type_identifier", "text": "Mat", "parent": 38, "children": [], "start_point": {"row": 7, "column": 46}, "end_point": {"row": 7, "column": 49}}, {"id": 40, "type": "parameter_declaration", "text": "hypre_ParCSRMatrix**", "parent": 37, "children": [41, 42], "start_point": {"row": 7, "column": 50}, "end_point": {"row": 7, "column": 70}}, {"id": 41, "type": "type_identifier", "text": "hypre_ParCSRMatrix", "parent": 40, "children": [], "start_point": {"row": 7, "column": 50}, "end_point": {"row": 7, "column": 68}}, {"id": 42, "type": "abstract_pointer_declarator", "text": "**", "parent": 40, "children": [43, 44], "start_point": {"row": 7, "column": 68}, "end_point": {"row": 7, "column": 70}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 7, "column": 68}, "end_point": {"row": 7, "column": 69}}, {"id": 44, "type": "abstract_pointer_declarator", "text": "*", "parent": 42, "children": [45], "start_point": {"row": 7, "column": 69}, "end_point": {"row": 7, "column": 70}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 7, "column": 69}, "end_point": {"row": 7, "column": 70}}, {"id": 46, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}]}, "node_categories": {"declarations": {"functions": [16, 35], "variables": [12, 19, 23, 25, 27, 31, 38, 40], "classes": [], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 13, 15, 17, 20, 24, 26, 28, 32, 34, 36, 39, 41, 46], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 16, "universal_type": "function", "name": "unknown", "text_snippet": "MatCreateFromParCSR(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*)"}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "MatHYPREGetParCSR(Mat,hypre_ParCSRMatrix**)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <petscmat.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <_hypre_parcsr_mv.h>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#ifndef __PETSCMATHYPRE_H\n#define __PETSCMATHYPRE_H\n\n#include <petscmat.h>\n#include <_hypre_parcsr_mv.h>\n\nPETSC_EXTERN PetscErrorCode MatCreateFromParCSR(hypre_ParCSRMatrix*,MatType,PetscCopyMode,Mat*);\nPETSC_EXTERN PetscErrorCode MatHYPREGetParCSR(Mat,hypre_ParCSRMatrix**);\n\n#endif\n"}
317
c
// Copyright (c) 2013 NovaCoin Developers // #ifndef PBKDF2_H #define PBKDF2_H #include <openssl/sha.h> #include <stdint.h> class pbkdf2 { private: pbkdf2(); pbkdf2(const pbkdf2 &); pbkdf2 &operator=(const pbkdf2 &); typedef struct HMAC_SHA256Context { SHA256_CTX ictx; SHA256_CTX octx; } HMAC_SHA256_CTX; static uint32_t be32dec(const void *pp); static void be32enc(void *pp, uint32_t x); static void HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen); static void HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len); static void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx); public: static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen); }; #endif //@
30.96
27
(translation_unit) "// Copyright (c) 2013 NovaCoin Developers\n//\n#ifndef PBKDF2_H\n#define PBKDF2_H\n\n#include <openssl/sha.h>\n#include <stdint.h>\n\nclass pbkdf2\n{\nprivate:\n pbkdf2();\n pbkdf2(const pbkdf2 &);\n pbkdf2 &operator=(const pbkdf2 &);\n\n typedef struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n } HMAC_SHA256_CTX;\n\n static uint32_t be32dec(const void *pp);\n static void be32enc(void *pp, uint32_t x);\n\n static void HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen);\n static void HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len);\n static void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx);\n\npublic:\n static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);\n};\n\n#endif\n//@\n" (comment) "// Copyright (c) 2013 NovaCoin Developers" (comment) "//" (preproc_ifdef) "#ifndef PBKDF2_H\n#define PBKDF2_H\n\n#include <openssl/sha.h>\n#include <stdint.h>\n\nclass pbkdf2\n{\nprivate:\n pbkdf2();\n pbkdf2(const pbkdf2 &);\n pbkdf2 &operator=(const pbkdf2 &);\n\n typedef struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n } HMAC_SHA256_CTX;\n\n static uint32_t be32dec(const void *pp);\n static void be32enc(void *pp, uint32_t x);\n\n static void HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen);\n static void HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len);\n static void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx);\n\npublic:\n static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "PBKDF2_H" (preproc_def) "#define PBKDF2_H\n" (#define) "#define" (identifier) "PBKDF2_H" (preproc_include) "#include <openssl/sha.h>\n" (#include) "#include" (system_lib_string) "<openssl/sha.h>" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (function_definition) "class pbkdf2\n{\nprivate:\n pbkdf2();\n pbkdf2(const pbkdf2 &);\n pbkdf2 &operator=(const pbkdf2 &);\n\n typedef struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n } HMAC_SHA256_CTX;\n\n static uint32_t be32dec(const void *pp);\n static void be32enc(void *pp, uint32_t x);\n\n static void HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen);\n static void HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len);\n static void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx);\n\npublic:\n static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);\n}" (type_identifier) "class" (identifier) "pbkdf2" (compound_statement) "{\nprivate:\n pbkdf2();\n pbkdf2(const pbkdf2 &);\n pbkdf2 &operator=(const pbkdf2 &);\n\n typedef struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n } HMAC_SHA256_CTX;\n\n static uint32_t be32dec(const void *pp);\n static void be32enc(void *pp, uint32_t x);\n\n static void HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen);\n static void HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len);\n static void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx);\n\npublic:\n static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);\n}" ({) "{" (labeled_statement) "private:\n pbkdf2();" (statement_identifier) "private" (:) ":" (expression_statement) "pbkdf2();" (call_expression) "pbkdf2()" (identifier) "pbkdf2" (argument_list) "()" (() "(" ()) ")" (;) ";" (macro_type_specifier) "pbkdf2(const pbkdf2 &)" (identifier) "pbkdf2" (() "(" (type_descriptor) "const pbkdf2" (type_qualifier) "const" (const) "const" (type_identifier) "pbkdf2" (ERROR) "&" (&) "&" ()) ")" (;) ";" (expression_statement) "pbkdf2 &operator=(const pbkdf2 &);" (binary_expression) "pbkdf2 &operator=(const pbkdf2 &)" (identifier) "pbkdf2" (&) "&" (assignment_expression) "operator=(const pbkdf2 &)" (identifier) "operator" (=) "=" (cast_expression) "(const pbkdf2 &)" (() "(" (type_descriptor) "const pbkdf2" (type_qualifier) "const" (const) "const" (type_identifier) "pbkdf2" (ERROR) "&" (&) "&" ()) ")" (identifier) "" (;) ";" (type_definition) "typedef struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n } HMAC_SHA256_CTX;" (typedef) "typedef" (struct_specifier) "struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n }" (struct) "struct" (type_identifier) "HMAC_SHA256Context" (field_declaration_list) "{\n SHA256_CTX ictx;\n SHA256_CTX octx;\n }" ({) "{" (field_declaration) "SHA256_CTX ictx;" (type_identifier) "SHA256_CTX" (field_identifier) "ictx" (;) ";" (field_declaration) "SHA256_CTX octx;" (type_identifier) "SHA256_CTX" (field_identifier) "octx" (;) ";" (}) "}" (type_identifier) "HMAC_SHA256_CTX" (;) ";" (declaration) "static uint32_t be32dec(const void *pp);" (storage_class_specifier) "static" (static) "static" (primitive_type) "uint32_t" (function_declarator) "be32dec(const void *pp)" (identifier) "be32dec" (parameter_list) "(const void *pp)" (() "(" (parameter_declaration) "const void *pp" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "*pp" (*) "*" (identifier) "pp" ()) ")" (;) ";" (declaration) "static void be32enc(void *pp, uint32_t x);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "be32enc(void *pp, uint32_t x)" (identifier) "be32enc" (parameter_list) "(void *pp, uint32_t x)" (() "(" (parameter_declaration) "void *pp" (primitive_type) "void" (pointer_declarator) "*pp" (*) "*" (identifier) "pp" (,) "," (parameter_declaration) "uint32_t x" (primitive_type) "uint32_t" (identifier) "x" ()) ")" (;) ";" (declaration) "static void HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen)" (identifier) "HMAC_SHA256_Init" (parameter_list) "(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen)" (() "(" (parameter_declaration) "HMAC_SHA256_CTX *ctx" (type_identifier) "HMAC_SHA256_CTX" (pointer_declarator) "*ctx" (*) "*" (identifier) "ctx" (,) "," (parameter_declaration) "const void *_K" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "*_K" (*) "*" (identifier) "_K" (,) "," (parameter_declaration) "size_t Klen" (primitive_type) "size_t" (identifier) "Klen" ()) ")" (;) ";" (declaration) "static void HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len)" (identifier) "HMAC_SHA256_Update" (parameter_list) "(HMAC_SHA256_CTX *ctx, const void *in, size_t len)" (() "(" (parameter_declaration) "HMAC_SHA256_CTX *ctx" (type_identifier) "HMAC_SHA256_CTX" (pointer_declarator) "*ctx" (*) "*" (identifier) "ctx" (,) "," (parameter_declaration) "const void *in" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "*in" (*) "*" (identifier) "in" (,) "," (parameter_declaration) "size_t len" (primitive_type) "size_t" (identifier) "len" ()) ")" (;) ";" (declaration) "static void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx)" (identifier) "HMAC_SHA256_Final" (parameter_list) "(unsigned char digest[32], HMAC_SHA256_CTX *ctx)" (() "(" (parameter_declaration) "unsigned char digest[32]" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (array_declarator) "digest[32]" (identifier) "digest" ([) "[" (number_literal) "32" (]) "]" (,) "," (parameter_declaration) "HMAC_SHA256_CTX *ctx" (type_identifier) "HMAC_SHA256_CTX" (pointer_declarator) "*ctx" (*) "*" (identifier) "ctx" ()) ")" (;) ";" (labeled_statement) "public:\n static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);" (statement_identifier) "public" (:) ":" (declaration) "static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen)" (identifier) "PBKDF2_SHA256" (parameter_list) "(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen)" (() "(" (parameter_declaration) "const uint8_t *passwd" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "*passwd" (*) "*" (identifier) "passwd" (,) "," (parameter_declaration) "size_t passwdlen" (primitive_type) "size_t" (identifier) "passwdlen" (,) "," (parameter_declaration) "const uint8_t *salt" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "*salt" (*) "*" (identifier) "salt" (,) "," (parameter_declaration) "size_t saltlen" (primitive_type) "size_t" (identifier) "saltlen" (,) "," (parameter_declaration) "uint64_t c" (primitive_type) "uint64_t" (identifier) "c" (,) "," (parameter_declaration) "uint8_t *buf" (primitive_type) "uint8_t" (pointer_declarator) "*buf" (*) "*" (identifier) "buf" (,) "," (parameter_declaration) "size_t dkLen" (primitive_type) "size_t" (identifier) "dkLen" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "//@"
247
2
{"language": "c", "success": true, "metadata": {"lines": 27, "avg_line_length": 30.96, "nodes": 153, "errors": 0, "source_hash": "1a417421245bb3894baa48cc247625edda21c8861ab141e3ec9007ab562d8302", "categorized_nodes": 95}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef PBKDF2_H\n#define PBKDF2_H\n\n#include <openssl/sha.h>\n#include <stdint.h>\n\nclass pbkdf2\n{\nprivate:\n pbkdf2();\n pbkdf2(const pbkdf2 &);\n pbkdf2 &operator=(const pbkdf2 &);\n\n typedef struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n } HMAC_SHA256_CTX;\n\n static uint32_t be32dec(const void *pp);\n static void be32enc(void *pp, uint32_t x);\n\n static void HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen);\n static void HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len);\n static void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx);\n\npublic:\n static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 152], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 32, "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": "PBKDF2_H", "parent": 0, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 16}}, {"id": 3, "type": "preproc_def", "text": "#define PBKDF2_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": "PBKDF2_H", "parent": 3, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include <openssl/sha.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": "system_lib_string", "text": "<openssl/sha.h>", "parent": 6, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 24}}, {"id": 9, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<stdint.h>", "parent": 9, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 12, "type": "function_definition", "text": "class pbkdf2\n{\nprivate:\n pbkdf2();\n pbkdf2(const pbkdf2 &);\n pbkdf2 &operator=(const pbkdf2 &);\n\n typedef struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n } HMAC_SHA256_CTX;\n\n static uint32_t be32dec(const void *pp);\n static void be32enc(void *pp, uint32_t x);\n\n static void HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen);\n static void HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len);\n static void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx);\n\npublic:\n static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);\n}", "parent": 0, "children": [13], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 13, "type": "identifier", "text": "pbkdf2", "parent": 12, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 12}}, {"id": 14, "type": "labeled_statement", "text": "private:\n pbkdf2();", "parent": 12, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 13}}, {"id": 15, "type": "call_expression", "text": "pbkdf2()", "parent": 14, "children": [16, 17], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 12}}, {"id": 16, "type": "identifier", "text": "pbkdf2", "parent": 15, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 10}}, {"id": 17, "type": "argument_list", "text": "()", "parent": 15, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 12}}, {"id": 18, "type": "macro_type_specifier", "text": "pbkdf2(const pbkdf2 &)", "parent": 12, "children": [19, 20], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 26}}, {"id": 19, "type": "identifier", "text": "pbkdf2", "parent": 18, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 10}}, {"id": 20, "type": "type_descriptor", "text": "const pbkdf2", "parent": 18, "children": [21], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 23}}, {"id": 21, "type": "type_identifier", "text": "pbkdf2", "parent": 20, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 23}}, {"id": 22, "type": "binary_expression", "text": "pbkdf2 &operator=(const pbkdf2 &)", "parent": 12, "children": [23, 24], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 37}}, {"id": 23, "type": "identifier", "text": "pbkdf2", "parent": 22, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 10}}, {"id": 24, "type": "assignment_expression", "text": "operator=(const pbkdf2 &)", "parent": 22, "children": [25, 26, 27], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 37}}, {"id": 25, "type": "identifier", "text": "operator", "parent": 24, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 20}}, {"id": 26, "type": "=", "text": "=", "parent": 24, "children": [], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 21}}, {"id": 27, "type": "cast_expression", "text": "(const pbkdf2 &)", "parent": 24, "children": [28, 30], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 37}}, {"id": 28, "type": "type_descriptor", "text": "const pbkdf2", "parent": 27, "children": [29], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 34}}, {"id": 29, "type": "type_identifier", "text": "pbkdf2", "parent": 28, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 34}}, {"id": 30, "type": "identifier", "text": "", "parent": 27, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 37}}, {"id": 31, "type": "type_definition", "text": "typedef struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n } HMAC_SHA256_CTX;", "parent": 12, "children": [32, 33, 42], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 19, "column": 22}}, {"id": 32, "type": "typedef", "text": "typedef", "parent": 31, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 11}}, {"id": 33, "type": "struct_specifier", "text": "struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n }", "parent": 31, "children": [34, 35], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 19, "column": 5}}, {"id": 34, "type": "struct", "text": "struct", "parent": 33, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 18}}, {"id": 35, "type": "type_identifier", "text": "HMAC_SHA256Context", "parent": 33, "children": [], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 37}}, {"id": 36, "type": "field_declaration", "text": "SHA256_CTX ictx;", "parent": 33, "children": [37, 38], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 24}}, {"id": 37, "type": "type_identifier", "text": "SHA256_CTX", "parent": 36, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 18}}, {"id": 38, "type": "field_identifier", "text": "ictx", "parent": 36, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 23}}, {"id": 39, "type": "field_declaration", "text": "SHA256_CTX octx;", "parent": 33, "children": [40, 41], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 24}}, {"id": 40, "type": "type_identifier", "text": "SHA256_CTX", "parent": 39, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 18}}, {"id": 41, "type": "field_identifier", "text": "octx", "parent": 39, "children": [], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 23}}, {"id": 42, "type": "type_identifier", "text": "HMAC_SHA256_CTX", "parent": 31, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 21}}, {"id": 43, "type": "declaration", "text": "static uint32_t be32dec(const void *pp);", "parent": 12, "children": [44, 45], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 44}}, {"id": 44, "type": "primitive_type", "text": "uint32_t", "parent": 43, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 19}}, {"id": 45, "type": "function_declarator", "text": "be32dec(const void *pp)", "parent": 43, "children": [46, 47], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 43}}, {"id": 46, "type": "identifier", "text": "be32dec", "parent": 45, "children": [], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 27}}, {"id": 47, "type": "parameter_list", "text": "(const void *pp)", "parent": 45, "children": [48], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 43}}, {"id": 48, "type": "parameter_declaration", "text": "const void *pp", "parent": 47, "children": [49, 50], "start_point": {"row": 21, "column": 28}, "end_point": {"row": 21, "column": 42}}, {"id": 49, "type": "primitive_type", "text": "void", "parent": 48, "children": [], "start_point": {"row": 21, "column": 34}, "end_point": {"row": 21, "column": 38}}, {"id": 50, "type": "pointer_declarator", "text": "*pp", "parent": 48, "children": [51, 52], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 42}}, {"id": 51, "type": "*", "text": "*", "parent": 50, "children": [], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 40}}, {"id": 52, "type": "identifier", "text": "pp", "parent": 50, "children": [], "start_point": {"row": 21, "column": 40}, "end_point": {"row": 21, "column": 42}}, {"id": 53, "type": "declaration", "text": "static void be32enc(void *pp, uint32_t x);", "parent": 12, "children": [54, 55], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 46}}, {"id": 54, "type": "primitive_type", "text": "void", "parent": 53, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 15}}, {"id": 55, "type": "function_declarator", "text": "be32enc(void *pp, uint32_t x)", "parent": 53, "children": [56, 57], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 45}}, {"id": 56, "type": "identifier", "text": "be32enc", "parent": 55, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 23}}, {"id": 57, "type": "parameter_list", "text": "(void *pp, uint32_t x)", "parent": 55, "children": [58, 63], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 45}}, {"id": 58, "type": "parameter_declaration", "text": "void *pp", "parent": 57, "children": [59, 60], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 32}}, {"id": 59, "type": "primitive_type", "text": "void", "parent": 58, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 28}}, {"id": 60, "type": "pointer_declarator", "text": "*pp", "parent": 58, "children": [61, 62], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 32}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 30}}, {"id": 62, "type": "identifier", "text": "pp", "parent": 60, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 32}}, {"id": 63, "type": "parameter_declaration", "text": "uint32_t x", "parent": 57, "children": [64, 65], "start_point": {"row": 22, "column": 34}, "end_point": {"row": 22, "column": 44}}, {"id": 64, "type": "primitive_type", "text": "uint32_t", "parent": 63, "children": [], "start_point": {"row": 22, "column": 34}, "end_point": {"row": 22, "column": 42}}, {"id": 65, "type": "identifier", "text": "x", "parent": 63, "children": [], "start_point": {"row": 22, "column": 43}, "end_point": {"row": 22, "column": 44}}, {"id": 66, "type": "declaration", "text": "static void HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen);", "parent": 12, "children": [67, 68], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 84}}, {"id": 67, "type": "primitive_type", "text": "void", "parent": 66, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 15}}, {"id": 68, "type": "function_declarator", "text": "HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen)", "parent": 66, "children": [69, 70], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 83}}, {"id": 69, "type": "identifier", "text": "HMAC_SHA256_Init", "parent": 68, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 32}}, {"id": 70, "type": "parameter_list", "text": "(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen)", "parent": 68, "children": [71, 76, 81], "start_point": {"row": 24, "column": 32}, "end_point": {"row": 24, "column": 83}}, {"id": 71, "type": "parameter_declaration", "text": "HMAC_SHA256_CTX *ctx", "parent": 70, "children": [72, 73], "start_point": {"row": 24, "column": 33}, "end_point": {"row": 24, "column": 53}}, {"id": 72, "type": "type_identifier", "text": "HMAC_SHA256_CTX", "parent": 71, "children": [], "start_point": {"row": 24, "column": 33}, "end_point": {"row": 24, "column": 48}}, {"id": 73, "type": "pointer_declarator", "text": "*ctx", "parent": 71, "children": [74, 75], "start_point": {"row": 24, "column": 49}, "end_point": {"row": 24, "column": 53}}, {"id": 74, "type": "*", "text": "*", "parent": 73, "children": [], "start_point": {"row": 24, "column": 49}, "end_point": {"row": 24, "column": 50}}, {"id": 75, "type": "identifier", "text": "ctx", "parent": 73, "children": [], "start_point": {"row": 24, "column": 50}, "end_point": {"row": 24, "column": 53}}, {"id": 76, "type": "parameter_declaration", "text": "const void *_K", "parent": 70, "children": [77, 78], "start_point": {"row": 24, "column": 55}, "end_point": {"row": 24, "column": 69}}, {"id": 77, "type": "primitive_type", "text": "void", "parent": 76, "children": [], "start_point": {"row": 24, "column": 61}, "end_point": {"row": 24, "column": 65}}, {"id": 78, "type": "pointer_declarator", "text": "*_K", "parent": 76, "children": [79, 80], "start_point": {"row": 24, "column": 66}, "end_point": {"row": 24, "column": 69}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 24, "column": 66}, "end_point": {"row": 24, "column": 67}}, {"id": 80, "type": "identifier", "text": "_K", "parent": 78, "children": [], "start_point": {"row": 24, "column": 67}, "end_point": {"row": 24, "column": 69}}, {"id": 81, "type": "parameter_declaration", "text": "size_t Klen", "parent": 70, "children": [82, 83], "start_point": {"row": 24, "column": 71}, "end_point": {"row": 24, "column": 82}}, {"id": 82, "type": "primitive_type", "text": "size_t", "parent": 81, "children": [], "start_point": {"row": 24, "column": 71}, "end_point": {"row": 24, "column": 77}}, {"id": 83, "type": "identifier", "text": "Klen", "parent": 81, "children": [], "start_point": {"row": 24, "column": 78}, "end_point": {"row": 24, "column": 82}}, {"id": 84, "type": "declaration", "text": "static void HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len);", "parent": 12, "children": [85, 86], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 85}}, {"id": 85, "type": "primitive_type", "text": "void", "parent": 84, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 15}}, {"id": 86, "type": "function_declarator", "text": "HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len)", "parent": 84, "children": [87, 88], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 84}}, {"id": 87, "type": "identifier", "text": "HMAC_SHA256_Update", "parent": 86, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 34}}, {"id": 88, "type": "parameter_list", "text": "(HMAC_SHA256_CTX *ctx, const void *in, size_t len)", "parent": 86, "children": [89, 94, 99], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 84}}, {"id": 89, "type": "parameter_declaration", "text": "HMAC_SHA256_CTX *ctx", "parent": 88, "children": [90, 91], "start_point": {"row": 25, "column": 35}, "end_point": {"row": 25, "column": 55}}, {"id": 90, "type": "type_identifier", "text": "HMAC_SHA256_CTX", "parent": 89, "children": [], "start_point": {"row": 25, "column": 35}, "end_point": {"row": 25, "column": 50}}, {"id": 91, "type": "pointer_declarator", "text": "*ctx", "parent": 89, "children": [92, 93], "start_point": {"row": 25, "column": 51}, "end_point": {"row": 25, "column": 55}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 25, "column": 51}, "end_point": {"row": 25, "column": 52}}, {"id": 93, "type": "identifier", "text": "ctx", "parent": 91, "children": [], "start_point": {"row": 25, "column": 52}, "end_point": {"row": 25, "column": 55}}, {"id": 94, "type": "parameter_declaration", "text": "const void *in", "parent": 88, "children": [95, 96], "start_point": {"row": 25, "column": 57}, "end_point": {"row": 25, "column": 71}}, {"id": 95, "type": "primitive_type", "text": "void", "parent": 94, "children": [], "start_point": {"row": 25, "column": 63}, "end_point": {"row": 25, "column": 67}}, {"id": 96, "type": "pointer_declarator", "text": "*in", "parent": 94, "children": [97, 98], "start_point": {"row": 25, "column": 68}, "end_point": {"row": 25, "column": 71}}, {"id": 97, "type": "*", "text": "*", "parent": 96, "children": [], "start_point": {"row": 25, "column": 68}, "end_point": {"row": 25, "column": 69}}, {"id": 98, "type": "identifier", "text": "in", "parent": 96, "children": [], "start_point": {"row": 25, "column": 69}, "end_point": {"row": 25, "column": 71}}, {"id": 99, "type": "parameter_declaration", "text": "size_t len", "parent": 88, "children": [100, 101], "start_point": {"row": 25, "column": 73}, "end_point": {"row": 25, "column": 83}}, {"id": 100, "type": "primitive_type", "text": "size_t", "parent": 99, "children": [], "start_point": {"row": 25, "column": 73}, "end_point": {"row": 25, "column": 79}}, {"id": 101, "type": "identifier", "text": "len", "parent": 99, "children": [], "start_point": {"row": 25, "column": 80}, "end_point": {"row": 25, "column": 83}}, {"id": 102, "type": "declaration", "text": "static void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx);", "parent": 12, "children": [103, 104], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 82}}, {"id": 103, "type": "primitive_type", "text": "void", "parent": 102, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 15}}, {"id": 104, "type": "function_declarator", "text": "HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx)", "parent": 102, "children": [105, 106], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 81}}, {"id": 105, "type": "identifier", "text": "HMAC_SHA256_Final", "parent": 104, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 33}}, {"id": 106, "type": "parameter_list", "text": "(unsigned char digest[32], HMAC_SHA256_CTX *ctx)", "parent": 104, "children": [107, 114], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 81}}, {"id": 107, "type": "parameter_declaration", "text": "unsigned char digest[32]", "parent": 106, "children": [108, 111], "start_point": {"row": 26, "column": 34}, "end_point": {"row": 26, "column": 58}}, {"id": 108, "type": "sized_type_specifier", "text": "unsigned char", "parent": 107, "children": [109, 110], "start_point": {"row": 26, "column": 34}, "end_point": {"row": 26, "column": 47}}, {"id": 109, "type": "unsigned", "text": "unsigned", "parent": 108, "children": [], "start_point": {"row": 26, "column": 34}, "end_point": {"row": 26, "column": 42}}, {"id": 110, "type": "primitive_type", "text": "char", "parent": 108, "children": [], "start_point": {"row": 26, "column": 43}, "end_point": {"row": 26, "column": 47}}, {"id": 111, "type": "array_declarator", "text": "digest[32]", "parent": 107, "children": [112, 113], "start_point": {"row": 26, "column": 48}, "end_point": {"row": 26, "column": 58}}, {"id": 112, "type": "identifier", "text": "digest", "parent": 111, "children": [], "start_point": {"row": 26, "column": 48}, "end_point": {"row": 26, "column": 54}}, {"id": 113, "type": "number_literal", "text": "32", "parent": 111, "children": [], "start_point": {"row": 26, "column": 55}, "end_point": {"row": 26, "column": 57}}, {"id": 114, "type": "parameter_declaration", "text": "HMAC_SHA256_CTX *ctx", "parent": 106, "children": [115, 116], "start_point": {"row": 26, "column": 60}, "end_point": {"row": 26, "column": 80}}, {"id": 115, "type": "type_identifier", "text": "HMAC_SHA256_CTX", "parent": 114, "children": [], "start_point": {"row": 26, "column": 60}, "end_point": {"row": 26, "column": 75}}, {"id": 116, "type": "pointer_declarator", "text": "*ctx", "parent": 114, "children": [117, 118], "start_point": {"row": 26, "column": 76}, "end_point": {"row": 26, "column": 80}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 26, "column": 76}, "end_point": {"row": 26, "column": 77}}, {"id": 118, "type": "identifier", "text": "ctx", "parent": 116, "children": [], "start_point": {"row": 26, "column": 77}, "end_point": {"row": 26, "column": 80}}, {"id": 119, "type": "labeled_statement", "text": "public:\n static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);", "parent": 12, "children": [120], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 148}}, {"id": 120, "type": "declaration", "text": "static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);", "parent": 119, "children": [121, 122], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 148}}, {"id": 121, "type": "primitive_type", "text": "void", "parent": 120, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 15}}, {"id": 122, "type": "function_declarator", "text": "PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen)", "parent": 120, "children": [123, 124], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 147}}, {"id": 123, "type": "identifier", "text": "PBKDF2_SHA256", "parent": 122, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 29}}, {"id": 124, "type": "parameter_list", "text": "(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen)", "parent": 122, "children": [125, 130, 133, 138, 141, 144, 149], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 147}}, {"id": 125, "type": "parameter_declaration", "text": "const uint8_t *passwd", "parent": 124, "children": [126, 127], "start_point": {"row": 29, "column": 30}, "end_point": {"row": 29, "column": 51}}, {"id": 126, "type": "primitive_type", "text": "uint8_t", "parent": 125, "children": [], "start_point": {"row": 29, "column": 36}, "end_point": {"row": 29, "column": 43}}, {"id": 127, "type": "pointer_declarator", "text": "*passwd", "parent": 125, "children": [128, 129], "start_point": {"row": 29, "column": 44}, "end_point": {"row": 29, "column": 51}}, {"id": 128, "type": "*", "text": "*", "parent": 127, "children": [], "start_point": {"row": 29, "column": 44}, "end_point": {"row": 29, "column": 45}}, {"id": 129, "type": "identifier", "text": "passwd", "parent": 127, "children": [], "start_point": {"row": 29, "column": 45}, "end_point": {"row": 29, "column": 51}}, {"id": 130, "type": "parameter_declaration", "text": "size_t passwdlen", "parent": 124, "children": [131, 132], "start_point": {"row": 29, "column": 53}, "end_point": {"row": 29, "column": 69}}, {"id": 131, "type": "primitive_type", "text": "size_t", "parent": 130, "children": [], "start_point": {"row": 29, "column": 53}, "end_point": {"row": 29, "column": 59}}, {"id": 132, "type": "identifier", "text": "passwdlen", "parent": 130, "children": [], "start_point": {"row": 29, "column": 60}, "end_point": {"row": 29, "column": 69}}, {"id": 133, "type": "parameter_declaration", "text": "const uint8_t *salt", "parent": 124, "children": [134, 135], "start_point": {"row": 29, "column": 71}, "end_point": {"row": 29, "column": 90}}, {"id": 134, "type": "primitive_type", "text": "uint8_t", "parent": 133, "children": [], "start_point": {"row": 29, "column": 77}, "end_point": {"row": 29, "column": 84}}, {"id": 135, "type": "pointer_declarator", "text": "*salt", "parent": 133, "children": [136, 137], "start_point": {"row": 29, "column": 85}, "end_point": {"row": 29, "column": 90}}, {"id": 136, "type": "*", "text": "*", "parent": 135, "children": [], "start_point": {"row": 29, "column": 85}, "end_point": {"row": 29, "column": 86}}, {"id": 137, "type": "identifier", "text": "salt", "parent": 135, "children": [], "start_point": {"row": 29, "column": 86}, "end_point": {"row": 29, "column": 90}}, {"id": 138, "type": "parameter_declaration", "text": "size_t saltlen", "parent": 124, "children": [139, 140], "start_point": {"row": 29, "column": 92}, "end_point": {"row": 29, "column": 106}}, {"id": 139, "type": "primitive_type", "text": "size_t", "parent": 138, "children": [], "start_point": {"row": 29, "column": 92}, "end_point": {"row": 29, "column": 98}}, {"id": 140, "type": "identifier", "text": "saltlen", "parent": 138, "children": [], "start_point": {"row": 29, "column": 99}, "end_point": {"row": 29, "column": 106}}, {"id": 141, "type": "parameter_declaration", "text": "uint64_t c", "parent": 124, "children": [142, 143], "start_point": {"row": 29, "column": 108}, "end_point": {"row": 29, "column": 118}}, {"id": 142, "type": "primitive_type", "text": "uint64_t", "parent": 141, "children": [], "start_point": {"row": 29, "column": 108}, "end_point": {"row": 29, "column": 116}}, {"id": 143, "type": "identifier", "text": "c", "parent": 141, "children": [], "start_point": {"row": 29, "column": 117}, "end_point": {"row": 29, "column": 118}}, {"id": 144, "type": "parameter_declaration", "text": "uint8_t *buf", "parent": 124, "children": [145, 146], "start_point": {"row": 29, "column": 120}, "end_point": {"row": 29, "column": 132}}, {"id": 145, "type": "primitive_type", "text": "uint8_t", "parent": 144, "children": [], "start_point": {"row": 29, "column": 120}, "end_point": {"row": 29, "column": 127}}, {"id": 146, "type": "pointer_declarator", "text": "*buf", "parent": 144, "children": [147, 148], "start_point": {"row": 29, "column": 128}, "end_point": {"row": 29, "column": 132}}, {"id": 147, "type": "*", "text": "*", "parent": 146, "children": [], "start_point": {"row": 29, "column": 128}, "end_point": {"row": 29, "column": 129}}, {"id": 148, "type": "identifier", "text": "buf", "parent": 146, "children": [], "start_point": {"row": 29, "column": 129}, "end_point": {"row": 29, "column": 132}}, {"id": 149, "type": "parameter_declaration", "text": "size_t dkLen", "parent": 124, "children": [150, 151], "start_point": {"row": 29, "column": 134}, "end_point": {"row": 29, "column": 146}}, {"id": 150, "type": "primitive_type", "text": "size_t", "parent": 149, "children": [], "start_point": {"row": 29, "column": 134}, "end_point": {"row": 29, "column": 140}}, {"id": 151, "type": "identifier", "text": "dkLen", "parent": 149, "children": [], "start_point": {"row": 29, "column": 141}, "end_point": {"row": 29, "column": 146}}, {"id": 152, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 6}}]}, "node_categories": {"declarations": {"functions": [12, 45, 55, 68, 86, 104, 122], "variables": [31, 36, 39, 43, 48, 53, 58, 63, 66, 71, 76, 81, 84, 89, 94, 99, 102, 107, 114, 120, 125, 130, 133, 138, 141, 144, 149], "classes": [33, 34], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [15, 22, 27], "assignments": [24], "loops": [], "conditionals": [0, 1, 2, 5, 13, 16, 18, 19, 21, 23, 25, 29, 30, 35, 37, 38, 40, 41, 42, 46, 52, 56, 62, 65, 69, 72, 75, 80, 83, 87, 90, 93, 98, 101, 105, 108, 112, 115, 118, 123, 129, 132, 137, 140, 143, 148, 151, 152], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 113], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "pbkdf2", "text_snippet": "class pbkdf2\n{\nprivate:\n pbkdf2();\n pbkdf2(const pbkdf2 &);\n pbkdf2 &operator=(const pbkdf2"}, {"node_id": 45, "universal_type": "function", "name": "*pp)", "text_snippet": "be32dec(const void *pp)"}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "be32enc(void *pp, uint32_t x)"}, {"node_id": 68, "universal_type": "function", "name": "*_K,", "text_snippet": "HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen)"}, {"node_id": 86, "universal_type": "function", "name": "*in,", "text_snippet": "HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len)"}, {"node_id": 104, "universal_type": "function", "name": "unknown", "text_snippet": "HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx)"}, {"node_id": 122, "universal_type": "function", "name": "unknown", "text_snippet": "PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t"}], "class_declarations": [{"node_id": 33, "universal_type": "class", "name": "HMAC_SHA256Context", "text_snippet": "struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n }"}, {"node_id": 34, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <openssl/sha.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <stdint.h>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "// Copyright (c) 2013 NovaCoin Developers\n//\n#ifndef PBKDF2_H\n#define PBKDF2_H\n\n#include <openssl/sha.h>\n#include <stdint.h>\n\nclass pbkdf2\n{\nprivate:\n pbkdf2();\n pbkdf2(const pbkdf2 &);\n pbkdf2 &operator=(const pbkdf2 &);\n\n typedef struct HMAC_SHA256Context\n {\n SHA256_CTX ictx;\n SHA256_CTX octx;\n } HMAC_SHA256_CTX;\n\n static uint32_t be32dec(const void *pp);\n static void be32enc(void *pp, uint32_t x);\n\n static void HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen);\n static void HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len);\n static void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx);\n\npublic:\n static void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);\n};\n\n#endif\n//@\n"}
318
c
#ifndef __MRTP_CALLBACKS_H__ #define __MRTP_CALLBACKS_H__ #include <stdlib.h> typedef struct _MRtpCallbacks { void * (MRTP_CALLBACK * malloc) (size_t size); void (MRTP_CALLBACK * free) (void * memory); void (MRTP_CALLBACK * no_memory) (void); } MRtpCallbacks; extern void * mrtp_malloc(size_t); extern void mrtp_free(void *); #endif /* __MRTP_CALLBACKS_H__ */
29.42
12
(translation_unit) "#ifndef __MRTP_CALLBACKS_H__\n#define __MRTP_CALLBACKS_H__\n\n#include <stdlib.h>\n\ntypedef struct _MRtpCallbacks\n{\n void * (MRTP_CALLBACK * malloc) (size_t size);\n void (MRTP_CALLBACK * free) (void * memory);\n void (MRTP_CALLBACK * no_memory) (void);\n} MRtpCallbacks;\n\nextern void * mrtp_malloc(size_t);\nextern void mrtp_free(void *);\n\n#endif /* __MRTP_CALLBACKS_H__ */\n\n" (preproc_ifdef) "#ifndef __MRTP_CALLBACKS_H__\n#define __MRTP_CALLBACKS_H__\n\n#include <stdlib.h>\n\ntypedef struct _MRtpCallbacks\n{\n void * (MRTP_CALLBACK * malloc) (size_t size);\n void (MRTP_CALLBACK * free) (void * memory);\n void (MRTP_CALLBACK * no_memory) (void);\n} MRtpCallbacks;\n\nextern void * mrtp_malloc(size_t);\nextern void mrtp_free(void *);\n\n#endif" (#ifndef) "#ifndef" (identifier) "__MRTP_CALLBACKS_H__" (preproc_def) "#define __MRTP_CALLBACKS_H__\n" (#define) "#define" (identifier) "__MRTP_CALLBACKS_H__" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (type_definition) "typedef struct _MRtpCallbacks\n{\n void * (MRTP_CALLBACK * malloc) (size_t size);\n void (MRTP_CALLBACK * free) (void * memory);\n void (MRTP_CALLBACK * no_memory) (void);\n} MRtpCallbacks;" (typedef) "typedef" (struct_specifier) "struct _MRtpCallbacks\n{\n void * (MRTP_CALLBACK * malloc) (size_t size);\n void (MRTP_CALLBACK * free) (void * memory);\n void (MRTP_CALLBACK * no_memory) (void);\n}" (struct) "struct" (type_identifier) "_MRtpCallbacks" (field_declaration_list) "{\n void * (MRTP_CALLBACK * malloc) (size_t size);\n void (MRTP_CALLBACK * free) (void * memory);\n void (MRTP_CALLBACK * no_memory) (void);\n}" ({) "{" (field_declaration) "void * (MRTP_CALLBACK * malloc) (size_t size);" (primitive_type) "void" (pointer_declarator) "* (MRTP_CALLBACK * malloc) (size_t size)" (*) "*" (function_declarator) "(MRTP_CALLBACK * malloc) (size_t size)" (parenthesized_declarator) "(MRTP_CALLBACK * malloc)" (() "(" (ERROR) "MRTP_CALLBACK" (field_identifier) "MRTP_CALLBACK" (pointer_declarator) "* malloc" (*) "*" (field_identifier) "malloc" ()) ")" (parameter_list) "(size_t size)" (() "(" (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" ()) ")" (;) ";" (field_declaration) "void (MRTP_CALLBACK * free) (void * memory);" (primitive_type) "void" (function_declarator) "(MRTP_CALLBACK * free) (void * memory)" (parenthesized_declarator) "(MRTP_CALLBACK * free)" (() "(" (ERROR) "MRTP_CALLBACK" (field_identifier) "MRTP_CALLBACK" (pointer_declarator) "* free" (*) "*" (field_identifier) "free" ()) ")" (parameter_list) "(void * memory)" (() "(" (parameter_declaration) "void * memory" (primitive_type) "void" (pointer_declarator) "* memory" (*) "*" (identifier) "memory" ()) ")" (;) ";" (field_declaration) "void (MRTP_CALLBACK * no_memory) (void);" (primitive_type) "void" (function_declarator) "(MRTP_CALLBACK * no_memory) (void)" (parenthesized_declarator) "(MRTP_CALLBACK * no_memory)" (() "(" (ERROR) "MRTP_CALLBACK" (field_identifier) "MRTP_CALLBACK" (pointer_declarator) "* no_memory" (*) "*" (field_identifier) "no_memory" ()) ")" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (}) "}" (type_identifier) "MRtpCallbacks" (;) ";" (declaration) "extern void * mrtp_malloc(size_t);" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "void" (pointer_declarator) "* mrtp_malloc(size_t)" (*) "*" (function_declarator) "mrtp_malloc(size_t)" (identifier) "mrtp_malloc" (parameter_list) "(size_t)" (() "(" (parameter_declaration) "size_t" (primitive_type) "size_t" ()) ")" (;) ";" (declaration) "extern void mrtp_free(void *);" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "void" (function_declarator) "mrtp_free(void *)" (identifier) "mrtp_free" (parameter_list) "(void *)" (() "(" (parameter_declaration) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* __MRTP_CALLBACKS_H__ */"
107
3
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 29.42, "nodes": 80, "errors": 0, "source_hash": "68c1890847110613477a7d10e91a1f25548144b8cf7118159f5c95fd579a565c", "categorized_nodes": 40}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __MRTP_CALLBACKS_H__\n#define __MRTP_CALLBACKS_H__\n\n#include <stdlib.h>\n\ntypedef struct _MRtpCallbacks\n{\n\tvoid * (MRTP_CALLBACK * malloc) (size_t size);\n\tvoid (MRTP_CALLBACK * free) (void * memory);\n\tvoid (MRTP_CALLBACK * no_memory) (void);\n} MRtpCallbacks;\n\nextern void * mrtp_malloc(size_t);\nextern void mrtp_free(void *);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 57, 68, 79], "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": "__MRTP_CALLBACKS_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 28}}, {"id": 3, "type": "preproc_def", "text": "#define __MRTP_CALLBACKS_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": "__MRTP_CALLBACKS_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 28}}, {"id": 6, "type": "preproc_include", "text": "#include <stdlib.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": "<stdlib.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 9, "type": "type_definition", "text": "typedef struct _MRtpCallbacks\n{\n\tvoid * (MRTP_CALLBACK * malloc) (size_t size);\n\tvoid (MRTP_CALLBACK * free) (void * memory);\n\tvoid (MRTP_CALLBACK * no_memory) (void);\n} MRtpCallbacks;", "parent": 0, "children": [10, 11, 56], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 10, "column": 16}}, {"id": 10, "type": "typedef", "text": "typedef", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 11, "type": "struct_specifier", "text": "struct _MRtpCallbacks\n{\n\tvoid * (MRTP_CALLBACK * malloc) (size_t size);\n\tvoid (MRTP_CALLBACK * free) (void * memory);\n\tvoid (MRTP_CALLBACK * no_memory) (void);\n}", "parent": 9, "children": [12, 13], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 10, "column": 1}}, {"id": 12, "type": "struct", "text": "struct", "parent": 11, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 14}}, {"id": 13, "type": "type_identifier", "text": "_MRtpCallbacks", "parent": 11, "children": [], "start_point": {"row": 5, "column": 15}, "end_point": {"row": 5, "column": 29}}, {"id": 14, "type": "field_declaration", "text": "void * (MRTP_CALLBACK * malloc) (size_t size);", "parent": 11, "children": [15, 16], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 47}}, {"id": 15, "type": "primitive_type", "text": "void", "parent": 14, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 5}}, {"id": 16, "type": "pointer_declarator", "text": "* (MRTP_CALLBACK * malloc) (size_t size)", "parent": 14, "children": [17, 18], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 46}}, {"id": 17, "type": "*", "text": "*", "parent": 16, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 7}}, {"id": 18, "type": "function_declarator", "text": "(MRTP_CALLBACK * malloc) (size_t size)", "parent": 16, "children": [19, 25], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 46}}, {"id": 19, "type": "parenthesized_declarator", "text": "(MRTP_CALLBACK * malloc)", "parent": 18, "children": [20, 22], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 32}}, {"id": 20, "type": "ERROR", "text": "MRTP_CALLBACK", "parent": 19, "children": [21], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 22}}, {"id": 21, "type": "field_identifier", "text": "MRTP_CALLBACK", "parent": 20, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 22}}, {"id": 22, "type": "pointer_declarator", "text": "* malloc", "parent": 19, "children": [23, 24], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 31}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 24}}, {"id": 24, "type": "field_identifier", "text": "malloc", "parent": 22, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 31}}, {"id": 25, "type": "parameter_list", "text": "(size_t size)", "parent": 18, "children": [26], "start_point": {"row": 7, "column": 33}, "end_point": {"row": 7, "column": 46}}, {"id": 26, "type": "parameter_declaration", "text": "size_t size", "parent": 25, "children": [27, 28], "start_point": {"row": 7, "column": 34}, "end_point": {"row": 7, "column": 45}}, {"id": 27, "type": "primitive_type", "text": "size_t", "parent": 26, "children": [], "start_point": {"row": 7, "column": 34}, "end_point": {"row": 7, "column": 40}}, {"id": 28, "type": "identifier", "text": "size", "parent": 26, "children": [], "start_point": {"row": 7, "column": 41}, "end_point": {"row": 7, "column": 45}}, {"id": 29, "type": "field_declaration", "text": "void (MRTP_CALLBACK * free) (void * memory);", "parent": 11, "children": [30, 31], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 45}}, {"id": 30, "type": "primitive_type", "text": "void", "parent": 29, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 5}}, {"id": 31, "type": "function_declarator", "text": "(MRTP_CALLBACK * free) (void * memory)", "parent": 29, "children": [32, 38], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 44}}, {"id": 32, "type": "parenthesized_declarator", "text": "(MRTP_CALLBACK * free)", "parent": 31, "children": [33, 35], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 28}}, {"id": 33, "type": "ERROR", "text": "MRTP_CALLBACK", "parent": 32, "children": [34], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 20}}, {"id": 34, "type": "field_identifier", "text": "MRTP_CALLBACK", "parent": 33, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 20}}, {"id": 35, "type": "pointer_declarator", "text": "* free", "parent": 32, "children": [36, 37], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 27}}, {"id": 36, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 22}}, {"id": 37, "type": "field_identifier", "text": "free", "parent": 35, "children": [], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 27}}, {"id": 38, "type": "parameter_list", "text": "(void * memory)", "parent": 31, "children": [39], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 44}}, {"id": 39, "type": "parameter_declaration", "text": "void * memory", "parent": 38, "children": [40, 41], "start_point": {"row": 8, "column": 30}, "end_point": {"row": 8, "column": 43}}, {"id": 40, "type": "primitive_type", "text": "void", "parent": 39, "children": [], "start_point": {"row": 8, "column": 30}, "end_point": {"row": 8, "column": 34}}, {"id": 41, "type": "pointer_declarator", "text": "* memory", "parent": 39, "children": [42, 43], "start_point": {"row": 8, "column": 35}, "end_point": {"row": 8, "column": 43}}, {"id": 42, "type": "*", "text": "*", "parent": 41, "children": [], "start_point": {"row": 8, "column": 35}, "end_point": {"row": 8, "column": 36}}, {"id": 43, "type": "identifier", "text": "memory", "parent": 41, "children": [], "start_point": {"row": 8, "column": 37}, "end_point": {"row": 8, "column": 43}}, {"id": 44, "type": "field_declaration", "text": "void (MRTP_CALLBACK * no_memory) (void);", "parent": 11, "children": [45, 46], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 41}}, {"id": 45, "type": "primitive_type", "text": "void", "parent": 44, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 5}}, {"id": 46, "type": "function_declarator", "text": "(MRTP_CALLBACK * no_memory) (void)", "parent": 44, "children": [47, 53], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 40}}, {"id": 47, "type": "parenthesized_declarator", "text": "(MRTP_CALLBACK * no_memory)", "parent": 46, "children": [48, 50], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 33}}, {"id": 48, "type": "ERROR", "text": "MRTP_CALLBACK", "parent": 47, "children": [49], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 20}}, {"id": 49, "type": "field_identifier", "text": "MRTP_CALLBACK", "parent": 48, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 20}}, {"id": 50, "type": "pointer_declarator", "text": "* no_memory", "parent": 47, "children": [51, 52], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 32}}, {"id": 51, "type": "*", "text": "*", "parent": 50, "children": [], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 22}}, {"id": 52, "type": "field_identifier", "text": "no_memory", "parent": 50, "children": [], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 32}}, {"id": 53, "type": "parameter_list", "text": "(void)", "parent": 46, "children": [54], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 40}}, {"id": 54, "type": "parameter_declaration", "text": "void", "parent": 53, "children": [55], "start_point": {"row": 9, "column": 35}, "end_point": {"row": 9, "column": 39}}, {"id": 55, "type": "primitive_type", "text": "void", "parent": 54, "children": [], "start_point": {"row": 9, "column": 35}, "end_point": {"row": 9, "column": 39}}, {"id": 56, "type": "type_identifier", "text": "MRtpCallbacks", "parent": 9, "children": [], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 15}}, {"id": 57, "type": "declaration", "text": "extern void * mrtp_malloc(size_t);", "parent": 0, "children": [58, 60, 61], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 34}}, {"id": 58, "type": "storage_class_specifier", "text": "extern", "parent": 57, "children": [59], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 59, "type": "extern", "text": "extern", "parent": 58, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 60, "type": "primitive_type", "text": "void", "parent": 57, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 11}}, {"id": 61, "type": "pointer_declarator", "text": "* mrtp_malloc(size_t)", "parent": 57, "children": [62, 63], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 33}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 13}}, {"id": 63, "type": "function_declarator", "text": "mrtp_malloc(size_t)", "parent": 61, "children": [64, 65], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 33}}, {"id": 64, "type": "identifier", "text": "mrtp_malloc", "parent": 63, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 25}}, {"id": 65, "type": "parameter_list", "text": "(size_t)", "parent": 63, "children": [66], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 33}}, {"id": 66, "type": "parameter_declaration", "text": "size_t", "parent": 65, "children": [67], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 32}}, {"id": 67, "type": "primitive_type", "text": "size_t", "parent": 66, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 32}}, {"id": 68, "type": "declaration", "text": "extern void mrtp_free(void *);", "parent": 0, "children": [69, 71, 72], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 32}}, {"id": 69, "type": "storage_class_specifier", "text": "extern", "parent": 68, "children": [70], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 70, "type": "extern", "text": "extern", "parent": 69, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 71, "type": "primitive_type", "text": "void", "parent": 68, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 11}}, {"id": 72, "type": "function_declarator", "text": "mrtp_free(void *)", "parent": 68, "children": [73, 74], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 31}}, {"id": 73, "type": "identifier", "text": "mrtp_free", "parent": 72, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 23}}, {"id": 74, "type": "parameter_list", "text": "(void *)", "parent": 72, "children": [75], "start_point": {"row": 13, "column": 23}, "end_point": {"row": 13, "column": 31}}, {"id": 75, "type": "parameter_declaration", "text": "void *", "parent": 74, "children": [76, 77], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 30}}, {"id": 76, "type": "primitive_type", "text": "void", "parent": 75, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 28}}, {"id": 77, "type": "abstract_pointer_declarator", "text": "*", "parent": 75, "children": [78], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 30}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 30}}, {"id": 79, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}]}, "node_categories": {"declarations": {"functions": [18, 31, 46, 63, 72], "variables": [9, 14, 26, 29, 39, 44, 54, 57, 66, 68, 75], "classes": [11, 12, 58, 69], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 13, 21, 24, 28, 34, 37, 43, 49, 52, 56, 64, 73, 79], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "(MRTP_CALLBACK * malloc) (size_t size)"}, {"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "(MRTP_CALLBACK * free) (void * memory)"}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "(MRTP_CALLBACK * no_memory) (void)"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "mrtp_malloc(size_t)"}, {"node_id": 72, "universal_type": "function", "name": "unknown", "text_snippet": "mrtp_free(void *)"}], "class_declarations": [{"node_id": 11, "universal_type": "class", "name": "_MRtpCallbacks", "text_snippet": "struct _MRtpCallbacks\n{\n\tvoid * (MRTP_CALLBACK * malloc) (size_t size);\n\tvoid (MRTP_CALLBACK * free)"}, {"node_id": 12, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 58, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 69, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 6, "text": "#include <stdlib.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef __MRTP_CALLBACKS_H__\n#define __MRTP_CALLBACKS_H__\n\n#include <stdlib.h>\n\ntypedef struct _MRtpCallbacks\n{\n\tvoid * (MRTP_CALLBACK * malloc) (size_t size);\n\tvoid (MRTP_CALLBACK * free) (void * memory);\n\tvoid (MRTP_CALLBACK * no_memory) (void);\n} MRtpCallbacks;\n\nextern void * mrtp_malloc(size_t);\nextern void mrtp_free(void *);\n\n#endif /* __MRTP_CALLBACKS_H__ */\n\n"}
319
c
#include <stdio.h> #include <math.h> /* * transcendental functions: pow */ double pow(x,y) /* x to the power y */ double x,y; { return exp(log(x)*y); }
14.5
10
(translation_unit) "#include <stdio.h>\n#include <math.h>\n\n/*\n * transcendental functions: pow\n */\n\ndouble pow(x,y) /* x to the power y */\ndouble x,y;\n{\n return exp(log(x)*y);\n}\n" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <math.h>\n" (#include) "#include" (system_lib_string) "<math.h>" (comment) "/*\n * transcendental functions: pow\n */" (function_definition) "double pow(x,y) /* x to the power y */\ndouble x,y;\n{\n return exp(log(x)*y);\n}" (primitive_type) "double" (function_declarator) "pow(x,y)" (identifier) "pow" (parameter_list) "(x,y)" (() "(" (identifier) "x" (,) "," (identifier) "y" ()) ")" (comment) "/* x to the power y */" (declaration) "double x,y;" (primitive_type) "double" (identifier) "x" (,) "," (identifier) "y" (;) ";" (compound_statement) "{\n return exp(log(x)*y);\n}" ({) "{" (return_statement) "return exp(log(x)*y);" (return) "return" (call_expression) "exp(log(x)*y)" (identifier) "exp" (argument_list) "(log(x)*y)" (() "(" (binary_expression) "log(x)*y" (call_expression) "log(x)" (identifier) "log" (argument_list) "(x)" (() "(" (identifier) "x" ()) ")" (*) "*" (identifier) "y" ()) ")" (;) ";" (}) "}"
45
0
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 14.5, "nodes": 28, "errors": 0, "source_hash": "113b9d91598c0a88e4e099e241e08bb5db3833964f1d3cef14a776bb85a57ee9", "categorized_nodes": 22}, "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 <math.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": "<math.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 17}}, {"id": 6, "type": "function_definition", "text": "double pow(x,y)\t/* x to the power y */\ndouble x,y;\n{\n\treturn exp(log(x)*y);\n}", "parent": null, "children": [7, 8, 13], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "double", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 6}}, {"id": 8, "type": "function_declarator", "text": "pow(x,y)", "parent": 6, "children": [9, 10], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 15}}, {"id": 9, "type": "identifier", "text": "pow", "parent": 8, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 10}}, {"id": 10, "type": "parameter_list", "text": "(x,y)", "parent": 8, "children": [11, 12], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 15}}, {"id": 11, "type": "identifier", "text": "x", "parent": 10, "children": [], "start_point": {"row": 7, "column": 11}, "end_point": {"row": 7, "column": 12}}, {"id": 12, "type": "identifier", "text": "y", "parent": 10, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 14}}, {"id": 13, "type": "declaration", "text": "double x,y;", "parent": 6, "children": [14, 15, 16], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 11}}, {"id": 14, "type": "primitive_type", "text": "double", "parent": 13, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 15, "type": "identifier", "text": "x", "parent": 13, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 8}}, {"id": 16, "type": "identifier", "text": "y", "parent": 13, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 10}}, {"id": 17, "type": "return_statement", "text": "return exp(log(x)*y);", "parent": 6, "children": [18], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 22}}, {"id": 18, "type": "call_expression", "text": "exp(log(x)*y)", "parent": 17, "children": [19, 20], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 21}}, {"id": 19, "type": "identifier", "text": "exp", "parent": 18, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 11}}, {"id": 20, "type": "argument_list", "text": "(log(x)*y)", "parent": 18, "children": [21], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 21}}, {"id": 21, "type": "binary_expression", "text": "log(x)*y", "parent": 20, "children": [22, 26, 27], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 20}}, {"id": 22, "type": "call_expression", "text": "log(x)", "parent": 21, "children": [23, 24], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 18}}, {"id": 23, "type": "identifier", "text": "log", "parent": 22, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 15}}, {"id": 24, "type": "argument_list", "text": "(x)", "parent": 22, "children": [25], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 18}}, {"id": 25, "type": "identifier", "text": "x", "parent": 24, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 17}}, {"id": 26, "type": "*", "text": "*", "parent": 21, "children": [], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 19}}, {"id": 27, "type": "identifier", "text": "y", "parent": 21, "children": [], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 20}}]}, "node_categories": {"declarations": {"functions": [6, 8], "variables": [13], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [18, 21, 22], "assignments": [], "loops": [], "conditionals": [9, 11, 12, 15, 16, 19, 23, 25, 27], "returns": [17], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "unknown", "text_snippet": "double pow(x,y)\t/* x to the power y */\ndouble x,y;\n{\n\treturn exp(log(x)*y);\n}"}, {"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "pow(x,y)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <math.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include <math.h>\n\n/*\n *\ttranscendental functions: pow\n */\n\ndouble pow(x,y)\t/* x to the power y */\ndouble x,y;\n{\n\treturn exp(log(x)*y);\n}\n"}
320
c
// Created by Oleg on 6/16/16. // Copyright © 2016 <NAME>. All rights reserved. // /** * Represents protocol types that can be used during session. */ typedef NS_ENUM(NSUInteger, OHProtocolType) { /** * Default connection. */ OHProtocolTypeDefault, /** * TCP/IP connection to local or remote server. */ OHProtocolTypeTCP, };
22
16
(translation_unit) "// Created by Oleg on 6/16/16.\n// Copyright © 2016 <NAME>. All rights reserved.\n//\n\n/**\n * Represents protocol types that can be used during session.\n */\ntypedef NS_ENUM(NSUInteger, OHProtocolType) {\n /**\n * Default connection.\n */\n OHProtocolTypeDefault,\n /**\n * TCP/IP connection to local or remote server.\n */\n OHProtocolTypeTCP,\n};\n" (comment) "// Created by Oleg on 6/16/16." (comment) "// Copyright © 2016 <NAME>. All rights reserved.\n" (comment) "/\n" (comment) "**\n * Represents protocol types that can be used during session.\n */\n" (type_definition) "ypedef NS_ENUM(NSUInteger, OHProtocolType) {\n /**\n * Default connection.\n */\n OHProtocolTypeDefault,\n /**\n * TCP/IP connection to local or remote server.\n */\n OHProtocolTypeTCP,\n};\n" (typedef) "ypedef " (macro_type_specifier) "S_ENUM(NSUInteger, OHProtocolType) " (identifier) "S_ENUM(" (() "N" (ERROR) "SUInteger, " (type_descriptor) "SUInteger," (type_identifier) "SUInteger," (,) " " (type_descriptor) "HProtocolType)" (type_identifier) "HProtocolType)" ()) " " (ERROR) "\n" ({) "\n" (comment) "**\n * Default connection.\n */\n" (type_identifier) "HProtocolTypeDefault," (,) "\n" (comment) "**\n * TCP/IP connection to local or remote server.\n */\n" (type_identifier) "HProtocolTypeTCP," (ERROR) "\n};" (,) "\n" (}) ";" (;) "\n"
28
3
{"language": "c", "success": true, "metadata": {"lines": 16, "avg_line_length": 22.0, "nodes": 13, "errors": 0, "source_hash": "0d405a40000f5721a58409f10e18141b2476a0e3557df2193b59edf77eeaba45", "categorized_nodes": 7}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "type_definition", "text": "ypedef NS_ENUM(NSUInteger, OHProtocolType) {\n /**\n * Default connection.\n */\n OHProtocolTypeDefault,\n /**\n * TCP/IP connection to local or remote server.\n */\n OHProtocolTypeTCP,\n};\n", "parent": null, "children": [1, 2, 9, 10, 11, 12], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 16, "column": 2}}, {"id": 1, "type": "typedef", "text": "ypedef ", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 2, "type": "macro_type_specifier", "text": "S_ENUM(NSUInteger, OHProtocolType) ", "parent": 0, "children": [3, 4, 7], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 43}}, {"id": 3, "type": "identifier", "text": "S_ENUM(", "parent": 2, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 15}}, {"id": 4, "type": "ERROR", "text": "SUInteger, ", "parent": 2, "children": [5], "start_point": {"row": 7, "column": 16}, "end_point": {"row": 7, "column": 27}}, {"id": 5, "type": "type_descriptor", "text": "SUInteger,", "parent": 4, "children": [6], "start_point": {"row": 7, "column": 16}, "end_point": {"row": 7, "column": 26}}, {"id": 6, "type": "type_identifier", "text": "SUInteger,", "parent": 5, "children": [], "start_point": {"row": 7, "column": 16}, "end_point": {"row": 7, "column": 26}}, {"id": 7, "type": "type_descriptor", "text": "HProtocolType)", "parent": 2, "children": [8], "start_point": {"row": 7, "column": 28}, "end_point": {"row": 7, "column": 42}}, {"id": 8, "type": "type_identifier", "text": "HProtocolType)", "parent": 7, "children": [], "start_point": {"row": 7, "column": 28}, "end_point": {"row": 7, "column": 42}}, {"id": 9, "type": "ERROR", "text": "\n", "parent": 0, "children": [], "start_point": {"row": 7, "column": 44}, "end_point": {"row": 7, "column": 45}}, {"id": 10, "type": "type_identifier", "text": "HProtocolTypeDefault,", "parent": 0, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 25}}, {"id": 11, "type": "type_identifier", "text": "HProtocolTypeTCP,", "parent": 0, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 21}}, {"id": 12, "type": "ERROR", "text": "\n};", "parent": 0, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 16, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [0], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [2, 3, 6, 8, 10, 11], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "// Created by Oleg on 6/16/16.\n// Copyright \u00a9 2016 <NAME>. All rights reserved.\n//\n\n/**\n * Represents protocol types that can be used during session.\n */\ntypedef NS_ENUM(NSUInteger, OHProtocolType) {\n /**\n * Default connection.\n */\n OHProtocolTypeDefault,\n /**\n * TCP/IP connection to local or remote server.\n */\n OHProtocolTypeTCP,\n};\n"}
321
c
#ifndef BTREE_H #define BTREE_H #include <stdio.h> #include <stdlib.h> #define false 0 #define true 1 #define nil NULL #define and && #define or || #define is == typedef enum { PRE_ORDER = 1, IN_ORDER, POST_ORDER, LEVEL_ORDER } TraverseType; typedef struct { char c; } BTreeItem; typedef struct _node { BTreeItem item; struct _node* right; struct _node* left; } _node; typedef struct { _node* root; } _btree; typedef _node* Node; typedef _btree* BTree; void init(BTree tree); int is_empty(BTree tree); int is_root(BTree tree, Node node); int is_leaf(Node node); int node_depth(BTree tree, Node node); int node_height(Node node); int node_degree(Node node); void traverse(BTree tree, TraverseType type); Node create_root(BTree tree, BTreeItem* item); Node insert_right(Node parent, BTreeItem* item); Node insert_left(Node parent, BTreeItem* item); #endif
21.05
41
(translation_unit) "#ifndef BTREE_H\n#define BTREE_H\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#define false 0\n#define true 1\n#define nil NULL\n#define and &&\n#define or ||\n#define is == \n\ntypedef enum {\n PRE_ORDER = 1,\n IN_ORDER,\n POST_ORDER,\n LEVEL_ORDER\n} TraverseType;\n\ntypedef struct {\n char c;\n} BTreeItem;\n\ntypedef struct _node {\n BTreeItem item;\n struct _node* right;\n struct _node* left;\n} _node;\n\ntypedef struct {\n _node* root;\n} _btree;\n\ntypedef _node* Node;\ntypedef _btree* BTree;\n\nvoid init(BTree tree);\nint is_empty(BTree tree);\nint is_root(BTree tree, Node node);\nint is_leaf(Node node);\n\nint node_depth(BTree tree, Node node);\nint node_height(Node node);\nint node_degree(Node node);\n\nvoid traverse(BTree tree, TraverseType type);\n\nNode create_root(BTree tree, BTreeItem* item);\nNode insert_right(Node parent, BTreeItem* item);\nNode insert_left(Node parent, BTreeItem* item);\n\n#endif " (preproc_ifdef) "#ifndef BTREE_H\n#define BTREE_H\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#define false 0\n#define true 1\n#define nil NULL\n#define and &&\n#define or ||\n#define is == \n\ntypedef enum {\n PRE_ORDER = 1,\n IN_ORDER,\n POST_ORDER,\n LEVEL_ORDER\n} TraverseType;\n\ntypedef struct {\n char c;\n} BTreeItem;\n\ntypedef struct _node {\n BTreeItem item;\n struct _node* right;\n struct _node* left;\n} _node;\n\ntypedef struct {\n _node* root;\n} _btree;\n\ntypedef _node* Node;\ntypedef _btree* BTree;\n\nvoid init(BTree tree);\nint is_empty(BTree tree);\nint is_root(BTree tree, Node node);\nint is_leaf(Node node);\n\nint node_depth(BTree tree, Node node);\nint node_height(Node node);\nint node_degree(Node node);\n\nvoid traverse(BTree tree, TraverseType type);\n\nNode create_root(BTree tree, BTreeItem* item);\nNode insert_right(Node parent, BTreeItem* item);\nNode insert_left(Node parent, BTreeItem* item);\n\n#endif" (#ifndef) "#ifndef" (identifier) "BTREE_H" (preproc_def) "#define BTREE_H\n" (#define) "#define" (identifier) "BTREE_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_def) "#define false 0\n" (#define) "#define" (identifier) "false" (preproc_arg) "0" (preproc_def) "#define true 1\n" (#define) "#define" (identifier) "true" (preproc_arg) "1" (preproc_def) "#define nil NULL\n" (#define) "#define" (identifier) "nil" (preproc_arg) "NULL" (preproc_def) "#define and &&\n" (#define) "#define" (identifier) "and" (preproc_arg) "&&" (preproc_def) "#define or ||\n" (#define) "#define" (identifier) "or" (preproc_arg) "||" (preproc_def) "#define is == \n" (#define) "#define" (identifier) "is" (preproc_arg) "== " (type_definition) "typedef enum {\n PRE_ORDER = 1,\n IN_ORDER,\n POST_ORDER,\n LEVEL_ORDER\n} TraverseType;" (typedef) "typedef" (enum_specifier) "enum {\n PRE_ORDER = 1,\n IN_ORDER,\n POST_ORDER,\n LEVEL_ORDER\n}" (enum) "enum" (enumerator_list) "{\n PRE_ORDER = 1,\n IN_ORDER,\n POST_ORDER,\n LEVEL_ORDER\n}" ({) "{" (enumerator) "PRE_ORDER = 1" (identifier) "PRE_ORDER" (=) "=" (number_literal) "1" (,) "," (enumerator) "IN_ORDER" (identifier) "IN_ORDER" (,) "," (enumerator) "POST_ORDER" (identifier) "POST_ORDER" (,) "," (enumerator) "LEVEL_ORDER" (identifier) "LEVEL_ORDER" (}) "}" (type_identifier) "TraverseType" (;) ";" (type_definition) "typedef struct {\n char c;\n} BTreeItem;" (typedef) "typedef" (struct_specifier) "struct {\n char c;\n}" (struct) "struct" (field_declaration_list) "{\n char c;\n}" ({) "{" (field_declaration) "char c;" (primitive_type) "char" (field_identifier) "c" (;) ";" (}) "}" (type_identifier) "BTreeItem" (;) ";" (type_definition) "typedef struct _node {\n BTreeItem item;\n struct _node* right;\n struct _node* left;\n} _node;" (typedef) "typedef" (struct_specifier) "struct _node {\n BTreeItem item;\n struct _node* right;\n struct _node* left;\n}" (struct) "struct" (type_identifier) "_node" (field_declaration_list) "{\n BTreeItem item;\n struct _node* right;\n struct _node* left;\n}" ({) "{" (field_declaration) "BTreeItem item;" (type_identifier) "BTreeItem" (field_identifier) "item" (;) ";" (field_declaration) "struct _node* right;" (struct_specifier) "struct _node" (struct) "struct" (type_identifier) "_node" (pointer_declarator) "* right" (*) "*" (field_identifier) "right" (;) ";" (field_declaration) "struct _node* left;" (struct_specifier) "struct _node" (struct) "struct" (type_identifier) "_node" (pointer_declarator) "* left" (*) "*" (field_identifier) "left" (;) ";" (}) "}" (type_identifier) "_node" (;) ";" (type_definition) "typedef struct {\n _node* root;\n} _btree;" (typedef) "typedef" (struct_specifier) "struct {\n _node* root;\n}" (struct) "struct" (field_declaration_list) "{\n _node* root;\n}" ({) "{" (field_declaration) "_node* root;" (type_identifier) "_node" (pointer_declarator) "* root" (*) "*" (field_identifier) "root" (;) ";" (}) "}" (type_identifier) "_btree" (;) ";" (type_definition) "typedef _node* Node;" (typedef) "typedef" (type_identifier) "_node" (pointer_declarator) "* Node" (*) "*" (type_identifier) "Node" (;) ";" (type_definition) "typedef _btree* BTree;" (typedef) "typedef" (type_identifier) "_btree" (pointer_declarator) "* BTree" (*) "*" (type_identifier) "BTree" (;) ";" (declaration) "void init(BTree tree);" (primitive_type) "void" (function_declarator) "init(BTree tree)" (identifier) "init" (parameter_list) "(BTree tree)" (() "(" (parameter_declaration) "BTree tree" (type_identifier) "BTree" (identifier) "tree" ()) ")" (;) ";" (declaration) "int is_empty(BTree tree);" (primitive_type) "int" (function_declarator) "is_empty(BTree tree)" (identifier) "is_empty" (parameter_list) "(BTree tree)" (() "(" (parameter_declaration) "BTree tree" (type_identifier) "BTree" (identifier) "tree" ()) ")" (;) ";" (declaration) "int is_root(BTree tree, Node node);" (primitive_type) "int" (function_declarator) "is_root(BTree tree, Node node)" (identifier) "is_root" (parameter_list) "(BTree tree, Node node)" (() "(" (parameter_declaration) "BTree tree" (type_identifier) "BTree" (identifier) "tree" (,) "," (parameter_declaration) "Node node" (type_identifier) "Node" (identifier) "node" ()) ")" (;) ";" (declaration) "int is_leaf(Node node);" (primitive_type) "int" (function_declarator) "is_leaf(Node node)" (identifier) "is_leaf" (parameter_list) "(Node node)" (() "(" (parameter_declaration) "Node node" (type_identifier) "Node" (identifier) "node" ()) ")" (;) ";" (declaration) "int node_depth(BTree tree, Node node);" (primitive_type) "int" (function_declarator) "node_depth(BTree tree, Node node)" (identifier) "node_depth" (parameter_list) "(BTree tree, Node node)" (() "(" (parameter_declaration) "BTree tree" (type_identifier) "BTree" (identifier) "tree" (,) "," (parameter_declaration) "Node node" (type_identifier) "Node" (identifier) "node" ()) ")" (;) ";" (declaration) "int node_height(Node node);" (primitive_type) "int" (function_declarator) "node_height(Node node)" (identifier) "node_height" (parameter_list) "(Node node)" (() "(" (parameter_declaration) "Node node" (type_identifier) "Node" (identifier) "node" ()) ")" (;) ";" (declaration) "int node_degree(Node node);" (primitive_type) "int" (function_declarator) "node_degree(Node node)" (identifier) "node_degree" (parameter_list) "(Node node)" (() "(" (parameter_declaration) "Node node" (type_identifier) "Node" (identifier) "node" ()) ")" (;) ";" (declaration) "void traverse(BTree tree, TraverseType type);" (primitive_type) "void" (function_declarator) "traverse(BTree tree, TraverseType type)" (identifier) "traverse" (parameter_list) "(BTree tree, TraverseType type)" (() "(" (parameter_declaration) "BTree tree" (type_identifier) "BTree" (identifier) "tree" (,) "," (parameter_declaration) "TraverseType type" (type_identifier) "TraverseType" (identifier) "type" ()) ")" (;) ";" (declaration) "Node create_root(BTree tree, BTreeItem* item);" (type_identifier) "Node" (function_declarator) "create_root(BTree tree, BTreeItem* item)" (identifier) "create_root" (parameter_list) "(BTree tree, BTreeItem* item)" (() "(" (parameter_declaration) "BTree tree" (type_identifier) "BTree" (identifier) "tree" (,) "," (parameter_declaration) "BTreeItem* item" (type_identifier) "BTreeItem" (pointer_declarator) "* item" (*) "*" (identifier) "item" ()) ")" (;) ";" (declaration) "Node insert_right(Node parent, BTreeItem* item);" (type_identifier) "Node" (function_declarator) "insert_right(Node parent, BTreeItem* item)" (identifier) "insert_right" (parameter_list) "(Node parent, BTreeItem* item)" (() "(" (parameter_declaration) "Node parent" (type_identifier) "Node" (identifier) "parent" (,) "," (parameter_declaration) "BTreeItem* item" (type_identifier) "BTreeItem" (pointer_declarator) "* item" (*) "*" (identifier) "item" ()) ")" (;) ";" (declaration) "Node insert_left(Node parent, BTreeItem* item);" (type_identifier) "Node" (function_declarator) "insert_left(Node parent, BTreeItem* item)" (identifier) "insert_left" (parameter_list) "(Node parent, BTreeItem* item)" (() "(" (parameter_declaration) "Node parent" (type_identifier) "Node" (identifier) "parent" (,) "," (parameter_declaration) "BTreeItem* item" (type_identifier) "BTreeItem" (pointer_declarator) "* item" (*) "*" (identifier) "item" ()) ")" (;) ";" (#endif) "#endif"
283
0
{"language": "c", "success": true, "metadata": {"lines": 41, "avg_line_length": 21.05, "nodes": 218, "errors": 0, "source_hash": "556cebd90c175809b07c407c18a491e2144b6b73a89881fe85ec0ca19e238045", "categorized_nodes": 155}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef BTREE_H\n#define BTREE_H\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#define false 0\n#define true 1\n#define nil NULL\n#define and &&\n#define or ||\n#define is == \n\ntypedef enum {\n PRE_ORDER = 1,\n IN_ORDER,\n POST_ORDER,\n LEVEL_ORDER\n} TraverseType;\n\ntypedef struct {\n char c;\n} BTreeItem;\n\ntypedef struct _node {\n BTreeItem item;\n struct _node* right;\n struct _node* left;\n} _node;\n\ntypedef struct {\n _node* root;\n} _btree;\n\ntypedef _node* Node;\ntypedef _btree* BTree;\n\nvoid init(BTree tree);\nint is_empty(BTree tree);\nint is_root(BTree tree, Node node);\nint is_leaf(Node node);\n\nint node_depth(BTree tree, Node node);\nint node_height(Node node);\nint node_degree(Node node);\n\nvoid traverse(BTree tree, TraverseType type);\n\nNode create_root(BTree tree, BTreeItem* item);\nNode insert_right(Node parent, BTreeItem* item);\nNode insert_left(Node parent, BTreeItem* item);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 16, 20, 24, 28, 32, 36, 52, 60, 83, 93, 99, 105, 113, 121, 132, 140, 151, 159, 167, 178, 191, 204, 217], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "BTREE_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 15}}, {"id": 3, "type": "preproc_def", "text": "#define BTREE_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": "BTREE_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 15}}, {"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_def", "text": "#define false 0\n", "parent": 0, "children": [13, 14, 15], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 14, "type": "identifier", "text": "false", "parent": 12, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 13}}, {"id": 15, "type": "preproc_arg", "text": "0", "parent": 12, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 15}}, {"id": 16, "type": "preproc_def", "text": "#define true 1\n", "parent": 0, "children": [17, 18, 19], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 17, "type": "#define", "text": "#define", "parent": 16, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 18, "type": "identifier", "text": "true", "parent": 16, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 12}}, {"id": 19, "type": "preproc_arg", "text": "1", "parent": 16, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 15}}, {"id": 20, "type": "preproc_def", "text": "#define nil NULL\n", "parent": 0, "children": [21, 22, 23], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 21, "type": "#define", "text": "#define", "parent": 20, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 22, "type": "identifier", "text": "nil", "parent": 20, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 11}}, {"id": 23, "type": "preproc_arg", "text": "NULL", "parent": 20, "children": [], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 18}}, {"id": 24, "type": "preproc_def", "text": "#define and &&\n", "parent": 0, "children": [25, 26, 27], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 25, "type": "#define", "text": "#define", "parent": 24, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 26, "type": "identifier", "text": "and", "parent": 24, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 11}}, {"id": 27, "type": "preproc_arg", "text": "&&", "parent": 24, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 16}}, {"id": 28, "type": "preproc_def", "text": "#define or ||\n", "parent": 0, "children": [29, 30, 31], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 29, "type": "#define", "text": "#define", "parent": 28, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 30, "type": "identifier", "text": "or", "parent": 28, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 10}}, {"id": 31, "type": "preproc_arg", "text": "||", "parent": 28, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 16}}, {"id": 32, "type": "preproc_def", "text": "#define is == \n", "parent": 0, "children": [33, 34, 35], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 33, "type": "#define", "text": "#define", "parent": 32, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 34, "type": "identifier", "text": "is", "parent": 32, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 10}}, {"id": 35, "type": "preproc_arg", "text": "== ", "parent": 32, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 18}}, {"id": 36, "type": "type_definition", "text": "typedef enum {\n PRE_ORDER = 1,\n IN_ORDER,\n POST_ORDER,\n LEVEL_ORDER\n} TraverseType;", "parent": 0, "children": [37, 38, 51], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 18, "column": 15}}, {"id": 37, "type": "typedef", "text": "typedef", "parent": 36, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 38, "type": "enum_specifier", "text": "enum {\n PRE_ORDER = 1,\n IN_ORDER,\n POST_ORDER,\n LEVEL_ORDER\n}", "parent": 36, "children": [39, 40], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 18, "column": 1}}, {"id": 39, "type": "enum", "text": "enum", "parent": 38, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 12}}, {"id": 40, "type": "enumerator_list", "text": "{\n PRE_ORDER = 1,\n IN_ORDER,\n POST_ORDER,\n LEVEL_ORDER\n}", "parent": 38, "children": [41, 45, 47, 49], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 18, "column": 1}}, {"id": 41, "type": "enumerator", "text": "PRE_ORDER = 1", "parent": 40, "children": [42, 43, 44], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 17}}, {"id": 42, "type": "identifier", "text": "PRE_ORDER", "parent": 41, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 13}}, {"id": 43, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 15}}, {"id": 44, "type": "number_literal", "text": "1", "parent": 41, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 17}}, {"id": 45, "type": "enumerator", "text": "IN_ORDER", "parent": 40, "children": [46], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 12}}, {"id": 46, "type": "identifier", "text": "IN_ORDER", "parent": 45, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 12}}, {"id": 47, "type": "enumerator", "text": "POST_ORDER", "parent": 40, "children": [48], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 14}}, {"id": 48, "type": "identifier", "text": "POST_ORDER", "parent": 47, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 14}}, {"id": 49, "type": "enumerator", "text": "LEVEL_ORDER", "parent": 40, "children": [50], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 15}}, {"id": 50, "type": "identifier", "text": "LEVEL_ORDER", "parent": 49, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 15}}, {"id": 51, "type": "type_identifier", "text": "TraverseType", "parent": 36, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 14}}, {"id": 52, "type": "type_definition", "text": "typedef struct {\n char c;\n} BTreeItem;", "parent": 0, "children": [53, 54, 59], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 22, "column": 12}}, {"id": 53, "type": "typedef", "text": "typedef", "parent": 52, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 54, "type": "struct_specifier", "text": "struct {\n char c;\n}", "parent": 52, "children": [55], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 22, "column": 1}}, {"id": 55, "type": "struct", "text": "struct", "parent": 54, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 14}}, {"id": 56, "type": "field_declaration", "text": "char c;", "parent": 54, "children": [57, 58], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 11}}, {"id": 57, "type": "primitive_type", "text": "char", "parent": 56, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 8}}, {"id": 58, "type": "field_identifier", "text": "c", "parent": 56, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 10}}, {"id": 59, "type": "type_identifier", "text": "BTreeItem", "parent": 52, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 11}}, {"id": 60, "type": "type_definition", "text": "typedef struct _node {\n BTreeItem item;\n struct _node* right;\n struct _node* left;\n} _node;", "parent": 0, "children": [61, 62, 82], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 61, "type": "typedef", "text": "typedef", "parent": 60, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 62, "type": "struct_specifier", "text": "struct _node {\n BTreeItem item;\n struct _node* right;\n struct _node* left;\n}", "parent": 60, "children": [63, 64], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 28, "column": 1}}, {"id": 63, "type": "struct", "text": "struct", "parent": 62, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 14}}, {"id": 64, "type": "type_identifier", "text": "_node", "parent": 62, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 20}}, {"id": 65, "type": "field_declaration", "text": "BTreeItem item;", "parent": 62, "children": [66, 67], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 19}}, {"id": 66, "type": "type_identifier", "text": "BTreeItem", "parent": 65, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 13}}, {"id": 67, "type": "field_identifier", "text": "item", "parent": 65, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 18}}, {"id": 68, "type": "field_declaration", "text": "struct _node* right;", "parent": 62, "children": [69, 72], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 24}}, {"id": 69, "type": "struct_specifier", "text": "struct _node", "parent": 68, "children": [70, 71], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 16}}, {"id": 70, "type": "struct", "text": "struct", "parent": 69, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 10}}, {"id": 71, "type": "type_identifier", "text": "_node", "parent": 69, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 16}}, {"id": 72, "type": "pointer_declarator", "text": "* right", "parent": 68, "children": [73, 74], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 23}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 17}}, {"id": 74, "type": "field_identifier", "text": "right", "parent": 72, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 23}}, {"id": 75, "type": "field_declaration", "text": "struct _node* left;", "parent": 62, "children": [76, 79], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 23}}, {"id": 76, "type": "struct_specifier", "text": "struct _node", "parent": 75, "children": [77, 78], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 16}}, {"id": 77, "type": "struct", "text": "struct", "parent": 76, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 10}}, {"id": 78, "type": "type_identifier", "text": "_node", "parent": 76, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 16}}, {"id": 79, "type": "pointer_declarator", "text": "* left", "parent": 75, "children": [80, 81], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 22}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 17}}, {"id": 81, "type": "field_identifier", "text": "left", "parent": 79, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 22}}, {"id": 82, "type": "type_identifier", "text": "_node", "parent": 60, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 7}}, {"id": 83, "type": "type_definition", "text": "typedef struct {\n _node* root;\n} _btree;", "parent": 0, "children": [84, 85, 92], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 32, "column": 9}}, {"id": 84, "type": "typedef", "text": "typedef", "parent": 83, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 85, "type": "struct_specifier", "text": "struct {\n _node* root;\n}", "parent": 83, "children": [86], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 32, "column": 1}}, {"id": 86, "type": "struct", "text": "struct", "parent": 85, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 14}}, {"id": 87, "type": "field_declaration", "text": "_node* root;", "parent": 85, "children": [88, 89], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 16}}, {"id": 88, "type": "type_identifier", "text": "_node", "parent": 87, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 9}}, {"id": 89, "type": "pointer_declarator", "text": "* root", "parent": 87, "children": [90, 91], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 15}}, {"id": 90, "type": "*", "text": "*", "parent": 89, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 10}}, {"id": 91, "type": "field_identifier", "text": "root", "parent": 89, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 15}}, {"id": 92, "type": "type_identifier", "text": "_btree", "parent": 83, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 8}}, {"id": 93, "type": "type_definition", "text": "typedef _node* Node;", "parent": 0, "children": [94, 95, 96], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 20}}, {"id": 94, "type": "typedef", "text": "typedef", "parent": 93, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 7}}, {"id": 95, "type": "type_identifier", "text": "_node", "parent": 93, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 13}}, {"id": 96, "type": "pointer_declarator", "text": "* Node", "parent": 93, "children": [97, 98], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 19}}, {"id": 97, "type": "*", "text": "*", "parent": 96, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 14}}, {"id": 98, "type": "type_identifier", "text": "Node", "parent": 96, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 19}}, {"id": 99, "type": "type_definition", "text": "typedef _btree* BTree;", "parent": 0, "children": [100, 101, 102], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 22}}, {"id": 100, "type": "typedef", "text": "typedef", "parent": 99, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 101, "type": "type_identifier", "text": "_btree", "parent": 99, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 14}}, {"id": 102, "type": "pointer_declarator", "text": "* BTree", "parent": 99, "children": [103, 104], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 21}}, {"id": 103, "type": "*", "text": "*", "parent": 102, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 15}}, {"id": 104, "type": "type_identifier", "text": "BTree", "parent": 102, "children": [], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 21}}, {"id": 105, "type": "declaration", "text": "void init(BTree tree);", "parent": 0, "children": [106, 107], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 22}}, {"id": 106, "type": "primitive_type", "text": "void", "parent": 105, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 4}}, {"id": 107, "type": "function_declarator", "text": "init(BTree tree)", "parent": 105, "children": [108, 109], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 21}}, {"id": 108, "type": "identifier", "text": "init", "parent": 107, "children": [], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 9}}, {"id": 109, "type": "parameter_list", "text": "(BTree tree)", "parent": 107, "children": [110], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 21}}, {"id": 110, "type": "parameter_declaration", "text": "BTree tree", "parent": 109, "children": [111, 112], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 20}}, {"id": 111, "type": "type_identifier", "text": "BTree", "parent": 110, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 15}}, {"id": 112, "type": "identifier", "text": "tree", "parent": 110, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 20}}, {"id": 113, "type": "declaration", "text": "int is_empty(BTree tree);", "parent": 0, "children": [114, 115], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 25}}, {"id": 114, "type": "primitive_type", "text": "int", "parent": 113, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 3}}, {"id": 115, "type": "function_declarator", "text": "is_empty(BTree tree)", "parent": 113, "children": [116, 117], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 24}}, {"id": 116, "type": "identifier", "text": "is_empty", "parent": 115, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 12}}, {"id": 117, "type": "parameter_list", "text": "(BTree tree)", "parent": 115, "children": [118], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 24}}, {"id": 118, "type": "parameter_declaration", "text": "BTree tree", "parent": 117, "children": [119, 120], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 23}}, {"id": 119, "type": "type_identifier", "text": "BTree", "parent": 118, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 18}}, {"id": 120, "type": "identifier", "text": "tree", "parent": 118, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 23}}, {"id": 121, "type": "declaration", "text": "int is_root(BTree tree, Node node);", "parent": 0, "children": [122, 123], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 35}}, {"id": 122, "type": "primitive_type", "text": "int", "parent": 121, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 3}}, {"id": 123, "type": "function_declarator", "text": "is_root(BTree tree, Node node)", "parent": 121, "children": [124, 125], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 34}}, {"id": 124, "type": "identifier", "text": "is_root", "parent": 123, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 11}}, {"id": 125, "type": "parameter_list", "text": "(BTree tree, Node node)", "parent": 123, "children": [126, 129], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 34}}, {"id": 126, "type": "parameter_declaration", "text": "BTree tree", "parent": 125, "children": [127, 128], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 22}}, {"id": 127, "type": "type_identifier", "text": "BTree", "parent": 126, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 17}}, {"id": 128, "type": "identifier", "text": "tree", "parent": 126, "children": [], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 22}}, {"id": 129, "type": "parameter_declaration", "text": "Node node", "parent": 125, "children": [130, 131], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 33}}, {"id": 130, "type": "type_identifier", "text": "Node", "parent": 129, "children": [], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 28}}, {"id": 131, "type": "identifier", "text": "node", "parent": 129, "children": [], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 33}}, {"id": 132, "type": "declaration", "text": "int is_leaf(Node node);", "parent": 0, "children": [133, 134], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 23}}, {"id": 133, "type": "primitive_type", "text": "int", "parent": 132, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 3}}, {"id": 134, "type": "function_declarator", "text": "is_leaf(Node node)", "parent": 132, "children": [135, 136], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 22}}, {"id": 135, "type": "identifier", "text": "is_leaf", "parent": 134, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 11}}, {"id": 136, "type": "parameter_list", "text": "(Node node)", "parent": 134, "children": [137], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 22}}, {"id": 137, "type": "parameter_declaration", "text": "Node node", "parent": 136, "children": [138, 139], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 21}}, {"id": 138, "type": "type_identifier", "text": "Node", "parent": 137, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 16}}, {"id": 139, "type": "identifier", "text": "node", "parent": 137, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 21}}, {"id": 140, "type": "declaration", "text": "int node_depth(BTree tree, Node node);", "parent": 0, "children": [141, 142], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 38}}, {"id": 141, "type": "primitive_type", "text": "int", "parent": 140, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 3}}, {"id": 142, "type": "function_declarator", "text": "node_depth(BTree tree, Node node)", "parent": 140, "children": [143, 144], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 37}}, {"id": 143, "type": "identifier", "text": "node_depth", "parent": 142, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 14}}, {"id": 144, "type": "parameter_list", "text": "(BTree tree, Node node)", "parent": 142, "children": [145, 148], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 37}}, {"id": 145, "type": "parameter_declaration", "text": "BTree tree", "parent": 144, "children": [146, 147], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 25}}, {"id": 146, "type": "type_identifier", "text": "BTree", "parent": 145, "children": [], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 20}}, {"id": 147, "type": "identifier", "text": "tree", "parent": 145, "children": [], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 25}}, {"id": 148, "type": "parameter_declaration", "text": "Node node", "parent": 144, "children": [149, 150], "start_point": {"row": 42, "column": 27}, "end_point": {"row": 42, "column": 36}}, {"id": 149, "type": "type_identifier", "text": "Node", "parent": 148, "children": [], "start_point": {"row": 42, "column": 27}, "end_point": {"row": 42, "column": 31}}, {"id": 150, "type": "identifier", "text": "node", "parent": 148, "children": [], "start_point": {"row": 42, "column": 32}, "end_point": {"row": 42, "column": 36}}, {"id": 151, "type": "declaration", "text": "int node_height(Node node);", "parent": 0, "children": [152, 153], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 27}}, {"id": 152, "type": "primitive_type", "text": "int", "parent": 151, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 3}}, {"id": 153, "type": "function_declarator", "text": "node_height(Node node)", "parent": 151, "children": [154, 155], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 26}}, {"id": 154, "type": "identifier", "text": "node_height", "parent": 153, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 15}}, {"id": 155, "type": "parameter_list", "text": "(Node node)", "parent": 153, "children": [156], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 26}}, {"id": 156, "type": "parameter_declaration", "text": "Node node", "parent": 155, "children": [157, 158], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 25}}, {"id": 157, "type": "type_identifier", "text": "Node", "parent": 156, "children": [], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 20}}, {"id": 158, "type": "identifier", "text": "node", "parent": 156, "children": [], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 25}}, {"id": 159, "type": "declaration", "text": "int node_degree(Node node);", "parent": 0, "children": [160, 161], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 27}}, {"id": 160, "type": "primitive_type", "text": "int", "parent": 159, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 3}}, {"id": 161, "type": "function_declarator", "text": "node_degree(Node node)", "parent": 159, "children": [162, 163], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 26}}, {"id": 162, "type": "identifier", "text": "node_degree", "parent": 161, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 15}}, {"id": 163, "type": "parameter_list", "text": "(Node node)", "parent": 161, "children": [164], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 26}}, {"id": 164, "type": "parameter_declaration", "text": "Node node", "parent": 163, "children": [165, 166], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 25}}, {"id": 165, "type": "type_identifier", "text": "Node", "parent": 164, "children": [], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 20}}, {"id": 166, "type": "identifier", "text": "node", "parent": 164, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 25}}, {"id": 167, "type": "declaration", "text": "void traverse(BTree tree, TraverseType type);", "parent": 0, "children": [168, 169], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 45}}, {"id": 168, "type": "primitive_type", "text": "void", "parent": 167, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 4}}, {"id": 169, "type": "function_declarator", "text": "traverse(BTree tree, TraverseType type)", "parent": 167, "children": [170, 171], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 44}}, {"id": 170, "type": "identifier", "text": "traverse", "parent": 169, "children": [], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 13}}, {"id": 171, "type": "parameter_list", "text": "(BTree tree, TraverseType type)", "parent": 169, "children": [172, 175], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 44}}, {"id": 172, "type": "parameter_declaration", "text": "BTree tree", "parent": 171, "children": [173, 174], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 24}}, {"id": 173, "type": "type_identifier", "text": "BTree", "parent": 172, "children": [], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 19}}, {"id": 174, "type": "identifier", "text": "tree", "parent": 172, "children": [], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 24}}, {"id": 175, "type": "parameter_declaration", "text": "TraverseType type", "parent": 171, "children": [176, 177], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 43}}, {"id": 176, "type": "type_identifier", "text": "TraverseType", "parent": 175, "children": [], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 38}}, {"id": 177, "type": "identifier", "text": "type", "parent": 175, "children": [], "start_point": {"row": 46, "column": 39}, "end_point": {"row": 46, "column": 43}}, {"id": 178, "type": "declaration", "text": "Node create_root(BTree tree, BTreeItem* item);", "parent": 0, "children": [179, 180], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 46}}, {"id": 179, "type": "type_identifier", "text": "Node", "parent": 178, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 4}}, {"id": 180, "type": "function_declarator", "text": "create_root(BTree tree, BTreeItem* item)", "parent": 178, "children": [181, 182], "start_point": {"row": 48, "column": 5}, "end_point": {"row": 48, "column": 45}}, {"id": 181, "type": "identifier", "text": "create_root", "parent": 180, "children": [], "start_point": {"row": 48, "column": 5}, "end_point": {"row": 48, "column": 16}}, {"id": 182, "type": "parameter_list", "text": "(BTree tree, BTreeItem* item)", "parent": 180, "children": [183, 186], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 45}}, {"id": 183, "type": "parameter_declaration", "text": "BTree tree", "parent": 182, "children": [184, 185], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 27}}, {"id": 184, "type": "type_identifier", "text": "BTree", "parent": 183, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 22}}, {"id": 185, "type": "identifier", "text": "tree", "parent": 183, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 27}}, {"id": 186, "type": "parameter_declaration", "text": "BTreeItem* item", "parent": 182, "children": [187, 188], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 44}}, {"id": 187, "type": "type_identifier", "text": "BTreeItem", "parent": 186, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 38}}, {"id": 188, "type": "pointer_declarator", "text": "* item", "parent": 186, "children": [189, 190], "start_point": {"row": 48, "column": 38}, "end_point": {"row": 48, "column": 44}}, {"id": 189, "type": "*", "text": "*", "parent": 188, "children": [], "start_point": {"row": 48, "column": 38}, "end_point": {"row": 48, "column": 39}}, {"id": 190, "type": "identifier", "text": "item", "parent": 188, "children": [], "start_point": {"row": 48, "column": 40}, "end_point": {"row": 48, "column": 44}}, {"id": 191, "type": "declaration", "text": "Node insert_right(Node parent, BTreeItem* item);", "parent": 0, "children": [192, 193], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 48}}, {"id": 192, "type": "type_identifier", "text": "Node", "parent": 191, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 4}}, {"id": 193, "type": "function_declarator", "text": "insert_right(Node parent, BTreeItem* item)", "parent": 191, "children": [194, 195], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 47}}, {"id": 194, "type": "identifier", "text": "insert_right", "parent": 193, "children": [], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 17}}, {"id": 195, "type": "parameter_list", "text": "(Node parent, BTreeItem* item)", "parent": 193, "children": [196, 199], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 47}}, {"id": 196, "type": "parameter_declaration", "text": "Node parent", "parent": 195, "children": [197, 198], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 29}}, {"id": 197, "type": "type_identifier", "text": "Node", "parent": 196, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 22}}, {"id": 198, "type": "identifier", "text": "parent", "parent": 196, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 29}}, {"id": 199, "type": "parameter_declaration", "text": "BTreeItem* item", "parent": 195, "children": [200, 201], "start_point": {"row": 49, "column": 31}, "end_point": {"row": 49, "column": 46}}, {"id": 200, "type": "type_identifier", "text": "BTreeItem", "parent": 199, "children": [], "start_point": {"row": 49, "column": 31}, "end_point": {"row": 49, "column": 40}}, {"id": 201, "type": "pointer_declarator", "text": "* item", "parent": 199, "children": [202, 203], "start_point": {"row": 49, "column": 40}, "end_point": {"row": 49, "column": 46}}, {"id": 202, "type": "*", "text": "*", "parent": 201, "children": [], "start_point": {"row": 49, "column": 40}, "end_point": {"row": 49, "column": 41}}, {"id": 203, "type": "identifier", "text": "item", "parent": 201, "children": [], "start_point": {"row": 49, "column": 42}, "end_point": {"row": 49, "column": 46}}, {"id": 204, "type": "declaration", "text": "Node insert_left(Node parent, BTreeItem* item);", "parent": 0, "children": [205, 206], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 47}}, {"id": 205, "type": "type_identifier", "text": "Node", "parent": 204, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 4}}, {"id": 206, "type": "function_declarator", "text": "insert_left(Node parent, BTreeItem* item)", "parent": 204, "children": [207, 208], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 46}}, {"id": 207, "type": "identifier", "text": "insert_left", "parent": 206, "children": [], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 16}}, {"id": 208, "type": "parameter_list", "text": "(Node parent, BTreeItem* item)", "parent": 206, "children": [209, 212], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 46}}, {"id": 209, "type": "parameter_declaration", "text": "Node parent", "parent": 208, "children": [210, 211], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 28}}, {"id": 210, "type": "type_identifier", "text": "Node", "parent": 209, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 21}}, {"id": 211, "type": "identifier", "text": "parent", "parent": 209, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 28}}, {"id": 212, "type": "parameter_declaration", "text": "BTreeItem* item", "parent": 208, "children": [213, 214], "start_point": {"row": 50, "column": 30}, "end_point": {"row": 50, "column": 45}}, {"id": 213, "type": "type_identifier", "text": "BTreeItem", "parent": 212, "children": [], "start_point": {"row": 50, "column": 30}, "end_point": {"row": 50, "column": 39}}, {"id": 214, "type": "pointer_declarator", "text": "* item", "parent": 212, "children": [215, 216], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 45}}, {"id": 215, "type": "*", "text": "*", "parent": 214, "children": [], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 40}}, {"id": 216, "type": "identifier", "text": "item", "parent": 214, "children": [], "start_point": {"row": 50, "column": 41}, "end_point": {"row": 50, "column": 45}}, {"id": 217, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}]}, "node_categories": {"declarations": {"functions": [107, 115, 123, 134, 142, 153, 161, 169, 180, 193, 206], "variables": [36, 52, 56, 60, 65, 68, 75, 83, 87, 93, 99, 105, 110, 113, 118, 121, 126, 129, 132, 137, 140, 145, 148, 151, 156, 159, 164, 167, 172, 175, 178, 183, 186, 191, 196, 199, 204, 209, 212], "classes": [54, 55, 62, 63, 69, 70, 76, 77, 85, 86], "imports": [6, 7, 9, 10], "modules": [], "enums": [38, 39, 40, 41, 45, 47, 49]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 14, 18, 22, 26, 30, 34, 42, 46, 48, 50, 51, 58, 59, 64, 66, 67, 71, 74, 78, 81, 82, 88, 91, 92, 95, 98, 101, 104, 108, 111, 112, 116, 119, 120, 124, 127, 128, 130, 131, 135, 138, 139, 143, 146, 147, 149, 150, 154, 157, 158, 162, 165, 166, 170, 173, 174, 176, 177, 179, 181, 184, 185, 187, 190, 192, 194, 197, 198, 200, 203, 205, 207, 210, 211, 213, 216, 217], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 44], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "init(BTree tree)"}, {"node_id": 115, "universal_type": "function", "name": "unknown", "text_snippet": "is_empty(BTree tree)"}, {"node_id": 123, "universal_type": "function", "name": "unknown", "text_snippet": "is_root(BTree tree, Node node)"}, {"node_id": 134, "universal_type": "function", "name": "unknown", "text_snippet": "is_leaf(Node node)"}, {"node_id": 142, "universal_type": "function", "name": "unknown", "text_snippet": "node_depth(BTree tree, Node node)"}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "node_height(Node node)"}, {"node_id": 161, "universal_type": "function", "name": "unknown", "text_snippet": "node_degree(Node node)"}, {"node_id": 169, "universal_type": "function", "name": "unknown", "text_snippet": "traverse(BTree tree, TraverseType type)"}, {"node_id": 180, "universal_type": "function", "name": "unknown", "text_snippet": "create_root(BTree tree, BTreeItem* item)"}, {"node_id": 193, "universal_type": "function", "name": "unknown", "text_snippet": "insert_right(Node parent, BTreeItem* item)"}, {"node_id": 206, "universal_type": "function", "name": "unknown", "text_snippet": "insert_left(Node parent, BTreeItem* item)"}], "class_declarations": [{"node_id": 54, "universal_type": "class", "name": "{", "text_snippet": "struct {\n char c;\n}"}, {"node_id": 55, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 62, "universal_type": "class", "name": "_node", "text_snippet": "struct _node {\n BTreeItem item;\n struct _node* right;\n struct _node* left;\n}"}, {"node_id": 63, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 69, "universal_type": "class", "name": "_node", "text_snippet": "struct _node"}, {"node_id": 70, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 76, "universal_type": "class", "name": "_node", "text_snippet": "struct _node"}, {"node_id": 77, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 85, "universal_type": "class", "name": "{", "text_snippet": "struct {\n _node* root;\n}"}, {"node_id": 86, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <stdio.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <stdlib.h>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#ifndef BTREE_H\n#define BTREE_H\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#define false 0\n#define true 1\n#define nil NULL\n#define and &&\n#define or ||\n#define is == \n\ntypedef enum {\n PRE_ORDER = 1,\n IN_ORDER,\n POST_ORDER,\n LEVEL_ORDER\n} TraverseType;\n\ntypedef struct {\n char c;\n} BTreeItem;\n\ntypedef struct _node {\n BTreeItem item;\n struct _node* right;\n struct _node* left;\n} _node;\n\ntypedef struct {\n _node* root;\n} _btree;\n\ntypedef _node* Node;\ntypedef _btree* BTree;\n\nvoid init(BTree tree);\nint is_empty(BTree tree);\nint is_root(BTree tree, Node node);\nint is_leaf(Node node);\n\nint node_depth(BTree tree, Node node);\nint node_height(Node node);\nint node_degree(Node node);\n\nvoid traverse(BTree tree, TraverseType type);\n\nNode create_root(BTree tree, BTreeItem* item);\nNode insert_right(Node parent, BTreeItem* item);\nNode insert_left(Node parent, BTreeItem* item);\n\n#endif "}
322
c
/** * @file base_mesh.h * @brief This is the base classes of mesh, which describe ordered and indexed * data sets. Depending on application, there are different data * saved on the mesh. The intersection points of mesh lines are called * grid points, the element enclosed by mesh lines (2D) or faces (3D) called * cells. The mesh line or face are also called cell faces. Grid points are * also called cell corners. * @author <NAME>, <NAME> and <NAME> * @version 0.1 */ #pragma once #include "base_data_package.h" #include <fstream> using namespace std; namespace SPH { /** * @class Mesh * @brief Abstract base class for defining basic mesh prpoerties. * The mesh is proposed for several functions. * First, it is used in cell linked list for neighbor search. * Second, it is used for background maps such as level sets. * This class is the counterpart of the class particles. */ class Mesh { protected: /** buffer to avoid bound check */ size_t buffer_size_; /** bounds */ Vecd mesh_lower_bound_, mesh_upper_bound_; /** grid spcing */ Real grid_spacing_; /** number grid points by dimension */ Vecu number_of_grid_points_; /** computing number of total lattices */ Vecu CalcNumberOfGridPoints(); public: /** Constructor */ Mesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0); virtual ~Mesh() {}; /** accesss protected variables */ Vecd GetLowerBound() { return mesh_lower_bound_; }; Vecd GetUpperBound() { return mesh_upper_bound_; }; Real GetGridSpacing() { return grid_spacing_; }; Vecu GetNumberOfGridPoints() { return number_of_grid_points_; }; /** allcate memories for mesh data */ virtual void AllocateMeshDataMatrix() = 0; /** delete memories for mesh data */ virtual void DeleteMeshDataMatrix() = 0; /** find grid indexes from point poistion */ Vecu GridIndexesFromPosition(Vecd position); /** find grid poistion from indexes */ Vecd GridPositionFromIndexes(Vecu gird_indexes); /** Find cell position from indexes. * It is the position shift in the upper-right direction half grid size */ Vecd CellPositionFromIndexes(Vecu cell_indexes); /** output mesh data for Paraview visuallization */ virtual void WriteMeshToVtuFile(ofstream &output_file) = 0; /** output mesh data for Tecplot visuallization */ virtual void WriteMeshToPltFile(ofstream &output_file) = 0; }; /** * @class BackgroundData * @brief Data for background mesh. * Describing complex geometrics using level set, * which is the distance to the surface of the geometry * and the direction leads to the nearest point on the surface */ class BackgroundData { public: /** Empty constructor */ BackgroundData() {}; BackgroundData(Real level_set, Vecd normal_direction); virtual ~BackgroundData() {}; /** level set is the signed distance to * an interface, here, the surface of a body */ Real phi_; /** displacment to the surface */ Vecd n_; /** curvature */ Real kappa_; }; /** * @class MeshBackground * @brief Background mesh for inital particle relaxation. */ class MeshBackground : public Mesh { /** base mesh data */ matrix_grid mesh_background_data_; public: MeshBackground(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0); virtual ~MeshBackground() {}; /** allocate memories for mesh data */ virtual void AllocateMeshDataMatrix() override; /** delete memories for mesh data */ virtual void DeleteMeshDataMatrix() override; /** initialize level set and displacement to surface * for body region geometry */ void InitializeLevelSetData(SPHBody &body); void ComputeCurvatureFromLevelSet(SPHBody &body); /** probe the base mesh data */ Vecd ProbeNormalDirection(Vecd Point); Real ProbeLevelSet(Vecd Point); Real ProbeCurvature(Vecd Point); /** output mesh data for visuallization */ virtual void WriteMeshToVtuFile(ofstream &output_file) override; virtual void WriteMeshToPltFile(ofstream &output_file) override; }; }
34.88
113
(translation_unit) "/**\n* @file base_mesh.h\n* @brief This is the base classes of mesh, which describe ordered and indexed\n* data sets. Depending on application, there are different data \n* saved on the mesh. The intersection points of mesh lines are called \n* grid points, the element enclosed by mesh lines (2D) or faces (3D) called \n* cells. The mesh line or face are also called cell faces. Grid points are\n* also called cell corners.\n* @author <NAME>, <NAME> and <NAME>\n* @version 0.1\n*/\n\n#pragma once\n\n#include "base_data_package.h"\n\n#include <fstream>\n\nusing namespace std;\n\nnamespace SPH {\n\n /**\n * @class Mesh\n * @brief Abstract base class for defining basic mesh prpoerties.\n * The mesh is proposed for several functions.\n * First, it is used in cell linked list for neighbor search.\n * Second, it is used for background maps such as level sets.\n * This class is the counterpart of the class particles.\n */\n class Mesh\n {\n\n protected:\n /** buffer to avoid bound check */\n size_t buffer_size_;\n /** bounds */\n Vecd mesh_lower_bound_, mesh_upper_bound_;\n /** grid spcing */\n Real grid_spacing_;\n /** number grid points by dimension */\n Vecu number_of_grid_points_;\n\n /** computing number of total lattices */\n Vecu CalcNumberOfGridPoints();\n public:\n /** Constructor */\n Mesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);\n virtual ~Mesh() {};\n\n /** accesss protected variables */\n Vecd GetLowerBound() { return mesh_lower_bound_; };\n Vecd GetUpperBound() { return mesh_upper_bound_; };\n Real GetGridSpacing() { return grid_spacing_; };\n Vecu GetNumberOfGridPoints() { return number_of_grid_points_; };\n\n /** allcate memories for mesh data */\n virtual void AllocateMeshDataMatrix() = 0;\n /** delete memories for mesh data */\n virtual void DeleteMeshDataMatrix() = 0;\n\n /** find grid indexes from point poistion */\n Vecu GridIndexesFromPosition(Vecd position);\n /** find grid poistion from indexes */\n Vecd GridPositionFromIndexes(Vecu gird_indexes);\n /** Find cell position from indexes.\n * It is the position shift in the upper-right direction half grid size */\n Vecd CellPositionFromIndexes(Vecu cell_indexes);\n\n /** output mesh data for Paraview visuallization */\n virtual void WriteMeshToVtuFile(ofstream &output_file) = 0;\n /** output mesh data for Tecplot visuallization */\n virtual void WriteMeshToPltFile(ofstream &output_file) = 0;\n\n };\n\n /**\n * @class BackgroundData\n * @brief Data for background mesh.\n * Describing complex geometrics using level set, \n * which is the distance to the surface of the geometry \n * and the direction leads to the nearest point on the surface \n */\n class BackgroundData\n {\n public:\n /** Empty constructor */\n BackgroundData() {};\n BackgroundData(Real level_set, Vecd normal_direction);\n virtual ~BackgroundData() {};\n\n /** level set is the signed distance to\n * an interface, here, the surface of a body */\n Real phi_;\n /** displacment to the surface */\n Vecd n_;\n /** curvature */\n Real kappa_;\n };\n\n /**\n * @class MeshBackground\n * @brief Background mesh for inital particle relaxation.\n */\n class MeshBackground : public Mesh\n {\n /** base mesh data */\n matrix_grid mesh_background_data_;\n\n public:\n MeshBackground(Vecd lower_bound, Vecd upper_bound, \n Real grid_spacing, size_t buffer_size = 0);\n virtual ~MeshBackground() {};\n\n /** allocate memories for mesh data */\n virtual void AllocateMeshDataMatrix() override;\n /** delete memories for mesh data */\n virtual void DeleteMeshDataMatrix() override;\n\n /** initialize level set and displacement to surface\n * for body region geometry */\n void InitializeLevelSetData(SPHBody &body);\n void ComputeCurvatureFromLevelSet(SPHBody &body);\n /** probe the base mesh data */\n Vecd ProbeNormalDirection(Vecd Point);\n Real ProbeLevelSet(Vecd Point);\n Real ProbeCurvature(Vecd Point);\n\n /** output mesh data for visuallization */\n virtual void WriteMeshToVtuFile(ofstream &output_file) override;\n virtual void WriteMeshToPltFile(ofstream &output_file) override;\n };\n}\n" (comment) "/**\n* @file base_mesh.h\n* @brief This is the base classes of mesh, which describe ordered and indexed\n* data sets. Depending on application, there are different data \n* saved on the mesh. The intersection points of mesh lines are called \n* grid points, the element enclosed by mesh lines (2D) or faces (3D) called \n* cells. The mesh line or face are also called cell faces. Grid points are\n* also called cell corners.\n* @author <NAME>, <NAME> and <NAME>\n* @version 0.1\n*/" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "base_data_package.h"\n" (#include) "#include" (string_literal) ""base_data_package.h"" (") """ (string_content) "base_data_package.h" (") """ (preproc_include) "#include <fstream>\n" (#include) "#include" (system_lib_string) "<fstream>" (declaration) "using namespace std;" (type_identifier) "using" (identifier) "namespace" (ERROR) "std" (identifier) "std" (;) ";" (function_definition) "namespace SPH {\n\n /**\n * @class Mesh\n * @brief Abstract base class for defining basic mesh prpoerties.\n * The mesh is proposed for several functions.\n * First, it is used in cell linked list for neighbor search.\n * Second, it is used for background maps such as level sets.\n * This class is the counterpart of the class particles.\n */\n class Mesh\n {\n\n protected:\n /** buffer to avoid bound check */\n size_t buffer_size_;\n /** bounds */\n Vecd mesh_lower_bound_, mesh_upper_bound_;\n /** grid spcing */\n Real grid_spacing_;\n /** number grid points by dimension */\n Vecu number_of_grid_points_;\n\n /** computing number of total lattices */\n Vecu CalcNumberOfGridPoints();\n public:\n /** Constructor */\n Mesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);\n virtual ~Mesh() {};\n\n /** accesss protected variables */\n Vecd GetLowerBound() { return mesh_lower_bound_; };\n Vecd GetUpperBound() { return mesh_upper_bound_; };\n Real GetGridSpacing() { return grid_spacing_; };\n Vecu GetNumberOfGridPoints() { return number_of_grid_points_; };\n\n /** allcate memories for mesh data */\n virtual void AllocateMeshDataMatrix() = 0;\n /** delete memories for mesh data */\n virtual void DeleteMeshDataMatrix() = 0;\n\n /** find grid indexes from point poistion */\n Vecu GridIndexesFromPosition(Vecd position);\n /** find grid poistion from indexes */\n Vecd GridPositionFromIndexes(Vecu gird_indexes);\n /** Find cell position from indexes.\n * It is the position shift in the upper-right direction half grid size */\n Vecd CellPositionFromIndexes(Vecu cell_indexes);\n\n /** output mesh data for Paraview visuallization */\n virtual void WriteMeshToVtuFile(ofstream &output_file) = 0;\n /** output mesh data for Tecplot visuallization */\n virtual void WriteMeshToPltFile(ofstream &output_file) = 0;\n\n };\n\n /**\n * @class BackgroundData\n * @brief Data for background mesh.\n * Describing complex geometrics using level set, \n * which is the distance to the surface of the geometry \n * and the direction leads to the nearest point on the surface \n */\n class BackgroundData\n {\n public:\n /** Empty constructor */\n BackgroundData() {};\n BackgroundData(Real level_set, Vecd normal_direction);\n virtual ~BackgroundData() {};\n\n /** level set is the signed distance to\n * an interface, here, the surface of a body */\n Real phi_;\n /** displacment to the surface */\n Vecd n_;\n /** curvature */\n Real kappa_;\n };\n\n /**\n * @class MeshBackground\n * @brief Background mesh for inital particle relaxation.\n */\n class MeshBackground : public Mesh\n {\n /** base mesh data */\n matrix_grid mesh_background_data_;\n\n public:\n MeshBackground(Vecd lower_bound, Vecd upper_bound, \n Real grid_spacing, size_t buffer_size = 0);\n virtual ~MeshBackground() {};\n\n /** allocate memories for mesh data */\n virtual void AllocateMeshDataMatrix() override;\n /** delete memories for mesh data */\n virtual void DeleteMeshDataMatrix() override;\n\n /** initialize level set and displacement to surface\n * for body region geometry */\n void InitializeLevelSetData(SPHBody &body);\n void ComputeCurvatureFromLevelSet(SPHBody &body);\n /** probe the base mesh data */\n Vecd ProbeNormalDirection(Vecd Point);\n Real ProbeLevelSet(Vecd Point);\n Real ProbeCurvature(Vecd Point);\n\n /** output mesh data for visuallization */\n virtual void WriteMeshToVtuFile(ofstream &output_file) override;\n virtual void WriteMeshToPltFile(ofstream &output_file) override;\n };\n}" (type_identifier) "namespace" (identifier) "SPH" (compound_statement) "{\n\n /**\n * @class Mesh\n * @brief Abstract base class for defining basic mesh prpoerties.\n * The mesh is proposed for several functions.\n * First, it is used in cell linked list for neighbor search.\n * Second, it is used for background maps such as level sets.\n * This class is the counterpart of the class particles.\n */\n class Mesh\n {\n\n protected:\n /** buffer to avoid bound check */\n size_t buffer_size_;\n /** bounds */\n Vecd mesh_lower_bound_, mesh_upper_bound_;\n /** grid spcing */\n Real grid_spacing_;\n /** number grid points by dimension */\n Vecu number_of_grid_points_;\n\n /** computing number of total lattices */\n Vecu CalcNumberOfGridPoints();\n public:\n /** Constructor */\n Mesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);\n virtual ~Mesh() {};\n\n /** accesss protected variables */\n Vecd GetLowerBound() { return mesh_lower_bound_; };\n Vecd GetUpperBound() { return mesh_upper_bound_; };\n Real GetGridSpacing() { return grid_spacing_; };\n Vecu GetNumberOfGridPoints() { return number_of_grid_points_; };\n\n /** allcate memories for mesh data */\n virtual void AllocateMeshDataMatrix() = 0;\n /** delete memories for mesh data */\n virtual void DeleteMeshDataMatrix() = 0;\n\n /** find grid indexes from point poistion */\n Vecu GridIndexesFromPosition(Vecd position);\n /** find grid poistion from indexes */\n Vecd GridPositionFromIndexes(Vecu gird_indexes);\n /** Find cell position from indexes.\n * It is the position shift in the upper-right direction half grid size */\n Vecd CellPositionFromIndexes(Vecu cell_indexes);\n\n /** output mesh data for Paraview visuallization */\n virtual void WriteMeshToVtuFile(ofstream &output_file) = 0;\n /** output mesh data for Tecplot visuallization */\n virtual void WriteMeshToPltFile(ofstream &output_file) = 0;\n\n };\n\n /**\n * @class BackgroundData\n * @brief Data for background mesh.\n * Describing complex geometrics using level set, \n * which is the distance to the surface of the geometry \n * and the direction leads to the nearest point on the surface \n */\n class BackgroundData\n {\n public:\n /** Empty constructor */\n BackgroundData() {};\n BackgroundData(Real level_set, Vecd normal_direction);\n virtual ~BackgroundData() {};\n\n /** level set is the signed distance to\n * an interface, here, the surface of a body */\n Real phi_;\n /** displacment to the surface */\n Vecd n_;\n /** curvature */\n Real kappa_;\n };\n\n /**\n * @class MeshBackground\n * @brief Background mesh for inital particle relaxation.\n */\n class MeshBackground : public Mesh\n {\n /** base mesh data */\n matrix_grid mesh_background_data_;\n\n public:\n MeshBackground(Vecd lower_bound, Vecd upper_bound, \n Real grid_spacing, size_t buffer_size = 0);\n virtual ~MeshBackground() {};\n\n /** allocate memories for mesh data */\n virtual void AllocateMeshDataMatrix() override;\n /** delete memories for mesh data */\n virtual void DeleteMeshDataMatrix() override;\n\n /** initialize level set and displacement to surface\n * for body region geometry */\n void InitializeLevelSetData(SPHBody &body);\n void ComputeCurvatureFromLevelSet(SPHBody &body);\n /** probe the base mesh data */\n Vecd ProbeNormalDirection(Vecd Point);\n Real ProbeLevelSet(Vecd Point);\n Real ProbeCurvature(Vecd Point);\n\n /** output mesh data for visuallization */\n virtual void WriteMeshToVtuFile(ofstream &output_file) override;\n virtual void WriteMeshToPltFile(ofstream &output_file) override;\n };\n}" ({) "{" (comment) "/**\n * @class Mesh\n * @brief Abstract base class for defining basic mesh prpoerties.\n * The mesh is proposed for several functions.\n * First, it is used in cell linked list for neighbor search.\n * Second, it is used for background maps such as level sets.\n * This class is the counterpart of the class particles.\n */" (function_definition) "class Mesh\n {\n\n protected:\n /** buffer to avoid bound check */\n size_t buffer_size_;\n /** bounds */\n Vecd mesh_lower_bound_, mesh_upper_bound_;\n /** grid spcing */\n Real grid_spacing_;\n /** number grid points by dimension */\n Vecu number_of_grid_points_;\n\n /** computing number of total lattices */\n Vecu CalcNumberOfGridPoints();\n public:\n /** Constructor */\n Mesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);\n virtual ~Mesh() {};\n\n /** accesss protected variables */\n Vecd GetLowerBound() { return mesh_lower_bound_; };\n Vecd GetUpperBound() { return mesh_upper_bound_; };\n Real GetGridSpacing() { return grid_spacing_; };\n Vecu GetNumberOfGridPoints() { return number_of_grid_points_; };\n\n /** allcate memories for mesh data */\n virtual void AllocateMeshDataMatrix() = 0;\n /** delete memories for mesh data */\n virtual void DeleteMeshDataMatrix() = 0;\n\n /** find grid indexes from point poistion */\n Vecu GridIndexesFromPosition(Vecd position);\n /** find grid poistion from indexes */\n Vecd GridPositionFromIndexes(Vecu gird_indexes);\n /** Find cell position from indexes.\n * It is the position shift in the upper-right direction half grid size */\n Vecd CellPositionFromIndexes(Vecu cell_indexes);\n\n /** output mesh data for Paraview visuallization */\n virtual void WriteMeshToVtuFile(ofstream &output_file) = 0;\n /** output mesh data for Tecplot visuallization */\n virtual void WriteMeshToPltFile(ofstream &output_file) = 0;\n\n }" (type_identifier) "class" (identifier) "Mesh" (compound_statement) "{\n\n protected:\n /** buffer to avoid bound check */\n size_t buffer_size_;\n /** bounds */\n Vecd mesh_lower_bound_, mesh_upper_bound_;\n /** grid spcing */\n Real grid_spacing_;\n /** number grid points by dimension */\n Vecu number_of_grid_points_;\n\n /** computing number of total lattices */\n Vecu CalcNumberOfGridPoints();\n public:\n /** Constructor */\n Mesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);\n virtual ~Mesh() {};\n\n /** accesss protected variables */\n Vecd GetLowerBound() { return mesh_lower_bound_; };\n Vecd GetUpperBound() { return mesh_upper_bound_; };\n Real GetGridSpacing() { return grid_spacing_; };\n Vecu GetNumberOfGridPoints() { return number_of_grid_points_; };\n\n /** allcate memories for mesh data */\n virtual void AllocateMeshDataMatrix() = 0;\n /** delete memories for mesh data */\n virtual void DeleteMeshDataMatrix() = 0;\n\n /** find grid indexes from point poistion */\n Vecu GridIndexesFromPosition(Vecd position);\n /** find grid poistion from indexes */\n Vecd GridPositionFromIndexes(Vecu gird_indexes);\n /** Find cell position from indexes.\n * It is the position shift in the upper-right direction half grid size */\n Vecd CellPositionFromIndexes(Vecu cell_indexes);\n\n /** output mesh data for Paraview visuallization */\n virtual void WriteMeshToVtuFile(ofstream &output_file) = 0;\n /** output mesh data for Tecplot visuallization */\n virtual void WriteMeshToPltFile(ofstream &output_file) = 0;\n\n }" ({) "{" (labeled_statement) "protected:\n /** buffer to avoid bound check */\n size_t buffer_size_;" (statement_identifier) "protected" (:) ":" (comment) "/** buffer to avoid bound check */" (declaration) "size_t buffer_size_;" (primitive_type) "size_t" (identifier) "buffer_size_" (;) ";" (comment) "/** bounds */" (declaration) "Vecd mesh_lower_bound_, mesh_upper_bound_;" (type_identifier) "Vecd" (identifier) "mesh_lower_bound_" (,) "," (identifier) "mesh_upper_bound_" (;) ";" (comment) "/** grid spcing */" (declaration) "Real grid_spacing_;" (type_identifier) "Real" (identifier) "grid_spacing_" (;) ";" (comment) "/** number grid points by dimension */" (declaration) "Vecu number_of_grid_points_;" (type_identifier) "Vecu" (identifier) "number_of_grid_points_" (;) ";" (comment) "/** computing number of total lattices */" (declaration) "Vecu CalcNumberOfGridPoints();" (type_identifier) "Vecu" (function_declarator) "CalcNumberOfGridPoints()" (identifier) "CalcNumberOfGridPoints" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "public:\n /** Constructor */\n Mesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);" (statement_identifier) "public" (:) ":" (comment) "/** Constructor */" (declaration) "Mesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);" (macro_type_specifier) "Mesh(Vecd" (identifier) "Mesh" (() "(" (type_descriptor) "Vecd" (type_identifier) "Vecd" ()) "" (identifier) "lower_bound" (,) "," (ERROR) "Vecd" (identifier) "Vecd" (identifier) "upper_bound" (,) "," (ERROR) "Real" (identifier) "Real" (identifier) "grid_spacing" (,) "," (ERROR) "size_t" (identifier) "size_t" (init_declarator) "buffer_size = 0" (identifier) "buffer_size" (=) "=" (number_literal) "0" (ERROR) ")" ()) ")" (;) ";" (function_definition) "virtual ~Mesh() {}" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "Mesh()" (identifier) "Mesh" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (comment) "/** accesss protected variables */" (function_definition) "Vecd GetLowerBound() { return mesh_lower_bound_; }" (type_identifier) "Vecd" (function_declarator) "GetLowerBound()" (identifier) "GetLowerBound" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return mesh_lower_bound_; }" ({) "{" (return_statement) "return mesh_lower_bound_;" (return) "return" (identifier) "mesh_lower_bound_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "Vecd GetUpperBound() { return mesh_upper_bound_; }" (type_identifier) "Vecd" (function_declarator) "GetUpperBound()" (identifier) "GetUpperBound" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return mesh_upper_bound_; }" ({) "{" (return_statement) "return mesh_upper_bound_;" (return) "return" (identifier) "mesh_upper_bound_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "Real GetGridSpacing() { return grid_spacing_; }" (type_identifier) "Real" (function_declarator) "GetGridSpacing()" (identifier) "GetGridSpacing" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return grid_spacing_; }" ({) "{" (return_statement) "return grid_spacing_;" (return) "return" (identifier) "grid_spacing_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "Vecu GetNumberOfGridPoints() { return number_of_grid_points_; }" (type_identifier) "Vecu" (function_declarator) "GetNumberOfGridPoints()" (identifier) "GetNumberOfGridPoints" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return number_of_grid_points_; }" ({) "{" (return_statement) "return number_of_grid_points_;" (return) "return" (identifier) "number_of_grid_points_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "/** allcate memories for mesh data */" (declaration) "virtual void AllocateMeshDataMatrix() = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "AllocateMeshDataMatrix() = 0" (function_declarator) "AllocateMeshDataMatrix()" (identifier) "AllocateMeshDataMatrix" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/** delete memories for mesh data */" (declaration) "virtual void DeleteMeshDataMatrix() = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "DeleteMeshDataMatrix() = 0" (function_declarator) "DeleteMeshDataMatrix()" (identifier) "DeleteMeshDataMatrix" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/** find grid indexes from point poistion */" (declaration) "Vecu GridIndexesFromPosition(Vecd position);" (type_identifier) "Vecu" (function_declarator) "GridIndexesFromPosition(Vecd position)" (identifier) "GridIndexesFromPosition" (parameter_list) "(Vecd position)" (() "(" (parameter_declaration) "Vecd position" (type_identifier) "Vecd" (identifier) "position" ()) ")" (;) ";" (comment) "/** find grid poistion from indexes */" (declaration) "Vecd GridPositionFromIndexes(Vecu gird_indexes);" (type_identifier) "Vecd" (function_declarator) "GridPositionFromIndexes(Vecu gird_indexes)" (identifier) "GridPositionFromIndexes" (parameter_list) "(Vecu gird_indexes)" (() "(" (parameter_declaration) "Vecu gird_indexes" (type_identifier) "Vecu" (identifier) "gird_indexes" ()) ")" (;) ";" (comment) "/** Find cell position from indexes.\n * It is the position shift in the upper-right direction half grid size */" (declaration) "Vecd CellPositionFromIndexes(Vecu cell_indexes);" (type_identifier) "Vecd" (function_declarator) "CellPositionFromIndexes(Vecu cell_indexes)" (identifier) "CellPositionFromIndexes" (parameter_list) "(Vecu cell_indexes)" (() "(" (parameter_declaration) "Vecu cell_indexes" (type_identifier) "Vecu" (identifier) "cell_indexes" ()) ")" (;) ";" (comment) "/** output mesh data for Paraview visuallization */" (declaration) "virtual void" (type_identifier) "virtual" (identifier) "void" (;) "" (expression_statement) "WriteMeshToVtuFile(ofstream &output_file) = 0;" (assignment_expression) "WriteMeshToVtuFile(ofstream &output_file) = 0" (call_expression) "WriteMeshToVtuFile(ofstream &output_file)" (identifier) "WriteMeshToVtuFile" (argument_list) "(ofstream &output_file)" (() "(" (binary_expression) "ofstream &output_file" (identifier) "ofstream" (&) "&" (identifier) "output_file" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/** output mesh data for Tecplot visuallization */" (declaration) "virtual void" (type_identifier) "virtual" (identifier) "void" (;) "" (expression_statement) "WriteMeshToPltFile(ofstream &output_file) = 0;" (assignment_expression) "WriteMeshToPltFile(ofstream &output_file) = 0" (call_expression) "WriteMeshToPltFile(ofstream &output_file)" (identifier) "WriteMeshToPltFile" (argument_list) "(ofstream &output_file)" (() "(" (binary_expression) "ofstream &output_file" (identifier) "ofstream" (&) "&" (identifier) "output_file" ()) ")" (=) "=" (number_literal) "0" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "/**\n * @class BackgroundData\n * @brief Data for background mesh.\n * Describing complex geometrics using level set, \n * which is the distance to the surface of the geometry \n * and the direction leads to the nearest point on the surface \n */" (function_definition) "class BackgroundData\n {\n public:\n /** Empty constructor */\n BackgroundData() {};\n BackgroundData(Real level_set, Vecd normal_direction);\n virtual ~BackgroundData() {};\n\n /** level set is the signed distance to\n * an interface, here, the surface of a body */\n Real phi_;\n /** displacment to the surface */\n Vecd n_;\n /** curvature */\n Real kappa_;\n }" (type_identifier) "class" (identifier) "BackgroundData" (compound_statement) "{\n public:\n /** Empty constructor */\n BackgroundData() {};\n BackgroundData(Real level_set, Vecd normal_direction);\n virtual ~BackgroundData() {};\n\n /** level set is the signed distance to\n * an interface, here, the surface of a body */\n Real phi_;\n /** displacment to the surface */\n Vecd n_;\n /** curvature */\n Real kappa_;\n }" ({) "{" (labeled_statement) "public:\n /** Empty constructor */\n BackgroundData()" (statement_identifier) "public" (:) ":" (comment) "/** Empty constructor */" (expression_statement) "BackgroundData()" (call_expression) "BackgroundData()" (identifier) "BackgroundData" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (declaration) "BackgroundData(Real level_set, Vecd normal_direction);" (macro_type_specifier) "BackgroundData(Real" (identifier) "BackgroundData" (() "(" (type_descriptor) "Real" (type_identifier) "Real" ()) "" (identifier) "level_set" (,) "," (identifier) "Vecd" (ERROR) "normal_direction)" (identifier) "normal_direction" ()) ")" (;) ";" (function_definition) "virtual ~BackgroundData() {}" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "BackgroundData()" (identifier) "BackgroundData" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (comment) "/** level set is the signed distance to\n * an interface, here, the surface of a body */" (declaration) "Real phi_;" (type_identifier) "Real" (identifier) "phi_" (;) ";" (comment) "/** displacment to the surface */" (declaration) "Vecd n_;" (type_identifier) "Vecd" (identifier) "n_" (;) ";" (comment) "/** curvature */" (declaration) "Real kappa_;" (type_identifier) "Real" (identifier) "kappa_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "/**\n * @class MeshBackground\n * @brief Background mesh for inital particle relaxation.\n */" (function_definition) "class MeshBackground : public Mesh\n {\n /** base mesh data */\n matrix_grid mesh_background_data_;\n\n public:\n MeshBackground(Vecd lower_bound, Vecd upper_bound, \n Real grid_spacing, size_t buffer_size = 0);\n virtual ~MeshBackground() {};\n\n /** allocate memories for mesh data */\n virtual void AllocateMeshDataMatrix() override;\n /** delete memories for mesh data */\n virtual void DeleteMeshDataMatrix() override;\n\n /** initialize level set and displacement to surface\n * for body region geometry */\n void InitializeLevelSetData(SPHBody &body);\n void ComputeCurvatureFromLevelSet(SPHBody &body);\n /** probe the base mesh data */\n Vecd ProbeNormalDirection(Vecd Point);\n Real ProbeLevelSet(Vecd Point);\n Real ProbeCurvature(Vecd Point);\n\n /** output mesh data for visuallization */\n virtual void WriteMeshToVtuFile(ofstream &output_file) override;\n virtual void WriteMeshToPltFile(ofstream &output_file) override;\n }" (type_identifier) "class" (identifier) "MeshBackground" (ERROR) ": public Mesh" (:) ":" (identifier) "public" (identifier) "Mesh" (compound_statement) "{\n /** base mesh data */\n matrix_grid mesh_background_data_;\n\n public:\n MeshBackground(Vecd lower_bound, Vecd upper_bound, \n Real grid_spacing, size_t buffer_size = 0);\n virtual ~MeshBackground() {};\n\n /** allocate memories for mesh data */\n virtual void AllocateMeshDataMatrix() override;\n /** delete memories for mesh data */\n virtual void DeleteMeshDataMatrix() override;\n\n /** initialize level set and displacement to surface\n * for body region geometry */\n void InitializeLevelSetData(SPHBody &body);\n void ComputeCurvatureFromLevelSet(SPHBody &body);\n /** probe the base mesh data */\n Vecd ProbeNormalDirection(Vecd Point);\n Real ProbeLevelSet(Vecd Point);\n Real ProbeCurvature(Vecd Point);\n\n /** output mesh data for visuallization */\n virtual void WriteMeshToVtuFile(ofstream &output_file) override;\n virtual void WriteMeshToPltFile(ofstream &output_file) override;\n }" ({) "{" (comment) "/** base mesh data */" (declaration) "matrix_grid mesh_background_data_;" (type_identifier) "matrix_grid" (identifier) "mesh_background_data_" (;) ";" (labeled_statement) "public:\n MeshBackground(Vecd lower_bound, Vecd upper_bound, \n Real grid_spacing, size_t buffer_size = 0);" (statement_identifier) "public" (:) ":" (declaration) "MeshBackground(Vecd lower_bound, Vecd upper_bound, \n Real grid_spacing, size_t buffer_size = 0);" (macro_type_specifier) "MeshBackground(Vecd" (identifier) "MeshBackground" (() "(" (type_descriptor) "Vecd" (type_identifier) "Vecd" ()) "" (identifier) "lower_bound" (,) "," (ERROR) "Vecd" (identifier) "Vecd" (identifier) "upper_bound" (,) "," (ERROR) "Real" (identifier) "Real" (identifier) "grid_spacing" (,) "," (ERROR) "size_t" (identifier) "size_t" (init_declarator) "buffer_size = 0" (identifier) "buffer_size" (=) "=" (number_literal) "0" (ERROR) ")" ()) ")" (;) ";" (function_definition) "virtual ~MeshBackground() {}" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "MeshBackground()" (identifier) "MeshBackground" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (comment) "/** allocate memories for mesh data */" (ERROR) "virtual void AllocateMeshDataMatrix() override;\n /** delete memories for mesh data */\n virtual void DeleteMeshDataMatrix() override;\n\n /** initialize level set and displacement to surface\n * for body region geometry */\n void InitializeLevelSetData(SPHBody &body);\n void ComputeCurvatureFromLevelSet(SPHBody &body);\n /** probe the base mesh data */\n Vecd ProbeNormalDirection(Vecd Point);\n Real ProbeLevelSet(Vecd Point);\n Real ProbeCurvature(Vecd Point);\n\n /** output mesh data for visuallization */\n virtual void WriteMeshToVtuFile(ofstream &output_file) override;\n virtual void WriteMeshToPltFile(ofstream &output_file) override" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "AllocateMeshDataMatrix()" (identifier) "AllocateMeshDataMatrix" (parameter_list) "()" (() "(" ()) ")" (declaration) "override;" (type_identifier) "override" (identifier) "" (;) ";" (comment) "/** delete memories for mesh data */" (ERROR) "virtual void DeleteMeshDataMatrix() override;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "DeleteMeshDataMatrix() override" (identifier) "DeleteMeshDataMatrix" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (comment) "/** initialize level set and displacement to surface\n * for body region geometry */" (declaration) "void InitializeLevelSetData(SPHBody &body);" (primitive_type) "void" (function_declarator) "InitializeLevelSetData(SPHBody &body)" (identifier) "InitializeLevelSetData" (parameter_list) "(SPHBody &body)" (() "(" (parameter_declaration) "SPHBody &body" (type_identifier) "SPHBody" (ERROR) "&" (&) "&" (identifier) "body" ()) ")" (;) ";" (declaration) "void ComputeCurvatureFromLevelSet(SPHBody &body);" (primitive_type) "void" (function_declarator) "ComputeCurvatureFromLevelSet(SPHBody &body)" (identifier) "ComputeCurvatureFromLevelSet" (parameter_list) "(SPHBody &body)" (() "(" (parameter_declaration) "SPHBody &body" (type_identifier) "SPHBody" (ERROR) "&" (&) "&" (identifier) "body" ()) ")" (;) ";" (comment) "/** probe the base mesh data */" (declaration) "Vecd ProbeNormalDirection(Vecd Point);" (type_identifier) "Vecd" (function_declarator) "ProbeNormalDirection(Vecd Point)" (identifier) "ProbeNormalDirection" (parameter_list) "(Vecd Point)" (() "(" (parameter_declaration) "Vecd Point" (type_identifier) "Vecd" (identifier) "Point" ()) ")" (;) ";" (declaration) "Real ProbeLevelSet(Vecd Point);" (type_identifier) "Real" (function_declarator) "ProbeLevelSet(Vecd Point)" (identifier) "ProbeLevelSet" (parameter_list) "(Vecd Point)" (() "(" (parameter_declaration) "Vecd Point" (type_identifier) "Vecd" (identifier) "Point" ()) ")" (;) ";" (declaration) "Real ProbeCurvature(Vecd Point);" (type_identifier) "Real" (function_declarator) "ProbeCurvature(Vecd Point)" (identifier) "ProbeCurvature" (parameter_list) "(Vecd Point)" (() "(" (parameter_declaration) "Vecd Point" (type_identifier) "Vecd" (identifier) "Point" ()) ")" (;) ";" (comment) "/** output mesh data for visuallization */" (type_identifier) "virtual" (ERROR) "void WriteMeshToVtuFile(ofstream &output_file) override;\n virtual void" (identifier) "void" (function_declarator) "WriteMeshToVtuFile(ofstream &output_file) override" (identifier) "WriteMeshToVtuFile" (parameter_list) "(ofstream &output_file)" (() "(" (parameter_declaration) "ofstream &output_file" (type_identifier) "ofstream" (ERROR) "&" (&) "&" (identifier) "output_file" ()) ")" (identifier) "override" (;) ";" (identifier) "virtual" (identifier) "void" (function_declarator) "WriteMeshToPltFile(ofstream &output_file) override" (identifier) "WriteMeshToPltFile" (parameter_list) "(ofstream &output_file)" (() "(" (parameter_declaration) "ofstream &output_file" (type_identifier) "ofstream" (ERROR) "&" (&) "&" (identifier) "output_file" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}"
527
25
{"language": "c", "success": true, "metadata": {"lines": 113, "avg_line_length": 34.88, "nodes": 301, "errors": 0, "source_hash": "39b49c097a0f26962f42a02ea7433bebd07cbc00bd56b7425ee9ccce2a700770", "categorized_nodes": 232}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"base_data_package.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"base_data_package.h\"", "parent": 3, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 30}}, {"id": 6, "type": "preproc_include", "text": "#include <fstream>\n", "parent": null, "children": [7, 8], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<fstream>", "parent": 6, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 18}}, {"id": 9, "type": "declaration", "text": "using namespace std;", "parent": null, "children": [10, 11, 12], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 20}}, {"id": 10, "type": "type_identifier", "text": "using", "parent": 9, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 5}}, {"id": 11, "type": "identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 15}}, {"id": 12, "type": "ERROR", "text": "std", "parent": 9, "children": [13], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 19}}, {"id": 13, "type": "identifier", "text": "std", "parent": 12, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 19}}, {"id": 14, "type": "function_definition", "text": "namespace SPH {\n\n\t/**\n\t * @class Mesh\n\t * @brief Abstract base class for defining basic mesh prpoerties.\n\t * The mesh is proposed for several functions.\n\t * First, it is used in cell linked list for neighbor search.\n\t * Second, it is used for background maps such as level sets.\n\t * This class is the counterpart of the class particles.\n\t */\n\tclass Mesh\n\t{\n\n\tprotected:\n\t\t/** buffer to avoid bound check */\n\t\tsize_t buffer_size_;\n\t\t/** bounds */\n\t\tVecd mesh_lower_bound_, mesh_upper_bound_;\n\t\t/** grid spcing */\n\t\tReal grid_spacing_;\n\t\t/** number grid points by dimension */\n\t\tVecu number_of_grid_points_;\n\n\t\t/** computing number of total lattices */\n\t\tVecu CalcNumberOfGridPoints();\n\tpublic:\n\t\t/** Constructor */\n\t\tMesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);\n\t\tvirtual ~Mesh() {};\n\n\t\t/** accesss protected variables */\n\t\tVecd GetLowerBound() { return mesh_lower_bound_; };\n\t\tVecd GetUpperBound() { return mesh_upper_bound_; };\n\t\tReal GetGridSpacing() { return grid_spacing_; };\n\t\tVecu GetNumberOfGridPoints() { return number_of_grid_points_; };\n\n\t\t/** allcate memories for mesh data */\n\t\tvirtual void AllocateMeshDataMatrix() = 0;\n\t\t/** delete memories for mesh data */\n\t\tvirtual void DeleteMeshDataMatrix() = 0;\n\n\t\t/** find grid indexes from point poistion */\n\t\tVecu GridIndexesFromPosition(Vecd position);\n\t\t/** find grid poistion from indexes */\n\t\tVecd GridPositionFromIndexes(Vecu gird_indexes);\n\t\t/** Find cell position from indexes.\n\t\t * It is the position shift in the upper-right direction half grid size */\n\t\tVecd CellPositionFromIndexes(Vecu cell_indexes);\n\n\t\t/** output mesh data for Paraview visuallization */\n\t\tvirtual void WriteMeshToVtuFile(ofstream &output_file) = 0;\n\t\t/** output mesh data for Tecplot visuallization */\n\t\tvirtual void WriteMeshToPltFile(ofstream &output_file) = 0;\n\n\t};\n\n\t/**\n\t * @class BackgroundData\n\t * @brief Data for background mesh.\n\t * Describing complex geometrics using level set, \n\t * which is the distance to the surface of the geometry \n\t * and the direction leads to the nearest point on the surface \n\t */\n\tclass BackgroundData\n\t{\n\tpublic:\n\t\t/** Empty constructor */\n\t\tBackgroundData() {};\n\t\tBackgroundData(Real level_set, Vecd normal_direction);\n\t\tvirtual ~BackgroundData() {};\n\n\t\t/** level set is the signed distance to\n\t\t * an interface, here, the surface of a body */\n\t\tReal phi_;\n\t\t/** displacment to the surface */\n\t\tVecd n_;\n\t\t/** curvature */\n\t\tReal kappa_;\n\t};\n\n\t/**\n\t * @class MeshBackground\n\t * @brief Background mesh for inital particle relaxation.\n\t */\n\tclass MeshBackground : public Mesh\n\t{\n\t\t/** base mesh data */\n\t\tmatrix_grid mesh_background_data_;\n\n\tpublic:\n\t\tMeshBackground(Vecd lower_bound, Vecd upper_bound, \n\t\t\tReal grid_spacing, size_t buffer_size = 0);\n\t\tvirtual ~MeshBackground() {};\n\n\t\t/** allocate memories for mesh data */\n\t\tvirtual void AllocateMeshDataMatrix() override;\n\t\t/** delete memories for mesh data */\n\t\tvirtual void DeleteMeshDataMatrix() override;\n\n\t\t/** initialize level set and displacement to surface\n\t\t * for body region geometry */\n\t\tvoid InitializeLevelSetData(SPHBody &body);\n\t\tvoid ComputeCurvatureFromLevelSet(SPHBody &body);\n\t\t/** probe the base mesh data */\n\t\tVecd ProbeNormalDirection(Vecd Point);\n\t\tReal ProbeLevelSet(Vecd Point);\n\t\tReal ProbeCurvature(Vecd Point);\n\n\t\t/** output mesh data for visuallization */\n\t\tvirtual void WriteMeshToVtuFile(ofstream &output_file) override;\n\t\tvirtual void WriteMeshToPltFile(ofstream &output_file) override;\n\t};\n}", "parent": null, "children": [15, 16], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 132, "column": 1}}, {"id": 15, "type": "type_identifier", "text": "namespace", "parent": 14, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 9}}, {"id": 16, "type": "identifier", "text": "SPH", "parent": 14, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 13}}, {"id": 17, "type": "function_definition", "text": "class Mesh\n\t{\n\n\tprotected:\n\t\t/** buffer to avoid bound check */\n\t\tsize_t buffer_size_;\n\t\t/** bounds */\n\t\tVecd mesh_lower_bound_, mesh_upper_bound_;\n\t\t/** grid spcing */\n\t\tReal grid_spacing_;\n\t\t/** number grid points by dimension */\n\t\tVecu number_of_grid_points_;\n\n\t\t/** computing number of total lattices */\n\t\tVecu CalcNumberOfGridPoints();\n\tpublic:\n\t\t/** Constructor */\n\t\tMesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);\n\t\tvirtual ~Mesh() {};\n\n\t\t/** accesss protected variables */\n\t\tVecd GetLowerBound() { return mesh_lower_bound_; };\n\t\tVecd GetUpperBound() { return mesh_upper_bound_; };\n\t\tReal GetGridSpacing() { return grid_spacing_; };\n\t\tVecu GetNumberOfGridPoints() { return number_of_grid_points_; };\n\n\t\t/** allcate memories for mesh data */\n\t\tvirtual void AllocateMeshDataMatrix() = 0;\n\t\t/** delete memories for mesh data */\n\t\tvirtual void DeleteMeshDataMatrix() = 0;\n\n\t\t/** find grid indexes from point poistion */\n\t\tVecu GridIndexesFromPosition(Vecd position);\n\t\t/** find grid poistion from indexes */\n\t\tVecd GridPositionFromIndexes(Vecu gird_indexes);\n\t\t/** Find cell position from indexes.\n\t\t * It is the position shift in the upper-right direction half grid size */\n\t\tVecd CellPositionFromIndexes(Vecu cell_indexes);\n\n\t\t/** output mesh data for Paraview visuallization */\n\t\tvirtual void WriteMeshToVtuFile(ofstream &output_file) = 0;\n\t\t/** output mesh data for Tecplot visuallization */\n\t\tvirtual void WriteMeshToPltFile(ofstream &output_file) = 0;\n\n\t}", "parent": 14, "children": [18], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 74, "column": 2}}, {"id": 18, "type": "identifier", "text": "Mesh", "parent": 17, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 11}}, {"id": 19, "type": "labeled_statement", "text": "protected:\n\t\t/** buffer to avoid bound check */\n\t\tsize_t buffer_size_;", "parent": 17, "children": [20], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 35, "column": 22}}, {"id": 20, "type": "declaration", "text": "size_t buffer_size_;", "parent": 19, "children": [21, 22], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 22}}, {"id": 21, "type": "primitive_type", "text": "size_t", "parent": 20, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 8}}, {"id": 22, "type": "identifier", "text": "buffer_size_", "parent": 20, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 21}}, {"id": 23, "type": "declaration", "text": "Vecd mesh_lower_bound_, mesh_upper_bound_;", "parent": 17, "children": [24, 25, 26], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 44}}, {"id": 24, "type": "type_identifier", "text": "Vecd", "parent": 23, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 6}}, {"id": 25, "type": "identifier", "text": "mesh_lower_bound_", "parent": 23, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 24}}, {"id": 26, "type": "identifier", "text": "mesh_upper_bound_", "parent": 23, "children": [], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 43}}, {"id": 27, "type": "declaration", "text": "Real grid_spacing_;", "parent": 17, "children": [28, 29], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 21}}, {"id": 28, "type": "type_identifier", "text": "Real", "parent": 27, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 6}}, {"id": 29, "type": "identifier", "text": "grid_spacing_", "parent": 27, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 20}}, {"id": 30, "type": "declaration", "text": "Vecu number_of_grid_points_;", "parent": 17, "children": [31, 32], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 30}}, {"id": 31, "type": "type_identifier", "text": "Vecu", "parent": 30, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 6}}, {"id": 32, "type": "identifier", "text": "number_of_grid_points_", "parent": 30, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 29}}, {"id": 33, "type": "declaration", "text": "Vecu CalcNumberOfGridPoints();", "parent": 17, "children": [34, 35], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 32}}, {"id": 34, "type": "type_identifier", "text": "Vecu", "parent": 33, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 6}}, {"id": 35, "type": "function_declarator", "text": "CalcNumberOfGridPoints()", "parent": 33, "children": [36, 37], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 31}}, {"id": 36, "type": "identifier", "text": "CalcNumberOfGridPoints", "parent": 35, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 29}}, {"id": 37, "type": "parameter_list", "text": "()", "parent": 35, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 31}}, {"id": 38, "type": "labeled_statement", "text": "public:\n\t\t/** Constructor */\n\t\tMesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);", "parent": 17, "children": [39], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 47, "column": 86}}, {"id": 39, "type": "declaration", "text": "Mesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);", "parent": 38, "children": [40, 44, 45, 47, 48, 50, 51, 53], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 86}}, {"id": 40, "type": "macro_type_specifier", "text": "Mesh(Vecd", "parent": 39, "children": [41, 42], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 11}}, {"id": 41, "type": "identifier", "text": "Mesh", "parent": 40, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 6}}, {"id": 42, "type": "type_descriptor", "text": "Vecd", "parent": 40, "children": [43], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 11}}, {"id": 43, "type": "type_identifier", "text": "Vecd", "parent": 42, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 11}}, {"id": 44, "type": "identifier", "text": "lower_bound", "parent": 39, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 23}}, {"id": 45, "type": "ERROR", "text": "Vecd", "parent": 39, "children": [46], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 29}}, {"id": 46, "type": "identifier", "text": "Vecd", "parent": 45, "children": [], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 29}}, {"id": 47, "type": "identifier", "text": "upper_bound", "parent": 39, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 41}}, {"id": 48, "type": "ERROR", "text": "Real", "parent": 39, "children": [49], "start_point": {"row": 47, "column": 43}, "end_point": {"row": 47, "column": 47}}, {"id": 49, "type": "identifier", "text": "Real", "parent": 48, "children": [], "start_point": {"row": 47, "column": 43}, "end_point": {"row": 47, "column": 47}}, {"id": 50, "type": "identifier", "text": "grid_spacing", "parent": 39, "children": [], "start_point": {"row": 47, "column": 48}, "end_point": {"row": 47, "column": 60}}, {"id": 51, "type": "ERROR", "text": "size_t", "parent": 39, "children": [52], "start_point": {"row": 47, "column": 62}, "end_point": {"row": 47, "column": 68}}, {"id": 52, "type": "identifier", "text": "size_t", "parent": 51, "children": [], "start_point": {"row": 47, "column": 62}, "end_point": {"row": 47, "column": 68}}, {"id": 53, "type": "init_declarator", "text": "buffer_size = 0", "parent": 39, "children": [54, 55, 56], "start_point": {"row": 47, "column": 69}, "end_point": {"row": 47, "column": 84}}, {"id": 54, "type": "identifier", "text": "buffer_size", "parent": 53, "children": [], "start_point": {"row": 47, "column": 69}, "end_point": {"row": 47, "column": 80}}, {"id": 55, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 47, "column": 81}, "end_point": {"row": 47, "column": 82}}, {"id": 56, "type": "number_literal", "text": "0", "parent": 53, "children": [], "start_point": {"row": 47, "column": 83}, "end_point": {"row": 47, "column": 84}}, {"id": 57, "type": "function_definition", "text": "virtual ~Mesh() {}", "parent": 17, "children": [58, 59, 61], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 20}}, {"id": 58, "type": "type_identifier", "text": "virtual", "parent": 57, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 9}}, {"id": 59, "type": "ERROR", "text": "~", "parent": 57, "children": [60], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 11}}, {"id": 60, "type": "~", "text": "~", "parent": 59, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 11}}, {"id": 61, "type": "function_declarator", "text": "Mesh()", "parent": 57, "children": [62, 63], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 17}}, {"id": 62, "type": "identifier", "text": "Mesh", "parent": 61, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 15}}, {"id": 63, "type": "parameter_list", "text": "()", "parent": 61, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 17}}, {"id": 64, "type": "function_definition", "text": "Vecd GetLowerBound() { return mesh_lower_bound_; }", "parent": 17, "children": [65, 66], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 52}}, {"id": 65, "type": "type_identifier", "text": "Vecd", "parent": 64, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 6}}, {"id": 66, "type": "function_declarator", "text": "GetLowerBound()", "parent": 64, "children": [67, 68], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 22}}, {"id": 67, "type": "identifier", "text": "GetLowerBound", "parent": 66, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 20}}, {"id": 68, "type": "parameter_list", "text": "()", "parent": 66, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 22}}, {"id": 69, "type": "return_statement", "text": "return mesh_lower_bound_;", "parent": 64, "children": [70], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 50}}, {"id": 70, "type": "identifier", "text": "mesh_lower_bound_", "parent": 69, "children": [], "start_point": {"row": 51, "column": 32}, "end_point": {"row": 51, "column": 49}}, {"id": 71, "type": "function_definition", "text": "Vecd GetUpperBound() { return mesh_upper_bound_; }", "parent": 17, "children": [72, 73], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 52}}, {"id": 72, "type": "type_identifier", "text": "Vecd", "parent": 71, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 6}}, {"id": 73, "type": "function_declarator", "text": "GetUpperBound()", "parent": 71, "children": [74, 75], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 22}}, {"id": 74, "type": "identifier", "text": "GetUpperBound", "parent": 73, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 20}}, {"id": 75, "type": "parameter_list", "text": "()", "parent": 73, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 22}}, {"id": 76, "type": "return_statement", "text": "return mesh_upper_bound_;", "parent": 71, "children": [77], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 50}}, {"id": 77, "type": "identifier", "text": "mesh_upper_bound_", "parent": 76, "children": [], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 49}}, {"id": 78, "type": "function_definition", "text": "Real GetGridSpacing() { return grid_spacing_; }", "parent": 17, "children": [79, 80], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 49}}, {"id": 79, "type": "type_identifier", "text": "Real", "parent": 78, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 6}}, {"id": 80, "type": "function_declarator", "text": "GetGridSpacing()", "parent": 78, "children": [81, 82], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 23}}, {"id": 81, "type": "identifier", "text": "GetGridSpacing", "parent": 80, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 21}}, {"id": 82, "type": "parameter_list", "text": "()", "parent": 80, "children": [], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 23}}, {"id": 83, "type": "return_statement", "text": "return grid_spacing_;", "parent": 78, "children": [84], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 47}}, {"id": 84, "type": "identifier", "text": "grid_spacing_", "parent": 83, "children": [], "start_point": {"row": 53, "column": 33}, "end_point": {"row": 53, "column": 46}}, {"id": 85, "type": "function_definition", "text": "Vecu GetNumberOfGridPoints() { return number_of_grid_points_; }", "parent": 17, "children": [86, 87], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 65}}, {"id": 86, "type": "type_identifier", "text": "Vecu", "parent": 85, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 6}}, {"id": 87, "type": "function_declarator", "text": "GetNumberOfGridPoints()", "parent": 85, "children": [88, 89], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 30}}, {"id": 88, "type": "identifier", "text": "GetNumberOfGridPoints", "parent": 87, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 28}}, {"id": 89, "type": "parameter_list", "text": "()", "parent": 87, "children": [], "start_point": {"row": 54, "column": 28}, "end_point": {"row": 54, "column": 30}}, {"id": 90, "type": "return_statement", "text": "return number_of_grid_points_;", "parent": 85, "children": [91], "start_point": {"row": 54, "column": 33}, "end_point": {"row": 54, "column": 63}}, {"id": 91, "type": "identifier", "text": "number_of_grid_points_", "parent": 90, "children": [], "start_point": {"row": 54, "column": 40}, "end_point": {"row": 54, "column": 62}}, {"id": 92, "type": "declaration", "text": "virtual void AllocateMeshDataMatrix() = 0;", "parent": 17, "children": [93, 94, 96], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 44}}, {"id": 93, "type": "type_identifier", "text": "virtual", "parent": 92, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 9}}, {"id": 94, "type": "ERROR", "text": "void", "parent": 92, "children": [95], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 14}}, {"id": 95, "type": "identifier", "text": "void", "parent": 94, "children": [], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 14}}, {"id": 96, "type": "init_declarator", "text": "AllocateMeshDataMatrix() = 0", "parent": 92, "children": [97, 100, 101], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 43}}, {"id": 97, "type": "function_declarator", "text": "AllocateMeshDataMatrix()", "parent": 96, "children": [98, 99], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 39}}, {"id": 98, "type": "identifier", "text": "AllocateMeshDataMatrix", "parent": 97, "children": [], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 37}}, {"id": 99, "type": "parameter_list", "text": "()", "parent": 97, "children": [], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 39}}, {"id": 100, "type": "=", "text": "=", "parent": 96, "children": [], "start_point": {"row": 57, "column": 40}, "end_point": {"row": 57, "column": 41}}, {"id": 101, "type": "number_literal", "text": "0", "parent": 96, "children": [], "start_point": {"row": 57, "column": 42}, "end_point": {"row": 57, "column": 43}}, {"id": 102, "type": "declaration", "text": "virtual void DeleteMeshDataMatrix() = 0;", "parent": 17, "children": [103, 104, 106], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 42}}, {"id": 103, "type": "type_identifier", "text": "virtual", "parent": 102, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 9}}, {"id": 104, "type": "ERROR", "text": "void", "parent": 102, "children": [105], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 14}}, {"id": 105, "type": "identifier", "text": "void", "parent": 104, "children": [], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 14}}, {"id": 106, "type": "init_declarator", "text": "DeleteMeshDataMatrix() = 0", "parent": 102, "children": [107, 110, 111], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 41}}, {"id": 107, "type": "function_declarator", "text": "DeleteMeshDataMatrix()", "parent": 106, "children": [108, 109], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 37}}, {"id": 108, "type": "identifier", "text": "DeleteMeshDataMatrix", "parent": 107, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 35}}, {"id": 109, "type": "parameter_list", "text": "()", "parent": 107, "children": [], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 37}}, {"id": 110, "type": "=", "text": "=", "parent": 106, "children": [], "start_point": {"row": 59, "column": 38}, "end_point": {"row": 59, "column": 39}}, {"id": 111, "type": "number_literal", "text": "0", "parent": 106, "children": [], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 41}}, {"id": 112, "type": "declaration", "text": "Vecu GridIndexesFromPosition(Vecd position);", "parent": 17, "children": [113, 114], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 46}}, {"id": 113, "type": "type_identifier", "text": "Vecu", "parent": 112, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 6}}, {"id": 114, "type": "function_declarator", "text": "GridIndexesFromPosition(Vecd position)", "parent": 112, "children": [115, 116], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 45}}, {"id": 115, "type": "identifier", "text": "GridIndexesFromPosition", "parent": 114, "children": [], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 30}}, {"id": 116, "type": "parameter_list", "text": "(Vecd position)", "parent": 114, "children": [117], "start_point": {"row": 62, "column": 30}, "end_point": {"row": 62, "column": 45}}, {"id": 117, "type": "parameter_declaration", "text": "Vecd position", "parent": 116, "children": [118, 119], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 44}}, {"id": 118, "type": "type_identifier", "text": "Vecd", "parent": 117, "children": [], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 35}}, {"id": 119, "type": "identifier", "text": "position", "parent": 117, "children": [], "start_point": {"row": 62, "column": 36}, "end_point": {"row": 62, "column": 44}}, {"id": 120, "type": "declaration", "text": "Vecd GridPositionFromIndexes(Vecu gird_indexes);", "parent": 17, "children": [121, 122], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 50}}, {"id": 121, "type": "type_identifier", "text": "Vecd", "parent": 120, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 6}}, {"id": 122, "type": "function_declarator", "text": "GridPositionFromIndexes(Vecu gird_indexes)", "parent": 120, "children": [123, 124], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 49}}, {"id": 123, "type": "identifier", "text": "GridPositionFromIndexes", "parent": 122, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 30}}, {"id": 124, "type": "parameter_list", "text": "(Vecu gird_indexes)", "parent": 122, "children": [125], "start_point": {"row": 64, "column": 30}, "end_point": {"row": 64, "column": 49}}, {"id": 125, "type": "parameter_declaration", "text": "Vecu gird_indexes", "parent": 124, "children": [126, 127], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 48}}, {"id": 126, "type": "type_identifier", "text": "Vecu", "parent": 125, "children": [], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 35}}, {"id": 127, "type": "identifier", "text": "gird_indexes", "parent": 125, "children": [], "start_point": {"row": 64, "column": 36}, "end_point": {"row": 64, "column": 48}}, {"id": 128, "type": "declaration", "text": "Vecd CellPositionFromIndexes(Vecu cell_indexes);", "parent": 17, "children": [129, 130], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 50}}, {"id": 129, "type": "type_identifier", "text": "Vecd", "parent": 128, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 6}}, {"id": 130, "type": "function_declarator", "text": "CellPositionFromIndexes(Vecu cell_indexes)", "parent": 128, "children": [131, 132], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 49}}, {"id": 131, "type": "identifier", "text": "CellPositionFromIndexes", "parent": 130, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 30}}, {"id": 132, "type": "parameter_list", "text": "(Vecu cell_indexes)", "parent": 130, "children": [133], "start_point": {"row": 67, "column": 30}, "end_point": {"row": 67, "column": 49}}, {"id": 133, "type": "parameter_declaration", "text": "Vecu cell_indexes", "parent": 132, "children": [134, 135], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 48}}, {"id": 134, "type": "type_identifier", "text": "Vecu", "parent": 133, "children": [], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 35}}, {"id": 135, "type": "identifier", "text": "cell_indexes", "parent": 133, "children": [], "start_point": {"row": 67, "column": 36}, "end_point": {"row": 67, "column": 48}}, {"id": 136, "type": "declaration", "text": "virtual void", "parent": 17, "children": [137, 138], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 14}}, {"id": 137, "type": "type_identifier", "text": "virtual", "parent": 136, "children": [], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 9}}, {"id": 138, "type": "identifier", "text": "void", "parent": 136, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 14}}, {"id": 139, "type": "assignment_expression", "text": "WriteMeshToVtuFile(ofstream &output_file) = 0", "parent": 17, "children": [140, 146, 147], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 60}}, {"id": 140, "type": "call_expression", "text": "WriteMeshToVtuFile(ofstream &output_file)", "parent": 139, "children": [141, 142], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 56}}, {"id": 141, "type": "identifier", "text": "WriteMeshToVtuFile", "parent": 140, "children": [], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 33}}, {"id": 142, "type": "argument_list", "text": "(ofstream &output_file)", "parent": 140, "children": [143], "start_point": {"row": 70, "column": 33}, "end_point": {"row": 70, "column": 56}}, {"id": 143, "type": "binary_expression", "text": "ofstream &output_file", "parent": 142, "children": [144, 145], "start_point": {"row": 70, "column": 34}, "end_point": {"row": 70, "column": 55}}, {"id": 144, "type": "identifier", "text": "ofstream", "parent": 143, "children": [], "start_point": {"row": 70, "column": 34}, "end_point": {"row": 70, "column": 42}}, {"id": 145, "type": "identifier", "text": "output_file", "parent": 143, "children": [], "start_point": {"row": 70, "column": 44}, "end_point": {"row": 70, "column": 55}}, {"id": 146, "type": "=", "text": "=", "parent": 139, "children": [], "start_point": {"row": 70, "column": 57}, "end_point": {"row": 70, "column": 58}}, {"id": 147, "type": "number_literal", "text": "0", "parent": 139, "children": [], "start_point": {"row": 70, "column": 59}, "end_point": {"row": 70, "column": 60}}, {"id": 148, "type": "declaration", "text": "virtual void", "parent": 17, "children": [149, 150], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 14}}, {"id": 149, "type": "type_identifier", "text": "virtual", "parent": 148, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 9}}, {"id": 150, "type": "identifier", "text": "void", "parent": 148, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 14}}, {"id": 151, "type": "assignment_expression", "text": "WriteMeshToPltFile(ofstream &output_file) = 0", "parent": 17, "children": [152, 158, 159], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 60}}, {"id": 152, "type": "call_expression", "text": "WriteMeshToPltFile(ofstream &output_file)", "parent": 151, "children": [153, 154], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 56}}, {"id": 153, "type": "identifier", "text": "WriteMeshToPltFile", "parent": 152, "children": [], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 33}}, {"id": 154, "type": "argument_list", "text": "(ofstream &output_file)", "parent": 152, "children": [155], "start_point": {"row": 72, "column": 33}, "end_point": {"row": 72, "column": 56}}, {"id": 155, "type": "binary_expression", "text": "ofstream &output_file", "parent": 154, "children": [156, 157], "start_point": {"row": 72, "column": 34}, "end_point": {"row": 72, "column": 55}}, {"id": 156, "type": "identifier", "text": "ofstream", "parent": 155, "children": [], "start_point": {"row": 72, "column": 34}, "end_point": {"row": 72, "column": 42}}, {"id": 157, "type": "identifier", "text": "output_file", "parent": 155, "children": [], "start_point": {"row": 72, "column": 44}, "end_point": {"row": 72, "column": 55}}, {"id": 158, "type": "=", "text": "=", "parent": 151, "children": [], "start_point": {"row": 72, "column": 57}, "end_point": {"row": 72, "column": 58}}, {"id": 159, "type": "number_literal", "text": "0", "parent": 151, "children": [], "start_point": {"row": 72, "column": 59}, "end_point": {"row": 72, "column": 60}}, {"id": 160, "type": "function_definition", "text": "class BackgroundData\n\t{\n\tpublic:\n\t\t/** Empty constructor */\n\t\tBackgroundData() {};\n\t\tBackgroundData(Real level_set, Vecd normal_direction);\n\t\tvirtual ~BackgroundData() {};\n\n\t\t/** level set is the signed distance to\n\t\t * an interface, here, the surface of a body */\n\t\tReal phi_;\n\t\t/** displacment to the surface */\n\t\tVecd n_;\n\t\t/** curvature */\n\t\tReal kappa_;\n\t}", "parent": 14, "children": [161], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 98, "column": 2}}, {"id": 161, "type": "identifier", "text": "BackgroundData", "parent": 160, "children": [], "start_point": {"row": 83, "column": 7}, "end_point": {"row": 83, "column": 21}}, {"id": 162, "type": "labeled_statement", "text": "public:\n\t\t/** Empty constructor */\n\t\tBackgroundData()", "parent": 160, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 87, "column": 18}}, {"id": 163, "type": "call_expression", "text": "BackgroundData()", "parent": 162, "children": [164, 165], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 18}}, {"id": 164, "type": "identifier", "text": "BackgroundData", "parent": 163, "children": [], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 16}}, {"id": 165, "type": "argument_list", "text": "()", "parent": 163, "children": [], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 18}}, {"id": 166, "type": "declaration", "text": "BackgroundData(Real level_set, Vecd normal_direction);", "parent": 160, "children": [167, 171, 172, 173], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 56}}, {"id": 167, "type": "macro_type_specifier", "text": "BackgroundData(Real", "parent": 166, "children": [168, 169], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 21}}, {"id": 168, "type": "identifier", "text": "BackgroundData", "parent": 167, "children": [], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 16}}, {"id": 169, "type": "type_descriptor", "text": "Real", "parent": 167, "children": [170], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 21}}, {"id": 170, "type": "type_identifier", "text": "Real", "parent": 169, "children": [], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 21}}, {"id": 171, "type": "identifier", "text": "level_set", "parent": 166, "children": [], "start_point": {"row": 88, "column": 22}, "end_point": {"row": 88, "column": 31}}, {"id": 172, "type": "identifier", "text": "Vecd", "parent": 166, "children": [], "start_point": {"row": 88, "column": 33}, "end_point": {"row": 88, "column": 37}}, {"id": 173, "type": "ERROR", "text": "normal_direction)", "parent": 166, "children": [174], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 55}}, {"id": 174, "type": "identifier", "text": "normal_direction", "parent": 173, "children": [], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 54}}, {"id": 175, "type": "function_definition", "text": "virtual ~BackgroundData() {}", "parent": 160, "children": [176, 177, 179], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 30}}, {"id": 176, "type": "type_identifier", "text": "virtual", "parent": 175, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 9}}, {"id": 177, "type": "ERROR", "text": "~", "parent": 175, "children": [178], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 11}}, {"id": 178, "type": "~", "text": "~", "parent": 177, "children": [], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 11}}, {"id": 179, "type": "function_declarator", "text": "BackgroundData()", "parent": 175, "children": [180, 181], "start_point": {"row": 89, "column": 11}, "end_point": {"row": 89, "column": 27}}, {"id": 180, "type": "identifier", "text": "BackgroundData", "parent": 179, "children": [], "start_point": {"row": 89, "column": 11}, "end_point": {"row": 89, "column": 25}}, {"id": 181, "type": "parameter_list", "text": "()", "parent": 179, "children": [], "start_point": {"row": 89, "column": 25}, "end_point": {"row": 89, "column": 27}}, {"id": 182, "type": "declaration", "text": "Real phi_;", "parent": 160, "children": [183, 184], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 12}}, {"id": 183, "type": "type_identifier", "text": "Real", "parent": 182, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 6}}, {"id": 184, "type": "identifier", "text": "phi_", "parent": 182, "children": [], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 11}}, {"id": 185, "type": "declaration", "text": "Vecd n_;", "parent": 160, "children": [186, 187], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 10}}, {"id": 186, "type": "type_identifier", "text": "Vecd", "parent": 185, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 6}}, {"id": 187, "type": "identifier", "text": "n_", "parent": 185, "children": [], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 9}}, {"id": 188, "type": "declaration", "text": "Real kappa_;", "parent": 160, "children": [189, 190], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 14}}, {"id": 189, "type": "type_identifier", "text": "Real", "parent": 188, "children": [], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 6}}, {"id": 190, "type": "identifier", "text": "kappa_", "parent": 188, "children": [], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 13}}, {"id": 191, "type": "function_definition", "text": "class MeshBackground : public Mesh\n\t{\n\t\t/** base mesh data */\n\t\tmatrix_grid mesh_background_data_;\n\n\tpublic:\n\t\tMeshBackground(Vecd lower_bound, Vecd upper_bound, \n\t\t\tReal grid_spacing, size_t buffer_size = 0);\n\t\tvirtual ~MeshBackground() {};\n\n\t\t/** allocate memories for mesh data */\n\t\tvirtual void AllocateMeshDataMatrix() override;\n\t\t/** delete memories for mesh data */\n\t\tvirtual void DeleteMeshDataMatrix() override;\n\n\t\t/** initialize level set and displacement to surface\n\t\t * for body region geometry */\n\t\tvoid InitializeLevelSetData(SPHBody &body);\n\t\tvoid ComputeCurvatureFromLevelSet(SPHBody &body);\n\t\t/** probe the base mesh data */\n\t\tVecd ProbeNormalDirection(Vecd Point);\n\t\tReal ProbeLevelSet(Vecd Point);\n\t\tReal ProbeCurvature(Vecd Point);\n\n\t\t/** output mesh data for visuallization */\n\t\tvirtual void WriteMeshToVtuFile(ofstream &output_file) override;\n\t\tvirtual void WriteMeshToPltFile(ofstream &output_file) override;\n\t}", "parent": 14, "children": [192, 193], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 131, "column": 2}}, {"id": 192, "type": "identifier", "text": "MeshBackground", "parent": 191, "children": [], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 104, "column": 21}}, {"id": 193, "type": "ERROR", "text": ": public Mesh", "parent": 191, "children": [194], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 35}}, {"id": 194, "type": "identifier", "text": "Mesh", "parent": 193, "children": [], "start_point": {"row": 104, "column": 31}, "end_point": {"row": 104, "column": 35}}, {"id": 195, "type": "declaration", "text": "matrix_grid mesh_background_data_;", "parent": 191, "children": [196, 197], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 36}}, {"id": 196, "type": "type_identifier", "text": "matrix_grid", "parent": 195, "children": [], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 13}}, {"id": 197, "type": "identifier", "text": "mesh_background_data_", "parent": 195, "children": [], "start_point": {"row": 107, "column": 14}, "end_point": {"row": 107, "column": 35}}, {"id": 198, "type": "labeled_statement", "text": "public:\n\t\tMeshBackground(Vecd lower_bound, Vecd upper_bound, \n\t\t\tReal grid_spacing, size_t buffer_size = 0);", "parent": 191, "children": [199], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 111, "column": 46}}, {"id": 199, "type": "declaration", "text": "MeshBackground(Vecd lower_bound, Vecd upper_bound, \n\t\t\tReal grid_spacing, size_t buffer_size = 0);", "parent": 198, "children": [200, 204, 205, 207, 208, 210, 211, 213], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 111, "column": 46}}, {"id": 200, "type": "macro_type_specifier", "text": "MeshBackground(Vecd", "parent": 199, "children": [201, 202], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 21}}, {"id": 201, "type": "identifier", "text": "MeshBackground", "parent": 200, "children": [], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 16}}, {"id": 202, "type": "type_descriptor", "text": "Vecd", "parent": 200, "children": [203], "start_point": {"row": 110, "column": 17}, "end_point": {"row": 110, "column": 21}}, {"id": 203, "type": "type_identifier", "text": "Vecd", "parent": 202, "children": [], "start_point": {"row": 110, "column": 17}, "end_point": {"row": 110, "column": 21}}, {"id": 204, "type": "identifier", "text": "lower_bound", "parent": 199, "children": [], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 33}}, {"id": 205, "type": "ERROR", "text": "Vecd", "parent": 199, "children": [206], "start_point": {"row": 110, "column": 35}, "end_point": {"row": 110, "column": 39}}, {"id": 206, "type": "identifier", "text": "Vecd", "parent": 205, "children": [], "start_point": {"row": 110, "column": 35}, "end_point": {"row": 110, "column": 39}}, {"id": 207, "type": "identifier", "text": "upper_bound", "parent": 199, "children": [], "start_point": {"row": 110, "column": 40}, "end_point": {"row": 110, "column": 51}}, {"id": 208, "type": "ERROR", "text": "Real", "parent": 199, "children": [209], "start_point": {"row": 111, "column": 3}, "end_point": {"row": 111, "column": 7}}, {"id": 209, "type": "identifier", "text": "Real", "parent": 208, "children": [], "start_point": {"row": 111, "column": 3}, "end_point": {"row": 111, "column": 7}}, {"id": 210, "type": "identifier", "text": "grid_spacing", "parent": 199, "children": [], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 20}}, {"id": 211, "type": "ERROR", "text": "size_t", "parent": 199, "children": [212], "start_point": {"row": 111, "column": 22}, "end_point": {"row": 111, "column": 28}}, {"id": 212, "type": "identifier", "text": "size_t", "parent": 211, "children": [], "start_point": {"row": 111, "column": 22}, "end_point": {"row": 111, "column": 28}}, {"id": 213, "type": "init_declarator", "text": "buffer_size = 0", "parent": 199, "children": [214, 215, 216], "start_point": {"row": 111, "column": 29}, "end_point": {"row": 111, "column": 44}}, {"id": 214, "type": "identifier", "text": "buffer_size", "parent": 213, "children": [], "start_point": {"row": 111, "column": 29}, "end_point": {"row": 111, "column": 40}}, {"id": 215, "type": "=", "text": "=", "parent": 213, "children": [], "start_point": {"row": 111, "column": 41}, "end_point": {"row": 111, "column": 42}}, {"id": 216, "type": "number_literal", "text": "0", "parent": 213, "children": [], "start_point": {"row": 111, "column": 43}, "end_point": {"row": 111, "column": 44}}, {"id": 217, "type": "function_definition", "text": "virtual ~MeshBackground() {}", "parent": 191, "children": [218, 219, 221], "start_point": {"row": 112, "column": 2}, "end_point": {"row": 112, "column": 30}}, {"id": 218, "type": "type_identifier", "text": "virtual", "parent": 217, "children": [], "start_point": {"row": 112, "column": 2}, "end_point": {"row": 112, "column": 9}}, {"id": 219, "type": "ERROR", "text": "~", "parent": 217, "children": [220], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 11}}, {"id": 220, "type": "~", "text": "~", "parent": 219, "children": [], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 11}}, {"id": 221, "type": "function_declarator", "text": "MeshBackground()", "parent": 217, "children": [222, 223], "start_point": {"row": 112, "column": 11}, "end_point": {"row": 112, "column": 27}}, {"id": 222, "type": "identifier", "text": "MeshBackground", "parent": 221, "children": [], "start_point": {"row": 112, "column": 11}, "end_point": {"row": 112, "column": 25}}, {"id": 223, "type": "parameter_list", "text": "()", "parent": 221, "children": [], "start_point": {"row": 112, "column": 25}, "end_point": {"row": 112, "column": 27}}, {"id": 224, "type": "ERROR", "text": "virtual void AllocateMeshDataMatrix() override;\n\t\t/** delete memories for mesh data */\n\t\tvirtual void DeleteMeshDataMatrix() override;\n\n\t\t/** initialize level set and displacement to surface\n\t\t * for body region geometry */\n\t\tvoid InitializeLevelSetData(SPHBody &body);\n\t\tvoid ComputeCurvatureFromLevelSet(SPHBody &body);\n\t\t/** probe the base mesh data */\n\t\tVecd ProbeNormalDirection(Vecd Point);\n\t\tReal ProbeLevelSet(Vecd Point);\n\t\tReal ProbeCurvature(Vecd Point);\n\n\t\t/** output mesh data for visuallization */\n\t\tvirtual void WriteMeshToVtuFile(ofstream &output_file) override;\n\t\tvirtual void WriteMeshToPltFile(ofstream &output_file) override", "parent": 191, "children": [225, 226, 228, 231, 234, 242, 250, 258, 266, 274, 282, 283, 294], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 130, "column": 65}}, {"id": 225, "type": "type_identifier", "text": "virtual", "parent": 224, "children": [], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 9}}, {"id": 226, "type": "ERROR", "text": "void", "parent": 224, "children": [227], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 14}}, {"id": 227, "type": "identifier", "text": "void", "parent": 226, "children": [], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 14}}, {"id": 228, "type": "function_declarator", "text": "AllocateMeshDataMatrix()", "parent": 224, "children": [229, 230], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 39}}, {"id": 229, "type": "identifier", "text": "AllocateMeshDataMatrix", "parent": 228, "children": [], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 37}}, {"id": 230, "type": "parameter_list", "text": "()", "parent": 228, "children": [], "start_point": {"row": 115, "column": 37}, "end_point": {"row": 115, "column": 39}}, {"id": 231, "type": "declaration", "text": "override;", "parent": 224, "children": [232, 233], "start_point": {"row": 115, "column": 40}, "end_point": {"row": 115, "column": 49}}, {"id": 232, "type": "type_identifier", "text": "override", "parent": 231, "children": [], "start_point": {"row": 115, "column": 40}, "end_point": {"row": 115, "column": 48}}, {"id": 233, "type": "identifier", "text": "", "parent": 231, "children": [], "start_point": {"row": 115, "column": 48}, "end_point": {"row": 115, "column": 48}}, {"id": 234, "type": "ERROR", "text": "virtual void DeleteMeshDataMatrix() override;", "parent": 224, "children": [235, 236, 238], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 47}}, {"id": 235, "type": "type_identifier", "text": "virtual", "parent": 234, "children": [], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 9}}, {"id": 236, "type": "ERROR", "text": "void", "parent": 234, "children": [237], "start_point": {"row": 117, "column": 10}, "end_point": {"row": 117, "column": 14}}, {"id": 237, "type": "identifier", "text": "void", "parent": 236, "children": [], "start_point": {"row": 117, "column": 10}, "end_point": {"row": 117, "column": 14}}, {"id": 238, "type": "function_declarator", "text": "DeleteMeshDataMatrix() override", "parent": 234, "children": [239, 240, 241], "start_point": {"row": 117, "column": 15}, "end_point": {"row": 117, "column": 46}}, {"id": 239, "type": "identifier", "text": "DeleteMeshDataMatrix", "parent": 238, "children": [], "start_point": {"row": 117, "column": 15}, "end_point": {"row": 117, "column": 35}}, {"id": 240, "type": "parameter_list", "text": "()", "parent": 238, "children": [], "start_point": {"row": 117, "column": 35}, "end_point": {"row": 117, "column": 37}}, {"id": 241, "type": "identifier", "text": "override", "parent": 238, "children": [], "start_point": {"row": 117, "column": 38}, "end_point": {"row": 117, "column": 46}}, {"id": 242, "type": "declaration", "text": "void InitializeLevelSetData(SPHBody &body);", "parent": 224, "children": [243, 244], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 45}}, {"id": 243, "type": "primitive_type", "text": "void", "parent": 242, "children": [], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 6}}, {"id": 244, "type": "function_declarator", "text": "InitializeLevelSetData(SPHBody &body)", "parent": 242, "children": [245, 246], "start_point": {"row": 121, "column": 7}, "end_point": {"row": 121, "column": 44}}, {"id": 245, "type": "identifier", "text": "InitializeLevelSetData", "parent": 244, "children": [], "start_point": {"row": 121, "column": 7}, "end_point": {"row": 121, "column": 29}}, {"id": 246, "type": "parameter_list", "text": "(SPHBody &body)", "parent": 244, "children": [247], "start_point": {"row": 121, "column": 29}, "end_point": {"row": 121, "column": 44}}, {"id": 247, "type": "parameter_declaration", "text": "SPHBody &body", "parent": 246, "children": [248, 249], "start_point": {"row": 121, "column": 30}, "end_point": {"row": 121, "column": 43}}, {"id": 248, "type": "type_identifier", "text": "SPHBody", "parent": 247, "children": [], "start_point": {"row": 121, "column": 30}, "end_point": {"row": 121, "column": 37}}, {"id": 249, "type": "identifier", "text": "body", "parent": 247, "children": [], "start_point": {"row": 121, "column": 39}, "end_point": {"row": 121, "column": 43}}, {"id": 250, "type": "declaration", "text": "void ComputeCurvatureFromLevelSet(SPHBody &body);", "parent": 224, "children": [251, 252], "start_point": {"row": 122, "column": 2}, "end_point": {"row": 122, "column": 51}}, {"id": 251, "type": "primitive_type", "text": "void", "parent": 250, "children": [], "start_point": {"row": 122, "column": 2}, "end_point": {"row": 122, "column": 6}}, {"id": 252, "type": "function_declarator", "text": "ComputeCurvatureFromLevelSet(SPHBody &body)", "parent": 250, "children": [253, 254], "start_point": {"row": 122, "column": 7}, "end_point": {"row": 122, "column": 50}}, {"id": 253, "type": "identifier", "text": "ComputeCurvatureFromLevelSet", "parent": 252, "children": [], "start_point": {"row": 122, "column": 7}, "end_point": {"row": 122, "column": 35}}, {"id": 254, "type": "parameter_list", "text": "(SPHBody &body)", "parent": 252, "children": [255], "start_point": {"row": 122, "column": 35}, "end_point": {"row": 122, "column": 50}}, {"id": 255, "type": "parameter_declaration", "text": "SPHBody &body", "parent": 254, "children": [256, 257], "start_point": {"row": 122, "column": 36}, "end_point": {"row": 122, "column": 49}}, {"id": 256, "type": "type_identifier", "text": "SPHBody", "parent": 255, "children": [], "start_point": {"row": 122, "column": 36}, "end_point": {"row": 122, "column": 43}}, {"id": 257, "type": "identifier", "text": "body", "parent": 255, "children": [], "start_point": {"row": 122, "column": 45}, "end_point": {"row": 122, "column": 49}}, {"id": 258, "type": "declaration", "text": "Vecd ProbeNormalDirection(Vecd Point);", "parent": 224, "children": [259, 260], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 40}}, {"id": 259, "type": "type_identifier", "text": "Vecd", "parent": 258, "children": [], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 6}}, {"id": 260, "type": "function_declarator", "text": "ProbeNormalDirection(Vecd Point)", "parent": 258, "children": [261, 262], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 39}}, {"id": 261, "type": "identifier", "text": "ProbeNormalDirection", "parent": 260, "children": [], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 27}}, {"id": 262, "type": "parameter_list", "text": "(Vecd Point)", "parent": 260, "children": [263], "start_point": {"row": 124, "column": 27}, "end_point": {"row": 124, "column": 39}}, {"id": 263, "type": "parameter_declaration", "text": "Vecd Point", "parent": 262, "children": [264, 265], "start_point": {"row": 124, "column": 28}, "end_point": {"row": 124, "column": 38}}, {"id": 264, "type": "type_identifier", "text": "Vecd", "parent": 263, "children": [], "start_point": {"row": 124, "column": 28}, "end_point": {"row": 124, "column": 32}}, {"id": 265, "type": "identifier", "text": "Point", "parent": 263, "children": [], "start_point": {"row": 124, "column": 33}, "end_point": {"row": 124, "column": 38}}, {"id": 266, "type": "declaration", "text": "Real ProbeLevelSet(Vecd Point);", "parent": 224, "children": [267, 268], "start_point": {"row": 125, "column": 2}, "end_point": {"row": 125, "column": 33}}, {"id": 267, "type": "type_identifier", "text": "Real", "parent": 266, "children": [], "start_point": {"row": 125, "column": 2}, "end_point": {"row": 125, "column": 6}}, {"id": 268, "type": "function_declarator", "text": "ProbeLevelSet(Vecd Point)", "parent": 266, "children": [269, 270], "start_point": {"row": 125, "column": 7}, "end_point": {"row": 125, "column": 32}}, {"id": 269, "type": "identifier", "text": "ProbeLevelSet", "parent": 268, "children": [], "start_point": {"row": 125, "column": 7}, "end_point": {"row": 125, "column": 20}}, {"id": 270, "type": "parameter_list", "text": "(Vecd Point)", "parent": 268, "children": [271], "start_point": {"row": 125, "column": 20}, "end_point": {"row": 125, "column": 32}}, {"id": 271, "type": "parameter_declaration", "text": "Vecd Point", "parent": 270, "children": [272, 273], "start_point": {"row": 125, "column": 21}, "end_point": {"row": 125, "column": 31}}, {"id": 272, "type": "type_identifier", "text": "Vecd", "parent": 271, "children": [], "start_point": {"row": 125, "column": 21}, "end_point": {"row": 125, "column": 25}}, {"id": 273, "type": "identifier", "text": "Point", "parent": 271, "children": [], "start_point": {"row": 125, "column": 26}, "end_point": {"row": 125, "column": 31}}, {"id": 274, "type": "declaration", "text": "Real ProbeCurvature(Vecd Point);", "parent": 224, "children": [275, 276], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 126, "column": 34}}, {"id": 275, "type": "type_identifier", "text": "Real", "parent": 274, "children": [], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 126, "column": 6}}, {"id": 276, "type": "function_declarator", "text": "ProbeCurvature(Vecd Point)", "parent": 274, "children": [277, 278], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 33}}, {"id": 277, "type": "identifier", "text": "ProbeCurvature", "parent": 276, "children": [], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 21}}, {"id": 278, "type": "parameter_list", "text": "(Vecd Point)", "parent": 276, "children": [279], "start_point": {"row": 126, "column": 21}, "end_point": {"row": 126, "column": 33}}, {"id": 279, "type": "parameter_declaration", "text": "Vecd Point", "parent": 278, "children": [280, 281], "start_point": {"row": 126, "column": 22}, "end_point": {"row": 126, "column": 32}}, {"id": 280, "type": "type_identifier", "text": "Vecd", "parent": 279, "children": [], "start_point": {"row": 126, "column": 22}, "end_point": {"row": 126, "column": 26}}, {"id": 281, "type": "identifier", "text": "Point", "parent": 279, "children": [], "start_point": {"row": 126, "column": 27}, "end_point": {"row": 126, "column": 32}}, {"id": 282, "type": "type_identifier", "text": "virtual", "parent": 224, "children": [], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 9}}, {"id": 283, "type": "ERROR", "text": "void WriteMeshToVtuFile(ofstream &output_file) override;\n\t\tvirtual void", "parent": 224, "children": [284, 285, 292, 293], "start_point": {"row": 129, "column": 10}, "end_point": {"row": 130, "column": 14}}, {"id": 284, "type": "identifier", "text": "void", "parent": 283, "children": [], "start_point": {"row": 129, "column": 10}, "end_point": {"row": 129, "column": 14}}, {"id": 285, "type": "function_declarator", "text": "WriteMeshToVtuFile(ofstream &output_file) override", "parent": 283, "children": [286, 287, 291], "start_point": {"row": 129, "column": 15}, "end_point": {"row": 129, "column": 65}}, {"id": 286, "type": "identifier", "text": "WriteMeshToVtuFile", "parent": 285, "children": [], "start_point": {"row": 129, "column": 15}, "end_point": {"row": 129, "column": 33}}, {"id": 287, "type": "parameter_list", "text": "(ofstream &output_file)", "parent": 285, "children": [288], "start_point": {"row": 129, "column": 33}, "end_point": {"row": 129, "column": 56}}, {"id": 288, "type": "parameter_declaration", "text": "ofstream &output_file", "parent": 287, "children": [289, 290], "start_point": {"row": 129, "column": 34}, "end_point": {"row": 129, "column": 55}}, {"id": 289, "type": "type_identifier", "text": "ofstream", "parent": 288, "children": [], "start_point": {"row": 129, "column": 34}, "end_point": {"row": 129, "column": 42}}, {"id": 290, "type": "identifier", "text": "output_file", "parent": 288, "children": [], "start_point": {"row": 129, "column": 44}, "end_point": {"row": 129, "column": 55}}, {"id": 291, "type": "identifier", "text": "override", "parent": 285, "children": [], "start_point": {"row": 129, "column": 57}, "end_point": {"row": 129, "column": 65}}, {"id": 292, "type": "identifier", "text": "virtual", "parent": 283, "children": [], "start_point": {"row": 130, "column": 2}, "end_point": {"row": 130, "column": 9}}, {"id": 293, "type": "identifier", "text": "void", "parent": 283, "children": [], "start_point": {"row": 130, "column": 10}, "end_point": {"row": 130, "column": 14}}, {"id": 294, "type": "function_declarator", "text": "WriteMeshToPltFile(ofstream &output_file) override", "parent": 224, "children": [295, 296, 300], "start_point": {"row": 130, "column": 15}, "end_point": {"row": 130, "column": 65}}, {"id": 295, "type": "identifier", "text": "WriteMeshToPltFile", "parent": 294, "children": [], "start_point": {"row": 130, "column": 15}, "end_point": {"row": 130, "column": 33}}, {"id": 296, "type": "parameter_list", "text": "(ofstream &output_file)", "parent": 294, "children": [297], "start_point": {"row": 130, "column": 33}, "end_point": {"row": 130, "column": 56}}, {"id": 297, "type": "parameter_declaration", "text": "ofstream &output_file", "parent": 296, "children": [298, 299], "start_point": {"row": 130, "column": 34}, "end_point": {"row": 130, "column": 55}}, {"id": 298, "type": "type_identifier", "text": "ofstream", "parent": 297, "children": [], "start_point": {"row": 130, "column": 34}, "end_point": {"row": 130, "column": 42}}, {"id": 299, "type": "identifier", "text": "output_file", "parent": 297, "children": [], "start_point": {"row": 130, "column": 44}, "end_point": {"row": 130, "column": 55}}, {"id": 300, "type": "identifier", "text": "override", "parent": 294, "children": [], "start_point": {"row": 130, "column": 57}, "end_point": {"row": 130, "column": 65}}]}, "node_categories": {"declarations": {"functions": [14, 17, 35, 57, 61, 64, 66, 71, 73, 78, 80, 85, 87, 97, 107, 114, 122, 130, 160, 175, 179, 191, 217, 221, 228, 238, 244, 252, 260, 268, 276, 285, 294], "variables": [9, 20, 23, 27, 30, 33, 39, 92, 102, 112, 117, 120, 125, 128, 133, 136, 148, 166, 182, 185, 188, 195, 199, 231, 242, 247, 250, 255, 258, 263, 266, 271, 274, 279, 288, 297], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [140, 143, 152, 155, 163], "assignments": [139, 151], "loops": [], "conditionals": [10, 11, 13, 15, 16, 18, 22, 24, 25, 26, 28, 29, 31, 32, 34, 36, 40, 41, 43, 44, 46, 47, 49, 50, 52, 54, 58, 62, 65, 67, 70, 72, 74, 77, 79, 81, 84, 86, 88, 91, 93, 95, 98, 103, 105, 108, 113, 115, 118, 119, 121, 123, 126, 127, 129, 131, 134, 135, 137, 138, 141, 144, 145, 149, 150, 153, 156, 157, 161, 164, 167, 168, 170, 171, 172, 174, 176, 180, 183, 184, 186, 187, 189, 190, 192, 194, 196, 197, 200, 201, 203, 204, 206, 207, 209, 210, 212, 214, 218, 222, 225, 227, 229, 232, 233, 235, 237, 239, 241, 245, 248, 249, 253, 256, 257, 259, 261, 264, 265, 267, 269, 272, 273, 275, 277, 280, 281, 282, 284, 286, 289, 290, 291, 292, 293, 295, 298, 299, 300], "returns": [69, 76, 83, 90], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 56, 101, 111, 147, 159, 216], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 14, "universal_type": "function", "name": "for", "text_snippet": "namespace SPH {\n\n\t/**\n\t * @class Mesh\n\t * @brief Abstract base class for defining basic mesh prpoert"}, {"node_id": 17, "universal_type": "function", "name": "Mesh", "text_snippet": "class Mesh\n\t{\n\n\tprotected:\n\t\t/** buffer to avoid bound check */\n\t\tsize_t buffer_size_;\n\t\t/** bounds "}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "CalcNumberOfGridPoints()"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~Mesh() {}"}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "Mesh()"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "Vecd GetLowerBound() { return mesh_lower_bound_; }"}, {"node_id": 66, "universal_type": "function", "name": "unknown", "text_snippet": "GetLowerBound()"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "Vecd GetUpperBound() { return mesh_upper_bound_; }"}, {"node_id": 73, "universal_type": "function", "name": "unknown", "text_snippet": "GetUpperBound()"}, {"node_id": 78, "universal_type": "function", "name": "unknown", "text_snippet": "Real GetGridSpacing() { return grid_spacing_; }"}, {"node_id": 80, "universal_type": "function", "name": "unknown", "text_snippet": "GetGridSpacing()"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "Vecu GetNumberOfGridPoints() { return number_of_grid_points_; }"}, {"node_id": 87, "universal_type": "function", "name": "unknown", "text_snippet": "GetNumberOfGridPoints()"}, {"node_id": 97, "universal_type": "function", "name": "unknown", "text_snippet": "AllocateMeshDataMatrix()"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "DeleteMeshDataMatrix()"}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "GridIndexesFromPosition(Vecd position)"}, {"node_id": 122, "universal_type": "function", "name": "unknown", "text_snippet": "GridPositionFromIndexes(Vecu gird_indexes)"}, {"node_id": 130, "universal_type": "function", "name": "unknown", "text_snippet": "CellPositionFromIndexes(Vecu cell_indexes)"}, {"node_id": 160, "universal_type": "function", "name": "BackgroundData", "text_snippet": "class BackgroundData\n\t{\n\tpublic:\n\t\t/** Empty constructor */\n\t\tBackgroundData() {};\n\t\tBackgroundData("}, {"node_id": 175, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~BackgroundData() {}"}, {"node_id": 179, "universal_type": "function", "name": "unknown", "text_snippet": "BackgroundData()"}, {"node_id": 191, "universal_type": "function", "name": "MeshBackground", "text_snippet": "class MeshBackground : public Mesh\n\t{\n\t\t/** base mesh data */\n\t\tmatrix_grid mesh_background_data_;\n\n"}, {"node_id": 217, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~MeshBackground() {}"}, {"node_id": 221, "universal_type": "function", "name": "unknown", "text_snippet": "MeshBackground()"}, {"node_id": 228, "universal_type": "function", "name": "unknown", "text_snippet": "AllocateMeshDataMatrix()"}, {"node_id": 238, "universal_type": "function", "name": "unknown", "text_snippet": "DeleteMeshDataMatrix() override"}, {"node_id": 244, "universal_type": "function", "name": "unknown", "text_snippet": "InitializeLevelSetData(SPHBody &body)"}, {"node_id": 252, "universal_type": "function", "name": "unknown", "text_snippet": "ComputeCurvatureFromLevelSet(SPHBody &body)"}, {"node_id": 260, "universal_type": "function", "name": "unknown", "text_snippet": "ProbeNormalDirection(Vecd Point)"}, {"node_id": 268, "universal_type": "function", "name": "unknown", "text_snippet": "ProbeLevelSet(Vecd Point)"}, {"node_id": 276, "universal_type": "function", "name": "unknown", "text_snippet": "ProbeCurvature(Vecd Point)"}, {"node_id": 285, "universal_type": "function", "name": "unknown", "text_snippet": "WriteMeshToVtuFile(ofstream &output_file) override"}, {"node_id": 294, "universal_type": "function", "name": "unknown", "text_snippet": "WriteMeshToPltFile(ofstream &output_file) override"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"base_data_package.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <fstream>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/**\n* @file \tbase_mesh.h\n* @brief \tThis is the base classes of mesh, which describe ordered and indexed\n*\t\t\tdata sets. Depending on application, there are different data \n* \t\t\tsaved on the mesh. The intersection points of mesh lines are called \n*\t\t\tgrid points, the element enclosed by mesh lines (2D) or faces (3D) called \n*\t\t\tcells. The mesh line or face are also called cell faces. Grid points are\n*\t\t\talso called cell corners.\n* @author\t<NAME>, <NAME> and <NAME>\n* @version\t0.1\n*/\n\n#pragma once\n\n#include \"base_data_package.h\"\n\n#include <fstream>\n\nusing namespace std;\n\nnamespace SPH {\n\n\t/**\n\t * @class Mesh\n\t * @brief Abstract base class for defining basic mesh prpoerties.\n\t * The mesh is proposed for several functions.\n\t * First, it is used in cell linked list for neighbor search.\n\t * Second, it is used for background maps such as level sets.\n\t * This class is the counterpart of the class particles.\n\t */\n\tclass Mesh\n\t{\n\n\tprotected:\n\t\t/** buffer to avoid bound check */\n\t\tsize_t buffer_size_;\n\t\t/** bounds */\n\t\tVecd mesh_lower_bound_, mesh_upper_bound_;\n\t\t/** grid spcing */\n\t\tReal grid_spacing_;\n\t\t/** number grid points by dimension */\n\t\tVecu number_of_grid_points_;\n\n\t\t/** computing number of total lattices */\n\t\tVecu CalcNumberOfGridPoints();\n\tpublic:\n\t\t/** Constructor */\n\t\tMesh(Vecd lower_bound, Vecd upper_bound, Real grid_spacing, size_t buffer_size = 0);\n\t\tvirtual ~Mesh() {};\n\n\t\t/** accesss protected variables */\n\t\tVecd GetLowerBound() { return mesh_lower_bound_; };\n\t\tVecd GetUpperBound() { return mesh_upper_bound_; };\n\t\tReal GetGridSpacing() { return grid_spacing_; };\n\t\tVecu GetNumberOfGridPoints() { return number_of_grid_points_; };\n\n\t\t/** allcate memories for mesh data */\n\t\tvirtual void AllocateMeshDataMatrix() = 0;\n\t\t/** delete memories for mesh data */\n\t\tvirtual void DeleteMeshDataMatrix() = 0;\n\n\t\t/** find grid indexes from point poistion */\n\t\tVecu GridIndexesFromPosition(Vecd position);\n\t\t/** find grid poistion from indexes */\n\t\tVecd GridPositionFromIndexes(Vecu gird_indexes);\n\t\t/** Find cell position from indexes.\n\t\t * It is the position shift in the upper-right direction half grid size */\n\t\tVecd CellPositionFromIndexes(Vecu cell_indexes);\n\n\t\t/** output mesh data for Paraview visuallization */\n\t\tvirtual void WriteMeshToVtuFile(ofstream &output_file) = 0;\n\t\t/** output mesh data for Tecplot visuallization */\n\t\tvirtual void WriteMeshToPltFile(ofstream &output_file) = 0;\n\n\t};\n\n\t/**\n\t * @class BackgroundData\n\t * @brief Data for background mesh.\n\t * Describing complex geometrics using level set, \n\t * which is the distance to the surface of the geometry \n\t * and the direction leads to the nearest point on the surface \n\t */\n\tclass BackgroundData\n\t{\n\tpublic:\n\t\t/** Empty constructor */\n\t\tBackgroundData() {};\n\t\tBackgroundData(Real level_set, Vecd normal_direction);\n\t\tvirtual ~BackgroundData() {};\n\n\t\t/** level set is the signed distance to\n\t\t * an interface, here, the surface of a body */\n\t\tReal phi_;\n\t\t/** displacment to the surface */\n\t\tVecd n_;\n\t\t/** curvature */\n\t\tReal kappa_;\n\t};\n\n\t/**\n\t * @class MeshBackground\n\t * @brief Background mesh for inital particle relaxation.\n\t */\n\tclass MeshBackground : public Mesh\n\t{\n\t\t/** base mesh data */\n\t\tmatrix_grid mesh_background_data_;\n\n\tpublic:\n\t\tMeshBackground(Vecd lower_bound, Vecd upper_bound, \n\t\t\tReal grid_spacing, size_t buffer_size = 0);\n\t\tvirtual ~MeshBackground() {};\n\n\t\t/** allocate memories for mesh data */\n\t\tvirtual void AllocateMeshDataMatrix() override;\n\t\t/** delete memories for mesh data */\n\t\tvirtual void DeleteMeshDataMatrix() override;\n\n\t\t/** initialize level set and displacement to surface\n\t\t * for body region geometry */\n\t\tvoid InitializeLevelSetData(SPHBody &body);\n\t\tvoid ComputeCurvatureFromLevelSet(SPHBody &body);\n\t\t/** probe the base mesh data */\n\t\tVecd ProbeNormalDirection(Vecd Point);\n\t\tReal ProbeLevelSet(Vecd Point);\n\t\tReal ProbeCurvature(Vecd Point);\n\n\t\t/** output mesh data for visuallization */\n\t\tvirtual void WriteMeshToVtuFile(ofstream &output_file) override;\n\t\tvirtual void WriteMeshToPltFile(ofstream &output_file) override;\n\t};\n}\n"}
323
c
#ifndef WebApiConnector_HG #define WebApiConnector_HG #include <QObject> #include <cldef.h> #include <QNetworkAccessManager> #include <QUrl> #include <QMap> #include <QList> #include <QSharedPointer> #include <QNetworkReply> class CLIB_EXPORT WebApiConnector : public QObject { Q_OBJECT QNetworkAccessManager *_manager; void replyFinished(QNetworkReply*); WebApiConnector(); public: static WebApiConnector * instance() { static WebApiConnector *inst = new WebApiConnector; return inst; }; ~WebApiConnector(); void sendMailNotificationFinished( const QString & = QString::null ); void sendMailNotificationError( const QString & = QString::null ); void sendMailNotification(QString); void sendSmsNotificationFinished( const QString & = QString::null ); void sendSmsNotificationError( const QString & = QString::null ); void sendSmsNotification(QString); void sendNotificationFinished(); void sendNotificationError(); void sendNotificationError(QString); QMap<QString, QString> _params; //k - key, t - text, d- destination, a- api url }; #endif // WebApiConnector_HG
23.6
47
(translation_unit) "#ifndef WebApiConnector_HG \n#define WebApiConnector_HG \n \n#include <QObject> \n#include <cldef.h> \n#include <QNetworkAccessManager> \n#include <QUrl> \n#include <QMap> \n#include <QList> \n#include <QSharedPointer> \n#include <QNetworkReply> \n \n \nclass CLIB_EXPORT WebApiConnector : public QObject \n{ \n Q_OBJECT \n \n QNetworkAccessManager *_manager; \n \n void replyFinished(QNetworkReply*); \n \n WebApiConnector(); \n \npublic: \n static WebApiConnector * instance() \n { \n static WebApiConnector *inst = new WebApiConnector; \n return inst; \n }; \n ~WebApiConnector(); \n \n void sendMailNotificationFinished( const QString & = QString::null ); \n void sendMailNotificationError( const QString & = QString::null ); \n void sendMailNotification(QString); \n \n void sendSmsNotificationFinished( const QString & = QString::null ); \n void sendSmsNotificationError( const QString & = QString::null ); \n void sendSmsNotification(QString); \n \n void sendNotificationFinished(); \n void sendNotificationError(); \n void sendNotificationError(QString); \n \n QMap<QString, QString> _params; //k - key, t - text, d- destination, a- api url \n}; \n \n#endif // WebApiConnector_HG \n" (preproc_ifdef) "#ifndef WebApiConnector_HG \n#define WebApiConnector_HG \n \n#include <QObject> \n#include <cldef.h> \n#include <QNetworkAccessManager> \n#include <QUrl> \n#include <QMap> \n#include <QList> \n#include <QSharedPointer> \n#include <QNetworkReply> \n \n \nclass CLIB_EXPORT WebApiConnector : public QObject \n{ \n Q_OBJECT \n \n QNetworkAccessManager *_manager; \n \n void replyFinished(QNetworkReply*); \n \n WebApiConnector(); \n \npublic: \n static WebApiConnector * instance() \n { \n static WebApiConnector *inst = new WebApiConnector; \n return inst; \n }; \n ~WebApiConnector(); \n \n void sendMailNotificationFinished( const QString & = QString::null ); \n void sendMailNotificationError( const QString & = QString::null ); \n void sendMailNotification(QString); \n \n void sendSmsNotificationFinished( const QString & = QString::null ); \n void sendSmsNotificationError( const QString & = QString::null ); \n void sendSmsNotification(QString); \n \n void sendNotificationFinished(); \n void sendNotificationError(); \n void sendNotificationError(QString); \n \n QMap<QString, QString> _params; //k - key, t - text, d- destination, a- api url \n}; \n \n#endif" (#ifndef) "#ifndef" (identifier) "WebApiConnector_HG" (preproc_def) "#define WebApiConnector_HG \n" (#define) "#define" (identifier) "WebApiConnector_HG" (preproc_include) "#include <QObject> \n" (#include) "#include" (system_lib_string) "<QObject>" (preproc_include) "#include <cldef.h> \n" (#include) "#include" (system_lib_string) "<cldef.h>" (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 <QMap> \n" (#include) "#include" (system_lib_string) "<QMap>" (preproc_include) "#include <QList> \n" (#include) "#include" (system_lib_string) "<QList>" (preproc_include) "#include <QSharedPointer> \n" (#include) "#include" (system_lib_string) "<QSharedPointer>" (preproc_include) "#include <QNetworkReply> \n" (#include) "#include" (system_lib_string) "<QNetworkReply>" (declaration) "class CLIB_EXPORT" (type_identifier) "class" (identifier) "CLIB_EXPORT" (;) "" (labeled_statement) "WebApiConnector : public QObject \n{ \n Q_OBJECT \n \n QNetworkAccessManager *_manager; \n \n void replyFinished(QNetworkReply*); \n \n WebApiConnector(); \n \npublic: \n static WebApiConnector * instance() \n { \n static WebApiConnector *inst = new WebApiConnector; \n return inst; \n }; \n ~WebApiConnector(); \n \n void sendMailNotificationFinished( const QString & = QString::null ); \n void sendMailNotificationError( const QString & = QString::null ); \n void sendMailNotification(QString); \n \n void sendSmsNotificationFinished( const QString & = QString::null ); \n void sendSmsNotificationError( const QString & = QString::null ); \n void sendSmsNotification(QString); \n \n void sendNotificationFinished(); \n void sendNotificationError(); \n void sendNotificationError(QString); \n \n QMap<QString, QString> _params; //k - key, t - text, d- destination, a- api url \n}" (statement_identifier) "WebApiConnector" (:) ":" (ERROR) "public QObject" (type_identifier) "public" (identifier) "QObject" (compound_statement) "{ \n Q_OBJECT \n \n QNetworkAccessManager *_manager; \n \n void replyFinished(QNetworkReply*); \n \n WebApiConnector(); \n \npublic: \n static WebApiConnector * instance() \n { \n static WebApiConnector *inst = new WebApiConnector; \n return inst; \n }; \n ~WebApiConnector(); \n \n void sendMailNotificationFinished( const QString & = QString::null ); \n void sendMailNotificationError( const QString & = QString::null ); \n void sendMailNotification(QString); \n \n void sendSmsNotificationFinished( const QString & = QString::null ); \n void sendSmsNotificationError( const QString & = QString::null ); \n void sendSmsNotification(QString); \n \n void sendNotificationFinished(); \n void sendNotificationError(); \n void sendNotificationError(QString); \n \n QMap<QString, QString> _params; //k - key, t - text, d- destination, a- api url \n}" ({) "{" (declaration) "Q_OBJECT \n \n QNetworkAccessManager" (type_identifier) "Q_OBJECT" (identifier) "QNetworkAccessManager" (;) "" (expression_statement) "*_manager;" (pointer_expression) "*_manager" (*) "*" (identifier) "_manager" (;) ";" (declaration) "void replyFinished(QNetworkReply*);" (primitive_type) "void" (function_declarator) "replyFinished(QNetworkReply*)" (identifier) "replyFinished" (parameter_list) "(QNetworkReply*)" (() "(" (parameter_declaration) "QNetworkReply*" (type_identifier) "QNetworkReply" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (expression_statement) "WebApiConnector();" (call_expression) "WebApiConnector()" (identifier) "WebApiConnector" (argument_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "public: \n static WebApiConnector * instance() \n { \n static WebApiConnector *inst = new WebApiConnector; \n return inst; \n }" (statement_identifier) "public" (:) ":" (ERROR) "static WebApiConnector * instance()" (storage_class_specifier) "static" (static) "static" (type_identifier) "WebApiConnector" (pointer_declarator) "* instance()" (*) "*" (function_declarator) "instance()" (identifier) "instance" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ \n static WebApiConnector *inst = new WebApiConnector; \n return inst; \n }" ({) "{" (declaration) "static WebApiConnector *inst = new WebApiConnector;" (storage_class_specifier) "static" (static) "static" (type_identifier) "WebApiConnector" (init_declarator) "*inst = new WebApiConnector" (pointer_declarator) "*inst" (*) "*" (identifier) "inst" (=) "=" (ERROR) "new" (identifier) "new" (identifier) "WebApiConnector" (;) ";" (return_statement) "return inst;" (return) "return" (identifier) "inst" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (expression_statement) "~WebApiConnector();" (unary_expression) "~WebApiConnector()" (~) "~" (call_expression) "WebApiConnector()" (identifier) "WebApiConnector" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void sendMailNotificationFinished( const QString & = QString::null );" (primitive_type) "void" (function_declarator) "sendMailNotificationFinished( const QString & = QString::null )" (identifier) "sendMailNotificationFinished" (parameter_list) "( const QString & = QString::null )" (() "(" (parameter_declaration) "const QString & = QString::null" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "& = QString::" (&) "&" (=) "=" (identifier) "QString" (:) ":" (:) ":" (identifier) "null" ()) ")" (;) ";" (declaration) "void sendMailNotificationError( const QString & = QString::null );" (primitive_type) "void" (function_declarator) "sendMailNotificationError( const QString & = QString::null )" (identifier) "sendMailNotificationError" (parameter_list) "( const QString & = QString::null )" (() "(" (parameter_declaration) "const QString & = QString::null" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "& = QString::" (&) "&" (=) "=" (identifier) "QString" (:) ":" (:) ":" (identifier) "null" ()) ")" (;) ";" (declaration) "void sendMailNotification(QString);" (primitive_type) "void" (function_declarator) "sendMailNotification(QString)" (identifier) "sendMailNotification" (parameter_list) "(QString)" (() "(" (parameter_declaration) "QString" (type_identifier) "QString" ()) ")" (;) ";" (declaration) "void sendSmsNotificationFinished( const QString & = QString::null );" (primitive_type) "void" (function_declarator) "sendSmsNotificationFinished( const QString & = QString::null )" (identifier) "sendSmsNotificationFinished" (parameter_list) "( const QString & = QString::null )" (() "(" (parameter_declaration) "const QString & = QString::null" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "& = QString::" (&) "&" (=) "=" (identifier) "QString" (:) ":" (:) ":" (identifier) "null" ()) ")" (;) ";" (declaration) "void sendSmsNotificationError( const QString & = QString::null );" (primitive_type) "void" (function_declarator) "sendSmsNotificationError( const QString & = QString::null )" (identifier) "sendSmsNotificationError" (parameter_list) "( const QString & = QString::null )" (() "(" (parameter_declaration) "const QString & = QString::null" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "& = QString::" (&) "&" (=) "=" (identifier) "QString" (:) ":" (:) ":" (identifier) "null" ()) ")" (;) ";" (declaration) "void sendSmsNotification(QString);" (primitive_type) "void" (function_declarator) "sendSmsNotification(QString)" (identifier) "sendSmsNotification" (parameter_list) "(QString)" (() "(" (parameter_declaration) "QString" (type_identifier) "QString" ()) ")" (;) ";" (declaration) "void sendNotificationFinished();" (primitive_type) "void" (function_declarator) "sendNotificationFinished()" (identifier) "sendNotificationFinished" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void sendNotificationError();" (primitive_type) "void" (function_declarator) "sendNotificationError()" (identifier) "sendNotificationError" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void sendNotificationError(QString);" (primitive_type) "void" (function_declarator) "sendNotificationError(QString)" (identifier) "sendNotificationError" (parameter_list) "(QString)" (() "(" (parameter_declaration) "QString" (type_identifier) "QString" ()) ")" (;) ";" (expression_statement) "QMap<QString, QString> _params;" (comma_expression) "QMap<QString, QString> _params" (binary_expression) "QMap<QString" (identifier) "QMap" (<) "<" (identifier) "QString" (,) "," (binary_expression) "QString> _params" (identifier) "QString" (>) ">" (identifier) "_params" (;) ";" (comment) "//k - key, t - text, d- destination, a- api url " (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// WebApiConnector_HG "
256
7
{"language": "c", "success": true, "metadata": {"lines": 47, "avg_line_length": 23.6, "nodes": 162, "errors": 0, "source_hash": "06c553af6e1eb885879365034faabddd8d88ba17bd001d6f8b7e7f1bae1f8165", "categorized_nodes": 113}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef WebApiConnector_HG\r\n#define WebApiConnector_HG\r\n\r\n#include <QObject>\r\n#include <cldef.h>\r\n#include <QNetworkAccessManager>\r\n#include <QUrl>\r\n#include <QMap>\r\n#include <QList>\r\n#include <QSharedPointer>\r\n#include <QNetworkReply>\r\n\r\n\r\nclass CLIB_EXPORT WebApiConnector : public QObject\r\n{\r\n Q_OBJECT\r\n \r\n\tQNetworkAccessManager *_manager;\r\n\r\n\tvoid replyFinished(QNetworkReply*);\r\n\r\n\tWebApiConnector();\r\n\r\npublic: \r\n\tstatic WebApiConnector * instance()\r\n\t{\r\n\t\tstatic WebApiConnector *inst = new WebApiConnector;\r\n\t\treturn inst;\r\n\t};\r\n\t~WebApiConnector();\r\n\r\n\tvoid sendMailNotificationFinished( const QString & = QString::null );\r\n\tvoid sendMailNotificationError( const QString & = QString::null );\r\n\tvoid sendMailNotification(QString);\r\n\r\n\tvoid sendSmsNotificationFinished( const QString & = QString::null );\r\n\tvoid sendSmsNotificationError( const QString & = QString::null );\t\r\n\tvoid sendSmsNotification(QString);\r\n\r\n\tvoid sendNotificationFinished();\r\n\tvoid sendNotificationError();\r\n\tvoid sendNotificationError(QString);\r\n\r\n\tQMap<QString, QString> _params; //k - key, t - text, d- destination, a- api url\r\n};\r\n\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 32, 161], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 46, "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": "WebApiConnector_HG", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 26}}, {"id": 3, "type": "preproc_def", "text": "#define WebApiConnector_HG\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": "WebApiConnector_HG", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 26}}, {"id": 6, "type": "preproc_include", "text": "#include <QObject>\r\n", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<QObject>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <cldef.h>\r\n", "parent": 0, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<cldef.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include <QNetworkAccessManager>\r\n", "parent": 0, "children": [13, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<QNetworkAccessManager>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 32}}, {"id": 15, "type": "preproc_include", "text": "#include <QUrl>\r\n", "parent": 0, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<QUrl>", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 15}}, {"id": 18, "type": "preproc_include", "text": "#include <QMap>\r\n", "parent": 0, "children": [19, 20], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<QMap>", "parent": 18, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 15}}, {"id": 21, "type": "preproc_include", "text": "#include <QList>\r\n", "parent": 0, "children": [22, 23], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<QList>", "parent": 21, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 16}}, {"id": 24, "type": "preproc_include", "text": "#include <QSharedPointer>\r\n", "parent": 0, "children": [25, 26], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<QSharedPointer>", "parent": 24, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 25}}, {"id": 27, "type": "preproc_include", "text": "#include <QNetworkReply>\r\n", "parent": 0, "children": [28, 29], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 29, "type": "system_lib_string", "text": "<QNetworkReply>", "parent": 27, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 24}}, {"id": 30, "type": "declaration", "text": "class CLIB_EXPORT", "parent": 0, "children": [31], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 17}}, {"id": 31, "type": "identifier", "text": "CLIB_EXPORT", "parent": 30, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 17}}, {"id": 32, "type": "labeled_statement", "text": "WebApiConnector : public QObject\r\n{\r\n Q_OBJECT\r\n \r\n\tQNetworkAccessManager *_manager;\r\n\r\n\tvoid replyFinished(QNetworkReply*);\r\n\r\n\tWebApiConnector();\r\n\r\npublic: \r\n\tstatic WebApiConnector * instance()\r\n\t{\r\n\t\tstatic WebApiConnector *inst = new WebApiConnector;\r\n\t\treturn inst;\r\n\t};\r\n\t~WebApiConnector();\r\n\r\n\tvoid sendMailNotificationFinished( const QString & = QString::null );\r\n\tvoid sendMailNotificationError( const QString & = QString::null );\r\n\tvoid sendMailNotification(QString);\r\n\r\n\tvoid sendSmsNotificationFinished( const QString & = QString::null );\r\n\tvoid sendSmsNotificationError( const QString & = QString::null );\t\r\n\tvoid sendSmsNotification(QString);\r\n\r\n\tvoid sendNotificationFinished();\r\n\tvoid sendNotificationError();\r\n\tvoid sendNotificationError(QString);\r\n\r\n\tQMap<QString, QString> _params; //k - key, t - text, d- destination, a- api url\r\n}", "parent": 0, "children": [33, 34], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 44, "column": 1}}, {"id": 33, "type": "statement_identifier", "text": "WebApiConnector", "parent": 32, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 33}}, {"id": 34, "type": "ERROR", "text": "public QObject", "parent": 32, "children": [35], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 50}}, {"id": 35, "type": "identifier", "text": "QObject", "parent": 34, "children": [], "start_point": {"row": 13, "column": 43}, "end_point": {"row": 13, "column": 50}}, {"id": 36, "type": "declaration", "text": "Q_OBJECT\r\n \r\n\tQNetworkAccessManager", "parent": 32, "children": [37, 38], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 17, "column": 22}}, {"id": 37, "type": "type_identifier", "text": "Q_OBJECT", "parent": 36, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 12}}, {"id": 38, "type": "identifier", "text": "QNetworkAccessManager", "parent": 36, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 22}}, {"id": 39, "type": "pointer_expression", "text": "*_manager", "parent": 32, "children": [40, 41], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 32}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 24}}, {"id": 41, "type": "identifier", "text": "_manager", "parent": 39, "children": [], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 32}}, {"id": 42, "type": "declaration", "text": "void replyFinished(QNetworkReply*);", "parent": 32, "children": [43, 44], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 36}}, {"id": 43, "type": "primitive_type", "text": "void", "parent": 42, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 5}}, {"id": 44, "type": "function_declarator", "text": "replyFinished(QNetworkReply*)", "parent": 42, "children": [45, 46], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 35}}, {"id": 45, "type": "identifier", "text": "replyFinished", "parent": 44, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 19}}, {"id": 46, "type": "parameter_list", "text": "(QNetworkReply*)", "parent": 44, "children": [47], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 35}}, {"id": 47, "type": "parameter_declaration", "text": "QNetworkReply*", "parent": 46, "children": [48, 49], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 34}}, {"id": 48, "type": "type_identifier", "text": "QNetworkReply", "parent": 47, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 33}}, {"id": 49, "type": "abstract_pointer_declarator", "text": "*", "parent": 47, "children": [50], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 34}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 34}}, {"id": 51, "type": "call_expression", "text": "WebApiConnector()", "parent": 32, "children": [52, 53], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 18}}, {"id": 52, "type": "identifier", "text": "WebApiConnector", "parent": 51, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 16}}, {"id": 53, "type": "argument_list", "text": "()", "parent": 51, "children": [], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 18}}, {"id": 54, "type": "labeled_statement", "text": "public: \r\n\tstatic WebApiConnector * instance()\r\n\t{\r\n\t\tstatic WebApiConnector *inst = new WebApiConnector;\r\n\t\treturn inst;\r\n\t}", "parent": 32, "children": [55], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 28, "column": 2}}, {"id": 55, "type": "ERROR", "text": "static WebApiConnector * instance()", "parent": 54, "children": [56, 57], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 36}}, {"id": 56, "type": "type_identifier", "text": "WebApiConnector", "parent": 55, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 23}}, {"id": 57, "type": "pointer_declarator", "text": "* instance()", "parent": 55, "children": [58, 59], "start_point": {"row": 24, "column": 24}, "end_point": {"row": 24, "column": 36}}, {"id": 58, "type": "*", "text": "*", "parent": 57, "children": [], "start_point": {"row": 24, "column": 24}, "end_point": {"row": 24, "column": 25}}, {"id": 59, "type": "function_declarator", "text": "instance()", "parent": 57, "children": [60, 61], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 36}}, {"id": 60, "type": "identifier", "text": "instance", "parent": 59, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 34}}, {"id": 61, "type": "parameter_list", "text": "()", "parent": 59, "children": [], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 36}}, {"id": 62, "type": "declaration", "text": "static WebApiConnector *inst = new WebApiConnector;", "parent": 54, "children": [63, 64], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 53}}, {"id": 63, "type": "type_identifier", "text": "WebApiConnector", "parent": 62, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 24}}, {"id": 64, "type": "init_declarator", "text": "*inst = new WebApiConnector", "parent": 62, "children": [65, 68, 69], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 52}}, {"id": 65, "type": "pointer_declarator", "text": "*inst", "parent": 64, "children": [66, 67], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 30}}, {"id": 66, "type": "*", "text": "*", "parent": 65, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 26}}, {"id": 67, "type": "identifier", "text": "inst", "parent": 65, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 30}}, {"id": 68, "type": "=", "text": "=", "parent": 64, "children": [], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 32}}, {"id": 69, "type": "identifier", "text": "WebApiConnector", "parent": 64, "children": [], "start_point": {"row": 26, "column": 37}, "end_point": {"row": 26, "column": 52}}, {"id": 70, "type": "return_statement", "text": "return inst;", "parent": 54, "children": [71], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 14}}, {"id": 71, "type": "identifier", "text": "inst", "parent": 70, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 13}}, {"id": 72, "type": "unary_expression", "text": "~WebApiConnector()", "parent": 32, "children": [73, 74], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 19}}, {"id": 73, "type": "~", "text": "~", "parent": 72, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 2}}, {"id": 74, "type": "call_expression", "text": "WebApiConnector()", "parent": 72, "children": [75, 76], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 19}}, {"id": 75, "type": "identifier", "text": "WebApiConnector", "parent": 74, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 17}}, {"id": 76, "type": "argument_list", "text": "()", "parent": 74, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 19}}, {"id": 77, "type": "declaration", "text": "void sendMailNotificationFinished( const QString & = QString::null );", "parent": 32, "children": [78, 79], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 70}}, {"id": 78, "type": "primitive_type", "text": "void", "parent": 77, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 5}}, {"id": 79, "type": "function_declarator", "text": "sendMailNotificationFinished( const QString & = QString::null )", "parent": 77, "children": [80, 81], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 69}}, {"id": 80, "type": "identifier", "text": "sendMailNotificationFinished", "parent": 79, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 34}}, {"id": 81, "type": "parameter_list", "text": "( const QString & = QString::null )", "parent": 79, "children": [82], "start_point": {"row": 31, "column": 34}, "end_point": {"row": 31, "column": 69}}, {"id": 82, "type": "parameter_declaration", "text": "const QString & = QString::null", "parent": 81, "children": [83, 84, 87], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 67}}, {"id": 83, "type": "type_identifier", "text": "QString", "parent": 82, "children": [], "start_point": {"row": 31, "column": 42}, "end_point": {"row": 31, "column": 49}}, {"id": 84, "type": "ERROR", "text": "& = QString::", "parent": 82, "children": [85, 86], "start_point": {"row": 31, "column": 50}, "end_point": {"row": 31, "column": 63}}, {"id": 85, "type": "=", "text": "=", "parent": 84, "children": [], "start_point": {"row": 31, "column": 52}, "end_point": {"row": 31, "column": 53}}, {"id": 86, "type": "identifier", "text": "QString", "parent": 84, "children": [], "start_point": {"row": 31, "column": 54}, "end_point": {"row": 31, "column": 61}}, {"id": 87, "type": "identifier", "text": "null", "parent": 82, "children": [], "start_point": {"row": 31, "column": 63}, "end_point": {"row": 31, "column": 67}}, {"id": 88, "type": "declaration", "text": "void sendMailNotificationError( const QString & = QString::null );", "parent": 32, "children": [89, 90], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 67}}, {"id": 89, "type": "primitive_type", "text": "void", "parent": 88, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 5}}, {"id": 90, "type": "function_declarator", "text": "sendMailNotificationError( const QString & = QString::null )", "parent": 88, "children": [91, 92], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 66}}, {"id": 91, "type": "identifier", "text": "sendMailNotificationError", "parent": 90, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 31}}, {"id": 92, "type": "parameter_list", "text": "( const QString & = QString::null )", "parent": 90, "children": [93], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 66}}, {"id": 93, "type": "parameter_declaration", "text": "const QString & = QString::null", "parent": 92, "children": [94, 95, 98], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 64}}, {"id": 94, "type": "type_identifier", "text": "QString", "parent": 93, "children": [], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 46}}, {"id": 95, "type": "ERROR", "text": "& = QString::", "parent": 93, "children": [96, 97], "start_point": {"row": 32, "column": 47}, "end_point": {"row": 32, "column": 60}}, {"id": 96, "type": "=", "text": "=", "parent": 95, "children": [], "start_point": {"row": 32, "column": 49}, "end_point": {"row": 32, "column": 50}}, {"id": 97, "type": "identifier", "text": "QString", "parent": 95, "children": [], "start_point": {"row": 32, "column": 51}, "end_point": {"row": 32, "column": 58}}, {"id": 98, "type": "identifier", "text": "null", "parent": 93, "children": [], "start_point": {"row": 32, "column": 60}, "end_point": {"row": 32, "column": 64}}, {"id": 99, "type": "declaration", "text": "void sendMailNotification(QString);", "parent": 32, "children": [100, 101], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 36}}, {"id": 100, "type": "primitive_type", "text": "void", "parent": 99, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 5}}, {"id": 101, "type": "function_declarator", "text": "sendMailNotification(QString)", "parent": 99, "children": [102, 103], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 35}}, {"id": 102, "type": "identifier", "text": "sendMailNotification", "parent": 101, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 26}}, {"id": 103, "type": "parameter_list", "text": "(QString)", "parent": 101, "children": [104], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 35}}, {"id": 104, "type": "parameter_declaration", "text": "QString", "parent": 103, "children": [105], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 34}}, {"id": 105, "type": "type_identifier", "text": "QString", "parent": 104, "children": [], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 34}}, {"id": 106, "type": "declaration", "text": "void sendSmsNotificationFinished( const QString & = QString::null );", "parent": 32, "children": [107, 108], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 69}}, {"id": 107, "type": "primitive_type", "text": "void", "parent": 106, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 5}}, {"id": 108, "type": "function_declarator", "text": "sendSmsNotificationFinished( const QString & = QString::null )", "parent": 106, "children": [109, 110], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 68}}, {"id": 109, "type": "identifier", "text": "sendSmsNotificationFinished", "parent": 108, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 33}}, {"id": 110, "type": "parameter_list", "text": "( const QString & = QString::null )", "parent": 108, "children": [111], "start_point": {"row": 35, "column": 33}, "end_point": {"row": 35, "column": 68}}, {"id": 111, "type": "parameter_declaration", "text": "const QString & = QString::null", "parent": 110, "children": [112, 113, 116], "start_point": {"row": 35, "column": 35}, "end_point": {"row": 35, "column": 66}}, {"id": 112, "type": "type_identifier", "text": "QString", "parent": 111, "children": [], "start_point": {"row": 35, "column": 41}, "end_point": {"row": 35, "column": 48}}, {"id": 113, "type": "ERROR", "text": "& = QString::", "parent": 111, "children": [114, 115], "start_point": {"row": 35, "column": 49}, "end_point": {"row": 35, "column": 62}}, {"id": 114, "type": "=", "text": "=", "parent": 113, "children": [], "start_point": {"row": 35, "column": 51}, "end_point": {"row": 35, "column": 52}}, {"id": 115, "type": "identifier", "text": "QString", "parent": 113, "children": [], "start_point": {"row": 35, "column": 53}, "end_point": {"row": 35, "column": 60}}, {"id": 116, "type": "identifier", "text": "null", "parent": 111, "children": [], "start_point": {"row": 35, "column": 62}, "end_point": {"row": 35, "column": 66}}, {"id": 117, "type": "declaration", "text": "void sendSmsNotificationError( const QString & = QString::null );", "parent": 32, "children": [118, 119], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 66}}, {"id": 118, "type": "primitive_type", "text": "void", "parent": 117, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 5}}, {"id": 119, "type": "function_declarator", "text": "sendSmsNotificationError( const QString & = QString::null )", "parent": 117, "children": [120, 121], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 65}}, {"id": 120, "type": "identifier", "text": "sendSmsNotificationError", "parent": 119, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 30}}, {"id": 121, "type": "parameter_list", "text": "( const QString & = QString::null )", "parent": 119, "children": [122], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 65}}, {"id": 122, "type": "parameter_declaration", "text": "const QString & = QString::null", "parent": 121, "children": [123, 124, 127], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 63}}, {"id": 123, "type": "type_identifier", "text": "QString", "parent": 122, "children": [], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 45}}, {"id": 124, "type": "ERROR", "text": "& = QString::", "parent": 122, "children": [125, 126], "start_point": {"row": 36, "column": 46}, "end_point": {"row": 36, "column": 59}}, {"id": 125, "type": "=", "text": "=", "parent": 124, "children": [], "start_point": {"row": 36, "column": 48}, "end_point": {"row": 36, "column": 49}}, {"id": 126, "type": "identifier", "text": "QString", "parent": 124, "children": [], "start_point": {"row": 36, "column": 50}, "end_point": {"row": 36, "column": 57}}, {"id": 127, "type": "identifier", "text": "null", "parent": 122, "children": [], "start_point": {"row": 36, "column": 59}, "end_point": {"row": 36, "column": 63}}, {"id": 128, "type": "declaration", "text": "void sendSmsNotification(QString);", "parent": 32, "children": [129, 130], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 35}}, {"id": 129, "type": "primitive_type", "text": "void", "parent": 128, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 5}}, {"id": 130, "type": "function_declarator", "text": "sendSmsNotification(QString)", "parent": 128, "children": [131, 132], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 34}}, {"id": 131, "type": "identifier", "text": "sendSmsNotification", "parent": 130, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 25}}, {"id": 132, "type": "parameter_list", "text": "(QString)", "parent": 130, "children": [133], "start_point": {"row": 37, "column": 25}, "end_point": {"row": 37, "column": 34}}, {"id": 133, "type": "parameter_declaration", "text": "QString", "parent": 132, "children": [134], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 33}}, {"id": 134, "type": "type_identifier", "text": "QString", "parent": 133, "children": [], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 33}}, {"id": 135, "type": "declaration", "text": "void sendNotificationFinished();", "parent": 32, "children": [136, 137], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 33}}, {"id": 136, "type": "primitive_type", "text": "void", "parent": 135, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 5}}, {"id": 137, "type": "function_declarator", "text": "sendNotificationFinished()", "parent": 135, "children": [138, 139], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 32}}, {"id": 138, "type": "identifier", "text": "sendNotificationFinished", "parent": 137, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 30}}, {"id": 139, "type": "parameter_list", "text": "()", "parent": 137, "children": [], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 32}}, {"id": 140, "type": "declaration", "text": "void sendNotificationError();", "parent": 32, "children": [141, 142], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 30}}, {"id": 141, "type": "primitive_type", "text": "void", "parent": 140, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 5}}, {"id": 142, "type": "function_declarator", "text": "sendNotificationError()", "parent": 140, "children": [143, 144], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 29}}, {"id": 143, "type": "identifier", "text": "sendNotificationError", "parent": 142, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 27}}, {"id": 144, "type": "parameter_list", "text": "()", "parent": 142, "children": [], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 40, "column": 29}}, {"id": 145, "type": "declaration", "text": "void sendNotificationError(QString);", "parent": 32, "children": [146, 147], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 37}}, {"id": 146, "type": "primitive_type", "text": "void", "parent": 145, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 5}}, {"id": 147, "type": "function_declarator", "text": "sendNotificationError(QString)", "parent": 145, "children": [148, 149], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 36}}, {"id": 148, "type": "identifier", "text": "sendNotificationError", "parent": 147, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 27}}, {"id": 149, "type": "parameter_list", "text": "(QString)", "parent": 147, "children": [150], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 36}}, {"id": 150, "type": "parameter_declaration", "text": "QString", "parent": 149, "children": [151], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 35}}, {"id": 151, "type": "type_identifier", "text": "QString", "parent": 150, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 35}}, {"id": 152, "type": "comma_expression", "text": "QMap<QString, QString> _params", "parent": 32, "children": [153, 157], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 31}}, {"id": 153, "type": "binary_expression", "text": "QMap<QString", "parent": 152, "children": [154, 155, 156], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 13}}, {"id": 154, "type": "identifier", "text": "QMap", "parent": 153, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 5}}, {"id": 155, "type": "<", "text": "<", "parent": 153, "children": [], "start_point": {"row": 43, "column": 5}, "end_point": {"row": 43, "column": 6}}, {"id": 156, "type": "identifier", "text": "QString", "parent": 153, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 13}}, {"id": 157, "type": "binary_expression", "text": "QString> _params", "parent": 152, "children": [158, 159, 160], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 31}}, {"id": 158, "type": "identifier", "text": "QString", "parent": 157, "children": [], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 22}}, {"id": 159, "type": ">", "text": ">", "parent": 157, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 23}}, {"id": 160, "type": "identifier", "text": "_params", "parent": 157, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 31}}, {"id": 161, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 6}}]}, "node_categories": {"declarations": {"functions": [44, 59, 79, 90, 101, 108, 119, 130, 137, 142, 147], "variables": [30, 36, 42, 47, 62, 77, 82, 88, 93, 99, 104, 106, 111, 117, 122, 128, 133, 135, 140, 145, 150], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28], "modules": [], "enums": []}, "statements": {"expressions": [39, 51, 72, 74, 152, 153, 157], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 31, 33, 35, 37, 38, 41, 45, 48, 52, 56, 60, 63, 67, 69, 71, 75, 80, 83, 86, 87, 91, 94, 97, 98, 102, 105, 109, 112, 115, 116, 120, 123, 126, 127, 131, 134, 138, 143, 148, 151, 154, 156, 158, 160, 161], "returns": [70], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "replyFinished(QNetworkReply*)"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "instance()"}, {"node_id": 79, "universal_type": "function", "name": "unknown", "text_snippet": "sendMailNotificationFinished( const QString & = QString::null )"}, {"node_id": 90, "universal_type": "function", "name": "unknown", "text_snippet": "sendMailNotificationError( const QString & = QString::null )"}, {"node_id": 101, "universal_type": "function", "name": "unknown", "text_snippet": "sendMailNotification(QString)"}, {"node_id": 108, "universal_type": "function", "name": "unknown", "text_snippet": "sendSmsNotificationFinished( const QString & = QString::null )"}, {"node_id": 119, "universal_type": "function", "name": "unknown", "text_snippet": "sendSmsNotificationError( const QString & = QString::null )"}, {"node_id": 130, "universal_type": "function", "name": "unknown", "text_snippet": "sendSmsNotification(QString)"}, {"node_id": 137, "universal_type": "function", "name": "unknown", "text_snippet": "sendNotificationFinished()"}, {"node_id": 142, "universal_type": "function", "name": "unknown", "text_snippet": "sendNotificationError()"}, {"node_id": 147, "universal_type": "function", "name": "unknown", "text_snippet": "sendNotificationError(QString)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <QObject>\r\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <cldef.h>\r\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <QNetworkAccessManager>\r\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <QUrl>\r\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <QMap>\r\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <QList>\r\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <QSharedPointer>\r\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <QNetworkReply>\r\n"}, {"node_id": 28, "text": "#include"}]}, "original_source_code": "#ifndef WebApiConnector_HG\r\n#define WebApiConnector_HG\r\n\r\n#include <QObject>\r\n#include <cldef.h>\r\n#include <QNetworkAccessManager>\r\n#include <QUrl>\r\n#include <QMap>\r\n#include <QList>\r\n#include <QSharedPointer>\r\n#include <QNetworkReply>\r\n\r\n\r\nclass CLIB_EXPORT WebApiConnector : public QObject\r\n{\r\n Q_OBJECT\r\n \r\n\tQNetworkAccessManager *_manager;\r\n\r\n\tvoid replyFinished(QNetworkReply*);\r\n\r\n\tWebApiConnector();\r\n\r\npublic: \r\n\tstatic WebApiConnector * instance()\r\n\t{\r\n\t\tstatic WebApiConnector *inst = new WebApiConnector;\r\n\t\treturn inst;\r\n\t};\r\n\t~WebApiConnector();\r\n\r\n\tvoid sendMailNotificationFinished( const QString & = QString::null );\r\n\tvoid sendMailNotificationError( const QString & = QString::null );\r\n\tvoid sendMailNotification(QString);\r\n\r\n\tvoid sendSmsNotificationFinished( const QString & = QString::null );\r\n\tvoid sendSmsNotificationError( const QString & = QString::null );\t\r\n\tvoid sendSmsNotification(QString);\r\n\r\n\tvoid sendNotificationFinished();\r\n\tvoid sendNotificationError();\r\n\tvoid sendNotificationError(QString);\r\n\r\n\tQMap<QString, QString> _params; //k - key, t - text, d- destination, a- api url\r\n};\r\n\r\n#endif // WebApiConnector_HG\r\n"}
324
c
#include <stdio.h> #include "reserved_words.h" /* * Adds a reserved word to the reserved word table. * * Arguments: word -> Literal of the word to be added. * type -> Token type associated with the reserved word. * attr -> Token attribute associated with the reserved word. * * Returns: A pointer to the reserved word added to the table. */ static struct Reserved_Word * add_reserved_word(char word[], int type, int attr) { struct Reserved_Word *current = reserved_word_table; while (current -> next != NULL) { current = current -> next; } current -> next = malloc(sizeof(struct Reserved_Word)); strcpy(current -> word, word); current -> token_type = type; current -> attribute = attr; current -> next -> next = NULL; return current -> next; } /* * Checks if a given word is in the reserved word table. * * Arguments: word -> Literal of the word to be checked. * * Returns: The token associated with the reserved word. If no reserved word is * found, returns a null Optional_Token. */ union Optional_Token check_reserved_words(char word[]) { struct Reserved_Word *current = reserved_word_table; do { if (strcmp(current -> word, word) == 0) { return make_optional(word, current -> token_type, current -> attribute, NULL); } current = current -> next; } while (current -> next != NULL); return null_optional(); } /* * Initializes the reserved word table from the RESERVED_WORDS file. * * Arguments: rfp -> Pointer to the reserved word file. * * Returns: A pointer to the reserved word table. */ struct Reserved_Word * initialize_reserved_words(FILE *rfp) { reserved_word_table = malloc(sizeof(struct Reserved_Word)); reserved_word_table -> next = NULL; char buff[80]; fgets(buff, 80, rfp); while(!feof(rfp)) { if (buff[0] != '\n') { char word[11]; int type; int attr; sscanf(buff, "%s %d %d", word, &type, &attr); add_reserved_word(word, type, attr); } fgets(buff, 80, rfp); } return reserved_word_table; }
34.11
71
(translation_unit) "#include <stdio.h>\n#include "reserved_words.h"\n\n/*\n * Adds a reserved word to the reserved word table.\n *\n * Arguments: word -> Literal of the word to be added.\n * type -> Token type associated with the reserved word.\n * attr -> Token attribute associated with the reserved word.\n *\n * Returns: A pointer to the reserved word added to the table.\n */\nstatic struct Reserved_Word * add_reserved_word(char word[], int type, int attr)\n{\n struct Reserved_Word *current = reserved_word_table;\n\n while (current -> next != NULL) {\n current = current -> next;\n }\n\n current -> next = malloc(sizeof(struct Reserved_Word));\n strcpy(current -> word, word);\n current -> token_type = type;\n current -> attribute = attr;\n current -> next -> next = NULL;\n\n return current -> next;\n}\n\n/*\n * Checks if a given word is in the reserved word table.\n *\n * Arguments: word -> Literal of the word to be checked.\n *\n * Returns: The token associated with the reserved word. If no reserved word is\n * found, returns a null Optional_Token.\n */\nunion Optional_Token check_reserved_words(char word[])\n{\n struct Reserved_Word *current = reserved_word_table;\n\n do {\n if (strcmp(current -> word, word) == 0) {\n return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);\n }\n current = current -> next;\n } while (current -> next != NULL);\n\n return null_optional();\n}\n\n/*\n * Initializes the reserved word table from the RESERVED_WORDS file.\n *\n * Arguments: rfp -> Pointer to the reserved word file.\n *\n * Returns: A pointer to the reserved word table.\n */\nstruct Reserved_Word * initialize_reserved_words(FILE *rfp)\n{\n reserved_word_table = malloc(sizeof(struct Reserved_Word));\n reserved_word_table -> next = NULL;\n char buff[80];\n fgets(buff, 80, rfp);\n\n while(!feof(rfp)) {\n if (buff[0] != '\n') {\n char word[11];\n int type;\n int attr;\n\n sscanf(buff, "%s %d %d", word, &type, &attr);\n add_reserved_word(word, type, attr);\n }\n fgets(buff, 80, rfp);\n }\n return reserved_word_table;\n}\n" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include "reserved_words.h"\n" (#include) "#include" (string_literal) ""reserved_words.h"" (") """ (string_content) "reserved_words.h" (") """ (comment) "/*\n * Adds a reserved word to the reserved word table.\n *\n * Arguments: word -> Literal of the word to be added.\n * type -> Token type associated with the reserved word.\n * attr -> Token attribute associated with the reserved word.\n *\n * Returns: A pointer to the reserved word added to the table.\n */" (function_definition) "static struct Reserved_Word * add_reserved_word(char word[], int type, int attr)\n{\n struct Reserved_Word *current = reserved_word_table;\n\n while (current -> next != NULL) {\n current = current -> next;\n }\n\n current -> next = malloc(sizeof(struct Reserved_Word));\n strcpy(current -> word, word);\n current -> token_type = type;\n current -> attribute = attr;\n current -> next -> next = NULL;\n\n return current -> next;\n}" (storage_class_specifier) "static" (static) "static" (struct_specifier) "struct Reserved_Word" (struct) "struct" (type_identifier) "Reserved_Word" (pointer_declarator) "* add_reserved_word(char word[], int type, int attr)" (*) "*" (function_declarator) "add_reserved_word(char word[], int type, int attr)" (identifier) "add_reserved_word" (parameter_list) "(char word[], int type, int attr)" (() "(" (parameter_declaration) "char word[]" (primitive_type) "char" (array_declarator) "word[]" (identifier) "word" ([) "[" (]) "]" (,) "," (parameter_declaration) "int type" (primitive_type) "int" (identifier) "type" (,) "," (parameter_declaration) "int attr" (primitive_type) "int" (identifier) "attr" ()) ")" (compound_statement) "{\n struct Reserved_Word *current = reserved_word_table;\n\n while (current -> next != NULL) {\n current = current -> next;\n }\n\n current -> next = malloc(sizeof(struct Reserved_Word));\n strcpy(current -> word, word);\n current -> token_type = type;\n current -> attribute = attr;\n current -> next -> next = NULL;\n\n return current -> next;\n}" ({) "{" (declaration) "struct Reserved_Word *current = reserved_word_table;" (struct_specifier) "struct Reserved_Word" (struct) "struct" (type_identifier) "Reserved_Word" (init_declarator) "*current = reserved_word_table" (pointer_declarator) "*current" (*) "*" (identifier) "current" (=) "=" (identifier) "reserved_word_table" (;) ";" (while_statement) "while (current -> next != NULL) {\n current = current -> next;\n }" (while) "while" (parenthesized_expression) "(current -> next != NULL)" (() "(" (binary_expression) "current -> next != NULL" (field_expression) "current -> next" (identifier) "current" (->) "->" (field_identifier) "next" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n current = current -> next;\n }" ({) "{" (expression_statement) "current = current -> next;" (assignment_expression) "current = current -> next" (identifier) "current" (=) "=" (field_expression) "current -> next" (identifier) "current" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (expression_statement) "current -> next = malloc(sizeof(struct Reserved_Word));" (assignment_expression) "current -> next = malloc(sizeof(struct Reserved_Word))" (field_expression) "current -> next" (identifier) "current" (->) "->" (field_identifier) "next" (=) "=" (call_expression) "malloc(sizeof(struct Reserved_Word))" (identifier) "malloc" (argument_list) "(sizeof(struct Reserved_Word))" (() "(" (sizeof_expression) "sizeof(struct Reserved_Word)" (sizeof) "sizeof" (() "(" (type_descriptor) "struct Reserved_Word" (struct_specifier) "struct Reserved_Word" (struct) "struct" (type_identifier) "Reserved_Word" ()) ")" ()) ")" (;) ";" (expression_statement) "strcpy(current -> word, word);" (call_expression) "strcpy(current -> word, word)" (identifier) "strcpy" (argument_list) "(current -> word, word)" (() "(" (field_expression) "current -> word" (identifier) "current" (->) "->" (field_identifier) "word" (,) "," (identifier) "word" ()) ")" (;) ";" (expression_statement) "current -> token_type = type;" (assignment_expression) "current -> token_type = type" (field_expression) "current -> token_type" (identifier) "current" (->) "->" (field_identifier) "token_type" (=) "=" (identifier) "type" (;) ";" (expression_statement) "current -> attribute = attr;" (assignment_expression) "current -> attribute = attr" (field_expression) "current -> attribute" (identifier) "current" (->) "->" (field_identifier) "attribute" (=) "=" (identifier) "attr" (;) ";" (expression_statement) "current -> next -> next = NULL;" (assignment_expression) "current -> next -> next = NULL" (field_expression) "current -> next -> next" (field_expression) "current -> next" (identifier) "current" (->) "->" (field_identifier) "next" (->) "->" (field_identifier) "next" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (return_statement) "return current -> next;" (return) "return" (field_expression) "current -> next" (identifier) "current" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (comment) "/*\n * Checks if a given word is in the reserved word table.\n *\n * Arguments: word -> Literal of the word to be checked.\n *\n * Returns: The token associated with the reserved word. If no reserved word is\n * found, returns a null Optional_Token.\n */" (function_definition) "union Optional_Token check_reserved_words(char word[])\n{\n struct Reserved_Word *current = reserved_word_table;\n\n do {\n if (strcmp(current -> word, word) == 0) {\n return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);\n }\n current = current -> next;\n } while (current -> next != NULL);\n\n return null_optional();\n}" (union_specifier) "union Optional_Token" (union) "union" (type_identifier) "Optional_Token" (function_declarator) "check_reserved_words(char word[])" (identifier) "check_reserved_words" (parameter_list) "(char word[])" (() "(" (parameter_declaration) "char word[]" (primitive_type) "char" (array_declarator) "word[]" (identifier) "word" ([) "[" (]) "]" ()) ")" (compound_statement) "{\n struct Reserved_Word *current = reserved_word_table;\n\n do {\n if (strcmp(current -> word, word) == 0) {\n return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);\n }\n current = current -> next;\n } while (current -> next != NULL);\n\n return null_optional();\n}" ({) "{" (declaration) "struct Reserved_Word *current = reserved_word_table;" (struct_specifier) "struct Reserved_Word" (struct) "struct" (type_identifier) "Reserved_Word" (init_declarator) "*current = reserved_word_table" (pointer_declarator) "*current" (*) "*" (identifier) "current" (=) "=" (identifier) "reserved_word_table" (;) ";" (do_statement) "do {\n if (strcmp(current -> word, word) == 0) {\n return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);\n }\n current = current -> next;\n } while (current -> next != NULL);" (do) "do" (compound_statement) "{\n if (strcmp(current -> word, word) == 0) {\n return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);\n }\n current = current -> next;\n }" ({) "{" (if_statement) "if (strcmp(current -> word, word) == 0) {\n return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);\n }" (if) "if" (parenthesized_expression) "(strcmp(current -> word, word) == 0)" (() "(" (binary_expression) "strcmp(current -> word, word) == 0" (call_expression) "strcmp(current -> word, word)" (identifier) "strcmp" (argument_list) "(current -> word, word)" (() "(" (field_expression) "current -> word" (identifier) "current" (->) "->" (field_identifier) "word" (,) "," (identifier) "word" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);\n }" ({) "{" (return_statement) "return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);" (return) "return" (call_expression) "make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL)" (identifier) "make_optional" (argument_list) "(word,\n current -> token_type,\n current -> attribute,\n NULL)" (() "(" (identifier) "word" (,) "," (field_expression) "current -> token_type" (identifier) "current" (->) "->" (field_identifier) "token_type" (,) "," (field_expression) "current -> attribute" (identifier) "current" (->) "->" (field_identifier) "attribute" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (}) "}" (expression_statement) "current = current -> next;" (assignment_expression) "current = current -> next" (identifier) "current" (=) "=" (field_expression) "current -> next" (identifier) "current" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (while) "while" (parenthesized_expression) "(current -> next != NULL)" (() "(" (binary_expression) "current -> next != NULL" (field_expression) "current -> next" (identifier) "current" (->) "->" (field_identifier) "next" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (return_statement) "return null_optional();" (return) "return" (call_expression) "null_optional()" (identifier) "null_optional" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "/*\n * Initializes the reserved word table from the RESERVED_WORDS file.\n *\n * Arguments: rfp -> Pointer to the reserved word file.\n *\n * Returns: A pointer to the reserved word table.\n */" (function_definition) "struct Reserved_Word * initialize_reserved_words(FILE *rfp)\n{\n reserved_word_table = malloc(sizeof(struct Reserved_Word));\n reserved_word_table -> next = NULL;\n char buff[80];\n fgets(buff, 80, rfp);\n\n while(!feof(rfp)) {\n if (buff[0] != '\n') {\n char word[11];\n int type;\n int attr;\n\n sscanf(buff, "%s %d %d", word, &type, &attr);\n add_reserved_word(word, type, attr);\n }\n fgets(buff, 80, rfp);\n }\n return reserved_word_table;\n}" (struct_specifier) "struct Reserved_Word" (struct) "struct" (type_identifier) "Reserved_Word" (pointer_declarator) "* initialize_reserved_words(FILE *rfp)" (*) "*" (function_declarator) "initialize_reserved_words(FILE *rfp)" (identifier) "initialize_reserved_words" (parameter_list) "(FILE *rfp)" (() "(" (parameter_declaration) "FILE *rfp" (type_identifier) "FILE" (pointer_declarator) "*rfp" (*) "*" (identifier) "rfp" ()) ")" (compound_statement) "{\n reserved_word_table = malloc(sizeof(struct Reserved_Word));\n reserved_word_table -> next = NULL;\n char buff[80];\n fgets(buff, 80, rfp);\n\n while(!feof(rfp)) {\n if (buff[0] != '\n') {\n char word[11];\n int type;\n int attr;\n\n sscanf(buff, "%s %d %d", word, &type, &attr);\n add_reserved_word(word, type, attr);\n }\n fgets(buff, 80, rfp);\n }\n return reserved_word_table;\n}" ({) "{" (expression_statement) "reserved_word_table = malloc(sizeof(struct Reserved_Word));" (assignment_expression) "reserved_word_table = malloc(sizeof(struct Reserved_Word))" (identifier) "reserved_word_table" (=) "=" (call_expression) "malloc(sizeof(struct Reserved_Word))" (identifier) "malloc" (argument_list) "(sizeof(struct Reserved_Word))" (() "(" (sizeof_expression) "sizeof(struct Reserved_Word)" (sizeof) "sizeof" (() "(" (type_descriptor) "struct Reserved_Word" (struct_specifier) "struct Reserved_Word" (struct) "struct" (type_identifier) "Reserved_Word" ()) ")" ()) ")" (;) ";" (expression_statement) "reserved_word_table -> next = NULL;" (assignment_expression) "reserved_word_table -> next = NULL" (field_expression) "reserved_word_table -> next" (identifier) "reserved_word_table" (->) "->" (field_identifier) "next" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "char buff[80];" (primitive_type) "char" (array_declarator) "buff[80]" (identifier) "buff" ([) "[" (number_literal) "80" (]) "]" (;) ";" (expression_statement) "fgets(buff, 80, rfp);" (call_expression) "fgets(buff, 80, rfp)" (identifier) "fgets" (argument_list) "(buff, 80, rfp)" (() "(" (identifier) "buff" (,) "," (number_literal) "80" (,) "," (identifier) "rfp" ()) ")" (;) ";" (while_statement) "while(!feof(rfp)) {\n if (buff[0] != '\n') {\n char word[11];\n int type;\n int attr;\n\n sscanf(buff, "%s %d %d", word, &type, &attr);\n add_reserved_word(word, type, attr);\n }\n fgets(buff, 80, rfp);\n }" (while) "while" (parenthesized_expression) "(!feof(rfp))" (() "(" (unary_expression) "!feof(rfp)" (!) "!" (call_expression) "feof(rfp)" (identifier) "feof" (argument_list) "(rfp)" (() "(" (identifier) "rfp" ()) ")" ()) ")" (compound_statement) "{\n if (buff[0] != '\n') {\n char word[11];\n int type;\n int attr;\n\n sscanf(buff, "%s %d %d", word, &type, &attr);\n add_reserved_word(word, type, attr);\n }\n fgets(buff, 80, rfp);\n }" ({) "{" (if_statement) "if (buff[0] != '\n') {\n char word[11];\n int type;\n int attr;\n\n sscanf(buff, "%s %d %d", word, &type, &attr);\n add_reserved_word(word, type, attr);\n }" (if) "if" (parenthesized_expression) "(buff[0] != '\n')" (() "(" (binary_expression) "buff[0] != '\n'" (subscript_expression) "buff[0]" (identifier) "buff" ([) "[" (number_literal) "0" (]) "]" (!=) "!=" (char_literal) "'\n'" (') "'" (escape_sequence) "\n" (') "'" ()) ")" (compound_statement) "{\n char word[11];\n int type;\n int attr;\n\n sscanf(buff, "%s %d %d", word, &type, &attr);\n add_reserved_word(word, type, attr);\n }" ({) "{" (declaration) "char word[11];" (primitive_type) "char" (array_declarator) "word[11]" (identifier) "word" ([) "[" (number_literal) "11" (]) "]" (;) ";" (declaration) "int type;" (primitive_type) "int" (identifier) "type" (;) ";" (declaration) "int attr;" (primitive_type) "int" (identifier) "attr" (;) ";" (expression_statement) "sscanf(buff, "%s %d %d", word, &type, &attr);" (call_expression) "sscanf(buff, "%s %d %d", word, &type, &attr)" (identifier) "sscanf" (argument_list) "(buff, "%s %d %d", word, &type, &attr)" (() "(" (identifier) "buff" (,) "," (string_literal) ""%s %d %d"" (") """ (string_content) "%s %d %d" (") """ (,) "," (identifier) "word" (,) "," (pointer_expression) "&type" (&) "&" (identifier) "type" (,) "," (pointer_expression) "&attr" (&) "&" (identifier) "attr" ()) ")" (;) ";" (expression_statement) "add_reserved_word(word, type, attr);" (call_expression) "add_reserved_word(word, type, attr)" (identifier) "add_reserved_word" (argument_list) "(word, type, attr)" (() "(" (identifier) "word" (,) "," (identifier) "type" (,) "," (identifier) "attr" ()) ")" (;) ";" (}) "}" (expression_statement) "fgets(buff, 80, rfp);" (call_expression) "fgets(buff, 80, rfp)" (identifier) "fgets" (argument_list) "(buff, 80, rfp)" (() "(" (identifier) "buff" (,) "," (number_literal) "80" (,) "," (identifier) "rfp" ()) ")" (;) ";" (}) "}" (return_statement) "return reserved_word_table;" (return) "return" (identifier) "reserved_word_table" (;) ";" (}) "}"
428
0
{"language": "c", "success": true, "metadata": {"lines": 71, "avg_line_length": 34.11, "nodes": 257, "errors": 0, "source_hash": "6b2df6ff9f30592c00e7714297c7d923f9c19790631fa8cb4f63cfc8fe1e6d49", "categorized_nodes": 188}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include \"reserved_words.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": "\"reserved_words.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 27}}, {"id": 6, "type": "function_definition", "text": "static struct Reserved_Word * add_reserved_word(char word[], int type, int attr)\n{\n struct Reserved_Word *current = reserved_word_table;\n\n while (current -> next != NULL) {\n current = current -> next;\n }\n\n current -> next = malloc(sizeof(struct Reserved_Word));\n strcpy(current -> word, word);\n current -> token_type = type;\n current -> attribute = attr;\n current -> next -> next = NULL;\n\n return current -> next;\n}", "parent": null, "children": [7, 10], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 7, "type": "struct_specifier", "text": "struct Reserved_Word", "parent": 6, "children": [8, 9], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 27}}, {"id": 8, "type": "struct", "text": "struct", "parent": 7, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 13}}, {"id": 9, "type": "type_identifier", "text": "Reserved_Word", "parent": 7, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 27}}, {"id": 10, "type": "pointer_declarator", "text": "* add_reserved_word(char word[], int type, int attr)", "parent": 6, "children": [11, 12], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 80}}, {"id": 11, "type": "*", "text": "*", "parent": 10, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 29}}, {"id": 12, "type": "function_declarator", "text": "add_reserved_word(char word[], int type, int attr)", "parent": 10, "children": [13, 14], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 80}}, {"id": 13, "type": "identifier", "text": "add_reserved_word", "parent": 12, "children": [], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 47}}, {"id": 14, "type": "parameter_list", "text": "(char word[], int type, int attr)", "parent": 12, "children": [15, 19, 22], "start_point": {"row": 12, "column": 47}, "end_point": {"row": 12, "column": 80}}, {"id": 15, "type": "parameter_declaration", "text": "char word[]", "parent": 14, "children": [16, 17], "start_point": {"row": 12, "column": 48}, "end_point": {"row": 12, "column": 59}}, {"id": 16, "type": "primitive_type", "text": "char", "parent": 15, "children": [], "start_point": {"row": 12, "column": 48}, "end_point": {"row": 12, "column": 52}}, {"id": 17, "type": "array_declarator", "text": "word[]", "parent": 15, "children": [18], "start_point": {"row": 12, "column": 53}, "end_point": {"row": 12, "column": 59}}, {"id": 18, "type": "identifier", "text": "word", "parent": 17, "children": [], "start_point": {"row": 12, "column": 53}, "end_point": {"row": 12, "column": 57}}, {"id": 19, "type": "parameter_declaration", "text": "int type", "parent": 14, "children": [20, 21], "start_point": {"row": 12, "column": 61}, "end_point": {"row": 12, "column": 69}}, {"id": 20, "type": "primitive_type", "text": "int", "parent": 19, "children": [], "start_point": {"row": 12, "column": 61}, "end_point": {"row": 12, "column": 64}}, {"id": 21, "type": "identifier", "text": "type", "parent": 19, "children": [], "start_point": {"row": 12, "column": 65}, "end_point": {"row": 12, "column": 69}}, {"id": 22, "type": "parameter_declaration", "text": "int attr", "parent": 14, "children": [23, 24], "start_point": {"row": 12, "column": 71}, "end_point": {"row": 12, "column": 79}}, {"id": 23, "type": "primitive_type", "text": "int", "parent": 22, "children": [], "start_point": {"row": 12, "column": 71}, "end_point": {"row": 12, "column": 74}}, {"id": 24, "type": "identifier", "text": "attr", "parent": 22, "children": [], "start_point": {"row": 12, "column": 75}, "end_point": {"row": 12, "column": 79}}, {"id": 25, "type": "declaration", "text": "struct Reserved_Word *current = reserved_word_table;", "parent": 6, "children": [26, 29], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 60}}, {"id": 26, "type": "struct_specifier", "text": "struct Reserved_Word", "parent": 25, "children": [27, 28], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 28}}, {"id": 27, "type": "struct", "text": "struct", "parent": 26, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 14}}, {"id": 28, "type": "type_identifier", "text": "Reserved_Word", "parent": 26, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 28}}, {"id": 29, "type": "init_declarator", "text": "*current = reserved_word_table", "parent": 25, "children": [30, 33, 34], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 59}}, {"id": 30, "type": "pointer_declarator", "text": "*current", "parent": 29, "children": [31, 32], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 37}}, {"id": 31, "type": "*", "text": "*", "parent": 30, "children": [], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 30}}, {"id": 32, "type": "identifier", "text": "current", "parent": 30, "children": [], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 37}}, {"id": 33, "type": "=", "text": "=", "parent": 29, "children": [], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 39}}, {"id": 34, "type": "identifier", "text": "reserved_word_table", "parent": 29, "children": [], "start_point": {"row": 14, "column": 40}, "end_point": {"row": 14, "column": 59}}, {"id": 35, "type": "while_statement", "text": "while (current -> next != NULL) {\n current = current -> next;\n }", "parent": 6, "children": [36], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 18, "column": 9}}, {"id": 36, "type": "parenthesized_expression", "text": "(current -> next != NULL)", "parent": 35, "children": [37], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 39}}, {"id": 37, "type": "binary_expression", "text": "current -> next != NULL", "parent": 36, "children": [38, 41, 42], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 38}}, {"id": 38, "type": "field_expression", "text": "current -> next", "parent": 37, "children": [39, 40], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 30}}, {"id": 39, "type": "identifier", "text": "current", "parent": 38, "children": [], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 22}}, {"id": 40, "type": "field_identifier", "text": "next", "parent": 38, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 30}}, {"id": 41, "type": "!=", "text": "!=", "parent": 37, "children": [], "start_point": {"row": 16, "column": 31}, "end_point": {"row": 16, "column": 33}}, {"id": 42, "type": "null", "text": "NULL", "parent": 37, "children": [43], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 38}}, {"id": 43, "type": "NULL", "text": "NULL", "parent": 42, "children": [], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 38}}, {"id": 44, "type": "assignment_expression", "text": "current = current -> next", "parent": 35, "children": [45, 46, 47], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 41}}, {"id": 45, "type": "identifier", "text": "current", "parent": 44, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 23}}, {"id": 46, "type": "=", "text": "=", "parent": 44, "children": [], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 25}}, {"id": 47, "type": "field_expression", "text": "current -> next", "parent": 44, "children": [48, 49], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 41}}, {"id": 48, "type": "identifier", "text": "current", "parent": 47, "children": [], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 33}}, {"id": 49, "type": "field_identifier", "text": "next", "parent": 47, "children": [], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 41}}, {"id": 50, "type": "assignment_expression", "text": "current -> next = malloc(sizeof(struct Reserved_Word))", "parent": 6, "children": [51, 54, 55], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 62}}, {"id": 51, "type": "field_expression", "text": "current -> next", "parent": 50, "children": [52, 53], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 23}}, {"id": 52, "type": "identifier", "text": "current", "parent": 51, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 15}}, {"id": 53, "type": "field_identifier", "text": "next", "parent": 51, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 23}}, {"id": 54, "type": "=", "text": "=", "parent": 50, "children": [], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 25}}, {"id": 55, "type": "call_expression", "text": "malloc(sizeof(struct Reserved_Word))", "parent": 50, "children": [56, 57], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 62}}, {"id": 56, "type": "identifier", "text": "malloc", "parent": 55, "children": [], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 32}}, {"id": 57, "type": "argument_list", "text": "(sizeof(struct Reserved_Word))", "parent": 55, "children": [58], "start_point": {"row": 20, "column": 32}, "end_point": {"row": 20, "column": 62}}, {"id": 58, "type": "sizeof_expression", "text": "sizeof(struct Reserved_Word)", "parent": 57, "children": [59], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 61}}, {"id": 59, "type": "type_descriptor", "text": "struct Reserved_Word", "parent": 58, "children": [60], "start_point": {"row": 20, "column": 40}, "end_point": {"row": 20, "column": 60}}, {"id": 60, "type": "struct_specifier", "text": "struct Reserved_Word", "parent": 59, "children": [61, 62], "start_point": {"row": 20, "column": 40}, "end_point": {"row": 20, "column": 60}}, {"id": 61, "type": "struct", "text": "struct", "parent": 60, "children": [], "start_point": {"row": 20, "column": 40}, "end_point": {"row": 20, "column": 46}}, {"id": 62, "type": "type_identifier", "text": "Reserved_Word", "parent": 60, "children": [], "start_point": {"row": 20, "column": 47}, "end_point": {"row": 20, "column": 60}}, {"id": 63, "type": "call_expression", "text": "strcpy(current -> word, word)", "parent": 6, "children": [64, 65], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 37}}, {"id": 64, "type": "identifier", "text": "strcpy", "parent": 63, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 14}}, {"id": 65, "type": "argument_list", "text": "(current -> word, word)", "parent": 63, "children": [66, 69], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 37}}, {"id": 66, "type": "field_expression", "text": "current -> word", "parent": 65, "children": [67, 68], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 30}}, {"id": 67, "type": "identifier", "text": "current", "parent": 66, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 22}}, {"id": 68, "type": "field_identifier", "text": "word", "parent": 66, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 30}}, {"id": 69, "type": "identifier", "text": "word", "parent": 65, "children": [], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 36}}, {"id": 70, "type": "assignment_expression", "text": "current -> token_type = type", "parent": 6, "children": [71, 74, 75], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 36}}, {"id": 71, "type": "field_expression", "text": "current -> token_type", "parent": 70, "children": [72, 73], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 29}}, {"id": 72, "type": "identifier", "text": "current", "parent": 71, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 15}}, {"id": 73, "type": "field_identifier", "text": "token_type", "parent": 71, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 29}}, {"id": 74, "type": "=", "text": "=", "parent": 70, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 31}}, {"id": 75, "type": "identifier", "text": "type", "parent": 70, "children": [], "start_point": {"row": 22, "column": 32}, "end_point": {"row": 22, "column": 36}}, {"id": 76, "type": "assignment_expression", "text": "current -> attribute = attr", "parent": 6, "children": [77, 80, 81], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 35}}, {"id": 77, "type": "field_expression", "text": "current -> attribute", "parent": 76, "children": [78, 79], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 28}}, {"id": 78, "type": "identifier", "text": "current", "parent": 77, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 15}}, {"id": 79, "type": "field_identifier", "text": "attribute", "parent": 77, "children": [], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 28}}, {"id": 80, "type": "=", "text": "=", "parent": 76, "children": [], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 30}}, {"id": 81, "type": "identifier", "text": "attr", "parent": 76, "children": [], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 35}}, {"id": 82, "type": "assignment_expression", "text": "current -> next -> next = NULL", "parent": 6, "children": [83, 88, 89], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 38}}, {"id": 83, "type": "field_expression", "text": "current -> next -> next", "parent": 82, "children": [84, 87], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 31}}, {"id": 84, "type": "field_expression", "text": "current -> next", "parent": 83, "children": [85, 86], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 23}}, {"id": 85, "type": "identifier", "text": "current", "parent": 84, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 15}}, {"id": 86, "type": "field_identifier", "text": "next", "parent": 84, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 23}}, {"id": 87, "type": "field_identifier", "text": "next", "parent": 83, "children": [], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 31}}, {"id": 88, "type": "=", "text": "=", "parent": 82, "children": [], "start_point": {"row": 24, "column": 32}, "end_point": {"row": 24, "column": 33}}, {"id": 89, "type": "null", "text": "NULL", "parent": 82, "children": [90], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 38}}, {"id": 90, "type": "NULL", "text": "NULL", "parent": 89, "children": [], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 38}}, {"id": 91, "type": "return_statement", "text": "return current -> next;", "parent": 6, "children": [92], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 31}}, {"id": 92, "type": "field_expression", "text": "current -> next", "parent": 91, "children": [93, 94], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 30}}, {"id": 93, "type": "identifier", "text": "current", "parent": 92, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 22}}, {"id": 94, "type": "field_identifier", "text": "next", "parent": 92, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 30}}, {"id": 95, "type": "function_definition", "text": "union Optional_Token check_reserved_words(char word[])\n{\n struct Reserved_Word *current = reserved_word_table;\n\n do {\n if (strcmp(current -> word, word) == 0) {\n return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);\n }\n current = current -> next;\n } while (current -> next != NULL);\n\n return null_optional();\n}", "parent": null, "children": [96, 99], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 52, "column": 1}}, {"id": 96, "type": "union_specifier", "text": "union Optional_Token", "parent": 95, "children": [97, 98], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 20}}, {"id": 97, "type": "union", "text": "union", "parent": 96, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 5}}, {"id": 98, "type": "type_identifier", "text": "Optional_Token", "parent": 96, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 20}}, {"id": 99, "type": "function_declarator", "text": "check_reserved_words(char word[])", "parent": 95, "children": [100, 101], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 54}}, {"id": 100, "type": "identifier", "text": "check_reserved_words", "parent": 99, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 41}}, {"id": 101, "type": "parameter_list", "text": "(char word[])", "parent": 99, "children": [102], "start_point": {"row": 37, "column": 41}, "end_point": {"row": 37, "column": 54}}, {"id": 102, "type": "parameter_declaration", "text": "char word[]", "parent": 101, "children": [103, 104], "start_point": {"row": 37, "column": 42}, "end_point": {"row": 37, "column": 53}}, {"id": 103, "type": "primitive_type", "text": "char", "parent": 102, "children": [], "start_point": {"row": 37, "column": 42}, "end_point": {"row": 37, "column": 46}}, {"id": 104, "type": "array_declarator", "text": "word[]", "parent": 102, "children": [105], "start_point": {"row": 37, "column": 47}, "end_point": {"row": 37, "column": 53}}, {"id": 105, "type": "identifier", "text": "word", "parent": 104, "children": [], "start_point": {"row": 37, "column": 47}, "end_point": {"row": 37, "column": 51}}, {"id": 106, "type": "declaration", "text": "struct Reserved_Word *current = reserved_word_table;", "parent": 95, "children": [107, 110], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 60}}, {"id": 107, "type": "struct_specifier", "text": "struct Reserved_Word", "parent": 106, "children": [108, 109], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 28}}, {"id": 108, "type": "struct", "text": "struct", "parent": 107, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 14}}, {"id": 109, "type": "type_identifier", "text": "Reserved_Word", "parent": 107, "children": [], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 28}}, {"id": 110, "type": "init_declarator", "text": "*current = reserved_word_table", "parent": 106, "children": [111, 114, 115], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 59}}, {"id": 111, "type": "pointer_declarator", "text": "*current", "parent": 110, "children": [112, 113], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 37}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 30}}, {"id": 113, "type": "identifier", "text": "current", "parent": 111, "children": [], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 37}}, {"id": 114, "type": "=", "text": "=", "parent": 110, "children": [], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 39, "column": 39}}, {"id": 115, "type": "identifier", "text": "reserved_word_table", "parent": 110, "children": [], "start_point": {"row": 39, "column": 40}, "end_point": {"row": 39, "column": 59}}, {"id": 116, "type": "do_statement", "text": "do {\n if (strcmp(current -> word, word) == 0) {\n return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);\n }\n current = current -> next;\n } while (current -> next != NULL);", "parent": 95, "children": [148], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 49, "column": 42}}, {"id": 117, "type": "if_statement", "text": "if (strcmp(current -> word, word) == 0) {\n return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);\n }", "parent": 116, "children": [118], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 47, "column": 17}}, {"id": 118, "type": "parenthesized_expression", "text": "(strcmp(current -> word, word) == 0)", "parent": 117, "children": [119], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 55}}, {"id": 119, "type": "binary_expression", "text": "strcmp(current -> word, word) == 0", "parent": 118, "children": [120, 127, 128], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 54}}, {"id": 120, "type": "call_expression", "text": "strcmp(current -> word, word)", "parent": 119, "children": [121, 122], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 49}}, {"id": 121, "type": "identifier", "text": "strcmp", "parent": 120, "children": [], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 26}}, {"id": 122, "type": "argument_list", "text": "(current -> word, word)", "parent": 120, "children": [123, 126], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 49}}, {"id": 123, "type": "field_expression", "text": "current -> word", "parent": 122, "children": [124, 125], "start_point": {"row": 42, "column": 27}, "end_point": {"row": 42, "column": 42}}, {"id": 124, "type": "identifier", "text": "current", "parent": 123, "children": [], "start_point": {"row": 42, "column": 27}, "end_point": {"row": 42, "column": 34}}, {"id": 125, "type": "field_identifier", "text": "word", "parent": 123, "children": [], "start_point": {"row": 42, "column": 38}, "end_point": {"row": 42, "column": 42}}, {"id": 126, "type": "identifier", "text": "word", "parent": 122, "children": [], "start_point": {"row": 42, "column": 44}, "end_point": {"row": 42, "column": 48}}, {"id": 127, "type": "==", "text": "==", "parent": 119, "children": [], "start_point": {"row": 42, "column": 50}, "end_point": {"row": 42, "column": 52}}, {"id": 128, "type": "number_literal", "text": "0", "parent": 119, "children": [], "start_point": {"row": 42, "column": 53}, "end_point": {"row": 42, "column": 54}}, {"id": 129, "type": "return_statement", "text": "return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);", "parent": 117, "children": [130], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 46, "column": 46}}, {"id": 130, "type": "call_expression", "text": "make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL)", "parent": 129, "children": [131, 132], "start_point": {"row": 43, "column": 31}, "end_point": {"row": 46, "column": 45}}, {"id": 131, "type": "identifier", "text": "make_optional", "parent": 130, "children": [], "start_point": {"row": 43, "column": 31}, "end_point": {"row": 43, "column": 44}}, {"id": 132, "type": "argument_list", "text": "(word,\n current -> token_type,\n current -> attribute,\n NULL)", "parent": 130, "children": [133, 134, 137, 140], "start_point": {"row": 43, "column": 44}, "end_point": {"row": 46, "column": 45}}, {"id": 133, "type": "identifier", "text": "word", "parent": 132, "children": [], "start_point": {"row": 43, "column": 45}, "end_point": {"row": 43, "column": 49}}, {"id": 134, "type": "field_expression", "text": "current -> token_type", "parent": 132, "children": [135, 136], "start_point": {"row": 44, "column": 40}, "end_point": {"row": 44, "column": 61}}, {"id": 135, "type": "identifier", "text": "current", "parent": 134, "children": [], "start_point": {"row": 44, "column": 40}, "end_point": {"row": 44, "column": 47}}, {"id": 136, "type": "field_identifier", "text": "token_type", "parent": 134, "children": [], "start_point": {"row": 44, "column": 51}, "end_point": {"row": 44, "column": 61}}, {"id": 137, "type": "field_expression", "text": "current -> attribute", "parent": 132, "children": [138, 139], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 60}}, {"id": 138, "type": "identifier", "text": "current", "parent": 137, "children": [], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 47}}, {"id": 139, "type": "field_identifier", "text": "attribute", "parent": 137, "children": [], "start_point": {"row": 45, "column": 51}, "end_point": {"row": 45, "column": 60}}, {"id": 140, "type": "null", "text": "NULL", "parent": 132, "children": [141], "start_point": {"row": 46, "column": 40}, "end_point": {"row": 46, "column": 44}}, {"id": 141, "type": "NULL", "text": "NULL", "parent": 140, "children": [], "start_point": {"row": 46, "column": 40}, "end_point": {"row": 46, "column": 44}}, {"id": 142, "type": "assignment_expression", "text": "current = current -> next", "parent": 116, "children": [143, 144, 145], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 41}}, {"id": 143, "type": "identifier", "text": "current", "parent": 142, "children": [], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 23}}, {"id": 144, "type": "=", "text": "=", "parent": 142, "children": [], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 25}}, {"id": 145, "type": "field_expression", "text": "current -> next", "parent": 142, "children": [146, 147], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 41}}, {"id": 146, "type": "identifier", "text": "current", "parent": 145, "children": [], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 33}}, {"id": 147, "type": "field_identifier", "text": "next", "parent": 145, "children": [], "start_point": {"row": 48, "column": 37}, "end_point": {"row": 48, "column": 41}}, {"id": 148, "type": "parenthesized_expression", "text": "(current -> next != NULL)", "parent": 116, "children": [149], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 41}}, {"id": 149, "type": "binary_expression", "text": "current -> next != NULL", "parent": 148, "children": [150, 153, 154], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 40}}, {"id": 150, "type": "field_expression", "text": "current -> next", "parent": 149, "children": [151, 152], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 32}}, {"id": 151, "type": "identifier", "text": "current", "parent": 150, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 24}}, {"id": 152, "type": "field_identifier", "text": "next", "parent": 150, "children": [], "start_point": {"row": 49, "column": 28}, "end_point": {"row": 49, "column": 32}}, {"id": 153, "type": "!=", "text": "!=", "parent": 149, "children": [], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 49, "column": 35}}, {"id": 154, "type": "null", "text": "NULL", "parent": 149, "children": [155], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 40}}, {"id": 155, "type": "NULL", "text": "NULL", "parent": 154, "children": [], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 40}}, {"id": 156, "type": "return_statement", "text": "return null_optional();", "parent": 95, "children": [157], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 31}}, {"id": 157, "type": "call_expression", "text": "null_optional()", "parent": 156, "children": [158, 159], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 30}}, {"id": 158, "type": "identifier", "text": "null_optional", "parent": 157, "children": [], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 28}}, {"id": 159, "type": "argument_list", "text": "()", "parent": 157, "children": [], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 30}}, {"id": 160, "type": "function_definition", "text": "struct Reserved_Word * initialize_reserved_words(FILE *rfp)\n{\n reserved_word_table = malloc(sizeof(struct Reserved_Word));\n reserved_word_table -> next = NULL;\n char buff[80];\n fgets(buff, 80, rfp);\n\n while(!feof(rfp)) {\n if (buff[0] != '\\n') {\n char word[11];\n int type;\n int attr;\n\n sscanf(buff, \"%s %d %d\", word, &type, &attr);\n add_reserved_word(word, type, attr);\n }\n fgets(buff, 80, rfp);\n }\n return reserved_word_table;\n}", "parent": null, "children": [161, 164], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 161, "type": "struct_specifier", "text": "struct Reserved_Word", "parent": 160, "children": [162, 163], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 20}}, {"id": 162, "type": "struct", "text": "struct", "parent": 161, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 6}}, {"id": 163, "type": "type_identifier", "text": "Reserved_Word", "parent": 161, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 20}}, {"id": 164, "type": "pointer_declarator", "text": "* initialize_reserved_words(FILE *rfp)", "parent": 160, "children": [165, 166], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 59}}, {"id": 165, "type": "*", "text": "*", "parent": 164, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 22}}, {"id": 166, "type": "function_declarator", "text": "initialize_reserved_words(FILE *rfp)", "parent": 164, "children": [167, 168], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 59}}, {"id": 167, "type": "identifier", "text": "initialize_reserved_words", "parent": 166, "children": [], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 48}}, {"id": 168, "type": "parameter_list", "text": "(FILE *rfp)", "parent": 166, "children": [169], "start_point": {"row": 61, "column": 48}, "end_point": {"row": 61, "column": 59}}, {"id": 169, "type": "parameter_declaration", "text": "FILE *rfp", "parent": 168, "children": [170, 171], "start_point": {"row": 61, "column": 49}, "end_point": {"row": 61, "column": 58}}, {"id": 170, "type": "type_identifier", "text": "FILE", "parent": 169, "children": [], "start_point": {"row": 61, "column": 49}, "end_point": {"row": 61, "column": 53}}, {"id": 171, "type": "pointer_declarator", "text": "*rfp", "parent": 169, "children": [172, 173], "start_point": {"row": 61, "column": 54}, "end_point": {"row": 61, "column": 58}}, {"id": 172, "type": "*", "text": "*", "parent": 171, "children": [], "start_point": {"row": 61, "column": 54}, "end_point": {"row": 61, "column": 55}}, {"id": 173, "type": "identifier", "text": "rfp", "parent": 171, "children": [], "start_point": {"row": 61, "column": 55}, "end_point": {"row": 61, "column": 58}}, {"id": 174, "type": "assignment_expression", "text": "reserved_word_table = malloc(sizeof(struct Reserved_Word))", "parent": 160, "children": [175, 176, 177], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 66}}, {"id": 175, "type": "identifier", "text": "reserved_word_table", "parent": 174, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 27}}, {"id": 176, "type": "=", "text": "=", "parent": 174, "children": [], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 29}}, {"id": 177, "type": "call_expression", "text": "malloc(sizeof(struct Reserved_Word))", "parent": 174, "children": [178, 179], "start_point": {"row": 63, "column": 30}, "end_point": {"row": 63, "column": 66}}, {"id": 178, "type": "identifier", "text": "malloc", "parent": 177, "children": [], "start_point": {"row": 63, "column": 30}, "end_point": {"row": 63, "column": 36}}, {"id": 179, "type": "argument_list", "text": "(sizeof(struct Reserved_Word))", "parent": 177, "children": [180], "start_point": {"row": 63, "column": 36}, "end_point": {"row": 63, "column": 66}}, {"id": 180, "type": "sizeof_expression", "text": "sizeof(struct Reserved_Word)", "parent": 179, "children": [181], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 65}}, {"id": 181, "type": "type_descriptor", "text": "struct Reserved_Word", "parent": 180, "children": [182], "start_point": {"row": 63, "column": 44}, "end_point": {"row": 63, "column": 64}}, {"id": 182, "type": "struct_specifier", "text": "struct Reserved_Word", "parent": 181, "children": [183, 184], "start_point": {"row": 63, "column": 44}, "end_point": {"row": 63, "column": 64}}, {"id": 183, "type": "struct", "text": "struct", "parent": 182, "children": [], "start_point": {"row": 63, "column": 44}, "end_point": {"row": 63, "column": 50}}, {"id": 184, "type": "type_identifier", "text": "Reserved_Word", "parent": 182, "children": [], "start_point": {"row": 63, "column": 51}, "end_point": {"row": 63, "column": 64}}, {"id": 185, "type": "assignment_expression", "text": "reserved_word_table -> next = NULL", "parent": 160, "children": [186, 189, 190], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 42}}, {"id": 186, "type": "field_expression", "text": "reserved_word_table -> next", "parent": 185, "children": [187, 188], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 35}}, {"id": 187, "type": "identifier", "text": "reserved_word_table", "parent": 186, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 27}}, {"id": 188, "type": "field_identifier", "text": "next", "parent": 186, "children": [], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 35}}, {"id": 189, "type": "=", "text": "=", "parent": 185, "children": [], "start_point": {"row": 64, "column": 36}, "end_point": {"row": 64, "column": 37}}, {"id": 190, "type": "null", "text": "NULL", "parent": 185, "children": [191], "start_point": {"row": 64, "column": 38}, "end_point": {"row": 64, "column": 42}}, {"id": 191, "type": "NULL", "text": "NULL", "parent": 190, "children": [], "start_point": {"row": 64, "column": 38}, "end_point": {"row": 64, "column": 42}}, {"id": 192, "type": "declaration", "text": "char buff[80];", "parent": 160, "children": [193, 194], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 22}}, {"id": 193, "type": "primitive_type", "text": "char", "parent": 192, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 12}}, {"id": 194, "type": "array_declarator", "text": "buff[80]", "parent": 192, "children": [195, 196], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 21}}, {"id": 195, "type": "identifier", "text": "buff", "parent": 194, "children": [], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 17}}, {"id": 196, "type": "number_literal", "text": "80", "parent": 194, "children": [], "start_point": {"row": 65, "column": 18}, "end_point": {"row": 65, "column": 20}}, {"id": 197, "type": "call_expression", "text": "fgets(buff, 80, rfp)", "parent": 160, "children": [198, 199], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 28}}, {"id": 198, "type": "identifier", "text": "fgets", "parent": 197, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 13}}, {"id": 199, "type": "argument_list", "text": "(buff, 80, rfp)", "parent": 197, "children": [200, 201, 202], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 28}}, {"id": 200, "type": "identifier", "text": "buff", "parent": 199, "children": [], "start_point": {"row": 66, "column": 14}, "end_point": {"row": 66, "column": 18}}, {"id": 201, "type": "number_literal", "text": "80", "parent": 199, "children": [], "start_point": {"row": 66, "column": 20}, "end_point": {"row": 66, "column": 22}}, {"id": 202, "type": "identifier", "text": "rfp", "parent": 199, "children": [], "start_point": {"row": 66, "column": 24}, "end_point": {"row": 66, "column": 27}}, {"id": 203, "type": "while_statement", "text": "while(!feof(rfp)) {\n if (buff[0] != '\\n') {\n char word[11];\n int type;\n int attr;\n\n sscanf(buff, \"%s %d %d\", word, &type, &attr);\n add_reserved_word(word, type, attr);\n }\n fgets(buff, 80, rfp);\n }", "parent": 160, "children": [204], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 78, "column": 9}}, {"id": 204, "type": "parenthesized_expression", "text": "(!feof(rfp))", "parent": 203, "children": [205], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 25}}, {"id": 205, "type": "unary_expression", "text": "!feof(rfp)", "parent": 204, "children": [206, 207], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 24}}, {"id": 206, "type": "!", "text": "!", "parent": 205, "children": [], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 15}}, {"id": 207, "type": "call_expression", "text": "feof(rfp)", "parent": 205, "children": [208, 209], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 24}}, {"id": 208, "type": "identifier", "text": "feof", "parent": 207, "children": [], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 19}}, {"id": 209, "type": "argument_list", "text": "(rfp)", "parent": 207, "children": [210], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 24}}, {"id": 210, "type": "identifier", "text": "rfp", "parent": 209, "children": [], "start_point": {"row": 68, "column": 20}, "end_point": {"row": 68, "column": 23}}, {"id": 211, "type": "if_statement", "text": "if (buff[0] != '\\n') {\n char word[11];\n int type;\n int attr;\n\n sscanf(buff, \"%s %d %d\", word, &type, &attr);\n add_reserved_word(word, type, attr);\n }", "parent": 203, "children": [212], "start_point": {"row": 69, "column": 16}, "end_point": {"row": 76, "column": 17}}, {"id": 212, "type": "parenthesized_expression", "text": "(buff[0] != '\\n')", "parent": 211, "children": [213], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 36}}, {"id": 213, "type": "binary_expression", "text": "buff[0] != '\\n'", "parent": 212, "children": [214, 217, 218], "start_point": {"row": 69, "column": 20}, "end_point": {"row": 69, "column": 35}}, {"id": 214, "type": "subscript_expression", "text": "buff[0]", "parent": 213, "children": [215, 216], "start_point": {"row": 69, "column": 20}, "end_point": {"row": 69, "column": 27}}, {"id": 215, "type": "identifier", "text": "buff", "parent": 214, "children": [], "start_point": {"row": 69, "column": 20}, "end_point": {"row": 69, "column": 24}}, {"id": 216, "type": "number_literal", "text": "0", "parent": 214, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 26}}, {"id": 217, "type": "!=", "text": "!=", "parent": 213, "children": [], "start_point": {"row": 69, "column": 28}, "end_point": {"row": 69, "column": 30}}, {"id": 218, "type": "char_literal", "text": "'\\n'", "parent": 213, "children": [219, 220, 221], "start_point": {"row": 69, "column": 31}, "end_point": {"row": 69, "column": 35}}, {"id": 219, "type": "'", "text": "'", "parent": 218, "children": [], "start_point": {"row": 69, "column": 31}, "end_point": {"row": 69, "column": 32}}, {"id": 220, "type": "escape_sequence", "text": "\\n", "parent": 218, "children": [], "start_point": {"row": 69, "column": 32}, "end_point": {"row": 69, "column": 34}}, {"id": 221, "type": "'", "text": "'", "parent": 218, "children": [], "start_point": {"row": 69, "column": 34}, "end_point": {"row": 69, "column": 35}}, {"id": 222, "type": "declaration", "text": "char word[11];", "parent": 211, "children": [223, 224], "start_point": {"row": 70, "column": 24}, "end_point": {"row": 70, "column": 38}}, {"id": 223, "type": "primitive_type", "text": "char", "parent": 222, "children": [], "start_point": {"row": 70, "column": 24}, "end_point": {"row": 70, "column": 28}}, {"id": 224, "type": "array_declarator", "text": "word[11]", "parent": 222, "children": [225, 226], "start_point": {"row": 70, "column": 29}, "end_point": {"row": 70, "column": 37}}, {"id": 225, "type": "identifier", "text": "word", "parent": 224, "children": [], "start_point": {"row": 70, "column": 29}, "end_point": {"row": 70, "column": 33}}, {"id": 226, "type": "number_literal", "text": "11", "parent": 224, "children": [], "start_point": {"row": 70, "column": 34}, "end_point": {"row": 70, "column": 36}}, {"id": 227, "type": "declaration", "text": "int type;", "parent": 211, "children": [228, 229], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 33}}, {"id": 228, "type": "primitive_type", "text": "int", "parent": 227, "children": [], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 27}}, {"id": 229, "type": "identifier", "text": "type", "parent": 227, "children": [], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 32}}, {"id": 230, "type": "declaration", "text": "int attr;", "parent": 211, "children": [231, 232], "start_point": {"row": 72, "column": 24}, "end_point": {"row": 72, "column": 33}}, {"id": 231, "type": "primitive_type", "text": "int", "parent": 230, "children": [], "start_point": {"row": 72, "column": 24}, "end_point": {"row": 72, "column": 27}}, {"id": 232, "type": "identifier", "text": "attr", "parent": 230, "children": [], "start_point": {"row": 72, "column": 28}, "end_point": {"row": 72, "column": 32}}, {"id": 233, "type": "call_expression", "text": "sscanf(buff, \"%s %d %d\", word, &type, &attr)", "parent": 211, "children": [234, 235], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 68}}, {"id": 234, "type": "identifier", "text": "sscanf", "parent": 233, "children": [], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 30}}, {"id": 235, "type": "argument_list", "text": "(buff, \"%s %d %d\", word, &type, &attr)", "parent": 233, "children": [236, 237, 238, 239, 241], "start_point": {"row": 74, "column": 30}, "end_point": {"row": 74, "column": 68}}, {"id": 236, "type": "identifier", "text": "buff", "parent": 235, "children": [], "start_point": {"row": 74, "column": 31}, "end_point": {"row": 74, "column": 35}}, {"id": 237, "type": "string_literal", "text": "\"%s %d %d\"", "parent": 235, "children": [], "start_point": {"row": 74, "column": 37}, "end_point": {"row": 74, "column": 47}}, {"id": 238, "type": "identifier", "text": "word", "parent": 235, "children": [], "start_point": {"row": 74, "column": 49}, "end_point": {"row": 74, "column": 53}}, {"id": 239, "type": "pointer_expression", "text": "&type", "parent": 235, "children": [240], "start_point": {"row": 74, "column": 55}, "end_point": {"row": 74, "column": 60}}, {"id": 240, "type": "identifier", "text": "type", "parent": 239, "children": [], "start_point": {"row": 74, "column": 56}, "end_point": {"row": 74, "column": 60}}, {"id": 241, "type": "pointer_expression", "text": "&attr", "parent": 235, "children": [242], "start_point": {"row": 74, "column": 62}, "end_point": {"row": 74, "column": 67}}, {"id": 242, "type": "identifier", "text": "attr", "parent": 241, "children": [], "start_point": {"row": 74, "column": 63}, "end_point": {"row": 74, "column": 67}}, {"id": 243, "type": "call_expression", "text": "add_reserved_word(word, type, attr)", "parent": 211, "children": [244, 245], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 59}}, {"id": 244, "type": "identifier", "text": "add_reserved_word", "parent": 243, "children": [], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 41}}, {"id": 245, "type": "argument_list", "text": "(word, type, attr)", "parent": 243, "children": [246, 247, 248], "start_point": {"row": 75, "column": 41}, "end_point": {"row": 75, "column": 59}}, {"id": 246, "type": "identifier", "text": "word", "parent": 245, "children": [], "start_point": {"row": 75, "column": 42}, "end_point": {"row": 75, "column": 46}}, {"id": 247, "type": "identifier", "text": "type", "parent": 245, "children": [], "start_point": {"row": 75, "column": 48}, "end_point": {"row": 75, "column": 52}}, {"id": 248, "type": "identifier", "text": "attr", "parent": 245, "children": [], "start_point": {"row": 75, "column": 54}, "end_point": {"row": 75, "column": 58}}, {"id": 249, "type": "call_expression", "text": "fgets(buff, 80, rfp)", "parent": 203, "children": [250, 251], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 36}}, {"id": 250, "type": "identifier", "text": "fgets", "parent": 249, "children": [], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 21}}, {"id": 251, "type": "argument_list", "text": "(buff, 80, rfp)", "parent": 249, "children": [252, 253, 254], "start_point": {"row": 77, "column": 21}, "end_point": {"row": 77, "column": 36}}, {"id": 252, "type": "identifier", "text": "buff", "parent": 251, "children": [], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 26}}, {"id": 253, "type": "number_literal", "text": "80", "parent": 251, "children": [], "start_point": {"row": 77, "column": 28}, "end_point": {"row": 77, "column": 30}}, {"id": 254, "type": "identifier", "text": "rfp", "parent": 251, "children": [], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 77, "column": 35}}, {"id": 255, "type": "return_statement", "text": "return reserved_word_table;", "parent": 160, "children": [256], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 35}}, {"id": 256, "type": "identifier", "text": "reserved_word_table", "parent": 255, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 34}}]}, "node_categories": {"declarations": {"functions": [6, 12, 95, 99, 160, 166], "variables": [15, 19, 22, 25, 102, 106, 169, 192, 222, 227, 230], "classes": [7, 8, 26, 27, 60, 61, 96, 97, 107, 108, 161, 162, 182, 183], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [36, 37, 38, 47, 51, 55, 58, 63, 66, 71, 77, 83, 84, 92, 118, 119, 120, 123, 130, 134, 137, 145, 148, 149, 150, 157, 177, 180, 186, 197, 204, 205, 207, 212, 213, 214, 233, 239, 241, 243, 249], "assignments": [44, 50, 70, 76, 82, 142, 174, 185], "loops": [35, 203], "conditionals": [9, 13, 18, 21, 24, 28, 32, 34, 39, 40, 45, 48, 49, 52, 53, 56, 62, 64, 67, 68, 69, 72, 73, 75, 78, 79, 81, 85, 86, 87, 93, 94, 98, 100, 105, 109, 113, 115, 117, 121, 124, 125, 126, 131, 133, 135, 136, 138, 139, 143, 146, 147, 151, 152, 158, 163, 167, 170, 173, 175, 178, 184, 187, 188, 195, 198, 200, 202, 208, 210, 211, 215, 225, 229, 232, 234, 236, 238, 240, 242, 244, 246, 247, 248, 250, 252, 254, 256], "returns": [91, 129, 156, 255], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 128, 196, 201, 216, 218, 226, 237, 253], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "Reserved_Word", "text_snippet": "static struct Reserved_Word * add_reserved_word(char word[], int type, int attr)\n{\n struct Re"}, {"node_id": 12, "universal_type": "function", "name": "type,", "text_snippet": "add_reserved_word(char word[], int type, int attr)"}, {"node_id": 95, "universal_type": "function", "name": "Optional_Token", "text_snippet": "union Optional_Token check_reserved_words(char word[])\n{\n struct Reserved_Word *current = res"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "check_reserved_words(char word[])"}, {"node_id": 160, "universal_type": "function", "name": "Reserved_Word", "text_snippet": "struct Reserved_Word * initialize_reserved_words(FILE *rfp)\n{\n reserved_word_table = malloc(s"}, {"node_id": 166, "universal_type": "function", "name": "unknown", "text_snippet": "initialize_reserved_words(FILE *rfp)"}], "class_declarations": [{"node_id": 7, "universal_type": "class", "name": "Reserved_Word", "text_snippet": "struct Reserved_Word"}, {"node_id": 8, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 26, "universal_type": "class", "name": "Reserved_Word", "text_snippet": "struct Reserved_Word"}, {"node_id": 27, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 60, "universal_type": "class", "name": "Reserved_Word", "text_snippet": "struct Reserved_Word"}, {"node_id": 61, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 96, "universal_type": "class", "name": "Optional_Token", "text_snippet": "union Optional_Token"}, {"node_id": 97, "universal_type": "class", "name": "unknown", "text_snippet": "union"}, {"node_id": 107, "universal_type": "class", "name": "Reserved_Word", "text_snippet": "struct Reserved_Word"}, {"node_id": 108, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 161, "universal_type": "class", "name": "Reserved_Word", "text_snippet": "struct Reserved_Word"}, {"node_id": 162, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 182, "universal_type": "class", "name": "Reserved_Word", "text_snippet": "struct Reserved_Word"}, {"node_id": 183, "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 \"reserved_words.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include \"reserved_words.h\"\n\n/*\n * Adds a reserved word to the reserved word table.\n *\n * Arguments: word -> Literal of the word to be added.\n * type -> Token type associated with the reserved word.\n * attr -> Token attribute associated with the reserved word.\n *\n * Returns: A pointer to the reserved word added to the table.\n */\nstatic struct Reserved_Word * add_reserved_word(char word[], int type, int attr)\n{\n struct Reserved_Word *current = reserved_word_table;\n\n while (current -> next != NULL) {\n current = current -> next;\n }\n\n current -> next = malloc(sizeof(struct Reserved_Word));\n strcpy(current -> word, word);\n current -> token_type = type;\n current -> attribute = attr;\n current -> next -> next = NULL;\n\n return current -> next;\n}\n\n/*\n * Checks if a given word is in the reserved word table.\n *\n * Arguments: word -> Literal of the word to be checked.\n *\n * Returns: The token associated with the reserved word. If no reserved word is\n * found, returns a null Optional_Token.\n */\nunion Optional_Token check_reserved_words(char word[])\n{\n struct Reserved_Word *current = reserved_word_table;\n\n do {\n if (strcmp(current -> word, word) == 0) {\n return make_optional(word,\n current -> token_type,\n current -> attribute,\n NULL);\n }\n current = current -> next;\n } while (current -> next != NULL);\n\n return null_optional();\n}\n\n/*\n * Initializes the reserved word table from the RESERVED_WORDS file.\n *\n * Arguments: rfp -> Pointer to the reserved word file.\n *\n * Returns: A pointer to the reserved word table.\n */\nstruct Reserved_Word * initialize_reserved_words(FILE *rfp)\n{\n reserved_word_table = malloc(sizeof(struct Reserved_Word));\n reserved_word_table -> next = NULL;\n char buff[80];\n fgets(buff, 80, rfp);\n\n while(!feof(rfp)) {\n if (buff[0] != '\\n') {\n char word[11];\n int type;\n int attr;\n\n sscanf(buff, \"%s %d %d\", word, &type, &attr);\n add_reserved_word(word, type, attr);\n }\n fgets(buff, 80, rfp);\n }\n return reserved_word_table;\n}\n"}
325
c
// // SFModelCheck.h // SFKit // // Created by <NAME> on 12/15/17. // Copyright © 2017 Moore Development. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface SFModelCheck : NSObject /// Boolean value indicating if the current device is an iPhone X. + (BOOL)is_iPhoneX NS_REFINED_FOR_SWIFT; @end NS_ASSUME_NONNULL_END
24.86
14
(translation_unit) "//\n// SFModelCheck.h\n// SFKit\n//\n// Created by <NAME> on 12/15/17.\n// Copyright © 2017 Moore Development. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface SFModelCheck : NSObject\n\n/// Boolean value indicating if the current device is an iPhone X.\n+ (BOOL)is_iPhoneX NS_REFINED_FOR_SWIFT;\n\n@end\n\nNS_ASSUME_NONNULL_END\n" (comment) "//" (comment) "// SFModelCheck.h" (comment) "// SFKit" (comment) "//" (comment) "// Created by <NAME> on 12/15/17." (comment) "// Copyright © 2017 Moore Development. All rights reserved.\n" (comment) "/\n" (preproc_call) "import <Foundation/Foundation.h>\n\n" (preproc_directive) "import " (preproc_arg) "Foundation/Foundation.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) "FModelCheck : NSObject\n\n/// Boolean value indicating if the current device is an iPhone X.\n+ (BOOL)is_iPhoneX " (statement_identifier) "FModelCheck " (:) " " (expression_statement) "SObject\n\n/// Boolean value indicating if the current device is an iPhone X.\n+ (BOOL)is_iPhoneX " (binary_expression) "SObject\n\n/// Boolean value indicating if the current device is an iPhone X.\n+ (BOOL)is_iPhoneX " (identifier) "SObject\n" (comment) "// Boolean value indicating if the current device is an iPhone X.\n" (+) " " (cast_expression) "BOOL)is_iPhoneX " (() "B" (type_descriptor) "OOL)" (type_identifier) "OOL)" ()) "i" (identifier) "s_iPhoneX " (;) "" (expression_statement) "S_REFINED_FOR_SWIFT;\n" (identifier) "S_REFINED_FOR_SWIFT;" (;) "\n" (ERROR) "e" (ERROR) "e" (declaration) "nd\n\nNS_ASSUME_NONNULL_END\n" (type_identifier) "nd\n" (identifier) "S_ASSUME_NONNULL_END\n" (;) ""
41
4
{"language": "c", "success": true, "metadata": {"lines": 14, "avg_line_length": 24.86, "nodes": 22, "errors": 0, "source_hash": "d3bc05c42658265f9b9f3b6d8be0aa59bf57666b889c6d63e5672ed96a0a9f41", "categorized_nodes": 14}, "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": "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": "FModelCheck : NSObject\n\n/// Boolean value indicating if the current device is an iPhone X.\n+ (BOOL)is_iPhoneX ", "parent": null, "children": [8], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 15, "column": 18}}, {"id": 8, "type": "statement_identifier", "text": "FModelCheck ", "parent": 7, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 23}}, {"id": 9, "type": "binary_expression", "text": "SObject\n\n/// Boolean value indicating if the current device is an iPhone X.\n+ (BOOL)is_iPhoneX ", "parent": 7, "children": [10, 11, 12], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 15, "column": 18}}, {"id": 10, "type": "identifier", "text": "SObject\n", "parent": 9, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 34}}, {"id": 11, "type": "+", "text": " ", "parent": 9, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 12, "type": "cast_expression", "text": "BOOL)is_iPhoneX ", "parent": 9, "children": [13, 15], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 18}}, {"id": 13, "type": "type_descriptor", "text": "OOL)", "parent": 12, "children": [14], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 7}}, {"id": 14, "type": "type_identifier", "text": "OOL)", "parent": 13, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 7}}, {"id": 15, "type": "identifier", "text": "s_iPhoneX ", "parent": 12, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 18}}, {"id": 16, "type": "identifier", "text": "S_REFINED_FOR_SWIFT;", "parent": null, "children": [], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 39}}, {"id": 17, "type": "ERROR", "text": "e", "parent": null, "children": [18], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 18, "type": "ERROR", "text": "e", "parent": 17, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 19, "type": "declaration", "text": "nd\n\nNS_ASSUME_NONNULL_END\n", "parent": null, "children": [20, 21], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 19, "column": 21}}, {"id": 20, "type": "type_identifier", "text": "nd\n", "parent": 19, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 4}}, {"id": 21, "type": "identifier", "text": "S_ASSUME_NONNULL_END\n", "parent": 19, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 21}}]}, "node_categories": {"declarations": {"functions": [], "variables": [2, 19], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [9, 12], "assignments": [], "loops": [], "conditionals": [3, 6, 8, 10, 14, 15, 16, 20, 21], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// SFModelCheck.h\n// SFKit\n//\n// Created by <NAME> on 12/15/17.\n// Copyright \u00a9 2017 Moore Development. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface SFModelCheck : NSObject\n\n/// Boolean value indicating if the current device is an iPhone X.\n+ (BOOL)is_iPhoneX NS_REFINED_FOR_SWIFT;\n\n@end\n\nNS_ASSUME_NONNULL_END\n"}
326
c
// Released under the MIT License. See LICENSE for details. #ifndef BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_ #define BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_ #include <list> #include <mutex> #include <set> #include <string> #include <unordered_map> #include <vector> #include "ballistica/core/object.h" #include "ballistica/math/rect.h" namespace ballistica { // Largest unicode value we ask the OS to draw for us. const int kTextMaxUnicodeVal = 999999; const float kTextRowHeight = 32.0f; // Encapsulates text-display functionality used by the game thread. class TextGraphics { public: static void Init(); TextGraphics(); enum class FontPage { kOSRendered = 9989, kExtras1 = 9990, kExtras2 = 9991, kExtras3 = 9992, kExtras4 = 9993 }; struct Glyph { float pen_offset_x; float pen_offset_y; float advance; float x_size; float y_size; float tex_min_x; float tex_min_y; float tex_max_x; float tex_max_y; }; static auto GetBigCharIndex(int c) -> int; // Returns a glyph or nullptr if it is unavailable. auto GetGlyph(uint32_t value, bool big) -> Glyph*; static auto HaveBigChars(const std::string& string) -> bool; static auto HaveChars(const std::string& string) -> bool; void GetFontPagesForText(const std::string& text, std::set<int>* font_pages); void GetFontPageCharRange(int page, uint32_t* first_char, uint32_t* last_char); auto GetOSTextSpanWidth(const std::string& s) -> float { Rect r; float width; GetOSTextSpanBoundsAndWidth(s, &r, &width); return width; } void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width); // Returns the width of a string auto GetStringWidth(const char* s, bool big = false) -> float; auto GetStringWidth(const std::string& s, bool big = false) -> float { return GetStringWidth(s.c_str(), big); } // Returns the height of a string auto GetStringHeight(const char* s) -> float; auto GetStringHeight(const std::string& s) -> float { return GetStringHeight(s.c_str()); } // Given a target width, breaks the string up into multiple strings so they // fit within it void BreakUpString(const char* text, float width, std::vector<std::string>* v); // Some chars we allow the OS to draw in some cases but draw ourselves in // others (to minimize the amount of switching back and forth). static auto IsOSDrawableAscii(int val) -> bool { // ( exclude a few that usually come in pairs so we // avoid one side looking different than the other ) return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@') || (val >= '[' && val <= '`') || (val >= '{' && val <= '~')) && (val != '\'') && (val != '"') && (val != '[') && (val != ']') && (val != '{') && (val != '}') && (val != '(') && (val != ')')); } private: class TextSpanBoundsCacheEntry; void LoadGlyphPage(uint32_t index); // Map of entries for fast lookup. std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_map_; // List of entries for sorting by last-use-time std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_; std::mutex glyph_load_mutex_; Glyph glyphs_extras_[100]{}; Glyph glyphs_big_[64]{}; }; } // namespace ballistica #endif // BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_
36.57
91
(translation_unit) "// Released under the MIT License. See LICENSE for details.\n\n#ifndef BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n#define BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n\n#include <list>\n#include <mutex>\n#include <set>\n#include <string>\n#include <unordered_map>\n#include <vector>\n\n#include "ballistica/core/object.h"\n#include "ballistica/math/rect.h"\n\nnamespace ballistica {\n\n// Largest unicode value we ask the OS to draw for us.\nconst int kTextMaxUnicodeVal = 999999;\nconst float kTextRowHeight = 32.0f;\n\n// Encapsulates text-display functionality used by the game thread.\nclass TextGraphics {\n public:\n static void Init();\n\n TextGraphics();\n\n enum class FontPage {\n kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993\n };\n\n struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n };\n\n static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);\n auto GetOSTextSpanWidth(const std::string& s) -> float {\n Rect r;\n float width;\n GetOSTextSpanBoundsAndWidth(s, &r, &width);\n return width;\n }\n void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);\n\n // Returns the width of a string\n auto GetStringWidth(const char* s, bool big = false) -> float;\n auto GetStringWidth(const std::string& s, bool big = false) -> float {\n return GetStringWidth(s.c_str(), big);\n }\n\n // Returns the height of a string\n auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }\n\n // Given a target width, breaks the string up into multiple strings so they\n // fit within it\n void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);\n\n // Some chars we allow the OS to draw in some cases but draw ourselves in\n // others (to minimize the amount of switching back and forth).\n static auto IsOSDrawableAscii(int val) -> bool {\n // ( exclude a few that usually come in pairs so we\n // avoid one side looking different than the other )\n return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));\n }\n\n private:\n class TextSpanBoundsCacheEntry;\n void LoadGlyphPage(uint32_t index);\n\n // Map of entries for fast lookup.\n std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_;\n\n // List of entries for sorting by last-use-time\n std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_;\n std::mutex glyph_load_mutex_;\n Glyph glyphs_extras_[100]{};\n Glyph glyphs_big_[64]{};\n};\n\n} // namespace ballistica\n\n#endif // BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n" (comment) "// Released under the MIT License. See LICENSE for details." (ERROR) "#ifndef BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n#define BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n\n#include <list>\n#include <mutex>\n#include <set>\n#include <string>\n#include <unordered_map>\n#include <vector>\n\n#include "ballistica/core/object.h"\n#include "ballistica/math/rect.h"\n\nnamespace ballistica {\n\n// Largest unicode value we ask the OS to draw for us.\nconst int kTextMaxUnicodeVal = 999999;\nconst float kTextRowHeight = 32.0f;\n\n// Encapsulates text-display functionality used by the game thread.\nclass TextGraphics {\n public:\n static void Init();\n\n TextGraphics();\n\n enum class FontPage {\n kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993\n };\n\n struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n };\n\n static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);\n auto GetOSTextSpanWidth(const std::string& s) -> float {\n Rect r;\n float width;\n GetOSTextSpanBoundsAndWidth(s, &r, &width);\n return width;\n }\n void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);\n\n // Returns the width of a string\n auto GetStringWidth(const char* s, bool big = false) -> float;\n auto GetStringWidth(const std::string& s, bool big = false) -> float {\n return GetStringWidth(s.c_str(), big);\n }\n\n // Returns the height of a string\n auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }\n\n // Given a target width, breaks the string up into multiple strings so they\n // fit within it\n void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);\n\n // Some chars we allow the OS to draw in some cases but draw ourselves in\n // others (to minimize the amount of switching back and forth).\n static auto IsOSDrawableAscii(int val) -> bool {\n // ( exclude a few that usually come in pairs so we\n // avoid one side looking different than the other )\n return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));\n }\n\n private:\n class TextSpanBoundsCacheEntry;\n void LoadGlyphPage(uint32_t index);\n\n // Map of entries for fast lookup.\n std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_;\n\n // List of entries for sorting by last-use-time\n std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_;\n std::mutex glyph_load_mutex_;\n Glyph glyphs_extras_[100]{};\n Glyph glyphs_big_[64]{};\n};\n\n} // namespace ballistica\n\n#endif // BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n" (#ifndef) "#ifndef" (identifier) "BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_" (preproc_def) "#define BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n" (#define) "#define" (identifier) "BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_" (preproc_include) "#include <list>\n" (#include) "#include" (system_lib_string) "<list>" (preproc_include) "#include <mutex>\n" (#include) "#include" (system_lib_string) "<mutex>" (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 <unordered_map>\n" (#include) "#include" (system_lib_string) "<unordered_map>" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (preproc_include) "#include "ballistica/core/object.h"\n" (#include) "#include" (string_literal) ""ballistica/core/object.h"" (") """ (string_content) "ballistica/core/object.h" (") """ (preproc_include) "#include "ballistica/math/rect.h"\n" (#include) "#include" (string_literal) ""ballistica/math/rect.h"" (") """ (string_content) "ballistica/math/rect.h" (") """ (type_identifier) "namespace" (identifier) "ballistica" ({) "{" (comment) "// Largest unicode value we ask the OS to draw for us." (declaration) "const int kTextMaxUnicodeVal = 999999;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "kTextMaxUnicodeVal = 999999" (identifier) "kTextMaxUnicodeVal" (=) "=" (number_literal) "999999" (;) ";" (declaration) "const float kTextRowHeight = 32.0f;" (type_qualifier) "const" (const) "const" (primitive_type) "float" (init_declarator) "kTextRowHeight = 32.0f" (identifier) "kTextRowHeight" (=) "=" (number_literal) "32.0f" (;) ";" (comment) "// Encapsulates text-display functionality used by the game thread." (function_definition) "class TextGraphics {\n public:\n static void Init();\n\n TextGraphics();\n\n enum class FontPage {\n kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993\n };\n\n struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n };\n\n static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);\n auto GetOSTextSpanWidth(const std::string& s) -> float {\n Rect r;\n float width;\n GetOSTextSpanBoundsAndWidth(s, &r, &width);\n return width;\n }\n void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);\n\n // Returns the width of a string\n auto GetStringWidth(const char* s, bool big = false) -> float;\n auto GetStringWidth(const std::string& s, bool big = false) -> float {\n return GetStringWidth(s.c_str(), big);\n }\n\n // Returns the height of a string\n auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }\n\n // Given a target width, breaks the string up into multiple strings so they\n // fit within it\n void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);\n\n // Some chars we allow the OS to draw in some cases but draw ourselves in\n // others (to minimize the amount of switching back and forth).\n static auto IsOSDrawableAscii(int val) -> bool {\n // ( exclude a few that usually come in pairs so we\n // avoid one side looking different than the other )\n return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));\n }\n\n private:\n class TextSpanBoundsCacheEntry;\n void LoadGlyphPage(uint32_t index);\n\n // Map of entries for fast lookup.\n std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_;\n\n // List of entries for sorting by last-use-time\n std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_;\n std::mutex glyph_load_mutex_;\n Glyph glyphs_extras_[100]{};\n Glyph glyphs_big_[64]{};\n};\n\n}" (type_identifier) "class" (identifier) "TextGraphics" (compound_statement) "{\n public:\n static void Init();\n\n TextGraphics();\n\n enum class FontPage {\n kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993\n };\n\n struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n };\n\n static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);\n auto GetOSTextSpanWidth(const std::string& s) -> float {\n Rect r;\n float width;\n GetOSTextSpanBoundsAndWidth(s, &r, &width);\n return width;\n }\n void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);\n\n // Returns the width of a string\n auto GetStringWidth(const char* s, bool big = false) -> float;\n auto GetStringWidth(const std::string& s, bool big = false) -> float {\n return GetStringWidth(s.c_str(), big);\n }\n\n // Returns the height of a string\n auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }\n\n // Given a target width, breaks the string up into multiple strings so they\n // fit within it\n void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);\n\n // Some chars we allow the OS to draw in some cases but draw ourselves in\n // others (to minimize the amount of switching back and forth).\n static auto IsOSDrawableAscii(int val) -> bool {\n // ( exclude a few that usually come in pairs so we\n // avoid one side looking different than the other )\n return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));\n }\n\n private:\n class TextSpanBoundsCacheEntry;\n void LoadGlyphPage(uint32_t index);\n\n // Map of entries for fast lookup.\n std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_;\n\n // List of entries for sorting by last-use-time\n std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_;\n std::mutex glyph_load_mutex_;\n Glyph glyphs_extras_[100]{};\n Glyph glyphs_big_[64]{};\n};\n\n}" ({) "{" (labeled_statement) "public:\n static void Init();" (statement_identifier) "public" (:) ":" (declaration) "static void Init();" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "Init()" (identifier) "Init" (parameter_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "TextGraphics();" (call_expression) "TextGraphics()" (identifier) "TextGraphics" (argument_list) "()" (() "(" ()) ")" (;) ";" (function_definition) "enum class FontPage {\n kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993\n };\n\n struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n };\n\n static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);\n auto GetOSTextSpanWidth(const std::string& s) -> float {\n Rect r;\n float width;\n GetOSTextSpanBoundsAndWidth(s, &r, &width);\n return width;\n }\n void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);\n\n // Returns the width of a string\n auto GetStringWidth(const char* s, bool big = false) -> float;\n auto GetStringWidth(const std::string& s, bool big = false) -> float {\n return GetStringWidth(s.c_str(), big);\n }\n\n // Returns the height of a string\n auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }\n\n // Given a target width, breaks the string up into multiple strings so they\n // fit within it\n void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);\n\n // Some chars we allow the OS to draw in some cases but draw ourselves in\n // others (to minimize the amount of switching back and forth).\n static auto IsOSDrawableAscii(int val) -> bool {\n // ( exclude a few that usually come in pairs so we\n // avoid one side looking different than the other )\n return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));\n }\n\n private:\n class TextSpanBoundsCacheEntry;\n void LoadGlyphPage(uint32_t index);\n\n // Map of entries for fast lookup.\n std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_;\n\n // List of entries for sorting by last-use-time\n std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_;\n std::mutex glyph_load_mutex_;\n Glyph glyphs_extras_[100]{};\n Glyph glyphs_big_[64]{};\n}" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (identifier) "FontPage" (compound_statement) "{\n kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993\n };\n\n struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n };\n\n static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);\n auto GetOSTextSpanWidth(const std::string& s) -> float {\n Rect r;\n float width;\n GetOSTextSpanBoundsAndWidth(s, &r, &width);\n return width;\n }\n void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);\n\n // Returns the width of a string\n auto GetStringWidth(const char* s, bool big = false) -> float;\n auto GetStringWidth(const std::string& s, bool big = false) -> float {\n return GetStringWidth(s.c_str(), big);\n }\n\n // Returns the height of a string\n auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }\n\n // Given a target width, breaks the string up into multiple strings so they\n // fit within it\n void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);\n\n // Some chars we allow the OS to draw in some cases but draw ourselves in\n // others (to minimize the amount of switching back and forth).\n static auto IsOSDrawableAscii(int val) -> bool {\n // ( exclude a few that usually come in pairs so we\n // avoid one side looking different than the other )\n return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));\n }\n\n private:\n class TextSpanBoundsCacheEntry;\n void LoadGlyphPage(uint32_t index);\n\n // Map of entries for fast lookup.\n std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_;\n\n // List of entries for sorting by last-use-time\n std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_;\n std::mutex glyph_load_mutex_;\n Glyph glyphs_extras_[100]{};\n Glyph glyphs_big_[64]{};\n}" ({) "{" (expression_statement) "kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993\n };" (comma_expression) "kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993" (assignment_expression) "kOSRendered = 9989" (identifier) "kOSRendered" (=) "=" (number_literal) "9989" (,) "," (comma_expression) "kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993" (assignment_expression) "kExtras1 = 9990" (identifier) "kExtras1" (=) "=" (number_literal) "9990" (,) "," (comma_expression) "kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993" (assignment_expression) "kExtras2 = 9991" (identifier) "kExtras2" (=) "=" (number_literal) "9991" (,) "," (comma_expression) "kExtras3 = 9992,\n kExtras4 = 9993" (assignment_expression) "kExtras3 = 9992" (identifier) "kExtras3" (=) "=" (number_literal) "9992" (,) "," (assignment_expression) "kExtras4 = 9993" (identifier) "kExtras4" (=) "=" (number_literal) "9993" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n }" (struct) "struct" (type_identifier) "Glyph" (field_declaration_list) "{\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n }" ({) "{" (field_declaration) "float pen_offset_x;" (primitive_type) "float" (field_identifier) "pen_offset_x" (;) ";" (field_declaration) "float pen_offset_y;" (primitive_type) "float" (field_identifier) "pen_offset_y" (;) ";" (field_declaration) "float advance;" (primitive_type) "float" (field_identifier) "advance" (;) ";" (field_declaration) "float x_size;" (primitive_type) "float" (field_identifier) "x_size" (;) ";" (field_declaration) "float y_size;" (primitive_type) "float" (field_identifier) "y_size" (;) ";" (field_declaration) "float tex_min_x;" (primitive_type) "float" (field_identifier) "tex_min_x" (;) ";" (field_declaration) "float tex_min_y;" (primitive_type) "float" (field_identifier) "tex_min_y" (;) ";" (field_declaration) "float tex_max_x;" (primitive_type) "float" (field_identifier) "tex_max_x" (;) ";" (field_declaration) "float tex_max_y;" (primitive_type) "float" (field_identifier) "tex_max_y" (;) ";" (}) "}" (;) ";" (declaration) "static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "auto" (auto) "auto" (macro_type_specifier) "GetBigCharIndex(int c)" (identifier) "GetBigCharIndex" (() "(" (type_descriptor) "int" (primitive_type) "int" (ERROR) "c" (identifier) "c" ()) ")" (ERROR) "-> int;" (->) "->" (primitive_type) "int" (;) ";" (comment) "// Returns a glyph or nullptr if it is unavailable." (storage_class_specifier) "auto" (auto) "auto" (ERROR) "GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void" (function_declarator) "GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages)" (identifier) "GetGlyph" (parameter_list) "(uint32_t value, bool big)" (() "(" (parameter_declaration) "uint32_t value" (primitive_type) "uint32_t" (identifier) "value" (,) "," (parameter_declaration) "bool big" (primitive_type) "bool" (identifier) "big" ()) ")" (ERROR) "->" (->) "->" (identifier) "Glyph" (ERROR) "*;\n static auto" (*) "*" (;) ";" (static) "static" (auto) "auto" (call_expression) "HaveBigChars(const std::string& string)" (identifier) "HaveBigChars" (argument_list) "(const std::string& string)" (() "(" (ERROR) "const std::" (identifier) "const" (identifier) "std" (:) ":" (:) ":" (binary_expression) "string& string" (identifier) "string" (&) "&" (identifier) "string" ()) ")" (ERROR) "-> bool;\n static auto" (-) "-" (>) ">" (primitive_type) "bool" (;) ";" (static) "static" (auto) "auto" (call_expression) "HaveChars(const std::string& string)" (identifier) "HaveChars" (argument_list) "(const std::string& string)" (() "(" (ERROR) "const std::" (identifier) "const" (identifier) "std" (:) ":" (:) ":" (binary_expression) "string& string" (identifier) "string" (&) "&" (identifier) "string" ()) ")" (ERROR) "-> bool;\n void" (-) "-" (>) ">" (primitive_type) "bool" (;) ";" (primitive_type) "void" (call_expression) "GetFontPagesForText(const std::string& text, std::set<int>* font_pages)" (identifier) "GetFontPagesForText" (argument_list) "(const std::string& text, std::set<int>* font_pages)" (() "(" (ERROR) "const std::" (identifier) "const" (identifier) "std" (:) ":" (:) ":" (binary_expression) "string& text" (identifier) "string" (&) "&" (identifier) "text" (,) "," (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "set<int>* font_pages" (binary_expression) "set<int" (identifier) "set" (<) "<" (identifier) "int" (ERROR) ">" (>) ">" (*) "*" (identifier) "font_pages" ()) ")" (;) ";" (primitive_type) "void" (function_declarator) "GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char)" (identifier) "GetFontPageCharRange" (parameter_list) "(int page, uint32_t* first_char,\n uint32_t* last_char)" (() "(" (parameter_declaration) "int page" (primitive_type) "int" (identifier) "page" (,) "," (parameter_declaration) "uint32_t* first_char" (primitive_type) "uint32_t" (pointer_declarator) "* first_char" (*) "*" (identifier) "first_char" (,) "," (parameter_declaration) "uint32_t* last_char" (primitive_type) "uint32_t" (pointer_declarator) "* last_char" (*) "*" (identifier) "last_char" ()) ")" (;) ";" (ERROR) "auto GetOSTextSpanWidth(const std::string& s) -> float" (storage_class_specifier) "auto" (auto) "auto" (macro_type_specifier) "GetOSTextSpanWidth(const std::string& s)" (identifier) "GetOSTextSpanWidth" (() "(" (type_descriptor) "const std" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string& s" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "s" ()) ")" (->) "->" (primitive_type) "float" (compound_statement) "{\n Rect r;\n float width;\n GetOSTextSpanBoundsAndWidth(s, &r, &width);\n return width;\n }" ({) "{" (declaration) "Rect r;" (type_identifier) "Rect" (identifier) "r" (;) ";" (declaration) "float width;" (primitive_type) "float" (identifier) "width" (;) ";" (expression_statement) "GetOSTextSpanBoundsAndWidth(s, &r, &width);" (call_expression) "GetOSTextSpanBoundsAndWidth(s, &r, &width)" (identifier) "GetOSTextSpanBoundsAndWidth" (argument_list) "(s, &r, &width)" (() "(" (identifier) "s" (,) "," (pointer_expression) "&r" (&) "&" (identifier) "r" (,) "," (pointer_expression) "&width" (&) "&" (identifier) "width" ()) ")" (;) ";" (return_statement) "return width;" (return) "return" (identifier) "width" (;) ";" (}) "}" (declaration) "void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);" (primitive_type) "void" (function_declarator) "GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width)" (identifier) "GetOSTextSpanBoundsAndWidth" (parameter_list) "(const std::string& s, Rect* r, float* width)" (() "(" (parameter_declaration) "const std::string& s" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "s" (,) "," (parameter_declaration) "Rect* r" (type_identifier) "Rect" (pointer_declarator) "* r" (*) "*" (identifier) "r" (,) "," (parameter_declaration) "float* width" (primitive_type) "float" (pointer_declarator) "* width" (*) "*" (identifier) "width" ()) ")" (;) ";" (comment) "// Returns the width of a string" (declaration) "auto GetStringWidth(const char* s, bool big = false) -> float;" (storage_class_specifier) "auto" (auto) "auto" (macro_type_specifier) "GetStringWidth(const char*" (identifier) "GetStringWidth" (() "(" (type_descriptor) "const char*" (type_qualifier) "const" (const) "const" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) "" (identifier) "s" (,) "," (init_declarator) "bool big = false) -> float" (identifier) "bool" (ERROR) "big" (identifier) "big" (=) "=" (field_expression) "false) -> float" (false) "false" (ERROR) ")" ()) ")" (->) "->" (field_identifier) "float" (;) ";" (ERROR) "auto GetStringWidth(const std::string& s, bool big = false) -> float" (storage_class_specifier) "auto" (auto) "auto" (macro_type_specifier) "GetStringWidth(const std::string& s, bool big = false)" (identifier) "GetStringWidth" (() "(" (type_descriptor) "const std" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string& s, bool big = false" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "s" (,) "," (primitive_type) "bool" (identifier) "big" (=) "=" (false) "false" ()) ")" (->) "->" (primitive_type) "float" (compound_statement) "{\n return GetStringWidth(s.c_str(), big);\n }" ({) "{" (return_statement) "return GetStringWidth(s.c_str(), big);" (return) "return" (call_expression) "GetStringWidth(s.c_str(), big)" (identifier) "GetStringWidth" (argument_list) "(s.c_str(), big)" (() "(" (call_expression) "s.c_str()" (field_expression) "s.c_str" (identifier) "s" (.) "." (field_identifier) "c_str" (argument_list) "()" (() "(" ()) ")" (,) "," (identifier) "big" ()) ")" (;) ";" (}) "}" (comment) "// Returns the height of a string" (function_definition) "auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }" (storage_class_specifier) "auto" (auto) "auto" (macro_type_specifier) "GetStringHeight(const char* s)" (identifier) "GetStringHeight" (() "(" (type_descriptor) "const char*" (type_qualifier) "const" (const) "const" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" (ERROR) "s" (identifier) "s" ()) ")" (ERROR) "-> float;" (->) "->" (primitive_type) "float" (;) ";" (storage_class_specifier) "auto" (auto) "auto" (function_declarator) "GetStringHeight(const std::string& s)" (identifier) "GetStringHeight" (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" ()) ")" (ERROR) "-> float" (->) "->" (primitive_type) "float" (compound_statement) "{\n return GetStringHeight(s.c_str());\n }" ({) "{" (return_statement) "return GetStringHeight(s.c_str());" (return) "return" (call_expression) "GetStringHeight(s.c_str())" (identifier) "GetStringHeight" (argument_list) "(s.c_str())" (() "(" (call_expression) "s.c_str()" (field_expression) "s.c_str" (identifier) "s" (.) "." (field_identifier) "c_str" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (comment) "// Given a target width, breaks the string up into multiple strings so they" (comment) "// fit within it" (declaration) "void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);" (primitive_type) "void" (function_declarator) "BreakUpString(const char* text, float width,\n std::vector<std::string>* v)" (identifier) "BreakUpString" (parameter_list) "(const char* text, float width,\n std::vector<std::string>* v)" (() "(" (parameter_declaration) "const char* text" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* text" (*) "*" (identifier) "text" (,) "," (parameter_declaration) "float width" (primitive_type) "float" (identifier) "width" (,) "," (parameter_declaration) "std::vector<std::string>* v" (type_identifier) "std" (ERROR) "::vector<std::string>" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (>) ">" (pointer_declarator) "* v" (*) "*" (identifier) "v" ()) ")" (;) ";" (comment) "// Some chars we allow the OS to draw in some cases but draw ourselves in" (comment) "// others (to minimize the amount of switching back and forth)." (ERROR) "static auto IsOSDrawableAscii(int val) -> bool" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "auto" (auto) "auto" (macro_type_specifier) "IsOSDrawableAscii(int val)" (identifier) "IsOSDrawableAscii" (() "(" (type_descriptor) "int" (primitive_type) "int" (ERROR) "val" (identifier) "val" ()) ")" (->) "->" (primitive_type) "bool" (compound_statement) "{\n // ( exclude a few that usually come in pairs so we\n // avoid one side looking different than the other )\n return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));\n }" ({) "{" (comment) "// ( exclude a few that usually come in pairs so we" (comment) "// avoid one side looking different than the other )" (return_statement) "return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));" (return) "return" (parenthesized_expression) "(((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'))" (() "(" (binary_expression) "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')')" (binary_expression) "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(')" (binary_expression) "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}')" (binary_expression) "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')\n && (val != '{')" (binary_expression) "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[') && (val != ']')" (binary_expression) "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"') && (val != '[')" (binary_expression) "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'') && (val != '"')" (binary_expression) "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\'')" (parenthesized_expression) "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))" (() "(" (binary_expression) "(val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~')" (binary_expression) "(val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`')" (binary_expression) "(val >= ' ' && val <= '/') || (val >= ':' && val <= '@')" (parenthesized_expression) "(val >= ' ' && val <= '/')" (() "(" (binary_expression) "val >= ' ' && val <= '/'" (binary_expression) "val >= ' '" (identifier) "val" (>=) ">=" (char_literal) "' '" (') "'" (character) " " (') "'" (&&) "&&" (binary_expression) "val <= '/'" (identifier) "val" (<=) "<=" (char_literal) "'/'" (') "'" (character) "/" (') "'" ()) ")" (||) "||" (parenthesized_expression) "(val >= ':' && val <= '@')" (() "(" (binary_expression) "val >= ':' && val <= '@'" (binary_expression) "val >= ':'" (identifier) "val" (>=) ">=" (char_literal) "':'" (') "'" (character) ":" (') "'" (&&) "&&" (binary_expression) "val <= '@'" (identifier) "val" (<=) "<=" (char_literal) "'@'" (') "'" (character) "@" (') "'" ()) ")" (||) "||" (parenthesized_expression) "(val >= '[' && val <= '`')" (() "(" (binary_expression) "val >= '[' && val <= '`'" (binary_expression) "val >= '['" (identifier) "val" (>=) ">=" (char_literal) "'['" (') "'" (character) "[" (') "'" (&&) "&&" (binary_expression) "val <= '`'" (identifier) "val" (<=) "<=" (char_literal) "'`'" (') "'" (character) "`" (') "'" ()) ")" (||) "||" (parenthesized_expression) "(val >= '{' && val <= '~')" (() "(" (binary_expression) "val >= '{' && val <= '~'" (binary_expression) "val >= '{'" (identifier) "val" (>=) ">=" (char_literal) "'{'" (') "'" (character) "{" (') "'" (&&) "&&" (binary_expression) "val <= '~'" (identifier) "val" (<=) "<=" (char_literal) "'~'" (') "'" (character) "~" (') "'" ()) ")" ()) ")" (&&) "&&" (parenthesized_expression) "(val != '\'')" (() "(" (binary_expression) "val != '\''" (identifier) "val" (!=) "!=" (char_literal) "'\''" (') "'" (escape_sequence) "\'" (') "'" ()) ")" (&&) "&&" (parenthesized_expression) "(val != '"')" (() "(" (binary_expression) "val != '"'" (identifier) "val" (!=) "!=" (char_literal) "'"'" (') "'" (character) """ (') "'" ()) ")" (&&) "&&" (parenthesized_expression) "(val != '[')" (() "(" (binary_expression) "val != '['" (identifier) "val" (!=) "!=" (char_literal) "'['" (') "'" (character) "[" (') "'" ()) ")" (&&) "&&" (parenthesized_expression) "(val != ']')" (() "(" (binary_expression) "val != ']'" (identifier) "val" (!=) "!=" (char_literal) "']'" (') "'" (character) "]" (') "'" ()) ")" (&&) "&&" (parenthesized_expression) "(val != '{')" (() "(" (binary_expression) "val != '{'" (identifier) "val" (!=) "!=" (char_literal) "'{'" (') "'" (character) "{" (') "'" ()) ")" (&&) "&&" (parenthesized_expression) "(val != '}')" (() "(" (binary_expression) "val != '}'" (identifier) "val" (!=) "!=" (char_literal) "'}'" (') "'" (character) "}" (') "'" ()) ")" (&&) "&&" (parenthesized_expression) "(val != '(')" (() "(" (binary_expression) "val != '('" (identifier) "val" (!=) "!=" (char_literal) "'('" (') "'" (character) "(" (') "'" ()) ")" (&&) "&&" (parenthesized_expression) "(val != ')')" (() "(" (binary_expression) "val != ')'" (identifier) "val" (!=) "!=" (char_literal) "')'" (') "'" (character) ")" (') "'" ()) ")" ()) ")" (;) ";" (}) "}" (labeled_statement) "private:\n class TextSpanBoundsCacheEntry;" (statement_identifier) "private" (:) ":" (declaration) "class TextSpanBoundsCacheEntry;" (type_identifier) "class" (identifier) "TextSpanBoundsCacheEntry" (;) ";" (declaration) "void LoadGlyphPage(uint32_t index);" (primitive_type) "void" (function_declarator) "LoadGlyphPage(uint32_t index)" (identifier) "LoadGlyphPage" (parameter_list) "(uint32_t index)" (() "(" (parameter_declaration) "uint32_t index" (primitive_type) "uint32_t" (identifier) "index" ()) ")" (;) ";" (comment) "// Map of entries for fast lookup." (expression_statement) "std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_;" (binary_expression) "std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_" (identifier) "std" (ERROR) "::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry>" (:) ":" (:) ":" (binary_expression) "unordered_map<std" (identifier) "unordered_map" (<) "<" (identifier) "std" (:) ":" (:) ":" (comma_expression) "string, Object" (identifier) "string" (,) "," (identifier) "Object" (:) ":" (:) ":" (binary_expression) "Ref<TextSpanBoundsCacheEntry" (identifier) "Ref" (<) "<" (identifier) "TextSpanBoundsCacheEntry" (>) ">" (>) ">" (identifier) "text_span_bounds_cache_map_" (;) ";" (comment) "// List of entries for sorting by last-use-time" (expression_statement) "std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_;" (binary_expression) "std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_" (identifier) "std" (ERROR) "::list<Object::Ref<TextSpanBoundsCacheEntry>" (:) ":" (:) ":" (binary_expression) "list<Object" (identifier) "list" (<) "<" (identifier) "Object" (:) ":" (:) ":" (binary_expression) "Ref<TextSpanBoundsCacheEntry" (identifier) "Ref" (<) "<" (identifier) "TextSpanBoundsCacheEntry" (>) ">" (>) ">" (identifier) "text_span_bounds_cache_" (;) ";" (labeled_statement) "std::mutex glyph_load_mutex_;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "mutex glyph_load_mutex_;" (type_identifier) "mutex" (identifier) "glyph_load_mutex_" (;) ";" (function_definition) "Glyph glyphs_extras_[100]{}" (type_identifier) "Glyph" (array_declarator) "glyphs_extras_[100]" (identifier) "glyphs_extras_" ([) "[" (number_literal) "100" (]) "]" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "Glyph glyphs_big_[64]{}" (type_identifier) "Glyph" (array_declarator) "glyphs_big_[64]" (identifier) "glyphs_big_" ([) "[" (number_literal) "64" (]) "]" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace ballistica" (preproc_call) "#endif // BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n" (preproc_directive) "#endif" (comment) "// BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_"
866
31
{"language": "c", "success": true, "metadata": {"lines": 91, "avg_line_length": 36.57, "nodes": 567, "errors": 0, "source_hash": "dc1ceff166425b56e613498a90fa43e8b23c3b491798fddfaecb9bf1bd9e2b73", "categorized_nodes": 342}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "ERROR", "text": "#ifndef BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n#define BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n\n#include <list>\n#include <mutex>\n#include <set>\n#include <string>\n#include <unordered_map>\n#include <vector>\n\n#include \"ballistica/core/object.h\"\n#include \"ballistica/math/rect.h\"\n\nnamespace ballistica {\n\n// Largest unicode value we ask the OS to draw for us.\nconst int kTextMaxUnicodeVal = 999999;\nconst float kTextRowHeight = 32.0f;\n\n// Encapsulates text-display functionality used by the game thread.\nclass TextGraphics {\n public:\n static void Init();\n\n TextGraphics();\n\n enum class FontPage {\n kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993\n };\n\n struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n };\n\n static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);\n auto GetOSTextSpanWidth(const std::string& s) -> float {\n Rect r;\n float width;\n GetOSTextSpanBoundsAndWidth(s, &r, &width);\n return width;\n }\n void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);\n\n // Returns the width of a string\n auto GetStringWidth(const char* s, bool big = false) -> float;\n auto GetStringWidth(const std::string& s, bool big = false) -> float {\n return GetStringWidth(s.c_str(), big);\n }\n\n // Returns the height of a string\n auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }\n\n // Given a target width, breaks the string up into multiple strings so they\n // fit within it\n void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);\n\n // Some chars we allow the OS to draw in some cases but draw ourselves in\n // others (to minimize the amount of switching back and forth).\n static auto IsOSDrawableAscii(int val) -> bool {\n // ( exclude a few that usually come in pairs so we\n // avoid one side looking different than the other )\n return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));\n }\n\n private:\n class TextSpanBoundsCacheEntry;\n void LoadGlyphPage(uint32_t index);\n\n // Map of entries for fast lookup.\n std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_;\n\n // List of entries for sorting by last-use-time\n std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_;\n std::mutex glyph_load_mutex_;\n Glyph glyphs_extras_[100]{};\n Glyph glyphs_big_[64]{};\n};\n\n} // namespace ballistica\n\n#endif // BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 31, 32, 38, 44, 565], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 111, "column": 0}}, {"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": "BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_", "parent": 0, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 49}}, {"id": 3, "type": "preproc_def", "text": "#define BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_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": "BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_", "parent": 3, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 49}}, {"id": 6, "type": "preproc_include", "text": "#include <list>\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": "system_lib_string", "text": "<list>", "parent": 6, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 15}}, {"id": 9, "type": "preproc_include", "text": "#include <mutex>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<mutex>", "parent": 9, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 16}}, {"id": 12, "type": "preproc_include", "text": "#include <set>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<set>", "parent": 12, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 14}}, {"id": 15, "type": "preproc_include", "text": "#include <string>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<string>", "parent": 15, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 17}}, {"id": 18, "type": "preproc_include", "text": "#include <unordered_map>\n", "parent": 0, "children": [19, 20], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<unordered_map>", "parent": 18, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 24}}, {"id": 21, "type": "preproc_include", "text": "#include <vector>\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": "system_lib_string", "text": "<vector>", "parent": 21, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 17}}, {"id": 24, "type": "preproc_include", "text": "#include \"ballistica/core/object.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"ballistica/core/object.h\"", "parent": 24, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 35}}, {"id": 27, "type": "preproc_include", "text": "#include \"ballistica/math/rect.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"ballistica/math/rect.h\"", "parent": 27, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 33}}, {"id": 30, "type": "type_identifier", "text": "namespace", "parent": 0, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 9}}, {"id": 31, "type": "identifier", "text": "ballistica", "parent": 0, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 20}}, {"id": 32, "type": "declaration", "text": "const int kTextMaxUnicodeVal = 999999;", "parent": 0, "children": [33, 34], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 38}}, {"id": 33, "type": "primitive_type", "text": "int", "parent": 32, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 9}}, {"id": 34, "type": "init_declarator", "text": "kTextMaxUnicodeVal = 999999", "parent": 32, "children": [35, 36, 37], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 37}}, {"id": 35, "type": "identifier", "text": "kTextMaxUnicodeVal", "parent": 34, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 28}}, {"id": 36, "type": "=", "text": "=", "parent": 34, "children": [], "start_point": {"row": 18, "column": 29}, "end_point": {"row": 18, "column": 30}}, {"id": 37, "type": "number_literal", "text": "999999", "parent": 34, "children": [], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 37}}, {"id": 38, "type": "declaration", "text": "const float kTextRowHeight = 32.0f;", "parent": 0, "children": [39, 40], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 35}}, {"id": 39, "type": "primitive_type", "text": "float", "parent": 38, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 11}}, {"id": 40, "type": "init_declarator", "text": "kTextRowHeight = 32.0f", "parent": 38, "children": [41, 42, 43], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 34}}, {"id": 41, "type": "identifier", "text": "kTextRowHeight", "parent": 40, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 26}}, {"id": 42, "type": "=", "text": "=", "parent": 40, "children": [], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 28}}, {"id": 43, "type": "number_literal", "text": "32.0f", "parent": 40, "children": [], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 34}}, {"id": 44, "type": "function_definition", "text": "class TextGraphics {\n public:\n static void Init();\n\n TextGraphics();\n\n enum class FontPage {\n kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993\n };\n\n struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n };\n\n static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);\n auto GetOSTextSpanWidth(const std::string& s) -> float {\n Rect r;\n float width;\n GetOSTextSpanBoundsAndWidth(s, &r, &width);\n return width;\n }\n void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);\n\n // Returns the width of a string\n auto GetStringWidth(const char* s, bool big = false) -> float;\n auto GetStringWidth(const std::string& s, bool big = false) -> float {\n return GetStringWidth(s.c_str(), big);\n }\n\n // Returns the height of a string\n auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }\n\n // Given a target width, breaks the string up into multiple strings so they\n // fit within it\n void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);\n\n // Some chars we allow the OS to draw in some cases but draw ourselves in\n // others (to minimize the amount of switching back and forth).\n static auto IsOSDrawableAscii(int val) -> bool {\n // ( exclude a few that usually come in pairs so we\n // avoid one side looking different than the other )\n return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));\n }\n\n private:\n class TextSpanBoundsCacheEntry;\n void LoadGlyphPage(uint32_t index);\n\n // Map of entries for fast lookup.\n std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_;\n\n // List of entries for sorting by last-use-time\n std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_;\n std::mutex glyph_load_mutex_;\n Glyph glyphs_extras_[100]{};\n Glyph glyphs_big_[64]{};\n};\n\n}", "parent": 0, "children": [45], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 108, "column": 1}}, {"id": 45, "type": "identifier", "text": "TextGraphics", "parent": 44, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 18}}, {"id": 46, "type": "labeled_statement", "text": "public:\n static void Init();", "parent": 44, "children": [47], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 24, "column": 21}}, {"id": 47, "type": "declaration", "text": "static void Init();", "parent": 46, "children": [48, 49], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 21}}, {"id": 48, "type": "primitive_type", "text": "void", "parent": 47, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 13}}, {"id": 49, "type": "function_declarator", "text": "Init()", "parent": 47, "children": [50, 51], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 20}}, {"id": 50, "type": "identifier", "text": "Init", "parent": 49, "children": [], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 18}}, {"id": 51, "type": "parameter_list", "text": "()", "parent": 49, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 20}}, {"id": 52, "type": "call_expression", "text": "TextGraphics()", "parent": 44, "children": [53, 54], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 16}}, {"id": 53, "type": "identifier", "text": "TextGraphics", "parent": 52, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 14}}, {"id": 54, "type": "argument_list", "text": "()", "parent": 52, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 16}}, {"id": 55, "type": "function_definition", "text": "enum class FontPage {\n kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993\n };\n\n struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n };\n\n static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);\n auto GetOSTextSpanWidth(const std::string& s) -> float {\n Rect r;\n float width;\n GetOSTextSpanBoundsAndWidth(s, &r, &width);\n return width;\n }\n void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);\n\n // Returns the width of a string\n auto GetStringWidth(const char* s, bool big = false) -> float;\n auto GetStringWidth(const std::string& s, bool big = false) -> float {\n return GetStringWidth(s.c_str(), big);\n }\n\n // Returns the height of a string\n auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }\n\n // Given a target width, breaks the string up into multiple strings so they\n // fit within it\n void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);\n\n // Some chars we allow the OS to draw in some cases but draw ourselves in\n // others (to minimize the amount of switching back and forth).\n static auto IsOSDrawableAscii(int val) -> bool {\n // ( exclude a few that usually come in pairs so we\n // avoid one side looking different than the other )\n return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));\n }\n\n private:\n class TextSpanBoundsCacheEntry;\n void LoadGlyphPage(uint32_t index);\n\n // Map of entries for fast lookup.\n std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_;\n\n // List of entries for sorting by last-use-time\n std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_;\n std::mutex glyph_load_mutex_;\n Glyph glyphs_extras_[100]{};\n Glyph glyphs_big_[64]{};\n}", "parent": 44, "children": [56, 58], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 106, "column": 1}}, {"id": 56, "type": "enum_specifier", "text": "enum class", "parent": 55, "children": [57], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 12}}, {"id": 57, "type": "enum", "text": "enum", "parent": 56, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 6}}, {"id": 58, "type": "identifier", "text": "FontPage", "parent": 55, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 21}}, {"id": 59, "type": "comma_expression", "text": "kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993", "parent": 55, "children": [60, 64], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 33, "column": 19}}, {"id": 60, "type": "assignment_expression", "text": "kOSRendered = 9989", "parent": 59, "children": [61, 62, 63], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 22}}, {"id": 61, "type": "identifier", "text": "kOSRendered", "parent": 60, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 15}}, {"id": 62, "type": "=", "text": "=", "parent": 60, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 17}}, {"id": 63, "type": "number_literal", "text": "9989", "parent": 60, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 22}}, {"id": 64, "type": "comma_expression", "text": "kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993", "parent": 59, "children": [65, 69], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 33, "column": 19}}, {"id": 65, "type": "assignment_expression", "text": "kExtras1 = 9990", "parent": 64, "children": [66, 67, 68], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 19}}, {"id": 66, "type": "identifier", "text": "kExtras1", "parent": 65, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 12}}, {"id": 67, "type": "=", "text": "=", "parent": 65, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 14}}, {"id": 68, "type": "number_literal", "text": "9990", "parent": 65, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 19}}, {"id": 69, "type": "comma_expression", "text": "kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993", "parent": 64, "children": [70, 74], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 33, "column": 19}}, {"id": 70, "type": "assignment_expression", "text": "kExtras2 = 9991", "parent": 69, "children": [71, 72, 73], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 19}}, {"id": 71, "type": "identifier", "text": "kExtras2", "parent": 70, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 12}}, {"id": 72, "type": "=", "text": "=", "parent": 70, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 14}}, {"id": 73, "type": "number_literal", "text": "9991", "parent": 70, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 19}}, {"id": 74, "type": "comma_expression", "text": "kExtras3 = 9992,\n kExtras4 = 9993", "parent": 69, "children": [75, 79], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 33, "column": 19}}, {"id": 75, "type": "assignment_expression", "text": "kExtras3 = 9992", "parent": 74, "children": [76, 77, 78], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 19}}, {"id": 76, "type": "identifier", "text": "kExtras3", "parent": 75, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 12}}, {"id": 77, "type": "=", "text": "=", "parent": 75, "children": [], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 14}}, {"id": 78, "type": "number_literal", "text": "9992", "parent": 75, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 19}}, {"id": 79, "type": "assignment_expression", "text": "kExtras4 = 9993", "parent": 74, "children": [80, 81, 82], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 19}}, {"id": 80, "type": "identifier", "text": "kExtras4", "parent": 79, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 12}}, {"id": 81, "type": "=", "text": "=", "parent": 79, "children": [], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 14}}, {"id": 82, "type": "number_literal", "text": "9993", "parent": 79, "children": [], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 19}}, {"id": 83, "type": "struct_specifier", "text": "struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n }", "parent": 55, "children": [84, 85], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 46, "column": 3}}, {"id": 84, "type": "struct", "text": "struct", "parent": 83, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 8}}, {"id": 85, "type": "type_identifier", "text": "Glyph", "parent": 83, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 14}}, {"id": 86, "type": "field_declaration", "text": "float pen_offset_x;", "parent": 83, "children": [87, 88], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 23}}, {"id": 87, "type": "primitive_type", "text": "float", "parent": 86, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 9}}, {"id": 88, "type": "field_identifier", "text": "pen_offset_x", "parent": 86, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 22}}, {"id": 89, "type": "field_declaration", "text": "float pen_offset_y;", "parent": 83, "children": [90, 91], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 23}}, {"id": 90, "type": "primitive_type", "text": "float", "parent": 89, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 9}}, {"id": 91, "type": "field_identifier", "text": "pen_offset_y", "parent": 89, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 22}}, {"id": 92, "type": "field_declaration", "text": "float advance;", "parent": 83, "children": [93, 94], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 18}}, {"id": 93, "type": "primitive_type", "text": "float", "parent": 92, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 9}}, {"id": 94, "type": "field_identifier", "text": "advance", "parent": 92, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 17}}, {"id": 95, "type": "field_declaration", "text": "float x_size;", "parent": 83, "children": [96, 97], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 17}}, {"id": 96, "type": "primitive_type", "text": "float", "parent": 95, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 9}}, {"id": 97, "type": "field_identifier", "text": "x_size", "parent": 95, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 16}}, {"id": 98, "type": "field_declaration", "text": "float y_size;", "parent": 83, "children": [99, 100], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 17}}, {"id": 99, "type": "primitive_type", "text": "float", "parent": 98, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 9}}, {"id": 100, "type": "field_identifier", "text": "y_size", "parent": 98, "children": [], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 16}}, {"id": 101, "type": "field_declaration", "text": "float tex_min_x;", "parent": 83, "children": [102, 103], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 20}}, {"id": 102, "type": "primitive_type", "text": "float", "parent": 101, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 9}}, {"id": 103, "type": "field_identifier", "text": "tex_min_x", "parent": 101, "children": [], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 19}}, {"id": 104, "type": "field_declaration", "text": "float tex_min_y;", "parent": 83, "children": [105, 106], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 20}}, {"id": 105, "type": "primitive_type", "text": "float", "parent": 104, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 9}}, {"id": 106, "type": "field_identifier", "text": "tex_min_y", "parent": 104, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 19}}, {"id": 107, "type": "field_declaration", "text": "float tex_max_x;", "parent": 83, "children": [108, 109], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 20}}, {"id": 108, "type": "primitive_type", "text": "float", "parent": 107, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 9}}, {"id": 109, "type": "field_identifier", "text": "tex_max_x", "parent": 107, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 19}}, {"id": 110, "type": "field_declaration", "text": "float tex_max_y;", "parent": 83, "children": [111, 112], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 20}}, {"id": 111, "type": "primitive_type", "text": "float", "parent": 110, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 9}}, {"id": 112, "type": "field_identifier", "text": "tex_max_y", "parent": 110, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 19}}, {"id": 113, "type": "declaration", "text": "static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);", "parent": 55, "children": [114, 116, 122, 124, 126, 186], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 56, "column": 49}}, {"id": 114, "type": "storage_class_specifier", "text": "auto", "parent": 113, "children": [115], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 13}}, {"id": 115, "type": "auto", "text": "auto", "parent": 114, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 13}}, {"id": 116, "type": "macro_type_specifier", "text": "GetBigCharIndex(int c)", "parent": 113, "children": [117, 118, 120], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 36}}, {"id": 117, "type": "identifier", "text": "GetBigCharIndex", "parent": 116, "children": [], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 29}}, {"id": 118, "type": "type_descriptor", "text": "int", "parent": 116, "children": [119], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 33}}, {"id": 119, "type": "primitive_type", "text": "int", "parent": 118, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 33}}, {"id": 120, "type": "ERROR", "text": "c", "parent": 116, "children": [121], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 35}}, {"id": 121, "type": "identifier", "text": "c", "parent": 120, "children": [], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 35}}, {"id": 122, "type": "ERROR", "text": "-> int;", "parent": 113, "children": [123], "start_point": {"row": 48, "column": 37}, "end_point": {"row": 48, "column": 44}}, {"id": 123, "type": "primitive_type", "text": "int", "parent": 122, "children": [], "start_point": {"row": 48, "column": 40}, "end_point": {"row": 48, "column": 43}}, {"id": 124, "type": "storage_class_specifier", "text": "auto", "parent": 113, "children": [125], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 6}}, {"id": 125, "type": "auto", "text": "auto", "parent": 124, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 6}}, {"id": 126, "type": "ERROR", "text": "GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void", "parent": 113, "children": [127, 185], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 55, "column": 6}}, {"id": 127, "type": "function_declarator", "text": "GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages)", "parent": 126, "children": [128, 129, 136, 137, 140, 148, 153, 161, 166], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 54, "column": 78}}, {"id": 128, "type": "identifier", "text": "GetGlyph", "parent": 127, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 15}}, {"id": 129, "type": "parameter_list", "text": "(uint32_t value, bool big)", "parent": 127, "children": [130, 133], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 41}}, {"id": 130, "type": "parameter_declaration", "text": "uint32_t value", "parent": 129, "children": [131, 132], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 30}}, {"id": 131, "type": "primitive_type", "text": "uint32_t", "parent": 130, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 24}}, {"id": 132, "type": "identifier", "text": "value", "parent": 130, "children": [], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 30}}, {"id": 133, "type": "parameter_declaration", "text": "bool big", "parent": 129, "children": [134, 135], "start_point": {"row": 51, "column": 32}, "end_point": {"row": 51, "column": 40}}, {"id": 134, "type": "primitive_type", "text": "bool", "parent": 133, "children": [], "start_point": {"row": 51, "column": 32}, "end_point": {"row": 51, "column": 36}}, {"id": 135, "type": "identifier", "text": "big", "parent": 133, "children": [], "start_point": {"row": 51, "column": 37}, "end_point": {"row": 51, "column": 40}}, {"id": 136, "type": "identifier", "text": "Glyph", "parent": 127, "children": [], "start_point": {"row": 51, "column": 45}, "end_point": {"row": 51, "column": 50}}, {"id": 137, "type": "ERROR", "text": "*;\n static auto", "parent": 127, "children": [138, 139], "start_point": {"row": 51, "column": 50}, "end_point": {"row": 52, "column": 13}}, {"id": 138, "type": "*", "text": "*", "parent": 137, "children": [], "start_point": {"row": 51, "column": 50}, "end_point": {"row": 51, "column": 51}}, {"id": 139, "type": "auto", "text": "auto", "parent": 137, "children": [], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 13}}, {"id": 140, "type": "call_expression", "text": "HaveBigChars(const std::string& string)", "parent": 127, "children": [141, 142], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 53}}, {"id": 141, "type": "identifier", "text": "HaveBigChars", "parent": 140, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 26}}, {"id": 142, "type": "argument_list", "text": "(const std::string& string)", "parent": 140, "children": [143, 145], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 53}}, {"id": 143, "type": "ERROR", "text": "const std::", "parent": 142, "children": [144], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 38}}, {"id": 144, "type": "identifier", "text": "std", "parent": 143, "children": [], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 36}}, {"id": 145, "type": "binary_expression", "text": "string& string", "parent": 142, "children": [146, 147], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 52}}, {"id": 146, "type": "identifier", "text": "string", "parent": 145, "children": [], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 44}}, {"id": 147, "type": "identifier", "text": "string", "parent": 145, "children": [], "start_point": {"row": 52, "column": 46}, "end_point": {"row": 52, "column": 52}}, {"id": 148, "type": "ERROR", "text": "-> bool;\n static auto", "parent": 127, "children": [149, 150, 151, 152], "start_point": {"row": 52, "column": 54}, "end_point": {"row": 53, "column": 13}}, {"id": 149, "type": "-", "text": "-", "parent": 148, "children": [], "start_point": {"row": 52, "column": 54}, "end_point": {"row": 52, "column": 55}}, {"id": 150, "type": ">", "text": ">", "parent": 148, "children": [], "start_point": {"row": 52, "column": 55}, "end_point": {"row": 52, "column": 56}}, {"id": 151, "type": "primitive_type", "text": "bool", "parent": 148, "children": [], "start_point": {"row": 52, "column": 57}, "end_point": {"row": 52, "column": 61}}, {"id": 152, "type": "auto", "text": "auto", "parent": 148, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 13}}, {"id": 153, "type": "call_expression", "text": "HaveChars(const std::string& string)", "parent": 127, "children": [154, 155], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 50}}, {"id": 154, "type": "identifier", "text": "HaveChars", "parent": 153, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 23}}, {"id": 155, "type": "argument_list", "text": "(const std::string& string)", "parent": 153, "children": [156, 158], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 50}}, {"id": 156, "type": "ERROR", "text": "const std::", "parent": 155, "children": [157], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 35}}, {"id": 157, "type": "identifier", "text": "std", "parent": 156, "children": [], "start_point": {"row": 53, "column": 30}, "end_point": {"row": 53, "column": 33}}, {"id": 158, "type": "binary_expression", "text": "string& string", "parent": 155, "children": [159, 160], "start_point": {"row": 53, "column": 35}, "end_point": {"row": 53, "column": 49}}, {"id": 159, "type": "identifier", "text": "string", "parent": 158, "children": [], "start_point": {"row": 53, "column": 35}, "end_point": {"row": 53, "column": 41}}, {"id": 160, "type": "identifier", "text": "string", "parent": 158, "children": [], "start_point": {"row": 53, "column": 43}, "end_point": {"row": 53, "column": 49}}, {"id": 161, "type": "ERROR", "text": "-> bool;\n void", "parent": 127, "children": [162, 163, 164, 165], "start_point": {"row": 53, "column": 51}, "end_point": {"row": 54, "column": 6}}, {"id": 162, "type": "-", "text": "-", "parent": 161, "children": [], "start_point": {"row": 53, "column": 51}, "end_point": {"row": 53, "column": 52}}, {"id": 163, "type": ">", "text": ">", "parent": 161, "children": [], "start_point": {"row": 53, "column": 52}, "end_point": {"row": 53, "column": 53}}, {"id": 164, "type": "primitive_type", "text": "bool", "parent": 161, "children": [], "start_point": {"row": 53, "column": 54}, "end_point": {"row": 53, "column": 58}}, {"id": 165, "type": "primitive_type", "text": "void", "parent": 161, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 6}}, {"id": 166, "type": "call_expression", "text": "GetFontPagesForText(const std::string& text, std::set<int>* font_pages)", "parent": 127, "children": [167, 168], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 78}}, {"id": 167, "type": "identifier", "text": "GetFontPagesForText", "parent": 166, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 26}}, {"id": 168, "type": "argument_list", "text": "(const std::string& text, std::set<int>* font_pages)", "parent": 166, "children": [169, 171, 174, 176], "start_point": {"row": 54, "column": 26}, "end_point": {"row": 54, "column": 78}}, {"id": 169, "type": "ERROR", "text": "const std::", "parent": 168, "children": [170], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 38}}, {"id": 170, "type": "identifier", "text": "std", "parent": 169, "children": [], "start_point": {"row": 54, "column": 33}, "end_point": {"row": 54, "column": 36}}, {"id": 171, "type": "binary_expression", "text": "string& text", "parent": 168, "children": [172, 173], "start_point": {"row": 54, "column": 38}, "end_point": {"row": 54, "column": 50}}, {"id": 172, "type": "identifier", "text": "string", "parent": 171, "children": [], "start_point": {"row": 54, "column": 38}, "end_point": {"row": 54, "column": 44}}, {"id": 173, "type": "identifier", "text": "text", "parent": 171, "children": [], "start_point": {"row": 54, "column": 46}, "end_point": {"row": 54, "column": 50}}, {"id": 174, "type": "ERROR", "text": "std::", "parent": 168, "children": [175], "start_point": {"row": 54, "column": 52}, "end_point": {"row": 54, "column": 57}}, {"id": 175, "type": "identifier", "text": "std", "parent": 174, "children": [], "start_point": {"row": 54, "column": 52}, "end_point": {"row": 54, "column": 55}}, {"id": 176, "type": "binary_expression", "text": "set<int>* font_pages", "parent": 168, "children": [177, 181, 183, 184], "start_point": {"row": 54, "column": 57}, "end_point": {"row": 54, "column": 77}}, {"id": 177, "type": "binary_expression", "text": "set<int", "parent": 176, "children": [178, 179, 180], "start_point": {"row": 54, "column": 57}, "end_point": {"row": 54, "column": 64}}, {"id": 178, "type": "identifier", "text": "set", "parent": 177, "children": [], "start_point": {"row": 54, "column": 57}, "end_point": {"row": 54, "column": 60}}, {"id": 179, "type": "<", "text": "<", "parent": 177, "children": [], "start_point": {"row": 54, "column": 60}, "end_point": {"row": 54, "column": 61}}, {"id": 180, "type": "identifier", "text": "int", "parent": 177, "children": [], "start_point": {"row": 54, "column": 61}, "end_point": {"row": 54, "column": 64}}, {"id": 181, "type": "ERROR", "text": ">", "parent": 176, "children": [182], "start_point": {"row": 54, "column": 64}, "end_point": {"row": 54, "column": 65}}, {"id": 182, "type": ">", "text": ">", "parent": 181, "children": [], "start_point": {"row": 54, "column": 64}, "end_point": {"row": 54, "column": 65}}, {"id": 183, "type": "*", "text": "*", "parent": 176, "children": [], "start_point": {"row": 54, "column": 65}, "end_point": {"row": 54, "column": 66}}, {"id": 184, "type": "identifier", "text": "font_pages", "parent": 176, "children": [], "start_point": {"row": 54, "column": 67}, "end_point": {"row": 54, "column": 77}}, {"id": 185, "type": "primitive_type", "text": "void", "parent": 126, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 6}}, {"id": 186, "type": "function_declarator", "text": "GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char)", "parent": 113, "children": [187, 188], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 56, "column": 48}}, {"id": 187, "type": "identifier", "text": "GetFontPageCharRange", "parent": 186, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 27}}, {"id": 188, "type": "parameter_list", "text": "(int page, uint32_t* first_char,\n uint32_t* last_char)", "parent": 186, "children": [189, 192, 197], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 56, "column": 48}}, {"id": 189, "type": "parameter_declaration", "text": "int page", "parent": 188, "children": [190, 191], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 36}}, {"id": 190, "type": "primitive_type", "text": "int", "parent": 189, "children": [], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 31}}, {"id": 191, "type": "identifier", "text": "page", "parent": 189, "children": [], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 36}}, {"id": 192, "type": "parameter_declaration", "text": "uint32_t* first_char", "parent": 188, "children": [193, 194], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 58}}, {"id": 193, "type": "primitive_type", "text": "uint32_t", "parent": 192, "children": [], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 46}}, {"id": 194, "type": "pointer_declarator", "text": "* first_char", "parent": 192, "children": [195, 196], "start_point": {"row": 55, "column": 46}, "end_point": {"row": 55, "column": 58}}, {"id": 195, "type": "*", "text": "*", "parent": 194, "children": [], "start_point": {"row": 55, "column": 46}, "end_point": {"row": 55, "column": 47}}, {"id": 196, "type": "identifier", "text": "first_char", "parent": 194, "children": [], "start_point": {"row": 55, "column": 48}, "end_point": {"row": 55, "column": 58}}, {"id": 197, "type": "parameter_declaration", "text": "uint32_t* last_char", "parent": 188, "children": [198, 199], "start_point": {"row": 56, "column": 28}, "end_point": {"row": 56, "column": 47}}, {"id": 198, "type": "primitive_type", "text": "uint32_t", "parent": 197, "children": [], "start_point": {"row": 56, "column": 28}, "end_point": {"row": 56, "column": 36}}, {"id": 199, "type": "pointer_declarator", "text": "* last_char", "parent": 197, "children": [200, 201], "start_point": {"row": 56, "column": 36}, "end_point": {"row": 56, "column": 47}}, {"id": 200, "type": "*", "text": "*", "parent": 199, "children": [], "start_point": {"row": 56, "column": 36}, "end_point": {"row": 56, "column": 37}}, {"id": 201, "type": "identifier", "text": "last_char", "parent": 199, "children": [], "start_point": {"row": 56, "column": 38}, "end_point": {"row": 56, "column": 47}}, {"id": 202, "type": "ERROR", "text": "auto GetOSTextSpanWidth(const std::string& s) -> float", "parent": 55, "children": [203, 205, 212], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 56}}, {"id": 203, "type": "storage_class_specifier", "text": "auto", "parent": 202, "children": [204], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 6}}, {"id": 204, "type": "auto", "text": "auto", "parent": 203, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 6}}, {"id": 205, "type": "macro_type_specifier", "text": "GetOSTextSpanWidth(const std::string& s)", "parent": 202, "children": [206, 207, 209], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 47}}, {"id": 206, "type": "identifier", "text": "GetOSTextSpanWidth", "parent": 205, "children": [], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 25}}, {"id": 207, "type": "type_descriptor", "text": "const std", "parent": 205, "children": [208], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 35}}, {"id": 208, "type": "type_identifier", "text": "std", "parent": 207, "children": [], "start_point": {"row": 57, "column": 32}, "end_point": {"row": 57, "column": 35}}, {"id": 209, "type": "ERROR", "text": "::string& s", "parent": 205, "children": [210, 211], "start_point": {"row": 57, "column": 35}, "end_point": {"row": 57, "column": 46}}, {"id": 210, "type": "identifier", "text": "string", "parent": 209, "children": [], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 43}}, {"id": 211, "type": "identifier", "text": "s", "parent": 209, "children": [], "start_point": {"row": 57, "column": 45}, "end_point": {"row": 57, "column": 46}}, {"id": 212, "type": "primitive_type", "text": "float", "parent": 202, "children": [], "start_point": {"row": 57, "column": 51}, "end_point": {"row": 57, "column": 56}}, {"id": 213, "type": "declaration", "text": "Rect r;", "parent": 55, "children": [214, 215], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 11}}, {"id": 214, "type": "type_identifier", "text": "Rect", "parent": 213, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 8}}, {"id": 215, "type": "identifier", "text": "r", "parent": 213, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 10}}, {"id": 216, "type": "declaration", "text": "float width;", "parent": 55, "children": [217, 218], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 16}}, {"id": 217, "type": "primitive_type", "text": "float", "parent": 216, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 9}}, {"id": 218, "type": "identifier", "text": "width", "parent": 216, "children": [], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 15}}, {"id": 219, "type": "call_expression", "text": "GetOSTextSpanBoundsAndWidth(s, &r, &width)", "parent": 55, "children": [220, 221], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 46}}, {"id": 220, "type": "identifier", "text": "GetOSTextSpanBoundsAndWidth", "parent": 219, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 31}}, {"id": 221, "type": "argument_list", "text": "(s, &r, &width)", "parent": 219, "children": [222, 223, 225], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 46}}, {"id": 222, "type": "identifier", "text": "s", "parent": 221, "children": [], "start_point": {"row": 60, "column": 32}, "end_point": {"row": 60, "column": 33}}, {"id": 223, "type": "pointer_expression", "text": "&r", "parent": 221, "children": [224], "start_point": {"row": 60, "column": 35}, "end_point": {"row": 60, "column": 37}}, {"id": 224, "type": "identifier", "text": "r", "parent": 223, "children": [], "start_point": {"row": 60, "column": 36}, "end_point": {"row": 60, "column": 37}}, {"id": 225, "type": "pointer_expression", "text": "&width", "parent": 221, "children": [226], "start_point": {"row": 60, "column": 39}, "end_point": {"row": 60, "column": 45}}, {"id": 226, "type": "identifier", "text": "width", "parent": 225, "children": [], "start_point": {"row": 60, "column": 40}, "end_point": {"row": 60, "column": 45}}, {"id": 227, "type": "return_statement", "text": "return width;", "parent": 55, "children": [228], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 17}}, {"id": 228, "type": "identifier", "text": "width", "parent": 227, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 16}}, {"id": 229, "type": "declaration", "text": "void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);", "parent": 55, "children": [230, 231], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 80}}, {"id": 230, "type": "primitive_type", "text": "void", "parent": 229, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 6}}, {"id": 231, "type": "function_declarator", "text": "GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width)", "parent": 229, "children": [232, 233], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 79}}, {"id": 232, "type": "identifier", "text": "GetOSTextSpanBoundsAndWidth", "parent": 231, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 34}}, {"id": 233, "type": "parameter_list", "text": "(const std::string& s, Rect* r, float* width)", "parent": 231, "children": [234, 239, 244], "start_point": {"row": 63, "column": 34}, "end_point": {"row": 63, "column": 79}}, {"id": 234, "type": "parameter_declaration", "text": "const std::string& s", "parent": 233, "children": [235, 236, 238], "start_point": {"row": 63, "column": 35}, "end_point": {"row": 63, "column": 55}}, {"id": 235, "type": "type_identifier", "text": "std", "parent": 234, "children": [], "start_point": {"row": 63, "column": 41}, "end_point": {"row": 63, "column": 44}}, {"id": 236, "type": "ERROR", "text": "::string&", "parent": 234, "children": [237], "start_point": {"row": 63, "column": 44}, "end_point": {"row": 63, "column": 53}}, {"id": 237, "type": "identifier", "text": "string", "parent": 236, "children": [], "start_point": {"row": 63, "column": 46}, "end_point": {"row": 63, "column": 52}}, {"id": 238, "type": "identifier", "text": "s", "parent": 234, "children": [], "start_point": {"row": 63, "column": 54}, "end_point": {"row": 63, "column": 55}}, {"id": 239, "type": "parameter_declaration", "text": "Rect* r", "parent": 233, "children": [240, 241], "start_point": {"row": 63, "column": 57}, "end_point": {"row": 63, "column": 64}}, {"id": 240, "type": "type_identifier", "text": "Rect", "parent": 239, "children": [], "start_point": {"row": 63, "column": 57}, "end_point": {"row": 63, "column": 61}}, {"id": 241, "type": "pointer_declarator", "text": "* r", "parent": 239, "children": [242, 243], "start_point": {"row": 63, "column": 61}, "end_point": {"row": 63, "column": 64}}, {"id": 242, "type": "*", "text": "*", "parent": 241, "children": [], "start_point": {"row": 63, "column": 61}, "end_point": {"row": 63, "column": 62}}, {"id": 243, "type": "identifier", "text": "r", "parent": 241, "children": [], "start_point": {"row": 63, "column": 63}, "end_point": {"row": 63, "column": 64}}, {"id": 244, "type": "parameter_declaration", "text": "float* width", "parent": 233, "children": [245, 246], "start_point": {"row": 63, "column": 66}, "end_point": {"row": 63, "column": 78}}, {"id": 245, "type": "primitive_type", "text": "float", "parent": 244, "children": [], "start_point": {"row": 63, "column": 66}, "end_point": {"row": 63, "column": 71}}, {"id": 246, "type": "pointer_declarator", "text": "* width", "parent": 244, "children": [247, 248], "start_point": {"row": 63, "column": 71}, "end_point": {"row": 63, "column": 78}}, {"id": 247, "type": "*", "text": "*", "parent": 246, "children": [], "start_point": {"row": 63, "column": 71}, "end_point": {"row": 63, "column": 72}}, {"id": 248, "type": "identifier", "text": "width", "parent": 246, "children": [], "start_point": {"row": 63, "column": 73}, "end_point": {"row": 63, "column": 78}}, {"id": 249, "type": "declaration", "text": "auto GetStringWidth(const char* s, bool big = false) -> float;", "parent": 55, "children": [250, 252, 258, 259], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 64}}, {"id": 250, "type": "storage_class_specifier", "text": "auto", "parent": 249, "children": [251], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 6}}, {"id": 251, "type": "auto", "text": "auto", "parent": 250, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 6}}, {"id": 252, "type": "macro_type_specifier", "text": "GetStringWidth(const char*", "parent": 249, "children": [253, 254], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 33}}, {"id": 253, "type": "identifier", "text": "GetStringWidth", "parent": 252, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 21}}, {"id": 254, "type": "type_descriptor", "text": "const char*", "parent": 252, "children": [255, 256], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 33}}, {"id": 255, "type": "primitive_type", "text": "char", "parent": 254, "children": [], "start_point": {"row": 66, "column": 28}, "end_point": {"row": 66, "column": 32}}, {"id": 256, "type": "abstract_pointer_declarator", "text": "*", "parent": 254, "children": [257], "start_point": {"row": 66, "column": 32}, "end_point": {"row": 66, "column": 33}}, {"id": 257, "type": "*", "text": "*", "parent": 256, "children": [], "start_point": {"row": 66, "column": 32}, "end_point": {"row": 66, "column": 33}}, {"id": 258, "type": "identifier", "text": "s", "parent": 249, "children": [], "start_point": {"row": 66, "column": 34}, "end_point": {"row": 66, "column": 35}}, {"id": 259, "type": "init_declarator", "text": "bool big = false) -> float", "parent": 249, "children": [260, 261, 263, 264], "start_point": {"row": 66, "column": 37}, "end_point": {"row": 66, "column": 63}}, {"id": 260, "type": "identifier", "text": "bool", "parent": 259, "children": [], "start_point": {"row": 66, "column": 37}, "end_point": {"row": 66, "column": 41}}, {"id": 261, "type": "ERROR", "text": "big", "parent": 259, "children": [262], "start_point": {"row": 66, "column": 42}, "end_point": {"row": 66, "column": 45}}, {"id": 262, "type": "identifier", "text": "big", "parent": 261, "children": [], "start_point": {"row": 66, "column": 42}, "end_point": {"row": 66, "column": 45}}, {"id": 263, "type": "=", "text": "=", "parent": 259, "children": [], "start_point": {"row": 66, "column": 46}, "end_point": {"row": 66, "column": 47}}, {"id": 264, "type": "field_expression", "text": "false) -> float", "parent": 259, "children": [265, 266], "start_point": {"row": 66, "column": 48}, "end_point": {"row": 66, "column": 63}}, {"id": 265, "type": "false", "text": "false", "parent": 264, "children": [], "start_point": {"row": 66, "column": 48}, "end_point": {"row": 66, "column": 53}}, {"id": 266, "type": "field_identifier", "text": "float", "parent": 264, "children": [], "start_point": {"row": 66, "column": 58}, "end_point": {"row": 66, "column": 63}}, {"id": 267, "type": "ERROR", "text": "auto GetStringWidth(const std::string& s, bool big = false) -> float", "parent": 55, "children": [268, 270, 281], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 70}}, {"id": 268, "type": "storage_class_specifier", "text": "auto", "parent": 267, "children": [269], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 6}}, {"id": 269, "type": "auto", "text": "auto", "parent": 268, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 6}}, {"id": 270, "type": "macro_type_specifier", "text": "GetStringWidth(const std::string& s, bool big = false)", "parent": 267, "children": [271, 272, 274], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 61}}, {"id": 271, "type": "identifier", "text": "GetStringWidth", "parent": 270, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 21}}, {"id": 272, "type": "type_descriptor", "text": "const std", "parent": 270, "children": [273], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 31}}, {"id": 273, "type": "type_identifier", "text": "std", "parent": 272, "children": [], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 31}}, {"id": 274, "type": "ERROR", "text": "::string& s, bool big = false", "parent": 270, "children": [275, 276, 277, 278, 279, 280], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 60}}, {"id": 275, "type": "identifier", "text": "string", "parent": 274, "children": [], "start_point": {"row": 67, "column": 33}, "end_point": {"row": 67, "column": 39}}, {"id": 276, "type": "identifier", "text": "s", "parent": 274, "children": [], "start_point": {"row": 67, "column": 41}, "end_point": {"row": 67, "column": 42}}, {"id": 277, "type": "primitive_type", "text": "bool", "parent": 274, "children": [], "start_point": {"row": 67, "column": 44}, "end_point": {"row": 67, "column": 48}}, {"id": 278, "type": "identifier", "text": "big", "parent": 274, "children": [], "start_point": {"row": 67, "column": 49}, "end_point": {"row": 67, "column": 52}}, {"id": 279, "type": "=", "text": "=", "parent": 274, "children": [], "start_point": {"row": 67, "column": 53}, "end_point": {"row": 67, "column": 54}}, {"id": 280, "type": "false", "text": "false", "parent": 274, "children": [], "start_point": {"row": 67, "column": 55}, "end_point": {"row": 67, "column": 60}}, {"id": 281, "type": "primitive_type", "text": "float", "parent": 267, "children": [], "start_point": {"row": 67, "column": 65}, "end_point": {"row": 67, "column": 70}}, {"id": 282, "type": "return_statement", "text": "return GetStringWidth(s.c_str(), big);", "parent": 55, "children": [283], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 42}}, {"id": 283, "type": "call_expression", "text": "GetStringWidth(s.c_str(), big)", "parent": 282, "children": [284, 285], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 41}}, {"id": 284, "type": "identifier", "text": "GetStringWidth", "parent": 283, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 25}}, {"id": 285, "type": "argument_list", "text": "(s.c_str(), big)", "parent": 283, "children": [286, 291], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 41}}, {"id": 286, "type": "call_expression", "text": "s.c_str()", "parent": 285, "children": [287, 290], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 35}}, {"id": 287, "type": "field_expression", "text": "s.c_str", "parent": 286, "children": [288, 289], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 33}}, {"id": 288, "type": "identifier", "text": "s", "parent": 287, "children": [], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 27}}, {"id": 289, "type": "field_identifier", "text": "c_str", "parent": 287, "children": [], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 33}}, {"id": 290, "type": "argument_list", "text": "()", "parent": 286, "children": [], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 35}}, {"id": 291, "type": "identifier", "text": "big", "parent": 285, "children": [], "start_point": {"row": 68, "column": 37}, "end_point": {"row": 68, "column": 40}}, {"id": 292, "type": "function_definition", "text": "auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }", "parent": 55, "children": [293, 295, 303, 305, 307, 315], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 75, "column": 3}}, {"id": 293, "type": "storage_class_specifier", "text": "auto", "parent": 292, "children": [294], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 6}}, {"id": 294, "type": "auto", "text": "auto", "parent": 293, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 6}}, {"id": 295, "type": "macro_type_specifier", "text": "GetStringHeight(const char* s)", "parent": 292, "children": [296, 297, 301], "start_point": {"row": 72, "column": 7}, "end_point": {"row": 72, "column": 37}}, {"id": 296, "type": "identifier", "text": "GetStringHeight", "parent": 295, "children": [], "start_point": {"row": 72, "column": 7}, "end_point": {"row": 72, "column": 22}}, {"id": 297, "type": "type_descriptor", "text": "const char*", "parent": 295, "children": [298, 299], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 34}}, {"id": 298, "type": "primitive_type", "text": "char", "parent": 297, "children": [], "start_point": {"row": 72, "column": 29}, "end_point": {"row": 72, "column": 33}}, {"id": 299, "type": "abstract_pointer_declarator", "text": "*", "parent": 297, "children": [300], "start_point": {"row": 72, "column": 33}, "end_point": {"row": 72, "column": 34}}, {"id": 300, "type": "*", "text": "*", "parent": 299, "children": [], "start_point": {"row": 72, "column": 33}, "end_point": {"row": 72, "column": 34}}, {"id": 301, "type": "ERROR", "text": "s", "parent": 295, "children": [302], "start_point": {"row": 72, "column": 35}, "end_point": {"row": 72, "column": 36}}, {"id": 302, "type": "identifier", "text": "s", "parent": 301, "children": [], "start_point": {"row": 72, "column": 35}, "end_point": {"row": 72, "column": 36}}, {"id": 303, "type": "ERROR", "text": "-> float;", "parent": 292, "children": [304], "start_point": {"row": 72, "column": 38}, "end_point": {"row": 72, "column": 47}}, {"id": 304, "type": "primitive_type", "text": "float", "parent": 303, "children": [], "start_point": {"row": 72, "column": 41}, "end_point": {"row": 72, "column": 46}}, {"id": 305, "type": "storage_class_specifier", "text": "auto", "parent": 292, "children": [306], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 6}}, {"id": 306, "type": "auto", "text": "auto", "parent": 305, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 6}}, {"id": 307, "type": "function_declarator", "text": "GetStringHeight(const std::string& s)", "parent": 292, "children": [308, 309], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 44}}, {"id": 308, "type": "identifier", "text": "GetStringHeight", "parent": 307, "children": [], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 22}}, {"id": 309, "type": "parameter_list", "text": "(const std::string& s)", "parent": 307, "children": [310], "start_point": {"row": 73, "column": 22}, "end_point": {"row": 73, "column": 44}}, {"id": 310, "type": "parameter_declaration", "text": "const std::string& s", "parent": 309, "children": [311, 312, 314], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 43}}, {"id": 311, "type": "type_identifier", "text": "std", "parent": 310, "children": [], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 32}}, {"id": 312, "type": "ERROR", "text": "::string&", "parent": 310, "children": [313], "start_point": {"row": 73, "column": 32}, "end_point": {"row": 73, "column": 41}}, {"id": 313, "type": "identifier", "text": "string", "parent": 312, "children": [], "start_point": {"row": 73, "column": 34}, "end_point": {"row": 73, "column": 40}}, {"id": 314, "type": "identifier", "text": "s", "parent": 310, "children": [], "start_point": {"row": 73, "column": 42}, "end_point": {"row": 73, "column": 43}}, {"id": 315, "type": "ERROR", "text": "-> float", "parent": 292, "children": [316], "start_point": {"row": 73, "column": 45}, "end_point": {"row": 73, "column": 53}}, {"id": 316, "type": "primitive_type", "text": "float", "parent": 315, "children": [], "start_point": {"row": 73, "column": 48}, "end_point": {"row": 73, "column": 53}}, {"id": 317, "type": "return_statement", "text": "return GetStringHeight(s.c_str());", "parent": 292, "children": [318], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 38}}, {"id": 318, "type": "call_expression", "text": "GetStringHeight(s.c_str())", "parent": 317, "children": [319, 320], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 37}}, {"id": 319, "type": "identifier", "text": "GetStringHeight", "parent": 318, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 26}}, {"id": 320, "type": "argument_list", "text": "(s.c_str())", "parent": 318, "children": [321], "start_point": {"row": 74, "column": 26}, "end_point": {"row": 74, "column": 37}}, {"id": 321, "type": "call_expression", "text": "s.c_str()", "parent": 320, "children": [322, 325], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 36}}, {"id": 322, "type": "field_expression", "text": "s.c_str", "parent": 321, "children": [323, 324], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 34}}, {"id": 323, "type": "identifier", "text": "s", "parent": 322, "children": [], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 28}}, {"id": 324, "type": "field_identifier", "text": "c_str", "parent": 322, "children": [], "start_point": {"row": 74, "column": 29}, "end_point": {"row": 74, "column": 34}}, {"id": 325, "type": "argument_list", "text": "()", "parent": 321, "children": [], "start_point": {"row": 74, "column": 34}, "end_point": {"row": 74, "column": 36}}, {"id": 326, "type": "declaration", "text": "void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);", "parent": 55, "children": [327, 328], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 80, "column": 50}}, {"id": 327, "type": "primitive_type", "text": "void", "parent": 326, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 6}}, {"id": 328, "type": "function_declarator", "text": "BreakUpString(const char* text, float width,\n std::vector<std::string>* v)", "parent": 326, "children": [329, 330], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 80, "column": 49}}, {"id": 329, "type": "identifier", "text": "BreakUpString", "parent": 328, "children": [], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 20}}, {"id": 330, "type": "parameter_list", "text": "(const char* text, float width,\n std::vector<std::string>* v)", "parent": 328, "children": [331, 336, 339], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 80, "column": 49}}, {"id": 331, "type": "parameter_declaration", "text": "const char* text", "parent": 330, "children": [332, 333], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 37}}, {"id": 332, "type": "primitive_type", "text": "char", "parent": 331, "children": [], "start_point": {"row": 79, "column": 27}, "end_point": {"row": 79, "column": 31}}, {"id": 333, "type": "pointer_declarator", "text": "* text", "parent": 331, "children": [334, 335], "start_point": {"row": 79, "column": 31}, "end_point": {"row": 79, "column": 37}}, {"id": 334, "type": "*", "text": "*", "parent": 333, "children": [], "start_point": {"row": 79, "column": 31}, "end_point": {"row": 79, "column": 32}}, {"id": 335, "type": "identifier", "text": "text", "parent": 333, "children": [], "start_point": {"row": 79, "column": 33}, "end_point": {"row": 79, "column": 37}}, {"id": 336, "type": "parameter_declaration", "text": "float width", "parent": 330, "children": [337, 338], "start_point": {"row": 79, "column": 39}, "end_point": {"row": 79, "column": 50}}, {"id": 337, "type": "primitive_type", "text": "float", "parent": 336, "children": [], "start_point": {"row": 79, "column": 39}, "end_point": {"row": 79, "column": 44}}, {"id": 338, "type": "identifier", "text": "width", "parent": 336, "children": [], "start_point": {"row": 79, "column": 45}, "end_point": {"row": 79, "column": 50}}, {"id": 339, "type": "parameter_declaration", "text": "std::vector<std::string>* v", "parent": 330, "children": [340, 341, 347], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 48}}, {"id": 340, "type": "type_identifier", "text": "std", "parent": 339, "children": [], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 24}}, {"id": 341, "type": "ERROR", "text": "::vector<std::string>", "parent": 339, "children": [342, 343, 344, 345, 346], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 45}}, {"id": 342, "type": "identifier", "text": "vector", "parent": 341, "children": [], "start_point": {"row": 80, "column": 26}, "end_point": {"row": 80, "column": 32}}, {"id": 343, "type": "<", "text": "<", "parent": 341, "children": [], "start_point": {"row": 80, "column": 32}, "end_point": {"row": 80, "column": 33}}, {"id": 344, "type": "identifier", "text": "std", "parent": 341, "children": [], "start_point": {"row": 80, "column": 33}, "end_point": {"row": 80, "column": 36}}, {"id": 345, "type": "identifier", "text": "string", "parent": 341, "children": [], "start_point": {"row": 80, "column": 38}, "end_point": {"row": 80, "column": 44}}, {"id": 346, "type": ">", "text": ">", "parent": 341, "children": [], "start_point": {"row": 80, "column": 44}, "end_point": {"row": 80, "column": 45}}, {"id": 347, "type": "pointer_declarator", "text": "* v", "parent": 339, "children": [348, 349], "start_point": {"row": 80, "column": 45}, "end_point": {"row": 80, "column": 48}}, {"id": 348, "type": "*", "text": "*", "parent": 347, "children": [], "start_point": {"row": 80, "column": 45}, "end_point": {"row": 80, "column": 46}}, {"id": 349, "type": "identifier", "text": "v", "parent": 347, "children": [], "start_point": {"row": 80, "column": 47}, "end_point": {"row": 80, "column": 48}}, {"id": 350, "type": "ERROR", "text": "static auto IsOSDrawableAscii(int val) -> bool", "parent": 55, "children": [351, 353, 359], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 48}}, {"id": 351, "type": "storage_class_specifier", "text": "auto", "parent": 350, "children": [352], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 13}}, {"id": 352, "type": "auto", "text": "auto", "parent": 351, "children": [], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 13}}, {"id": 353, "type": "macro_type_specifier", "text": "IsOSDrawableAscii(int val)", "parent": 350, "children": [354, 355, 357], "start_point": {"row": 84, "column": 14}, "end_point": {"row": 84, "column": 40}}, {"id": 354, "type": "identifier", "text": "IsOSDrawableAscii", "parent": 353, "children": [], "start_point": {"row": 84, "column": 14}, "end_point": {"row": 84, "column": 31}}, {"id": 355, "type": "type_descriptor", "text": "int", "parent": 353, "children": [356], "start_point": {"row": 84, "column": 32}, "end_point": {"row": 84, "column": 35}}, {"id": 356, "type": "primitive_type", "text": "int", "parent": 355, "children": [], "start_point": {"row": 84, "column": 32}, "end_point": {"row": 84, "column": 35}}, {"id": 357, "type": "ERROR", "text": "val", "parent": 353, "children": [358], "start_point": {"row": 84, "column": 36}, "end_point": {"row": 84, "column": 39}}, {"id": 358, "type": "identifier", "text": "val", "parent": 357, "children": [], "start_point": {"row": 84, "column": 36}, "end_point": {"row": 84, "column": 39}}, {"id": 359, "type": "primitive_type", "text": "bool", "parent": 350, "children": [], "start_point": {"row": 84, "column": 44}, "end_point": {"row": 84, "column": 48}}, {"id": 360, "type": "return_statement", "text": "return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));", "parent": 55, "children": [361], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 90, "column": 77}}, {"id": 361, "type": "parenthesized_expression", "text": "(((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'))", "parent": 360, "children": [362], "start_point": {"row": 87, "column": 11}, "end_point": {"row": 90, "column": 76}}, {"id": 362, "type": "binary_expression", "text": "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')')", "parent": 361, "children": [363, 500, 501], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 90, "column": 75}}, {"id": 363, "type": "binary_expression", "text": "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(')", "parent": 362, "children": [364, 492, 493], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 90, "column": 59}}, {"id": 364, "type": "binary_expression", "text": "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}')", "parent": 363, "children": [365, 484, 485], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 90, "column": 43}}, {"id": 365, "type": "binary_expression", "text": "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[') && (val != ']')\n && (val != '{')", "parent": 364, "children": [366, 476, 477], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 90, "column": 27}}, {"id": 366, "type": "binary_expression", "text": "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[') && (val != ']')", "parent": 365, "children": [367, 468, 469], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 89, "column": 76}}, {"id": 367, "type": "binary_expression", "text": "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[')", "parent": 366, "children": [368, 460, 461], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 89, "column": 60}}, {"id": 368, "type": "binary_expression", "text": "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"')", "parent": 367, "children": [369, 451, 452], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 89, "column": 44}}, {"id": 369, "type": "binary_expression", "text": "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'')", "parent": 368, "children": [370, 442, 443], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 89, "column": 28}}, {"id": 370, "type": "parenthesized_expression", "text": "((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))", "parent": 369, "children": [371], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 88, "column": 73}}, {"id": 371, "type": "binary_expression", "text": "(val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~')", "parent": 370, "children": [372, 425, 426], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 88, "column": 72}}, {"id": 372, "type": "binary_expression", "text": "(val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`')", "parent": 371, "children": [373, 408, 409], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 88, "column": 42}}, {"id": 373, "type": "binary_expression", "text": "(val >= ' ' && val <= '/') || (val >= ':' && val <= '@')", "parent": 372, "children": [374, 391, 392], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 69}}, {"id": 374, "type": "parenthesized_expression", "text": "(val >= ' ' && val <= '/')", "parent": 373, "children": [375], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 39}}, {"id": 375, "type": "binary_expression", "text": "val >= ' ' && val <= '/'", "parent": 374, "children": [376, 383, 384], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 38}}, {"id": 376, "type": "binary_expression", "text": "val >= ' '", "parent": 375, "children": [377, 378, 379], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 24}}, {"id": 377, "type": "identifier", "text": "val", "parent": 376, "children": [], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 17}}, {"id": 378, "type": ">=", "text": ">=", "parent": 376, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 20}}, {"id": 379, "type": "char_literal", "text": "' '", "parent": 376, "children": [380, 381, 382], "start_point": {"row": 87, "column": 21}, "end_point": {"row": 87, "column": 24}}, {"id": 380, "type": "'", "text": "'", "parent": 379, "children": [], "start_point": {"row": 87, "column": 21}, "end_point": {"row": 87, "column": 22}}, {"id": 381, "type": "character", "text": " ", "parent": 379, "children": [], "start_point": {"row": 87, "column": 22}, "end_point": {"row": 87, "column": 23}}, {"id": 382, "type": "'", "text": "'", "parent": 379, "children": [], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 24}}, {"id": 383, "type": "&&", "text": "&&", "parent": 375, "children": [], "start_point": {"row": 87, "column": 25}, "end_point": {"row": 87, "column": 27}}, {"id": 384, "type": "binary_expression", "text": "val <= '/'", "parent": 375, "children": [385, 386, 387], "start_point": {"row": 87, "column": 28}, "end_point": {"row": 87, "column": 38}}, {"id": 385, "type": "identifier", "text": "val", "parent": 384, "children": [], "start_point": {"row": 87, "column": 28}, "end_point": {"row": 87, "column": 31}}, {"id": 386, "type": "<=", "text": "<=", "parent": 384, "children": [], "start_point": {"row": 87, "column": 32}, "end_point": {"row": 87, "column": 34}}, {"id": 387, "type": "char_literal", "text": "'/'", "parent": 384, "children": [388, 389, 390], "start_point": {"row": 87, "column": 35}, "end_point": {"row": 87, "column": 38}}, {"id": 388, "type": "'", "text": "'", "parent": 387, "children": [], "start_point": {"row": 87, "column": 35}, "end_point": {"row": 87, "column": 36}}, {"id": 389, "type": "character", "text": "/", "parent": 387, "children": [], "start_point": {"row": 87, "column": 36}, "end_point": {"row": 87, "column": 37}}, {"id": 390, "type": "'", "text": "'", "parent": 387, "children": [], "start_point": {"row": 87, "column": 37}, "end_point": {"row": 87, "column": 38}}, {"id": 391, "type": "||", "text": "||", "parent": 373, "children": [], "start_point": {"row": 87, "column": 40}, "end_point": {"row": 87, "column": 42}}, {"id": 392, "type": "parenthesized_expression", "text": "(val >= ':' && val <= '@')", "parent": 373, "children": [393], "start_point": {"row": 87, "column": 43}, "end_point": {"row": 87, "column": 69}}, {"id": 393, "type": "binary_expression", "text": "val >= ':' && val <= '@'", "parent": 392, "children": [394, 400, 401], "start_point": {"row": 87, "column": 44}, "end_point": {"row": 87, "column": 68}}, {"id": 394, "type": "binary_expression", "text": "val >= ':'", "parent": 393, "children": [395, 396, 397], "start_point": {"row": 87, "column": 44}, "end_point": {"row": 87, "column": 54}}, {"id": 395, "type": "identifier", "text": "val", "parent": 394, "children": [], "start_point": {"row": 87, "column": 44}, "end_point": {"row": 87, "column": 47}}, {"id": 396, "type": ">=", "text": ">=", "parent": 394, "children": [], "start_point": {"row": 87, "column": 48}, "end_point": {"row": 87, "column": 50}}, {"id": 397, "type": "char_literal", "text": "':'", "parent": 394, "children": [398, 399], "start_point": {"row": 87, "column": 51}, "end_point": {"row": 87, "column": 54}}, {"id": 398, "type": "'", "text": "'", "parent": 397, "children": [], "start_point": {"row": 87, "column": 51}, "end_point": {"row": 87, "column": 52}}, {"id": 399, "type": "'", "text": "'", "parent": 397, "children": [], "start_point": {"row": 87, "column": 53}, "end_point": {"row": 87, "column": 54}}, {"id": 400, "type": "&&", "text": "&&", "parent": 393, "children": [], "start_point": {"row": 87, "column": 55}, "end_point": {"row": 87, "column": 57}}, {"id": 401, "type": "binary_expression", "text": "val <= '@'", "parent": 393, "children": [402, 403, 404], "start_point": {"row": 87, "column": 58}, "end_point": {"row": 87, "column": 68}}, {"id": 402, "type": "identifier", "text": "val", "parent": 401, "children": [], "start_point": {"row": 87, "column": 58}, "end_point": {"row": 87, "column": 61}}, {"id": 403, "type": "<=", "text": "<=", "parent": 401, "children": [], "start_point": {"row": 87, "column": 62}, "end_point": {"row": 87, "column": 64}}, {"id": 404, "type": "char_literal", "text": "'@'", "parent": 401, "children": [405, 406, 407], "start_point": {"row": 87, "column": 65}, "end_point": {"row": 87, "column": 68}}, {"id": 405, "type": "'", "text": "'", "parent": 404, "children": [], "start_point": {"row": 87, "column": 65}, "end_point": {"row": 87, "column": 66}}, {"id": 406, "type": "character", "text": "@", "parent": 404, "children": [], "start_point": {"row": 87, "column": 66}, "end_point": {"row": 87, "column": 67}}, {"id": 407, "type": "'", "text": "'", "parent": 404, "children": [], "start_point": {"row": 87, "column": 67}, "end_point": {"row": 87, "column": 68}}, {"id": 408, "type": "||", "text": "||", "parent": 372, "children": [], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 15}}, {"id": 409, "type": "parenthesized_expression", "text": "(val >= '[' && val <= '`')", "parent": 372, "children": [410], "start_point": {"row": 88, "column": 16}, "end_point": {"row": 88, "column": 42}}, {"id": 410, "type": "binary_expression", "text": "val >= '[' && val <= '`'", "parent": 409, "children": [411, 417, 418], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 41}}, {"id": 411, "type": "binary_expression", "text": "val >= '['", "parent": 410, "children": [412, 413, 414], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 27}}, {"id": 412, "type": "identifier", "text": "val", "parent": 411, "children": [], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 20}}, {"id": 413, "type": ">=", "text": ">=", "parent": 411, "children": [], "start_point": {"row": 88, "column": 21}, "end_point": {"row": 88, "column": 23}}, {"id": 414, "type": "char_literal", "text": "'['", "parent": 411, "children": [415, 416], "start_point": {"row": 88, "column": 24}, "end_point": {"row": 88, "column": 27}}, {"id": 415, "type": "'", "text": "'", "parent": 414, "children": [], "start_point": {"row": 88, "column": 24}, "end_point": {"row": 88, "column": 25}}, {"id": 416, "type": "'", "text": "'", "parent": 414, "children": [], "start_point": {"row": 88, "column": 26}, "end_point": {"row": 88, "column": 27}}, {"id": 417, "type": "&&", "text": "&&", "parent": 410, "children": [], "start_point": {"row": 88, "column": 28}, "end_point": {"row": 88, "column": 30}}, {"id": 418, "type": "binary_expression", "text": "val <= '`'", "parent": 410, "children": [419, 420, 421], "start_point": {"row": 88, "column": 31}, "end_point": {"row": 88, "column": 41}}, {"id": 419, "type": "identifier", "text": "val", "parent": 418, "children": [], "start_point": {"row": 88, "column": 31}, "end_point": {"row": 88, "column": 34}}, {"id": 420, "type": "<=", "text": "<=", "parent": 418, "children": [], "start_point": {"row": 88, "column": 35}, "end_point": {"row": 88, "column": 37}}, {"id": 421, "type": "char_literal", "text": "'`'", "parent": 418, "children": [422, 423, 424], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 41}}, {"id": 422, "type": "'", "text": "'", "parent": 421, "children": [], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 39}}, {"id": 423, "type": "character", "text": "`", "parent": 421, "children": [], "start_point": {"row": 88, "column": 39}, "end_point": {"row": 88, "column": 40}}, {"id": 424, "type": "'", "text": "'", "parent": 421, "children": [], "start_point": {"row": 88, "column": 40}, "end_point": {"row": 88, "column": 41}}, {"id": 425, "type": "||", "text": "||", "parent": 371, "children": [], "start_point": {"row": 88, "column": 43}, "end_point": {"row": 88, "column": 45}}, {"id": 426, "type": "parenthesized_expression", "text": "(val >= '{' && val <= '~')", "parent": 371, "children": [427], "start_point": {"row": 88, "column": 46}, "end_point": {"row": 88, "column": 72}}, {"id": 427, "type": "binary_expression", "text": "val >= '{' && val <= '~'", "parent": 426, "children": [428, 434, 435], "start_point": {"row": 88, "column": 47}, "end_point": {"row": 88, "column": 71}}, {"id": 428, "type": "binary_expression", "text": "val >= '{'", "parent": 427, "children": [429, 430, 431], "start_point": {"row": 88, "column": 47}, "end_point": {"row": 88, "column": 57}}, {"id": 429, "type": "identifier", "text": "val", "parent": 428, "children": [], "start_point": {"row": 88, "column": 47}, "end_point": {"row": 88, "column": 50}}, {"id": 430, "type": ">=", "text": ">=", "parent": 428, "children": [], "start_point": {"row": 88, "column": 51}, "end_point": {"row": 88, "column": 53}}, {"id": 431, "type": "char_literal", "text": "'{'", "parent": 428, "children": [432, 433], "start_point": {"row": 88, "column": 54}, "end_point": {"row": 88, "column": 57}}, {"id": 432, "type": "'", "text": "'", "parent": 431, "children": [], "start_point": {"row": 88, "column": 54}, "end_point": {"row": 88, "column": 55}}, {"id": 433, "type": "'", "text": "'", "parent": 431, "children": [], "start_point": {"row": 88, "column": 56}, "end_point": {"row": 88, "column": 57}}, {"id": 434, "type": "&&", "text": "&&", "parent": 427, "children": [], "start_point": {"row": 88, "column": 58}, "end_point": {"row": 88, "column": 60}}, {"id": 435, "type": "binary_expression", "text": "val <= '~'", "parent": 427, "children": [436, 437, 438], "start_point": {"row": 88, "column": 61}, "end_point": {"row": 88, "column": 71}}, {"id": 436, "type": "identifier", "text": "val", "parent": 435, "children": [], "start_point": {"row": 88, "column": 61}, "end_point": {"row": 88, "column": 64}}, {"id": 437, "type": "<=", "text": "<=", "parent": 435, "children": [], "start_point": {"row": 88, "column": 65}, "end_point": {"row": 88, "column": 67}}, {"id": 438, "type": "char_literal", "text": "'~'", "parent": 435, "children": [439, 440, 441], "start_point": {"row": 88, "column": 68}, "end_point": {"row": 88, "column": 71}}, {"id": 439, "type": "'", "text": "'", "parent": 438, "children": [], "start_point": {"row": 88, "column": 68}, "end_point": {"row": 88, "column": 69}}, {"id": 440, "type": "character", "text": "~", "parent": 438, "children": [], "start_point": {"row": 88, "column": 69}, "end_point": {"row": 88, "column": 70}}, {"id": 441, "type": "'", "text": "'", "parent": 438, "children": [], "start_point": {"row": 88, "column": 70}, "end_point": {"row": 88, "column": 71}}, {"id": 442, "type": "&&", "text": "&&", "parent": 369, "children": [], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 14}}, {"id": 443, "type": "parenthesized_expression", "text": "(val != '\\'')", "parent": 369, "children": [444], "start_point": {"row": 89, "column": 15}, "end_point": {"row": 89, "column": 28}}, {"id": 444, "type": "binary_expression", "text": "val != '\\''", "parent": 443, "children": [445, 446, 447], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 27}}, {"id": 445, "type": "identifier", "text": "val", "parent": 444, "children": [], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 19}}, {"id": 446, "type": "!=", "text": "!=", "parent": 444, "children": [], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 22}}, {"id": 447, "type": "char_literal", "text": "'\\''", "parent": 444, "children": [448, 449, 450], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 27}}, {"id": 448, "type": "'", "text": "'", "parent": 447, "children": [], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 24}}, {"id": 449, "type": "escape_sequence", "text": "\\'", "parent": 447, "children": [], "start_point": {"row": 89, "column": 24}, "end_point": {"row": 89, "column": 26}}, {"id": 450, "type": "'", "text": "'", "parent": 447, "children": [], "start_point": {"row": 89, "column": 26}, "end_point": {"row": 89, "column": 27}}, {"id": 451, "type": "&&", "text": "&&", "parent": 368, "children": [], "start_point": {"row": 89, "column": 29}, "end_point": {"row": 89, "column": 31}}, {"id": 452, "type": "parenthesized_expression", "text": "(val != '\"')", "parent": 368, "children": [453], "start_point": {"row": 89, "column": 32}, "end_point": {"row": 89, "column": 44}}, {"id": 453, "type": "binary_expression", "text": "val != '\"'", "parent": 452, "children": [454, 455, 456], "start_point": {"row": 89, "column": 33}, "end_point": {"row": 89, "column": 43}}, {"id": 454, "type": "identifier", "text": "val", "parent": 453, "children": [], "start_point": {"row": 89, "column": 33}, "end_point": {"row": 89, "column": 36}}, {"id": 455, "type": "!=", "text": "!=", "parent": 453, "children": [], "start_point": {"row": 89, "column": 37}, "end_point": {"row": 89, "column": 39}}, {"id": 456, "type": "char_literal", "text": "'\"'", "parent": 453, "children": [457, 458, 459], "start_point": {"row": 89, "column": 40}, "end_point": {"row": 89, "column": 43}}, {"id": 457, "type": "'", "text": "'", "parent": 456, "children": [], "start_point": {"row": 89, "column": 40}, "end_point": {"row": 89, "column": 41}}, {"id": 458, "type": "character", "text": "\"", "parent": 456, "children": [], "start_point": {"row": 89, "column": 41}, "end_point": {"row": 89, "column": 42}}, {"id": 459, "type": "'", "text": "'", "parent": 456, "children": [], "start_point": {"row": 89, "column": 42}, "end_point": {"row": 89, "column": 43}}, {"id": 460, "type": "&&", "text": "&&", "parent": 367, "children": [], "start_point": {"row": 89, "column": 45}, "end_point": {"row": 89, "column": 47}}, {"id": 461, "type": "parenthesized_expression", "text": "(val != '[')", "parent": 367, "children": [462], "start_point": {"row": 89, "column": 48}, "end_point": {"row": 89, "column": 60}}, {"id": 462, "type": "binary_expression", "text": "val != '['", "parent": 461, "children": [463, 464, 465], "start_point": {"row": 89, "column": 49}, "end_point": {"row": 89, "column": 59}}, {"id": 463, "type": "identifier", "text": "val", "parent": 462, "children": [], "start_point": {"row": 89, "column": 49}, "end_point": {"row": 89, "column": 52}}, {"id": 464, "type": "!=", "text": "!=", "parent": 462, "children": [], "start_point": {"row": 89, "column": 53}, "end_point": {"row": 89, "column": 55}}, {"id": 465, "type": "char_literal", "text": "'['", "parent": 462, "children": [466, 467], "start_point": {"row": 89, "column": 56}, "end_point": {"row": 89, "column": 59}}, {"id": 466, "type": "'", "text": "'", "parent": 465, "children": [], "start_point": {"row": 89, "column": 56}, "end_point": {"row": 89, "column": 57}}, {"id": 467, "type": "'", "text": "'", "parent": 465, "children": [], "start_point": {"row": 89, "column": 58}, "end_point": {"row": 89, "column": 59}}, {"id": 468, "type": "&&", "text": "&&", "parent": 366, "children": [], "start_point": {"row": 89, "column": 61}, "end_point": {"row": 89, "column": 63}}, {"id": 469, "type": "parenthesized_expression", "text": "(val != ']')", "parent": 366, "children": [470], "start_point": {"row": 89, "column": 64}, "end_point": {"row": 89, "column": 76}}, {"id": 470, "type": "binary_expression", "text": "val != ']'", "parent": 469, "children": [471, 472, 473], "start_point": {"row": 89, "column": 65}, "end_point": {"row": 89, "column": 75}}, {"id": 471, "type": "identifier", "text": "val", "parent": 470, "children": [], "start_point": {"row": 89, "column": 65}, "end_point": {"row": 89, "column": 68}}, {"id": 472, "type": "!=", "text": "!=", "parent": 470, "children": [], "start_point": {"row": 89, "column": 69}, "end_point": {"row": 89, "column": 71}}, {"id": 473, "type": "char_literal", "text": "']'", "parent": 470, "children": [474, 475], "start_point": {"row": 89, "column": 72}, "end_point": {"row": 89, "column": 75}}, {"id": 474, "type": "'", "text": "'", "parent": 473, "children": [], "start_point": {"row": 89, "column": 72}, "end_point": {"row": 89, "column": 73}}, {"id": 475, "type": "'", "text": "'", "parent": 473, "children": [], "start_point": {"row": 89, "column": 74}, "end_point": {"row": 89, "column": 75}}, {"id": 476, "type": "&&", "text": "&&", "parent": 365, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 14}}, {"id": 477, "type": "parenthesized_expression", "text": "(val != '{')", "parent": 365, "children": [478], "start_point": {"row": 90, "column": 15}, "end_point": {"row": 90, "column": 27}}, {"id": 478, "type": "binary_expression", "text": "val != '{'", "parent": 477, "children": [479, 480, 481], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 26}}, {"id": 479, "type": "identifier", "text": "val", "parent": 478, "children": [], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 19}}, {"id": 480, "type": "!=", "text": "!=", "parent": 478, "children": [], "start_point": {"row": 90, "column": 20}, "end_point": {"row": 90, "column": 22}}, {"id": 481, "type": "char_literal", "text": "'{'", "parent": 478, "children": [482, 483], "start_point": {"row": 90, "column": 23}, "end_point": {"row": 90, "column": 26}}, {"id": 482, "type": "'", "text": "'", "parent": 481, "children": [], "start_point": {"row": 90, "column": 23}, "end_point": {"row": 90, "column": 24}}, {"id": 483, "type": "'", "text": "'", "parent": 481, "children": [], "start_point": {"row": 90, "column": 25}, "end_point": {"row": 90, "column": 26}}, {"id": 484, "type": "&&", "text": "&&", "parent": 364, "children": [], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 30}}, {"id": 485, "type": "parenthesized_expression", "text": "(val != '}')", "parent": 364, "children": [486], "start_point": {"row": 90, "column": 31}, "end_point": {"row": 90, "column": 43}}, {"id": 486, "type": "binary_expression", "text": "val != '}'", "parent": 485, "children": [487, 488, 489], "start_point": {"row": 90, "column": 32}, "end_point": {"row": 90, "column": 42}}, {"id": 487, "type": "identifier", "text": "val", "parent": 486, "children": [], "start_point": {"row": 90, "column": 32}, "end_point": {"row": 90, "column": 35}}, {"id": 488, "type": "!=", "text": "!=", "parent": 486, "children": [], "start_point": {"row": 90, "column": 36}, "end_point": {"row": 90, "column": 38}}, {"id": 489, "type": "char_literal", "text": "'}'", "parent": 486, "children": [490, 491], "start_point": {"row": 90, "column": 39}, "end_point": {"row": 90, "column": 42}}, {"id": 490, "type": "'", "text": "'", "parent": 489, "children": [], "start_point": {"row": 90, "column": 39}, "end_point": {"row": 90, "column": 40}}, {"id": 491, "type": "'", "text": "'", "parent": 489, "children": [], "start_point": {"row": 90, "column": 41}, "end_point": {"row": 90, "column": 42}}, {"id": 492, "type": "&&", "text": "&&", "parent": 363, "children": [], "start_point": {"row": 90, "column": 44}, "end_point": {"row": 90, "column": 46}}, {"id": 493, "type": "parenthesized_expression", "text": "(val != '(')", "parent": 363, "children": [494], "start_point": {"row": 90, "column": 47}, "end_point": {"row": 90, "column": 59}}, {"id": 494, "type": "binary_expression", "text": "val != '('", "parent": 493, "children": [495, 496, 497], "start_point": {"row": 90, "column": 48}, "end_point": {"row": 90, "column": 58}}, {"id": 495, "type": "identifier", "text": "val", "parent": 494, "children": [], "start_point": {"row": 90, "column": 48}, "end_point": {"row": 90, "column": 51}}, {"id": 496, "type": "!=", "text": "!=", "parent": 494, "children": [], "start_point": {"row": 90, "column": 52}, "end_point": {"row": 90, "column": 54}}, {"id": 497, "type": "char_literal", "text": "'('", "parent": 494, "children": [498, 499], "start_point": {"row": 90, "column": 55}, "end_point": {"row": 90, "column": 58}}, {"id": 498, "type": "'", "text": "'", "parent": 497, "children": [], "start_point": {"row": 90, "column": 55}, "end_point": {"row": 90, "column": 56}}, {"id": 499, "type": "'", "text": "'", "parent": 497, "children": [], "start_point": {"row": 90, "column": 57}, "end_point": {"row": 90, "column": 58}}, {"id": 500, "type": "&&", "text": "&&", "parent": 362, "children": [], "start_point": {"row": 90, "column": 60}, "end_point": {"row": 90, "column": 62}}, {"id": 501, "type": "parenthesized_expression", "text": "(val != ')')", "parent": 362, "children": [502], "start_point": {"row": 90, "column": 63}, "end_point": {"row": 90, "column": 75}}, {"id": 502, "type": "binary_expression", "text": "val != ')'", "parent": 501, "children": [503, 504, 505], "start_point": {"row": 90, "column": 64}, "end_point": {"row": 90, "column": 74}}, {"id": 503, "type": "identifier", "text": "val", "parent": 502, "children": [], "start_point": {"row": 90, "column": 64}, "end_point": {"row": 90, "column": 67}}, {"id": 504, "type": "!=", "text": "!=", "parent": 502, "children": [], "start_point": {"row": 90, "column": 68}, "end_point": {"row": 90, "column": 70}}, {"id": 505, "type": "char_literal", "text": "')'", "parent": 502, "children": [506, 507], "start_point": {"row": 90, "column": 71}, "end_point": {"row": 90, "column": 74}}, {"id": 506, "type": "'", "text": "'", "parent": 505, "children": [], "start_point": {"row": 90, "column": 71}, "end_point": {"row": 90, "column": 72}}, {"id": 507, "type": "'", "text": "'", "parent": 505, "children": [], "start_point": {"row": 90, "column": 73}, "end_point": {"row": 90, "column": 74}}, {"id": 508, "type": "labeled_statement", "text": "private:\n class TextSpanBoundsCacheEntry;", "parent": 55, "children": [509], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 94, "column": 33}}, {"id": 509, "type": "declaration", "text": "class TextSpanBoundsCacheEntry;", "parent": 508, "children": [510], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 33}}, {"id": 510, "type": "identifier", "text": "TextSpanBoundsCacheEntry", "parent": 509, "children": [], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 32}}, {"id": 511, "type": "declaration", "text": "void LoadGlyphPage(uint32_t index);", "parent": 55, "children": [512, 513], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 37}}, {"id": 512, "type": "primitive_type", "text": "void", "parent": 511, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 6}}, {"id": 513, "type": "function_declarator", "text": "LoadGlyphPage(uint32_t index)", "parent": 511, "children": [514, 515], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 36}}, {"id": 514, "type": "identifier", "text": "LoadGlyphPage", "parent": 513, "children": [], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 20}}, {"id": 515, "type": "parameter_list", "text": "(uint32_t index)", "parent": 513, "children": [516], "start_point": {"row": 95, "column": 20}, "end_point": {"row": 95, "column": 36}}, {"id": 516, "type": "parameter_declaration", "text": "uint32_t index", "parent": 515, "children": [517, 518], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 35}}, {"id": 517, "type": "primitive_type", "text": "uint32_t", "parent": 516, "children": [], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 29}}, {"id": 518, "type": "identifier", "text": "index", "parent": 516, "children": [], "start_point": {"row": 95, "column": 30}, "end_point": {"row": 95, "column": 35}}, {"id": 519, "type": "binary_expression", "text": "std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_", "parent": 55, "children": [520, 521, 534, 535], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 99, "column": 33}}, {"id": 520, "type": "identifier", "text": "std", "parent": 519, "children": [], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 5}}, {"id": 521, "type": "ERROR", "text": "::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry>", "parent": 519, "children": [522, 526, 529, 533], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 71}}, {"id": 522, "type": "binary_expression", "text": "unordered_map<std", "parent": 521, "children": [523, 524, 525], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 24}}, {"id": 523, "type": "identifier", "text": "unordered_map", "parent": 522, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 20}}, {"id": 524, "type": "<", "text": "<", "parent": 522, "children": [], "start_point": {"row": 98, "column": 20}, "end_point": {"row": 98, "column": 21}}, {"id": 525, "type": "identifier", "text": "std", "parent": 522, "children": [], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 24}}, {"id": 526, "type": "comma_expression", "text": "string, Object", "parent": 521, "children": [527, 528], "start_point": {"row": 98, "column": 26}, "end_point": {"row": 98, "column": 40}}, {"id": 527, "type": "identifier", "text": "string", "parent": 526, "children": [], "start_point": {"row": 98, "column": 26}, "end_point": {"row": 98, "column": 32}}, {"id": 528, "type": "identifier", "text": "Object", "parent": 526, "children": [], "start_point": {"row": 98, "column": 34}, "end_point": {"row": 98, "column": 40}}, {"id": 529, "type": "binary_expression", "text": "Ref<TextSpanBoundsCacheEntry", "parent": 521, "children": [530, 531, 532], "start_point": {"row": 98, "column": 42}, "end_point": {"row": 98, "column": 70}}, {"id": 530, "type": "identifier", "text": "Ref", "parent": 529, "children": [], "start_point": {"row": 98, "column": 42}, "end_point": {"row": 98, "column": 45}}, {"id": 531, "type": "<", "text": "<", "parent": 529, "children": [], "start_point": {"row": 98, "column": 45}, "end_point": {"row": 98, "column": 46}}, {"id": 532, "type": "identifier", "text": "TextSpanBoundsCacheEntry", "parent": 529, "children": [], "start_point": {"row": 98, "column": 46}, "end_point": {"row": 98, "column": 70}}, {"id": 533, "type": ">", "text": ">", "parent": 521, "children": [], "start_point": {"row": 98, "column": 70}, "end_point": {"row": 98, "column": 71}}, {"id": 534, "type": ">", "text": ">", "parent": 519, "children": [], "start_point": {"row": 98, "column": 72}, "end_point": {"row": 98, "column": 73}}, {"id": 535, "type": "identifier", "text": "text_span_bounds_cache_map_", "parent": 519, "children": [], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 33}}, {"id": 536, "type": "binary_expression", "text": "std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_", "parent": 55, "children": [537, 538, 548, 549], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 75}}, {"id": 537, "type": "identifier", "text": "std", "parent": 536, "children": [], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 5}}, {"id": 538, "type": "ERROR", "text": "::list<Object::Ref<TextSpanBoundsCacheEntry>", "parent": 536, "children": [539, 543, 547], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 49}}, {"id": 539, "type": "binary_expression", "text": "list<Object", "parent": 538, "children": [540, 541, 542], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 18}}, {"id": 540, "type": "identifier", "text": "list", "parent": 539, "children": [], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 11}}, {"id": 541, "type": "<", "text": "<", "parent": 539, "children": [], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 12}}, {"id": 542, "type": "identifier", "text": "Object", "parent": 539, "children": [], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 18}}, {"id": 543, "type": "binary_expression", "text": "Ref<TextSpanBoundsCacheEntry", "parent": 538, "children": [544, 545, 546], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 48}}, {"id": 544, "type": "identifier", "text": "Ref", "parent": 543, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 23}}, {"id": 545, "type": "<", "text": "<", "parent": 543, "children": [], "start_point": {"row": 102, "column": 23}, "end_point": {"row": 102, "column": 24}}, {"id": 546, "type": "identifier", "text": "TextSpanBoundsCacheEntry", "parent": 543, "children": [], "start_point": {"row": 102, "column": 24}, "end_point": {"row": 102, "column": 48}}, {"id": 547, "type": ">", "text": ">", "parent": 538, "children": [], "start_point": {"row": 102, "column": 48}, "end_point": {"row": 102, "column": 49}}, {"id": 548, "type": ">", "text": ">", "parent": 536, "children": [], "start_point": {"row": 102, "column": 50}, "end_point": {"row": 102, "column": 51}}, {"id": 549, "type": "identifier", "text": "text_span_bounds_cache_", "parent": 536, "children": [], "start_point": {"row": 102, "column": 52}, "end_point": {"row": 102, "column": 75}}, {"id": 550, "type": "labeled_statement", "text": "std::mutex glyph_load_mutex_;", "parent": 55, "children": [551, 552], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 31}}, {"id": 551, "type": "statement_identifier", "text": "std", "parent": 550, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 5}}, {"id": 552, "type": "declaration", "text": "mutex glyph_load_mutex_;", "parent": 550, "children": [553, 554], "start_point": {"row": 103, "column": 7}, "end_point": {"row": 103, "column": 31}}, {"id": 553, "type": "type_identifier", "text": "mutex", "parent": 552, "children": [], "start_point": {"row": 103, "column": 7}, "end_point": {"row": 103, "column": 12}}, {"id": 554, "type": "identifier", "text": "glyph_load_mutex_", "parent": 552, "children": [], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 30}}, {"id": 555, "type": "function_definition", "text": "Glyph glyphs_extras_[100]{}", "parent": 55, "children": [556, 557], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 29}}, {"id": 556, "type": "type_identifier", "text": "Glyph", "parent": 555, "children": [], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 7}}, {"id": 557, "type": "array_declarator", "text": "glyphs_extras_[100]", "parent": 555, "children": [558, 559], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 27}}, {"id": 558, "type": "identifier", "text": "glyphs_extras_", "parent": 557, "children": [], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 22}}, {"id": 559, "type": "number_literal", "text": "100", "parent": 557, "children": [], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 26}}, {"id": 560, "type": "function_definition", "text": "Glyph glyphs_big_[64]{}", "parent": 55, "children": [561, 562], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 25}}, {"id": 561, "type": "type_identifier", "text": "Glyph", "parent": 560, "children": [], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 7}}, {"id": 562, "type": "array_declarator", "text": "glyphs_big_[64]", "parent": 560, "children": [563, 564], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 23}}, {"id": 563, "type": "identifier", "text": "glyphs_big_", "parent": 562, "children": [], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 19}}, {"id": 564, "type": "number_literal", "text": "64", "parent": 562, "children": [], "start_point": {"row": 105, "column": 20}, "end_point": {"row": 105, "column": 22}}, {"id": 565, "type": "preproc_call", "text": "#endif // BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n", "parent": 0, "children": [566], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 111, "column": 0}}, {"id": 566, "type": "preproc_directive", "text": "#endif", "parent": 565, "children": [], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 6}}]}, "node_categories": {"declarations": {"functions": [44, 49, 55, 127, 186, 231, 292, 307, 328, 513, 555, 560], "variables": [32, 38, 47, 86, 89, 92, 95, 98, 101, 104, 107, 110, 113, 130, 133, 189, 192, 197, 213, 216, 229, 234, 239, 244, 249, 310, 326, 331, 336, 339, 509, 511, 516, 552], "classes": [83, 84, 114, 124, 203, 250, 268, 293, 305, 351], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28], "modules": [], "enums": [56, 57]}, "statements": {"expressions": [52, 59, 64, 69, 74, 140, 145, 153, 158, 166, 171, 176, 177, 219, 223, 225, 264, 283, 286, 287, 318, 321, 322, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 384, 392, 393, 394, 401, 409, 410, 411, 418, 426, 427, 428, 435, 443, 444, 452, 453, 461, 462, 469, 470, 477, 478, 485, 486, 493, 494, 501, 502, 519, 522, 526, 529, 536, 539, 543], "assignments": [60, 65, 70, 75, 79], "loops": [], "conditionals": [1, 2, 5, 30, 31, 35, 41, 45, 50, 53, 58, 61, 66, 71, 76, 80, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 116, 117, 121, 128, 132, 135, 136, 141, 144, 146, 147, 154, 157, 159, 160, 167, 170, 172, 173, 175, 178, 180, 184, 187, 191, 196, 201, 205, 206, 208, 210, 211, 214, 215, 218, 220, 222, 224, 226, 228, 232, 235, 237, 238, 240, 243, 248, 252, 253, 258, 260, 262, 266, 270, 271, 273, 275, 276, 278, 284, 288, 289, 291, 295, 296, 302, 308, 311, 313, 314, 319, 323, 324, 329, 335, 338, 340, 342, 344, 345, 349, 353, 354, 358, 377, 385, 395, 402, 412, 419, 429, 436, 445, 454, 463, 471, 479, 487, 495, 503, 510, 514, 518, 520, 523, 525, 527, 528, 530, 532, 535, 537, 540, 542, 544, 546, 549, 551, 553, 554, 556, 558, 561, 563], "returns": [227, 282, 317, 360], "exceptions": []}, "expressions": {"calls": [565], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 37, 43, 63, 68, 73, 78, 82, 379, 387, 397, 404, 414, 421, 431, 438, 447, 456, 465, 473, 481, 489, 497, 505, 559, 564], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 44, "universal_type": "function", "name": "TextGraphics", "text_snippet": "class TextGraphics {\n public:\n static void Init();\n\n TextGraphics();\n\n enum class FontPage {\n "}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "Init()"}, {"node_id": 55, "universal_type": "function", "name": "FontPage", "text_snippet": "enum class FontPage {\n kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3"}, {"node_id": 127, "universal_type": "function", "name": "big)", "text_snippet": "GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) "}, {"node_id": 186, "universal_type": "function", "name": "unknown", "text_snippet": "GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char"}, {"node_id": 231, "universal_type": "function", "name": "unknown", "text_snippet": "GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width)"}, {"node_id": 292, "universal_type": "function", "name": "unknown", "text_snippet": "auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float "}, {"node_id": 307, "universal_type": "function", "name": "unknown", "text_snippet": "GetStringHeight(const std::string& s)"}, {"node_id": 328, "universal_type": "function", "name": "unknown", "text_snippet": "BreakUpString(const char* text, float width,\n std::vector<std::string>* v)"}, {"node_id": 513, "universal_type": "function", "name": "unknown", "text_snippet": "LoadGlyphPage(uint32_t index)"}, {"node_id": 555, "universal_type": "function", "name": "unknown", "text_snippet": "Glyph glyphs_extras_[100]{}"}, {"node_id": 560, "universal_type": "function", "name": "unknown", "text_snippet": "Glyph glyphs_big_[64]{}"}], "class_declarations": [{"node_id": 83, "universal_type": "class", "name": "Glyph", "text_snippet": "struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n"}, {"node_id": 84, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 114, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 124, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 203, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 250, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 268, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 293, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 305, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 351, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}], "import_statements": [{"node_id": 6, "text": "#include <list>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <mutex>\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 <unordered_map>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <vector>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"ballistica/core/object.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"ballistica/math/rect.h\"\n"}, {"node_id": 28, "text": "#include"}]}, "original_source_code": "// Released under the MIT License. See LICENSE for details.\n\n#ifndef BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n#define BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n\n#include <list>\n#include <mutex>\n#include <set>\n#include <string>\n#include <unordered_map>\n#include <vector>\n\n#include \"ballistica/core/object.h\"\n#include \"ballistica/math/rect.h\"\n\nnamespace ballistica {\n\n// Largest unicode value we ask the OS to draw for us.\nconst int kTextMaxUnicodeVal = 999999;\nconst float kTextRowHeight = 32.0f;\n\n// Encapsulates text-display functionality used by the game thread.\nclass TextGraphics {\n public:\n static void Init();\n\n TextGraphics();\n\n enum class FontPage {\n kOSRendered = 9989,\n kExtras1 = 9990,\n kExtras2 = 9991,\n kExtras3 = 9992,\n kExtras4 = 9993\n };\n\n struct Glyph {\n float pen_offset_x;\n float pen_offset_y;\n float advance;\n float x_size;\n float y_size;\n float tex_min_x;\n float tex_min_y;\n float tex_max_x;\n float tex_max_y;\n };\n\n static auto GetBigCharIndex(int c) -> int;\n\n // Returns a glyph or nullptr if it is unavailable.\n auto GetGlyph(uint32_t value, bool big) -> Glyph*;\n static auto HaveBigChars(const std::string& string) -> bool;\n static auto HaveChars(const std::string& string) -> bool;\n void GetFontPagesForText(const std::string& text, std::set<int>* font_pages);\n void GetFontPageCharRange(int page, uint32_t* first_char,\n uint32_t* last_char);\n auto GetOSTextSpanWidth(const std::string& s) -> float {\n Rect r;\n float width;\n GetOSTextSpanBoundsAndWidth(s, &r, &width);\n return width;\n }\n void GetOSTextSpanBoundsAndWidth(const std::string& s, Rect* r, float* width);\n\n // Returns the width of a string\n auto GetStringWidth(const char* s, bool big = false) -> float;\n auto GetStringWidth(const std::string& s, bool big = false) -> float {\n return GetStringWidth(s.c_str(), big);\n }\n\n // Returns the height of a string\n auto GetStringHeight(const char* s) -> float;\n auto GetStringHeight(const std::string& s) -> float {\n return GetStringHeight(s.c_str());\n }\n\n // Given a target width, breaks the string up into multiple strings so they\n // fit within it\n void BreakUpString(const char* text, float width,\n std::vector<std::string>* v);\n\n // Some chars we allow the OS to draw in some cases but draw ourselves in\n // others (to minimize the amount of switching back and forth).\n static auto IsOSDrawableAscii(int val) -> bool {\n // ( exclude a few that usually come in pairs so we\n // avoid one side looking different than the other )\n return (((val >= ' ' && val <= '/') || (val >= ':' && val <= '@')\n || (val >= '[' && val <= '`') || (val >= '{' && val <= '~'))\n && (val != '\\'') && (val != '\"') && (val != '[') && (val != ']')\n && (val != '{') && (val != '}') && (val != '(') && (val != ')'));\n }\n\n private:\n class TextSpanBoundsCacheEntry;\n void LoadGlyphPage(uint32_t index);\n\n // Map of entries for fast lookup.\n std::unordered_map<std::string, Object::Ref<TextSpanBoundsCacheEntry> >\n text_span_bounds_cache_map_;\n\n // List of entries for sorting by last-use-time\n std::list<Object::Ref<TextSpanBoundsCacheEntry> > text_span_bounds_cache_;\n std::mutex glyph_load_mutex_;\n Glyph glyphs_extras_[100]{};\n Glyph glyphs_big_[64]{};\n};\n\n} // namespace ballistica\n\n#endif // BALLISTICA_GRAPHICS_TEXT_TEXT_GRAPHICS_H_\n"}
327
c
#ifndef __WINDOW_H_ #define __WINDOW_H_ #include <iostream> #include <sstream> #include <fstream> #include <QWidget> #include <QDesktopWidget> #include <QPainter> #include <QGuiApplication> #include <QApplication> #include <QScreen> #include <QTimer> #include <QImage> #include <QMouseEvent> #include <QDebug> class QWindow : public QWidget { Q_OBJECT public: explicit QWindow(QWidget *parent = 0); protected: void paintEvent(QPaintEvent *event); void mouseMoveEvent(QMouseEvent* event); private: QPoint cursorPos; short updateTime; signals: public slots: void callback(); }; int execQApp(); #endif
19.42
33
(translation_unit) "#ifndef __WINDOW_H_\n#define __WINDOW_H_\n\n#include <iostream>\n#include <sstream>\n#include <fstream>\n\n#include <QWidget>\n#include <QDesktopWidget>\n#include <QPainter>\n#include <QGuiApplication>\n#include <QApplication>\n#include <QScreen>\n#include <QTimer>\n#include <QImage>\n#include <QMouseEvent>\n#include <QDebug>\n\nclass QWindow : public QWidget\n{\n Q_OBJECT\n public:\n explicit QWindow(QWidget *parent = 0);\n\n protected:\n void paintEvent(QPaintEvent *event);\n void mouseMoveEvent(QMouseEvent* event);\n\n private:\n QPoint cursorPos;\n short updateTime;\n\n signals:\n\n public slots:\n void callback();\n};\n\n\nint execQApp();\n\n#endif" (preproc_ifdef) "#ifndef __WINDOW_H_\n#define __WINDOW_H_\n\n#include <iostream>\n#include <sstream>\n#include <fstream>\n\n#include <QWidget>\n#include <QDesktopWidget>\n#include <QPainter>\n#include <QGuiApplication>\n#include <QApplication>\n#include <QScreen>\n#include <QTimer>\n#include <QImage>\n#include <QMouseEvent>\n#include <QDebug>\n\nclass QWindow : public QWidget\n{\n Q_OBJECT\n public:\n explicit QWindow(QWidget *parent = 0);\n\n protected:\n void paintEvent(QPaintEvent *event);\n void mouseMoveEvent(QMouseEvent* event);\n\n private:\n QPoint cursorPos;\n short updateTime;\n\n signals:\n\n public slots:\n void callback();\n};\n\n\nint execQApp();\n\n#endif" (#ifndef) "#ifndef" (identifier) "__WINDOW_H_" (preproc_def) "#define __WINDOW_H_\n" (#define) "#define" (identifier) "__WINDOW_H_" (preproc_include) "#include <iostream>\n" (#include) "#include" (system_lib_string) "<iostream>" (preproc_include) "#include <sstream>\n" (#include) "#include" (system_lib_string) "<sstream>" (preproc_include) "#include <fstream>\n" (#include) "#include" (system_lib_string) "<fstream>" (preproc_include) "#include <QWidget>\n" (#include) "#include" (system_lib_string) "<QWidget>" (preproc_include) "#include <QDesktopWidget>\n" (#include) "#include" (system_lib_string) "<QDesktopWidget>" (preproc_include) "#include <QPainter>\n" (#include) "#include" (system_lib_string) "<QPainter>" (preproc_include) "#include <QGuiApplication>\n" (#include) "#include" (system_lib_string) "<QGuiApplication>" (preproc_include) "#include <QApplication>\n" (#include) "#include" (system_lib_string) "<QApplication>" (preproc_include) "#include <QScreen>\n" (#include) "#include" (system_lib_string) "<QScreen>" (preproc_include) "#include <QTimer>\n" (#include) "#include" (system_lib_string) "<QTimer>" (preproc_include) "#include <QImage>\n" (#include) "#include" (system_lib_string) "<QImage>" (preproc_include) "#include <QMouseEvent>\n" (#include) "#include" (system_lib_string) "<QMouseEvent>" (preproc_include) "#include <QDebug>\n" (#include) "#include" (system_lib_string) "<QDebug>" (function_definition) "class QWindow : public QWidget\n{\n Q_OBJECT\n public:\n explicit QWindow(QWidget *parent = 0);\n\n protected:\n void paintEvent(QPaintEvent *event);\n void mouseMoveEvent(QMouseEvent* event);\n\n private:\n QPoint cursorPos;\n short updateTime;\n\n signals:\n\n public slots:\n void callback();\n}" (type_identifier) "class" (identifier) "QWindow" (ERROR) ": public QWidget" (:) ":" (identifier) "public" (identifier) "QWidget" (compound_statement) "{\n Q_OBJECT\n public:\n explicit QWindow(QWidget *parent = 0);\n\n protected:\n void paintEvent(QPaintEvent *event);\n void mouseMoveEvent(QMouseEvent* event);\n\n private:\n QPoint cursorPos;\n short updateTime;\n\n signals:\n\n public slots:\n void callback();\n}" ({) "{" (declaration) "Q_OBJECT\n public:\n explicit QWindow(QWidget *parent = 0);" (type_identifier) "Q_OBJECT" (ERROR) "public:\n explicit" (identifier) "public" (:) ":" (identifier) "explicit" (init_declarator) "QWindow(QWidget *parent = 0" (function_declarator) "QWindow(QWidget *parent" (identifier) "QWindow" (parameter_list) "(QWidget *parent" (() "(" (parameter_declaration) "QWidget *parent" (type_identifier) "QWidget" (pointer_declarator) "*parent" (*) "*" (identifier) "parent" ()) "" (=) "=" (number_literal) "0" (ERROR) ")" ()) ")" (;) ";" (labeled_statement) "protected:\n void paintEvent(QPaintEvent *event);" (statement_identifier) "protected" (:) ":" (declaration) "void paintEvent(QPaintEvent *event);" (primitive_type) "void" (function_declarator) "paintEvent(QPaintEvent *event)" (identifier) "paintEvent" (parameter_list) "(QPaintEvent *event)" (() "(" (parameter_declaration) "QPaintEvent *event" (type_identifier) "QPaintEvent" (pointer_declarator) "*event" (*) "*" (identifier) "event" ()) ")" (;) ";" (declaration) "void mouseMoveEvent(QMouseEvent* event);" (primitive_type) "void" (function_declarator) "mouseMoveEvent(QMouseEvent* event)" (identifier) "mouseMoveEvent" (parameter_list) "(QMouseEvent* event)" (() "(" (parameter_declaration) "QMouseEvent* event" (type_identifier) "QMouseEvent" (pointer_declarator) "* event" (*) "*" (identifier) "event" ()) ")" (;) ";" (labeled_statement) "private:\n QPoint cursorPos;" (statement_identifier) "private" (:) ":" (declaration) "QPoint cursorPos;" (type_identifier) "QPoint" (identifier) "cursorPos" (;) ";" (declaration) "short updateTime;" (sized_type_specifier) "short" (short) "short" (identifier) "updateTime" (;) ";" (labeled_statement) "signals:\n\n public slots:\n void callback();" (statement_identifier) "signals" (:) ":" (ERROR) "public slots:" (type_identifier) "public" (identifier) "slots" (:) ":" (declaration) "void callback();" (primitive_type) "void" (function_declarator) "callback()" (identifier) "callback" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (declaration) "int execQApp();" (primitive_type) "int" (function_declarator) "execQApp()" (identifier) "execQApp" (parameter_list) "()" (() "(" ()) ")" (;) ";" (#endif) "#endif"
145
4
{"language": "c", "success": true, "metadata": {"lines": 33, "avg_line_length": 19.42, "nodes": 108, "errors": 0, "source_hash": "13b0e43b981ceaeeaa93397b7a66be3d130b87e9c74cbd86e4c21331da425ce8", "categorized_nodes": 82}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __WINDOW_H_\n#define __WINDOW_H_\n\n#include <iostream>\n#include <sstream>\n#include <fstream>\n\n#include <QWidget>\n#include <QDesktopWidget>\n#include <QPainter>\n#include <QGuiApplication>\n#include <QApplication>\n#include <QScreen>\n#include <QTimer>\n#include <QImage>\n#include <QMouseEvent>\n#include <QDebug>\n\nclass QWindow : public QWidget\n{\n Q_OBJECT\n public:\n explicit QWindow(QWidget *parent = 0);\n\n protected:\n void paintEvent(QPaintEvent *event);\n void mouseMoveEvent(QMouseEvent* event);\n\n private:\n QPoint cursorPos;\n short updateTime;\n\n signals:\n\n public slots:\n void callback();\n};\n\n\nint execQApp();\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 102, 107], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "__WINDOW_H_", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_def", "text": "#define __WINDOW_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": "__WINDOW_H_", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <iostream>\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": "<iostream>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <sstream>\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": "<sstream>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include <fstream>\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": "<fstream>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include <QWidget>\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": "<QWidget>", "parent": 15, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 18, "type": "preproc_include", "text": "#include <QDesktopWidget>\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": "<QDesktopWidget>", "parent": 18, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 25}}, {"id": 21, "type": "preproc_include", "text": "#include <QPainter>\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": "<QPainter>", "parent": 21, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 19}}, {"id": 24, "type": "preproc_include", "text": "#include <QGuiApplication>\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": "<QGuiApplication>", "parent": 24, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 26}}, {"id": 27, "type": "preproc_include", "text": "#include <QApplication>\n", "parent": 0, "children": [28, 29], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 29, "type": "system_lib_string", "text": "<QApplication>", "parent": 27, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 23}}, {"id": 30, "type": "preproc_include", "text": "#include <QScreen>\n", "parent": 0, "children": [31, 32], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 32, "type": "system_lib_string", "text": "<QScreen>", "parent": 30, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 18}}, {"id": 33, "type": "preproc_include", "text": "#include <QTimer>\n", "parent": 0, "children": [34, 35], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 35, "type": "system_lib_string", "text": "<QTimer>", "parent": 33, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 17}}, {"id": 36, "type": "preproc_include", "text": "#include <QImage>\n", "parent": 0, "children": [37, 38], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 38, "type": "system_lib_string", "text": "<QImage>", "parent": 36, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 17}}, {"id": 39, "type": "preproc_include", "text": "#include <QMouseEvent>\n", "parent": 0, "children": [40, 41], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 41, "type": "system_lib_string", "text": "<QMouseEvent>", "parent": 39, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 22}}, {"id": 42, "type": "preproc_include", "text": "#include <QDebug>\n", "parent": 0, "children": [43, 44], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 44, "type": "system_lib_string", "text": "<QDebug>", "parent": 42, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 17}}, {"id": 45, "type": "function_definition", "text": "class QWindow : public QWidget\n{\n Q_OBJECT\n public:\n explicit QWindow(QWidget *parent = 0);\n\n protected:\n void paintEvent(QPaintEvent *event);\n void mouseMoveEvent(QMouseEvent* event);\n\n private:\n QPoint cursorPos;\n short updateTime;\n\n signals:\n\n public slots:\n void callback();\n}", "parent": 0, "children": [46, 47], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 46, "type": "identifier", "text": "QWindow", "parent": 45, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 13}}, {"id": 47, "type": "ERROR", "text": ": public QWidget", "parent": 45, "children": [48], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 30}}, {"id": 48, "type": "identifier", "text": "QWidget", "parent": 47, "children": [], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 30}}, {"id": 49, "type": "declaration", "text": "Q_OBJECT\n public:\n explicit QWindow(QWidget *parent = 0);", "parent": 45, "children": [50, 51, 53], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 22, "column": 46}}, {"id": 50, "type": "type_identifier", "text": "Q_OBJECT", "parent": 49, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 12}}, {"id": 51, "type": "ERROR", "text": "public:\n explicit", "parent": 49, "children": [52], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 22, "column": 16}}, {"id": 52, "type": "identifier", "text": "explicit", "parent": 51, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 16}}, {"id": 53, "type": "init_declarator", "text": "QWindow(QWidget *parent = 0", "parent": 49, "children": [54, 62, 63], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 44}}, {"id": 54, "type": "function_declarator", "text": "QWindow(QWidget *parent", "parent": 53, "children": [55, 56], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 40}}, {"id": 55, "type": "identifier", "text": "QWindow", "parent": 54, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 24}}, {"id": 56, "type": "parameter_list", "text": "(QWidget *parent", "parent": 54, "children": [57], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 40}}, {"id": 57, "type": "parameter_declaration", "text": "QWidget *parent", "parent": 56, "children": [58, 59], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 40}}, {"id": 58, "type": "type_identifier", "text": "QWidget", "parent": 57, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 32}}, {"id": 59, "type": "pointer_declarator", "text": "*parent", "parent": 57, "children": [60, 61], "start_point": {"row": 22, "column": 33}, "end_point": {"row": 22, "column": 40}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 22, "column": 33}, "end_point": {"row": 22, "column": 34}}, {"id": 61, "type": "identifier", "text": "parent", "parent": 59, "children": [], "start_point": {"row": 22, "column": 34}, "end_point": {"row": 22, "column": 40}}, {"id": 62, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 22, "column": 41}, "end_point": {"row": 22, "column": 42}}, {"id": 63, "type": "number_literal", "text": "0", "parent": 53, "children": [], "start_point": {"row": 22, "column": 43}, "end_point": {"row": 22, "column": 44}}, {"id": 64, "type": "labeled_statement", "text": "protected:\n void paintEvent(QPaintEvent *event);", "parent": 45, "children": [65], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 25, "column": 44}}, {"id": 65, "type": "declaration", "text": "void paintEvent(QPaintEvent *event);", "parent": 64, "children": [66, 67], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 44}}, {"id": 66, "type": "primitive_type", "text": "void", "parent": 65, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 12}}, {"id": 67, "type": "function_declarator", "text": "paintEvent(QPaintEvent *event)", "parent": 65, "children": [68, 69], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 43}}, {"id": 68, "type": "identifier", "text": "paintEvent", "parent": 67, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 23}}, {"id": 69, "type": "parameter_list", "text": "(QPaintEvent *event)", "parent": 67, "children": [70], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 43}}, {"id": 70, "type": "parameter_declaration", "text": "QPaintEvent *event", "parent": 69, "children": [71, 72], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 42}}, {"id": 71, "type": "type_identifier", "text": "QPaintEvent", "parent": 70, "children": [], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 35}}, {"id": 72, "type": "pointer_declarator", "text": "*event", "parent": 70, "children": [73, 74], "start_point": {"row": 25, "column": 36}, "end_point": {"row": 25, "column": 42}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 25, "column": 36}, "end_point": {"row": 25, "column": 37}}, {"id": 74, "type": "identifier", "text": "event", "parent": 72, "children": [], "start_point": {"row": 25, "column": 37}, "end_point": {"row": 25, "column": 42}}, {"id": 75, "type": "declaration", "text": "void mouseMoveEvent(QMouseEvent* event);", "parent": 45, "children": [76, 77], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 48}}, {"id": 76, "type": "primitive_type", "text": "void", "parent": 75, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 12}}, {"id": 77, "type": "function_declarator", "text": "mouseMoveEvent(QMouseEvent* event)", "parent": 75, "children": [78, 79], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 47}}, {"id": 78, "type": "identifier", "text": "mouseMoveEvent", "parent": 77, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 27}}, {"id": 79, "type": "parameter_list", "text": "(QMouseEvent* event)", "parent": 77, "children": [80], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 47}}, {"id": 80, "type": "parameter_declaration", "text": "QMouseEvent* event", "parent": 79, "children": [81, 82], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 46}}, {"id": 81, "type": "type_identifier", "text": "QMouseEvent", "parent": 80, "children": [], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 39}}, {"id": 82, "type": "pointer_declarator", "text": "* event", "parent": 80, "children": [83, 84], "start_point": {"row": 26, "column": 39}, "end_point": {"row": 26, "column": 46}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 26, "column": 39}, "end_point": {"row": 26, "column": 40}}, {"id": 84, "type": "identifier", "text": "event", "parent": 82, "children": [], "start_point": {"row": 26, "column": 41}, "end_point": {"row": 26, "column": 46}}, {"id": 85, "type": "labeled_statement", "text": "private:\n QPoint cursorPos;", "parent": 45, "children": [86], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 29, "column": 26}}, {"id": 86, "type": "declaration", "text": "QPoint cursorPos;", "parent": 85, "children": [87, 88], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 26}}, {"id": 87, "type": "type_identifier", "text": "QPoint", "parent": 86, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 15}}, {"id": 88, "type": "identifier", "text": "cursorPos", "parent": 86, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 25}}, {"id": 89, "type": "declaration", "text": "short updateTime;", "parent": 45, "children": [90, 92], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 26}}, {"id": 90, "type": "sized_type_specifier", "text": "short", "parent": 89, "children": [91], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 14}}, {"id": 91, "type": "short", "text": "short", "parent": 90, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 14}}, {"id": 92, "type": "identifier", "text": "updateTime", "parent": 89, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 25}}, {"id": 93, "type": "labeled_statement", "text": "signals:\n\n public slots:\n void callback();", "parent": 45, "children": [94, 95, 97], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 35, "column": 24}}, {"id": 94, "type": "statement_identifier", "text": "signals", "parent": 93, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 11}}, {"id": 95, "type": "ERROR", "text": "public slots:", "parent": 93, "children": [96], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 17}}, {"id": 96, "type": "identifier", "text": "slots", "parent": 95, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 16}}, {"id": 97, "type": "declaration", "text": "void callback();", "parent": 93, "children": [98, 99], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 24}}, {"id": 98, "type": "primitive_type", "text": "void", "parent": 97, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 12}}, {"id": 99, "type": "function_declarator", "text": "callback()", "parent": 97, "children": [100, 101], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 23}}, {"id": 100, "type": "identifier", "text": "callback", "parent": 99, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 21}}, {"id": 101, "type": "parameter_list", "text": "()", "parent": 99, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 23}}, {"id": 102, "type": "declaration", "text": "int execQApp();", "parent": 0, "children": [103, 104], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 15}}, {"id": 103, "type": "primitive_type", "text": "int", "parent": 102, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 3}}, {"id": 104, "type": "function_declarator", "text": "execQApp()", "parent": 102, "children": [105, 106], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 14}}, {"id": 105, "type": "identifier", "text": "execQApp", "parent": 104, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 12}}, {"id": 106, "type": "parameter_list", "text": "()", "parent": 104, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 14}}, {"id": 107, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 6}}]}, "node_categories": {"declarations": {"functions": [45, 54, 67, 77, 99, 104], "variables": [49, 57, 65, 70, 75, 80, 86, 89, 97, 102], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 46, 48, 50, 52, 55, 58, 61, 68, 71, 74, 78, 81, 84, 87, 88, 90, 92, 94, 96, 100, 105, 107], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 63], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 45, "universal_type": "function", "name": "QWindow", "text_snippet": "class QWindow : public QWidget\n{\n Q_OBJECT\n public:\n explicit QWindow(QWidget *parent ="}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "QWindow(QWidget *parent"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "paintEvent(QPaintEvent *event)"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "mouseMoveEvent(QMouseEvent* event)"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "callback()"}, {"node_id": 104, "universal_type": "function", "name": "unknown", "text_snippet": "execQApp()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <iostream>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <sstream>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <fstream>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <QWidget>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <QDesktopWidget>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <QPainter>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <QGuiApplication>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <QApplication>\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include <QScreen>\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include <QTimer>\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include <QImage>\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include <QMouseEvent>\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 42, "text": "#include <QDebug>\n"}, {"node_id": 43, "text": "#include"}]}, "original_source_code": "#ifndef __WINDOW_H_\n#define __WINDOW_H_\n\n#include <iostream>\n#include <sstream>\n#include <fstream>\n\n#include <QWidget>\n#include <QDesktopWidget>\n#include <QPainter>\n#include <QGuiApplication>\n#include <QApplication>\n#include <QScreen>\n#include <QTimer>\n#include <QImage>\n#include <QMouseEvent>\n#include <QDebug>\n\nclass QWindow : public QWidget\n{\n Q_OBJECT\n public:\n explicit QWindow(QWidget *parent = 0);\n\n protected:\n void paintEvent(QPaintEvent *event);\n void mouseMoveEvent(QMouseEvent* event);\n\n private:\n QPoint cursorPos;\n short updateTime;\n\n signals:\n\n public slots:\n void callback();\n};\n\n\nint execQApp();\n\n#endif"}
328
c
#ifndef HXCOMM_H #define HXCOMM_H // This file is a stub header file. #endif
18.25
4
(translation_unit) "#ifndef HXCOMM_H\n#define HXCOMM_H\n\n// This file is a stub header file.\n\n#endif\n" (preproc_ifdef) "#ifndef HXCOMM_H\n#define HXCOMM_H\n\n// This file is a stub header file.\n\n#endif" (#ifndef) "#ifndef" (identifier) "HXCOMM_H" (preproc_def) "#define HXCOMM_H\n" (#define) "#define" (identifier) "HXCOMM_H" (comment) "// This file is a stub header file." (#endif) "#endif"
9
0
{"language": "c", "success": true, "metadata": {"lines": 4, "avg_line_length": 18.25, "nodes": 7, "errors": 0, "source_hash": "e44224187f9a2966a688e271c80eca88cbb3077a1a911110a10dcb6cf4d2732c", "categorized_nodes": 5}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef HXCOMM_H\n#define HXCOMM_H\n\n// This file is a stub header file.\n\n#endif", "parent": null, "children": [1, 2, 3, 6], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "HXCOMM_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 16}}, {"id": 3, "type": "preproc_def", "text": "#define HXCOMM_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": "HXCOMM_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 16}}, {"id": 6, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 6], "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 HXCOMM_H\n#define HXCOMM_H\n\n// This file is a stub header file.\n\n#endif\n"}
329
c
/* * Copyright (C) 2017 by <NAME> <<EMAIL>> * Copyright (C) 2017 by <NAME> <<EMAIL>> * Copyright (C) 2017 by <NAME> <<EMAIL>> * * Licensed under the MIT License: * See the LICENSE file at the top-level directory of this distribution. */ #include <string.h> int charDistance(char a, char b) { return abs(a - b); } double strcmp2(const char *p1, const char *p2) { char *s1 = (char *)p1; char *s2 = (char *)p2; int lengthDiff = 0; int charDiff = 0; double distance = 0; for (; *s1 != '\0' && *s2 != '\0'; s1++, s2++) { charDiff += charDistance(*s1, *s2); } lengthDiff = abs((int)(strlen(p1) - strlen(p2))); distance = lengthDiff + (1 - pow(1.001, -charDiff)); int original_result = strcmp(p1, p2); int sign = (original_result > 0) - (original_result < 0); distance = sign * distance; return distance; }
31.19
26
(translation_unit) "/*\n * Copyright (C) 2017 by <NAME> <<EMAIL>>\n * Copyright (C) 2017 by <NAME> <<EMAIL>>\n * Copyright (C) 2017 by <NAME> <<EMAIL>>\n *\n * Licensed under the MIT License:\n * See the LICENSE file at the top-level directory of this distribution.\n */\n\n#include <string.h>\nint charDistance(char a, char b) { return abs(a - b); }\ndouble strcmp2(const char *p1, const char *p2) {\n char *s1 = (char *)p1;\n char *s2 = (char *)p2;\n int lengthDiff = 0;\n int charDiff = 0;\n double distance = 0;\n for (; *s1 != '\0' && *s2 != '\0'; s1++, s2++) {\n charDiff += charDistance(*s1, *s2);\n }\n lengthDiff = abs((int)(strlen(p1) - strlen(p2)));\n distance = lengthDiff + (1 - pow(1.001, -charDiff));\n int original_result = strcmp(p1, p2);\n int sign = (original_result > 0) - (original_result < 0);\n distance = sign * distance;\n return distance;\n}\n" (comment) "/*\n * Copyright (C) 2017 by <NAME> <<EMAIL>>\n * Copyright (C) 2017 by <NAME> <<EMAIL>>\n * Copyright (C) 2017 by <NAME> <<EMAIL>>\n *\n * Licensed under the MIT License:\n * See the LICENSE file at the top-level directory of this distribution.\n */" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (function_definition) "int charDistance(char a, char b) { return abs(a - b); }" (primitive_type) "int" (function_declarator) "charDistance(char a, char b)" (identifier) "charDistance" (parameter_list) "(char a, char b)" (() "(" (parameter_declaration) "char a" (primitive_type) "char" (identifier) "a" (,) "," (parameter_declaration) "char b" (primitive_type) "char" (identifier) "b" ()) ")" (compound_statement) "{ return abs(a - b); }" ({) "{" (return_statement) "return abs(a - b);" (return) "return" (call_expression) "abs(a - b)" (identifier) "abs" (argument_list) "(a - b)" (() "(" (binary_expression) "a - b" (identifier) "a" (-) "-" (identifier) "b" ()) ")" (;) ";" (}) "}" (function_definition) "double strcmp2(const char *p1, const char *p2) {\n char *s1 = (char *)p1;\n char *s2 = (char *)p2;\n int lengthDiff = 0;\n int charDiff = 0;\n double distance = 0;\n for (; *s1 != '\0' && *s2 != '\0'; s1++, s2++) {\n charDiff += charDistance(*s1, *s2);\n }\n lengthDiff = abs((int)(strlen(p1) - strlen(p2)));\n distance = lengthDiff + (1 - pow(1.001, -charDiff));\n int original_result = strcmp(p1, p2);\n int sign = (original_result > 0) - (original_result < 0);\n distance = sign * distance;\n return distance;\n}" (primitive_type) "double" (function_declarator) "strcmp2(const char *p1, const char *p2)" (identifier) "strcmp2" (parameter_list) "(const char *p1, const char *p2)" (() "(" (parameter_declaration) "const char *p1" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*p1" (*) "*" (identifier) "p1" (,) "," (parameter_declaration) "const char *p2" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*p2" (*) "*" (identifier) "p2" ()) ")" (compound_statement) "{\n char *s1 = (char *)p1;\n char *s2 = (char *)p2;\n int lengthDiff = 0;\n int charDiff = 0;\n double distance = 0;\n for (; *s1 != '\0' && *s2 != '\0'; s1++, s2++) {\n charDiff += charDistance(*s1, *s2);\n }\n lengthDiff = abs((int)(strlen(p1) - strlen(p2)));\n distance = lengthDiff + (1 - pow(1.001, -charDiff));\n int original_result = strcmp(p1, p2);\n int sign = (original_result > 0) - (original_result < 0);\n distance = sign * distance;\n return distance;\n}" ({) "{" (declaration) "char *s1 = (char *)p1;" (primitive_type) "char" (init_declarator) "*s1 = (char *)p1" (pointer_declarator) "*s1" (*) "*" (identifier) "s1" (=) "=" (cast_expression) "(char *)p1" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "p1" (;) ";" (declaration) "char *s2 = (char *)p2;" (primitive_type) "char" (init_declarator) "*s2 = (char *)p2" (pointer_declarator) "*s2" (*) "*" (identifier) "s2" (=) "=" (cast_expression) "(char *)p2" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "p2" (;) ";" (declaration) "int lengthDiff = 0;" (primitive_type) "int" (init_declarator) "lengthDiff = 0" (identifier) "lengthDiff" (=) "=" (number_literal) "0" (;) ";" (declaration) "int charDiff = 0;" (primitive_type) "int" (init_declarator) "charDiff = 0" (identifier) "charDiff" (=) "=" (number_literal) "0" (;) ";" (declaration) "double distance = 0;" (primitive_type) "double" (init_declarator) "distance = 0" (identifier) "distance" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for (; *s1 != '\0' && *s2 != '\0'; s1++, s2++) {\n charDiff += charDistance(*s1, *s2);\n }" (for) "for" (() "(" (;) ";" (binary_expression) "*s1 != '\0' && *s2 != '\0'" (binary_expression) "*s1 != '\0'" (pointer_expression) "*s1" (*) "*" (identifier) "s1" (!=) "!=" (char_literal) "'\0'" (') "'" (escape_sequence) "\0" (') "'" (&&) "&&" (binary_expression) "*s2 != '\0'" (pointer_expression) "*s2" (*) "*" (identifier) "s2" (!=) "!=" (char_literal) "'\0'" (') "'" (escape_sequence) "\0" (') "'" (;) ";" (comma_expression) "s1++, s2++" (update_expression) "s1++" (identifier) "s1" (++) "++" (,) "," (update_expression) "s2++" (identifier) "s2" (++) "++" ()) ")" (compound_statement) "{\n charDiff += charDistance(*s1, *s2);\n }" ({) "{" (expression_statement) "charDiff += charDistance(*s1, *s2);" (assignment_expression) "charDiff += charDistance(*s1, *s2)" (identifier) "charDiff" (+=) "+=" (call_expression) "charDistance(*s1, *s2)" (identifier) "charDistance" (argument_list) "(*s1, *s2)" (() "(" (pointer_expression) "*s1" (*) "*" (identifier) "s1" (,) "," (pointer_expression) "*s2" (*) "*" (identifier) "s2" ()) ")" (;) ";" (}) "}" (expression_statement) "lengthDiff = abs((int)(strlen(p1) - strlen(p2)));" (assignment_expression) "lengthDiff = abs((int)(strlen(p1) - strlen(p2)))" (identifier) "lengthDiff" (=) "=" (call_expression) "abs((int)(strlen(p1) - strlen(p2)))" (identifier) "abs" (argument_list) "((int)(strlen(p1) - strlen(p2)))" (() "(" (cast_expression) "(int)(strlen(p1) - strlen(p2))" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (parenthesized_expression) "(strlen(p1) - strlen(p2))" (() "(" (binary_expression) "strlen(p1) - strlen(p2)" (call_expression) "strlen(p1)" (identifier) "strlen" (argument_list) "(p1)" (() "(" (identifier) "p1" ()) ")" (-) "-" (call_expression) "strlen(p2)" (identifier) "strlen" (argument_list) "(p2)" (() "(" (identifier) "p2" ()) ")" ()) ")" ()) ")" (;) ";" (expression_statement) "distance = lengthDiff + (1 - pow(1.001, -charDiff));" (assignment_expression) "distance = lengthDiff + (1 - pow(1.001, -charDiff))" (identifier) "distance" (=) "=" (binary_expression) "lengthDiff + (1 - pow(1.001, -charDiff))" (identifier) "lengthDiff" (+) "+" (parenthesized_expression) "(1 - pow(1.001, -charDiff))" (() "(" (binary_expression) "1 - pow(1.001, -charDiff)" (number_literal) "1" (-) "-" (call_expression) "pow(1.001, -charDiff)" (identifier) "pow" (argument_list) "(1.001, -charDiff)" (() "(" (number_literal) "1.001" (,) "," (unary_expression) "-charDiff" (-) "-" (identifier) "charDiff" ()) ")" ()) ")" (;) ";" (declaration) "int original_result = strcmp(p1, p2);" (primitive_type) "int" (init_declarator) "original_result = strcmp(p1, p2)" (identifier) "original_result" (=) "=" (call_expression) "strcmp(p1, p2)" (identifier) "strcmp" (argument_list) "(p1, p2)" (() "(" (identifier) "p1" (,) "," (identifier) "p2" ()) ")" (;) ";" (declaration) "int sign = (original_result > 0) - (original_result < 0);" (primitive_type) "int" (init_declarator) "sign = (original_result > 0) - (original_result < 0)" (identifier) "sign" (=) "=" (binary_expression) "(original_result > 0) - (original_result < 0)" (parenthesized_expression) "(original_result > 0)" (() "(" (binary_expression) "original_result > 0" (identifier) "original_result" (>) ">" (number_literal) "0" ()) ")" (-) "-" (parenthesized_expression) "(original_result < 0)" (() "(" (binary_expression) "original_result < 0" (identifier) "original_result" (<) "<" (number_literal) "0" ()) ")" (;) ";" (expression_statement) "distance = sign * distance;" (assignment_expression) "distance = sign * distance" (identifier) "distance" (=) "=" (binary_expression) "sign * distance" (identifier) "sign" (*) "*" (identifier) "distance" (;) ";" (return_statement) "return distance;" (return) "return" (identifier) "distance" (;) ";" (}) "}"
271
0
{"language": "c", "success": true, "metadata": {"lines": 26, "avg_line_length": 31.19, "nodes": 194, "errors": 0, "source_hash": "b0465669363d28bf5d9a9b0a1b9163e32e8f6a3c56abaf298db850524a0c02d7", "categorized_nodes": 112}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<string.h>", "parent": 0, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 19}}, {"id": 3, "type": "function_definition", "text": "int charDistance(char a, char b) { return abs(a - b); }", "parent": null, "children": [4, 5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 55}}, {"id": 4, "type": "primitive_type", "text": "int", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 3}}, {"id": 5, "type": "function_declarator", "text": "charDistance(char a, char b)", "parent": 3, "children": [6, 7], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 32}}, {"id": 6, "type": "identifier", "text": "charDistance", "parent": 5, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 16}}, {"id": 7, "type": "parameter_list", "text": "(char a, char b)", "parent": 5, "children": [8, 11], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 32}}, {"id": 8, "type": "parameter_declaration", "text": "char a", "parent": 7, "children": [9, 10], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 23}}, {"id": 9, "type": "primitive_type", "text": "char", "parent": 8, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 21}}, {"id": 10, "type": "identifier", "text": "a", "parent": 8, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 23}}, {"id": 11, "type": "parameter_declaration", "text": "char b", "parent": 7, "children": [12, 13], "start_point": {"row": 10, "column": 25}, "end_point": {"row": 10, "column": 31}}, {"id": 12, "type": "primitive_type", "text": "char", "parent": 11, "children": [], "start_point": {"row": 10, "column": 25}, "end_point": {"row": 10, "column": 29}}, {"id": 13, "type": "identifier", "text": "b", "parent": 11, "children": [], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 31}}, {"id": 14, "type": "return_statement", "text": "return abs(a - b);", "parent": 3, "children": [15], "start_point": {"row": 10, "column": 35}, "end_point": {"row": 10, "column": 53}}, {"id": 15, "type": "call_expression", "text": "abs(a - b)", "parent": 14, "children": [16, 17], "start_point": {"row": 10, "column": 42}, "end_point": {"row": 10, "column": 52}}, {"id": 16, "type": "identifier", "text": "abs", "parent": 15, "children": [], "start_point": {"row": 10, "column": 42}, "end_point": {"row": 10, "column": 45}}, {"id": 17, "type": "argument_list", "text": "(a - b)", "parent": 15, "children": [18], "start_point": {"row": 10, "column": 45}, "end_point": {"row": 10, "column": 52}}, {"id": 18, "type": "binary_expression", "text": "a - b", "parent": 17, "children": [19, 20, 21], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 51}}, {"id": 19, "type": "identifier", "text": "a", "parent": 18, "children": [], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 47}}, {"id": 20, "type": "-", "text": "-", "parent": 18, "children": [], "start_point": {"row": 10, "column": 48}, "end_point": {"row": 10, "column": 49}}, {"id": 21, "type": "identifier", "text": "b", "parent": 18, "children": [], "start_point": {"row": 10, "column": 50}, "end_point": {"row": 10, "column": 51}}, {"id": 22, "type": "function_definition", "text": "double strcmp2(const char *p1, const char *p2) {\n char *s1 = (char *)p1;\n char *s2 = (char *)p2;\n int lengthDiff = 0;\n int charDiff = 0;\n double distance = 0;\n for (; *s1 != '\\0' && *s2 != '\\0'; s1++, s2++) {\n charDiff += charDistance(*s1, *s2);\n }\n lengthDiff = abs((int)(strlen(p1) - strlen(p2)));\n distance = lengthDiff + (1 - pow(1.001, -charDiff));\n int original_result = strcmp(p1, p2);\n int sign = (original_result > 0) - (original_result < 0);\n distance = sign * distance;\n return distance;\n}", "parent": null, "children": [23, 24], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 23, "type": "primitive_type", "text": "double", "parent": 22, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 24, "type": "function_declarator", "text": "strcmp2(const char *p1, const char *p2)", "parent": 22, "children": [25, 26], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 46}}, {"id": 25, "type": "identifier", "text": "strcmp2", "parent": 24, "children": [], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 14}}, {"id": 26, "type": "parameter_list", "text": "(const char *p1, const char *p2)", "parent": 24, "children": [27, 32], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 46}}, {"id": 27, "type": "parameter_declaration", "text": "const char *p1", "parent": 26, "children": [28, 29], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 29}}, {"id": 28, "type": "primitive_type", "text": "char", "parent": 27, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 25}}, {"id": 29, "type": "pointer_declarator", "text": "*p1", "parent": 27, "children": [30, 31], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 29}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 27}}, {"id": 31, "type": "identifier", "text": "p1", "parent": 29, "children": [], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 29}}, {"id": 32, "type": "parameter_declaration", "text": "const char *p2", "parent": 26, "children": [33, 34], "start_point": {"row": 11, "column": 31}, "end_point": {"row": 11, "column": 45}}, {"id": 33, "type": "primitive_type", "text": "char", "parent": 32, "children": [], "start_point": {"row": 11, "column": 37}, "end_point": {"row": 11, "column": 41}}, {"id": 34, "type": "pointer_declarator", "text": "*p2", "parent": 32, "children": [35, 36], "start_point": {"row": 11, "column": 42}, "end_point": {"row": 11, "column": 45}}, {"id": 35, "type": "*", "text": "*", "parent": 34, "children": [], "start_point": {"row": 11, "column": 42}, "end_point": {"row": 11, "column": 43}}, {"id": 36, "type": "identifier", "text": "p2", "parent": 34, "children": [], "start_point": {"row": 11, "column": 43}, "end_point": {"row": 11, "column": 45}}, {"id": 37, "type": "declaration", "text": "char *s1 = (char *)p1;", "parent": 22, "children": [38, 39], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 24}}, {"id": 38, "type": "primitive_type", "text": "char", "parent": 37, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 6}}, {"id": 39, "type": "init_declarator", "text": "*s1 = (char *)p1", "parent": 37, "children": [40, 43, 44], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 23}}, {"id": 40, "type": "pointer_declarator", "text": "*s1", "parent": 39, "children": [41, 42], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 10}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 8}}, {"id": 42, "type": "identifier", "text": "s1", "parent": 40, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 10}}, {"id": 43, "type": "=", "text": "=", "parent": 39, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 12}}, {"id": 44, "type": "cast_expression", "text": "(char *)p1", "parent": 39, "children": [45, 49], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 23}}, {"id": 45, "type": "type_descriptor", "text": "char *", "parent": 44, "children": [46, 47], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 20}}, {"id": 46, "type": "primitive_type", "text": "char", "parent": 45, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 18}}, {"id": 47, "type": "abstract_pointer_declarator", "text": "*", "parent": 45, "children": [48], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 20}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 20}}, {"id": 49, "type": "identifier", "text": "p1", "parent": 44, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 23}}, {"id": 50, "type": "declaration", "text": "char *s2 = (char *)p2;", "parent": 22, "children": [51, 52], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 24}}, {"id": 51, "type": "primitive_type", "text": "char", "parent": 50, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 6}}, {"id": 52, "type": "init_declarator", "text": "*s2 = (char *)p2", "parent": 50, "children": [53, 56, 57], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 23}}, {"id": 53, "type": "pointer_declarator", "text": "*s2", "parent": 52, "children": [54, 55], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 10}}, {"id": 54, "type": "*", "text": "*", "parent": 53, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 8}}, {"id": 55, "type": "identifier", "text": "s2", "parent": 53, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 10}}, {"id": 56, "type": "=", "text": "=", "parent": 52, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 12}}, {"id": 57, "type": "cast_expression", "text": "(char *)p2", "parent": 52, "children": [58, 62], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 23}}, {"id": 58, "type": "type_descriptor", "text": "char *", "parent": 57, "children": [59, 60], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 20}}, {"id": 59, "type": "primitive_type", "text": "char", "parent": 58, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 18}}, {"id": 60, "type": "abstract_pointer_declarator", "text": "*", "parent": 58, "children": [61], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 20}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 20}}, {"id": 62, "type": "identifier", "text": "p2", "parent": 57, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 23}}, {"id": 63, "type": "declaration", "text": "int lengthDiff = 0;", "parent": 22, "children": [64, 65], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 21}}, {"id": 64, "type": "primitive_type", "text": "int", "parent": 63, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 5}}, {"id": 65, "type": "init_declarator", "text": "lengthDiff = 0", "parent": 63, "children": [66, 67, 68], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 20}}, {"id": 66, "type": "identifier", "text": "lengthDiff", "parent": 65, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 16}}, {"id": 67, "type": "=", "text": "=", "parent": 65, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 18}}, {"id": 68, "type": "number_literal", "text": "0", "parent": 65, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 20}}, {"id": 69, "type": "declaration", "text": "int charDiff = 0;", "parent": 22, "children": [70, 71], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 19}}, {"id": 70, "type": "primitive_type", "text": "int", "parent": 69, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 5}}, {"id": 71, "type": "init_declarator", "text": "charDiff = 0", "parent": 69, "children": [72, 73, 74], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 18}}, {"id": 72, "type": "identifier", "text": "charDiff", "parent": 71, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 14}}, {"id": 73, "type": "=", "text": "=", "parent": 71, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 16}}, {"id": 74, "type": "number_literal", "text": "0", "parent": 71, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 18}}, {"id": 75, "type": "declaration", "text": "double distance = 0;", "parent": 22, "children": [76, 77], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 22}}, {"id": 76, "type": "primitive_type", "text": "double", "parent": 75, "children": [], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 8}}, {"id": 77, "type": "init_declarator", "text": "distance = 0", "parent": 75, "children": [78, 79, 80], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 21}}, {"id": 78, "type": "identifier", "text": "distance", "parent": 77, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 17}}, {"id": 79, "type": "=", "text": "=", "parent": 77, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 19}}, {"id": 80, "type": "number_literal", "text": "0", "parent": 77, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 21}}, {"id": 81, "type": "for_statement", "text": "for (; *s1 != '\\0' && *s2 != '\\0'; s1++, s2++) {\n charDiff += charDistance(*s1, *s2);\n }", "parent": 22, "children": [82, 102], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 19, "column": 3}}, {"id": 82, "type": "binary_expression", "text": "*s1 != '\\0' && *s2 != '\\0'", "parent": 81, "children": [83, 92, 93], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 35}}, {"id": 83, "type": "binary_expression", "text": "*s1 != '\\0'", "parent": 82, "children": [84, 87, 88], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 20}}, {"id": 84, "type": "pointer_expression", "text": "*s1", "parent": 83, "children": [85, 86], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 12}}, {"id": 85, "type": "*", "text": "*", "parent": 84, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 10}}, {"id": 86, "type": "identifier", "text": "s1", "parent": 84, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 12}}, {"id": 87, "type": "!=", "text": "!=", "parent": 83, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 15}}, {"id": 88, "type": "char_literal", "text": "'\\0'", "parent": 83, "children": [89, 90, 91], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 20}}, {"id": 89, "type": "'", "text": "'", "parent": 88, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 17}}, {"id": 90, "type": "escape_sequence", "text": "\\0", "parent": 88, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 19}}, {"id": 91, "type": "'", "text": "'", "parent": 88, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 20}}, {"id": 92, "type": "&&", "text": "&&", "parent": 82, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 23}}, {"id": 93, "type": "binary_expression", "text": "*s2 != '\\0'", "parent": 82, "children": [94, 97, 98], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 35}}, {"id": 94, "type": "pointer_expression", "text": "*s2", "parent": 93, "children": [95, 96], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 27}}, {"id": 95, "type": "*", "text": "*", "parent": 94, "children": [], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 25}}, {"id": 96, "type": "identifier", "text": "s2", "parent": 94, "children": [], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 27}}, {"id": 97, "type": "!=", "text": "!=", "parent": 93, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 30}}, {"id": 98, "type": "char_literal", "text": "'\\0'", "parent": 93, "children": [99, 100, 101], "start_point": {"row": 17, "column": 31}, "end_point": {"row": 17, "column": 35}}, {"id": 99, "type": "'", "text": "'", "parent": 98, "children": [], "start_point": {"row": 17, "column": 31}, "end_point": {"row": 17, "column": 32}}, {"id": 100, "type": "escape_sequence", "text": "\\0", "parent": 98, "children": [], "start_point": {"row": 17, "column": 32}, "end_point": {"row": 17, "column": 34}}, {"id": 101, "type": "'", "text": "'", "parent": 98, "children": [], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 35}}, {"id": 102, "type": "comma_expression", "text": "s1++, s2++", "parent": 81, "children": [103, 106], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 47}}, {"id": 103, "type": "update_expression", "text": "s1++", "parent": 102, "children": [104, 105], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 41}}, {"id": 104, "type": "identifier", "text": "s1", "parent": 103, "children": [], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 39}}, {"id": 105, "type": "++", "text": "++", "parent": 103, "children": [], "start_point": {"row": 17, "column": 39}, "end_point": {"row": 17, "column": 41}}, {"id": 106, "type": "update_expression", "text": "s2++", "parent": 102, "children": [107, 108], "start_point": {"row": 17, "column": 43}, "end_point": {"row": 17, "column": 47}}, {"id": 107, "type": "identifier", "text": "s2", "parent": 106, "children": [], "start_point": {"row": 17, "column": 43}, "end_point": {"row": 17, "column": 45}}, {"id": 108, "type": "++", "text": "++", "parent": 106, "children": [], "start_point": {"row": 17, "column": 45}, "end_point": {"row": 17, "column": 47}}, {"id": 109, "type": "assignment_expression", "text": "charDiff += charDistance(*s1, *s2)", "parent": 81, "children": [110, 111, 112], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 38}}, {"id": 110, "type": "identifier", "text": "charDiff", "parent": 109, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 12}}, {"id": 111, "type": "+=", "text": "+=", "parent": 109, "children": [], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 15}}, {"id": 112, "type": "call_expression", "text": "charDistance(*s1, *s2)", "parent": 109, "children": [113, 114], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 38}}, {"id": 113, "type": "identifier", "text": "charDistance", "parent": 112, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 28}}, {"id": 114, "type": "argument_list", "text": "(*s1, *s2)", "parent": 112, "children": [115, 118], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 38}}, {"id": 115, "type": "pointer_expression", "text": "*s1", "parent": 114, "children": [116, 117], "start_point": {"row": 18, "column": 29}, "end_point": {"row": 18, "column": 32}}, {"id": 116, "type": "*", "text": "*", "parent": 115, "children": [], "start_point": {"row": 18, "column": 29}, "end_point": {"row": 18, "column": 30}}, {"id": 117, "type": "identifier", "text": "s1", "parent": 115, "children": [], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 32}}, {"id": 118, "type": "pointer_expression", "text": "*s2", "parent": 114, "children": [119, 120], "start_point": {"row": 18, "column": 34}, "end_point": {"row": 18, "column": 37}}, {"id": 119, "type": "*", "text": "*", "parent": 118, "children": [], "start_point": {"row": 18, "column": 34}, "end_point": {"row": 18, "column": 35}}, {"id": 120, "type": "identifier", "text": "s2", "parent": 118, "children": [], "start_point": {"row": 18, "column": 35}, "end_point": {"row": 18, "column": 37}}, {"id": 121, "type": "assignment_expression", "text": "lengthDiff = abs((int)(strlen(p1) - strlen(p2)))", "parent": 22, "children": [122, 123, 124], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 50}}, {"id": 122, "type": "identifier", "text": "lengthDiff", "parent": 121, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 12}}, {"id": 123, "type": "=", "text": "=", "parent": 121, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 14}}, {"id": 124, "type": "call_expression", "text": "abs((int)(strlen(p1) - strlen(p2)))", "parent": 121, "children": [125, 126], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 50}}, {"id": 125, "type": "identifier", "text": "abs", "parent": 124, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 18}}, {"id": 126, "type": "argument_list", "text": "((int)(strlen(p1) - strlen(p2)))", "parent": 124, "children": [127], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 50}}, {"id": 127, "type": "cast_expression", "text": "(int)(strlen(p1) - strlen(p2))", "parent": 126, "children": [128, 130], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 49}}, {"id": 128, "type": "type_descriptor", "text": "int", "parent": 127, "children": [129], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 23}}, {"id": 129, "type": "primitive_type", "text": "int", "parent": 128, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 23}}, {"id": 130, "type": "parenthesized_expression", "text": "(strlen(p1) - strlen(p2))", "parent": 127, "children": [131], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 49}}, {"id": 131, "type": "binary_expression", "text": "strlen(p1) - strlen(p2)", "parent": 130, "children": [132, 136, 137], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 48}}, {"id": 132, "type": "call_expression", "text": "strlen(p1)", "parent": 131, "children": [133, 134], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 35}}, {"id": 133, "type": "identifier", "text": "strlen", "parent": 132, "children": [], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 31}}, {"id": 134, "type": "argument_list", "text": "(p1)", "parent": 132, "children": [135], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 35}}, {"id": 135, "type": "identifier", "text": "p1", "parent": 134, "children": [], "start_point": {"row": 20, "column": 32}, "end_point": {"row": 20, "column": 34}}, {"id": 136, "type": "-", "text": "-", "parent": 131, "children": [], "start_point": {"row": 20, "column": 36}, "end_point": {"row": 20, "column": 37}}, {"id": 137, "type": "call_expression", "text": "strlen(p2)", "parent": 131, "children": [138, 139], "start_point": {"row": 20, "column": 38}, "end_point": {"row": 20, "column": 48}}, {"id": 138, "type": "identifier", "text": "strlen", "parent": 137, "children": [], "start_point": {"row": 20, "column": 38}, "end_point": {"row": 20, "column": 44}}, {"id": 139, "type": "argument_list", "text": "(p2)", "parent": 137, "children": [140], "start_point": {"row": 20, "column": 44}, "end_point": {"row": 20, "column": 48}}, {"id": 140, "type": "identifier", "text": "p2", "parent": 139, "children": [], "start_point": {"row": 20, "column": 45}, "end_point": {"row": 20, "column": 47}}, {"id": 141, "type": "assignment_expression", "text": "distance = lengthDiff + (1 - pow(1.001, -charDiff))", "parent": 22, "children": [142, 143, 144], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 53}}, {"id": 142, "type": "identifier", "text": "distance", "parent": 141, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 10}}, {"id": 143, "type": "=", "text": "=", "parent": 141, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 12}}, {"id": 144, "type": "binary_expression", "text": "lengthDiff + (1 - pow(1.001, -charDiff))", "parent": 141, "children": [145, 146, 147], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 53}}, {"id": 145, "type": "identifier", "text": "lengthDiff", "parent": 144, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 23}}, {"id": 146, "type": "+", "text": "+", "parent": 144, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 25}}, {"id": 147, "type": "parenthesized_expression", "text": "(1 - pow(1.001, -charDiff))", "parent": 144, "children": [148], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 53}}, {"id": 148, "type": "binary_expression", "text": "1 - pow(1.001, -charDiff)", "parent": 147, "children": [149, 150, 151], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 52}}, {"id": 149, "type": "number_literal", "text": "1", "parent": 148, "children": [], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 28}}, {"id": 150, "type": "-", "text": "-", "parent": 148, "children": [], "start_point": {"row": 21, "column": 29}, "end_point": {"row": 21, "column": 30}}, {"id": 151, "type": "call_expression", "text": "pow(1.001, -charDiff)", "parent": 148, "children": [152, 153], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 52}}, {"id": 152, "type": "identifier", "text": "pow", "parent": 151, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 34}}, {"id": 153, "type": "argument_list", "text": "(1.001, -charDiff)", "parent": 151, "children": [154, 155], "start_point": {"row": 21, "column": 34}, "end_point": {"row": 21, "column": 52}}, {"id": 154, "type": "number_literal", "text": "1.001", "parent": 153, "children": [], "start_point": {"row": 21, "column": 35}, "end_point": {"row": 21, "column": 40}}, {"id": 155, "type": "unary_expression", "text": "-charDiff", "parent": 153, "children": [156, 157], "start_point": {"row": 21, "column": 42}, "end_point": {"row": 21, "column": 51}}, {"id": 156, "type": "-", "text": "-", "parent": 155, "children": [], "start_point": {"row": 21, "column": 42}, "end_point": {"row": 21, "column": 43}}, {"id": 157, "type": "identifier", "text": "charDiff", "parent": 155, "children": [], "start_point": {"row": 21, "column": 43}, "end_point": {"row": 21, "column": 51}}, {"id": 158, "type": "declaration", "text": "int original_result = strcmp(p1, p2);", "parent": 22, "children": [159, 160], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 39}}, {"id": 159, "type": "primitive_type", "text": "int", "parent": 158, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 5}}, {"id": 160, "type": "init_declarator", "text": "original_result = strcmp(p1, p2)", "parent": 158, "children": [161, 162, 163], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 38}}, {"id": 161, "type": "identifier", "text": "original_result", "parent": 160, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 21}}, {"id": 162, "type": "=", "text": "=", "parent": 160, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 23}}, {"id": 163, "type": "call_expression", "text": "strcmp(p1, p2)", "parent": 160, "children": [164, 165], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 38}}, {"id": 164, "type": "identifier", "text": "strcmp", "parent": 163, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 30}}, {"id": 165, "type": "argument_list", "text": "(p1, p2)", "parent": 163, "children": [166, 167], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 38}}, {"id": 166, "type": "identifier", "text": "p1", "parent": 165, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 33}}, {"id": 167, "type": "identifier", "text": "p2", "parent": 165, "children": [], "start_point": {"row": 22, "column": 35}, "end_point": {"row": 22, "column": 37}}, {"id": 168, "type": "declaration", "text": "int sign = (original_result > 0) - (original_result < 0);", "parent": 22, "children": [169, 170], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 59}}, {"id": 169, "type": "primitive_type", "text": "int", "parent": 168, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 5}}, {"id": 170, "type": "init_declarator", "text": "sign = (original_result > 0) - (original_result < 0)", "parent": 168, "children": [171, 172, 173], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 58}}, {"id": 171, "type": "identifier", "text": "sign", "parent": 170, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 10}}, {"id": 172, "type": "=", "text": "=", "parent": 170, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 12}}, {"id": 173, "type": "binary_expression", "text": "(original_result > 0) - (original_result < 0)", "parent": 170, "children": [174, 179, 180], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 58}}, {"id": 174, "type": "parenthesized_expression", "text": "(original_result > 0)", "parent": 173, "children": [175], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 34}}, {"id": 175, "type": "binary_expression", "text": "original_result > 0", "parent": 174, "children": [176, 177, 178], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 33}}, {"id": 176, "type": "identifier", "text": "original_result", "parent": 175, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 29}}, {"id": 177, "type": ">", "text": ">", "parent": 175, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 31}}, {"id": 178, "type": "number_literal", "text": "0", "parent": 175, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 33}}, {"id": 179, "type": "-", "text": "-", "parent": 173, "children": [], "start_point": {"row": 23, "column": 35}, "end_point": {"row": 23, "column": 36}}, {"id": 180, "type": "parenthesized_expression", "text": "(original_result < 0)", "parent": 173, "children": [181], "start_point": {"row": 23, "column": 37}, "end_point": {"row": 23, "column": 58}}, {"id": 181, "type": "binary_expression", "text": "original_result < 0", "parent": 180, "children": [182, 183, 184], "start_point": {"row": 23, "column": 38}, "end_point": {"row": 23, "column": 57}}, {"id": 182, "type": "identifier", "text": "original_result", "parent": 181, "children": [], "start_point": {"row": 23, "column": 38}, "end_point": {"row": 23, "column": 53}}, {"id": 183, "type": "<", "text": "<", "parent": 181, "children": [], "start_point": {"row": 23, "column": 54}, "end_point": {"row": 23, "column": 55}}, {"id": 184, "type": "number_literal", "text": "0", "parent": 181, "children": [], "start_point": {"row": 23, "column": 56}, "end_point": {"row": 23, "column": 57}}, {"id": 185, "type": "assignment_expression", "text": "distance = sign * distance", "parent": 22, "children": [186, 187, 188], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 28}}, {"id": 186, "type": "identifier", "text": "distance", "parent": 185, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 10}}, {"id": 187, "type": "=", "text": "=", "parent": 185, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 12}}, {"id": 188, "type": "binary_expression", "text": "sign * distance", "parent": 185, "children": [189, 190, 191], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 28}}, {"id": 189, "type": "identifier", "text": "sign", "parent": 188, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 17}}, {"id": 190, "type": "*", "text": "*", "parent": 188, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 19}}, {"id": 191, "type": "identifier", "text": "distance", "parent": 188, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 28}}, {"id": 192, "type": "return_statement", "text": "return distance;", "parent": 22, "children": [193], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 18}}, {"id": 193, "type": "identifier", "text": "distance", "parent": 192, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 17}}]}, "node_categories": {"declarations": {"functions": [3, 5, 22, 24], "variables": [8, 11, 27, 32, 37, 50, 63, 69, 75, 158, 168], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [15, 18, 44, 57, 82, 83, 84, 93, 94, 102, 103, 106, 112, 115, 118, 124, 127, 130, 131, 132, 137, 144, 147, 148, 151, 155, 163, 173, 174, 175, 180, 181, 188], "assignments": [109, 121, 141, 185], "loops": [81], "conditionals": [6, 10, 13, 16, 19, 21, 25, 31, 36, 42, 49, 55, 62, 66, 72, 78, 86, 96, 104, 107, 110, 113, 117, 120, 122, 125, 133, 135, 138, 140, 142, 145, 152, 157, 161, 164, 166, 167, 171, 176, 182, 186, 189, 191, 193], "returns": [14, 192], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 68, 74, 80, 88, 98, 149, 154, 178, 184], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "charDistance", "text_snippet": "int charDistance(char a, char b) { return abs(a - b); }"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "charDistance(char a, char b)"}, {"node_id": 22, "universal_type": "function", "name": "lengthDiff", "text_snippet": "double strcmp2(const char *p1, const char *p2) {\n char *s1 = (char *)p1;\n char *s2 = (char *)p2;\n "}, {"node_id": 24, "universal_type": "function", "name": "unknown", "text_snippet": "strcmp2(const char *p1, const char *p2)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <string.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (C) 2017 by <NAME> <<EMAIL>>\n * Copyright (C) 2017 by <NAME> <<EMAIL>>\n * Copyright (C) 2017 by <NAME> <<EMAIL>>\n *\n * Licensed under the MIT License:\n * See the LICENSE file at the top-level directory of this distribution.\n */\n\n#include <string.h>\nint charDistance(char a, char b) { return abs(a - b); }\ndouble strcmp2(const char *p1, const char *p2) {\n char *s1 = (char *)p1;\n char *s2 = (char *)p2;\n int lengthDiff = 0;\n int charDiff = 0;\n double distance = 0;\n for (; *s1 != '\\0' && *s2 != '\\0'; s1++, s2++) {\n charDiff += charDistance(*s1, *s2);\n }\n lengthDiff = abs((int)(strlen(p1) - strlen(p2)));\n distance = lengthDiff + (1 - pow(1.001, -charDiff));\n int original_result = strcmp(p1, p2);\n int sign = (original_result > 0) - (original_result < 0);\n distance = sign * distance;\n return distance;\n}\n"}
330
c
#include <vcl.h>
16
1
(translation_unit) "#include <vcl.h>\n" (preproc_include) "#include <vcl.h>\n" (#include) "#include" (system_lib_string) "<vcl.h>"
4
0
{"language": "c", "success": true, "metadata": {"lines": 1, "avg_line_length": 16.0, "nodes": 3, "errors": 0, "source_hash": "808538738a12cc35212487cb0ef4492b9275789dee888504041ddccc337f8c22", "categorized_nodes": 3}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <vcl.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": "<vcl.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 16}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <vcl.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include <vcl.h>\n"}
331
c
#ifndef __MESYTEC_MCPD_INT_TYPES_H__ #define __MESYTEC_MCPD_INT_TYPES_H__ #include <cstdint> namespace mesytec { namespace mcpd { typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; typedef int8_t s8; typedef int16_t s16; typedef int32_t s32; typedef int64_t s64; } } #endif /* __MESYTEC_MCPD_INT_TYPES_H__ */
18.22
18
(translation_unit) "#ifndef __MESYTEC_MCPD_INT_TYPES_H__\n#define __MESYTEC_MCPD_INT_TYPES_H__\n\n#include <cstdint>\n\nnamespace mesytec\n{\nnamespace mcpd\n{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t u64;\n\ntypedef int8_t s8;\ntypedef int16_t s16;\ntypedef int32_t s32;\ntypedef int64_t s64;\n\n}\n}\n\n#endif /* __MESYTEC_MCPD_INT_TYPES_H__ */\n" (preproc_ifdef) "#ifndef __MESYTEC_MCPD_INT_TYPES_H__\n#define __MESYTEC_MCPD_INT_TYPES_H__\n\n#include <cstdint>\n\nnamespace mesytec\n{\nnamespace mcpd\n{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t u64;\n\ntypedef int8_t s8;\ntypedef int16_t s16;\ntypedef int32_t s32;\ntypedef int64_t s64;\n\n}\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "__MESYTEC_MCPD_INT_TYPES_H__" (preproc_def) "#define __MESYTEC_MCPD_INT_TYPES_H__\n" (#define) "#define" (identifier) "__MESYTEC_MCPD_INT_TYPES_H__" (preproc_include) "#include <cstdint>\n" (#include) "#include" (system_lib_string) "<cstdint>" (function_definition) "namespace mesytec\n{\nnamespace mcpd\n{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t u64;\n\ntypedef int8_t s8;\ntypedef int16_t s16;\ntypedef int32_t s32;\ntypedef int64_t s64;\n\n}\n}" (type_identifier) "namespace" (identifier) "mesytec" (compound_statement) "{\nnamespace mcpd\n{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t u64;\n\ntypedef int8_t s8;\ntypedef int16_t s16;\ntypedef int32_t s32;\ntypedef int64_t s64;\n\n}\n}" ({) "{" (function_definition) "namespace mcpd\n{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t u64;\n\ntypedef int8_t s8;\ntypedef int16_t s16;\ntypedef int32_t s32;\ntypedef int64_t s64;\n\n}" (type_identifier) "namespace" (identifier) "mcpd" (compound_statement) "{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t u64;\n\ntypedef int8_t s8;\ntypedef int16_t s16;\ntypedef int32_t s32;\ntypedef int64_t s64;\n\n}" ({) "{" (type_definition) "typedef uint8_t u8;" (typedef) "typedef" (primitive_type) "uint8_t" (type_identifier) "u8" (;) ";" (type_definition) "typedef uint16_t u16;" (typedef) "typedef" (primitive_type) "uint16_t" (type_identifier) "u16" (;) ";" (type_definition) "typedef uint32_t u32;" (typedef) "typedef" (primitive_type) "uint32_t" (type_identifier) "u32" (;) ";" (type_definition) "typedef uint64_t u64;" (typedef) "typedef" (primitive_type) "uint64_t" (type_identifier) "u64" (;) ";" (type_definition) "typedef int8_t s8;" (typedef) "typedef" (primitive_type) "int8_t" (type_identifier) "s8" (;) ";" (type_definition) "typedef int16_t s16;" (typedef) "typedef" (primitive_type) "int16_t" (type_identifier) "s16" (;) ";" (type_definition) "typedef int32_t s32;" (typedef) "typedef" (primitive_type) "int32_t" (type_identifier) "s32" (;) ";" (type_definition) "typedef int64_t s64;" (typedef) "typedef" (primitive_type) "int64_t" (type_identifier) "s64" (;) ";" (}) "}" (}) "}" (#endif) "#endif" (comment) "/* __MESYTEC_MCPD_INT_TYPES_H__ */"
64
0
{"language": "c", "success": true, "metadata": {"lines": 18, "avg_line_length": 18.22, "nodes": 48, "errors": 0, "source_hash": "0be23154a1acb4970bb3b841eb91f75bd12d2d85603eda33610b9bffbd623429", "categorized_nodes": 30}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __MESYTEC_MCPD_INT_TYPES_H__\n#define __MESYTEC_MCPD_INT_TYPES_H__\n\n#include <cstdint>\n\nnamespace mesytec\n{\nnamespace mcpd\n{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t u64;\n\ntypedef int8_t s8;\ntypedef int16_t s16;\ntypedef int32_t s32;\ntypedef int64_t s64;\n\n}\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 47], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "__MESYTEC_MCPD_INT_TYPES_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 36}}, {"id": 3, "type": "preproc_def", "text": "#define __MESYTEC_MCPD_INT_TYPES_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": "__MESYTEC_MCPD_INT_TYPES_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 36}}, {"id": 6, "type": "preproc_include", "text": "#include <cstdint>\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": "<cstdint>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "function_definition", "text": "namespace mesytec\n{\nnamespace mcpd\n{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t u64;\n\ntypedef int8_t s8;\ntypedef int16_t s16;\ntypedef int32_t s32;\ntypedef int64_t s64;\n\n}\n}", "parent": 0, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 21, "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": "mesytec", "parent": 9, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 17}}, {"id": 12, "type": "function_definition", "text": "namespace mcpd\n{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t u64;\n\ntypedef int8_t s8;\ntypedef int16_t s16;\ntypedef int32_t s32;\ntypedef int64_t s64;\n\n}", "parent": 9, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 13, "type": "type_identifier", "text": "namespace", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 9}}, {"id": 14, "type": "identifier", "text": "mcpd", "parent": 12, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 14}}, {"id": 15, "type": "type_definition", "text": "typedef uint8_t u8;", "parent": 12, "children": [16, 17, 18], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 20}}, {"id": 16, "type": "typedef", "text": "typedef", "parent": 15, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 17, "type": "primitive_type", "text": "uint8_t", "parent": 15, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 15}}, {"id": 18, "type": "type_identifier", "text": "u8", "parent": 15, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 19}}, {"id": 19, "type": "type_definition", "text": "typedef uint16_t u16;", "parent": 12, "children": [20, 21, 22], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 21}}, {"id": 20, "type": "typedef", "text": "typedef", "parent": 19, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 21, "type": "primitive_type", "text": "uint16_t", "parent": 19, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 16}}, {"id": 22, "type": "type_identifier", "text": "u16", "parent": 19, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 20}}, {"id": 23, "type": "type_definition", "text": "typedef uint32_t u32;", "parent": 12, "children": [24, 25, 26], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 21}}, {"id": 24, "type": "typedef", "text": "typedef", "parent": 23, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 25, "type": "primitive_type", "text": "uint32_t", "parent": 23, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 16}}, {"id": 26, "type": "type_identifier", "text": "u32", "parent": 23, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 20}}, {"id": 27, "type": "type_definition", "text": "typedef uint64_t u64;", "parent": 12, "children": [28, 29, 30], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 21}}, {"id": 28, "type": "typedef", "text": "typedef", "parent": 27, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 29, "type": "primitive_type", "text": "uint64_t", "parent": 27, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 16}}, {"id": 30, "type": "type_identifier", "text": "u64", "parent": 27, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 20}}, {"id": 31, "type": "type_definition", "text": "typedef int8_t s8;", "parent": 12, "children": [32, 33, 34], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 19}}, {"id": 32, "type": "typedef", "text": "typedef", "parent": 31, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 33, "type": "primitive_type", "text": "int8_t", "parent": 31, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 14}}, {"id": 34, "type": "type_identifier", "text": "s8", "parent": 31, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 18}}, {"id": 35, "type": "type_definition", "text": "typedef int16_t s16;", "parent": 12, "children": [36, 37, 38], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 20}}, {"id": 36, "type": "typedef", "text": "typedef", "parent": 35, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 37, "type": "primitive_type", "text": "int16_t", "parent": 35, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 15}}, {"id": 38, "type": "type_identifier", "text": "s16", "parent": 35, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 19}}, {"id": 39, "type": "type_definition", "text": "typedef int32_t s32;", "parent": 12, "children": [40, 41, 42], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 20}}, {"id": 40, "type": "typedef", "text": "typedef", "parent": 39, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 41, "type": "primitive_type", "text": "int32_t", "parent": 39, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 15}}, {"id": 42, "type": "type_identifier", "text": "s32", "parent": 39, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 19}}, {"id": 43, "type": "type_definition", "text": "typedef int64_t s64;", "parent": 12, "children": [44, 45, 46], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 20}}, {"id": 44, "type": "typedef", "text": "typedef", "parent": 43, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 45, "type": "primitive_type", "text": "int64_t", "parent": 43, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 15}}, {"id": 46, "type": "type_identifier", "text": "s64", "parent": 43, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 19}}, {"id": 47, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9, 12], "variables": [15, 19, 23, 27, 31, 35, 39, 43], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 11, 13, 14, 18, 22, 26, 30, 34, 38, 42, 46, 47], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "unknown", "text_snippet": "namespace mesytec\n{\nnamespace mcpd\n{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u3"}, {"node_id": 12, "universal_type": "function", "name": "unknown", "text_snippet": "namespace mcpd\n{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t "}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <cstdint>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef __MESYTEC_MCPD_INT_TYPES_H__\n#define __MESYTEC_MCPD_INT_TYPES_H__\n\n#include <cstdint>\n\nnamespace mesytec\n{\nnamespace mcpd\n{\n\ntypedef uint8_t u8;\ntypedef uint16_t u16;\ntypedef uint32_t u32;\ntypedef uint64_t u64;\n\ntypedef int8_t s8;\ntypedef int16_t s16;\ntypedef int32_t s32;\ntypedef int64_t s64;\n\n}\n}\n\n#endif /* __MESYTEC_MCPD_INT_TYPES_H__ */\n"}
332
c
#include <stdio.h> #define MAXTITL 64 #define MAXAUTH 64 struct book{ char title[MAXTITL]; char auth[MAXAUTH]; float value; }; int main(int argc, char *argv[]) { struct book abook; printf("Please enter the book title : "); gets(abook.title); printf("Now enter the author : "); gets(abook.auth); printf("Enter the price of the book : $"); scanf("%f", &abook.value); printf("\e[3;33m%s\e[0m by \e[0;31m%s \e[0m: \e[0;30m$%.2f[0m\n", abook.title, abook.auth, abook.value); return 0; }
21.04
23
(translation_unit) "#include <stdio.h>\n#define MAXTITL 64\n#define MAXAUTH 64\n\nstruct book{\n char title[MAXTITL];\n char auth[MAXAUTH];\n float value;\n};\n\n\nint main(int argc, char *argv[]) \n{\n struct book abook;\n printf("Please enter the book title : ");\n gets(abook.title);\n printf("Now enter the author : ");\n gets(abook.auth);\n printf("Enter the price of the book : $");\n scanf("%f", &abook.value);\n printf("\e[3;33m%s\e[0m by \e[0;31m%s \e[0m: \e[0;30m$%.2f[0m\n", abook.title, abook.auth, abook.value); \n \n return 0;\n \n}" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_def) "#define MAXTITL 64\n" (#define) "#define" (identifier) "MAXTITL" (preproc_arg) "64" (preproc_def) "#define MAXAUTH 64\n" (#define) "#define" (identifier) "MAXAUTH" (preproc_arg) "64" (struct_specifier) "struct book{\n char title[MAXTITL];\n char auth[MAXAUTH];\n float value;\n}" (struct) "struct" (type_identifier) "book" (field_declaration_list) "{\n char title[MAXTITL];\n char auth[MAXAUTH];\n float value;\n}" ({) "{" (field_declaration) "char title[MAXTITL];" (primitive_type) "char" (array_declarator) "title[MAXTITL]" (field_identifier) "title" ([) "[" (identifier) "MAXTITL" (]) "]" (;) ";" (field_declaration) "char auth[MAXAUTH];" (primitive_type) "char" (array_declarator) "auth[MAXAUTH]" (field_identifier) "auth" ([) "[" (identifier) "MAXAUTH" (]) "]" (;) ";" (field_declaration) "float value;" (primitive_type) "float" (field_identifier) "value" (;) ";" (}) "}" (;) ";" (function_definition) "int main(int argc, char *argv[]) \n{\n struct book abook;\n printf("Please enter the book title : ");\n gets(abook.title);\n printf("Now enter the author : ");\n gets(abook.auth);\n printf("Enter the price of the book : $");\n scanf("%f", &abook.value);\n printf("\e[3;33m%s\e[0m by \e[0;31m%s \e[0m: \e[0;30m$%.2f[0m\n", abook.title, abook.auth, abook.value); \n \n return 0;\n \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 book abook;\n printf("Please enter the book title : ");\n gets(abook.title);\n printf("Now enter the author : ");\n gets(abook.auth);\n printf("Enter the price of the book : $");\n scanf("%f", &abook.value);\n printf("\e[3;33m%s\e[0m by \e[0;31m%s \e[0m: \e[0;30m$%.2f[0m\n", abook.title, abook.auth, abook.value); \n \n return 0;\n \n}" ({) "{" (declaration) "struct book abook;" (struct_specifier) "struct book" (struct) "struct" (type_identifier) "book" (identifier) "abook" (;) ";" (expression_statement) "printf("Please enter the book title : ");" (call_expression) "printf("Please enter the book title : ")" (identifier) "printf" (argument_list) "("Please enter the book title : ")" (() "(" (string_literal) ""Please enter the book title : "" (") """ (string_content) "Please enter the book title : " (") """ ()) ")" (;) ";" (expression_statement) "gets(abook.title);" (call_expression) "gets(abook.title)" (identifier) "gets" (argument_list) "(abook.title)" (() "(" (field_expression) "abook.title" (identifier) "abook" (.) "." (field_identifier) "title" ()) ")" (;) ";" (expression_statement) "printf("Now enter the author : ");" (call_expression) "printf("Now enter the author : ")" (identifier) "printf" (argument_list) "("Now enter the author : ")" (() "(" (string_literal) ""Now enter the author : "" (") """ (string_content) "Now enter the author : " (") """ ()) ")" (;) ";" (expression_statement) "gets(abook.auth);" (call_expression) "gets(abook.auth)" (identifier) "gets" (argument_list) "(abook.auth)" (() "(" (field_expression) "abook.auth" (identifier) "abook" (.) "." (field_identifier) "auth" ()) ")" (;) ";" (expression_statement) "printf("Enter the price of the book : $");" (call_expression) "printf("Enter the price of the book : $")" (identifier) "printf" (argument_list) "("Enter the price of the book : $")" (() "(" (string_literal) ""Enter the price of the book : $"" (") """ (string_content) "Enter the price of the book : $" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%f", &abook.value);" (call_expression) "scanf("%f", &abook.value)" (identifier) "scanf" (argument_list) "("%f", &abook.value)" (() "(" (string_literal) ""%f"" (") """ (string_content) "%f" (") """ (,) "," (pointer_expression) "&abook.value" (&) "&" (field_expression) "abook.value" (identifier) "abook" (.) "." (field_identifier) "value" ()) ")" (;) ";" (expression_statement) "printf("\e[3;33m%s\e[0m by \e[0;31m%s \e[0m: \e[0;30m$%.2f[0m\n", abook.title, abook.auth, abook.value);" (call_expression) "printf("\e[3;33m%s\e[0m by \e[0;31m%s \e[0m: \e[0;30m$%.2f[0m\n", abook.title, abook.auth, abook.value)" (identifier) "printf" (argument_list) "("\e[3;33m%s\e[0m by \e[0;31m%s \e[0m: \e[0;30m$%.2f[0m\n", abook.title, abook.auth, abook.value)" (() "(" (string_literal) ""\e[3;33m%s\e[0m by \e[0;31m%s \e[0m: \e[0;30m$%.2f[0m\n"" (") """ (escape_sequence) "\e" (string_content) "[3;33m%s" (escape_sequence) "\e" (string_content) "[0m by " (escape_sequence) "\e" (string_content) "[0;31m%s " (escape_sequence) "\e" (string_content) "[0m: " (escape_sequence) "\e" (string_content) "[0;30m$%.2f[0m" (escape_sequence) "\n" (") """ (,) "," (field_expression) "abook.title" (identifier) "abook" (.) "." (field_identifier) "title" (,) "," (field_expression) "abook.auth" (identifier) "abook" (.) "." (field_identifier) "auth" (,) "," (field_expression) "abook.value" (identifier) "abook" (.) "." (field_identifier) "value" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
180
0
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 21.04, "nodes": 99, "errors": 0, "source_hash": "9ad3e5b0d6989cb8a0367b335ed45475a53fa156f60303464685af34822f157c", "categorized_nodes": 68}, "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_def", "text": "#define MAXTITL 64\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": "MAXTITL", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 16}}, {"id": 6, "type": "preproc_arg", "text": "64", "parent": 3, "children": [], "start_point": {"row": 1, "column": 18}, "end_point": {"row": 1, "column": 20}}, {"id": 7, "type": "preproc_def", "text": "#define MAXAUTH 64\n", "parent": null, "children": [8, 9, 10], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 8, "type": "#define", "text": "#define", "parent": 7, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 9, "type": "identifier", "text": "MAXAUTH", "parent": 7, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 16}}, {"id": 10, "type": "preproc_arg", "text": "64", "parent": 7, "children": [], "start_point": {"row": 2, "column": 18}, "end_point": {"row": 2, "column": 20}}, {"id": 11, "type": "struct_specifier", "text": "struct book{\n\tchar title[MAXTITL];\n\tchar auth[MAXAUTH];\n\tfloat value;\n}", "parent": null, "children": [12, 13], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 12, "type": "struct", "text": "struct", "parent": 11, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 13, "type": "type_identifier", "text": "book", "parent": 11, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 11}}, {"id": 14, "type": "field_declaration", "text": "char title[MAXTITL];", "parent": 11, "children": [15, 16], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 22}}, {"id": 15, "type": "primitive_type", "text": "char", "parent": 14, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 5}}, {"id": 16, "type": "array_declarator", "text": "title[MAXTITL]", "parent": 14, "children": [17, 18], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 21}}, {"id": 17, "type": "field_identifier", "text": "title", "parent": 16, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 12}}, {"id": 18, "type": "identifier", "text": "MAXTITL", "parent": 16, "children": [], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 20}}, {"id": 19, "type": "field_declaration", "text": "char auth[MAXAUTH];", "parent": 11, "children": [20, 21], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 21}}, {"id": 20, "type": "primitive_type", "text": "char", "parent": 19, "children": [], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 5}}, {"id": 21, "type": "array_declarator", "text": "auth[MAXAUTH]", "parent": 19, "children": [22, 23], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 20}}, {"id": 22, "type": "field_identifier", "text": "auth", "parent": 21, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 11}}, {"id": 23, "type": "identifier", "text": "MAXAUTH", "parent": 21, "children": [], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 19}}, {"id": 24, "type": "field_declaration", "text": "float value;", "parent": 11, "children": [25, 26], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 13}}, {"id": 25, "type": "primitive_type", "text": "float", "parent": 24, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 6}}, {"id": 26, "type": "field_identifier", "text": "value", "parent": 24, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 12}}, {"id": 27, "type": "function_definition", "text": "int main(int argc, char *argv[]) \n{\n\tstruct book abook;\n\tprintf(\"Please enter the book title : \");\n\tgets(abook.title);\n\tprintf(\"Now enter the author : \");\n\tgets(abook.auth);\n\tprintf(\"Enter the price of the book : $\");\n\tscanf(\"%f\", &abook.value);\n\tprintf(\"\\e[3;33m%s\\e[0m by \\e[0;31m%s \\e[0m: \\e[0;30m$%.2f[0m\\n\", abook.title, abook.auth, abook.value);\t\n\t\n\treturn 0;\n\t\n}", "parent": null, "children": [28, 29], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 28, "type": "primitive_type", "text": "int", "parent": 27, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 3}}, {"id": 29, "type": "function_declarator", "text": "main(int argc, char *argv[])", "parent": 27, "children": [30, 31], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 32}}, {"id": 30, "type": "identifier", "text": "main", "parent": 29, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 8}}, {"id": 31, "type": "parameter_list", "text": "(int argc, char *argv[])", "parent": 29, "children": [32, 35], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 32}}, {"id": 32, "type": "parameter_declaration", "text": "int argc", "parent": 31, "children": [33, 34], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 17}}, {"id": 33, "type": "primitive_type", "text": "int", "parent": 32, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 12}}, {"id": 34, "type": "identifier", "text": "argc", "parent": 32, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 17}}, {"id": 35, "type": "parameter_declaration", "text": "char *argv[]", "parent": 31, "children": [36, 37], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 31}}, {"id": 36, "type": "primitive_type", "text": "char", "parent": 35, "children": [], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 23}}, {"id": 37, "type": "pointer_declarator", "text": "*argv[]", "parent": 35, "children": [38, 39], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 31}}, {"id": 38, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 25}}, {"id": 39, "type": "array_declarator", "text": "argv[]", "parent": 37, "children": [40], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 31}}, {"id": 40, "type": "identifier", "text": "argv", "parent": 39, "children": [], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 29}}, {"id": 41, "type": "declaration", "text": "struct book abook;", "parent": 27, "children": [42, 45], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 19}}, {"id": 42, "type": "struct_specifier", "text": "struct book", "parent": 41, "children": [43, 44], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 12}}, {"id": 43, "type": "struct", "text": "struct", "parent": 42, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 7}}, {"id": 44, "type": "type_identifier", "text": "book", "parent": 42, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 12}}, {"id": 45, "type": "identifier", "text": "abook", "parent": 41, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 18}}, {"id": 46, "type": "call_expression", "text": "printf(\"Please enter the book title : \")", "parent": 27, "children": [47, 48], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 41}}, {"id": 47, "type": "identifier", "text": "printf", "parent": 46, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 7}}, {"id": 48, "type": "argument_list", "text": "(\"Please enter the book title : \")", "parent": 46, "children": [49], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 41}}, {"id": 49, "type": "string_literal", "text": "\"Please enter the book title : \"", "parent": 48, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 40}}, {"id": 50, "type": "call_expression", "text": "gets(abook.title)", "parent": 27, "children": [51, 52], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 18}}, {"id": 51, "type": "identifier", "text": "gets", "parent": 50, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 5}}, {"id": 52, "type": "argument_list", "text": "(abook.title)", "parent": 50, "children": [53], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 18}}, {"id": 53, "type": "field_expression", "text": "abook.title", "parent": 52, "children": [54, 55], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 17}}, {"id": 54, "type": "identifier", "text": "abook", "parent": 53, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 11}}, {"id": 55, "type": "field_identifier", "text": "title", "parent": 53, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 17}}, {"id": 56, "type": "call_expression", "text": "printf(\"Now enter the author : \")", "parent": 27, "children": [57, 58], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 34}}, {"id": 57, "type": "identifier", "text": "printf", "parent": 56, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 7}}, {"id": 58, "type": "argument_list", "text": "(\"Now enter the author : \")", "parent": 56, "children": [59], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 34}}, {"id": 59, "type": "string_literal", "text": "\"Now enter the author : \"", "parent": 58, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 33}}, {"id": 60, "type": "call_expression", "text": "gets(abook.auth)", "parent": 27, "children": [61, 62], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 17}}, {"id": 61, "type": "identifier", "text": "gets", "parent": 60, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 5}}, {"id": 62, "type": "argument_list", "text": "(abook.auth)", "parent": 60, "children": [63], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 17}}, {"id": 63, "type": "field_expression", "text": "abook.auth", "parent": 62, "children": [64, 65], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 16}}, {"id": 64, "type": "identifier", "text": "abook", "parent": 63, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 11}}, {"id": 65, "type": "field_identifier", "text": "auth", "parent": 63, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 16}}, {"id": 66, "type": "call_expression", "text": "printf(\"Enter the price of the book : $\")", "parent": 27, "children": [67, 68], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 42}}, {"id": 67, "type": "identifier", "text": "printf", "parent": 66, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 7}}, {"id": 68, "type": "argument_list", "text": "(\"Enter the price of the book : $\")", "parent": 66, "children": [69], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 42}}, {"id": 69, "type": "string_literal", "text": "\"Enter the price of the book : $\"", "parent": 68, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 41}}, {"id": 70, "type": "call_expression", "text": "scanf(\"%f\", &abook.value)", "parent": 27, "children": [71, 72], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 26}}, {"id": 71, "type": "identifier", "text": "scanf", "parent": 70, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 6}}, {"id": 72, "type": "argument_list", "text": "(\"%f\", &abook.value)", "parent": 70, "children": [73, 74], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 26}}, {"id": 73, "type": "string_literal", "text": "\"%f\"", "parent": 72, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 11}}, {"id": 74, "type": "pointer_expression", "text": "&abook.value", "parent": 72, "children": [75], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 25}}, {"id": 75, "type": "field_expression", "text": "abook.value", "parent": 74, "children": [76, 77], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 25}}, {"id": 76, "type": "identifier", "text": "abook", "parent": 75, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 19}}, {"id": 77, "type": "field_identifier", "text": "value", "parent": 75, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 25}}, {"id": 78, "type": "call_expression", "text": "printf(\"\\e[3;33m%s\\e[0m by \\e[0;31m%s \\e[0m: \\e[0;30m$%.2f[0m\\n\", abook.title, abook.auth, abook.value)", "parent": 27, "children": [79, 80], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 104}}, {"id": 79, "type": "identifier", "text": "printf", "parent": 78, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 7}}, {"id": 80, "type": "argument_list", "text": "(\"\\e[3;33m%s\\e[0m by \\e[0;31m%s \\e[0m: \\e[0;30m$%.2f[0m\\n\", abook.title, abook.auth, abook.value)", "parent": 78, "children": [81, 88, 91, 94], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 104}}, {"id": 81, "type": "string_literal", "text": "\"\\e[3;33m%s\\e[0m by \\e[0;31m%s \\e[0m: \\e[0;30m$%.2f[0m\\n\"", "parent": 80, "children": [82, 83, 84, 85, 86, 87], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 65}}, {"id": 82, "type": "escape_sequence", "text": "\\e", "parent": 81, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 11}}, {"id": 83, "type": "escape_sequence", "text": "\\e", "parent": 81, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 21}}, {"id": 84, "type": "escape_sequence", "text": "\\e", "parent": 81, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 30}}, {"id": 85, "type": "escape_sequence", "text": "\\e", "parent": 81, "children": [], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 41}}, {"id": 86, "type": "escape_sequence", "text": "\\e", "parent": 81, "children": [], "start_point": {"row": 20, "column": 46}, "end_point": {"row": 20, "column": 48}}, {"id": 87, "type": "escape_sequence", "text": "\\n", "parent": 81, "children": [], "start_point": {"row": 20, "column": 62}, "end_point": {"row": 20, "column": 64}}, {"id": 88, "type": "field_expression", "text": "abook.title", "parent": 80, "children": [89, 90], "start_point": {"row": 20, "column": 67}, "end_point": {"row": 20, "column": 78}}, {"id": 89, "type": "identifier", "text": "abook", "parent": 88, "children": [], "start_point": {"row": 20, "column": 67}, "end_point": {"row": 20, "column": 72}}, {"id": 90, "type": "field_identifier", "text": "title", "parent": 88, "children": [], "start_point": {"row": 20, "column": 73}, "end_point": {"row": 20, "column": 78}}, {"id": 91, "type": "field_expression", "text": "abook.auth", "parent": 80, "children": [92, 93], "start_point": {"row": 20, "column": 80}, "end_point": {"row": 20, "column": 90}}, {"id": 92, "type": "identifier", "text": "abook", "parent": 91, "children": [], "start_point": {"row": 20, "column": 80}, "end_point": {"row": 20, "column": 85}}, {"id": 93, "type": "field_identifier", "text": "auth", "parent": 91, "children": [], "start_point": {"row": 20, "column": 86}, "end_point": {"row": 20, "column": 90}}, {"id": 94, "type": "field_expression", "text": "abook.value", "parent": 80, "children": [95, 96], "start_point": {"row": 20, "column": 92}, "end_point": {"row": 20, "column": 103}}, {"id": 95, "type": "identifier", "text": "abook", "parent": 94, "children": [], "start_point": {"row": 20, "column": 92}, "end_point": {"row": 20, "column": 97}}, {"id": 96, "type": "field_identifier", "text": "value", "parent": 94, "children": [], "start_point": {"row": 20, "column": 98}, "end_point": {"row": 20, "column": 103}}, {"id": 97, "type": "return_statement", "text": "return 0;", "parent": 27, "children": [98], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 10}}, {"id": 98, "type": "number_literal", "text": "0", "parent": 97, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 9}}]}, "node_categories": {"declarations": {"functions": [27, 29], "variables": [14, 19, 24, 32, 35, 41], "classes": [11, 12, 42, 43], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [46, 50, 53, 56, 60, 63, 66, 70, 74, 75, 78, 88, 91, 94], "assignments": [], "loops": [], "conditionals": [5, 9, 13, 17, 18, 22, 23, 26, 30, 34, 40, 44, 45, 47, 51, 54, 55, 57, 61, 64, 65, 67, 71, 76, 77, 79, 89, 90, 92, 93, 95, 96], "returns": [97], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 49, 59, 69, 73, 81, 98], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 27, "universal_type": "function", "name": "main", "text_snippet": "int main(int argc, char *argv[]) \n{\n\tstruct book abook;\n\tprintf(\"Please enter the book title : \");\n\t"}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "main(int argc, char *argv[])"}], "class_declarations": [{"node_id": 11, "universal_type": "class", "name": "book{", "text_snippet": "struct book{\n\tchar title[MAXTITL];\n\tchar auth[MAXAUTH];\n\tfloat value;\n}"}, {"node_id": 12, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 42, "universal_type": "class", "name": "book", "text_snippet": "struct book"}, {"node_id": 43, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#define MAXTITL 64\n#define MAXAUTH 64\n\nstruct book{\n\tchar title[MAXTITL];\n\tchar auth[MAXAUTH];\n\tfloat value;\n};\n\n\nint main(int argc, char *argv[]) \n{\n\tstruct book abook;\n\tprintf(\"Please enter the book title : \");\n\tgets(abook.title);\n\tprintf(\"Now enter the author : \");\n\tgets(abook.auth);\n\tprintf(\"Enter the price of the book : $\");\n\tscanf(\"%f\", &abook.value);\n\tprintf(\"\\e[3;33m%s\\e[0m by \\e[0;31m%s \\e[0m: \\e[0;30m$%.2f[0m\\n\", abook.title, abook.auth, abook.value);\t\n\t\n\treturn 0;\n\t\n}"}
333
c
#pragma once #include <chrono> #include <iostream> // Is used to measure time class Timer { public: Timer() : start_(std::chrono::high_resolution_clock::now()) { } // returns time in [us] since instantiation int elapsed() { const auto finish = std::chrono::high_resolution_clock::now(); return std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count(); } private: const std::chrono::high_resolution_clock::time_point start_; };
24.3
20
(translation_unit) "#pragma once\n\n#include <chrono>\n#include <iostream>\n\n// Is used to measure time \nclass Timer\n{\npublic:\n Timer()\n : start_(std::chrono::high_resolution_clock::now())\n {\n }\n\n // returns time in [us] since instantiation\n int elapsed()\n {\n const auto finish = std::chrono::high_resolution_clock::now();\n return std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count();\n }\n\nprivate:\n const std::chrono::high_resolution_clock::time_point start_;\n};\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <chrono>\n" (#include) "#include" (system_lib_string) "<chrono>" (preproc_include) "#include <iostream>\n" (#include) "#include" (system_lib_string) "<iostream>" (comment) "// Is used to measure time " (function_definition) "class Timer\n{\npublic:\n Timer()\n : start_(std::chrono::high_resolution_clock::now())\n {\n }\n\n // returns time in [us] since instantiation\n int elapsed()\n {\n const auto finish = std::chrono::high_resolution_clock::now();\n return std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count();\n }\n\nprivate:\n const std::chrono::high_resolution_clock::time_point start_;\n}" (type_identifier) "class" (identifier) "Timer" (compound_statement) "{\npublic:\n Timer()\n : start_(std::chrono::high_resolution_clock::now())\n {\n }\n\n // returns time in [us] since instantiation\n int elapsed()\n {\n const auto finish = std::chrono::high_resolution_clock::now();\n return std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count();\n }\n\nprivate:\n const std::chrono::high_resolution_clock::time_point start_;\n}" ({) "{" (labeled_statement) "public:\n Timer()\n : start_(std::chrono::high_resolution_clock::now())\n {\n }" (statement_identifier) "public" (ERROR) ":\n Timer()" (:) ":" (call_expression) "Timer()" (identifier) "Timer" (argument_list) "()" (() "(" ()) ")" (:) ":" (labeled_statement) "start_(std::chrono::high_resolution_clock::now())\n {\n }" (statement_identifier) "start_" (ERROR) "(std:" (() "(" (type_descriptor) "std" (type_identifier) "std" (:) ":" (:) ":" (labeled_statement) "chrono::high_resolution_clock::now())\n {\n }" (statement_identifier) "chrono" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "high_resolution_clock::now())\n {\n }" (statement_identifier) "high_resolution_clock" (:) ":" (ERROR) ":now())" (:) ":" (call_expression) "now()" (identifier) "now" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n }" ({) "{" (}) "}" (comment) "// returns time in [us] since instantiation" (function_definition) "int elapsed()\n {\n const auto finish = std::chrono::high_resolution_clock::now();\n return std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count();\n }" (primitive_type) "int" (function_declarator) "elapsed()" (identifier) "elapsed" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n const auto finish = std::chrono::high_resolution_clock::now();\n return std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count();\n }" ({) "{" (declaration) "const auto finish = std::chrono::high_resolution_clock::now();" (type_qualifier) "const" (const) "const" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "finish" (ERROR) "= std::chrono::high_resolution_clock::" (=) "=" (identifier) "std" (:) ":" (:) ":" (identifier) "chrono" (:) ":" (:) ":" (identifier) "high_resolution_clock" (:) ":" (:) ":" (function_declarator) "now()" (identifier) "now" (parameter_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count();" (return) "return" (ERROR) "std::chrono::duration_cast<std::chrono::" (identifier) "std" (:) ":" (:) ":" (identifier) "chrono" (:) ":" (:) ":" (binary_expression) "duration_cast<std" (identifier) "duration_cast" (<) "<" (identifier) "std" (:) ":" (:) ":" (identifier) "chrono" (:) ":" (:) ":" (binary_expression) "microseconds>(finish - start_).count()" (identifier) "microseconds" (>) ">" (call_expression) "(finish - start_).count()" (field_expression) "(finish - start_).count" (parenthesized_expression) "(finish - start_)" (() "(" (binary_expression) "finish - start_" (identifier) "finish" (-) "-" (identifier) "start_" ()) ")" (.) "." (field_identifier) "count" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (labeled_statement) "private:\n const std::chrono::high_resolution_clock::time_point start_;" (statement_identifier) "private" (ERROR) ":\n const std:" (:) ":" (type_qualifier) "const" (const) "const" (type_identifier) "std" (:) ":" (:) ":" (labeled_statement) "chrono::high_resolution_clock::time_point start_;" (statement_identifier) "chrono" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "high_resolution_clock::time_point start_;" (statement_identifier) "high_resolution_clock" (:) ":" (ERROR) ":" (:) ":" (declaration) "time_point start_;" (type_identifier) "time_point" (identifier) "start_" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
149
9
{"language": "c", "success": true, "metadata": {"lines": 20, "avg_line_length": 24.3, "nodes": 77, "errors": 0, "source_hash": "6881181e26d0a908fe750811c1bd1d02c1a09b8c541e112630ae42fb653f7716", "categorized_nodes": 50}, "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 <chrono>\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": "<chrono>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 17}}, {"id": 6, "type": "preproc_include", "text": "#include <iostream>\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": "<iostream>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 9, "type": "function_definition", "text": "class Timer\n{\npublic:\n Timer()\n : start_(std::chrono::high_resolution_clock::now())\n {\n }\n\n // returns time in [us] since instantiation\n int elapsed()\n {\n const auto finish = std::chrono::high_resolution_clock::now();\n return std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count();\n }\n\nprivate:\n const std::chrono::high_resolution_clock::time_point start_;\n}", "parent": null, "children": [10], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 10, "type": "identifier", "text": "Timer", "parent": 9, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 11}}, {"id": 11, "type": "labeled_statement", "text": "public:\n Timer()\n : start_(std::chrono::high_resolution_clock::now())\n {\n }", "parent": 9, "children": [12, 16], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 12, "column": 5}}, {"id": 12, "type": "ERROR", "text": ":\n Timer()", "parent": 11, "children": [13], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 9, "column": 11}}, {"id": 13, "type": "call_expression", "text": "Timer()", "parent": 12, "children": [14, 15], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 11}}, {"id": 14, "type": "identifier", "text": "Timer", "parent": 13, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 9}}, {"id": 15, "type": "argument_list", "text": "()", "parent": 13, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 11}}, {"id": 16, "type": "labeled_statement", "text": "start_(std::chrono::high_resolution_clock::now())\n {\n }", "parent": 11, "children": [17, 18, 21], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 12, "column": 5}}, {"id": 17, "type": "statement_identifier", "text": "start_", "parent": 16, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 16}}, {"id": 18, "type": "ERROR", "text": "(std:", "parent": 16, "children": [19], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 21}}, {"id": 19, "type": "type_descriptor", "text": "std", "parent": 18, "children": [20], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 20}}, {"id": 20, "type": "type_identifier", "text": "std", "parent": 19, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 20}}, {"id": 21, "type": "labeled_statement", "text": "chrono::high_resolution_clock::now())\n {\n }", "parent": 16, "children": [22, 23], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 12, "column": 5}}, {"id": 22, "type": "statement_identifier", "text": "chrono", "parent": 21, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 28}}, {"id": 23, "type": "labeled_statement", "text": "high_resolution_clock::now())\n {\n }", "parent": 21, "children": [24, 25], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 12, "column": 5}}, {"id": 24, "type": "statement_identifier", "text": "high_resolution_clock", "parent": 23, "children": [], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 51}}, {"id": 25, "type": "ERROR", "text": ":now())", "parent": 23, "children": [26], "start_point": {"row": 10, "column": 52}, "end_point": {"row": 10, "column": 59}}, {"id": 26, "type": "call_expression", "text": "now()", "parent": 25, "children": [27, 28], "start_point": {"row": 10, "column": 53}, "end_point": {"row": 10, "column": 58}}, {"id": 27, "type": "identifier", "text": "now", "parent": 26, "children": [], "start_point": {"row": 10, "column": 53}, "end_point": {"row": 10, "column": 56}}, {"id": 28, "type": "argument_list", "text": "()", "parent": 26, "children": [], "start_point": {"row": 10, "column": 56}, "end_point": {"row": 10, "column": 58}}, {"id": 29, "type": "function_definition", "text": "int elapsed()\n {\n const auto finish = std::chrono::high_resolution_clock::now();\n return std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count();\n }", "parent": 9, "children": [30, 31], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 19, "column": 5}}, {"id": 30, "type": "primitive_type", "text": "int", "parent": 29, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 7}}, {"id": 31, "type": "function_declarator", "text": "elapsed()", "parent": 29, "children": [32, 33], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 17}}, {"id": 32, "type": "identifier", "text": "elapsed", "parent": 31, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 15}}, {"id": 33, "type": "parameter_list", "text": "()", "parent": 31, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 17}}, {"id": 34, "type": "declaration", "text": "const auto finish = std::chrono::high_resolution_clock::now();", "parent": 29, "children": [35, 37, 38, 43], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 70}}, {"id": 35, "type": "storage_class_specifier", "text": "auto", "parent": 34, "children": [36], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 18}}, {"id": 36, "type": "auto", "text": "auto", "parent": 35, "children": [], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 18}}, {"id": 37, "type": "type_identifier", "text": "finish", "parent": 34, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 25}}, {"id": 38, "type": "ERROR", "text": "= std::chrono::high_resolution_clock::", "parent": 34, "children": [39, 40, 41, 42], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 64}}, {"id": 39, "type": "=", "text": "=", "parent": 38, "children": [], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 27}}, {"id": 40, "type": "identifier", "text": "std", "parent": 38, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 31}}, {"id": 41, "type": "identifier", "text": "chrono", "parent": 38, "children": [], "start_point": {"row": 17, "column": 33}, "end_point": {"row": 17, "column": 39}}, {"id": 42, "type": "identifier", "text": "high_resolution_clock", "parent": 38, "children": [], "start_point": {"row": 17, "column": 41}, "end_point": {"row": 17, "column": 62}}, {"id": 43, "type": "function_declarator", "text": "now()", "parent": 34, "children": [44, 45], "start_point": {"row": 17, "column": 64}, "end_point": {"row": 17, "column": 69}}, {"id": 44, "type": "identifier", "text": "now", "parent": 43, "children": [], "start_point": {"row": 17, "column": 64}, "end_point": {"row": 17, "column": 67}}, {"id": 45, "type": "parameter_list", "text": "()", "parent": 43, "children": [], "start_point": {"row": 17, "column": 67}, "end_point": {"row": 17, "column": 69}}, {"id": 46, "type": "return_statement", "text": "return std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count();", "parent": 29, "children": [47, 55], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 94}}, {"id": 47, "type": "ERROR", "text": "std::chrono::duration_cast<std::chrono::", "parent": 46, "children": [48, 49, 50, 54], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 55}}, {"id": 48, "type": "identifier", "text": "std", "parent": 47, "children": [], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 18}}, {"id": 49, "type": "identifier", "text": "chrono", "parent": 47, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 26}}, {"id": 50, "type": "binary_expression", "text": "duration_cast<std", "parent": 47, "children": [51, 52, 53], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 45}}, {"id": 51, "type": "identifier", "text": "duration_cast", "parent": 50, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 41}}, {"id": 52, "type": "<", "text": "<", "parent": 50, "children": [], "start_point": {"row": 18, "column": 41}, "end_point": {"row": 18, "column": 42}}, {"id": 53, "type": "identifier", "text": "std", "parent": 50, "children": [], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 45}}, {"id": 54, "type": "identifier", "text": "chrono", "parent": 47, "children": [], "start_point": {"row": 18, "column": 47}, "end_point": {"row": 18, "column": 53}}, {"id": 55, "type": "binary_expression", "text": "microseconds>(finish - start_).count()", "parent": 46, "children": [56, 57, 58], "start_point": {"row": 18, "column": 55}, "end_point": {"row": 18, "column": 93}}, {"id": 56, "type": "identifier", "text": "microseconds", "parent": 55, "children": [], "start_point": {"row": 18, "column": 55}, "end_point": {"row": 18, "column": 67}}, {"id": 57, "type": ">", "text": ">", "parent": 55, "children": [], "start_point": {"row": 18, "column": 67}, "end_point": {"row": 18, "column": 68}}, {"id": 58, "type": "call_expression", "text": "(finish - start_).count()", "parent": 55, "children": [59, 66], "start_point": {"row": 18, "column": 68}, "end_point": {"row": 18, "column": 93}}, {"id": 59, "type": "field_expression", "text": "(finish - start_).count", "parent": 58, "children": [60, 65], "start_point": {"row": 18, "column": 68}, "end_point": {"row": 18, "column": 91}}, {"id": 60, "type": "parenthesized_expression", "text": "(finish - start_)", "parent": 59, "children": [61], "start_point": {"row": 18, "column": 68}, "end_point": {"row": 18, "column": 85}}, {"id": 61, "type": "binary_expression", "text": "finish - start_", "parent": 60, "children": [62, 63, 64], "start_point": {"row": 18, "column": 69}, "end_point": {"row": 18, "column": 84}}, {"id": 62, "type": "identifier", "text": "finish", "parent": 61, "children": [], "start_point": {"row": 18, "column": 69}, "end_point": {"row": 18, "column": 75}}, {"id": 63, "type": "-", "text": "-", "parent": 61, "children": [], "start_point": {"row": 18, "column": 76}, "end_point": {"row": 18, "column": 77}}, {"id": 64, "type": "identifier", "text": "start_", "parent": 61, "children": [], "start_point": {"row": 18, "column": 78}, "end_point": {"row": 18, "column": 84}}, {"id": 65, "type": "field_identifier", "text": "count", "parent": 59, "children": [], "start_point": {"row": 18, "column": 86}, "end_point": {"row": 18, "column": 91}}, {"id": 66, "type": "argument_list", "text": "()", "parent": 58, "children": [], "start_point": {"row": 18, "column": 91}, "end_point": {"row": 18, "column": 93}}, {"id": 67, "type": "labeled_statement", "text": "private:\n const std::chrono::high_resolution_clock::time_point start_;", "parent": 9, "children": [68, 70], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 64}}, {"id": 68, "type": "ERROR", "text": ":\n const std:", "parent": 67, "children": [69], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 22, "column": 14}}, {"id": 69, "type": "type_identifier", "text": "std", "parent": 68, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 13}}, {"id": 70, "type": "labeled_statement", "text": "chrono::high_resolution_clock::time_point start_;", "parent": 67, "children": [71, 72], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 64}}, {"id": 71, "type": "statement_identifier", "text": "chrono", "parent": 70, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 21}}, {"id": 72, "type": "labeled_statement", "text": "high_resolution_clock::time_point start_;", "parent": 70, "children": [73, 74], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 64}}, {"id": 73, "type": "statement_identifier", "text": "high_resolution_clock", "parent": 72, "children": [], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 44}}, {"id": 74, "type": "declaration", "text": "time_point start_;", "parent": 72, "children": [75, 76], "start_point": {"row": 22, "column": 46}, "end_point": {"row": 22, "column": 64}}, {"id": 75, "type": "type_identifier", "text": "time_point", "parent": 74, "children": [], "start_point": {"row": 22, "column": 46}, "end_point": {"row": 22, "column": 56}}, {"id": 76, "type": "identifier", "text": "start_", "parent": 74, "children": [], "start_point": {"row": 22, "column": 57}, "end_point": {"row": 22, "column": 63}}]}, "node_categories": {"declarations": {"functions": [9, 29, 31, 43], "variables": [34, 74], "classes": [35], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [13, 26, 50, 55, 58, 59, 60, 61], "assignments": [], "loops": [], "conditionals": [10, 14, 17, 20, 22, 24, 27, 32, 37, 40, 41, 42, 44, 48, 49, 51, 53, 54, 56, 62, 64, 65, 69, 71, 73, 75, 76], "returns": [46], "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": "Timer", "text_snippet": "class Timer\n{\npublic:\n Timer()\n : start_(std::chrono::high_resolution_clock::now())\n {\n"}, {"node_id": 29, "universal_type": "function", "name": "elapsed", "text_snippet": "int elapsed()\n {\n const auto finish = std::chrono::high_resolution_clock::now();\n r"}, {"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "elapsed()"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "now()"}], "class_declarations": [{"node_id": 35, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}], "import_statements": [{"node_id": 3, "text": "#include <chrono>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <iostream>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <chrono>\n#include <iostream>\n\n// Is used to measure time \nclass Timer\n{\npublic:\n Timer()\n : start_(std::chrono::high_resolution_clock::now())\n {\n }\n\n // returns time in [us] since instantiation\n int elapsed()\n {\n const auto finish = std::chrono::high_resolution_clock::now();\n return std::chrono::duration_cast<std::chrono::microseconds>(finish - start_).count();\n }\n\nprivate:\n const std::chrono::high_resolution_clock::time_point start_;\n};\n"}
334
c
 #ifndef __NGX_MEMORY_H__ #define __NGX_MEMORY_H__ #include <stddef.h> //NULL //内存相关类 class CMemory { private: CMemory() {} //构造函数,因为要做成单例类,所以是私有的构造函数 public: ~CMemory(){}; private: static CMemory *m_instance; public: static CMemory* GetInstance() //单例 { if(m_instance == NULL) { //锁 if(m_instance == NULL) { m_instance = new CMemory(); //第一次调用不应该放在线程中,应该放在主进程中,以免和其他线程调用冲突从而导致同时执行两次new CMemory() static CGarhuishou cl; } //放锁 } return m_instance; } class CGarhuishou { public: ~CGarhuishou() { if (CMemory::m_instance) { delete CMemory::m_instance; //这个释放是整个系统退出的时候,系统来调用释放内存的哦 CMemory::m_instance = NULL; } } }; //------- public: void *AllocMemory(int memCount,bool ifmemset); void FreeMemory(void *point); }; #endif
16.38
47
(translation_unit) "fndef __NGX_MEMORY_H__\n#define __NGX_MEMORY_H__\n\n#include <stddef.h> //NULL\n//内存相关类\nclass CMemory \n{\nprivate:\n CMemory() {} //构造函数,因为要做成单例类,所以是私有的构造函数\n\npublic:\n ~CMemory(){};\n\nprivate:\n static CMemory *m_instance;\n\npublic: \n static CMemory* GetInstance() //单例\n { \n if(m_instance == NULL)\n {\n //锁\n if(m_instance == NULL)\n { \n m_instance = new CMemory(); //第一次调用不应该放在线程中,应该放在主进程中,以免和其他线程调用冲突从而导致同时执行两次new CMemory()\n static CGarhuishou cl; \n }\n //放锁\n }\n return m_instance;\n } \n class CGarhuishou \n {\n public: \n ~CGarhuishou()\n {\n if (CMemory::m_instance)\n { \n delete CMemory::m_instance; //这个释放是整个系统退出的时候,系统来调用释放内存的哦\n CMemory::m_instance = NULL; \n }\n }\n };\n //-------\n\npublic:\n void *AllocMemory(int memCount,bool ifmemset);\n void FreeMemory(void *point);\n \n};\n\n#endif\n" (preproc_ifdef) "fndef __NGX_MEMORY_H__\n#define __NGX_MEMORY_H__\n\n#include <stddef.h> //NULL\n//内存相关类\nclass CMemory \n{\nprivate:\n CMemory() {} //构造函数,因为要做成单例类,所以是私有的构造函数\n\npublic:\n ~CMemory(){};\n\nprivate:\n static CMemory *m_instance;\n\npublic: \n static CMemory* GetInstance() //单例\n { \n if(m_instance == NULL)\n {\n //锁\n if(m_instance == NULL)\n { \n m_instance = new CMemory(); //第一次调用不应该放在线程中,应该放在主进程中,以免和其他线程调用冲突从而导致同时执行两次new CMemory()\n static CGarhuishou cl; \n }\n //放锁\n }\n return m_instance;\n } \n class CGarhuishou \n {\n public: \n ~CGarhuishou()\n {\n if (CMemory::m_instance)\n { \n delete CMemory::m_instance; //这个释放是整个系统退出的时候,系统来调用释放内存的哦\n CMemory::m_instance = NULL; \n }\n }\n };\n //-------\n\npublic:\n void *AllocMemory(int memCount,bool ifmemset);\n void FreeMemory(void *point);\n \n};\n\n#endif\n" (#ifndef) "fndef _" (identifier) "NGX_MEMORY_H__\n#" (preproc_def) "efine __NGX_MEMORY_H__\n\n#" (#define) "efine _" (identifier) "NGX_MEMORY_H__\n\n" (preproc_include) "nclude <stddef.h> //NULL\n//" (#include) "nclude <" (system_lib_string) "tddef.h> " (comment) "NULL\n/" (comment) "内存相关类\nclass CMemo" (function_definition) "y \n{\nprivate:\n CMemory() {} //构造函数,因为要做成单例类,所以是私有的构造函数\n\npublic:\n ~CMemory(){};\n\nprivate:\n static CMemory *m_instance;\n\npublic: \n static CMemory* GetInstance() //单例\n { \n if(m_instance == NULL)\n {\n //锁\n if(m_instance == NULL)\n { \n m_instance = new CMemory(); //第一次调用不应该放在线程中,应该放在主进程中,以免和其他线程调用冲突从而导致同时执行两次new CMemory()\n static CGarhuishou cl; \n }\n //放锁\n }\n return m_instance;\n } \n class CGarhuishou \n {\n public: \n ~CGarhuishou()\n {\n if (CMemory::m_instance)\n { \n delete CMemory::m_instance; //这个释放是整个系统退出的时候,系统来调用释放内存的哦\n CMemory::m_instance = NULL; \n }\n }\n };\n //-------\n\npublic:\n void *AllocMemory(int memCount,bool ifmemset);\n void FreeMemory(void *point);\n \n};\n\n#endif\n" (type_identifier) "y \n{\n" (identifier) "rivate:" (compound_statement) "CMemory() {} //构造函数,因为要做成单例类,所以是私有的构造函数\n\npublic:\n ~CMemory(){};\n\nprivate:\n static CMemory *m_instance;\n\npublic: \n static CMemory* GetInstance() //单例\n { \n if(m_instance == NULL)\n {\n //锁\n if(m_instance == NULL)\n { \n m_instance = new CMemory(); //第一次调用不应该放在线程中,应该放在主进程中,以免和其他线程调用冲突从而导致同时执行两次new CMemory()\n static CGarhuishou cl; \n }\n //放锁\n }\n return m_instance;\n } \n class CGarhuishou \n {\n public: \n ~CGarhuishou()\n {\n if (CMemory::m_instance)\n { \n delete CMemory::m_instance; //这个释放是整个系统退出的时候,系统来调用释放内存的哦\n CMemory::m_instance = NULL; \n }\n }\n };\n //-------\n\npublic:\n void *AllocMemory(int memCount,bool ifmemset);\n void FreeMemory(void *point);\n \n};\n\n#endif\n" ({) "C" (labeled_statement) "emory() {} //构造函数,因为要" (statement_identifier) "emory()" (:) " " (ERROR) " //构造函数," (call_expression) " //构造函数," (identifier) " //构造函" (argument_list) "数," (() "数" ()) "," (compound_statement) "为要" ({) "为" (}) "要" (comment) "单例类,所以是私有的构造函数\n\npublic:\n ~CMemory(){};\n\nprivate:\n static CMemory *m_instan" (labeled_statement) ";\n\npublic: \n static" (statement_identifier) ";\n\npub" (:) "l" (expression_statement) ": \n static" (unary_expression) ": \n static" (~) ":" (call_expression) " \n static" (identifier) " \n stat" (argument_list) "ic" (() "i" ()) "c" (;) "" (compound_statement) " C" ({) " " (}) "C" (expression_statement) "M" (;) "M" (labeled_statement) "ory* GetInstance() //单例\n { \n if(m_" (statement_identifier) "ory* Ge" (:) "t" (declaration) "stance() //单例\n { \n if(m_" (storage_class_specifier) "stance" (static) "stance" (type_identifier) ") //单例\n" (pointer_declarator) "{ \n if(m" (*) "{" (identifier) " \n if(m" (;) "_" (labeled_statement) "stance == NULL)\n {\n //锁\n if(m_instance == NULL)\n { \n m_instance = new CMemory(); //第一次调用不应该放在线程中,应该放在主进程中,以免和其他线程调用冲突从而导致同时执行两次new CMemory()\n static CGarhuishou cl; \n }\n //放锁\n }\n return m_instance;\n } \n class CGarhuishou \n {\n public: \n ~CGarhuishou()\n {\n if (CMemory::m_instance)\n { \n delete CMemory::m_instance; //这个释放是整个系统退出的时候,系统来调用释放内存的哦" (statement_identifier) "stance" (:) " " (ERROR) "NULL)\n {\n //锁\n if(m_inst" (storage_class_specifier) "NULL)\n" (static) "NULL)\n" (type_identifier) " {\n /" (pointer_declarator) "/锁\n if(m_inst" (*) "/" (function_declarator) "\n if(m_inst" (identifier) "\n if(m_in" (parameter_list) "st" (() "s" ()) "t" (comment) "nce == N" (compound_statement) "L)\n { \n m_instance = new CMemory(); //第一次调用不应该放在线程中,应该放在主进程中,以免和其他线程调用冲突从而导致同时执行两次new CMemory()\n static CGarhuishou cl; \n }\n //放锁\n }\n return m_instance;\n } \n class CGarhuishou \n {\n public: \n ~CGarhuishou()\n {\n if (CMemory::m_instance)\n { \n delete CMemory::m_instance; //这个释放是整个系统退出的时候,系统来调用释放内存的哦" ({) "L" (if_statement) " \n m_instance = new CMemory(); //第一次调用不应该放在线程中,应该放在主进程中,以免和其他线程调用冲突从而导致同时执行两次new CMemory()\n static CGarhuishou cl; \n }\n //放锁\n }\n return m_instance;\n } \n class CGarhuishou \n {\n public: \n ~CGarhuishou()\n {\n if (CMemory::m_instance)\n { \n delete CMemory::m_instance; //这个" (if) " " (parenthesized_expression) " \n m_instance = " (() " " (binary_expression) " \n m_instance =" (identifier) " \n m_in" (==) "ta" (null) "ce =" (NULL) "ce =" ()) " " (compound_statement) " CMemory(); //第一次调用不应该放在线程中,应该放在主进程中,以免和其他线程调用冲突从而导致同时执行两次new CMemory()\n static CGarhuishou cl; \n }\n //放锁\n }\n return m_instance;\n } \n class CGarhuishou \n {\n public: \n ~CGarhuishou()\n {\n if (CMemory::m_instance)\n { \n delete CMemory::m_instance; //这个" ({) " " (comment) "ory()" (if_statement) "第一次调用不应该放在线程中,应该放在主进程中,以免和其他线程调用冲突从而导致同时执行两次new CMemory()\n static CGarhuishou cl; \n }\n //放锁\n }\n return m_instance;\n } \n class CGarhuishou \n {\n public: \n ~CGarhuishou()\n {\n if (CMemory::m_instance)\n { \n delete CMemory::" (if) "第一" (parenthesized_expression) "次调用不应该放在线程中,应该放在主进程中" (() "次" (binary_expression) "调用不应该放在线程中,应该放在主进程" (identifier) "调用不应该放在线程中" (==) "应该" (null) "在主进程" (NULL) "在主进程" ()) "中" (compound_statement) "其他线程调用冲突从而导致同时执行两次new CMemory()\n static CGarhuishou cl; \n }\n //放锁\n }\n return m_instance;\n } \n class CGarhuishou \n {\n public: \n ~CGarhuishou()\n {\n if (CMemory::m_instance)\n { \n delete CMemory::" ({) "其" (expression_statement) "导致同时执行两次new CMemory()\n s" (assignment_expression) "导致同时执行两次new CMemory()\n " (identifier) "导致同时执行两次ne" (=) " " (ERROR) "Mem" (identifier) "Mem" (call_expression) "ry()\n " (identifier) "ry()\n " (argument_list) " " (() " " ()) " " (;) "s" (comment) "atic CGarhuishou cl; \n }\n //放锁\n }\n return m_instance;\n } \n class CGarhuishou \n {\n public: \n ~CGarhuishou()\n {\n if (CMemory::m_instance" (declaration) "{ \n delete CMe" (storage_class_specifier) "{ " (static) "{ " (type_identifier) "\n delete" (identifier) "CM" (;) "e" (}) ":" (comment) "stance; " (}) "个" (return_statement) "整个系统退出的时候,系统来调用释放内" (return) "整个系统退出" (identifier) "时候,系统来调用释放" (;) "内" (}) "哦" (function_definition) " CMemory::m_instance = NULL; \n }\n }\n };\n //-------\n\npublic:\n void *AllocMemory(int memCount,bool ifmemset);\n void FreeMemory(void *point);\n \n};\n\n#endif\n" (type_identifier) " CMe" (identifier) "ory::m_inst" (compound_statement) "e = NULL; \n }\n }\n };\n //-------\n\npublic:\n void *AllocMemory(int memCount,bool ifmemset);\n void FreeMemory(void *point);\n \n};\n\n#endif\n" ({) "e" (labeled_statement) " NULL; \n }\n }\n };\n //-" (statement_identifier) " NULL;" (:) " " (expression_statement) "}\n }\n };\n //-" (unary_expression) "}\n }\n };\n //-" (~) "}" (call_expression) "\n }\n };\n //-" (identifier) "\n }\n };\n /" (argument_list) "/-" (() "/" ()) "-" (;) "" (compound_statement) "---\n\npublic:\n void *AllocMemory(int memCount,bool ifmemset);\n void FreeMemory(void *point);\n \n};\n\n#endif\n" ({) "-" (if_statement) "public:\n void *AllocMemory(int memCount,bool ifmemset);\n void FreeMemory(void *point);\n \n};\n\n#endif\n" (if) "pu" (parenthesized_expression) "lic:\n void *AllocMemo" (() "l" (ERROR) "ic:\n void" (identifier) "ic:\n vo" (:) "i" (:) "d" (identifier) " *AllocMem" ()) "o" (compound_statement) "nt memCount,bool ifmemset);\n void FreeMemory(void *point);\n \n};\n\n#endif\n" ({) "n" (declaration) "bool ifmemset);\n void FreeM" (type_identifier) "bool i" (ERROR) "memset);\n" (identifier) "memset)" (:) ";" (:) "\n" (identifier) " void Free" (;) "M" (comment) "mory(void *point);\n \n};\n\n#endif\n" (labeled_statement) "" (statement_identifier) "" (:) "" (ERROR) "" (:) "" (expression_statement) "" (assignment_expression) "" (identifier) "" (=) "" (null) "" (NULL) "" (;) "" (}) "" (}) "" (}) "" (expression_statement) "" (;) "" (comment) "" (labeled_statement) "" (statement_identifier) "" (:) "" (declaration) "" (primitive_type) "" (pointer_declarator) "" (*) "" (function_declarator) "" (identifier) "" (parameter_list) "" (() "" (parameter_declaration) "" (primitive_type) "" (identifier) "" (,) "" (parameter_declaration) "" (primitive_type) "" (identifier) "" ()) "" (;) "" (declaration) "" (primitive_type) "" (function_declarator) "" (identifier) "" (parameter_list) "" (() "" (parameter_declaration) "" (primitive_type) "" (pointer_declarator) "" (*) "" (identifier) "" ()) "" (;) "" (}) "" (expression_statement) "" (;) "" (#endif) ""
222
6
{"language": "c", "success": true, "metadata": {"lines": 47, "avg_line_length": 16.38, "nodes": 119, "errors": 0, "source_hash": "527e6b21cf454fbac92743181c5a198493b197936a21e8e9f9e153434766ee94", "categorized_nodes": 75}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "fndef __NGX_MEMORY_H__\n#define __NGX_MEMORY_H__\n\n#include <stddef.h> //NULL\n//\u5185\u5b58\u76f8\u5173\u7c7b\nclass CMemory \n{\nprivate:\n\tCMemory() {} //\u6784\u9020\u51fd\u6570\uff0c\u56e0\u4e3a\u8981\u505a\u6210\u5355\u4f8b\u7c7b\uff0c\u6240\u4ee5\u662f\u79c1\u6709\u7684\u6784\u9020\u51fd\u6570\n\npublic:\n\t~CMemory(){};\n\nprivate:\n\tstatic CMemory *m_instance;\n\npublic:\t\n\tstatic CMemory* GetInstance() //\u5355\u4f8b\n\t{\t\t\t\n\t\tif(m_instance == NULL)\n\t\t{\n\t\t\t//\u9501\n\t\t\tif(m_instance == NULL)\n\t\t\t{\t\t\t\t\n\t\t\t\tm_instance = new CMemory(); //\u7b2c\u4e00\u6b21\u8c03\u7528\u4e0d\u5e94\u8be5\u653e\u5728\u7ebf\u7a0b\u4e2d\uff0c\u5e94\u8be5\u653e\u5728\u4e3b\u8fdb\u7a0b\u4e2d\uff0c\u4ee5\u514d\u548c\u5176\u4ed6\u7ebf\u7a0b\u8c03\u7528\u51b2\u7a81\u4ece\u800c\u5bfc\u81f4\u540c\u65f6\u6267\u884c\u4e24\u6b21new CMemory()\n\t\t\t\tstatic CGarhuishou cl; \n\t\t\t}\n\t\t\t//\u653e\u9501\n\t\t}\n\t\treturn m_instance;\n\t}\t\n\tclass CGarhuishou \n\t{\n\tpublic:\t\t\t\t\n\t\t~CGarhuishou()\n\t\t{\n\t\t\tif (CMemory::m_instance)\n\t\t\t{\t\t\t\t\t\t\n\t\t\t\tdelete CMemory::m_instance; //\u8fd9\u4e2a\u91ca\u653e\u662f\u6574\u4e2a\u7cfb\u7edf\u9000\u51fa\u7684\u65f6\u5019\uff0c\u7cfb\u7edf\u6765\u8c03\u7528\u91ca\u653e\u5185\u5b58\u7684\u54e6\n\t\t\t\tCMemory::m_instance = NULL;\t\t\t\t\n\t\t\t}\n\t\t}\n\t};\n\t//-------\n\npublic:\n\tvoid *AllocMemory(int memCount,bool ifmemset);\n\tvoid FreeMemory(void *point);\n\t\n};\n\n#endif\n", "parent": null, "children": [1, 2, 3, 6, 9, 118], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "fndef _", "parent": 0, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 2, "type": "identifier", "text": "NGX_MEMORY_H__\n#", "parent": 0, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 24}}, {"id": 3, "type": "preproc_def", "text": "efine __NGX_MEMORY_H__\n\n#", "parent": 0, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 4, "type": "#define", "text": "efine _", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 5, "type": "identifier", "text": "NGX_MEMORY_H__\n\n", "parent": 3, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "nclude <stddef.h> //NULL\n//", "parent": 0, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 7, "type": "#include", "text": "nclude <", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "tddef.h> ", "parent": 6, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 9, "type": "function_definition", "text": "y \n{\nprivate:\n\tCMemory() {} //\u6784\u9020\u51fd\u6570\uff0c\u56e0\u4e3a\u8981\u505a\u6210\u5355\u4f8b\u7c7b\uff0c\u6240\u4ee5\u662f\u79c1\u6709\u7684\u6784\u9020\u51fd\u6570\n\npublic:\n\t~CMemory(){};\n\nprivate:\n\tstatic CMemory *m_instance;\n\npublic:\t\n\tstatic CMemory* GetInstance() //\u5355\u4f8b\n\t{\t\t\t\n\t\tif(m_instance == NULL)\n\t\t{\n\t\t\t//\u9501\n\t\t\tif(m_instance == NULL)\n\t\t\t{\t\t\t\t\n\t\t\t\tm_instance = new CMemory(); //\u7b2c\u4e00\u6b21\u8c03\u7528\u4e0d\u5e94\u8be5\u653e\u5728\u7ebf\u7a0b\u4e2d\uff0c\u5e94\u8be5\u653e\u5728\u4e3b\u8fdb\u7a0b\u4e2d\uff0c\u4ee5\u514d\u548c\u5176\u4ed6\u7ebf\u7a0b\u8c03\u7528\u51b2\u7a81\u4ece\u800c\u5bfc\u81f4\u540c\u65f6\u6267\u884c\u4e24\u6b21new CMemory()\n\t\t\t\tstatic CGarhuishou cl; \n\t\t\t}\n\t\t\t//\u653e\u9501\n\t\t}\n\t\treturn m_instance;\n\t}\t\n\tclass CGarhuishou \n\t{\n\tpublic:\t\t\t\t\n\t\t~CGarhuishou()\n\t\t{\n\t\t\tif (CMemory::m_instance)\n\t\t\t{\t\t\t\t\t\t\n\t\t\t\tdelete CMemory::m_instance; //\u8fd9\u4e2a\u91ca\u653e\u662f\u6574\u4e2a\u7cfb\u7edf\u9000\u51fa\u7684\u65f6\u5019\uff0c\u7cfb\u7edf\u6765\u8c03\u7528\u91ca\u653e\u5185\u5b58\u7684\u54e6\n\t\t\t\tCMemory::m_instance = NULL;\t\t\t\t\n\t\t\t}\n\t\t}\n\t};\n\t//-------\n\npublic:\n\tvoid *AllocMemory(int memCount,bool ifmemset);\n\tvoid FreeMemory(void *point);\n\t\n};\n\n#endif\n", "parent": 0, "children": [10, 11], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "y \n{\n", "parent": 9, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 5}}, {"id": 11, "type": "identifier", "text": "rivate:", "parent": 9, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 13}}, {"id": 12, "type": "labeled_statement", "text": "emory() {} //\u6784\u9020\u51fd\u6570\uff0c\u56e0\u4e3a\u8981", "parent": 9, "children": [13, 14], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 13}}, {"id": 13, "type": "statement_identifier", "text": "emory()", "parent": 12, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 14, "type": "ERROR", "text": " //\u6784\u9020\u51fd\u6570\uff0c", "parent": 12, "children": [15], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 10}}, {"id": 15, "type": "call_expression", "text": " //\u6784\u9020\u51fd\u6570\uff0c", "parent": 14, "children": [16, 17], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 10}}, {"id": 16, "type": "identifier", "text": " //\u6784\u9020\u51fd", "parent": 15, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 8}}, {"id": 17, "type": "argument_list", "text": "\u6570\uff0c", "parent": 15, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 10}}, {"id": 18, "type": "labeled_statement", "text": ";\n\npublic:\t\n\tstatic", "parent": 9, "children": [19], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 11}}, {"id": 19, "type": "statement_identifier", "text": ";\n\npub", "parent": 18, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 20, "type": "unary_expression", "text": ":\t\n\tstatic", "parent": 18, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 11}}, {"id": 21, "type": "identifier", "text": "\t\n\tstat", "parent": 20, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 9}}, {"id": 22, "type": "argument_list", "text": "ic", "parent": 20, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 11}}, {"id": 23, "type": "labeled_statement", "text": "ory* GetInstance() //\u5355\u4f8b\n\t{\t\t\t\n\t\tif(m_", "parent": 9, "children": [24, 25], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 28}}, {"id": 24, "type": "statement_identifier", "text": "ory* Ge", "parent": 23, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 25, "type": "declaration", "text": "stance() //\u5355\u4f8b\n\t{\t\t\t\n\t\tif(m_", "parent": 23, "children": [26, 27, 28], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 28}}, {"id": 26, "type": "storage_class_specifier", "text": "stance", "parent": 25, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 7}}, {"id": 27, "type": "type_identifier", "text": ") //\u5355\u4f8b\n", "parent": 25, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 15}}, {"id": 28, "type": "pointer_declarator", "text": "{\t\t\t\n\t\tif(m", "parent": 25, "children": [29], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 27}}, {"id": 29, "type": "identifier", "text": "\t\t\t\n\t\tif(m", "parent": 28, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 27}}, {"id": 30, "type": "labeled_statement", "text": "stance == NULL)\n\t\t{\n\t\t\t//\u9501\n\t\t\tif(m_instance == NULL)\n\t\t\t{\t\t\t\t\n\t\t\t\tm_instance = new CMemory(); //\u7b2c\u4e00\u6b21\u8c03\u7528\u4e0d\u5e94\u8be5\u653e\u5728\u7ebf\u7a0b\u4e2d\uff0c\u5e94\u8be5\u653e\u5728\u4e3b\u8fdb\u7a0b\u4e2d\uff0c\u4ee5\u514d\u548c\u5176\u4ed6\u7ebf\u7a0b\u8c03\u7528\u51b2\u7a81\u4ece\u800c\u5bfc\u81f4\u540c\u65f6\u6267\u884c\u4e24\u6b21new CMemory()\n\t\t\t\tstatic CGarhuishou cl; \n\t\t\t}\n\t\t\t//\u653e\u9501\n\t\t}\n\t\treturn m_instance;\n\t}\t\n\tclass CGarhuishou \n\t{\n\tpublic:\t\t\t\t\n\t\t~CGarhuishou()\n\t\t{\n\t\t\tif (CMemory::m_instance)\n\t\t\t{\t\t\t\t\t\t\n\t\t\t\tdelete CMemory::m_instance; //\u8fd9\u4e2a\u91ca\u653e\u662f\u6574\u4e2a\u7cfb\u7edf\u9000\u51fa\u7684\u65f6\u5019\uff0c\u7cfb\u7edf\u6765\u8c03\u7528\u91ca\u653e\u5185\u5b58\u7684\u54e6", "parent": 9, "children": [31, 32], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 31, "column": 2}}, {"id": 31, "type": "statement_identifier", "text": "stance", "parent": 30, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 32, "type": "ERROR", "text": "NULL)\n\t\t{\n\t\t\t//\u9501\n\t\t\tif(m_inst", "parent": 30, "children": [33, 34, 35], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 30}}, {"id": 33, "type": "storage_class_specifier", "text": "NULL)\n", "parent": 32, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 7}}, {"id": 34, "type": "type_identifier", "text": "\t{\n\t\t\t/", "parent": 32, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 15}}, {"id": 35, "type": "pointer_declarator", "text": "/\u9501\n\t\t\tif(m_inst", "parent": 32, "children": [36, 37], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 30}}, {"id": 36, "type": "*", "text": "/", "parent": 35, "children": [], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 16}}, {"id": 37, "type": "function_declarator", "text": "\n\t\t\tif(m_inst", "parent": 35, "children": [38, 39], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 30}}, {"id": 38, "type": "identifier", "text": "\n\t\t\tif(m_in", "parent": 37, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 28}}, {"id": 39, "type": "parameter_list", "text": "st", "parent": 37, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 30}}, {"id": 40, "type": "if_statement", "text": "\t\t\t\t\n\t\t\t\tm_instance = new CMemory(); //\u7b2c\u4e00\u6b21\u8c03\u7528\u4e0d\u5e94\u8be5\u653e\u5728\u7ebf\u7a0b\u4e2d\uff0c\u5e94\u8be5\u653e\u5728\u4e3b\u8fdb\u7a0b\u4e2d\uff0c\u4ee5\u514d\u548c\u5176\u4ed6\u7ebf\u7a0b\u8c03\u7528\u51b2\u7a81\u4ece\u800c\u5bfc\u81f4\u540c\u65f6\u6267\u884c\u4e24\u6b21new CMemory()\n\t\t\t\tstatic CGarhuishou cl; \n\t\t\t}\n\t\t\t//\u653e\u9501\n\t\t}\n\t\treturn m_instance;\n\t}\t\n\tclass CGarhuishou \n\t{\n\tpublic:\t\t\t\t\n\t\t~CGarhuishou()\n\t\t{\n\t\t\tif (CMemory::m_instance)\n\t\t\t{\t\t\t\t\t\t\n\t\t\t\tdelete CMemory::m_instance; //\u8fd9\u4e2a", "parent": 30, "children": [41], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 29, "column": 3}}, {"id": 41, "type": "parenthesized_expression", "text": "\t\t\n\t\t\t\tm_instance = ", "parent": 40, "children": [42], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 24}}, {"id": 42, "type": "binary_expression", "text": "\t\n\t\t\t\tm_instance =", "parent": 41, "children": [43, 44, 45], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 23}}, {"id": 43, "type": "identifier", "text": "\t\n\t\t\t\tm_in", "parent": 42, "children": [], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 15}}, {"id": 44, "type": "==", "text": "ta", "parent": 42, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 18}}, {"id": 45, "type": "null", "text": "ce =", "parent": 42, "children": [46], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 23}}, {"id": 46, "type": "NULL", "text": "ce =", "parent": 45, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 23}}, {"id": 47, "type": "if_statement", "text": "\u7b2c\u4e00\u6b21\u8c03\u7528\u4e0d\u5e94\u8be5\u653e\u5728\u7ebf\u7a0b\u4e2d\uff0c\u5e94\u8be5\u653e\u5728\u4e3b\u8fdb\u7a0b\u4e2d\uff0c\u4ee5\u514d\u548c\u5176\u4ed6\u7ebf\u7a0b\u8c03\u7528\u51b2\u7a81\u4ece\u800c\u5bfc\u81f4\u540c\u65f6\u6267\u884c\u4e24\u6b21new CMemory()\n\t\t\t\tstatic CGarhuishou cl; \n\t\t\t}\n\t\t\t//\u653e\u9501\n\t\t}\n\t\treturn m_instance;\n\t}\t\n\tclass CGarhuishou \n\t{\n\tpublic:\t\t\t\t\n\t\t~CGarhuishou()\n\t\t{\n\t\t\tif (CMemory::m_instance)\n\t\t\t{\t\t\t\t\t\t\n\t\t\t\tdelete CMemory::", "parent": 40, "children": [48], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 27, "column": 4}}, {"id": 48, "type": "parenthesized_expression", "text": "\u6b21\u8c03\u7528\u4e0d\u5e94\u8be5\u653e\u5728\u7ebf\u7a0b\u4e2d\uff0c\u5e94\u8be5\u653e\u5728\u4e3b\u8fdb\u7a0b\u4e2d", "parent": 47, "children": [49], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 25}}, {"id": 49, "type": "binary_expression", "text": "\u8c03\u7528\u4e0d\u5e94\u8be5\u653e\u5728\u7ebf\u7a0b\u4e2d\uff0c\u5e94\u8be5\u653e\u5728\u4e3b\u8fdb\u7a0b", "parent": 48, "children": [50, 51, 52], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 24}}, {"id": 50, "type": "identifier", "text": "\u8c03\u7528\u4e0d\u5e94\u8be5\u653e\u5728\u7ebf\u7a0b\u4e2d", "parent": 49, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 16}}, {"id": 51, "type": "==", "text": "\u5e94\u8be5", "parent": 49, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 19}}, {"id": 52, "type": "null", "text": "\u5728\u4e3b\u8fdb\u7a0b", "parent": 49, "children": [53], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 24}}, {"id": 53, "type": "NULL", "text": "\u5728\u4e3b\u8fdb\u7a0b", "parent": 52, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 24}}, {"id": 54, "type": "assignment_expression", "text": "\u5bfc\u81f4\u540c\u65f6\u6267\u884c\u4e24\u6b21new CMemory()\n\t\t\t\t", "parent": 47, "children": [55, 56, 57, 59], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 30}}, {"id": 55, "type": "identifier", "text": "\u5bfc\u81f4\u540c\u65f6\u6267\u884c\u4e24\u6b21ne", "parent": 54, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 14}}, {"id": 56, "type": "=", "text": " ", "parent": 54, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 16}}, {"id": 57, "type": "ERROR", "text": "Mem", "parent": 54, "children": [58], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 20}}, {"id": 58, "type": "identifier", "text": "Mem", "parent": 57, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 20}}, {"id": 59, "type": "call_expression", "text": "ry()\n\t\t\t\t", "parent": 54, "children": [60, 61], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 30}}, {"id": 60, "type": "identifier", "text": "ry()\n\t\t", "parent": 59, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 28}}, {"id": 61, "type": "argument_list", "text": "\t\t", "parent": 59, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 30}}, {"id": 62, "type": "declaration", "text": "{\t\t\t\t\t\t\n\t\t\t\tdelete CMe", "parent": 47, "children": [63], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 26}}, {"id": 63, "type": "identifier", "text": "CM", "parent": 62, "children": [], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 25}}, {"id": 64, "type": "return_statement", "text": "\u6574\u4e2a\u7cfb\u7edf\u9000\u51fa\u7684\u65f6\u5019\uff0c\u7cfb\u7edf\u6765\u8c03\u7528\u91ca\u653e\u5185", "parent": 30, "children": [65], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 20}}, {"id": 65, "type": "identifier", "text": "\u65f6\u5019\uff0c\u7cfb\u7edf\u6765\u8c03\u7528\u91ca\u653e", "parent": 64, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 19}}, {"id": 66, "type": "function_definition", "text": "\t\tCMemory::m_instance = NULL;\t\t\t\t\n\t\t\t}\n\t\t}\n\t};\n\t//-------\n\npublic:\n\tvoid *AllocMemory(int memCount,bool ifmemset);\n\tvoid FreeMemory(void *point);\n\t\n};\n\n#endif\n", "parent": 9, "children": [67, 68], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 43, "column": 2}}, {"id": 67, "type": "type_identifier", "text": "\t\tCMe", "parent": 66, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 6}}, {"id": 68, "type": "identifier", "text": "ory::m_inst", "parent": 66, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 18}}, {"id": 69, "type": "labeled_statement", "text": " NULL;\t\t\t\t\n\t\t\t}\n\t\t}\n\t};\n\t//-", "parent": 66, "children": [70], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 35, "column": 16}}, {"id": 70, "type": "statement_identifier", "text": " NULL;", "parent": 69, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 7}}, {"id": 71, "type": "unary_expression", "text": "}\n\t\t}\n\t};\n\t//-", "parent": 69, "children": [72], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 16}}, {"id": 72, "type": "call_expression", "text": "\n\t\t}\n\t};\n\t//-", "parent": 71, "children": [73, 74], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 16}}, {"id": 73, "type": "identifier", "text": "\n\t\t}\n\t};\n\t/", "parent": 72, "children": [], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 14}}, {"id": 74, "type": "argument_list", "text": "/-", "parent": 72, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 16}}, {"id": 75, "type": "if_statement", "text": "public:\n\tvoid *AllocMemory(int memCount,bool ifmemset);\n\tvoid FreeMemory(void *point);\n\t\n};\n\n#endif\n", "parent": 66, "children": [76], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 41, "column": 4}}, {"id": 76, "type": "parenthesized_expression", "text": "lic:\n\tvoid *AllocMemo", "parent": 75, "children": [77, 79], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 27}}, {"id": 77, "type": "ERROR", "text": "ic:\n\tvoid", "parent": 76, "children": [78], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 16}}, {"id": 78, "type": "identifier", "text": "ic:\n\tvo", "parent": 77, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 14}}, {"id": 79, "type": "identifier", "text": " *AllocMem", "parent": 76, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 26}}, {"id": 80, "type": "declaration", "text": "bool ifmemset);\n\tvoid FreeM", "parent": 75, "children": [81, 82, 84], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 31}}, {"id": 81, "type": "type_identifier", "text": "bool i", "parent": 80, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 10}}, {"id": 82, "type": "ERROR", "text": "memset);\n", "parent": 80, "children": [83], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 20}}, {"id": 83, "type": "identifier", "text": "memset)", "parent": 82, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 18}}, {"id": 84, "type": "identifier", "text": "\tvoid Free", "parent": 80, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 30}}, {"id": 85, "type": "labeled_statement", "text": "", "parent": 75, "children": [86, 87], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 31}}, {"id": 86, "type": "statement_identifier", "text": "", "parent": 85, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 11}}, {"id": 87, "type": "ERROR", "text": "", "parent": 85, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 13}}, {"id": 88, "type": "assignment_expression", "text": "", "parent": 85, "children": [89, 90, 91], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 30}}, {"id": 89, "type": "identifier", "text": "", "parent": 88, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 23}}, {"id": 90, "type": "=", "text": "", "parent": 88, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 25}}, {"id": 91, "type": "null", "text": "", "parent": 88, "children": [92], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 30}}, {"id": 92, "type": "NULL", "text": "", "parent": 91, "children": [], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 30}}, {"id": 93, "type": "labeled_statement", "text": "", "parent": 9, "children": [94, 95], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 47}}, {"id": 94, "type": "statement_identifier", "text": "", "parent": 93, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 95, "type": "declaration", "text": "", "parent": 93, "children": [96, 97], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 47}}, {"id": 96, "type": "primitive_type", "text": "", "parent": 95, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 5}}, {"id": 97, "type": "pointer_declarator", "text": "", "parent": 95, "children": [98, 99], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 46}}, {"id": 98, "type": "*", "text": "", "parent": 97, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 7}}, {"id": 99, "type": "function_declarator", "text": "", "parent": 97, "children": [100, 101], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 46}}, {"id": 100, "type": "identifier", "text": "", "parent": 99, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 18}}, {"id": 101, "type": "parameter_list", "text": "", "parent": 99, "children": [102, 105], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 46}}, {"id": 102, "type": "parameter_declaration", "text": "", "parent": 101, "children": [103, 104], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 31}}, {"id": 103, "type": "primitive_type", "text": "", "parent": 102, "children": [], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 22}}, {"id": 104, "type": "identifier", "text": "", "parent": 102, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 31}}, {"id": 105, "type": "parameter_declaration", "text": "", "parent": 101, "children": [106, 107], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 45}}, {"id": 106, "type": "primitive_type", "text": "", "parent": 105, "children": [], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 36}}, {"id": 107, "type": "identifier", "text": "", "parent": 105, "children": [], "start_point": {"row": 47, "column": 37}, "end_point": {"row": 47, "column": 45}}, {"id": 108, "type": "declaration", "text": "", "parent": 9, "children": [109, 110], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 30}}, {"id": 109, "type": "primitive_type", "text": "", "parent": 108, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 5}}, {"id": 110, "type": "function_declarator", "text": "", "parent": 108, "children": [111, 112], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 29}}, {"id": 111, "type": "identifier", "text": "", "parent": 110, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 16}}, {"id": 112, "type": "parameter_list", "text": "", "parent": 110, "children": [113], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 29}}, {"id": 113, "type": "parameter_declaration", "text": "", "parent": 112, "children": [114, 115], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 28}}, {"id": 114, "type": "primitive_type", "text": "", "parent": 113, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 21}}, {"id": 115, "type": "pointer_declarator", "text": "", "parent": 113, "children": [116, 117], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 28}}, {"id": 116, "type": "*", "text": "", "parent": 115, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 23}}, {"id": 117, "type": "identifier", "text": "", "parent": 115, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 28}}, {"id": 118, "type": "#endif", "text": "", "parent": 0, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9, 37, 66, 99, 110], "variables": [25, 62, 80, 95, 102, 105, 108, 113], "classes": [26, 33], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [15, 20, 41, 42, 48, 49, 59, 71, 72, 76], "assignments": [54, 88], "loops": [], "conditionals": [0, 1, 2, 5, 10, 11, 13, 16, 19, 21, 24, 27, 29, 31, 34, 38, 40, 43, 47, 50, 55, 58, 60, 63, 65, 67, 68, 70, 73, 75, 78, 79, 81, 83, 84, 86, 89, 94, 100, 104, 107, 111, 117, 118], "returns": [64], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "CGarhuishou", "text_snippet": "y \n{\nprivate:\n\tCMemory() {} //\u6784\u9020\u51fd\u6570\uff0c\u56e0\u4e3a\u8981\u505a\u6210\u5355\u4f8b\u7c7b\uff0c\u6240\u4ee5\u662f\u79c1\u6709\u7684\u6784\u9020\u51fd\u6570\n\npublic:\n\t~CMemory(){};\n\nprivate:\n\tstatic CM"}, {"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "\n\t\t\tif(m_inst"}, {"node_id": 66, "universal_type": "function", "name": "*AllocMemory", "text_snippet": "\t\tCMemory::m_instance = NULL;\t\t\t\t\n\t\t\t}\n\t\t}\n\t};\n\t//-------\n\npublic:\n\tvoid *AllocMemory(int memCount,b"}], "class_declarations": [{"node_id": 26, "universal_type": "class", "name": "unknown", "text_snippet": "stance"}, {"node_id": 33, "universal_type": "class", "name": "unknown", "text_snippet": "NULL)\n"}], "import_statements": [{"node_id": 6, "text": "nclude <stddef.h> //NULL\n//"}, {"node_id": 7, "text": "nclude <"}]}, "original_source_code": "\ufeff\n#ifndef __NGX_MEMORY_H__\n#define __NGX_MEMORY_H__\n\n#include <stddef.h> //NULL\n//\u5185\u5b58\u76f8\u5173\u7c7b\nclass CMemory \n{\nprivate:\n\tCMemory() {} //\u6784\u9020\u51fd\u6570\uff0c\u56e0\u4e3a\u8981\u505a\u6210\u5355\u4f8b\u7c7b\uff0c\u6240\u4ee5\u662f\u79c1\u6709\u7684\u6784\u9020\u51fd\u6570\n\npublic:\n\t~CMemory(){};\n\nprivate:\n\tstatic CMemory *m_instance;\n\npublic:\t\n\tstatic CMemory* GetInstance() //\u5355\u4f8b\n\t{\t\t\t\n\t\tif(m_instance == NULL)\n\t\t{\n\t\t\t//\u9501\n\t\t\tif(m_instance == NULL)\n\t\t\t{\t\t\t\t\n\t\t\t\tm_instance = new CMemory(); //\u7b2c\u4e00\u6b21\u8c03\u7528\u4e0d\u5e94\u8be5\u653e\u5728\u7ebf\u7a0b\u4e2d\uff0c\u5e94\u8be5\u653e\u5728\u4e3b\u8fdb\u7a0b\u4e2d\uff0c\u4ee5\u514d\u548c\u5176\u4ed6\u7ebf\u7a0b\u8c03\u7528\u51b2\u7a81\u4ece\u800c\u5bfc\u81f4\u540c\u65f6\u6267\u884c\u4e24\u6b21new CMemory()\n\t\t\t\tstatic CGarhuishou cl; \n\t\t\t}\n\t\t\t//\u653e\u9501\n\t\t}\n\t\treturn m_instance;\n\t}\t\n\tclass CGarhuishou \n\t{\n\tpublic:\t\t\t\t\n\t\t~CGarhuishou()\n\t\t{\n\t\t\tif (CMemory::m_instance)\n\t\t\t{\t\t\t\t\t\t\n\t\t\t\tdelete CMemory::m_instance; //\u8fd9\u4e2a\u91ca\u653e\u662f\u6574\u4e2a\u7cfb\u7edf\u9000\u51fa\u7684\u65f6\u5019\uff0c\u7cfb\u7edf\u6765\u8c03\u7528\u91ca\u653e\u5185\u5b58\u7684\u54e6\n\t\t\t\tCMemory::m_instance = NULL;\t\t\t\t\n\t\t\t}\n\t\t}\n\t};\n\t//-------\n\npublic:\n\tvoid *AllocMemory(int memCount,bool ifmemset);\n\tvoid FreeMemory(void *point);\n\t\n};\n\n#endif\n"}
335
c
#include<stdio.h> void main() { int a; printf("a :"); scanf("%d", a); printf("%s\n", (a < 20) ? "true" : "false"); printf("%s\n", (a > 20) ? "true" : "false"); printf("%s\n", (a <= 20) ? "true" : "false"); printf("%s\n", (a >= 20) ? "true" : "false"); printf("%s\n", (a == 20) ? "true" : "false"); printf("%s\n", (a != 20) ? "true" : "false"); }
28.38
13
(translation_unit) "#include<stdio.h>\n\nvoid main()\n{\n int a;\n printf("a :");\n scanf("%d", a);\n printf("%s\n", (a < 20) ? "true" : "false");\n printf("%s\n", (a > 20) ? "true" : "false");\n printf("%s\n", (a <= 20) ? "true" : "false");\n printf("%s\n", (a >= 20) ? "true" : "false");\n printf("%s\n", (a == 20) ? "true" : "false");\n printf("%s\n", (a != 20) ? "true" : "false");\n}" (preproc_include) "#include<stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (function_definition) "void main()\n{\n int a;\n printf("a :");\n scanf("%d", a);\n printf("%s\n", (a < 20) ? "true" : "false");\n printf("%s\n", (a > 20) ? "true" : "false");\n printf("%s\n", (a <= 20) ? "true" : "false");\n printf("%s\n", (a >= 20) ? "true" : "false");\n printf("%s\n", (a == 20) ? "true" : "false");\n printf("%s\n", (a != 20) ? "true" : "false");\n}" (primitive_type) "void" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n int a;\n printf("a :");\n scanf("%d", a);\n printf("%s\n", (a < 20) ? "true" : "false");\n printf("%s\n", (a > 20) ? "true" : "false");\n printf("%s\n", (a <= 20) ? "true" : "false");\n printf("%s\n", (a >= 20) ? "true" : "false");\n printf("%s\n", (a == 20) ? "true" : "false");\n printf("%s\n", (a != 20) ? "true" : "false");\n}" ({) "{" (declaration) "int a;" (primitive_type) "int" (identifier) "a" (;) ";" (expression_statement) "printf("a :");" (call_expression) "printf("a :")" (identifier) "printf" (argument_list) "("a :")" (() "(" (string_literal) ""a :"" (") """ (string_content) "a :" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%d", a);" (call_expression) "scanf("%d", a)" (identifier) "scanf" (argument_list) "("%d", a)" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (identifier) "a" ()) ")" (;) ";" (expression_statement) "printf("%s\n", (a < 20) ? "true" : "false");" (call_expression) "printf("%s\n", (a < 20) ? "true" : "false")" (identifier) "printf" (argument_list) "("%s\n", (a < 20) ? "true" : "false")" (() "(" (string_literal) ""%s\n"" (") """ (string_content) "%s" (escape_sequence) "\n" (") """ (,) "," (conditional_expression) "(a < 20) ? "true" : "false"" (parenthesized_expression) "(a < 20)" (() "(" (binary_expression) "a < 20" (identifier) "a" (<) "<" (number_literal) "20" ()) ")" (?) "?" (string_literal) ""true"" (") """ (string_content) "true" (") """ (:) ":" (string_literal) ""false"" (") """ (string_content) "false" (") """ ()) ")" (;) ";" (expression_statement) "printf("%s\n", (a > 20) ? "true" : "false");" (call_expression) "printf("%s\n", (a > 20) ? "true" : "false")" (identifier) "printf" (argument_list) "("%s\n", (a > 20) ? "true" : "false")" (() "(" (string_literal) ""%s\n"" (") """ (string_content) "%s" (escape_sequence) "\n" (") """ (,) "," (conditional_expression) "(a > 20) ? "true" : "false"" (parenthesized_expression) "(a > 20)" (() "(" (binary_expression) "a > 20" (identifier) "a" (>) ">" (number_literal) "20" ()) ")" (?) "?" (string_literal) ""true"" (") """ (string_content) "true" (") """ (:) ":" (string_literal) ""false"" (") """ (string_content) "false" (") """ ()) ")" (;) ";" (expression_statement) "printf("%s\n", (a <= 20) ? "true" : "false");" (call_expression) "printf("%s\n", (a <= 20) ? "true" : "false")" (identifier) "printf" (argument_list) "("%s\n", (a <= 20) ? "true" : "false")" (() "(" (string_literal) ""%s\n"" (") """ (string_content) "%s" (escape_sequence) "\n" (") """ (,) "," (conditional_expression) "(a <= 20) ? "true" : "false"" (parenthesized_expression) "(a <= 20)" (() "(" (binary_expression) "a <= 20" (identifier) "a" (<=) "<=" (number_literal) "20" ()) ")" (?) "?" (string_literal) ""true"" (") """ (string_content) "true" (") """ (:) ":" (string_literal) ""false"" (") """ (string_content) "false" (") """ ()) ")" (;) ";" (expression_statement) "printf("%s\n", (a >= 20) ? "true" : "false");" (call_expression) "printf("%s\n", (a >= 20) ? "true" : "false")" (identifier) "printf" (argument_list) "("%s\n", (a >= 20) ? "true" : "false")" (() "(" (string_literal) ""%s\n"" (") """ (string_content) "%s" (escape_sequence) "\n" (") """ (,) "," (conditional_expression) "(a >= 20) ? "true" : "false"" (parenthesized_expression) "(a >= 20)" (() "(" (binary_expression) "a >= 20" (identifier) "a" (>=) ">=" (number_literal) "20" ()) ")" (?) "?" (string_literal) ""true"" (") """ (string_content) "true" (") """ (:) ":" (string_literal) ""false"" (") """ (string_content) "false" (") """ ()) ")" (;) ";" (expression_statement) "printf("%s\n", (a == 20) ? "true" : "false");" (call_expression) "printf("%s\n", (a == 20) ? "true" : "false")" (identifier) "printf" (argument_list) "("%s\n", (a == 20) ? "true" : "false")" (() "(" (string_literal) ""%s\n"" (") """ (string_content) "%s" (escape_sequence) "\n" (") """ (,) "," (conditional_expression) "(a == 20) ? "true" : "false"" (parenthesized_expression) "(a == 20)" (() "(" (binary_expression) "a == 20" (identifier) "a" (==) "==" (number_literal) "20" ()) ")" (?) "?" (string_literal) ""true"" (") """ (string_content) "true" (") """ (:) ":" (string_literal) ""false"" (") """ (string_content) "false" (") """ ()) ")" (;) ";" (expression_statement) "printf("%s\n", (a != 20) ? "true" : "false");" (call_expression) "printf("%s\n", (a != 20) ? "true" : "false")" (identifier) "printf" (argument_list) "("%s\n", (a != 20) ? "true" : "false")" (() "(" (string_literal) ""%s\n"" (") """ (string_content) "%s" (escape_sequence) "\n" (") """ (,) "," (conditional_expression) "(a != 20) ? "true" : "false"" (parenthesized_expression) "(a != 20)" (() "(" (binary_expression) "a != 20" (identifier) "a" (!=) "!=" (number_literal) "20" ()) ")" (?) "?" (string_literal) ""true"" (") """ (string_content) "true" (") """ (:) ":" (string_literal) ""false"" (") """ (string_content) "false" (") """ ()) ")" (;) ";" (}) "}"
228
0
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 28.38, "nodes": 104, "errors": 0, "source_hash": "5a7f1e9fbf757d53446e7355688950b3e18b220117d6264c760d2cf1b104f013", "categorized_nodes": 75}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 17}}, {"id": 3, "type": "function_definition", "text": "void main()\n{\n int a;\n printf(\"a :\");\n scanf(\"%d\", a);\n printf(\"%s\\n\", (a < 20) ? \"true\" : \"false\");\n printf(\"%s\\n\", (a > 20) ? \"true\" : \"false\");\n printf(\"%s\\n\", (a <= 20) ? \"true\" : \"false\");\n printf(\"%s\\n\", (a >= 20) ? \"true\" : \"false\");\n printf(\"%s\\n\", (a == 20) ? \"true\" : \"false\");\n printf(\"%s\\n\", (a != 20) ? \"true\" : \"false\");\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "void", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 4}}, {"id": 5, "type": "function_declarator", "text": "main()", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 11}}, {"id": 6, "type": "identifier", "text": "main", "parent": 5, "children": [], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 9}}, {"id": 7, "type": "parameter_list", "text": "()", "parent": 5, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 11}}, {"id": 8, "type": "declaration", "text": "int a;", "parent": 3, "children": [9, 10], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 10}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 7}}, {"id": 10, "type": "identifier", "text": "a", "parent": 8, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 9}}, {"id": 11, "type": "call_expression", "text": "printf(\"a :\")", "parent": 3, "children": [12, 13], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 17}}, {"id": 12, "type": "identifier", "text": "printf", "parent": 11, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 10}}, {"id": 13, "type": "argument_list", "text": "(\"a :\")", "parent": 11, "children": [14], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 17}}, {"id": 14, "type": "string_literal", "text": "\"a :\"", "parent": 13, "children": [], "start_point": {"row": 5, "column": 11}, "end_point": {"row": 5, "column": 16}}, {"id": 15, "type": "call_expression", "text": "scanf(\"%d\", a)", "parent": 3, "children": [16, 17], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 18}}, {"id": 16, "type": "identifier", "text": "scanf", "parent": 15, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 9}}, {"id": 17, "type": "argument_list", "text": "(\"%d\", a)", "parent": 15, "children": [18, 19], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 18}}, {"id": 18, "type": "string_literal", "text": "\"%d\"", "parent": 17, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 14}}, {"id": 19, "type": "identifier", "text": "a", "parent": 17, "children": [], "start_point": {"row": 6, "column": 16}, "end_point": {"row": 6, "column": 17}}, {"id": 20, "type": "call_expression", "text": "printf(\"%s\\n\", (a < 20) ? \"true\" : \"false\")", "parent": 3, "children": [21, 22], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 47}}, {"id": 21, "type": "identifier", "text": "printf", "parent": 20, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 10}}, {"id": 22, "type": "argument_list", "text": "(\"%s\\n\", (a < 20) ? \"true\" : \"false\")", "parent": 20, "children": [23, 25], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 47}}, {"id": 23, "type": "string_literal", "text": "\"%s\\n\"", "parent": 22, "children": [24], "start_point": {"row": 7, "column": 11}, "end_point": {"row": 7, "column": 17}}, {"id": 24, "type": "escape_sequence", "text": "\\n", "parent": 23, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 16}}, {"id": 25, "type": "conditional_expression", "text": "(a < 20) ? \"true\" : \"false\"", "parent": 22, "children": [26, 31, 32, 33], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 46}}, {"id": 26, "type": "parenthesized_expression", "text": "(a < 20)", "parent": 25, "children": [27], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 27}}, {"id": 27, "type": "binary_expression", "text": "a < 20", "parent": 26, "children": [28, 29, 30], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 7, "column": 26}}, {"id": 28, "type": "identifier", "text": "a", "parent": 27, "children": [], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 7, "column": 21}}, {"id": 29, "type": "<", "text": "<", "parent": 27, "children": [], "start_point": {"row": 7, "column": 22}, "end_point": {"row": 7, "column": 23}}, {"id": 30, "type": "number_literal", "text": "20", "parent": 27, "children": [], "start_point": {"row": 7, "column": 24}, "end_point": {"row": 7, "column": 26}}, {"id": 31, "type": "?", "text": "?", "parent": 25, "children": [], "start_point": {"row": 7, "column": 28}, "end_point": {"row": 7, "column": 29}}, {"id": 32, "type": "string_literal", "text": "\"true\"", "parent": 25, "children": [], "start_point": {"row": 7, "column": 30}, "end_point": {"row": 7, "column": 36}}, {"id": 33, "type": "string_literal", "text": "\"false\"", "parent": 25, "children": [], "start_point": {"row": 7, "column": 39}, "end_point": {"row": 7, "column": 46}}, {"id": 34, "type": "call_expression", "text": "printf(\"%s\\n\", (a > 20) ? \"true\" : \"false\")", "parent": 3, "children": [35, 36], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 47}}, {"id": 35, "type": "identifier", "text": "printf", "parent": 34, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 10}}, {"id": 36, "type": "argument_list", "text": "(\"%s\\n\", (a > 20) ? \"true\" : \"false\")", "parent": 34, "children": [37, 39], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 47}}, {"id": 37, "type": "string_literal", "text": "\"%s\\n\"", "parent": 36, "children": [38], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 17}}, {"id": 38, "type": "escape_sequence", "text": "\\n", "parent": 37, "children": [], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 16}}, {"id": 39, "type": "conditional_expression", "text": "(a > 20) ? \"true\" : \"false\"", "parent": 36, "children": [40, 45, 46, 47], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 46}}, {"id": 40, "type": "parenthesized_expression", "text": "(a > 20)", "parent": 39, "children": [41], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 27}}, {"id": 41, "type": "binary_expression", "text": "a > 20", "parent": 40, "children": [42, 43, 44], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 26}}, {"id": 42, "type": "identifier", "text": "a", "parent": 41, "children": [], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 21}}, {"id": 43, "type": ">", "text": ">", "parent": 41, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 23}}, {"id": 44, "type": "number_literal", "text": "20", "parent": 41, "children": [], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 26}}, {"id": 45, "type": "?", "text": "?", "parent": 39, "children": [], "start_point": {"row": 8, "column": 28}, "end_point": {"row": 8, "column": 29}}, {"id": 46, "type": "string_literal", "text": "\"true\"", "parent": 39, "children": [], "start_point": {"row": 8, "column": 30}, "end_point": {"row": 8, "column": 36}}, {"id": 47, "type": "string_literal", "text": "\"false\"", "parent": 39, "children": [], "start_point": {"row": 8, "column": 39}, "end_point": {"row": 8, "column": 46}}, {"id": 48, "type": "call_expression", "text": "printf(\"%s\\n\", (a <= 20) ? \"true\" : \"false\")", "parent": 3, "children": [49, 50], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 48}}, {"id": 49, "type": "identifier", "text": "printf", "parent": 48, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 10}}, {"id": 50, "type": "argument_list", "text": "(\"%s\\n\", (a <= 20) ? \"true\" : \"false\")", "parent": 48, "children": [51, 53], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 48}}, {"id": 51, "type": "string_literal", "text": "\"%s\\n\"", "parent": 50, "children": [52], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 17}}, {"id": 52, "type": "escape_sequence", "text": "\\n", "parent": 51, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 16}}, {"id": 53, "type": "conditional_expression", "text": "(a <= 20) ? \"true\" : \"false\"", "parent": 50, "children": [54, 59, 60, 61], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 47}}, {"id": 54, "type": "parenthesized_expression", "text": "(a <= 20)", "parent": 53, "children": [55], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 28}}, {"id": 55, "type": "binary_expression", "text": "a <= 20", "parent": 54, "children": [56, 57, 58], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 27}}, {"id": 56, "type": "identifier", "text": "a", "parent": 55, "children": [], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 21}}, {"id": 57, "type": "<=", "text": "<=", "parent": 55, "children": [], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 24}}, {"id": 58, "type": "number_literal", "text": "20", "parent": 55, "children": [], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 27}}, {"id": 59, "type": "?", "text": "?", "parent": 53, "children": [], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 9, "column": 30}}, {"id": 60, "type": "string_literal", "text": "\"true\"", "parent": 53, "children": [], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 37}}, {"id": 61, "type": "string_literal", "text": "\"false\"", "parent": 53, "children": [], "start_point": {"row": 9, "column": 40}, "end_point": {"row": 9, "column": 47}}, {"id": 62, "type": "call_expression", "text": "printf(\"%s\\n\", (a >= 20) ? \"true\" : \"false\")", "parent": 3, "children": [63, 64], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 48}}, {"id": 63, "type": "identifier", "text": "printf", "parent": 62, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 10}}, {"id": 64, "type": "argument_list", "text": "(\"%s\\n\", (a >= 20) ? \"true\" : \"false\")", "parent": 62, "children": [65, 67], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 48}}, {"id": 65, "type": "string_literal", "text": "\"%s\\n\"", "parent": 64, "children": [66], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 17}}, {"id": 66, "type": "escape_sequence", "text": "\\n", "parent": 65, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 16}}, {"id": 67, "type": "conditional_expression", "text": "(a >= 20) ? \"true\" : \"false\"", "parent": 64, "children": [68, 73, 74, 75], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 47}}, {"id": 68, "type": "parenthesized_expression", "text": "(a >= 20)", "parent": 67, "children": [69], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 28}}, {"id": 69, "type": "binary_expression", "text": "a >= 20", "parent": 68, "children": [70, 71, 72], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 27}}, {"id": 70, "type": "identifier", "text": "a", "parent": 69, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 21}}, {"id": 71, "type": ">=", "text": ">=", "parent": 69, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 24}}, {"id": 72, "type": "number_literal", "text": "20", "parent": 69, "children": [], "start_point": {"row": 10, "column": 25}, "end_point": {"row": 10, "column": 27}}, {"id": 73, "type": "?", "text": "?", "parent": 67, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 30}}, {"id": 74, "type": "string_literal", "text": "\"true\"", "parent": 67, "children": [], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 37}}, {"id": 75, "type": "string_literal", "text": "\"false\"", "parent": 67, "children": [], "start_point": {"row": 10, "column": 40}, "end_point": {"row": 10, "column": 47}}, {"id": 76, "type": "call_expression", "text": "printf(\"%s\\n\", (a == 20) ? \"true\" : \"false\")", "parent": 3, "children": [77, 78], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 48}}, {"id": 77, "type": "identifier", "text": "printf", "parent": 76, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 10}}, {"id": 78, "type": "argument_list", "text": "(\"%s\\n\", (a == 20) ? \"true\" : \"false\")", "parent": 76, "children": [79, 81], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 48}}, {"id": 79, "type": "string_literal", "text": "\"%s\\n\"", "parent": 78, "children": [80], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 17}}, {"id": 80, "type": "escape_sequence", "text": "\\n", "parent": 79, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 16}}, {"id": 81, "type": "conditional_expression", "text": "(a == 20) ? \"true\" : \"false\"", "parent": 78, "children": [82, 87, 88, 89], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 47}}, {"id": 82, "type": "parenthesized_expression", "text": "(a == 20)", "parent": 81, "children": [83], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 28}}, {"id": 83, "type": "binary_expression", "text": "a == 20", "parent": 82, "children": [84, 85, 86], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 27}}, {"id": 84, "type": "identifier", "text": "a", "parent": 83, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 21}}, {"id": 85, "type": "==", "text": "==", "parent": 83, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 24}}, {"id": 86, "type": "number_literal", "text": "20", "parent": 83, "children": [], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 27}}, {"id": 87, "type": "?", "text": "?", "parent": 81, "children": [], "start_point": {"row": 11, "column": 29}, "end_point": {"row": 11, "column": 30}}, {"id": 88, "type": "string_literal", "text": "\"true\"", "parent": 81, "children": [], "start_point": {"row": 11, "column": 31}, "end_point": {"row": 11, "column": 37}}, {"id": 89, "type": "string_literal", "text": "\"false\"", "parent": 81, "children": [], "start_point": {"row": 11, "column": 40}, "end_point": {"row": 11, "column": 47}}, {"id": 90, "type": "call_expression", "text": "printf(\"%s\\n\", (a != 20) ? \"true\" : \"false\")", "parent": 3, "children": [91, 92], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 48}}, {"id": 91, "type": "identifier", "text": "printf", "parent": 90, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 10}}, {"id": 92, "type": "argument_list", "text": "(\"%s\\n\", (a != 20) ? \"true\" : \"false\")", "parent": 90, "children": [93, 95], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 48}}, {"id": 93, "type": "string_literal", "text": "\"%s\\n\"", "parent": 92, "children": [94], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 17}}, {"id": 94, "type": "escape_sequence", "text": "\\n", "parent": 93, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 16}}, {"id": 95, "type": "conditional_expression", "text": "(a != 20) ? \"true\" : \"false\"", "parent": 92, "children": [96, 101, 102, 103], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 47}}, {"id": 96, "type": "parenthesized_expression", "text": "(a != 20)", "parent": 95, "children": [97], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 28}}, {"id": 97, "type": "binary_expression", "text": "a != 20", "parent": 96, "children": [98, 99, 100], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 27}}, {"id": 98, "type": "identifier", "text": "a", "parent": 97, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 21}}, {"id": 99, "type": "!=", "text": "!=", "parent": 97, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 24}}, {"id": 100, "type": "number_literal", "text": "20", "parent": 97, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 27}}, {"id": 101, "type": "?", "text": "?", "parent": 95, "children": [], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 30}}, {"id": 102, "type": "string_literal", "text": "\"true\"", "parent": 95, "children": [], "start_point": {"row": 12, "column": 31}, "end_point": {"row": 12, "column": 37}}, {"id": 103, "type": "string_literal", "text": "\"false\"", "parent": 95, "children": [], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 47}}]}, "node_categories": {"declarations": {"functions": [3, 5], "variables": [8], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [11, 15, 20, 26, 27, 34, 40, 41, 48, 54, 55, 62, 68, 69, 76, 82, 83, 90, 96, 97], "assignments": [], "loops": [], "conditionals": [6, 10, 12, 16, 19, 21, 25, 28, 35, 39, 42, 49, 53, 56, 63, 67, 70, 77, 81, 84, 91, 95, 98], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 14, 18, 23, 30, 32, 33, 37, 44, 46, 47, 51, 58, 60, 61, 65, 72, 74, 75, 79, 86, 88, 89, 93, 100, 102, 103], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "main", "text_snippet": "void main()\n{\n int a;\n printf(\"a :\");\n scanf(\"%d\", a);\n printf(\"%s\\n\", (a < 20) ? \"true\""}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include<stdio.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include<stdio.h>\n\nvoid main()\n{\n int a;\n printf(\"a :\");\n scanf(\"%d\", a);\n printf(\"%s\\n\", (a < 20) ? \"true\" : \"false\");\n printf(\"%s\\n\", (a > 20) ? \"true\" : \"false\");\n printf(\"%s\\n\", (a <= 20) ? \"true\" : \"false\");\n printf(\"%s\\n\", (a >= 20) ? \"true\" : \"false\");\n printf(\"%s\\n\", (a == 20) ? \"true\" : \"false\");\n printf(\"%s\\n\", (a != 20) ? \"true\" : \"false\");\n}"}
336
c
#ifndef RBCLOGICUNIT_H #define RBCLOGICUNIT_H 1 // Include files #include "L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h" #include "L1Trigger/RPCTechnicalTrigger/interface/RPCLogicUnit.h" #include "L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h" #include "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h" #include <bitset> /** @class RBCLogicUnit RBCLogicUnit.h * * * @author <NAME> * @date 2008-10-25 */ class RBCLogicUnit : public RPCLogicUnit { public: /// Standard constructor RBCLogicUnit(); RBCLogicUnit(const char*); ~RBCLogicUnit() override; ///< Destructor bool initialise(); void setlogic(const char*); void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&); void run(const RBCInput&, std::bitset<2>&); std::bitset<6>* getlayersignal(int _idx) { return m_layersignal[_idx]; }; bool isTriggered() { return m_logic->m_triggersignal; }; protected: private: std::string m_logtype; std::bitset<6>* m_layersignal[2]; std::unique_ptr<RBCLogic> m_logic; bool m_debug; }; #endif // RBCLOGICUNIT_H
30
34
(translation_unit) "#ifndef RBCLOGICUNIT_H\n#define RBCLOGICUNIT_H 1\n\n// Include files\n#include "L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h"\n#include "L1Trigger/RPCTechnicalTrigger/interface/RPCLogicUnit.h"\n#include "L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h"\n#include "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h"\n\n#include <bitset>\n\n/** @class RBCLogicUnit RBCLogicUnit.h\n * \n *\n * @author <NAME>\n * @date 2008-10-25\n */\n\nclass RBCLogicUnit : public RPCLogicUnit {\npublic:\n /// Standard constructor\n RBCLogicUnit();\n\n RBCLogicUnit(const char*);\n\n ~RBCLogicUnit() override; ///< Destructor\n\n bool initialise();\n\n void setlogic(const char*);\n\n void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&);\n\n void run(const RBCInput&, std::bitset<2>&);\n\n std::bitset<6>* getlayersignal(int _idx) { return m_layersignal[_idx]; };\n\n bool isTriggered() { return m_logic->m_triggersignal; };\n\nprotected:\nprivate:\n std::string m_logtype;\n\n std::bitset<6>* m_layersignal[2];\n\n std::unique_ptr<RBCLogic> m_logic;\n\n bool m_debug;\n};\n#endif // RBCLOGICUNIT_H\n" (preproc_ifdef) "#ifndef RBCLOGICUNIT_H\n#define RBCLOGICUNIT_H 1\n\n// Include files\n#include "L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h"\n#include "L1Trigger/RPCTechnicalTrigger/interface/RPCLogicUnit.h"\n#include "L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h"\n#include "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h"\n\n#include <bitset>\n\n/** @class RBCLogicUnit RBCLogicUnit.h\n * \n *\n * @author <NAME>\n * @date 2008-10-25\n */\n\nclass RBCLogicUnit : public RPCLogicUnit {\npublic:\n /// Standard constructor\n RBCLogicUnit();\n\n RBCLogicUnit(const char*);\n\n ~RBCLogicUnit() override; ///< Destructor\n\n bool initialise();\n\n void setlogic(const char*);\n\n void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&);\n\n void run(const RBCInput&, std::bitset<2>&);\n\n std::bitset<6>* getlayersignal(int _idx) { return m_layersignal[_idx]; };\n\n bool isTriggered() { return m_logic->m_triggersignal; };\n\nprotected:\nprivate:\n std::string m_logtype;\n\n std::bitset<6>* m_layersignal[2];\n\n std::unique_ptr<RBCLogic> m_logic;\n\n bool m_debug;\n};\n#endif" (#ifndef) "#ifndef" (identifier) "RBCLOGICUNIT_H" (preproc_def) "#define RBCLOGICUNIT_H 1\n" (#define) "#define" (identifier) "RBCLOGICUNIT_H" (preproc_arg) "1" (comment) "// Include files" (preproc_include) "#include "L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h"\n" (#include) "#include" (string_literal) ""L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h"" (") """ (string_content) "L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h" (") """ (preproc_include) "#include "L1Trigger/RPCTechnicalTrigger/interface/RPCLogicUnit.h"\n" (#include) "#include" (string_literal) ""L1Trigger/RPCTechnicalTrigger/interface/RPCLogicUnit.h"" (") """ (string_content) "L1Trigger/RPCTechnicalTrigger/interface/RPCLogicUnit.h" (") """ (preproc_include) "#include "L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h"\n" (#include) "#include" (string_literal) ""L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h"" (") """ (string_content) "L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h" (") """ (preproc_include) "#include "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h"\n" (#include) "#include" (string_literal) ""L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h"" (") """ (string_content) "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h" (") """ (preproc_include) "#include <bitset>\n" (#include) "#include" (system_lib_string) "<bitset>" (comment) "/** @class RBCLogicUnit RBCLogicUnit.h\n * \n *\n * @author <NAME>\n * @date 2008-10-25\n */" (function_definition) "class RBCLogicUnit : public RPCLogicUnit {\npublic:\n /// Standard constructor\n RBCLogicUnit();\n\n RBCLogicUnit(const char*);\n\n ~RBCLogicUnit() override; ///< Destructor\n\n bool initialise();\n\n void setlogic(const char*);\n\n void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&);\n\n void run(const RBCInput&, std::bitset<2>&);\n\n std::bitset<6>* getlayersignal(int _idx) { return m_layersignal[_idx]; };\n\n bool isTriggered() { return m_logic->m_triggersignal; };\n\nprotected:\nprivate:\n std::string m_logtype;\n\n std::bitset<6>* m_layersignal[2];\n\n std::unique_ptr<RBCLogic> m_logic;\n\n bool m_debug;\n}" (type_identifier) "class" (identifier) "RBCLogicUnit" (ERROR) ": public RPCLogicUnit" (:) ":" (identifier) "public" (identifier) "RPCLogicUnit" (compound_statement) "{\npublic:\n /// Standard constructor\n RBCLogicUnit();\n\n RBCLogicUnit(const char*);\n\n ~RBCLogicUnit() override; ///< Destructor\n\n bool initialise();\n\n void setlogic(const char*);\n\n void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&);\n\n void run(const RBCInput&, std::bitset<2>&);\n\n std::bitset<6>* getlayersignal(int _idx) { return m_layersignal[_idx]; };\n\n bool isTriggered() { return m_logic->m_triggersignal; };\n\nprotected:\nprivate:\n std::string m_logtype;\n\n std::bitset<6>* m_layersignal[2];\n\n std::unique_ptr<RBCLogic> m_logic;\n\n bool m_debug;\n}" ({) "{" (labeled_statement) "public:\n /// Standard constructor\n RBCLogicUnit();" (statement_identifier) "public" (:) ":" (comment) "/// Standard constructor" (expression_statement) "RBCLogicUnit();" (call_expression) "RBCLogicUnit()" (identifier) "RBCLogicUnit" (argument_list) "()" (() "(" ()) ")" (;) ";" (macro_type_specifier) "RBCLogicUnit(const char*)" (identifier) "RBCLogicUnit" (() "(" (type_descriptor) "const char*" (type_qualifier) "const" (const) "const" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (expression_statement) "~RBCLogicUnit() override;" (unary_expression) "~RBCLogicUnit()" (~) "~" (call_expression) "RBCLogicUnit()" (identifier) "RBCLogicUnit" (argument_list) "()" (() "(" ()) ")" (ERROR) "override" (identifier) "override" (;) ";" (comment) "///< Destructor" (declaration) "bool initialise();" (primitive_type) "bool" (function_declarator) "initialise()" (identifier) "initialise" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void setlogic(const char*);" (primitive_type) "void" (function_declarator) "setlogic(const char*)" (identifier) "setlogic" (parameter_list) "(const char*)" (() "(" (parameter_declaration) "const char*" (type_qualifier) "const" (const) "const" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (declaration) "void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&);" (primitive_type) "void" (function_declarator) "setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&)" (identifier) "setBoardSpecs" (parameter_list) "(const RBCBoardSpecs::RBCBoardConfig&)" (() "(" (parameter_declaration) "const RBCBoardSpecs::RBCBoardConfig" (type_qualifier) "const" (const) "const" (type_identifier) "RBCBoardSpecs" (ERROR) "::" (:) ":" (:) ":" (identifier) "RBCBoardConfig" (ERROR) "&" (&) "&" ()) ")" (;) ";" (declaration) "void run(const RBCInput&, std::bitset<2>&);" (primitive_type) "void" (function_declarator) "run(const RBCInput&, std::bitset<2>&)" (identifier) "run" (parameter_list) "(const RBCInput&, std::bitset<2>&)" (() "(" (parameter_declaration) "const RBCInput" (type_qualifier) "const" (const) "const" (type_identifier) "RBCInput" (ERROR) "&" (&) "&" (,) "," (parameter_declaration) "std::bitset" (type_identifier) "std" (ERROR) "::" (:) ":" (:) ":" (identifier) "bitset" (ERROR) "<2>&" (<) "<" (number_literal) "2" (>) ">" (&) "&" ()) ")" (;) ";" (labeled_statement) "std::bitset<6>* getlayersignal(int _idx) { return m_layersignal[_idx]; }" (statement_identifier) "std" (:) ":" (ERROR) ":bitset<6>* getlayersignal(int _idx)" (:) ":" (binary_expression) "bitset<6>* getlayersignal(int _idx)" (binary_expression) "bitset<6" (identifier) "bitset" (<) "<" (number_literal) "6" (>) ">" (pointer_expression) "* getlayersignal(int _idx)" (*) "*" (call_expression) "getlayersignal(int _idx)" (identifier) "getlayersignal" (argument_list) "(int _idx)" (() "(" (ERROR) "int" (identifier) "int" (identifier) "_idx" ()) ")" (compound_statement) "{ return m_layersignal[_idx]; }" ({) "{" (return_statement) "return m_layersignal[_idx];" (return) "return" (subscript_expression) "m_layersignal[_idx]" (identifier) "m_layersignal" ([) "[" (identifier) "_idx" (]) "]" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "bool isTriggered() { return m_logic->m_triggersignal; }" (primitive_type) "bool" (function_declarator) "isTriggered()" (identifier) "isTriggered" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return m_logic->m_triggersignal; }" ({) "{" (return_statement) "return m_logic->m_triggersignal;" (return) "return" (field_expression) "m_logic->m_triggersignal" (identifier) "m_logic" (->) "->" (field_identifier) "m_triggersignal" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (labeled_statement) "protected:\nprivate:\n std::string m_logtype;" (statement_identifier) "protected" (:) ":" (labeled_statement) "private:\n std::string m_logtype;" (statement_identifier) "private" (:) ":" (labeled_statement) "std::string m_logtype;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string m_logtype;" (type_identifier) "string" (identifier) "m_logtype" (;) ";" (labeled_statement) "std::bitset<6>* m_layersignal[2];" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "bitset<6>* m_layersignal[2];" (binary_expression) "bitset<6>* m_layersignal[2]" (binary_expression) "bitset<6" (identifier) "bitset" (<) "<" (number_literal) "6" (>) ">" (pointer_expression) "* m_layersignal[2]" (*) "*" (subscript_expression) "m_layersignal[2]" (identifier) "m_layersignal" ([) "[" (number_literal) "2" (]) "]" (;) ";" (labeled_statement) "std::unique_ptr<RBCLogic> m_logic;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "unique_ptr<RBCLogic> m_logic;" (binary_expression) "unique_ptr<RBCLogic> m_logic" (binary_expression) "unique_ptr<RBCLogic" (identifier) "unique_ptr" (<) "<" (identifier) "RBCLogic" (>) ">" (identifier) "m_logic" (;) ";" (declaration) "bool m_debug;" (primitive_type) "bool" (identifier) "m_debug" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// RBCLOGICUNIT_H"
257
12
{"language": "c", "success": true, "metadata": {"lines": 34, "avg_line_length": 30.0, "nodes": 142, "errors": 0, "source_hash": "b099083d4138dbecde708b39fe3f6246b5ba5e784ac3345abb95a9843a3aecea", "categorized_nodes": 95}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef RBCLOGICUNIT_H\n#define RBCLOGICUNIT_H 1\n\n// Include files\n#include \"L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h\"\n#include \"L1Trigger/RPCTechnicalTrigger/interface/RPCLogicUnit.h\"\n#include \"L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h\"\n#include \"L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h\"\n\n#include <bitset>\n\n/** @class RBCLogicUnit RBCLogicUnit.h\n * \n *\n * @author <NAME>\n * @date 2008-10-25\n */\n\nclass RBCLogicUnit : public RPCLogicUnit {\npublic:\n /// Standard constructor\n RBCLogicUnit();\n\n RBCLogicUnit(const char*);\n\n ~RBCLogicUnit() override; ///< Destructor\n\n bool initialise();\n\n void setlogic(const char*);\n\n void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&);\n\n void run(const RBCInput&, std::bitset<2>&);\n\n std::bitset<6>* getlayersignal(int _idx) { return m_layersignal[_idx]; };\n\n bool isTriggered() { return m_logic->m_triggersignal; };\n\nprotected:\nprivate:\n std::string m_logtype;\n\n std::bitset<6>* m_layersignal[2];\n\n std::unique_ptr<RBCLogic> m_logic;\n\n bool m_debug;\n};\n#endif", "parent": null, "children": [1, 2, 3, 7, 10, 13, 16, 19, 22, 141], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 49, "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": "RBCLOGICUNIT_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define RBCLOGICUNIT_H 1\n", "parent": 0, "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": "RBCLOGICUNIT_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 22}}, {"id": 6, "type": "preproc_arg", "text": "1", "parent": 3, "children": [], "start_point": {"row": 1, "column": 23}, "end_point": {"row": 1, "column": 24}}, {"id": 7, "type": "preproc_include", "text": "#include \"L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h\"\n", "parent": 0, "children": [8, 9], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 8, "type": "#include", "text": "#include", "parent": 7, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 9, "type": "string_literal", "text": "\"L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h\"", "parent": 7, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 62}}, {"id": 10, "type": "preproc_include", "text": "#include \"L1Trigger/RPCTechnicalTrigger/interface/RPCLogicUnit.h\"\n", "parent": 0, "children": [11, 12], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 11, "type": "#include", "text": "#include", "parent": 10, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 12, "type": "string_literal", "text": "\"L1Trigger/RPCTechnicalTrigger/interface/RPCLogicUnit.h\"", "parent": 10, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 65}}, {"id": 13, "type": "preproc_include", "text": "#include \"L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h\"\n", "parent": 0, "children": [14, 15], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 14, "type": "#include", "text": "#include", "parent": 13, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 15, "type": "string_literal", "text": "\"L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h\"", "parent": 13, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 61}}, {"id": 16, "type": "preproc_include", "text": "#include \"L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h\"\n", "parent": 0, "children": [17, 18], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 17, "type": "#include", "text": "#include", "parent": 16, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 18, "type": "string_literal", "text": "\"L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h\"", "parent": 16, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 61}}, {"id": 19, "type": "preproc_include", "text": "#include <bitset>\n", "parent": 0, "children": [20, 21], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 20, "type": "#include", "text": "#include", "parent": 19, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 21, "type": "system_lib_string", "text": "<bitset>", "parent": 19, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 17}}, {"id": 22, "type": "function_definition", "text": "class RBCLogicUnit : public RPCLogicUnit {\npublic:\n /// Standard constructor\n RBCLogicUnit();\n\n RBCLogicUnit(const char*);\n\n ~RBCLogicUnit() override; ///< Destructor\n\n bool initialise();\n\n void setlogic(const char*);\n\n void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&);\n\n void run(const RBCInput&, std::bitset<2>&);\n\n std::bitset<6>* getlayersignal(int _idx) { return m_layersignal[_idx]; };\n\n bool isTriggered() { return m_logic->m_triggersignal; };\n\nprotected:\nprivate:\n std::string m_logtype;\n\n std::bitset<6>* m_layersignal[2];\n\n std::unique_ptr<RBCLogic> m_logic;\n\n bool m_debug;\n}", "parent": 0, "children": [23, 24], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 23, "type": "identifier", "text": "RBCLogicUnit", "parent": 22, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 18}}, {"id": 24, "type": "ERROR", "text": ": public RPCLogicUnit", "parent": 22, "children": [25], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 40}}, {"id": 25, "type": "identifier", "text": "RPCLogicUnit", "parent": 24, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 40}}, {"id": 26, "type": "labeled_statement", "text": "public:\n /// Standard constructor\n RBCLogicUnit();", "parent": 22, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 21, "column": 17}}, {"id": 27, "type": "call_expression", "text": "RBCLogicUnit()", "parent": 26, "children": [28, 29], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 16}}, {"id": 28, "type": "identifier", "text": "RBCLogicUnit", "parent": 27, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 14}}, {"id": 29, "type": "argument_list", "text": "()", "parent": 27, "children": [], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 16}}, {"id": 30, "type": "macro_type_specifier", "text": "RBCLogicUnit(const char*)", "parent": 22, "children": [31, 32], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 27}}, {"id": 31, "type": "identifier", "text": "RBCLogicUnit", "parent": 30, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 14}}, {"id": 32, "type": "type_descriptor", "text": "const char*", "parent": 30, "children": [33, 34], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 26}}, {"id": 33, "type": "primitive_type", "text": "char", "parent": 32, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 25}}, {"id": 34, "type": "abstract_pointer_declarator", "text": "*", "parent": 32, "children": [35], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 26}}, {"id": 35, "type": "*", "text": "*", "parent": 34, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 26}}, {"id": 36, "type": "unary_expression", "text": "~RBCLogicUnit()", "parent": 22, "children": [37, 38], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 17}}, {"id": 37, "type": "~", "text": "~", "parent": 36, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 3}}, {"id": 38, "type": "call_expression", "text": "RBCLogicUnit()", "parent": 36, "children": [39, 40], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 17}}, {"id": 39, "type": "identifier", "text": "RBCLogicUnit", "parent": 38, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 15}}, {"id": 40, "type": "argument_list", "text": "()", "parent": 38, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 17}}, {"id": 41, "type": "ERROR", "text": "override", "parent": 22, "children": [42], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 26}}, {"id": 42, "type": "identifier", "text": "override", "parent": 41, "children": [], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 26}}, {"id": 43, "type": "declaration", "text": "bool initialise();", "parent": 22, "children": [44, 45], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 20}}, {"id": 44, "type": "primitive_type", "text": "bool", "parent": 43, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 6}}, {"id": 45, "type": "function_declarator", "text": "initialise()", "parent": 43, "children": [46, 47], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 19}}, {"id": 46, "type": "identifier", "text": "initialise", "parent": 45, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 17}}, {"id": 47, "type": "parameter_list", "text": "()", "parent": 45, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 19}}, {"id": 48, "type": "declaration", "text": "void setlogic(const char*);", "parent": 22, "children": [49, 50], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 29}}, {"id": 49, "type": "primitive_type", "text": "void", "parent": 48, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 6}}, {"id": 50, "type": "function_declarator", "text": "setlogic(const char*)", "parent": 48, "children": [51, 52], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 28}}, {"id": 51, "type": "identifier", "text": "setlogic", "parent": 50, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 15}}, {"id": 52, "type": "parameter_list", "text": "(const char*)", "parent": 50, "children": [53], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 28}}, {"id": 53, "type": "parameter_declaration", "text": "const char*", "parent": 52, "children": [54, 55], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 27}}, {"id": 54, "type": "primitive_type", "text": "char", "parent": 53, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 26}}, {"id": 55, "type": "abstract_pointer_declarator", "text": "*", "parent": 53, "children": [56], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 27}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 27}}, {"id": 57, "type": "declaration", "text": "void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&);", "parent": 22, "children": [58, 59], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 59}}, {"id": 58, "type": "primitive_type", "text": "void", "parent": 57, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 6}}, {"id": 59, "type": "function_declarator", "text": "setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&)", "parent": 57, "children": [60, 61], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 58}}, {"id": 60, "type": "identifier", "text": "setBoardSpecs", "parent": 59, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 20}}, {"id": 61, "type": "parameter_list", "text": "(const RBCBoardSpecs::RBCBoardConfig&)", "parent": 59, "children": [62], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 58}}, {"id": 62, "type": "parameter_declaration", "text": "const RBCBoardSpecs::RBCBoardConfig", "parent": 61, "children": [63, 64], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 56}}, {"id": 63, "type": "type_identifier", "text": "RBCBoardSpecs", "parent": 62, "children": [], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 40}}, {"id": 64, "type": "identifier", "text": "RBCBoardConfig", "parent": 62, "children": [], "start_point": {"row": 31, "column": 42}, "end_point": {"row": 31, "column": 56}}, {"id": 65, "type": "declaration", "text": "void run(const RBCInput&, std::bitset<2>&);", "parent": 22, "children": [66, 67], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 45}}, {"id": 66, "type": "primitive_type", "text": "void", "parent": 65, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 6}}, {"id": 67, "type": "function_declarator", "text": "run(const RBCInput&, std::bitset<2>&)", "parent": 65, "children": [68, 69], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 44}}, {"id": 68, "type": "identifier", "text": "run", "parent": 67, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 10}}, {"id": 69, "type": "parameter_list", "text": "(const RBCInput&, std::bitset<2>&)", "parent": 67, "children": [70, 72, 75], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 44}}, {"id": 70, "type": "parameter_declaration", "text": "const RBCInput", "parent": 69, "children": [71], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 25}}, {"id": 71, "type": "type_identifier", "text": "RBCInput", "parent": 70, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 25}}, {"id": 72, "type": "parameter_declaration", "text": "std::bitset", "parent": 69, "children": [73, 74], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 39}}, {"id": 73, "type": "type_identifier", "text": "std", "parent": 72, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 31}}, {"id": 74, "type": "identifier", "text": "bitset", "parent": 72, "children": [], "start_point": {"row": 33, "column": 33}, "end_point": {"row": 33, "column": 39}}, {"id": 75, "type": "ERROR", "text": "<2>&", "parent": 69, "children": [76, 77, 78], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 43}}, {"id": 76, "type": "<", "text": "<", "parent": 75, "children": [], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 40}}, {"id": 77, "type": "number_literal", "text": "2", "parent": 75, "children": [], "start_point": {"row": 33, "column": 40}, "end_point": {"row": 33, "column": 41}}, {"id": 78, "type": ">", "text": ">", "parent": 75, "children": [], "start_point": {"row": 33, "column": 41}, "end_point": {"row": 33, "column": 42}}, {"id": 79, "type": "labeled_statement", "text": "std::bitset<6>* getlayersignal(int _idx) { return m_layersignal[_idx]; }", "parent": 22, "children": [80, 81], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 74}}, {"id": 80, "type": "statement_identifier", "text": "std", "parent": 79, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 5}}, {"id": 81, "type": "ERROR", "text": ":bitset<6>* getlayersignal(int _idx)", "parent": 79, "children": [82], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 42}}, {"id": 82, "type": "binary_expression", "text": "bitset<6>* getlayersignal(int _idx)", "parent": 81, "children": [83, 87, 88], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 42}}, {"id": 83, "type": "binary_expression", "text": "bitset<6", "parent": 82, "children": [84, 85, 86], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 15}}, {"id": 84, "type": "identifier", "text": "bitset", "parent": 83, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 13}}, {"id": 85, "type": "<", "text": "<", "parent": 83, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 14}}, {"id": 86, "type": "number_literal", "text": "6", "parent": 83, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 15}}, {"id": 87, "type": ">", "text": ">", "parent": 82, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 16}}, {"id": 88, "type": "pointer_expression", "text": "* getlayersignal(int _idx)", "parent": 82, "children": [89, 90], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 42}}, {"id": 89, "type": "*", "text": "*", "parent": 88, "children": [], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 17}}, {"id": 90, "type": "call_expression", "text": "getlayersignal(int _idx)", "parent": 88, "children": [91, 92], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 42}}, {"id": 91, "type": "identifier", "text": "getlayersignal", "parent": 90, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 32}}, {"id": 92, "type": "argument_list", "text": "(int _idx)", "parent": 90, "children": [93, 95], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 42}}, {"id": 93, "type": "ERROR", "text": "int", "parent": 92, "children": [94], "start_point": {"row": 35, "column": 33}, "end_point": {"row": 35, "column": 36}}, {"id": 94, "type": "identifier", "text": "int", "parent": 93, "children": [], "start_point": {"row": 35, "column": 33}, "end_point": {"row": 35, "column": 36}}, {"id": 95, "type": "identifier", "text": "_idx", "parent": 92, "children": [], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 41}}, {"id": 96, "type": "return_statement", "text": "return m_layersignal[_idx];", "parent": 79, "children": [97], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 72}}, {"id": 97, "type": "subscript_expression", "text": "m_layersignal[_idx]", "parent": 96, "children": [98, 99], "start_point": {"row": 35, "column": 52}, "end_point": {"row": 35, "column": 71}}, {"id": 98, "type": "identifier", "text": "m_layersignal", "parent": 97, "children": [], "start_point": {"row": 35, "column": 52}, "end_point": {"row": 35, "column": 65}}, {"id": 99, "type": "identifier", "text": "_idx", "parent": 97, "children": [], "start_point": {"row": 35, "column": 66}, "end_point": {"row": 35, "column": 70}}, {"id": 100, "type": "function_definition", "text": "bool isTriggered() { return m_logic->m_triggersignal; }", "parent": 22, "children": [101, 102], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 57}}, {"id": 101, "type": "primitive_type", "text": "bool", "parent": 100, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 6}}, {"id": 102, "type": "function_declarator", "text": "isTriggered()", "parent": 100, "children": [103, 104], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 20}}, {"id": 103, "type": "identifier", "text": "isTriggered", "parent": 102, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 18}}, {"id": 104, "type": "parameter_list", "text": "()", "parent": 102, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 20}}, {"id": 105, "type": "return_statement", "text": "return m_logic->m_triggersignal;", "parent": 100, "children": [106], "start_point": {"row": 37, "column": 23}, "end_point": {"row": 37, "column": 55}}, {"id": 106, "type": "field_expression", "text": "m_logic->m_triggersignal", "parent": 105, "children": [107, 108], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 54}}, {"id": 107, "type": "identifier", "text": "m_logic", "parent": 106, "children": [], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 37}}, {"id": 108, "type": "field_identifier", "text": "m_triggersignal", "parent": 106, "children": [], "start_point": {"row": 37, "column": 39}, "end_point": {"row": 37, "column": 54}}, {"id": 109, "type": "labeled_statement", "text": "protected:\nprivate:\n std::string m_logtype;", "parent": 22, "children": [110], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 41, "column": 24}}, {"id": 110, "type": "labeled_statement", "text": "private:\n std::string m_logtype;", "parent": 109, "children": [111], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 24}}, {"id": 111, "type": "labeled_statement", "text": "std::string m_logtype;", "parent": 110, "children": [112, 113], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 24}}, {"id": 112, "type": "statement_identifier", "text": "std", "parent": 111, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 5}}, {"id": 113, "type": "declaration", "text": "string m_logtype;", "parent": 111, "children": [114, 115], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 24}}, {"id": 114, "type": "type_identifier", "text": "string", "parent": 113, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 13}}, {"id": 115, "type": "identifier", "text": "m_logtype", "parent": 113, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 23}}, {"id": 116, "type": "labeled_statement", "text": "std::bitset<6>* m_layersignal[2];", "parent": 22, "children": [117], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 35}}, {"id": 117, "type": "statement_identifier", "text": "std", "parent": 116, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 5}}, {"id": 118, "type": "binary_expression", "text": "bitset<6>* m_layersignal[2]", "parent": 116, "children": [119, 123, 124], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 34}}, {"id": 119, "type": "binary_expression", "text": "bitset<6", "parent": 118, "children": [120, 121, 122], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 15}}, {"id": 120, "type": "identifier", "text": "bitset", "parent": 119, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 13}}, {"id": 121, "type": "<", "text": "<", "parent": 119, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 14}}, {"id": 122, "type": "number_literal", "text": "6", "parent": 119, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 15}}, {"id": 123, "type": ">", "text": ">", "parent": 118, "children": [], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 16}}, {"id": 124, "type": "pointer_expression", "text": "* m_layersignal[2]", "parent": 118, "children": [125, 126], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 34}}, {"id": 125, "type": "*", "text": "*", "parent": 124, "children": [], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 17}}, {"id": 126, "type": "subscript_expression", "text": "m_layersignal[2]", "parent": 124, "children": [127, 128], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 34}}, {"id": 127, "type": "identifier", "text": "m_layersignal", "parent": 126, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 31}}, {"id": 128, "type": "number_literal", "text": "2", "parent": 126, "children": [], "start_point": {"row": 43, "column": 32}, "end_point": {"row": 43, "column": 33}}, {"id": 129, "type": "labeled_statement", "text": "std::unique_ptr<RBCLogic> m_logic;", "parent": 22, "children": [130], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 36}}, {"id": 130, "type": "statement_identifier", "text": "std", "parent": 129, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 5}}, {"id": 131, "type": "binary_expression", "text": "unique_ptr<RBCLogic> m_logic", "parent": 129, "children": [132, 136, 137], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 35}}, {"id": 132, "type": "binary_expression", "text": "unique_ptr<RBCLogic", "parent": 131, "children": [133, 134, 135], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 26}}, {"id": 133, "type": "identifier", "text": "unique_ptr", "parent": 132, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 17}}, {"id": 134, "type": "<", "text": "<", "parent": 132, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 18}}, {"id": 135, "type": "identifier", "text": "RBCLogic", "parent": 132, "children": [], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 26}}, {"id": 136, "type": ">", "text": ">", "parent": 131, "children": [], "start_point": {"row": 45, "column": 26}, "end_point": {"row": 45, "column": 27}}, {"id": 137, "type": "identifier", "text": "m_logic", "parent": 131, "children": [], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 35}}, {"id": 138, "type": "declaration", "text": "bool m_debug;", "parent": 22, "children": [139, 140], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 15}}, {"id": 139, "type": "primitive_type", "text": "bool", "parent": 138, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 6}}, {"id": 140, "type": "identifier", "text": "m_debug", "parent": 138, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 14}}, {"id": 141, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 6}}]}, "node_categories": {"declarations": {"functions": [22, 45, 50, 59, 67, 100, 102], "variables": [43, 48, 53, 57, 62, 65, 70, 72, 113, 138], "classes": [], "imports": [7, 8, 10, 11, 13, 14, 16, 17, 19, 20], "modules": [], "enums": []}, "statements": {"expressions": [27, 36, 38, 82, 83, 88, 90, 97, 106, 118, 119, 124, 126, 131, 132], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 23, 25, 28, 30, 31, 39, 42, 46, 51, 60, 63, 64, 68, 71, 73, 74, 80, 84, 91, 94, 95, 98, 99, 103, 107, 108, 112, 114, 115, 117, 120, 127, 130, 133, 135, 137, 140, 141], "returns": [96, 105], "exceptions": []}, "expressions": {"calls": [], "literals": [9, 12, 15, 18, 21, 77, 86, 122, 128], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 22, "universal_type": "function", "name": "RBCLogicUnit", "text_snippet": "class RBCLogicUnit : public RPCLogicUnit {\npublic:\n /// Standard constructor\n RBCLogicUnit();\n\n R"}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "initialise()"}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "setlogic(const char*)"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&)"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "run(const RBCInput&, std::bitset<2>&)"}, {"node_id": 100, "universal_type": "function", "name": "isTriggered", "text_snippet": "bool isTriggered() { return m_logic->m_triggersignal; }"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "isTriggered()"}], "class_declarations": [], "import_statements": [{"node_id": 7, "text": "#include \"L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h\"\n"}, {"node_id": 8, "text": "#include"}, {"node_id": 10, "text": "#include \"L1Trigger/RPCTechnicalTrigger/interface/RPCLogicUnit.h\"\n"}, {"node_id": 11, "text": "#include"}, {"node_id": 13, "text": "#include \"L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h\"\n"}, {"node_id": 14, "text": "#include"}, {"node_id": 16, "text": "#include \"L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h\"\n"}, {"node_id": 17, "text": "#include"}, {"node_id": 19, "text": "#include <bitset>\n"}, {"node_id": 20, "text": "#include"}]}, "original_source_code": "#ifndef RBCLOGICUNIT_H\n#define RBCLOGICUNIT_H 1\n\n// Include files\n#include \"L1Trigger/RPCTechnicalTrigger/interface/LogicTool.h\"\n#include \"L1Trigger/RPCTechnicalTrigger/interface/RPCLogicUnit.h\"\n#include \"L1Trigger/RPCTechnicalTrigger/interface/RBCLogic.h\"\n#include \"L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h\"\n\n#include <bitset>\n\n/** @class RBCLogicUnit RBCLogicUnit.h\n * \n *\n * @author <NAME>\n * @date 2008-10-25\n */\n\nclass RBCLogicUnit : public RPCLogicUnit {\npublic:\n /// Standard constructor\n RBCLogicUnit();\n\n RBCLogicUnit(const char*);\n\n ~RBCLogicUnit() override; ///< Destructor\n\n bool initialise();\n\n void setlogic(const char*);\n\n void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig&);\n\n void run(const RBCInput&, std::bitset<2>&);\n\n std::bitset<6>* getlayersignal(int _idx) { return m_layersignal[_idx]; };\n\n bool isTriggered() { return m_logic->m_triggersignal; };\n\nprotected:\nprivate:\n std::string m_logtype;\n\n std::bitset<6>* m_layersignal[2];\n\n std::unique_ptr<RBCLogic> m_logic;\n\n bool m_debug;\n};\n#endif // RBCLOGICUNIT_H\n"}
337
c
// // LCMetersRecordingView.h // Antenna // // Created by Lc on 16/4/8. // Copyright © 2016年 HHLY. All rights reserved. // #import <UIKit/UIKit.h> typedef NS_ENUM(NSInteger, subTitleStatues) { subTitleStatuesDefault, subTitleStatuesCancel, }; @interface LCMetersRecordingView : UIView // 根据 状态更改 显示的内容 + (void)subTitleLabelStatues:(subTitleStatues)statues; + (void)show; + (void)dismiss; @end
21.5
18
(translation_unit) "//\n// LCMetersRecordingView.h\n// Antenna\n//\n// Created by Lc on 16/4/8.\n// Copyright © 2016年 HHLY. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\ntypedef NS_ENUM(NSInteger, subTitleStatues) {\n subTitleStatuesDefault,\n subTitleStatuesCancel,\n};\n@interface LCMetersRecordingView : UIView\n// 根据 状态更改 显示的内容\n+ (void)subTitleLabelStatues:(subTitleStatues)statues;\n+ (void)show;\n+ (void)dismiss;\n@end\n" (comment) "//" (comment) "// LCMetersRecordingView.h" (comment) "// Antenna" (comment) "//" (comment) "// Created by Lc on 16/4/8." (comment) "// Copyright © 2016年 HHLY. All rights reserved.\n//" (comment) "\n#" (preproc_call) "port <UIKit/UIKit.h>\n\nty" (preproc_directive) "port <U" (preproc_arg) "Kit/UIKit.h>\n\nt" (type_definition) "edef NS_ENUM(NSInteger, subTitleStatues) {\n subTitleStatuesDefault,\n subTitleStatuesCancel,\n};\n@interface LC" (typedef) "edef NS" (macro_type_specifier) "ENUM(NSInteger, subTitleStatues) {\n" (identifier) "ENUM(NS" (() "I" (ERROR) "nteger, su" (type_descriptor) "nteger, s" (type_identifier) "nteger, s" (,) "u" (type_descriptor) "TitleStatues) {" (type_identifier) "TitleStatues) {" ()) "\n" (ERROR) " " ({) " " (type_identifier) "TitleStatuesDefault,\n " (,) " " (type_identifier) "TitleStatuesCancel,\n}" (,) ";" (ERROR) "@int" (}) "@" (;) "i" (ERROR) "t" (type_identifier) "erface LC" (;) "" (labeled_statement) "etersRecordingView : UIView\n// 根据 状态更改 显示的内容\n+ (void)subTitleLabelStatues:(subTitleStatues)statues;\n+ (void)show;\n+ (void)di" (statement_identifier) "etersRecordingView : " (ERROR) "IView\n// 根据 状态更改 显示的内容\n+ (void)subTitleLabelStatues:(subTitleStatues)statues" (:) "I" (binary_expression) "iew\n// 根据 状态更改 显示的内容\n+ (void)subTitleLabelStatues:(subTitleStatues)statues" (identifier) "iew\n//" (comment) "根据 状态更改 显示的内容\n+ (void)subTitleLabelSta" (+) "u" (cast_expression) "s:(subTitleStatues)statues" (() "s" (type_descriptor) ":(su" (primitive_type) ":(su" ()) "b" (identifier) "TitleStatues)statues" (:) ";" (expression_statement) "\n+ (void)show;\n+ (void)di" (cast_expression) "\n+ (void)show;\n+ (void)d" (() "\n" (type_descriptor) "+ (void)show;\n+" (type_identifier) "+ (void)show;\n+" ()) " " (identifier) "(void)d" (;) "i" (expression_statement) "miss;\n@end\n" (unary_expression) "miss;\n@end\n" (+) "m" (cast_expression) "ss;\n@end\n" (() "s" (type_descriptor) "s;\n@" (primitive_type) "s;\n@" ()) "e" (identifier) "nd\n" (;) "" (expression_statement) "" (unary_expression) "" (+) "" (cast_expression) "" (() "" (type_descriptor) "" (primitive_type) "" ()) "" (identifier) "" (;) "" (ERROR) "" (ERROR) "" (expression_statement) "" (identifier) "" (;) ""
83
7
{"language": "c", "success": true, "metadata": {"lines": 18, "avg_line_length": 21.5, "nodes": 47, "errors": 0, "source_hash": "78ce0ea635ea745dd19377f34066d520729ac6fee9117a897a6916913f226a23", "categorized_nodes": 24}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "port <UIKit/UIKit.h>\n\nty", "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\nt", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "type_definition", "text": "edef NS_ENUM(NSInteger, subTitleStatues) {\n subTitleStatuesDefault,\n subTitleStatuesCancel,\n};\n@interface LC", "parent": null, "children": [4, 5, 12, 13, 14, 15, 17], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 14, "column": 10}}, {"id": 4, "type": "typedef", "text": "edef NS", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 5, "type": "macro_type_specifier", "text": "ENUM(NSInteger, subTitleStatues) {\n", "parent": 3, "children": [6, 7, 10], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 43}}, {"id": 6, "type": "identifier", "text": "ENUM(NS", "parent": 5, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 15}}, {"id": 7, "type": "ERROR", "text": "nteger, su", "parent": 5, "children": [8], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 26}}, {"id": 8, "type": "type_descriptor", "text": "nteger, s", "parent": 7, "children": [9], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 25}}, {"id": 9, "type": "type_identifier", "text": "nteger, s", "parent": 8, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 25}}, {"id": 10, "type": "type_descriptor", "text": "TitleStatues) {", "parent": 5, "children": [11], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 42}}, {"id": 11, "type": "type_identifier", "text": "TitleStatues) {", "parent": 10, "children": [], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 42}}, {"id": 12, "type": "ERROR", "text": " ", "parent": 3, "children": [], "start_point": {"row": 10, "column": 44}, "end_point": {"row": 10, "column": 45}}, {"id": 13, "type": "type_identifier", "text": "TitleStatuesDefault,\n ", "parent": 3, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 26}}, {"id": 14, "type": "type_identifier", "text": "TitleStatuesCancel,\n}", "parent": 3, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 25}}, {"id": 15, "type": "ERROR", "text": "@int", "parent": 3, "children": [16], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 16, "type": "ERROR", "text": "t", "parent": 15, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 17, "type": "type_identifier", "text": "erface LC", "parent": 3, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 10}}, {"id": 18, "type": "labeled_statement", "text": "etersRecordingView : UIView\n// \u6839\u636e \u72b6\u6001\u66f4\u6539 \u663e\u793a\u7684\u5185\u5bb9\n+ (void)subTitleLabelStatues:(subTitleStatues)statues;\n+ (void)show;\n+ (void)di", "parent": null, "children": [19, 20], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 16, "column": 54}}, {"id": 19, "type": "statement_identifier", "text": "etersRecordingView : ", "parent": 18, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 32}}, {"id": 20, "type": "ERROR", "text": "IView\n// \u6839\u636e \u72b6\u6001\u66f4\u6539 \u663e\u793a\u7684\u5185\u5bb9\n+ (void)subTitleLabelStatues:(subTitleStatues)statues", "parent": 18, "children": [21], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 16, "column": 28}}, {"id": 21, "type": "binary_expression", "text": "iew\n// \u6839\u636e \u72b6\u6001\u66f4\u6539 \u663e\u793a\u7684\u5185\u5bb9\n+ (void)subTitleLabelStatues:(subTitleStatues)statues", "parent": 20, "children": [22, 23, 24], "start_point": {"row": 14, "column": 35}, "end_point": {"row": 16, "column": 28}}, {"id": 22, "type": "identifier", "text": "iew\n//", "parent": 21, "children": [], "start_point": {"row": 14, "column": 35}, "end_point": {"row": 14, "column": 41}}, {"id": 23, "type": "+", "text": "u", "parent": 21, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 24, "type": "cast_expression", "text": "s:(subTitleStatues)statues", "parent": 21, "children": [25, 27], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 28}}, {"id": 25, "type": "type_descriptor", "text": ":(su", "parent": 24, "children": [26], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 7}}, {"id": 26, "type": "primitive_type", "text": ":(su", "parent": 25, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 7}}, {"id": 27, "type": "identifier", "text": "TitleStatues)statues", "parent": 24, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 28}}, {"id": 28, "type": "cast_expression", "text": "\n+ (void)show;\n+ (void)d", "parent": 18, "children": [29, 31], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 53}}, {"id": 29, "type": "type_descriptor", "text": "+ (void)show;\n+", "parent": 28, "children": [30], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 45}}, {"id": 30, "type": "type_identifier", "text": "+ (void)show;\n+", "parent": 29, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 45}}, {"id": 31, "type": "identifier", "text": "(void)d", "parent": 28, "children": [], "start_point": {"row": 16, "column": 46}, "end_point": {"row": 16, "column": 53}}, {"id": 32, "type": "unary_expression", "text": "miss;\n@end\n", "parent": null, "children": [33, 34], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 12}}, {"id": 33, "type": "+", "text": "m", "parent": 32, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 34, "type": "cast_expression", "text": "ss;\n@end\n", "parent": 32, "children": [35, 37], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 12}}, {"id": 35, "type": "type_descriptor", "text": "s;\n@", "parent": 34, "children": [36], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 7}}, {"id": 36, "type": "primitive_type", "text": "s;\n@", "parent": 35, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 7}}, {"id": 37, "type": "identifier", "text": "nd\n", "parent": 34, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 12}}, {"id": 38, "type": "unary_expression", "text": "", "parent": null, "children": [39, 40], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 15}}, {"id": 39, "type": "+", "text": "", "parent": 38, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 40, "type": "cast_expression", "text": "", "parent": 38, "children": [41, 43], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 15}}, {"id": 41, "type": "type_descriptor", "text": "", "parent": 40, "children": [42], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 7}}, {"id": 42, "type": "primitive_type", "text": "", "parent": 41, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 7}}, {"id": 43, "type": "identifier", "text": "", "parent": 40, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 15}}, {"id": 44, "type": "ERROR", "text": "", "parent": null, "children": [45], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 45, "type": "ERROR", "text": "", "parent": 44, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 46, "type": "identifier", "text": "", "parent": null, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [3], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [21, 24, 28, 32, 34, 38, 40], "assignments": [], "loops": [], "conditionals": [5, 6, 9, 11, 13, 14, 17, 19, 22, 27, 30, 31, 37, 43, 46], "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// LCMetersRecordingView.h\n// Antenna\n//\n// Created by Lc on 16/4/8.\n// Copyright \u00a9 2016\u5e74 HHLY. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\ntypedef NS_ENUM(NSInteger, subTitleStatues) {\n subTitleStatuesDefault,\n subTitleStatuesCancel,\n};\n@interface LCMetersRecordingView : UIView\n// \u6839\u636e \u72b6\u6001\u66f4\u6539 \u663e\u793a\u7684\u5185\u5bb9\n+ (void)subTitleLabelStatues:(subTitleStatues)statues;\n+ (void)show;\n+ (void)dismiss;\n@end\n"}
338
c
#ifndef LIVING_H_INCLUDED #define LIVING_H_INCLUDED #include <string> #include <vector> #include "Spell.h" #include "Item.h" using namespace std; class Living { protected: string name; int level, healthPower; int base_health; public: Living(string n, int h); virtual void printInfo(); int& getHealth(); string getName(); }; //Heroes class Hero: public Living { protected: int magicPower, strength, dexterity, agility; //stats int money, experience, exp_cap, up_value, damage; //ex_cap = max exp before level up / up_value=value by which stats will be augmented vector<Item*> item; vector<Spell*> spell; //items and spells int capacity, item_count; //capacity of inventory, # of items present Item *weapon, *armor; //equipped weapon/armor. int agility_cap, base_magicPower; //because agility is the dodge rate of the hero, it cant be unlimited. int weap_pos, armor_pos; public: Hero(string n, int h, int mP, int str, int dex, int ag); //parameters are the stats above in the same order virtual ~Hero(){}; virtual void printInfo(); void getExp(int e); void getMoney(int m); virtual void levelUp()=0; //hero gains level - all stats increased ("strong" stat increased twice as much) int getLevel(); void checkInventory(); void equip(); //equip armor/weapons. void use(); //use potion. void attack(int& health, int ag); void buy(Item *i); void buy(Spell *s); //buy items/spells. void sell(int index); //sell item - spells can't be sold void castSpell(int& h, int& mid, int& mad, int& def, int& ag); void resetStats(); //resets stats to base stats (if they got decreased) int getAg(); //get agility int getDmge(); int getItemCount(); void loseMoney(); //secondary }; class Warrior: public Hero { public: Warrior(string n, int h, int mP, int str, int dex, int ag); void printInfo(); void levelUp(); }; class Sorcerer: public Hero { public: Sorcerer(string n, int h, int mP, int str, int dex, int ag); void printInfo(); void levelUp(); }; class Paladin: public Hero { public: Paladin(string n, int h, int mP, int str, int dex, int ag); void printInfo(); void levelUp(); }; //Monsters class Monster: public Living { protected: int min_dmge, max_dmge, defense, agility; //main stats, can be decreased by the effect of a hero spell int base_min_dmge, base_max_dmge, base_defense, base_agility; //base stats, will never decrease by spell's effect public: Monster(string n, int h, int mid, int mad, int def, int ag); virtual ~Monster(){}; virtual void printInfo(); void attack(int& h, int ag, string n); void resetStats(); //resets stats to base stats (if they got decreased) void fixLevel(int lvl); int& getMin_dam(); int& getMax_dam(); int& getDef(); int& getAg(); }; class Dragon: public Monster { public: Dragon(string n, int h, int mid, int mad, int def, int ag); void printInfo(); }; class Exoskeleton: public Monster { public: Exoskeleton(string n, int h, int mid, int mad, int def, int ag); void printInfo(); }; class Spirit: public Monster { public: Spirit(string n, int h, int mid, int mad, int def, int ag); void printInfo(); }; #endif // LIVING_H_INCLUDED
30.39
128
(translation_unit) "#ifndef LIVING_H_INCLUDED \n#define LIVING_H_INCLUDED \n \n#include <string> \n#include <vector> \n#include "Spell.h" \n#include "Item.h" \n \nusing namespace std; \n \nclass Living \n{ \n protected: \n string name; \n int level, healthPower; \n int base_health; \n public: \n Living(string n, int h); \n virtual void printInfo(); \n int& getHealth(); \n string getName(); \n}; \n \n \n//Heroes \nclass Hero: public Living \n{ \n protected: \n int magicPower, strength, dexterity, agility; //stats \n int money, experience, exp_cap, up_value, damage; //ex_cap = max exp before level up / up_value=value by which stats will be augmented \n \n vector<Item*> item; \n vector<Spell*> spell; //items and spells \n int capacity, item_count; //capacity of inventory, # of items present \n Item *weapon, *armor; //equipped weapon/armor. \n int agility_cap, base_magicPower; //because agility is the dodge rate of the hero, it cant be unlimited. \n \n int weap_pos, armor_pos; \n public: \n Hero(string n, int h, int mP, int str, int dex, int ag); //parameters are the stats above in the same order \n virtual ~Hero(){}; \n virtual void printInfo(); \n void getExp(int e); \n void getMoney(int m); \n virtual void levelUp()=0; //hero gains level - all stats increased ("strong" stat increased twice as much) \n int getLevel(); \n void checkInventory(); \n void equip(); //equip armor/weapons. \n void use(); //use potion. \n void attack(int& health, int ag); \n void buy(Item *i); \n void buy(Spell *s); //buy items/spells. \n void sell(int index); //sell item - spells can't be sold \n void castSpell(int& h, int& mid, int& mad, int& def, int& ag); \n void resetStats(); //resets stats to base stats (if they got decreased) \n \n int getAg(); //get agility \n int getDmge(); \n int getItemCount(); \n void loseMoney(); //secondary \n}; \n \nclass Warrior: public Hero \n{ \n public: \n Warrior(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}; \n \nclass Sorcerer: public Hero \n{ \n public: \n Sorcerer(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}; \n \nclass Paladin: public Hero \n{ \n public: \n Paladin(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}; \n \n \n//Monsters \nclass Monster: public Living \n{ \n protected: \n int min_dmge, max_dmge, defense, agility; //main stats, can be decreased by the effect of a hero spell \n int base_min_dmge, base_max_dmge, base_defense, base_agility; //base stats, will never decrease by spell's effect \n public: \n Monster(string n, int h, int mid, int mad, int def, int ag); \n virtual ~Monster(){}; \n virtual void printInfo(); \n void attack(int& h, int ag, string n); \n void resetStats(); //resets stats to base stats (if they got decreased) \n void fixLevel(int lvl); \n int& getMin_dam(); \n int& getMax_dam(); \n int& getDef(); \n int& getAg(); \n}; \n \nclass Dragon: public Monster \n{ \n public: \n Dragon(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}; \n \nclass Exoskeleton: public Monster \n{ \n public: \n Exoskeleton(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}; \n \nclass Spirit: public Monster \n{ \n public: \n Spirit(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}; \n \n#endif // LIVING_H_INCLUDED \n" (preproc_ifdef) "#ifndef LIVING_H_INCLUDED \n#define LIVING_H_INCLUDED \n \n#include <string> \n#include <vector> \n#include "Spell.h" \n#include "Item.h" \n \nusing namespace std; \n \nclass Living \n{ \n protected: \n string name; \n int level, healthPower; \n int base_health; \n public: \n Living(string n, int h); \n virtual void printInfo(); \n int& getHealth(); \n string getName(); \n}; \n \n \n//Heroes \nclass Hero: public Living \n{ \n protected: \n int magicPower, strength, dexterity, agility; //stats \n int money, experience, exp_cap, up_value, damage; //ex_cap = max exp before level up / up_value=value by which stats will be augmented \n \n vector<Item*> item; \n vector<Spell*> spell; //items and spells \n int capacity, item_count; //capacity of inventory, # of items present \n Item *weapon, *armor; //equipped weapon/armor. \n int agility_cap, base_magicPower; //because agility is the dodge rate of the hero, it cant be unlimited. \n \n int weap_pos, armor_pos; \n public: \n Hero(string n, int h, int mP, int str, int dex, int ag); //parameters are the stats above in the same order \n virtual ~Hero(){}; \n virtual void printInfo(); \n void getExp(int e); \n void getMoney(int m); \n virtual void levelUp()=0; //hero gains level - all stats increased ("strong" stat increased twice as much) \n int getLevel(); \n void checkInventory(); \n void equip(); //equip armor/weapons. \n void use(); //use potion. \n void attack(int& health, int ag); \n void buy(Item *i); \n void buy(Spell *s); //buy items/spells. \n void sell(int index); //sell item - spells can't be sold \n void castSpell(int& h, int& mid, int& mad, int& def, int& ag); \n void resetStats(); //resets stats to base stats (if they got decreased) \n \n int getAg(); //get agility \n int getDmge(); \n int getItemCount(); \n void loseMoney(); //secondary \n}; \n \nclass Warrior: public Hero \n{ \n public: \n Warrior(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}; \n \nclass Sorcerer: public Hero \n{ \n public: \n Sorcerer(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}; \n \nclass Paladin: public Hero \n{ \n public: \n Paladin(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}; \n \n \n//Monsters \nclass Monster: public Living \n{ \n protected: \n int min_dmge, max_dmge, defense, agility; //main stats, can be decreased by the effect of a hero spell \n int base_min_dmge, base_max_dmge, base_defense, base_agility; //base stats, will never decrease by spell's effect \n public: \n Monster(string n, int h, int mid, int mad, int def, int ag); \n virtual ~Monster(){}; \n virtual void printInfo(); \n void attack(int& h, int ag, string n); \n void resetStats(); //resets stats to base stats (if they got decreased) \n void fixLevel(int lvl); \n int& getMin_dam(); \n int& getMax_dam(); \n int& getDef(); \n int& getAg(); \n}; \n \nclass Dragon: public Monster \n{ \n public: \n Dragon(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}; \n \nclass Exoskeleton: public Monster \n{ \n public: \n Exoskeleton(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}; \n \nclass Spirit: public Monster \n{ \n public: \n Spirit(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}; \n \n#endif" (#ifndef) "#ifndef" (identifier) "LIVING_H_INCLUDED" (preproc_def) "#define LIVING_H_INCLUDED \n" (#define) "#define" (identifier) "LIVING_H_INCLUDED" (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 "Spell.h" \n" (#include) "#include" (string_literal) ""Spell.h"" (") """ (string_content) "Spell.h" (") """ (preproc_include) "#include "Item.h" \n" (#include) "#include" (string_literal) ""Item.h"" (") """ (string_content) "Item.h" (") """ (declaration) "using namespace std;" (type_identifier) "using" (identifier) "namespace" (ERROR) "std" (identifier) "std" (;) ";" (function_definition) "class Living \n{ \n protected: \n string name; \n int level, healthPower; \n int base_health; \n public: \n Living(string n, int h); \n virtual void printInfo(); \n int& getHealth(); \n string getName(); \n}" (type_identifier) "class" (identifier) "Living" (compound_statement) "{ \n protected: \n string name; \n int level, healthPower; \n int base_health; \n public: \n Living(string n, int h); \n virtual void printInfo(); \n int& getHealth(); \n string getName(); \n}" ({) "{" (labeled_statement) "protected: \n string name;" (statement_identifier) "protected" (:) ":" (declaration) "string name;" (type_identifier) "string" (identifier) "name" (;) ";" (declaration) "int level, healthPower;" (primitive_type) "int" (identifier) "level" (,) "," (identifier) "healthPower" (;) ";" (declaration) "int base_health;" (primitive_type) "int" (identifier) "base_health" (;) ";" (labeled_statement) "public: \n Living(string n, int h);" (statement_identifier) "public" (:) ":" (declaration) "Living(string n, int h);" (macro_type_specifier) "Living(string" (identifier) "Living" (() "(" (type_descriptor) "string" (type_identifier) "string" ()) "" (identifier) "n" (,) "," (identifier) "int" (ERROR) "h)" (identifier) "h" ()) ")" (;) ";" (declaration) "virtual void printInfo();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "printInfo()" (identifier) "printInfo" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int& getHealth();" (primitive_type) "int" (ERROR) "&" (&) "&" (function_declarator) "getHealth()" (identifier) "getHealth" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "string getName();" (type_identifier) "string" (function_declarator) "getName()" (identifier) "getName" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "//Heroes " (function_definition) "class Hero: public Living \n{ \n protected: \n int magicPower, strength, dexterity, agility; //stats \n int money, experience, exp_cap, up_value, damage; //ex_cap = max exp before level up / up_value=value by which stats will be augmented \n \n vector<Item*> item; \n vector<Spell*> spell; //items and spells \n int capacity, item_count; //capacity of inventory, # of items present \n Item *weapon, *armor; //equipped weapon/armor. \n int agility_cap, base_magicPower; //because agility is the dodge rate of the hero, it cant be unlimited. \n \n int weap_pos, armor_pos; \n public: \n Hero(string n, int h, int mP, int str, int dex, int ag); //parameters are the stats above in the same order \n virtual ~Hero(){}; \n virtual void printInfo(); \n void getExp(int e); \n void getMoney(int m); \n virtual void levelUp()=0; //hero gains level - all stats increased ("strong" stat increased twice as much) \n int getLevel(); \n void checkInventory(); \n void equip(); //equip armor/weapons. \n void use(); //use potion. \n void attack(int& health, int ag); \n void buy(Item *i); \n void buy(Spell *s); //buy items/spells. \n void sell(int index); //sell item - spells can't be sold \n void castSpell(int& h, int& mid, int& mad, int& def, int& ag); \n void resetStats(); //resets stats to base stats (if they got decreased) \n \n int getAg(); //get agility \n int getDmge(); \n int getItemCount(); \n void loseMoney(); //secondary \n}" (type_identifier) "class" (ERROR) "Hero: public" (identifier) "Hero" (:) ":" (identifier) "public" (identifier) "Living" (compound_statement) "{ \n protected: \n int magicPower, strength, dexterity, agility; //stats \n int money, experience, exp_cap, up_value, damage; //ex_cap = max exp before level up / up_value=value by which stats will be augmented \n \n vector<Item*> item; \n vector<Spell*> spell; //items and spells \n int capacity, item_count; //capacity of inventory, # of items present \n Item *weapon, *armor; //equipped weapon/armor. \n int agility_cap, base_magicPower; //because agility is the dodge rate of the hero, it cant be unlimited. \n \n int weap_pos, armor_pos; \n public: \n Hero(string n, int h, int mP, int str, int dex, int ag); //parameters are the stats above in the same order \n virtual ~Hero(){}; \n virtual void printInfo(); \n void getExp(int e); \n void getMoney(int m); \n virtual void levelUp()=0; //hero gains level - all stats increased ("strong" stat increased twice as much) \n int getLevel(); \n void checkInventory(); \n void equip(); //equip armor/weapons. \n void use(); //use potion. \n void attack(int& health, int ag); \n void buy(Item *i); \n void buy(Spell *s); //buy items/spells. \n void sell(int index); //sell item - spells can't be sold \n void castSpell(int& h, int& mid, int& mad, int& def, int& ag); \n void resetStats(); //resets stats to base stats (if they got decreased) \n \n int getAg(); //get agility \n int getDmge(); \n int getItemCount(); \n void loseMoney(); //secondary \n}" ({) "{" (labeled_statement) "protected: \n int magicPower, strength, dexterity, agility;" (statement_identifier) "protected" (:) ":" (declaration) "int magicPower, strength, dexterity, agility;" (primitive_type) "int" (identifier) "magicPower" (,) "," (identifier) "strength" (,) "," (identifier) "dexterity" (,) "," (identifier) "agility" (;) ";" (comment) "//stats " (declaration) "int money, experience, exp_cap, up_value, damage;" (primitive_type) "int" (identifier) "money" (,) "," (identifier) "experience" (,) "," (identifier) "exp_cap" (,) "," (identifier) "up_value" (,) "," (identifier) "damage" (;) ";" (comment) "//ex_cap = max exp before level up / up_value=value by which stats will be augmented " (expression_statement) "vector<Item*> item;" (binary_expression) "vector<Item*> item" (binary_expression) "vector<Item" (identifier) "vector" (<) "<" (identifier) "Item" (ERROR) "*" (*) "*" (>) ">" (identifier) "item" (;) ";" (expression_statement) "vector<Spell*> spell;" (binary_expression) "vector<Spell*> spell" (binary_expression) "vector<Spell" (identifier) "vector" (<) "<" (identifier) "Spell" (ERROR) "*" (*) "*" (>) ">" (identifier) "spell" (;) ";" (comment) "//items and spells " (declaration) "int capacity, item_count;" (primitive_type) "int" (identifier) "capacity" (,) "," (identifier) "item_count" (;) ";" (comment) "//capacity of inventory, # of items present " (declaration) "Item *weapon, *armor;" (type_identifier) "Item" (pointer_declarator) "*weapon" (*) "*" (identifier) "weapon" (,) "," (pointer_declarator) "*armor" (*) "*" (identifier) "armor" (;) ";" (comment) "//equipped weapon/armor. " (declaration) "int agility_cap, base_magicPower;" (primitive_type) "int" (identifier) "agility_cap" (,) "," (identifier) "base_magicPower" (;) ";" (comment) "//because agility is the dodge rate of the hero, it cant be unlimited. " (declaration) "int weap_pos, armor_pos;" (primitive_type) "int" (identifier) "weap_pos" (,) "," (identifier) "armor_pos" (;) ";" (labeled_statement) "public: \n Hero(string n, int h, int mP, int str, int dex, int ag);" (statement_identifier) "public" (:) ":" (declaration) "Hero(string n, int h, int mP, int str, int dex, int ag);" (macro_type_specifier) "Hero(string" (identifier) "Hero" (() "(" (type_descriptor) "string" (type_identifier) "string" ()) "" (identifier) "n" (,) "," (identifier) "int" (ERROR) "h" (identifier) "h" (,) "," (identifier) "int" (ERROR) "mP" (identifier) "mP" (,) "," (identifier) "int" (ERROR) "str" (identifier) "str" (,) "," (identifier) "int" (ERROR) "dex" (identifier) "dex" (,) "," (identifier) "int" (ERROR) "ag)" (identifier) "ag" ()) ")" (;) ";" (comment) "//parameters are the stats above in the same order " (function_definition) "virtual ~Hero(){}" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "Hero()" (identifier) "Hero" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (declaration) "virtual void printInfo();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "printInfo()" (identifier) "printInfo" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void getExp(int e);" (primitive_type) "void" (function_declarator) "getExp(int e)" (identifier) "getExp" (parameter_list) "(int e)" (() "(" (parameter_declaration) "int e" (primitive_type) "int" (identifier) "e" ()) ")" (;) ";" (declaration) "void getMoney(int m);" (primitive_type) "void" (function_declarator) "getMoney(int m)" (identifier) "getMoney" (parameter_list) "(int m)" (() "(" (parameter_declaration) "int m" (primitive_type) "int" (identifier) "m" ()) ")" (;) ";" (declaration) "virtual void levelUp()=0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "levelUp()=0" (function_declarator) "levelUp()" (identifier) "levelUp" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "//hero gains level - all stats increased ("strong" stat increased twice as much) " (declaration) "int getLevel();" (primitive_type) "int" (function_declarator) "getLevel()" (identifier) "getLevel" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void checkInventory();" (primitive_type) "void" (function_declarator) "checkInventory()" (identifier) "checkInventory" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void equip();" (primitive_type) "void" (function_declarator) "equip()" (identifier) "equip" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//equip armor/weapons. " (declaration) "void use();" (primitive_type) "void" (function_declarator) "use()" (identifier) "use" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//use potion. " (declaration) "void attack(int& health, int ag);" (primitive_type) "void" (function_declarator) "attack(int& health, int ag)" (identifier) "attack" (parameter_list) "(int& health, int ag)" (() "(" (parameter_declaration) "int& health" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "health" (,) "," (parameter_declaration) "int ag" (primitive_type) "int" (identifier) "ag" ()) ")" (;) ";" (declaration) "void buy(Item *i);" (primitive_type) "void" (function_declarator) "buy(Item *i)" (identifier) "buy" (parameter_list) "(Item *i)" (() "(" (parameter_declaration) "Item *i" (type_identifier) "Item" (pointer_declarator) "*i" (*) "*" (identifier) "i" ()) ")" (;) ";" (declaration) "void buy(Spell *s);" (primitive_type) "void" (function_declarator) "buy(Spell *s)" (identifier) "buy" (parameter_list) "(Spell *s)" (() "(" (parameter_declaration) "Spell *s" (type_identifier) "Spell" (pointer_declarator) "*s" (*) "*" (identifier) "s" ()) ")" (;) ";" (comment) "//buy items/spells. " (declaration) "void sell(int index);" (primitive_type) "void" (function_declarator) "sell(int index)" (identifier) "sell" (parameter_list) "(int index)" (() "(" (parameter_declaration) "int index" (primitive_type) "int" (identifier) "index" ()) ")" (;) ";" (comment) "//sell item - spells can't be sold " (declaration) "void castSpell(int& h, int& mid, int& mad, int& def, int& ag);" (primitive_type) "void" (function_declarator) "castSpell(int& h, int& mid, int& mad, int& def, int& ag)" (identifier) "castSpell" (parameter_list) "(int& h, int& mid, int& mad, int& def, int& ag)" (() "(" (parameter_declaration) "int& h" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "h" (,) "," (parameter_declaration) "int& mid" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "mid" (,) "," (parameter_declaration) "int& mad" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "mad" (,) "," (parameter_declaration) "int& def" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "def" (,) "," (parameter_declaration) "int& ag" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "ag" ()) ")" (;) ";" (declaration) "void resetStats();" (primitive_type) "void" (function_declarator) "resetStats()" (identifier) "resetStats" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//resets stats to base stats (if they got decreased) " (declaration) "int getAg();" (primitive_type) "int" (function_declarator) "getAg()" (identifier) "getAg" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//get agility " (declaration) "int getDmge();" (primitive_type) "int" (function_declarator) "getDmge()" (identifier) "getDmge" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int getItemCount();" (primitive_type) "int" (function_declarator) "getItemCount()" (identifier) "getItemCount" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void loseMoney();" (primitive_type) "void" (function_declarator) "loseMoney()" (identifier) "loseMoney" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//secondary " (}) "}" (expression_statement) ";" (;) ";" (function_definition) "class Warrior: public Hero \n{ \n public: \n Warrior(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}" (type_identifier) "class" (identifier) "Warrior" (ERROR) ": public Hero" (:) ":" (identifier) "public" (identifier) "Hero" (compound_statement) "{ \n public: \n Warrior(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}" ({) "{" (labeled_statement) "public: \n Warrior(string n, int h, int mP, int str, int dex, int ag);" (statement_identifier) "public" (:) ":" (declaration) "Warrior(string n, int h, int mP, int str, int dex, int ag);" (macro_type_specifier) "Warrior(string" (identifier) "Warrior" (() "(" (type_descriptor) "string" (type_identifier) "string" ()) "" (identifier) "n" (,) "," (identifier) "int" (ERROR) "h" (identifier) "h" (,) "," (identifier) "int" (ERROR) "mP" (identifier) "mP" (,) "," (identifier) "int" (ERROR) "str" (identifier) "str" (,) "," (identifier) "int" (ERROR) "dex" (identifier) "dex" (,) "," (identifier) "int" (ERROR) "ag)" (identifier) "ag" ()) ")" (;) ";" (declaration) "void printInfo();" (primitive_type) "void" (function_declarator) "printInfo()" (identifier) "printInfo" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void levelUp();" (primitive_type) "void" (function_declarator) "levelUp()" (identifier) "levelUp" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "class Sorcerer: public Hero \n{ \n public: \n Sorcerer(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}" (type_identifier) "class" (identifier) "Sorcerer" (ERROR) ": public Hero" (:) ":" (identifier) "public" (identifier) "Hero" (compound_statement) "{ \n public: \n Sorcerer(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}" ({) "{" (labeled_statement) "public: \n Sorcerer(string n, int h, int mP, int str, int dex, int ag);" (statement_identifier) "public" (:) ":" (declaration) "Sorcerer(string n, int h, int mP, int str, int dex, int ag);" (macro_type_specifier) "Sorcerer(string" (identifier) "Sorcerer" (() "(" (type_descriptor) "string" (type_identifier) "string" ()) "" (identifier) "n" (,) "," (identifier) "int" (ERROR) "h" (identifier) "h" (,) "," (identifier) "int" (ERROR) "mP" (identifier) "mP" (,) "," (identifier) "int" (ERROR) "str" (identifier) "str" (,) "," (identifier) "int" (ERROR) "dex" (identifier) "dex" (,) "," (identifier) "int" (ERROR) "ag)" (identifier) "ag" ()) ")" (;) ";" (declaration) "void printInfo();" (primitive_type) "void" (function_declarator) "printInfo()" (identifier) "printInfo" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void levelUp();" (primitive_type) "void" (function_declarator) "levelUp()" (identifier) "levelUp" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "class Paladin: public Hero \n{ \n public: \n Paladin(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}" (type_identifier) "class" (identifier) "Paladin" (ERROR) ": public Hero" (:) ":" (identifier) "public" (identifier) "Hero" (compound_statement) "{ \n public: \n Paladin(string n, int h, int mP, int str, int dex, int ag); \n void printInfo(); \n void levelUp(); \n}" ({) "{" (labeled_statement) "public: \n Paladin(string n, int h, int mP, int str, int dex, int ag);" (statement_identifier) "public" (:) ":" (declaration) "Paladin(string n, int h, int mP, int str, int dex, int ag);" (macro_type_specifier) "Paladin(string" (identifier) "Paladin" (() "(" (type_descriptor) "string" (type_identifier) "string" ()) "" (identifier) "n" (,) "," (identifier) "int" (ERROR) "h" (identifier) "h" (,) "," (identifier) "int" (ERROR) "mP" (identifier) "mP" (,) "," (identifier) "int" (ERROR) "str" (identifier) "str" (,) "," (identifier) "int" (ERROR) "dex" (identifier) "dex" (,) "," (identifier) "int" (ERROR) "ag)" (identifier) "ag" ()) ")" (;) ";" (declaration) "void printInfo();" (primitive_type) "void" (function_declarator) "printInfo()" (identifier) "printInfo" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void levelUp();" (primitive_type) "void" (function_declarator) "levelUp()" (identifier) "levelUp" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "//Monsters " (function_definition) "class Monster: public Living \n{ \n protected: \n int min_dmge, max_dmge, defense, agility; //main stats, can be decreased by the effect of a hero spell \n int base_min_dmge, base_max_dmge, base_defense, base_agility; //base stats, will never decrease by spell's effect \n public: \n Monster(string n, int h, int mid, int mad, int def, int ag); \n virtual ~Monster(){}; \n virtual void printInfo(); \n void attack(int& h, int ag, string n); \n void resetStats(); //resets stats to base stats (if they got decreased) \n void fixLevel(int lvl); \n int& getMin_dam(); \n int& getMax_dam(); \n int& getDef(); \n int& getAg(); \n}" (type_identifier) "class" (identifier) "Monster" (ERROR) ": public Living" (:) ":" (identifier) "public" (identifier) "Living" (compound_statement) "{ \n protected: \n int min_dmge, max_dmge, defense, agility; //main stats, can be decreased by the effect of a hero spell \n int base_min_dmge, base_max_dmge, base_defense, base_agility; //base stats, will never decrease by spell's effect \n public: \n Monster(string n, int h, int mid, int mad, int def, int ag); \n virtual ~Monster(){}; \n virtual void printInfo(); \n void attack(int& h, int ag, string n); \n void resetStats(); //resets stats to base stats (if they got decreased) \n void fixLevel(int lvl); \n int& getMin_dam(); \n int& getMax_dam(); \n int& getDef(); \n int& getAg(); \n}" ({) "{" (labeled_statement) "protected: \n int min_dmge, max_dmge, defense, agility;" (statement_identifier) "protected" (:) ":" (declaration) "int min_dmge, max_dmge, defense, agility;" (primitive_type) "int" (identifier) "min_dmge" (,) "," (identifier) "max_dmge" (,) "," (identifier) "defense" (,) "," (identifier) "agility" (;) ";" (comment) "//main stats, can be decreased by the effect of a hero spell " (declaration) "int base_min_dmge, base_max_dmge, base_defense, base_agility;" (primitive_type) "int" (identifier) "base_min_dmge" (,) "," (identifier) "base_max_dmge" (,) "," (identifier) "base_defense" (,) "," (identifier) "base_agility" (;) ";" (comment) "//base stats, will never decrease by spell's effect " (labeled_statement) "public: \n Monster(string n, int h, int mid, int mad, int def, int ag);" (statement_identifier) "public" (:) ":" (declaration) "Monster(string n, int h, int mid, int mad, int def, int ag);" (macro_type_specifier) "Monster(string" (identifier) "Monster" (() "(" (type_descriptor) "string" (type_identifier) "string" ()) "" (identifier) "n" (,) "," (identifier) "int" (ERROR) "h" (identifier) "h" (,) "," (identifier) "int" (ERROR) "mid" (identifier) "mid" (,) "," (identifier) "int" (ERROR) "mad" (identifier) "mad" (,) "," (identifier) "int" (ERROR) "def" (identifier) "def" (,) "," (identifier) "int" (ERROR) "ag)" (identifier) "ag" ()) ")" (;) ";" (function_definition) "virtual ~Monster(){}" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "Monster()" (identifier) "Monster" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (declaration) "virtual void printInfo();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "printInfo()" (identifier) "printInfo" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void attack(int& h, int ag, string n);" (primitive_type) "void" (function_declarator) "attack(int& h, int ag, string n)" (identifier) "attack" (parameter_list) "(int& h, int ag, string n)" (() "(" (parameter_declaration) "int& h" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "h" (,) "," (parameter_declaration) "int ag" (primitive_type) "int" (identifier) "ag" (,) "," (parameter_declaration) "string n" (type_identifier) "string" (identifier) "n" ()) ")" (;) ";" (declaration) "void resetStats();" (primitive_type) "void" (function_declarator) "resetStats()" (identifier) "resetStats" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//resets stats to base stats (if they got decreased) " (declaration) "void fixLevel(int lvl);" (primitive_type) "void" (function_declarator) "fixLevel(int lvl)" (identifier) "fixLevel" (parameter_list) "(int lvl)" (() "(" (parameter_declaration) "int lvl" (primitive_type) "int" (identifier) "lvl" ()) ")" (;) ";" (declaration) "int& getMin_dam();" (primitive_type) "int" (ERROR) "&" (&) "&" (function_declarator) "getMin_dam()" (identifier) "getMin_dam" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int& getMax_dam();" (primitive_type) "int" (ERROR) "&" (&) "&" (function_declarator) "getMax_dam()" (identifier) "getMax_dam" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int& getDef();" (primitive_type) "int" (ERROR) "&" (&) "&" (function_declarator) "getDef()" (identifier) "getDef" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int& getAg();" (primitive_type) "int" (ERROR) "&" (&) "&" (function_declarator) "getAg()" (identifier) "getAg" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "class Dragon: public Monster \n{ \n public: \n Dragon(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}" (type_identifier) "class" (ERROR) "Dragon: public" (identifier) "Dragon" (:) ":" (identifier) "public" (identifier) "Monster" (compound_statement) "{ \n public: \n Dragon(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}" ({) "{" (labeled_statement) "public: \n Dragon(string n, int h, int mid, int mad, int def, int ag);" (statement_identifier) "public" (:) ":" (declaration) "Dragon(string n, int h, int mid, int mad, int def, int ag);" (macro_type_specifier) "Dragon(string" (identifier) "Dragon" (() "(" (type_descriptor) "string" (type_identifier) "string" ()) "" (identifier) "n" (,) "," (identifier) "int" (ERROR) "h" (identifier) "h" (,) "," (identifier) "int" (ERROR) "mid" (identifier) "mid" (,) "," (identifier) "int" (ERROR) "mad" (identifier) "mad" (,) "," (identifier) "int" (ERROR) "def" (identifier) "def" (,) "," (identifier) "int" (ERROR) "ag)" (identifier) "ag" ()) ")" (;) ";" (declaration) "void printInfo();" (primitive_type) "void" (function_declarator) "printInfo()" (identifier) "printInfo" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "class Exoskeleton: public Monster \n{ \n public: \n Exoskeleton(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}" (type_identifier) "class" (identifier) "Exoskeleton" (ERROR) ": public Monster" (:) ":" (identifier) "public" (identifier) "Monster" (compound_statement) "{ \n public: \n Exoskeleton(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}" ({) "{" (labeled_statement) "public: \n Exoskeleton(string n, int h, int mid, int mad, int def, int ag);" (statement_identifier) "public" (:) ":" (declaration) "Exoskeleton(string n, int h, int mid, int mad, int def, int ag);" (macro_type_specifier) "Exoskeleton(string" (identifier) "Exoskeleton" (() "(" (type_descriptor) "string" (type_identifier) "string" ()) "" (identifier) "n" (,) "," (identifier) "int" (ERROR) "h" (identifier) "h" (,) "," (identifier) "int" (ERROR) "mid" (identifier) "mid" (,) "," (identifier) "int" (ERROR) "mad" (identifier) "mad" (,) "," (identifier) "int" (ERROR) "def" (identifier) "def" (,) "," (identifier) "int" (ERROR) "ag)" (identifier) "ag" ()) ")" (;) ";" (declaration) "void printInfo();" (primitive_type) "void" (function_declarator) "printInfo()" (identifier) "printInfo" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "class Spirit: public Monster \n{ \n public: \n Spirit(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}" (type_identifier) "class" (ERROR) "Spirit: public" (identifier) "Spirit" (:) ":" (identifier) "public" (identifier) "Monster" (compound_statement) "{ \n public: \n Spirit(string n, int h, int mid, int mad, int def, int ag); \n void printInfo(); \n}" ({) "{" (labeled_statement) "public: \n Spirit(string n, int h, int mid, int mad, int def, int ag);" (statement_identifier) "public" (:) ":" (declaration) "Spirit(string n, int h, int mid, int mad, int def, int ag);" (macro_type_specifier) "Spirit(string" (identifier) "Spirit" (() "(" (type_descriptor) "string" (type_identifier) "string" ()) "" (identifier) "n" (,) "," (identifier) "int" (ERROR) "h" (identifier) "h" (,) "," (identifier) "int" (ERROR) "mid" (identifier) "mid" (,) "," (identifier) "int" (ERROR) "mad" (identifier) "mad" (,) "," (identifier) "int" (ERROR) "def" (identifier) "def" (,) "," (identifier) "int" (ERROR) "ag)" (identifier) "ag" ()) ")" (;) ";" (declaration) "void printInfo();" (primitive_type) "void" (function_declarator) "printInfo()" (identifier) "printInfo" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// LIVING_H_INCLUDED "
979
70
{"language": "c", "success": true, "metadata": {"lines": 128, "avg_line_length": 30.39, "nodes": 578, "errors": 0, "source_hash": "874446791c4098dc1c65b68a5bd4cd731b55b2b6b313b8a5ef8d84eb0f2e6e24", "categorized_nodes": 388}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef LIVING_H_INCLUDED\r\n#define LIVING_H_INCLUDED\r\n\r\n#include <string>\r\n#include <vector>\r\n#include \"Spell.h\"\r\n#include \"Item.h\"\r\n\r\nusing namespace std;\r\n\r\nclass Living\r\n{\r\n protected:\r\n string name;\r\n int level, healthPower;\r\n int base_health;\r\n public:\r\n Living(string n, int h);\r\n virtual void printInfo();\r\n int& getHealth();\r\n string getName();\r\n};\r\n\r\n\r\n//Heroes\r\nclass Hero: public Living\r\n{\r\n protected:\r\n int magicPower, strength, dexterity, agility; //stats\r\n int money, experience, exp_cap, up_value, damage; //ex_cap = max exp before level up / up_value=value by which stats will be augmented\r\n\r\n vector<Item*> item;\r\n vector<Spell*> spell;\t\t\t\t\t\t\t\t\t\t//items and spells\r\n int capacity, item_count; //capacity of inventory, # of items present\r\n Item *weapon, *armor; //equipped weapon/armor.\r\n int agility_cap, base_magicPower; //because agility is the dodge rate of the hero, it cant be unlimited.\r\n\r\n\t\tint weap_pos, armor_pos;\r\n public:\r\n Hero(string n, int h, int mP, int str, int dex, int ag);\t//parameters are the stats above in the same order\r\n virtual ~Hero(){};\r\n virtual void printInfo();\r\n void getExp(int e);\r\n void getMoney(int m);\r\n virtual void levelUp()=0;\t\t\t\t\t//hero gains level - all stats increased (\"strong\" stat increased twice as much)\r\n\t\tint getLevel();\r\n void checkInventory();\r\n void equip(); //equip armor/weapons.\r\n void use(); //use potion.\r\n void attack(int& health, int ag);\r\n void buy(Item *i);\r\n void buy(Spell *s); //buy items/spells.\r\n\t\tvoid sell(int index);\t\t\t\t\t\t//sell item - spells can't be sold\r\n void castSpell(int& h, int& mid, int& mad, int& def, int& ag);\r\n void resetStats();\t\t\t\t\t\t\t//resets stats to base stats (if they got decreased)\r\n\r\n int getAg();\t\t\t\t\t\t\t\t//get agility\r\n\t\tint getDmge();\r\n\t\tint getItemCount();\r\n void loseMoney(); \t\t//secondary\r\n};\r\n\r\nclass Warrior: public Hero\r\n{\r\n public:\r\n Warrior(string n, int h, int mP, int str, int dex, int ag);\r\n void printInfo();\r\n void levelUp();\r\n};\r\n\r\nclass Sorcerer: public Hero\r\n{\r\n public:\r\n Sorcerer(string n, int h, int mP, int str, int dex, int ag);\r\n void printInfo();\r\n void levelUp();\r\n};\r\n\r\nclass Paladin: public Hero\r\n{\r\n public:\r\n Paladin(string n, int h, int mP, int str, int dex, int ag);\r\n void printInfo();\r\n void levelUp();\r\n};\r\n\r\n\r\n//Monsters\r\nclass Monster: public Living\r\n{\r\n protected:\r\n int min_dmge, max_dmge, defense, agility; \t//main stats, can be decreased by the effect of a hero spell\r\n int base_min_dmge, base_max_dmge, base_defense, base_agility; \t//base stats, will never decrease by spell's effect\r\n public:\r\n Monster(string n, int h, int mid, int mad, int def, int ag);\r\n virtual ~Monster(){};\r\n virtual void printInfo();\r\n void attack(int& h, int ag, string n);\r\n void resetStats();\t\t\t\t\t\t\t\t\t\t\t\t\t//resets stats to base stats (if they got decreased)\r\n void fixLevel(int lvl);\r\n int& getMin_dam();\r\n int& getMax_dam();\r\n int& getDef();\r\n int& getAg();\r\n};\r\n\r\nclass Dragon: public Monster\r\n{\r\n public:\r\n Dragon(string n, int h, int mid, int mad, int def, int ag);\r\n void printInfo();\r\n};\r\n\r\nclass Exoskeleton: public Monster\r\n{\r\n public:\r\n Exoskeleton(string n, int h, int mid, int mad, int def, int ag);\r\n void printInfo();\r\n};\r\n\r\nclass Spirit: public Monster\r\n{\r\n public:\r\n Spirit(string n, int h, int mid, int mad, int def, int ag);\r\n void printInfo();\r\n};\r\n\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 23, 63, 284, 320, 356, 392, 490, 519, 548, 577], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 127, "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": "LIVING_H_INCLUDED", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define LIVING_H_INCLUDED\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": "LIVING_H_INCLUDED", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include <string>\r\n", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<string>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <vector>\r\n", "parent": 0, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<vector>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include \"Spell.h\"\r\n", "parent": 0, "children": [13, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"Spell.h\"", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include \"Item.h\"\r\n", "parent": 0, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"Item.h\"", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 17}}, {"id": 18, "type": "declaration", "text": "using namespace std;", "parent": 0, "children": [19, 20, 21], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 20}}, {"id": 19, "type": "type_identifier", "text": "using", "parent": 18, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 5}}, {"id": 20, "type": "identifier", "text": "namespace", "parent": 18, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 15}}, {"id": 21, "type": "ERROR", "text": "std", "parent": 18, "children": [22], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 19}}, {"id": 22, "type": "identifier", "text": "std", "parent": 21, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 19}}, {"id": 23, "type": "function_definition", "text": "class Living\r\n{\r\n protected:\r\n string name;\r\n int level, healthPower;\r\n int base_health;\r\n public:\r\n Living(string n, int h);\r\n virtual void printInfo();\r\n int& getHealth();\r\n string getName();\r\n}", "parent": 0, "children": [24], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 24, "type": "identifier", "text": "Living", "parent": 23, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 12}}, {"id": 25, "type": "labeled_statement", "text": "protected:\r\n string name;", "parent": 23, "children": [26], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 13, "column": 20}}, {"id": 26, "type": "declaration", "text": "string name;", "parent": 25, "children": [27, 28], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 20}}, {"id": 27, "type": "type_identifier", "text": "string", "parent": 26, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 14}}, {"id": 28, "type": "identifier", "text": "name", "parent": 26, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 19}}, {"id": 29, "type": "declaration", "text": "int level, healthPower;", "parent": 23, "children": [30, 31, 32], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 31}}, {"id": 30, "type": "primitive_type", "text": "int", "parent": 29, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 11}}, {"id": 31, "type": "identifier", "text": "level", "parent": 29, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 17}}, {"id": 32, "type": "identifier", "text": "healthPower", "parent": 29, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 30}}, {"id": 33, "type": "declaration", "text": "int base_health;", "parent": 23, "children": [34, 35], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 24}}, {"id": 34, "type": "primitive_type", "text": "int", "parent": 33, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 11}}, {"id": 35, "type": "identifier", "text": "base_health", "parent": 33, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 23}}, {"id": 36, "type": "labeled_statement", "text": "public:\r\n Living(string n, int h);", "parent": 23, "children": [37], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 17, "column": 32}}, {"id": 37, "type": "declaration", "text": "Living(string n, int h);", "parent": 36, "children": [38, 42, 43, 44], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 32}}, {"id": 38, "type": "macro_type_specifier", "text": "Living(string", "parent": 37, "children": [39, 40], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 21}}, {"id": 39, "type": "identifier", "text": "Living", "parent": 38, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 14}}, {"id": 40, "type": "type_descriptor", "text": "string", "parent": 38, "children": [41], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 21}}, {"id": 41, "type": "type_identifier", "text": "string", "parent": 40, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 21}}, {"id": 42, "type": "identifier", "text": "n", "parent": 37, "children": [], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 23}}, {"id": 43, "type": "identifier", "text": "int", "parent": 37, "children": [], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 28}}, {"id": 44, "type": "ERROR", "text": "h)", "parent": 37, "children": [45], "start_point": {"row": 17, "column": 29}, "end_point": {"row": 17, "column": 31}}, {"id": 45, "type": "identifier", "text": "h", "parent": 44, "children": [], "start_point": {"row": 17, "column": 29}, "end_point": {"row": 17, "column": 30}}, {"id": 46, "type": "declaration", "text": "virtual void printInfo();", "parent": 23, "children": [47, 48, 50], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 33}}, {"id": 47, "type": "type_identifier", "text": "virtual", "parent": 46, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 15}}, {"id": 48, "type": "ERROR", "text": "void", "parent": 46, "children": [49], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 20}}, {"id": 49, "type": "identifier", "text": "void", "parent": 48, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 20}}, {"id": 50, "type": "function_declarator", "text": "printInfo()", "parent": 46, "children": [51, 52], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 32}}, {"id": 51, "type": "identifier", "text": "printInfo", "parent": 50, "children": [], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 30}}, {"id": 52, "type": "parameter_list", "text": "()", "parent": 50, "children": [], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 32}}, {"id": 53, "type": "declaration", "text": "int& getHealth();", "parent": 23, "children": [54, 55], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 25}}, {"id": 54, "type": "primitive_type", "text": "int", "parent": 53, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 11}}, {"id": 55, "type": "function_declarator", "text": "getHealth()", "parent": 53, "children": [56, 57], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 24}}, {"id": 56, "type": "identifier", "text": "getHealth", "parent": 55, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 22}}, {"id": 57, "type": "parameter_list", "text": "()", "parent": 55, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 24}}, {"id": 58, "type": "declaration", "text": "string getName();", "parent": 23, "children": [59, 60], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 25}}, {"id": 59, "type": "type_identifier", "text": "string", "parent": 58, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 14}}, {"id": 60, "type": "function_declarator", "text": "getName()", "parent": 58, "children": [61, 62], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 24}}, {"id": 61, "type": "identifier", "text": "getName", "parent": 60, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 22}}, {"id": 62, "type": "parameter_list", "text": "()", "parent": 60, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 24}}, {"id": 63, "type": "function_definition", "text": "class Hero: public Living\r\n{\r\n protected:\r\n int magicPower, strength, dexterity, agility; //stats\r\n int money, experience, exp_cap, up_value, damage; //ex_cap = max exp before level up / up_value=value by which stats will be augmented\r\n\r\n vector<Item*> item;\r\n vector<Spell*> spell;\t\t\t\t\t\t\t\t\t\t//items and spells\r\n int capacity, item_count; //capacity of inventory, # of items present\r\n Item *weapon, *armor; //equipped weapon/armor.\r\n int agility_cap, base_magicPower; //because agility is the dodge rate of the hero, it cant be unlimited.\r\n\r\n\t\tint weap_pos, armor_pos;\r\n public:\r\n Hero(string n, int h, int mP, int str, int dex, int ag);\t//parameters are the stats above in the same order\r\n virtual ~Hero(){};\r\n virtual void printInfo();\r\n void getExp(int e);\r\n void getMoney(int m);\r\n virtual void levelUp()=0;\t\t\t\t\t//hero gains level - all stats increased (\"strong\" stat increased twice as much)\r\n\t\tint getLevel();\r\n void checkInventory();\r\n void equip(); //equip armor/weapons.\r\n void use(); //use potion.\r\n void attack(int& health, int ag);\r\n void buy(Item *i);\r\n void buy(Spell *s); //buy items/spells.\r\n\t\tvoid sell(int index);\t\t\t\t\t\t//sell item - spells can't be sold\r\n void castSpell(int& h, int& mid, int& mad, int& def, int& ag);\r\n void resetStats();\t\t\t\t\t\t\t//resets stats to base stats (if they got decreased)\r\n\r\n int getAg();\t\t\t\t\t\t\t\t//get agility\r\n\t\tint getDmge();\r\n\t\tint getItemCount();\r\n void loseMoney(); \t\t//secondary\r\n}", "parent": 0, "children": [64, 66], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 64, "type": "ERROR", "text": "Hero: public", "parent": 63, "children": [65], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 18}}, {"id": 65, "type": "identifier", "text": "Hero", "parent": 64, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 10}}, {"id": 66, "type": "identifier", "text": "Living", "parent": 63, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 25}}, {"id": 67, "type": "labeled_statement", "text": "protected:\r\n int magicPower, strength, dexterity, agility;", "parent": 63, "children": [68], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 28, "column": 53}}, {"id": 68, "type": "declaration", "text": "int magicPower, strength, dexterity, agility;", "parent": 67, "children": [69, 70, 71, 72, 73], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 53}}, {"id": 69, "type": "primitive_type", "text": "int", "parent": 68, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 11}}, {"id": 70, "type": "identifier", "text": "magicPower", "parent": 68, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 22}}, {"id": 71, "type": "identifier", "text": "strength", "parent": 68, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 32}}, {"id": 72, "type": "identifier", "text": "dexterity", "parent": 68, "children": [], "start_point": {"row": 28, "column": 34}, "end_point": {"row": 28, "column": 43}}, {"id": 73, "type": "identifier", "text": "agility", "parent": 68, "children": [], "start_point": {"row": 28, "column": 45}, "end_point": {"row": 28, "column": 52}}, {"id": 74, "type": "declaration", "text": "int money, experience, exp_cap, up_value, damage;", "parent": 63, "children": [75, 76, 77, 78, 79, 80], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 57}}, {"id": 75, "type": "primitive_type", "text": "int", "parent": 74, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 11}}, {"id": 76, "type": "identifier", "text": "money", "parent": 74, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 17}}, {"id": 77, "type": "identifier", "text": "experience", "parent": 74, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 29}}, {"id": 78, "type": "identifier", "text": "exp_cap", "parent": 74, "children": [], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 38}}, {"id": 79, "type": "identifier", "text": "up_value", "parent": 74, "children": [], "start_point": {"row": 29, "column": 40}, "end_point": {"row": 29, "column": 48}}, {"id": 80, "type": "identifier", "text": "damage", "parent": 74, "children": [], "start_point": {"row": 29, "column": 50}, "end_point": {"row": 29, "column": 56}}, {"id": 81, "type": "binary_expression", "text": "vector<Item*> item", "parent": 63, "children": [82, 86, 88, 89], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 26}}, {"id": 82, "type": "binary_expression", "text": "vector<Item", "parent": 81, "children": [83, 84, 85], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 19}}, {"id": 83, "type": "identifier", "text": "vector", "parent": 82, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 14}}, {"id": 84, "type": "<", "text": "<", "parent": 82, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 15}}, {"id": 85, "type": "identifier", "text": "Item", "parent": 82, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 19}}, {"id": 86, "type": "ERROR", "text": "*", "parent": 81, "children": [87], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 20}}, {"id": 87, "type": "*", "text": "*", "parent": 86, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 20}}, {"id": 88, "type": ">", "text": ">", "parent": 81, "children": [], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 21}}, {"id": 89, "type": "identifier", "text": "item", "parent": 81, "children": [], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 26}}, {"id": 90, "type": "binary_expression", "text": "vector<Spell*> spell", "parent": 63, "children": [91, 95, 97, 98], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 28}}, {"id": 91, "type": "binary_expression", "text": "vector<Spell", "parent": 90, "children": [92, 93, 94], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 20}}, {"id": 92, "type": "identifier", "text": "vector", "parent": 91, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 14}}, {"id": 93, "type": "<", "text": "<", "parent": 91, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 15}}, {"id": 94, "type": "identifier", "text": "Spell", "parent": 91, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 20}}, {"id": 95, "type": "ERROR", "text": "*", "parent": 90, "children": [96], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 21}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 21}}, {"id": 97, "type": ">", "text": ">", "parent": 90, "children": [], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 22}}, {"id": 98, "type": "identifier", "text": "spell", "parent": 90, "children": [], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 28}}, {"id": 99, "type": "declaration", "text": "int capacity, item_count;", "parent": 63, "children": [100, 101, 102], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 33}}, {"id": 100, "type": "primitive_type", "text": "int", "parent": 99, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 11}}, {"id": 101, "type": "identifier", "text": "capacity", "parent": 99, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 20}}, {"id": 102, "type": "identifier", "text": "item_count", "parent": 99, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 32}}, {"id": 103, "type": "declaration", "text": "Item *weapon, *armor;", "parent": 63, "children": [104, 105, 108], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 29}}, {"id": 104, "type": "type_identifier", "text": "Item", "parent": 103, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 12}}, {"id": 105, "type": "pointer_declarator", "text": "*weapon", "parent": 103, "children": [106, 107], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 20}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 14}}, {"id": 107, "type": "identifier", "text": "weapon", "parent": 105, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 20}}, {"id": 108, "type": "pointer_declarator", "text": "*armor", "parent": 103, "children": [109, 110], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 28}}, {"id": 109, "type": "*", "text": "*", "parent": 108, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 23}}, {"id": 110, "type": "identifier", "text": "armor", "parent": 108, "children": [], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 28}}, {"id": 111, "type": "declaration", "text": "int agility_cap, base_magicPower;", "parent": 63, "children": [112, 113, 114], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 41}}, {"id": 112, "type": "primitive_type", "text": "int", "parent": 111, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 11}}, {"id": 113, "type": "identifier", "text": "agility_cap", "parent": 111, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 23}}, {"id": 114, "type": "identifier", "text": "base_magicPower", "parent": 111, "children": [], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 40}}, {"id": 115, "type": "declaration", "text": "int weap_pos, armor_pos;", "parent": 63, "children": [116, 117, 118], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 26}}, {"id": 116, "type": "primitive_type", "text": "int", "parent": 115, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 5}}, {"id": 117, "type": "identifier", "text": "weap_pos", "parent": 115, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 14}}, {"id": 118, "type": "identifier", "text": "armor_pos", "parent": 115, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 25}}, {"id": 119, "type": "labeled_statement", "text": "public:\r\n Hero(string n, int h, int mP, int str, int dex, int ag);", "parent": 63, "children": [120], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 39, "column": 64}}, {"id": 120, "type": "declaration", "text": "Hero(string n, int h, int mP, int str, int dex, int ag);", "parent": 119, "children": [121, 125, 126, 127, 129, 130, 132, 133, 135, 136, 138, 139], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 64}}, {"id": 121, "type": "macro_type_specifier", "text": "Hero(string", "parent": 120, "children": [122, 123], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 19}}, {"id": 122, "type": "identifier", "text": "Hero", "parent": 121, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 12}}, {"id": 123, "type": "type_descriptor", "text": "string", "parent": 121, "children": [124], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 19}}, {"id": 124, "type": "type_identifier", "text": "string", "parent": 123, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 19}}, {"id": 125, "type": "identifier", "text": "n", "parent": 120, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 21}}, {"id": 126, "type": "identifier", "text": "int", "parent": 120, "children": [], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 26}}, {"id": 127, "type": "ERROR", "text": "h", "parent": 120, "children": [128], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 28}}, {"id": 128, "type": "identifier", "text": "h", "parent": 127, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 28}}, {"id": 129, "type": "identifier", "text": "int", "parent": 120, "children": [], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 33}}, {"id": 130, "type": "ERROR", "text": "mP", "parent": 120, "children": [131], "start_point": {"row": 39, "column": 34}, "end_point": {"row": 39, "column": 36}}, {"id": 131, "type": "identifier", "text": "mP", "parent": 130, "children": [], "start_point": {"row": 39, "column": 34}, "end_point": {"row": 39, "column": 36}}, {"id": 132, "type": "identifier", "text": "int", "parent": 120, "children": [], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 39, "column": 41}}, {"id": 133, "type": "ERROR", "text": "str", "parent": 120, "children": [134], "start_point": {"row": 39, "column": 42}, "end_point": {"row": 39, "column": 45}}, {"id": 134, "type": "identifier", "text": "str", "parent": 133, "children": [], "start_point": {"row": 39, "column": 42}, "end_point": {"row": 39, "column": 45}}, {"id": 135, "type": "identifier", "text": "int", "parent": 120, "children": [], "start_point": {"row": 39, "column": 47}, "end_point": {"row": 39, "column": 50}}, {"id": 136, "type": "ERROR", "text": "dex", "parent": 120, "children": [137], "start_point": {"row": 39, "column": 51}, "end_point": {"row": 39, "column": 54}}, {"id": 137, "type": "identifier", "text": "dex", "parent": 136, "children": [], "start_point": {"row": 39, "column": 51}, "end_point": {"row": 39, "column": 54}}, {"id": 138, "type": "identifier", "text": "int", "parent": 120, "children": [], "start_point": {"row": 39, "column": 56}, "end_point": {"row": 39, "column": 59}}, {"id": 139, "type": "ERROR", "text": "ag)", "parent": 120, "children": [140], "start_point": {"row": 39, "column": 60}, "end_point": {"row": 39, "column": 63}}, {"id": 140, "type": "identifier", "text": "ag", "parent": 139, "children": [], "start_point": {"row": 39, "column": 60}, "end_point": {"row": 39, "column": 62}}, {"id": 141, "type": "function_definition", "text": "virtual ~Hero(){}", "parent": 63, "children": [142, 143, 145], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 25}}, {"id": 142, "type": "type_identifier", "text": "virtual", "parent": 141, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 15}}, {"id": 143, "type": "ERROR", "text": "~", "parent": 141, "children": [144], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 17}}, {"id": 144, "type": "~", "text": "~", "parent": 143, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 17}}, {"id": 145, "type": "function_declarator", "text": "Hero()", "parent": 141, "children": [146, 147], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 23}}, {"id": 146, "type": "identifier", "text": "Hero", "parent": 145, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 21}}, {"id": 147, "type": "parameter_list", "text": "()", "parent": 145, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 23}}, {"id": 148, "type": "declaration", "text": "virtual void printInfo();", "parent": 63, "children": [149, 150, 152], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 33}}, {"id": 149, "type": "type_identifier", "text": "virtual", "parent": 148, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 15}}, {"id": 150, "type": "ERROR", "text": "void", "parent": 148, "children": [151], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 20}}, {"id": 151, "type": "identifier", "text": "void", "parent": 150, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 20}}, {"id": 152, "type": "function_declarator", "text": "printInfo()", "parent": 148, "children": [153, 154], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 32}}, {"id": 153, "type": "identifier", "text": "printInfo", "parent": 152, "children": [], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 30}}, {"id": 154, "type": "parameter_list", "text": "()", "parent": 152, "children": [], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 32}}, {"id": 155, "type": "declaration", "text": "void getExp(int e);", "parent": 63, "children": [156, 157], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 27}}, {"id": 156, "type": "primitive_type", "text": "void", "parent": 155, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 12}}, {"id": 157, "type": "function_declarator", "text": "getExp(int e)", "parent": 155, "children": [158, 159], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 26}}, {"id": 158, "type": "identifier", "text": "getExp", "parent": 157, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 19}}, {"id": 159, "type": "parameter_list", "text": "(int e)", "parent": 157, "children": [160], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 26}}, {"id": 160, "type": "parameter_declaration", "text": "int e", "parent": 159, "children": [161, 162], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 25}}, {"id": 161, "type": "primitive_type", "text": "int", "parent": 160, "children": [], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 23}}, {"id": 162, "type": "identifier", "text": "e", "parent": 160, "children": [], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 25}}, {"id": 163, "type": "declaration", "text": "void getMoney(int m);", "parent": 63, "children": [164, 165], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 29}}, {"id": 164, "type": "primitive_type", "text": "void", "parent": 163, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 12}}, {"id": 165, "type": "function_declarator", "text": "getMoney(int m)", "parent": 163, "children": [166, 167], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 28}}, {"id": 166, "type": "identifier", "text": "getMoney", "parent": 165, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 21}}, {"id": 167, "type": "parameter_list", "text": "(int m)", "parent": 165, "children": [168], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 28}}, {"id": 168, "type": "parameter_declaration", "text": "int m", "parent": 167, "children": [169, 170], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 27}}, {"id": 169, "type": "primitive_type", "text": "int", "parent": 168, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 25}}, {"id": 170, "type": "identifier", "text": "m", "parent": 168, "children": [], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 27}}, {"id": 171, "type": "declaration", "text": "virtual void levelUp()=0;", "parent": 63, "children": [172, 173, 175], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 33}}, {"id": 172, "type": "type_identifier", "text": "virtual", "parent": 171, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 15}}, {"id": 173, "type": "ERROR", "text": "void", "parent": 171, "children": [174], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 20}}, {"id": 174, "type": "identifier", "text": "void", "parent": 173, "children": [], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 20}}, {"id": 175, "type": "init_declarator", "text": "levelUp()=0", "parent": 171, "children": [176, 179, 180], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 32}}, {"id": 176, "type": "function_declarator", "text": "levelUp()", "parent": 175, "children": [177, 178], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 30}}, {"id": 177, "type": "identifier", "text": "levelUp", "parent": 176, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 28}}, {"id": 178, "type": "parameter_list", "text": "()", "parent": 176, "children": [], "start_point": {"row": 44, "column": 28}, "end_point": {"row": 44, "column": 30}}, {"id": 179, "type": "=", "text": "=", "parent": 175, "children": [], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 31}}, {"id": 180, "type": "number_literal", "text": "0", "parent": 175, "children": [], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 32}}, {"id": 181, "type": "declaration", "text": "int getLevel();", "parent": 63, "children": [182, 183], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 17}}, {"id": 182, "type": "primitive_type", "text": "int", "parent": 181, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 5}}, {"id": 183, "type": "function_declarator", "text": "getLevel()", "parent": 181, "children": [184, 185], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 16}}, {"id": 184, "type": "identifier", "text": "getLevel", "parent": 183, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 14}}, {"id": 185, "type": "parameter_list", "text": "()", "parent": 183, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 16}}, {"id": 186, "type": "declaration", "text": "void checkInventory();", "parent": 63, "children": [187, 188], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 30}}, {"id": 187, "type": "primitive_type", "text": "void", "parent": 186, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 12}}, {"id": 188, "type": "function_declarator", "text": "checkInventory()", "parent": 186, "children": [189, 190], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 29}}, {"id": 189, "type": "identifier", "text": "checkInventory", "parent": 188, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 27}}, {"id": 190, "type": "parameter_list", "text": "()", "parent": 188, "children": [], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 29}}, {"id": 191, "type": "declaration", "text": "void equip();", "parent": 63, "children": [192, 193], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 21}}, {"id": 192, "type": "primitive_type", "text": "void", "parent": 191, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 12}}, {"id": 193, "type": "function_declarator", "text": "equip()", "parent": 191, "children": [194, 195], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 20}}, {"id": 194, "type": "identifier", "text": "equip", "parent": 193, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 18}}, {"id": 195, "type": "parameter_list", "text": "()", "parent": 193, "children": [], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 20}}, {"id": 196, "type": "declaration", "text": "void use();", "parent": 63, "children": [197, 198], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 19}}, {"id": 197, "type": "primitive_type", "text": "void", "parent": 196, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 12}}, {"id": 198, "type": "function_declarator", "text": "use()", "parent": 196, "children": [199, 200], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 18}}, {"id": 199, "type": "identifier", "text": "use", "parent": 198, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 16}}, {"id": 200, "type": "parameter_list", "text": "()", "parent": 198, "children": [], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 18}}, {"id": 201, "type": "declaration", "text": "void attack(int& health, int ag);", "parent": 63, "children": [202, 203], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 41}}, {"id": 202, "type": "primitive_type", "text": "void", "parent": 201, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 12}}, {"id": 203, "type": "function_declarator", "text": "attack(int& health, int ag)", "parent": 201, "children": [204, 205], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 40}}, {"id": 204, "type": "identifier", "text": "attack", "parent": 203, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 19}}, {"id": 205, "type": "parameter_list", "text": "(int& health, int ag)", "parent": 203, "children": [206, 209], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 40}}, {"id": 206, "type": "parameter_declaration", "text": "int& health", "parent": 205, "children": [207, 208], "start_point": {"row": 49, "column": 20}, "end_point": {"row": 49, "column": 31}}, {"id": 207, "type": "primitive_type", "text": "int", "parent": 206, "children": [], "start_point": {"row": 49, "column": 20}, "end_point": {"row": 49, "column": 23}}, {"id": 208, "type": "identifier", "text": "health", "parent": 206, "children": [], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 31}}, {"id": 209, "type": "parameter_declaration", "text": "int ag", "parent": 205, "children": [210, 211], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 49, "column": 39}}, {"id": 210, "type": "primitive_type", "text": "int", "parent": 209, "children": [], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 49, "column": 36}}, {"id": 211, "type": "identifier", "text": "ag", "parent": 209, "children": [], "start_point": {"row": 49, "column": 37}, "end_point": {"row": 49, "column": 39}}, {"id": 212, "type": "declaration", "text": "void buy(Item *i);", "parent": 63, "children": [213, 214], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 26}}, {"id": 213, "type": "primitive_type", "text": "void", "parent": 212, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 12}}, {"id": 214, "type": "function_declarator", "text": "buy(Item *i)", "parent": 212, "children": [215, 216], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 25}}, {"id": 215, "type": "identifier", "text": "buy", "parent": 214, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 16}}, {"id": 216, "type": "parameter_list", "text": "(Item *i)", "parent": 214, "children": [217], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 25}}, {"id": 217, "type": "parameter_declaration", "text": "Item *i", "parent": 216, "children": [218, 219], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 24}}, {"id": 218, "type": "type_identifier", "text": "Item", "parent": 217, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 21}}, {"id": 219, "type": "pointer_declarator", "text": "*i", "parent": 217, "children": [220, 221], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 24}}, {"id": 220, "type": "*", "text": "*", "parent": 219, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 23}}, {"id": 221, "type": "identifier", "text": "i", "parent": 219, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 24}}, {"id": 222, "type": "declaration", "text": "void buy(Spell *s);", "parent": 63, "children": [223, 224], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 27}}, {"id": 223, "type": "primitive_type", "text": "void", "parent": 222, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 12}}, {"id": 224, "type": "function_declarator", "text": "buy(Spell *s)", "parent": 222, "children": [225, 226], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 26}}, {"id": 225, "type": "identifier", "text": "buy", "parent": 224, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 16}}, {"id": 226, "type": "parameter_list", "text": "(Spell *s)", "parent": 224, "children": [227], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 26}}, {"id": 227, "type": "parameter_declaration", "text": "Spell *s", "parent": 226, "children": [228, 229], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 25}}, {"id": 228, "type": "type_identifier", "text": "Spell", "parent": 227, "children": [], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 22}}, {"id": 229, "type": "pointer_declarator", "text": "*s", "parent": 227, "children": [230, 231], "start_point": {"row": 51, "column": 23}, "end_point": {"row": 51, "column": 25}}, {"id": 230, "type": "*", "text": "*", "parent": 229, "children": [], "start_point": {"row": 51, "column": 23}, "end_point": {"row": 51, "column": 24}}, {"id": 231, "type": "identifier", "text": "s", "parent": 229, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 25}}, {"id": 232, "type": "declaration", "text": "void sell(int index);", "parent": 63, "children": [233, 234], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 23}}, {"id": 233, "type": "primitive_type", "text": "void", "parent": 232, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 6}}, {"id": 234, "type": "function_declarator", "text": "sell(int index)", "parent": 232, "children": [235, 236], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 22}}, {"id": 235, "type": "identifier", "text": "sell", "parent": 234, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 11}}, {"id": 236, "type": "parameter_list", "text": "(int index)", "parent": 234, "children": [237], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 22}}, {"id": 237, "type": "parameter_declaration", "text": "int index", "parent": 236, "children": [238, 239], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 21}}, {"id": 238, "type": "primitive_type", "text": "int", "parent": 237, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 15}}, {"id": 239, "type": "identifier", "text": "index", "parent": 237, "children": [], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 21}}, {"id": 240, "type": "declaration", "text": "void castSpell(int& h, int& mid, int& mad, int& def, int& ag);", "parent": 63, "children": [241, 242], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 70}}, {"id": 241, "type": "primitive_type", "text": "void", "parent": 240, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 12}}, {"id": 242, "type": "function_declarator", "text": "castSpell(int& h, int& mid, int& mad, int& def, int& ag)", "parent": 240, "children": [243, 244], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 69}}, {"id": 243, "type": "identifier", "text": "castSpell", "parent": 242, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 22}}, {"id": 244, "type": "parameter_list", "text": "(int& h, int& mid, int& mad, int& def, int& ag)", "parent": 242, "children": [245, 248, 251, 254, 256], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 69}}, {"id": 245, "type": "parameter_declaration", "text": "int& h", "parent": 244, "children": [246, 247], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 29}}, {"id": 246, "type": "primitive_type", "text": "int", "parent": 245, "children": [], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 26}}, {"id": 247, "type": "identifier", "text": "h", "parent": 245, "children": [], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 29}}, {"id": 248, "type": "parameter_declaration", "text": "int& mid", "parent": 244, "children": [249, 250], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 39}}, {"id": 249, "type": "primitive_type", "text": "int", "parent": 248, "children": [], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 34}}, {"id": 250, "type": "identifier", "text": "mid", "parent": 248, "children": [], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 53, "column": 39}}, {"id": 251, "type": "parameter_declaration", "text": "int& mad", "parent": 244, "children": [252, 253], "start_point": {"row": 53, "column": 41}, "end_point": {"row": 53, "column": 49}}, {"id": 252, "type": "primitive_type", "text": "int", "parent": 251, "children": [], "start_point": {"row": 53, "column": 41}, "end_point": {"row": 53, "column": 44}}, {"id": 253, "type": "identifier", "text": "mad", "parent": 251, "children": [], "start_point": {"row": 53, "column": 46}, "end_point": {"row": 53, "column": 49}}, {"id": 254, "type": "parameter_declaration", "text": "int& def", "parent": 244, "children": [255], "start_point": {"row": 53, "column": 51}, "end_point": {"row": 53, "column": 59}}, {"id": 255, "type": "primitive_type", "text": "int", "parent": 254, "children": [], "start_point": {"row": 53, "column": 51}, "end_point": {"row": 53, "column": 54}}, {"id": 256, "type": "parameter_declaration", "text": "int& ag", "parent": 244, "children": [257, 258], "start_point": {"row": 53, "column": 61}, "end_point": {"row": 53, "column": 68}}, {"id": 257, "type": "primitive_type", "text": "int", "parent": 256, "children": [], "start_point": {"row": 53, "column": 61}, "end_point": {"row": 53, "column": 64}}, {"id": 258, "type": "identifier", "text": "ag", "parent": 256, "children": [], "start_point": {"row": 53, "column": 66}, "end_point": {"row": 53, "column": 68}}, {"id": 259, "type": "declaration", "text": "void resetStats();", "parent": 63, "children": [260, 261], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 26}}, {"id": 260, "type": "primitive_type", "text": "void", "parent": 259, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 12}}, {"id": 261, "type": "function_declarator", "text": "resetStats()", "parent": 259, "children": [262, 263], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 25}}, {"id": 262, "type": "identifier", "text": "resetStats", "parent": 261, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 23}}, {"id": 263, "type": "parameter_list", "text": "()", "parent": 261, "children": [], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 25}}, {"id": 264, "type": "declaration", "text": "int getAg();", "parent": 63, "children": [265, 266], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 20}}, {"id": 265, "type": "primitive_type", "text": "int", "parent": 264, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 11}}, {"id": 266, "type": "function_declarator", "text": "getAg()", "parent": 264, "children": [267, 268], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 19}}, {"id": 267, "type": "identifier", "text": "getAg", "parent": 266, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 17}}, {"id": 268, "type": "parameter_list", "text": "()", "parent": 266, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 19}}, {"id": 269, "type": "declaration", "text": "int getDmge();", "parent": 63, "children": [270, 271], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 16}}, {"id": 270, "type": "primitive_type", "text": "int", "parent": 269, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 5}}, {"id": 271, "type": "function_declarator", "text": "getDmge()", "parent": 269, "children": [272, 273], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 15}}, {"id": 272, "type": "identifier", "text": "getDmge", "parent": 271, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 13}}, {"id": 273, "type": "parameter_list", "text": "()", "parent": 271, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 15}}, {"id": 274, "type": "declaration", "text": "int getItemCount();", "parent": 63, "children": [275, 276], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 21}}, {"id": 275, "type": "primitive_type", "text": "int", "parent": 274, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 5}}, {"id": 276, "type": "function_declarator", "text": "getItemCount()", "parent": 274, "children": [277, 278], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 20}}, {"id": 277, "type": "identifier", "text": "getItemCount", "parent": 276, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 18}}, {"id": 278, "type": "parameter_list", "text": "()", "parent": 276, "children": [], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 20}}, {"id": 279, "type": "declaration", "text": "void loseMoney();", "parent": 63, "children": [280, 281], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 25}}, {"id": 280, "type": "primitive_type", "text": "void", "parent": 279, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 12}}, {"id": 281, "type": "function_declarator", "text": "loseMoney()", "parent": 279, "children": [282, 283], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 24}}, {"id": 282, "type": "identifier", "text": "loseMoney", "parent": 281, "children": [], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 22}}, {"id": 283, "type": "parameter_list", "text": "()", "parent": 281, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 24}}, {"id": 284, "type": "function_definition", "text": "class Warrior: public Hero\r\n{\r\n public:\r\n Warrior(string n, int h, int mP, int str, int dex, int ag);\r\n void printInfo();\r\n void levelUp();\r\n}", "parent": 0, "children": [285, 286], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 68, "column": 1}}, {"id": 285, "type": "identifier", "text": "Warrior", "parent": 284, "children": [], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 13}}, {"id": 286, "type": "ERROR", "text": ": public Hero", "parent": 284, "children": [287], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 26}}, {"id": 287, "type": "identifier", "text": "Hero", "parent": 286, "children": [], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 26}}, {"id": 288, "type": "labeled_statement", "text": "public:\r\n Warrior(string n, int h, int mP, int str, int dex, int ag);", "parent": 284, "children": [289], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 65, "column": 67}}, {"id": 289, "type": "declaration", "text": "Warrior(string n, int h, int mP, int str, int dex, int ag);", "parent": 288, "children": [290, 294, 295, 296, 298, 299, 301, 302, 304, 305, 307, 308], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 67}}, {"id": 290, "type": "macro_type_specifier", "text": "Warrior(string", "parent": 289, "children": [291, 292], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 22}}, {"id": 291, "type": "identifier", "text": "Warrior", "parent": 290, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 15}}, {"id": 292, "type": "type_descriptor", "text": "string", "parent": 290, "children": [293], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 22}}, {"id": 293, "type": "type_identifier", "text": "string", "parent": 292, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 22}}, {"id": 294, "type": "identifier", "text": "n", "parent": 289, "children": [], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 24}}, {"id": 295, "type": "identifier", "text": "int", "parent": 289, "children": [], "start_point": {"row": 65, "column": 26}, "end_point": {"row": 65, "column": 29}}, {"id": 296, "type": "ERROR", "text": "h", "parent": 289, "children": [297], "start_point": {"row": 65, "column": 30}, "end_point": {"row": 65, "column": 31}}, {"id": 297, "type": "identifier", "text": "h", "parent": 296, "children": [], "start_point": {"row": 65, "column": 30}, "end_point": {"row": 65, "column": 31}}, {"id": 298, "type": "identifier", "text": "int", "parent": 289, "children": [], "start_point": {"row": 65, "column": 33}, "end_point": {"row": 65, "column": 36}}, {"id": 299, "type": "ERROR", "text": "mP", "parent": 289, "children": [300], "start_point": {"row": 65, "column": 37}, "end_point": {"row": 65, "column": 39}}, {"id": 300, "type": "identifier", "text": "mP", "parent": 299, "children": [], "start_point": {"row": 65, "column": 37}, "end_point": {"row": 65, "column": 39}}, {"id": 301, "type": "identifier", "text": "int", "parent": 289, "children": [], "start_point": {"row": 65, "column": 41}, "end_point": {"row": 65, "column": 44}}, {"id": 302, "type": "ERROR", "text": "str", "parent": 289, "children": [303], "start_point": {"row": 65, "column": 45}, "end_point": {"row": 65, "column": 48}}, {"id": 303, "type": "identifier", "text": "str", "parent": 302, "children": [], "start_point": {"row": 65, "column": 45}, "end_point": {"row": 65, "column": 48}}, {"id": 304, "type": "identifier", "text": "int", "parent": 289, "children": [], "start_point": {"row": 65, "column": 50}, "end_point": {"row": 65, "column": 53}}, {"id": 305, "type": "ERROR", "text": "dex", "parent": 289, "children": [306], "start_point": {"row": 65, "column": 54}, "end_point": {"row": 65, "column": 57}}, {"id": 306, "type": "identifier", "text": "dex", "parent": 305, "children": [], "start_point": {"row": 65, "column": 54}, "end_point": {"row": 65, "column": 57}}, {"id": 307, "type": "identifier", "text": "int", "parent": 289, "children": [], "start_point": {"row": 65, "column": 59}, "end_point": {"row": 65, "column": 62}}, {"id": 308, "type": "ERROR", "text": "ag)", "parent": 289, "children": [309], "start_point": {"row": 65, "column": 63}, "end_point": {"row": 65, "column": 66}}, {"id": 309, "type": "identifier", "text": "ag", "parent": 308, "children": [], "start_point": {"row": 65, "column": 63}, "end_point": {"row": 65, "column": 65}}, {"id": 310, "type": "declaration", "text": "void printInfo();", "parent": 284, "children": [311, 312], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 25}}, {"id": 311, "type": "primitive_type", "text": "void", "parent": 310, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 12}}, {"id": 312, "type": "function_declarator", "text": "printInfo()", "parent": 310, "children": [313, 314], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 24}}, {"id": 313, "type": "identifier", "text": "printInfo", "parent": 312, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 22}}, {"id": 314, "type": "parameter_list", "text": "()", "parent": 312, "children": [], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 24}}, {"id": 315, "type": "declaration", "text": "void levelUp();", "parent": 284, "children": [316, 317], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 23}}, {"id": 316, "type": "primitive_type", "text": "void", "parent": 315, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 12}}, {"id": 317, "type": "function_declarator", "text": "levelUp()", "parent": 315, "children": [318, 319], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 22}}, {"id": 318, "type": "identifier", "text": "levelUp", "parent": 317, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 20}}, {"id": 319, "type": "parameter_list", "text": "()", "parent": 317, "children": [], "start_point": {"row": 67, "column": 20}, "end_point": {"row": 67, "column": 22}}, {"id": 320, "type": "function_definition", "text": "class Sorcerer: public Hero\r\n{\r\n public:\r\n Sorcerer(string n, int h, int mP, int str, int dex, int ag);\r\n void printInfo();\r\n void levelUp();\r\n}", "parent": 0, "children": [321, 322], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 76, "column": 1}}, {"id": 321, "type": "identifier", "text": "Sorcerer", "parent": 320, "children": [], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 14}}, {"id": 322, "type": "ERROR", "text": ": public Hero", "parent": 320, "children": [323], "start_point": {"row": 70, "column": 14}, "end_point": {"row": 70, "column": 27}}, {"id": 323, "type": "identifier", "text": "Hero", "parent": 322, "children": [], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 27}}, {"id": 324, "type": "labeled_statement", "text": "public:\r\n Sorcerer(string n, int h, int mP, int str, int dex, int ag);", "parent": 320, "children": [325], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 73, "column": 68}}, {"id": 325, "type": "declaration", "text": "Sorcerer(string n, int h, int mP, int str, int dex, int ag);", "parent": 324, "children": [326, 330, 331, 332, 334, 335, 337, 338, 340, 341, 343, 344], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 68}}, {"id": 326, "type": "macro_type_specifier", "text": "Sorcerer(string", "parent": 325, "children": [327, 328], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 23}}, {"id": 327, "type": "identifier", "text": "Sorcerer", "parent": 326, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 16}}, {"id": 328, "type": "type_descriptor", "text": "string", "parent": 326, "children": [329], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 23}}, {"id": 329, "type": "type_identifier", "text": "string", "parent": 328, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 23}}, {"id": 330, "type": "identifier", "text": "n", "parent": 325, "children": [], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 25}}, {"id": 331, "type": "identifier", "text": "int", "parent": 325, "children": [], "start_point": {"row": 73, "column": 27}, "end_point": {"row": 73, "column": 30}}, {"id": 332, "type": "ERROR", "text": "h", "parent": 325, "children": [333], "start_point": {"row": 73, "column": 31}, "end_point": {"row": 73, "column": 32}}, {"id": 333, "type": "identifier", "text": "h", "parent": 332, "children": [], "start_point": {"row": 73, "column": 31}, "end_point": {"row": 73, "column": 32}}, {"id": 334, "type": "identifier", "text": "int", "parent": 325, "children": [], "start_point": {"row": 73, "column": 34}, "end_point": {"row": 73, "column": 37}}, {"id": 335, "type": "ERROR", "text": "mP", "parent": 325, "children": [336], "start_point": {"row": 73, "column": 38}, "end_point": {"row": 73, "column": 40}}, {"id": 336, "type": "identifier", "text": "mP", "parent": 335, "children": [], "start_point": {"row": 73, "column": 38}, "end_point": {"row": 73, "column": 40}}, {"id": 337, "type": "identifier", "text": "int", "parent": 325, "children": [], "start_point": {"row": 73, "column": 42}, "end_point": {"row": 73, "column": 45}}, {"id": 338, "type": "ERROR", "text": "str", "parent": 325, "children": [339], "start_point": {"row": 73, "column": 46}, "end_point": {"row": 73, "column": 49}}, {"id": 339, "type": "identifier", "text": "str", "parent": 338, "children": [], "start_point": {"row": 73, "column": 46}, "end_point": {"row": 73, "column": 49}}, {"id": 340, "type": "identifier", "text": "int", "parent": 325, "children": [], "start_point": {"row": 73, "column": 51}, "end_point": {"row": 73, "column": 54}}, {"id": 341, "type": "ERROR", "text": "dex", "parent": 325, "children": [342], "start_point": {"row": 73, "column": 55}, "end_point": {"row": 73, "column": 58}}, {"id": 342, "type": "identifier", "text": "dex", "parent": 341, "children": [], "start_point": {"row": 73, "column": 55}, "end_point": {"row": 73, "column": 58}}, {"id": 343, "type": "identifier", "text": "int", "parent": 325, "children": [], "start_point": {"row": 73, "column": 60}, "end_point": {"row": 73, "column": 63}}, {"id": 344, "type": "ERROR", "text": "ag)", "parent": 325, "children": [345], "start_point": {"row": 73, "column": 64}, "end_point": {"row": 73, "column": 67}}, {"id": 345, "type": "identifier", "text": "ag", "parent": 344, "children": [], "start_point": {"row": 73, "column": 64}, "end_point": {"row": 73, "column": 66}}, {"id": 346, "type": "declaration", "text": "void printInfo();", "parent": 320, "children": [347, 348], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 25}}, {"id": 347, "type": "primitive_type", "text": "void", "parent": 346, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 12}}, {"id": 348, "type": "function_declarator", "text": "printInfo()", "parent": 346, "children": [349, 350], "start_point": {"row": 74, "column": 13}, "end_point": {"row": 74, "column": 24}}, {"id": 349, "type": "identifier", "text": "printInfo", "parent": 348, "children": [], "start_point": {"row": 74, "column": 13}, "end_point": {"row": 74, "column": 22}}, {"id": 350, "type": "parameter_list", "text": "()", "parent": 348, "children": [], "start_point": {"row": 74, "column": 22}, "end_point": {"row": 74, "column": 24}}, {"id": 351, "type": "declaration", "text": "void levelUp();", "parent": 320, "children": [352, 353], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 23}}, {"id": 352, "type": "primitive_type", "text": "void", "parent": 351, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 12}}, {"id": 353, "type": "function_declarator", "text": "levelUp()", "parent": 351, "children": [354, 355], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 22}}, {"id": 354, "type": "identifier", "text": "levelUp", "parent": 353, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 20}}, {"id": 355, "type": "parameter_list", "text": "()", "parent": 353, "children": [], "start_point": {"row": 75, "column": 20}, "end_point": {"row": 75, "column": 22}}, {"id": 356, "type": "function_definition", "text": "class Paladin: public Hero\r\n{\r\n public:\r\n Paladin(string n, int h, int mP, int str, int dex, int ag);\r\n void printInfo();\r\n void levelUp();\r\n}", "parent": 0, "children": [357, 358], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 84, "column": 1}}, {"id": 357, "type": "identifier", "text": "Paladin", "parent": 356, "children": [], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 13}}, {"id": 358, "type": "ERROR", "text": ": public Hero", "parent": 356, "children": [359], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 26}}, {"id": 359, "type": "identifier", "text": "Hero", "parent": 358, "children": [], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 26}}, {"id": 360, "type": "labeled_statement", "text": "public:\r\n Paladin(string n, int h, int mP, int str, int dex, int ag);", "parent": 356, "children": [361], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 81, "column": 67}}, {"id": 361, "type": "declaration", "text": "Paladin(string n, int h, int mP, int str, int dex, int ag);", "parent": 360, "children": [362, 366, 367, 368, 370, 371, 373, 374, 376, 377, 379, 380], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 67}}, {"id": 362, "type": "macro_type_specifier", "text": "Paladin(string", "parent": 361, "children": [363, 364], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 22}}, {"id": 363, "type": "identifier", "text": "Paladin", "parent": 362, "children": [], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 15}}, {"id": 364, "type": "type_descriptor", "text": "string", "parent": 362, "children": [365], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 22}}, {"id": 365, "type": "type_identifier", "text": "string", "parent": 364, "children": [], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 22}}, {"id": 366, "type": "identifier", "text": "n", "parent": 361, "children": [], "start_point": {"row": 81, "column": 23}, "end_point": {"row": 81, "column": 24}}, {"id": 367, "type": "identifier", "text": "int", "parent": 361, "children": [], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 29}}, {"id": 368, "type": "ERROR", "text": "h", "parent": 361, "children": [369], "start_point": {"row": 81, "column": 30}, "end_point": {"row": 81, "column": 31}}, {"id": 369, "type": "identifier", "text": "h", "parent": 368, "children": [], "start_point": {"row": 81, "column": 30}, "end_point": {"row": 81, "column": 31}}, {"id": 370, "type": "identifier", "text": "int", "parent": 361, "children": [], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 36}}, {"id": 371, "type": "ERROR", "text": "mP", "parent": 361, "children": [372], "start_point": {"row": 81, "column": 37}, "end_point": {"row": 81, "column": 39}}, {"id": 372, "type": "identifier", "text": "mP", "parent": 371, "children": [], "start_point": {"row": 81, "column": 37}, "end_point": {"row": 81, "column": 39}}, {"id": 373, "type": "identifier", "text": "int", "parent": 361, "children": [], "start_point": {"row": 81, "column": 41}, "end_point": {"row": 81, "column": 44}}, {"id": 374, "type": "ERROR", "text": "str", "parent": 361, "children": [375], "start_point": {"row": 81, "column": 45}, "end_point": {"row": 81, "column": 48}}, {"id": 375, "type": "identifier", "text": "str", "parent": 374, "children": [], "start_point": {"row": 81, "column": 45}, "end_point": {"row": 81, "column": 48}}, {"id": 376, "type": "identifier", "text": "int", "parent": 361, "children": [], "start_point": {"row": 81, "column": 50}, "end_point": {"row": 81, "column": 53}}, {"id": 377, "type": "ERROR", "text": "dex", "parent": 361, "children": [378], "start_point": {"row": 81, "column": 54}, "end_point": {"row": 81, "column": 57}}, {"id": 378, "type": "identifier", "text": "dex", "parent": 377, "children": [], "start_point": {"row": 81, "column": 54}, "end_point": {"row": 81, "column": 57}}, {"id": 379, "type": "identifier", "text": "int", "parent": 361, "children": [], "start_point": {"row": 81, "column": 59}, "end_point": {"row": 81, "column": 62}}, {"id": 380, "type": "ERROR", "text": "ag)", "parent": 361, "children": [381], "start_point": {"row": 81, "column": 63}, "end_point": {"row": 81, "column": 66}}, {"id": 381, "type": "identifier", "text": "ag", "parent": 380, "children": [], "start_point": {"row": 81, "column": 63}, "end_point": {"row": 81, "column": 65}}, {"id": 382, "type": "declaration", "text": "void printInfo();", "parent": 356, "children": [383, 384], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 25}}, {"id": 383, "type": "primitive_type", "text": "void", "parent": 382, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 12}}, {"id": 384, "type": "function_declarator", "text": "printInfo()", "parent": 382, "children": [385, 386], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 24}}, {"id": 385, "type": "identifier", "text": "printInfo", "parent": 384, "children": [], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 22}}, {"id": 386, "type": "parameter_list", "text": "()", "parent": 384, "children": [], "start_point": {"row": 82, "column": 22}, "end_point": {"row": 82, "column": 24}}, {"id": 387, "type": "declaration", "text": "void levelUp();", "parent": 356, "children": [388, 389], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 23}}, {"id": 388, "type": "primitive_type", "text": "void", "parent": 387, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 12}}, {"id": 389, "type": "function_declarator", "text": "levelUp()", "parent": 387, "children": [390, 391], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 22}}, {"id": 390, "type": "identifier", "text": "levelUp", "parent": 389, "children": [], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 20}}, {"id": 391, "type": "parameter_list", "text": "()", "parent": 389, "children": [], "start_point": {"row": 83, "column": 20}, "end_point": {"row": 83, "column": 22}}, {"id": 392, "type": "function_definition", "text": "class Monster: public Living\r\n{\r\n protected:\r\n int min_dmge, max_dmge, defense, agility; \t//main stats, can be decreased by the effect of a hero spell\r\n int base_min_dmge, base_max_dmge, base_defense, base_agility; \t//base stats, will never decrease by spell's effect\r\n public:\r\n Monster(string n, int h, int mid, int mad, int def, int ag);\r\n virtual ~Monster(){};\r\n virtual void printInfo();\r\n void attack(int& h, int ag, string n);\r\n void resetStats();\t\t\t\t\t\t\t\t\t\t\t\t\t//resets stats to base stats (if they got decreased)\r\n void fixLevel(int lvl);\r\n int& getMin_dam();\r\n int& getMax_dam();\r\n int& getDef();\r\n int& getAg();\r\n}", "parent": 0, "children": [393, 394], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 104, "column": 1}}, {"id": 393, "type": "identifier", "text": "Monster", "parent": 392, "children": [], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 13}}, {"id": 394, "type": "ERROR", "text": ": public Living", "parent": 392, "children": [395], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 28}}, {"id": 395, "type": "identifier", "text": "Living", "parent": 394, "children": [], "start_point": {"row": 88, "column": 22}, "end_point": {"row": 88, "column": 28}}, {"id": 396, "type": "labeled_statement", "text": "protected:\r\n int min_dmge, max_dmge, defense, agility;", "parent": 392, "children": [397], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 91, "column": 49}}, {"id": 397, "type": "declaration", "text": "int min_dmge, max_dmge, defense, agility;", "parent": 396, "children": [398, 399, 400, 401, 402], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 49}}, {"id": 398, "type": "primitive_type", "text": "int", "parent": 397, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 11}}, {"id": 399, "type": "identifier", "text": "min_dmge", "parent": 397, "children": [], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 20}}, {"id": 400, "type": "identifier", "text": "max_dmge", "parent": 397, "children": [], "start_point": {"row": 91, "column": 22}, "end_point": {"row": 91, "column": 30}}, {"id": 401, "type": "identifier", "text": "defense", "parent": 397, "children": [], "start_point": {"row": 91, "column": 32}, "end_point": {"row": 91, "column": 39}}, {"id": 402, "type": "identifier", "text": "agility", "parent": 397, "children": [], "start_point": {"row": 91, "column": 41}, "end_point": {"row": 91, "column": 48}}, {"id": 403, "type": "declaration", "text": "int base_min_dmge, base_max_dmge, base_defense, base_agility;", "parent": 392, "children": [404, 405, 406, 407, 408], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 69}}, {"id": 404, "type": "primitive_type", "text": "int", "parent": 403, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 11}}, {"id": 405, "type": "identifier", "text": "base_min_dmge", "parent": 403, "children": [], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 25}}, {"id": 406, "type": "identifier", "text": "base_max_dmge", "parent": 403, "children": [], "start_point": {"row": 92, "column": 27}, "end_point": {"row": 92, "column": 40}}, {"id": 407, "type": "identifier", "text": "base_defense", "parent": 403, "children": [], "start_point": {"row": 92, "column": 42}, "end_point": {"row": 92, "column": 54}}, {"id": 408, "type": "identifier", "text": "base_agility", "parent": 403, "children": [], "start_point": {"row": 92, "column": 56}, "end_point": {"row": 92, "column": 68}}, {"id": 409, "type": "labeled_statement", "text": "public:\r\n Monster(string n, int h, int mid, int mad, int def, int ag);", "parent": 392, "children": [410], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 94, "column": 68}}, {"id": 410, "type": "declaration", "text": "Monster(string n, int h, int mid, int mad, int def, int ag);", "parent": 409, "children": [411, 415, 416, 417, 419, 420, 422, 423, 425, 426, 427], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 68}}, {"id": 411, "type": "macro_type_specifier", "text": "Monster(string", "parent": 410, "children": [412, 413], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 22}}, {"id": 412, "type": "identifier", "text": "Monster", "parent": 411, "children": [], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 15}}, {"id": 413, "type": "type_descriptor", "text": "string", "parent": 411, "children": [414], "start_point": {"row": 94, "column": 16}, "end_point": {"row": 94, "column": 22}}, {"id": 414, "type": "type_identifier", "text": "string", "parent": 413, "children": [], "start_point": {"row": 94, "column": 16}, "end_point": {"row": 94, "column": 22}}, {"id": 415, "type": "identifier", "text": "n", "parent": 410, "children": [], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 24}}, {"id": 416, "type": "identifier", "text": "int", "parent": 410, "children": [], "start_point": {"row": 94, "column": 26}, "end_point": {"row": 94, "column": 29}}, {"id": 417, "type": "ERROR", "text": "h", "parent": 410, "children": [418], "start_point": {"row": 94, "column": 30}, "end_point": {"row": 94, "column": 31}}, {"id": 418, "type": "identifier", "text": "h", "parent": 417, "children": [], "start_point": {"row": 94, "column": 30}, "end_point": {"row": 94, "column": 31}}, {"id": 419, "type": "identifier", "text": "int", "parent": 410, "children": [], "start_point": {"row": 94, "column": 33}, "end_point": {"row": 94, "column": 36}}, {"id": 420, "type": "ERROR", "text": "mid", "parent": 410, "children": [421], "start_point": {"row": 94, "column": 37}, "end_point": {"row": 94, "column": 40}}, {"id": 421, "type": "identifier", "text": "mid", "parent": 420, "children": [], "start_point": {"row": 94, "column": 37}, "end_point": {"row": 94, "column": 40}}, {"id": 422, "type": "identifier", "text": "int", "parent": 410, "children": [], "start_point": {"row": 94, "column": 42}, "end_point": {"row": 94, "column": 45}}, {"id": 423, "type": "ERROR", "text": "mad", "parent": 410, "children": [424], "start_point": {"row": 94, "column": 46}, "end_point": {"row": 94, "column": 49}}, {"id": 424, "type": "identifier", "text": "mad", "parent": 423, "children": [], "start_point": {"row": 94, "column": 46}, "end_point": {"row": 94, "column": 49}}, {"id": 425, "type": "identifier", "text": "int", "parent": 410, "children": [], "start_point": {"row": 94, "column": 51}, "end_point": {"row": 94, "column": 54}}, {"id": 426, "type": "identifier", "text": "int", "parent": 410, "children": [], "start_point": {"row": 94, "column": 60}, "end_point": {"row": 94, "column": 63}}, {"id": 427, "type": "ERROR", "text": "ag)", "parent": 410, "children": [428], "start_point": {"row": 94, "column": 64}, "end_point": {"row": 94, "column": 67}}, {"id": 428, "type": "identifier", "text": "ag", "parent": 427, "children": [], "start_point": {"row": 94, "column": 64}, "end_point": {"row": 94, "column": 66}}, {"id": 429, "type": "function_definition", "text": "virtual ~Monster(){}", "parent": 392, "children": [430, 431, 433], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 28}}, {"id": 430, "type": "type_identifier", "text": "virtual", "parent": 429, "children": [], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 15}}, {"id": 431, "type": "ERROR", "text": "~", "parent": 429, "children": [432], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 17}}, {"id": 432, "type": "~", "text": "~", "parent": 431, "children": [], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 17}}, {"id": 433, "type": "function_declarator", "text": "Monster()", "parent": 429, "children": [434, 435], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 26}}, {"id": 434, "type": "identifier", "text": "Monster", "parent": 433, "children": [], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 24}}, {"id": 435, "type": "parameter_list", "text": "()", "parent": 433, "children": [], "start_point": {"row": 95, "column": 24}, "end_point": {"row": 95, "column": 26}}, {"id": 436, "type": "declaration", "text": "virtual void printInfo();", "parent": 392, "children": [437, 438, 440], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 33}}, {"id": 437, "type": "type_identifier", "text": "virtual", "parent": 436, "children": [], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 15}}, {"id": 438, "type": "ERROR", "text": "void", "parent": 436, "children": [439], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 20}}, {"id": 439, "type": "identifier", "text": "void", "parent": 438, "children": [], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 20}}, {"id": 440, "type": "function_declarator", "text": "printInfo()", "parent": 436, "children": [441, 442], "start_point": {"row": 96, "column": 21}, "end_point": {"row": 96, "column": 32}}, {"id": 441, "type": "identifier", "text": "printInfo", "parent": 440, "children": [], "start_point": {"row": 96, "column": 21}, "end_point": {"row": 96, "column": 30}}, {"id": 442, "type": "parameter_list", "text": "()", "parent": 440, "children": [], "start_point": {"row": 96, "column": 30}, "end_point": {"row": 96, "column": 32}}, {"id": 443, "type": "declaration", "text": "void attack(int& h, int ag, string n);", "parent": 392, "children": [444, 445], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 46}}, {"id": 444, "type": "primitive_type", "text": "void", "parent": 443, "children": [], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 12}}, {"id": 445, "type": "function_declarator", "text": "attack(int& h, int ag, string n)", "parent": 443, "children": [446, 447], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 45}}, {"id": 446, "type": "identifier", "text": "attack", "parent": 445, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 19}}, {"id": 447, "type": "parameter_list", "text": "(int& h, int ag, string n)", "parent": 445, "children": [448, 451, 454], "start_point": {"row": 97, "column": 19}, "end_point": {"row": 97, "column": 45}}, {"id": 448, "type": "parameter_declaration", "text": "int& h", "parent": 447, "children": [449, 450], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 26}}, {"id": 449, "type": "primitive_type", "text": "int", "parent": 448, "children": [], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 23}}, {"id": 450, "type": "identifier", "text": "h", "parent": 448, "children": [], "start_point": {"row": 97, "column": 25}, "end_point": {"row": 97, "column": 26}}, {"id": 451, "type": "parameter_declaration", "text": "int ag", "parent": 447, "children": [452, 453], "start_point": {"row": 97, "column": 28}, "end_point": {"row": 97, "column": 34}}, {"id": 452, "type": "primitive_type", "text": "int", "parent": 451, "children": [], "start_point": {"row": 97, "column": 28}, "end_point": {"row": 97, "column": 31}}, {"id": 453, "type": "identifier", "text": "ag", "parent": 451, "children": [], "start_point": {"row": 97, "column": 32}, "end_point": {"row": 97, "column": 34}}, {"id": 454, "type": "parameter_declaration", "text": "string n", "parent": 447, "children": [455, 456], "start_point": {"row": 97, "column": 36}, "end_point": {"row": 97, "column": 44}}, {"id": 455, "type": "type_identifier", "text": "string", "parent": 454, "children": [], "start_point": {"row": 97, "column": 36}, "end_point": {"row": 97, "column": 42}}, {"id": 456, "type": "identifier", "text": "n", "parent": 454, "children": [], "start_point": {"row": 97, "column": 43}, "end_point": {"row": 97, "column": 44}}, {"id": 457, "type": "declaration", "text": "void resetStats();", "parent": 392, "children": [458, 459], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 26}}, {"id": 458, "type": "primitive_type", "text": "void", "parent": 457, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 12}}, {"id": 459, "type": "function_declarator", "text": "resetStats()", "parent": 457, "children": [460, 461], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 25}}, {"id": 460, "type": "identifier", "text": "resetStats", "parent": 459, "children": [], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 23}}, {"id": 461, "type": "parameter_list", "text": "()", "parent": 459, "children": [], "start_point": {"row": 98, "column": 23}, "end_point": {"row": 98, "column": 25}}, {"id": 462, "type": "declaration", "text": "void fixLevel(int lvl);", "parent": 392, "children": [463, 464], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 31}}, {"id": 463, "type": "primitive_type", "text": "void", "parent": 462, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 12}}, {"id": 464, "type": "function_declarator", "text": "fixLevel(int lvl)", "parent": 462, "children": [465, 466], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 30}}, {"id": 465, "type": "identifier", "text": "fixLevel", "parent": 464, "children": [], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 21}}, {"id": 466, "type": "parameter_list", "text": "(int lvl)", "parent": 464, "children": [467], "start_point": {"row": 99, "column": 21}, "end_point": {"row": 99, "column": 30}}, {"id": 467, "type": "parameter_declaration", "text": "int lvl", "parent": 466, "children": [468, 469], "start_point": {"row": 99, "column": 22}, "end_point": {"row": 99, "column": 29}}, {"id": 468, "type": "primitive_type", "text": "int", "parent": 467, "children": [], "start_point": {"row": 99, "column": 22}, "end_point": {"row": 99, "column": 25}}, {"id": 469, "type": "identifier", "text": "lvl", "parent": 467, "children": [], "start_point": {"row": 99, "column": 26}, "end_point": {"row": 99, "column": 29}}, {"id": 470, "type": "declaration", "text": "int& getMin_dam();", "parent": 392, "children": [471, 472], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 26}}, {"id": 471, "type": "primitive_type", "text": "int", "parent": 470, "children": [], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 11}}, {"id": 472, "type": "function_declarator", "text": "getMin_dam()", "parent": 470, "children": [473, 474], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 25}}, {"id": 473, "type": "identifier", "text": "getMin_dam", "parent": 472, "children": [], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 23}}, {"id": 474, "type": "parameter_list", "text": "()", "parent": 472, "children": [], "start_point": {"row": 100, "column": 23}, "end_point": {"row": 100, "column": 25}}, {"id": 475, "type": "declaration", "text": "int& getMax_dam();", "parent": 392, "children": [476, 477], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 101, "column": 26}}, {"id": 476, "type": "primitive_type", "text": "int", "parent": 475, "children": [], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 101, "column": 11}}, {"id": 477, "type": "function_declarator", "text": "getMax_dam()", "parent": 475, "children": [478, 479], "start_point": {"row": 101, "column": 13}, "end_point": {"row": 101, "column": 25}}, {"id": 478, "type": "identifier", "text": "getMax_dam", "parent": 477, "children": [], "start_point": {"row": 101, "column": 13}, "end_point": {"row": 101, "column": 23}}, {"id": 479, "type": "parameter_list", "text": "()", "parent": 477, "children": [], "start_point": {"row": 101, "column": 23}, "end_point": {"row": 101, "column": 25}}, {"id": 480, "type": "declaration", "text": "int& getDef();", "parent": 392, "children": [481, 482], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 22}}, {"id": 481, "type": "primitive_type", "text": "int", "parent": 480, "children": [], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 11}}, {"id": 482, "type": "function_declarator", "text": "getDef()", "parent": 480, "children": [483, 484], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 21}}, {"id": 483, "type": "identifier", "text": "getDef", "parent": 482, "children": [], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 19}}, {"id": 484, "type": "parameter_list", "text": "()", "parent": 482, "children": [], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 21}}, {"id": 485, "type": "declaration", "text": "int& getAg();", "parent": 392, "children": [486, 487], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 21}}, {"id": 486, "type": "primitive_type", "text": "int", "parent": 485, "children": [], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 11}}, {"id": 487, "type": "function_declarator", "text": "getAg()", "parent": 485, "children": [488, 489], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 20}}, {"id": 488, "type": "identifier", "text": "getAg", "parent": 487, "children": [], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 18}}, {"id": 489, "type": "parameter_list", "text": "()", "parent": 487, "children": [], "start_point": {"row": 103, "column": 18}, "end_point": {"row": 103, "column": 20}}, {"id": 490, "type": "function_definition", "text": "class Dragon: public Monster\r\n{\r\n public:\r\n Dragon(string n, int h, int mid, int mad, int def, int ag);\r\n void printInfo();\r\n}", "parent": 0, "children": [491, 493], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 111, "column": 1}}, {"id": 491, "type": "ERROR", "text": "Dragon: public", "parent": 490, "children": [492], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 20}}, {"id": 492, "type": "identifier", "text": "Dragon", "parent": 491, "children": [], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 12}}, {"id": 493, "type": "identifier", "text": "Monster", "parent": 490, "children": [], "start_point": {"row": 106, "column": 21}, "end_point": {"row": 106, "column": 28}}, {"id": 494, "type": "labeled_statement", "text": "public:\r\n Dragon(string n, int h, int mid, int mad, int def, int ag);", "parent": 490, "children": [495], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 109, "column": 67}}, {"id": 495, "type": "declaration", "text": "Dragon(string n, int h, int mid, int mad, int def, int ag);", "parent": 494, "children": [496, 500, 501, 502, 504, 505, 507, 508, 510, 511, 512], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 67}}, {"id": 496, "type": "macro_type_specifier", "text": "Dragon(string", "parent": 495, "children": [497, 498], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 21}}, {"id": 497, "type": "identifier", "text": "Dragon", "parent": 496, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 14}}, {"id": 498, "type": "type_descriptor", "text": "string", "parent": 496, "children": [499], "start_point": {"row": 109, "column": 15}, "end_point": {"row": 109, "column": 21}}, {"id": 499, "type": "type_identifier", "text": "string", "parent": 498, "children": [], "start_point": {"row": 109, "column": 15}, "end_point": {"row": 109, "column": 21}}, {"id": 500, "type": "identifier", "text": "n", "parent": 495, "children": [], "start_point": {"row": 109, "column": 22}, "end_point": {"row": 109, "column": 23}}, {"id": 501, "type": "identifier", "text": "int", "parent": 495, "children": [], "start_point": {"row": 109, "column": 25}, "end_point": {"row": 109, "column": 28}}, {"id": 502, "type": "ERROR", "text": "h", "parent": 495, "children": [503], "start_point": {"row": 109, "column": 29}, "end_point": {"row": 109, "column": 30}}, {"id": 503, "type": "identifier", "text": "h", "parent": 502, "children": [], "start_point": {"row": 109, "column": 29}, "end_point": {"row": 109, "column": 30}}, {"id": 504, "type": "identifier", "text": "int", "parent": 495, "children": [], "start_point": {"row": 109, "column": 32}, "end_point": {"row": 109, "column": 35}}, {"id": 505, "type": "ERROR", "text": "mid", "parent": 495, "children": [506], "start_point": {"row": 109, "column": 36}, "end_point": {"row": 109, "column": 39}}, {"id": 506, "type": "identifier", "text": "mid", "parent": 505, "children": [], "start_point": {"row": 109, "column": 36}, "end_point": {"row": 109, "column": 39}}, {"id": 507, "type": "identifier", "text": "int", "parent": 495, "children": [], "start_point": {"row": 109, "column": 41}, "end_point": {"row": 109, "column": 44}}, {"id": 508, "type": "ERROR", "text": "mad", "parent": 495, "children": [509], "start_point": {"row": 109, "column": 45}, "end_point": {"row": 109, "column": 48}}, {"id": 509, "type": "identifier", "text": "mad", "parent": 508, "children": [], "start_point": {"row": 109, "column": 45}, "end_point": {"row": 109, "column": 48}}, {"id": 510, "type": "identifier", "text": "int", "parent": 495, "children": [], "start_point": {"row": 109, "column": 50}, "end_point": {"row": 109, "column": 53}}, {"id": 511, "type": "identifier", "text": "int", "parent": 495, "children": [], "start_point": {"row": 109, "column": 59}, "end_point": {"row": 109, "column": 62}}, {"id": 512, "type": "ERROR", "text": "ag)", "parent": 495, "children": [513], "start_point": {"row": 109, "column": 63}, "end_point": {"row": 109, "column": 66}}, {"id": 513, "type": "identifier", "text": "ag", "parent": 512, "children": [], "start_point": {"row": 109, "column": 63}, "end_point": {"row": 109, "column": 65}}, {"id": 514, "type": "declaration", "text": "void printInfo();", "parent": 490, "children": [515, 516], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 25}}, {"id": 515, "type": "primitive_type", "text": "void", "parent": 514, "children": [], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 12}}, {"id": 516, "type": "function_declarator", "text": "printInfo()", "parent": 514, "children": [517, 518], "start_point": {"row": 110, "column": 13}, "end_point": {"row": 110, "column": 24}}, {"id": 517, "type": "identifier", "text": "printInfo", "parent": 516, "children": [], "start_point": {"row": 110, "column": 13}, "end_point": {"row": 110, "column": 22}}, {"id": 518, "type": "parameter_list", "text": "()", "parent": 516, "children": [], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 24}}, {"id": 519, "type": "function_definition", "text": "class Exoskeleton: public Monster\r\n{\r\n public:\r\n Exoskeleton(string n, int h, int mid, int mad, int def, int ag);\r\n void printInfo();\r\n}", "parent": 0, "children": [520, 521], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 118, "column": 1}}, {"id": 520, "type": "identifier", "text": "Exoskeleton", "parent": 519, "children": [], "start_point": {"row": 113, "column": 6}, "end_point": {"row": 113, "column": 17}}, {"id": 521, "type": "ERROR", "text": ": public Monster", "parent": 519, "children": [522], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 33}}, {"id": 522, "type": "identifier", "text": "Monster", "parent": 521, "children": [], "start_point": {"row": 113, "column": 26}, "end_point": {"row": 113, "column": 33}}, {"id": 523, "type": "labeled_statement", "text": "public:\r\n Exoskeleton(string n, int h, int mid, int mad, int def, int ag);", "parent": 519, "children": [524], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 116, "column": 72}}, {"id": 524, "type": "declaration", "text": "Exoskeleton(string n, int h, int mid, int mad, int def, int ag);", "parent": 523, "children": [525, 529, 530, 531, 533, 534, 536, 537, 539, 540, 541], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 72}}, {"id": 525, "type": "macro_type_specifier", "text": "Exoskeleton(string", "parent": 524, "children": [526, 527], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 26}}, {"id": 526, "type": "identifier", "text": "Exoskeleton", "parent": 525, "children": [], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 19}}, {"id": 527, "type": "type_descriptor", "text": "string", "parent": 525, "children": [528], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 26}}, {"id": 528, "type": "type_identifier", "text": "string", "parent": 527, "children": [], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 26}}, {"id": 529, "type": "identifier", "text": "n", "parent": 524, "children": [], "start_point": {"row": 116, "column": 27}, "end_point": {"row": 116, "column": 28}}, {"id": 530, "type": "identifier", "text": "int", "parent": 524, "children": [], "start_point": {"row": 116, "column": 30}, "end_point": {"row": 116, "column": 33}}, {"id": 531, "type": "ERROR", "text": "h", "parent": 524, "children": [532], "start_point": {"row": 116, "column": 34}, "end_point": {"row": 116, "column": 35}}, {"id": 532, "type": "identifier", "text": "h", "parent": 531, "children": [], "start_point": {"row": 116, "column": 34}, "end_point": {"row": 116, "column": 35}}, {"id": 533, "type": "identifier", "text": "int", "parent": 524, "children": [], "start_point": {"row": 116, "column": 37}, "end_point": {"row": 116, "column": 40}}, {"id": 534, "type": "ERROR", "text": "mid", "parent": 524, "children": [535], "start_point": {"row": 116, "column": 41}, "end_point": {"row": 116, "column": 44}}, {"id": 535, "type": "identifier", "text": "mid", "parent": 534, "children": [], "start_point": {"row": 116, "column": 41}, "end_point": {"row": 116, "column": 44}}, {"id": 536, "type": "identifier", "text": "int", "parent": 524, "children": [], "start_point": {"row": 116, "column": 46}, "end_point": {"row": 116, "column": 49}}, {"id": 537, "type": "ERROR", "text": "mad", "parent": 524, "children": [538], "start_point": {"row": 116, "column": 50}, "end_point": {"row": 116, "column": 53}}, {"id": 538, "type": "identifier", "text": "mad", "parent": 537, "children": [], "start_point": {"row": 116, "column": 50}, "end_point": {"row": 116, "column": 53}}, {"id": 539, "type": "identifier", "text": "int", "parent": 524, "children": [], "start_point": {"row": 116, "column": 55}, "end_point": {"row": 116, "column": 58}}, {"id": 540, "type": "identifier", "text": "int", "parent": 524, "children": [], "start_point": {"row": 116, "column": 64}, "end_point": {"row": 116, "column": 67}}, {"id": 541, "type": "ERROR", "text": "ag)", "parent": 524, "children": [542], "start_point": {"row": 116, "column": 68}, "end_point": {"row": 116, "column": 71}}, {"id": 542, "type": "identifier", "text": "ag", "parent": 541, "children": [], "start_point": {"row": 116, "column": 68}, "end_point": {"row": 116, "column": 70}}, {"id": 543, "type": "declaration", "text": "void printInfo();", "parent": 519, "children": [544, 545], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 25}}, {"id": 544, "type": "primitive_type", "text": "void", "parent": 543, "children": [], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 12}}, {"id": 545, "type": "function_declarator", "text": "printInfo()", "parent": 543, "children": [546, 547], "start_point": {"row": 117, "column": 13}, "end_point": {"row": 117, "column": 24}}, {"id": 546, "type": "identifier", "text": "printInfo", "parent": 545, "children": [], "start_point": {"row": 117, "column": 13}, "end_point": {"row": 117, "column": 22}}, {"id": 547, "type": "parameter_list", "text": "()", "parent": 545, "children": [], "start_point": {"row": 117, "column": 22}, "end_point": {"row": 117, "column": 24}}, {"id": 548, "type": "function_definition", "text": "class Spirit: public Monster\r\n{\r\n public:\r\n Spirit(string n, int h, int mid, int mad, int def, int ag);\r\n void printInfo();\r\n}", "parent": 0, "children": [549, 551], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 125, "column": 1}}, {"id": 549, "type": "ERROR", "text": "Spirit: public", "parent": 548, "children": [550], "start_point": {"row": 120, "column": 6}, "end_point": {"row": 120, "column": 20}}, {"id": 550, "type": "identifier", "text": "Spirit", "parent": 549, "children": [], "start_point": {"row": 120, "column": 6}, "end_point": {"row": 120, "column": 12}}, {"id": 551, "type": "identifier", "text": "Monster", "parent": 548, "children": [], "start_point": {"row": 120, "column": 21}, "end_point": {"row": 120, "column": 28}}, {"id": 552, "type": "labeled_statement", "text": "public:\r\n Spirit(string n, int h, int mid, int mad, int def, int ag);", "parent": 548, "children": [553], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 123, "column": 67}}, {"id": 553, "type": "declaration", "text": "Spirit(string n, int h, int mid, int mad, int def, int ag);", "parent": 552, "children": [554, 558, 559, 560, 562, 563, 565, 566, 568, 569, 570], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 67}}, {"id": 554, "type": "macro_type_specifier", "text": "Spirit(string", "parent": 553, "children": [555, 556], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 21}}, {"id": 555, "type": "identifier", "text": "Spirit", "parent": 554, "children": [], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 14}}, {"id": 556, "type": "type_descriptor", "text": "string", "parent": 554, "children": [557], "start_point": {"row": 123, "column": 15}, "end_point": {"row": 123, "column": 21}}, {"id": 557, "type": "type_identifier", "text": "string", "parent": 556, "children": [], "start_point": {"row": 123, "column": 15}, "end_point": {"row": 123, "column": 21}}, {"id": 558, "type": "identifier", "text": "n", "parent": 553, "children": [], "start_point": {"row": 123, "column": 22}, "end_point": {"row": 123, "column": 23}}, {"id": 559, "type": "identifier", "text": "int", "parent": 553, "children": [], "start_point": {"row": 123, "column": 25}, "end_point": {"row": 123, "column": 28}}, {"id": 560, "type": "ERROR", "text": "h", "parent": 553, "children": [561], "start_point": {"row": 123, "column": 29}, "end_point": {"row": 123, "column": 30}}, {"id": 561, "type": "identifier", "text": "h", "parent": 560, "children": [], "start_point": {"row": 123, "column": 29}, "end_point": {"row": 123, "column": 30}}, {"id": 562, "type": "identifier", "text": "int", "parent": 553, "children": [], "start_point": {"row": 123, "column": 32}, "end_point": {"row": 123, "column": 35}}, {"id": 563, "type": "ERROR", "text": "mid", "parent": 553, "children": [564], "start_point": {"row": 123, "column": 36}, "end_point": {"row": 123, "column": 39}}, {"id": 564, "type": "identifier", "text": "mid", "parent": 563, "children": [], "start_point": {"row": 123, "column": 36}, "end_point": {"row": 123, "column": 39}}, {"id": 565, "type": "identifier", "text": "int", "parent": 553, "children": [], "start_point": {"row": 123, "column": 41}, "end_point": {"row": 123, "column": 44}}, {"id": 566, "type": "ERROR", "text": "mad", "parent": 553, "children": [567], "start_point": {"row": 123, "column": 45}, "end_point": {"row": 123, "column": 48}}, {"id": 567, "type": "identifier", "text": "mad", "parent": 566, "children": [], "start_point": {"row": 123, "column": 45}, "end_point": {"row": 123, "column": 48}}, {"id": 568, "type": "identifier", "text": "int", "parent": 553, "children": [], "start_point": {"row": 123, "column": 50}, "end_point": {"row": 123, "column": 53}}, {"id": 569, "type": "identifier", "text": "int", "parent": 553, "children": [], "start_point": {"row": 123, "column": 59}, "end_point": {"row": 123, "column": 62}}, {"id": 570, "type": "ERROR", "text": "ag)", "parent": 553, "children": [571], "start_point": {"row": 123, "column": 63}, "end_point": {"row": 123, "column": 66}}, {"id": 571, "type": "identifier", "text": "ag", "parent": 570, "children": [], "start_point": {"row": 123, "column": 63}, "end_point": {"row": 123, "column": 65}}, {"id": 572, "type": "declaration", "text": "void printInfo();", "parent": 548, "children": [573, 574], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 25}}, {"id": 573, "type": "primitive_type", "text": "void", "parent": 572, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 12}}, {"id": 574, "type": "function_declarator", "text": "printInfo()", "parent": 572, "children": [575, 576], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 24}}, {"id": 575, "type": "identifier", "text": "printInfo", "parent": 574, "children": [], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 22}}, {"id": 576, "type": "parameter_list", "text": "()", "parent": 574, "children": [], "start_point": {"row": 124, "column": 22}, "end_point": {"row": 124, "column": 24}}, {"id": 577, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 127, "column": 6}}]}, "node_categories": {"declarations": {"functions": [23, 50, 55, 60, 63, 141, 145, 152, 157, 165, 176, 183, 188, 193, 198, 203, 214, 224, 234, 242, 261, 266, 271, 276, 281, 284, 312, 317, 320, 348, 353, 356, 384, 389, 392, 429, 433, 440, 445, 459, 464, 472, 477, 482, 487, 490, 516, 519, 545, 548, 574], "variables": [18, 26, 29, 33, 37, 46, 53, 58, 68, 74, 99, 103, 111, 115, 120, 148, 155, 160, 163, 168, 171, 181, 186, 191, 196, 201, 206, 209, 212, 217, 222, 227, 232, 237, 240, 245, 248, 251, 254, 256, 259, 264, 269, 274, 279, 289, 310, 315, 325, 346, 351, 361, 382, 387, 397, 403, 410, 436, 443, 448, 451, 454, 457, 462, 467, 470, 475, 480, 485, 495, 514, 524, 543, 553, 572], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [81, 82, 90, 91], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 19, 20, 22, 24, 27, 28, 31, 32, 35, 38, 39, 41, 42, 43, 45, 47, 49, 51, 56, 59, 61, 65, 66, 70, 71, 72, 73, 76, 77, 78, 79, 80, 83, 85, 89, 92, 94, 98, 101, 102, 104, 107, 110, 113, 114, 117, 118, 121, 122, 124, 125, 126, 128, 129, 131, 132, 134, 135, 137, 138, 140, 142, 146, 149, 151, 153, 158, 162, 166, 170, 172, 174, 177, 184, 189, 194, 199, 204, 208, 211, 215, 218, 221, 225, 228, 231, 235, 239, 243, 247, 250, 253, 258, 262, 267, 272, 277, 282, 285, 287, 290, 291, 293, 294, 295, 297, 298, 300, 301, 303, 304, 306, 307, 309, 313, 318, 321, 323, 326, 327, 329, 330, 331, 333, 334, 336, 337, 339, 340, 342, 343, 345, 349, 354, 357, 359, 362, 363, 365, 366, 367, 369, 370, 372, 373, 375, 376, 378, 379, 381, 385, 390, 393, 395, 399, 400, 401, 402, 405, 406, 407, 408, 411, 412, 414, 415, 416, 418, 419, 421, 422, 424, 425, 426, 428, 430, 434, 437, 439, 441, 446, 450, 453, 455, 456, 460, 465, 469, 473, 478, 483, 488, 492, 493, 496, 497, 499, 500, 501, 503, 504, 506, 507, 509, 510, 511, 513, 517, 520, 522, 525, 526, 528, 529, 530, 532, 533, 535, 536, 538, 539, 540, 542, 546, 550, 551, 554, 555, 557, 558, 559, 561, 562, 564, 565, 567, 568, 569, 571, 575, 577], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 180], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 23, "universal_type": "function", "name": "Living", "text_snippet": "class Living\r\n{\r\n protected:\r\n string name;\r\n int level, healthPower;\r\n int "}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "printInfo()"}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "getHealth()"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "getName()"}, {"node_id": 63, "universal_type": "function", "name": "Hero:", "text_snippet": "class Hero: public Living\r\n{\r\n protected:\r\n int magicPower, strength, dexterity, agility; "}, {"node_id": 141, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~Hero(){}"}, {"node_id": 145, "universal_type": "function", "name": "unknown", "text_snippet": "Hero()"}, {"node_id": 152, "universal_type": "function", "name": "unknown", "text_snippet": "printInfo()"}, {"node_id": 157, "universal_type": "function", "name": "unknown", "text_snippet": "getExp(int e)"}, {"node_id": 165, "universal_type": "function", "name": "unknown", "text_snippet": "getMoney(int m)"}, {"node_id": 176, "universal_type": "function", "name": "unknown", "text_snippet": "levelUp()"}, {"node_id": 183, "universal_type": "function", "name": "unknown", "text_snippet": "getLevel()"}, {"node_id": 188, "universal_type": "function", "name": "unknown", "text_snippet": "checkInventory()"}, {"node_id": 193, "universal_type": "function", "name": "unknown", "text_snippet": "equip()"}, {"node_id": 198, "universal_type": "function", "name": "unknown", "text_snippet": "use()"}, {"node_id": 203, "universal_type": "function", "name": "ag)", "text_snippet": "attack(int& health, int ag)"}, {"node_id": 214, "universal_type": "function", "name": "unknown", "text_snippet": "buy(Item *i)"}, {"node_id": 224, "universal_type": "function", "name": "unknown", "text_snippet": "buy(Spell *s)"}, {"node_id": 234, "universal_type": "function", "name": "unknown", "text_snippet": "sell(int index)"}, {"node_id": 242, "universal_type": "function", "name": "unknown", "text_snippet": "castSpell(int& h, int& mid, int& mad, int& def, int& ag)"}, {"node_id": 261, "universal_type": "function", "name": "unknown", "text_snippet": "resetStats()"}, {"node_id": 266, "universal_type": "function", "name": "unknown", "text_snippet": "getAg()"}, {"node_id": 271, "universal_type": "function", "name": "unknown", "text_snippet": "getDmge()"}, {"node_id": 276, "universal_type": "function", "name": "unknown", "text_snippet": "getItemCount()"}, {"node_id": 281, "universal_type": "function", "name": "unknown", "text_snippet": "loseMoney()"}, {"node_id": 284, "universal_type": "function", "name": "Warrior:", "text_snippet": "class Warrior: public Hero\r\n{\r\n public:\r\n Warrior(string n, int h, int mP, int str, int de"}, {"node_id": 312, "universal_type": "function", "name": "unknown", "text_snippet": "printInfo()"}, {"node_id": 317, "universal_type": "function", "name": "unknown", "text_snippet": "levelUp()"}, {"node_id": 320, "universal_type": "function", "name": "Sorcerer:", "text_snippet": "class Sorcerer: public Hero\r\n{\r\n public:\r\n Sorcerer(string n, int h, int mP, int str, int "}, {"node_id": 348, "universal_type": "function", "name": "unknown", "text_snippet": "printInfo()"}, {"node_id": 353, "universal_type": "function", "name": "unknown", "text_snippet": "levelUp()"}, {"node_id": 356, "universal_type": "function", "name": "Paladin:", "text_snippet": "class Paladin: public Hero\r\n{\r\n public:\r\n Paladin(string n, int h, int mP, int str, int de"}, {"node_id": 384, "universal_type": "function", "name": "unknown", "text_snippet": "printInfo()"}, {"node_id": 389, "universal_type": "function", "name": "unknown", "text_snippet": "levelUp()"}, {"node_id": 392, "universal_type": "function", "name": "Monster:", "text_snippet": "class Monster: public Living\r\n{\r\n protected:\r\n int min_dmge, max_dmge, defense, agility; "}, {"node_id": 429, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~Monster(){}"}, {"node_id": 433, "universal_type": "function", "name": "unknown", "text_snippet": "Monster()"}, {"node_id": 440, "universal_type": "function", "name": "unknown", "text_snippet": "printInfo()"}, {"node_id": 445, "universal_type": "function", "name": "ag,", "text_snippet": "attack(int& h, int ag, string n)"}, {"node_id": 459, "universal_type": "function", "name": "unknown", "text_snippet": "resetStats()"}, {"node_id": 464, "universal_type": "function", "name": "unknown", "text_snippet": "fixLevel(int lvl)"}, {"node_id": 472, "universal_type": "function", "name": "unknown", "text_snippet": "getMin_dam()"}, {"node_id": 477, "universal_type": "function", "name": "unknown", "text_snippet": "getMax_dam()"}, {"node_id": 482, "universal_type": "function", "name": "unknown", "text_snippet": "getDef()"}, {"node_id": 487, "universal_type": "function", "name": "unknown", "text_snippet": "getAg()"}, {"node_id": 490, "universal_type": "function", "name": "Dragon:", "text_snippet": "class Dragon: public Monster\r\n{\r\n public:\r\n Dragon(string n, int h, int mid, int mad, int "}, {"node_id": 516, "universal_type": "function", "name": "unknown", "text_snippet": "printInfo()"}, {"node_id": 519, "universal_type": "function", "name": "Exoskeleton:", "text_snippet": "class Exoskeleton: public Monster\r\n{\r\n public:\r\n Exoskeleton(string n, int h, int mid, int"}, {"node_id": 545, "universal_type": "function", "name": "unknown", "text_snippet": "printInfo()"}, {"node_id": 548, "universal_type": "function", "name": "Spirit:", "text_snippet": "class Spirit: public Monster\r\n{\r\n public:\r\n Spirit(string n, int h, int mid, int mad, int "}, {"node_id": 574, "universal_type": "function", "name": "unknown", "text_snippet": "printInfo()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <string>\r\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <vector>\r\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"Spell.h\"\r\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"Item.h\"\r\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "#ifndef LIVING_H_INCLUDED\r\n#define LIVING_H_INCLUDED\r\n\r\n#include <string>\r\n#include <vector>\r\n#include \"Spell.h\"\r\n#include \"Item.h\"\r\n\r\nusing namespace std;\r\n\r\nclass Living\r\n{\r\n protected:\r\n string name;\r\n int level, healthPower;\r\n int base_health;\r\n public:\r\n Living(string n, int h);\r\n virtual void printInfo();\r\n int& getHealth();\r\n string getName();\r\n};\r\n\r\n\r\n//Heroes\r\nclass Hero: public Living\r\n{\r\n protected:\r\n int magicPower, strength, dexterity, agility; //stats\r\n int money, experience, exp_cap, up_value, damage; //ex_cap = max exp before level up / up_value=value by which stats will be augmented\r\n\r\n vector<Item*> item;\r\n vector<Spell*> spell;\t\t\t\t\t\t\t\t\t\t//items and spells\r\n int capacity, item_count; //capacity of inventory, # of items present\r\n Item *weapon, *armor; //equipped weapon/armor.\r\n int agility_cap, base_magicPower; //because agility is the dodge rate of the hero, it cant be unlimited.\r\n\r\n\t\tint weap_pos, armor_pos;\r\n public:\r\n Hero(string n, int h, int mP, int str, int dex, int ag);\t//parameters are the stats above in the same order\r\n virtual ~Hero(){};\r\n virtual void printInfo();\r\n void getExp(int e);\r\n void getMoney(int m);\r\n virtual void levelUp()=0;\t\t\t\t\t//hero gains level - all stats increased (\"strong\" stat increased twice as much)\r\n\t\tint getLevel();\r\n void checkInventory();\r\n void equip(); //equip armor/weapons.\r\n void use(); //use potion.\r\n void attack(int& health, int ag);\r\n void buy(Item *i);\r\n void buy(Spell *s); //buy items/spells.\r\n\t\tvoid sell(int index);\t\t\t\t\t\t//sell item - spells can't be sold\r\n void castSpell(int& h, int& mid, int& mad, int& def, int& ag);\r\n void resetStats();\t\t\t\t\t\t\t//resets stats to base stats (if they got decreased)\r\n\r\n int getAg();\t\t\t\t\t\t\t\t//get agility\r\n\t\tint getDmge();\r\n\t\tint getItemCount();\r\n void loseMoney(); \t\t//secondary\r\n};\r\n\r\nclass Warrior: public Hero\r\n{\r\n public:\r\n Warrior(string n, int h, int mP, int str, int dex, int ag);\r\n void printInfo();\r\n void levelUp();\r\n};\r\n\r\nclass Sorcerer: public Hero\r\n{\r\n public:\r\n Sorcerer(string n, int h, int mP, int str, int dex, int ag);\r\n void printInfo();\r\n void levelUp();\r\n};\r\n\r\nclass Paladin: public Hero\r\n{\r\n public:\r\n Paladin(string n, int h, int mP, int str, int dex, int ag);\r\n void printInfo();\r\n void levelUp();\r\n};\r\n\r\n\r\n//Monsters\r\nclass Monster: public Living\r\n{\r\n protected:\r\n int min_dmge, max_dmge, defense, agility; \t//main stats, can be decreased by the effect of a hero spell\r\n int base_min_dmge, base_max_dmge, base_defense, base_agility; \t//base stats, will never decrease by spell's effect\r\n public:\r\n Monster(string n, int h, int mid, int mad, int def, int ag);\r\n virtual ~Monster(){};\r\n virtual void printInfo();\r\n void attack(int& h, int ag, string n);\r\n void resetStats();\t\t\t\t\t\t\t\t\t\t\t\t\t//resets stats to base stats (if they got decreased)\r\n void fixLevel(int lvl);\r\n int& getMin_dam();\r\n int& getMax_dam();\r\n int& getDef();\r\n int& getAg();\r\n};\r\n\r\nclass Dragon: public Monster\r\n{\r\n public:\r\n Dragon(string n, int h, int mid, int mad, int def, int ag);\r\n void printInfo();\r\n};\r\n\r\nclass Exoskeleton: public Monster\r\n{\r\n public:\r\n Exoskeleton(string n, int h, int mid, int mad, int def, int ag);\r\n void printInfo();\r\n};\r\n\r\nclass Spirit: public Monster\r\n{\r\n public:\r\n Spirit(string n, int h, int mid, int mad, int def, int ag);\r\n void printInfo();\r\n};\r\n\r\n#endif // LIVING_H_INCLUDED\r\n"}
339
c
/* * zcl_adc.c * * Created on: 31 Jan 2022 * Author: BigBob */ /* * zcl_light.c * * Created on: 27 Jan 2022 * Author: BigBob */ /* * zcl_temp_humid.c * * Created on: 26 Jan 2022 * Author: BigBob */ /********************************************************************* * INCLUDES */ #include <Application/zcl_sensor.h> #include "zcomdef.h" #include "zcl.h" #include "zcl_general.h" #include "zcl_ha.h" #include "zcl_ms.h" #include "zcl_port.h" #include "zstackapi.h" #if defined(SENSOR_MOVEMENT) #include <Application/sensor_controller/MOVEMENT/scif.h> #elif defined(SENSOR_REED) #include <Application/sensor_controller/REED/scif.h> #else typedef struct { uint16_t buttonState; ///< Current button state } SCIF_BUTTON_DEBOUNCER_OUTPUT_T; #endif #include "zcl_consts.h" static uint8_t reportableChange[] = {0x32, 0x00, 0x00, 0x00}; // 50 in int16_t // Occupancy Sensor Cluster uint8_t zclOccupancySensor_Occupancy = DOOR_STATE_CLOSED; const uint8_t zclOccupancySensor_OccupancySensorType = PIR_SENSOR_TYPE; static CONST zclAttrRec_t zclSensor_Attrs[] = { { ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, { // Attribute record ATTRID_OCCUPANCY_SENSING_OCCUPANCY, ZCL_DATATYPE_BITMAP8, ACCESS_CONTROL_READ | ACCESS_REPORTABLE, (void *)&zclOccupancySensor_Occupancy } }, { ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, { // Attribute record ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE, ZCL_DATATYPE_ENUM8, ACCESS_CONTROL_READ, (void *)&zclOccupancySensor_OccupancySensorType } }, }; static uint8_t CONST zclSensor_NumAttributes = ( sizeof(zclSensor_Attrs) / sizeof(zclSensor_Attrs[0]) ); /********************************************************************* * SIMPLE DESCRIPTOR */ // This is the Cluster ID List and should be filled with Application // specific cluster IDs. #define ZCLSENSOR_MAX_INCLUSTERS 4 static const cId_t zclSensor_InClusterList[ZCLSENSOR_MAX_INCLUSTERS] = { ZCL_CLUSTER_ID_GENERAL_BASIC, ZCL_CLUSTER_ID_GENERAL_IDENTIFY, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ZCL_CLUSTER_ID_GENERAL_POWER_CFG }; #define ZCLSENSOR_MAX_OUTCLUSTERS 1 static const cId_t zclSensor_OutClusterList[ZCLSENSOR_MAX_OUTCLUSTERS] = { ZCL_CLUSTER_ID_GENERAL_IDENTIFY }; static SimpleDescriptionFormat_t zclSensor_SimpleDesc = { SENSOR_ENDPOINT, // int Endpoint; ZCL_HA_PROFILE_ID, // uint16_t AppProfId[2]; ZCL_DEVICEID_OCCUPANCY_SENSOR, // uint16_t AppDeviceId[2]; SENSOR_DEVICE_VERSION, // int AppDevVer:4; SENSOR_FLAGS, // int AppFlags:4; ZCLSENSOR_MAX_INCLUSTERS, // byte AppNumInClusters; (cId_t *)zclSensor_InClusterList, // byte *pAppInClusterList; ZCLSENSOR_MAX_OUTCLUSTERS, // byte AppNumInClusters; (cId_t *)zclSensor_OutClusterList // byte *pAppInClusterList; }; void zclAddButtonAttrs(uint8_t endPoint) { zcl_registerAttrList( endPoint, zclSensor_NumAttributes, zclSensor_Attrs ); } static endPointDesc_t zclSensorEpDesc = {0}; void zclAddButtonEndPoints(uint8_t endPoint, uint8_t appServiceTaskId) { zclSensorEpDesc.endPoint = endPoint; zclSensorEpDesc.simpleDesc = &zclSensor_SimpleDesc; zclport_registerEndpoint(appServiceTaskId, &zclSensorEpDesc); } void ZclButtonReport(void) { zclReportCmd_t *pReportCmd; pReportCmd = malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) ); if(pReportCmd != NULL) { // Fill in the single attribute information for the temperature reading pReportCmd->numAttr = 1; pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8; pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy;// (uint8 *)&(zclSampleTemperatureSensor_MeasuredValue); afAddrType_t dstaddr; dstaddr.addr.shortAddr = 0x0000; dstaddr.addrMode = afAddr16Bit; dstaddr.endPoint = 1; dstaddr.panId = 0; // Call ZCL function to send the report zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 ); free(pReportCmd); } } void ZclButtonConfigureReport(bdbReportAttrCfgData_t *report, uint8_t appServiceTaskId) { zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t Req = {0}; if (zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS) { Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; Req.endpoint = SENSOR_ENDPOINT; Req.maxReportInt = 3600; Req.minReportInt = 0; OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE); Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req); } } uint8_t zlcGetButtonBdbReport(bdbReportAttrCfgData_t *report, bool check) { // return BDBREPORTING_SUCCESS; return bdb_getReport(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check ); } void process_door_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) { zstack_bdbRepChangedAttrValueReq_t Req; zclOccupancySensor_Occupancy = 1-output->buttonState; Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; Req.endpoint = SENSOR_ENDPOINT; Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req); } void process_movement_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) { zstack_bdbRepChangedAttrValueReq_t Req; zclOccupancySensor_Occupancy = output->buttonState; Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; Req.endpoint = SENSOR_ENDPOINT; Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req); }
31.62
191
(translation_unit) "/* \n * zcl_adc.c \n * \n * Created on: 31 Jan 2022 \n * Author: BigBob \n */ \n/* \n * zcl_light.c \n * \n * Created on: 27 Jan 2022 \n * Author: BigBob \n */ \n \n/* \n * zcl_temp_humid.c \n * \n * Created on: 26 Jan 2022 \n * Author: BigBob \n */ \n/********************************************************************* \n * INCLUDES \n */ \n#include <Application/zcl_sensor.h> \n#include "zcomdef.h" \n#include "zcl.h" \n#include "zcl_general.h" \n#include "zcl_ha.h" \n#include "zcl_ms.h" \n#include "zcl_port.h" \n#include "zstackapi.h" \n \n#if defined(SENSOR_MOVEMENT) \n#include <Application/sensor_controller/MOVEMENT/scif.h> \n#elif defined(SENSOR_REED) \n#include <Application/sensor_controller/REED/scif.h> \n#else \ntypedef struct { \n uint16_t buttonState; ///< Current button state \n} SCIF_BUTTON_DEBOUNCER_OUTPUT_T; \n \n#endif \n \n#include "zcl_consts.h" \n \nstatic uint8_t reportableChange[] = {0x32, 0x00, 0x00, 0x00}; // 50 in int16_t \n \n// Occupancy Sensor Cluster \nuint8_t zclOccupancySensor_Occupancy = DOOR_STATE_CLOSED; \nconst uint8_t zclOccupancySensor_OccupancySensorType = PIR_SENSOR_TYPE; \n \n \nstatic CONST zclAttrRec_t zclSensor_Attrs[] = \n{ \n { \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n { // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY, \n ZCL_DATATYPE_BITMAP8, \n ACCESS_CONTROL_READ | ACCESS_REPORTABLE, \n (void *)&zclOccupancySensor_Occupancy \n } \n }, \n { \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n { // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE, \n ZCL_DATATYPE_ENUM8, \n ACCESS_CONTROL_READ, \n (void *)&zclOccupancySensor_OccupancySensorType \n } \n }, \n}; \n \nstatic uint8_t CONST zclSensor_NumAttributes = ( sizeof(zclSensor_Attrs) / sizeof(zclSensor_Attrs[0]) ); \n \n \n /********************************************************************* \n * SIMPLE DESCRIPTOR \n */ \n // This is the Cluster ID List and should be filled with Application \n // specific cluster IDs. \n \n#define ZCLSENSOR_MAX_INCLUSTERS 4 \nstatic const cId_t zclSensor_InClusterList[ZCLSENSOR_MAX_INCLUSTERS] = \n{ \n ZCL_CLUSTER_ID_GENERAL_BASIC, \n ZCL_CLUSTER_ID_GENERAL_IDENTIFY, \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n ZCL_CLUSTER_ID_GENERAL_POWER_CFG \n}; \n \n#define ZCLSENSOR_MAX_OUTCLUSTERS 1 \nstatic const cId_t zclSensor_OutClusterList[ZCLSENSOR_MAX_OUTCLUSTERS] = \n{ \n ZCL_CLUSTER_ID_GENERAL_IDENTIFY \n}; \n \nstatic SimpleDescriptionFormat_t zclSensor_SimpleDesc = \n{ \n SENSOR_ENDPOINT, // int Endpoint; \n ZCL_HA_PROFILE_ID, // uint16_t AppProfId[2]; \n ZCL_DEVICEID_OCCUPANCY_SENSOR, // uint16_t AppDeviceId[2]; \n SENSOR_DEVICE_VERSION, // int AppDevVer:4; \n SENSOR_FLAGS, // int AppFlags:4; \n ZCLSENSOR_MAX_INCLUSTERS, // byte AppNumInClusters; \n (cId_t *)zclSensor_InClusterList, // byte *pAppInClusterList; \n ZCLSENSOR_MAX_OUTCLUSTERS, // byte AppNumInClusters; \n (cId_t *)zclSensor_OutClusterList // byte *pAppInClusterList; \n}; \n \n \nvoid zclAddButtonAttrs(uint8_t endPoint) { \n \n zcl_registerAttrList( endPoint, zclSensor_NumAttributes, zclSensor_Attrs ); \n} \n \nstatic endPointDesc_t zclSensorEpDesc = {0}; \n \nvoid zclAddButtonEndPoints(uint8_t endPoint, uint8_t appServiceTaskId) { \n \n zclSensorEpDesc.endPoint = endPoint; \n zclSensorEpDesc.simpleDesc = &zclSensor_SimpleDesc; \n zclport_registerEndpoint(appServiceTaskId, &zclSensorEpDesc); \n} \n \nvoid ZclButtonReport(void) { \n \n zclReportCmd_t *pReportCmd; \n pReportCmd = malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) ); \n if(pReportCmd != NULL) \n { \n // Fill in the single attribute information for the temperature reading \n pReportCmd->numAttr = 1; \n pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8; \n pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy;// (uint8 *)&(zclSampleTemperatureSensor_MeasuredValue); \n \n afAddrType_t dstaddr; \n dstaddr.addr.shortAddr = 0x0000; \n dstaddr.addrMode = afAddr16Bit; \n dstaddr.endPoint = 1; \n dstaddr.panId = 0; \n \n // Call ZCL function to send the report \n zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 ); \n \n free(pReportCmd); \n } \n} \n \nvoid ZclButtonConfigureReport(bdbReportAttrCfgData_t *report, uint8_t appServiceTaskId) { \n zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t Req = {0}; \n \n if (zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS) { \n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; \n Req.endpoint = SENSOR_ENDPOINT; \n Req.maxReportInt = 3600; \n Req.minReportInt = 0; \n OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE); \n Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req); \n \n } \n} \n \nuint8_t zlcGetButtonBdbReport(bdbReportAttrCfgData_t *report, bool check) { \n \n// return BDBREPORTING_SUCCESS; \n return bdb_getReport(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check ); \n} \n \n \nvoid process_door_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) { \n zstack_bdbRepChangedAttrValueReq_t Req; \n \n zclOccupancySensor_Occupancy = 1-output->buttonState; \n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; \n Req.endpoint = SENSOR_ENDPOINT; \n Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req); \n} \n \nvoid process_movement_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) { \n zstack_bdbRepChangedAttrValueReq_t Req; \n \n zclOccupancySensor_Occupancy = output->buttonState; \n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; \n Req.endpoint = SENSOR_ENDPOINT; \n Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req); \n} \n \n \n \n" (comment) "/* \n * zcl_adc.c \n * \n * Created on: 31 Jan 2022 \n * Author: BigBob \n */" (comment) "/* \n * zcl_light.c \n * \n * Created on: 27 Jan 2022 \n * Author: BigBob \n */" (comment) "/* \n * zcl_temp_humid.c \n * \n * Created on: 26 Jan 2022 \n * Author: BigBob \n */" (comment) "/********************************************************************* \n * INCLUDES \n */" (preproc_include) "#include <Application/zcl_sensor.h> \n" (#include) "#include" (system_lib_string) "<Application/zcl_sensor.h>" (preproc_include) "#include "zcomdef.h" \n" (#include) "#include" (string_literal) ""zcomdef.h"" (") """ (string_content) "zcomdef.h" (") """ (preproc_include) "#include "zcl.h" \n" (#include) "#include" (string_literal) ""zcl.h"" (") """ (string_content) "zcl.h" (") """ (preproc_include) "#include "zcl_general.h" \n" (#include) "#include" (string_literal) ""zcl_general.h"" (") """ (string_content) "zcl_general.h" (") """ (preproc_include) "#include "zcl_ha.h" \n" (#include) "#include" (string_literal) ""zcl_ha.h"" (") """ (string_content) "zcl_ha.h" (") """ (preproc_include) "#include "zcl_ms.h" \n" (#include) "#include" (string_literal) ""zcl_ms.h"" (") """ (string_content) "zcl_ms.h" (") """ (preproc_include) "#include "zcl_port.h" \n" (#include) "#include" (string_literal) ""zcl_port.h"" (") """ (string_content) "zcl_port.h" (") """ (preproc_include) "#include "zstackapi.h" \n" (#include) "#include" (string_literal) ""zstackapi.h"" (") """ (string_content) "zstackapi.h" (") """ (preproc_if) "#if defined(SENSOR_MOVEMENT) \n#include <Application/sensor_controller/MOVEMENT/scif.h> \n#elif defined(SENSOR_REED) \n#include <Application/sensor_controller/REED/scif.h> \n#else \ntypedef struct { \n uint16_t buttonState; ///< Current button state \n} SCIF_BUTTON_DEBOUNCER_OUTPUT_T; \n \n#endif" (#if) "#if" (preproc_defined) "defined(SENSOR_MOVEMENT)" (defined) "defined" (() "(" (identifier) "SENSOR_MOVEMENT" ()) ")" ( ) "\n" (preproc_include) "#include <Application/sensor_controller/MOVEMENT/scif.h> \n" (#include) "#include" (system_lib_string) "<Application/sensor_controller/MOVEMENT/scif.h>" (preproc_elif) "#elif defined(SENSOR_REED) \n#include <Application/sensor_controller/REED/scif.h> \n#else \ntypedef struct { \n uint16_t buttonState; ///< Current button state \n} SCIF_BUTTON_DEBOUNCER_OUTPUT_T;" (#elif) "#elif" (preproc_defined) "defined(SENSOR_REED)" (defined) "defined" (() "(" (identifier) "SENSOR_REED" ()) ")" ( ) "\n" (preproc_include) "#include <Application/sensor_controller/REED/scif.h> \n" (#include) "#include" (system_lib_string) "<Application/sensor_controller/REED/scif.h>" (preproc_else) "#else \ntypedef struct { \n uint16_t buttonState; ///< Current button state \n} SCIF_BUTTON_DEBOUNCER_OUTPUT_T;" (#else) "#else" (type_definition) "typedef struct { \n uint16_t buttonState; ///< Current button state \n} SCIF_BUTTON_DEBOUNCER_OUTPUT_T;" (typedef) "typedef" (struct_specifier) "struct { \n uint16_t buttonState; ///< Current button state \n}" (struct) "struct" (field_declaration_list) "{ \n uint16_t buttonState; ///< Current button state \n}" ({) "{" (field_declaration) "uint16_t buttonState;" (primitive_type) "uint16_t" (field_identifier) "buttonState" (;) ";" (comment) "///< Current button state " (}) "}" (type_identifier) "SCIF_BUTTON_DEBOUNCER_OUTPUT_T" (;) ";" (#endif) "#endif" (preproc_include) "#include "zcl_consts.h" \n" (#include) "#include" (string_literal) ""zcl_consts.h"" (") """ (string_content) "zcl_consts.h" (") """ (declaration) "static uint8_t reportableChange[] = {0x32, 0x00, 0x00, 0x00};" (storage_class_specifier) "static" (static) "static" (primitive_type) "uint8_t" (init_declarator) "reportableChange[] = {0x32, 0x00, 0x00, 0x00}" (array_declarator) "reportableChange[]" (identifier) "reportableChange" ([) "[" (]) "]" (=) "=" (initializer_list) "{0x32, 0x00, 0x00, 0x00}" ({) "{" (number_literal) "0x32" (,) "," (number_literal) "0x00" (,) "," (number_literal) "0x00" (,) "," (number_literal) "0x00" (}) "}" (;) ";" (comment) "// 50 in int16_t " (comment) "// Occupancy Sensor Cluster " (declaration) "uint8_t zclOccupancySensor_Occupancy = DOOR_STATE_CLOSED;" (primitive_type) "uint8_t" (init_declarator) "zclOccupancySensor_Occupancy = DOOR_STATE_CLOSED" (identifier) "zclOccupancySensor_Occupancy" (=) "=" (identifier) "DOOR_STATE_CLOSED" (;) ";" (declaration) "const uint8_t zclOccupancySensor_OccupancySensorType = PIR_SENSOR_TYPE;" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (init_declarator) "zclOccupancySensor_OccupancySensorType = PIR_SENSOR_TYPE" (identifier) "zclOccupancySensor_OccupancySensorType" (=) "=" (identifier) "PIR_SENSOR_TYPE" (;) ";" (declaration) "static CONST zclAttrRec_t zclSensor_Attrs[] = \n{ \n { \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n { // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY, \n ZCL_DATATYPE_BITMAP8, \n ACCESS_CONTROL_READ | ACCESS_REPORTABLE, \n (void *)&zclOccupancySensor_Occupancy \n } \n }, \n { \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n { // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE, \n ZCL_DATATYPE_ENUM8, \n ACCESS_CONTROL_READ, \n (void *)&zclOccupancySensor_OccupancySensorType \n } \n }, \n};" (storage_class_specifier) "static" (static) "static" (type_identifier) "CONST" (ERROR) "zclAttrRec_t" (identifier) "zclAttrRec_t" (init_declarator) "zclSensor_Attrs[] = \n{ \n { \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n { // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY, \n ZCL_DATATYPE_BITMAP8, \n ACCESS_CONTROL_READ | ACCESS_REPORTABLE, \n (void *)&zclOccupancySensor_Occupancy \n } \n }, \n { \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n { // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE, \n ZCL_DATATYPE_ENUM8, \n ACCESS_CONTROL_READ, \n (void *)&zclOccupancySensor_OccupancySensorType \n } \n }, \n}" (array_declarator) "zclSensor_Attrs[]" (identifier) "zclSensor_Attrs" ([) "[" (]) "]" (=) "=" (initializer_list) "{ \n { \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n { // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY, \n ZCL_DATATYPE_BITMAP8, \n ACCESS_CONTROL_READ | ACCESS_REPORTABLE, \n (void *)&zclOccupancySensor_Occupancy \n } \n }, \n { \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n { // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE, \n ZCL_DATATYPE_ENUM8, \n ACCESS_CONTROL_READ, \n (void *)&zclOccupancySensor_OccupancySensorType \n } \n }, \n}" ({) "{" (initializer_list) "{ \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n { // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY, \n ZCL_DATATYPE_BITMAP8, \n ACCESS_CONTROL_READ | ACCESS_REPORTABLE, \n (void *)&zclOccupancySensor_Occupancy \n } \n }" ({) "{" (identifier) "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING" (,) "," (initializer_list) "{ // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY, \n ZCL_DATATYPE_BITMAP8, \n ACCESS_CONTROL_READ | ACCESS_REPORTABLE, \n (void *)&zclOccupancySensor_Occupancy \n }" ({) "{" (comment) "// Attribute record " (identifier) "ATTRID_OCCUPANCY_SENSING_OCCUPANCY" (,) "," (identifier) "ZCL_DATATYPE_BITMAP8" (,) "," (binary_expression) "ACCESS_CONTROL_READ | ACCESS_REPORTABLE" (identifier) "ACCESS_CONTROL_READ" (|) "|" (identifier) "ACCESS_REPORTABLE" (,) "," (cast_expression) "(void *)&zclOccupancySensor_Occupancy" (() "(" (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&zclOccupancySensor_Occupancy" (&) "&" (identifier) "zclOccupancySensor_Occupancy" (}) "}" (}) "}" (,) "," (initializer_list) "{ \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n { // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE, \n ZCL_DATATYPE_ENUM8, \n ACCESS_CONTROL_READ, \n (void *)&zclOccupancySensor_OccupancySensorType \n } \n }" ({) "{" (identifier) "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING" (,) "," (initializer_list) "{ // Attribute record \n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE, \n ZCL_DATATYPE_ENUM8, \n ACCESS_CONTROL_READ, \n (void *)&zclOccupancySensor_OccupancySensorType \n }" ({) "{" (comment) "// Attribute record " (identifier) "ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE" (,) "," (identifier) "ZCL_DATATYPE_ENUM8" (,) "," (identifier) "ACCESS_CONTROL_READ" (,) "," (cast_expression) "(void *)&zclOccupancySensor_OccupancySensorType" (() "(" (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&zclOccupancySensor_OccupancySensorType" (&) "&" (identifier) "zclOccupancySensor_OccupancySensorType" (}) "}" (}) "}" (,) "," (}) "}" (;) ";" (declaration) "static uint8_t CONST zclSensor_NumAttributes = ( sizeof(zclSensor_Attrs) / sizeof(zclSensor_Attrs[0]) );" (storage_class_specifier) "static" (static) "static" (primitive_type) "uint8_t" (ERROR) "CONST" (identifier) "CONST" (init_declarator) "zclSensor_NumAttributes = ( sizeof(zclSensor_Attrs) / sizeof(zclSensor_Attrs[0]) )" (identifier) "zclSensor_NumAttributes" (=) "=" (parenthesized_expression) "( sizeof(zclSensor_Attrs) / sizeof(zclSensor_Attrs[0]) )" (() "(" (binary_expression) "sizeof(zclSensor_Attrs) / sizeof(zclSensor_Attrs[0])" (sizeof_expression) "sizeof(zclSensor_Attrs)" (sizeof) "sizeof" (parenthesized_expression) "(zclSensor_Attrs)" (() "(" (identifier) "zclSensor_Attrs" ()) ")" (/) "/" (sizeof_expression) "sizeof(zclSensor_Attrs[0])" (sizeof) "sizeof" (parenthesized_expression) "(zclSensor_Attrs[0])" (() "(" (subscript_expression) "zclSensor_Attrs[0]" (identifier) "zclSensor_Attrs" ([) "[" (number_literal) "0" (]) "]" ()) ")" ()) ")" (;) ";" (comment) "/********************************************************************* \n * SIMPLE DESCRIPTOR \n */" (comment) "// This is the Cluster ID List and should be filled with Application " (comment) "// specific cluster IDs. " (preproc_def) "#define ZCLSENSOR_MAX_INCLUSTERS 4 \n" (#define) "#define" (identifier) "ZCLSENSOR_MAX_INCLUSTERS" (preproc_arg) "4 " (declaration) "static const cId_t zclSensor_InClusterList[ZCLSENSOR_MAX_INCLUSTERS] = \n{ \n ZCL_CLUSTER_ID_GENERAL_BASIC, \n ZCL_CLUSTER_ID_GENERAL_IDENTIFY, \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n ZCL_CLUSTER_ID_GENERAL_POWER_CFG \n};" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (type_identifier) "cId_t" (init_declarator) "zclSensor_InClusterList[ZCLSENSOR_MAX_INCLUSTERS] = \n{ \n ZCL_CLUSTER_ID_GENERAL_BASIC, \n ZCL_CLUSTER_ID_GENERAL_IDENTIFY, \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n ZCL_CLUSTER_ID_GENERAL_POWER_CFG \n}" (array_declarator) "zclSensor_InClusterList[ZCLSENSOR_MAX_INCLUSTERS]" (identifier) "zclSensor_InClusterList" ([) "[" (identifier) "ZCLSENSOR_MAX_INCLUSTERS" (]) "]" (=) "=" (initializer_list) "{ \n ZCL_CLUSTER_ID_GENERAL_BASIC, \n ZCL_CLUSTER_ID_GENERAL_IDENTIFY, \n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, \n ZCL_CLUSTER_ID_GENERAL_POWER_CFG \n}" ({) "{" (identifier) "ZCL_CLUSTER_ID_GENERAL_BASIC" (,) "," (identifier) "ZCL_CLUSTER_ID_GENERAL_IDENTIFY" (,) "," (identifier) "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING" (,) "," (identifier) "ZCL_CLUSTER_ID_GENERAL_POWER_CFG" (}) "}" (;) ";" (preproc_def) "#define ZCLSENSOR_MAX_OUTCLUSTERS 1 \n" (#define) "#define" (identifier) "ZCLSENSOR_MAX_OUTCLUSTERS" (preproc_arg) "1 " (declaration) "static const cId_t zclSensor_OutClusterList[ZCLSENSOR_MAX_OUTCLUSTERS] = \n{ \n ZCL_CLUSTER_ID_GENERAL_IDENTIFY \n};" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (type_identifier) "cId_t" (init_declarator) "zclSensor_OutClusterList[ZCLSENSOR_MAX_OUTCLUSTERS] = \n{ \n ZCL_CLUSTER_ID_GENERAL_IDENTIFY \n}" (array_declarator) "zclSensor_OutClusterList[ZCLSENSOR_MAX_OUTCLUSTERS]" (identifier) "zclSensor_OutClusterList" ([) "[" (identifier) "ZCLSENSOR_MAX_OUTCLUSTERS" (]) "]" (=) "=" (initializer_list) "{ \n ZCL_CLUSTER_ID_GENERAL_IDENTIFY \n}" ({) "{" (identifier) "ZCL_CLUSTER_ID_GENERAL_IDENTIFY" (}) "}" (;) ";" (declaration) "static SimpleDescriptionFormat_t zclSensor_SimpleDesc = \n{ \n SENSOR_ENDPOINT, // int Endpoint; \n ZCL_HA_PROFILE_ID, // uint16_t AppProfId[2]; \n ZCL_DEVICEID_OCCUPANCY_SENSOR, // uint16_t AppDeviceId[2]; \n SENSOR_DEVICE_VERSION, // int AppDevVer:4; \n SENSOR_FLAGS, // int AppFlags:4; \n ZCLSENSOR_MAX_INCLUSTERS, // byte AppNumInClusters; \n (cId_t *)zclSensor_InClusterList, // byte *pAppInClusterList; \n ZCLSENSOR_MAX_OUTCLUSTERS, // byte AppNumInClusters; \n (cId_t *)zclSensor_OutClusterList // byte *pAppInClusterList; \n};" (storage_class_specifier) "static" (static) "static" (type_identifier) "SimpleDescriptionFormat_t" (init_declarator) "zclSensor_SimpleDesc = \n{ \n SENSOR_ENDPOINT, // int Endpoint; \n ZCL_HA_PROFILE_ID, // uint16_t AppProfId[2]; \n ZCL_DEVICEID_OCCUPANCY_SENSOR, // uint16_t AppDeviceId[2]; \n SENSOR_DEVICE_VERSION, // int AppDevVer:4; \n SENSOR_FLAGS, // int AppFlags:4; \n ZCLSENSOR_MAX_INCLUSTERS, // byte AppNumInClusters; \n (cId_t *)zclSensor_InClusterList, // byte *pAppInClusterList; \n ZCLSENSOR_MAX_OUTCLUSTERS, // byte AppNumInClusters; \n (cId_t *)zclSensor_OutClusterList // byte *pAppInClusterList; \n}" (identifier) "zclSensor_SimpleDesc" (=) "=" (initializer_list) "{ \n SENSOR_ENDPOINT, // int Endpoint; \n ZCL_HA_PROFILE_ID, // uint16_t AppProfId[2]; \n ZCL_DEVICEID_OCCUPANCY_SENSOR, // uint16_t AppDeviceId[2]; \n SENSOR_DEVICE_VERSION, // int AppDevVer:4; \n SENSOR_FLAGS, // int AppFlags:4; \n ZCLSENSOR_MAX_INCLUSTERS, // byte AppNumInClusters; \n (cId_t *)zclSensor_InClusterList, // byte *pAppInClusterList; \n ZCLSENSOR_MAX_OUTCLUSTERS, // byte AppNumInClusters; \n (cId_t *)zclSensor_OutClusterList // byte *pAppInClusterList; \n}" ({) "{" (identifier) "SENSOR_ENDPOINT" (,) "," (comment) "// int Endpoint; " (identifier) "ZCL_HA_PROFILE_ID" (,) "," (comment) "// uint16_t AppProfId[2]; " (identifier) "ZCL_DEVICEID_OCCUPANCY_SENSOR" (,) "," (comment) "// uint16_t AppDeviceId[2]; " (identifier) "SENSOR_DEVICE_VERSION" (,) "," (comment) "// int AppDevVer:4; " (identifier) "SENSOR_FLAGS" (,) "," (comment) "// int AppFlags:4; " (identifier) "ZCLSENSOR_MAX_INCLUSTERS" (,) "," (comment) "// byte AppNumInClusters; " (cast_expression) "(cId_t *)zclSensor_InClusterList" (() "(" (type_descriptor) "cId_t *" (type_identifier) "cId_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "zclSensor_InClusterList" (,) "," (comment) "// byte *pAppInClusterList; " (identifier) "ZCLSENSOR_MAX_OUTCLUSTERS" (,) "," (comment) "// byte AppNumInClusters; " (cast_expression) "(cId_t *)zclSensor_OutClusterList" (() "(" (type_descriptor) "cId_t *" (type_identifier) "cId_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "zclSensor_OutClusterList" (comment) "// byte *pAppInClusterList; " (}) "}" (;) ";" (function_definition) "void zclAddButtonAttrs(uint8_t endPoint) { \n \n zcl_registerAttrList( endPoint, zclSensor_NumAttributes, zclSensor_Attrs ); \n}" (primitive_type) "void" (function_declarator) "zclAddButtonAttrs(uint8_t endPoint)" (identifier) "zclAddButtonAttrs" (parameter_list) "(uint8_t endPoint)" (() "(" (parameter_declaration) "uint8_t endPoint" (primitive_type) "uint8_t" (identifier) "endPoint" ()) ")" (compound_statement) "{ \n \n zcl_registerAttrList( endPoint, zclSensor_NumAttributes, zclSensor_Attrs ); \n}" ({) "{" (expression_statement) "zcl_registerAttrList( endPoint, zclSensor_NumAttributes, zclSensor_Attrs );" (call_expression) "zcl_registerAttrList( endPoint, zclSensor_NumAttributes, zclSensor_Attrs )" (identifier) "zcl_registerAttrList" (argument_list) "( endPoint, zclSensor_NumAttributes, zclSensor_Attrs )" (() "(" (identifier) "endPoint" (,) "," (identifier) "zclSensor_NumAttributes" (,) "," (identifier) "zclSensor_Attrs" ()) ")" (;) ";" (}) "}" (declaration) "static endPointDesc_t zclSensorEpDesc = {0};" (storage_class_specifier) "static" (static) "static" (type_identifier) "endPointDesc_t" (init_declarator) "zclSensorEpDesc = {0}" (identifier) "zclSensorEpDesc" (=) "=" (initializer_list) "{0}" ({) "{" (number_literal) "0" (}) "}" (;) ";" (function_definition) "void zclAddButtonEndPoints(uint8_t endPoint, uint8_t appServiceTaskId) { \n \n zclSensorEpDesc.endPoint = endPoint; \n zclSensorEpDesc.simpleDesc = &zclSensor_SimpleDesc; \n zclport_registerEndpoint(appServiceTaskId, &zclSensorEpDesc); \n}" (primitive_type) "void" (function_declarator) "zclAddButtonEndPoints(uint8_t endPoint, uint8_t appServiceTaskId)" (identifier) "zclAddButtonEndPoints" (parameter_list) "(uint8_t endPoint, uint8_t appServiceTaskId)" (() "(" (parameter_declaration) "uint8_t endPoint" (primitive_type) "uint8_t" (identifier) "endPoint" (,) "," (parameter_declaration) "uint8_t appServiceTaskId" (primitive_type) "uint8_t" (identifier) "appServiceTaskId" ()) ")" (compound_statement) "{ \n \n zclSensorEpDesc.endPoint = endPoint; \n zclSensorEpDesc.simpleDesc = &zclSensor_SimpleDesc; \n zclport_registerEndpoint(appServiceTaskId, &zclSensorEpDesc); \n}" ({) "{" (expression_statement) "zclSensorEpDesc.endPoint = endPoint;" (assignment_expression) "zclSensorEpDesc.endPoint = endPoint" (field_expression) "zclSensorEpDesc.endPoint" (identifier) "zclSensorEpDesc" (.) "." (field_identifier) "endPoint" (=) "=" (identifier) "endPoint" (;) ";" (expression_statement) "zclSensorEpDesc.simpleDesc = &zclSensor_SimpleDesc;" (assignment_expression) "zclSensorEpDesc.simpleDesc = &zclSensor_SimpleDesc" (field_expression) "zclSensorEpDesc.simpleDesc" (identifier) "zclSensorEpDesc" (.) "." (field_identifier) "simpleDesc" (=) "=" (pointer_expression) "&zclSensor_SimpleDesc" (&) "&" (identifier) "zclSensor_SimpleDesc" (;) ";" (expression_statement) "zclport_registerEndpoint(appServiceTaskId, &zclSensorEpDesc);" (call_expression) "zclport_registerEndpoint(appServiceTaskId, &zclSensorEpDesc)" (identifier) "zclport_registerEndpoint" (argument_list) "(appServiceTaskId, &zclSensorEpDesc)" (() "(" (identifier) "appServiceTaskId" (,) "," (pointer_expression) "&zclSensorEpDesc" (&) "&" (identifier) "zclSensorEpDesc" ()) ")" (;) ";" (}) "}" (function_definition) "void ZclButtonReport(void) { \n \n zclReportCmd_t *pReportCmd; \n pReportCmd = malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) ); \n if(pReportCmd != NULL) \n { \n // Fill in the single attribute information for the temperature reading \n pReportCmd->numAttr = 1; \n pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8; \n pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy;// (uint8 *)&(zclSampleTemperatureSensor_MeasuredValue); \n \n afAddrType_t dstaddr; \n dstaddr.addr.shortAddr = 0x0000; \n dstaddr.addrMode = afAddr16Bit; \n dstaddr.endPoint = 1; \n dstaddr.panId = 0; \n \n // Call ZCL function to send the report \n zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 ); \n \n free(pReportCmd); \n } \n}" (primitive_type) "void" (function_declarator) "ZclButtonReport(void)" (identifier) "ZclButtonReport" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ \n \n zclReportCmd_t *pReportCmd; \n pReportCmd = malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) ); \n if(pReportCmd != NULL) \n { \n // Fill in the single attribute information for the temperature reading \n pReportCmd->numAttr = 1; \n pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8; \n pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy;// (uint8 *)&(zclSampleTemperatureSensor_MeasuredValue); \n \n afAddrType_t dstaddr; \n dstaddr.addr.shortAddr = 0x0000; \n dstaddr.addrMode = afAddr16Bit; \n dstaddr.endPoint = 1; \n dstaddr.panId = 0; \n \n // Call ZCL function to send the report \n zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 ); \n \n free(pReportCmd); \n } \n}" ({) "{" (declaration) "zclReportCmd_t *pReportCmd;" (type_identifier) "zclReportCmd_t" (pointer_declarator) "*pReportCmd" (*) "*" (identifier) "pReportCmd" (;) ";" (expression_statement) "pReportCmd = malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) );" (assignment_expression) "pReportCmd = malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) )" (identifier) "pReportCmd" (=) "=" (call_expression) "malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) )" (identifier) "malloc" (argument_list) "( sizeof(zclReportCmd_t) + sizeof(zclReport_t) )" (() "(" (binary_expression) "sizeof(zclReportCmd_t) + sizeof(zclReport_t)" (sizeof_expression) "sizeof(zclReportCmd_t)" (sizeof) "sizeof" (parenthesized_expression) "(zclReportCmd_t)" (() "(" (identifier) "zclReportCmd_t" ()) ")" (+) "+" (sizeof_expression) "sizeof(zclReport_t)" (sizeof) "sizeof" (parenthesized_expression) "(zclReport_t)" (() "(" (identifier) "zclReport_t" ()) ")" ()) ")" (;) ";" (if_statement) "if(pReportCmd != NULL) \n { \n // Fill in the single attribute information for the temperature reading \n pReportCmd->numAttr = 1; \n pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8; \n pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy;// (uint8 *)&(zclSampleTemperatureSensor_MeasuredValue); \n \n afAddrType_t dstaddr; \n dstaddr.addr.shortAddr = 0x0000; \n dstaddr.addrMode = afAddr16Bit; \n dstaddr.endPoint = 1; \n dstaddr.panId = 0; \n \n // Call ZCL function to send the report \n zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 ); \n \n free(pReportCmd); \n }" (if) "if" (parenthesized_expression) "(pReportCmd != NULL)" (() "(" (binary_expression) "pReportCmd != NULL" (identifier) "pReportCmd" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{ \n // Fill in the single attribute information for the temperature reading \n pReportCmd->numAttr = 1; \n pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8; \n pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy;// (uint8 *)&(zclSampleTemperatureSensor_MeasuredValue); \n \n afAddrType_t dstaddr; \n dstaddr.addr.shortAddr = 0x0000; \n dstaddr.addrMode = afAddr16Bit; \n dstaddr.endPoint = 1; \n dstaddr.panId = 0; \n \n // Call ZCL function to send the report \n zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 ); \n \n free(pReportCmd); \n }" ({) "{" (comment) "// Fill in the single attribute information for the temperature reading " (expression_statement) "pReportCmd->numAttr = 1;" (assignment_expression) "pReportCmd->numAttr = 1" (field_expression) "pReportCmd->numAttr" (identifier) "pReportCmd" (->) "->" (field_identifier) "numAttr" (=) "=" (number_literal) "1" (;) ";" (expression_statement) "pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;" (assignment_expression) "pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY" (field_expression) "pReportCmd->attrList[0].attrID" (subscript_expression) "pReportCmd->attrList[0]" (field_expression) "pReportCmd->attrList" (identifier) "pReportCmd" (->) "->" (field_identifier) "attrList" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "attrID" (=) "=" (identifier) "ATTRID_OCCUPANCY_SENSING_OCCUPANCY" (;) ";" (expression_statement) "pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8;" (assignment_expression) "pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8" (field_expression) "pReportCmd->attrList[0].dataType" (subscript_expression) "pReportCmd->attrList[0]" (field_expression) "pReportCmd->attrList" (identifier) "pReportCmd" (->) "->" (field_identifier) "attrList" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "dataType" (=) "=" (identifier) "ZCL_DATATYPE_BITMAP8" (;) ";" (expression_statement) "pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy;" (assignment_expression) "pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy" (field_expression) "pReportCmd->attrList[0].attrData" (subscript_expression) "pReportCmd->attrList[0]" (field_expression) "pReportCmd->attrList" (identifier) "pReportCmd" (->) "->" (field_identifier) "attrList" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "attrData" (=) "=" (cast_expression) "(void *)&zclOccupancySensor_Occupancy" (() "(" (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&zclOccupancySensor_Occupancy" (&) "&" (identifier) "zclOccupancySensor_Occupancy" (;) ";" (comment) "// (uint8 *)&(zclSampleTemperatureSensor_MeasuredValue); " (declaration) "afAddrType_t dstaddr;" (type_identifier) "afAddrType_t" (identifier) "dstaddr" (;) ";" (expression_statement) "dstaddr.addr.shortAddr = 0x0000;" (assignment_expression) "dstaddr.addr.shortAddr = 0x0000" (field_expression) "dstaddr.addr.shortAddr" (field_expression) "dstaddr.addr" (identifier) "dstaddr" (.) "." (field_identifier) "addr" (.) "." (field_identifier) "shortAddr" (=) "=" (number_literal) "0x0000" (;) ";" (expression_statement) "dstaddr.addrMode = afAddr16Bit;" (assignment_expression) "dstaddr.addrMode = afAddr16Bit" (field_expression) "dstaddr.addrMode" (identifier) "dstaddr" (.) "." (field_identifier) "addrMode" (=) "=" (identifier) "afAddr16Bit" (;) ";" (expression_statement) "dstaddr.endPoint = 1;" (assignment_expression) "dstaddr.endPoint = 1" (field_expression) "dstaddr.endPoint" (identifier) "dstaddr" (.) "." (field_identifier) "endPoint" (=) "=" (number_literal) "1" (;) ";" (expression_statement) "dstaddr.panId = 0;" (assignment_expression) "dstaddr.panId = 0" (field_expression) "dstaddr.panId" (identifier) "dstaddr" (.) "." (field_identifier) "panId" (=) "=" (number_literal) "0" (;) ";" (comment) "// Call ZCL function to send the report " (expression_statement) "zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 );" (call_expression) "zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 )" (identifier) "zcl_SendReportCmd" (argument_list) "(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 )" (() "(" (identifier) "SENSOR_ENDPOINT" (,) "," (pointer_expression) "&dstaddr" (&) "&" (identifier) "dstaddr" (,) "," (identifier) "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING" (,) "," (identifier) "pReportCmd" (,) "," (identifier) "ZCL_FRAME_SERVER_CLIENT_DIR" (,) "," (number_literal) "1" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "free(pReportCmd);" (call_expression) "free(pReportCmd)" (identifier) "free" (argument_list) "(pReportCmd)" (() "(" (identifier) "pReportCmd" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "void ZclButtonConfigureReport(bdbReportAttrCfgData_t *report, uint8_t appServiceTaskId) { \n zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t Req = {0}; \n \n if (zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS) { \n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; \n Req.endpoint = SENSOR_ENDPOINT; \n Req.maxReportInt = 3600; \n Req.minReportInt = 0; \n OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE); \n Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req); \n \n } \n}" (primitive_type) "void" (function_declarator) "ZclButtonConfigureReport(bdbReportAttrCfgData_t *report, uint8_t appServiceTaskId)" (identifier) "ZclButtonConfigureReport" (parameter_list) "(bdbReportAttrCfgData_t *report, uint8_t appServiceTaskId)" (() "(" (parameter_declaration) "bdbReportAttrCfgData_t *report" (type_identifier) "bdbReportAttrCfgData_t" (pointer_declarator) "*report" (*) "*" (identifier) "report" (,) "," (parameter_declaration) "uint8_t appServiceTaskId" (primitive_type) "uint8_t" (identifier) "appServiceTaskId" ()) ")" (compound_statement) "{ \n zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t Req = {0}; \n \n if (zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS) { \n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; \n Req.endpoint = SENSOR_ENDPOINT; \n Req.maxReportInt = 3600; \n Req.minReportInt = 0; \n OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE); \n Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req); \n \n } \n}" ({) "{" (declaration) "zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t Req = {0};" (type_identifier) "zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t" (init_declarator) "Req = {0}" (identifier) "Req" (=) "=" (initializer_list) "{0}" ({) "{" (number_literal) "0" (}) "}" (;) ";" (if_statement) "if (zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS) { \n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; \n Req.endpoint = SENSOR_ENDPOINT; \n Req.maxReportInt = 3600; \n Req.minReportInt = 0; \n OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE); \n Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req); \n \n }" (if) "if" (parenthesized_expression) "(zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS)" (() "(" (binary_expression) "zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS" (call_expression) "zlcGetButtonBdbReport(report, true)" (identifier) "zlcGetButtonBdbReport" (argument_list) "(report, true)" (() "(" (identifier) "report" (,) "," (true) "true" ()) ")" (!=) "!=" (identifier) "BDBREPORTING_SUCCESS" ()) ")" (compound_statement) "{ \n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; \n Req.endpoint = SENSOR_ENDPOINT; \n Req.maxReportInt = 3600; \n Req.minReportInt = 0; \n OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE); \n Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req); \n \n }" ({) "{" (expression_statement) "Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;" (assignment_expression) "Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY" (field_expression) "Req.attrID" (identifier) "Req" (.) "." (field_identifier) "attrID" (=) "=" (identifier) "ATTRID_OCCUPANCY_SENSING_OCCUPANCY" (;) ";" (expression_statement) "Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING;" (assignment_expression) "Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING" (field_expression) "Req.cluster" (identifier) "Req" (.) "." (field_identifier) "cluster" (=) "=" (identifier) "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING" (;) ";" (expression_statement) "Req.endpoint = SENSOR_ENDPOINT;" (assignment_expression) "Req.endpoint = SENSOR_ENDPOINT" (field_expression) "Req.endpoint" (identifier) "Req" (.) "." (field_identifier) "endpoint" (=) "=" (identifier) "SENSOR_ENDPOINT" (;) ";" (expression_statement) "Req.maxReportInt = 3600;" (assignment_expression) "Req.maxReportInt = 3600" (field_expression) "Req.maxReportInt" (identifier) "Req" (.) "." (field_identifier) "maxReportInt" (=) "=" (number_literal) "3600" (;) ";" (expression_statement) "Req.minReportInt = 0;" (assignment_expression) "Req.minReportInt = 0" (field_expression) "Req.minReportInt" (identifier) "Req" (.) "." (field_identifier) "minReportInt" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE);" (call_expression) "OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE)" (identifier) "OsalPort_memcpy" (argument_list) "(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE)" (() "(" (field_expression) "Req.reportableChange" (identifier) "Req" (.) "." (field_identifier) "reportableChange" (,) "," (identifier) "reportableChange" (,) "," (identifier) "BDBREPORTING_MAX_ANALOG_ATTR_SIZE" ()) ")" (;) ";" (expression_statement) "Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req);" (call_expression) "Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req)" (identifier) "Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq" (argument_list) "(appServiceTaskId,&Req)" (() "(" (identifier) "appServiceTaskId" (,) "," (pointer_expression) "&Req" (&) "&" (identifier) "Req" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "uint8_t zlcGetButtonBdbReport(bdbReportAttrCfgData_t *report, bool check) { \n \n// return BDBREPORTING_SUCCESS; \n return bdb_getReport(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check ); \n}" (primitive_type) "uint8_t" (function_declarator) "zlcGetButtonBdbReport(bdbReportAttrCfgData_t *report, bool check)" (identifier) "zlcGetButtonBdbReport" (parameter_list) "(bdbReportAttrCfgData_t *report, bool check)" (() "(" (parameter_declaration) "bdbReportAttrCfgData_t *report" (type_identifier) "bdbReportAttrCfgData_t" (pointer_declarator) "*report" (*) "*" (identifier) "report" (,) "," (parameter_declaration) "bool check" (primitive_type) "bool" (identifier) "check" ()) ")" (compound_statement) "{ \n \n// return BDBREPORTING_SUCCESS; \n return bdb_getReport(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check ); \n}" ({) "{" (comment) "// return BDBREPORTING_SUCCESS; " (return_statement) "return bdb_getReport(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check );" (return) "return" (call_expression) "bdb_getReport(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check )" (identifier) "bdb_getReport" (argument_list) "(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check )" (() "(" (identifier) "SENSOR_ENDPOINT" (,) "," (identifier) "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING" (,) "," (identifier) "ATTRID_OCCUPANCY_SENSING_OCCUPANCY" (,) "," (identifier) "report" (,) "," (identifier) "check" ()) ")" (;) ";" (}) "}" (function_definition) "void process_door_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) { \n zstack_bdbRepChangedAttrValueReq_t Req; \n \n zclOccupancySensor_Occupancy = 1-output->buttonState; \n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; \n Req.endpoint = SENSOR_ENDPOINT; \n Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req); \n}" (primitive_type) "void" (function_declarator) "process_door_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId)" (identifier) "process_door_sensor" (parameter_list) "(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId)" (() "(" (parameter_declaration) "SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output" (type_identifier) "SCIF_BUTTON_DEBOUNCER_OUTPUT_T" (pointer_declarator) "*output" (*) "*" (identifier) "output" (,) "," (parameter_declaration) "uint8_t appServiceTaskId" (primitive_type) "uint8_t" (identifier) "appServiceTaskId" ()) ")" (compound_statement) "{ \n zstack_bdbRepChangedAttrValueReq_t Req; \n \n zclOccupancySensor_Occupancy = 1-output->buttonState; \n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; \n Req.endpoint = SENSOR_ENDPOINT; \n Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req); \n}" ({) "{" (declaration) "zstack_bdbRepChangedAttrValueReq_t Req;" (type_identifier) "zstack_bdbRepChangedAttrValueReq_t" (identifier) "Req" (;) ";" (expression_statement) "zclOccupancySensor_Occupancy = 1-output->buttonState;" (assignment_expression) "zclOccupancySensor_Occupancy = 1-output->buttonState" (identifier) "zclOccupancySensor_Occupancy" (=) "=" (binary_expression) "1-output->buttonState" (number_literal) "1" (-) "-" (field_expression) "output->buttonState" (identifier) "output" (->) "->" (field_identifier) "buttonState" (;) ";" (expression_statement) "Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;" (assignment_expression) "Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY" (field_expression) "Req.attrID" (identifier) "Req" (.) "." (field_identifier) "attrID" (=) "=" (identifier) "ATTRID_OCCUPANCY_SENSING_OCCUPANCY" (;) ";" (expression_statement) "Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING;" (assignment_expression) "Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING" (field_expression) "Req.cluster" (identifier) "Req" (.) "." (field_identifier) "cluster" (=) "=" (identifier) "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING" (;) ";" (expression_statement) "Req.endpoint = SENSOR_ENDPOINT;" (assignment_expression) "Req.endpoint = SENSOR_ENDPOINT" (field_expression) "Req.endpoint" (identifier) "Req" (.) "." (field_identifier) "endpoint" (=) "=" (identifier) "SENSOR_ENDPOINT" (;) ";" (expression_statement) "Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req);" (call_expression) "Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req)" (identifier) "Zstackapi_bdbRepChangedAttrValueReq" (argument_list) "(appServiceTaskId, &Req)" (() "(" (identifier) "appServiceTaskId" (,) "," (pointer_expression) "&Req" (&) "&" (identifier) "Req" ()) ")" (;) ";" (}) "}" (function_definition) "void process_movement_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) { \n zstack_bdbRepChangedAttrValueReq_t Req; \n \n zclOccupancySensor_Occupancy = output->buttonState; \n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; \n Req.endpoint = SENSOR_ENDPOINT; \n Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req); \n}" (primitive_type) "void" (function_declarator) "process_movement_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId)" (identifier) "process_movement_sensor" (parameter_list) "(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId)" (() "(" (parameter_declaration) "SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output" (type_identifier) "SCIF_BUTTON_DEBOUNCER_OUTPUT_T" (pointer_declarator) "*output" (*) "*" (identifier) "output" (,) "," (parameter_declaration) "uint8_t appServiceTaskId" (primitive_type) "uint8_t" (identifier) "appServiceTaskId" ()) ")" (compound_statement) "{ \n zstack_bdbRepChangedAttrValueReq_t Req; \n \n zclOccupancySensor_Occupancy = output->buttonState; \n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY; \n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING; \n Req.endpoint = SENSOR_ENDPOINT; \n Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req); \n}" ({) "{" (declaration) "zstack_bdbRepChangedAttrValueReq_t Req;" (type_identifier) "zstack_bdbRepChangedAttrValueReq_t" (identifier) "Req" (;) ";" (expression_statement) "zclOccupancySensor_Occupancy = output->buttonState;" (assignment_expression) "zclOccupancySensor_Occupancy = output->buttonState" (identifier) "zclOccupancySensor_Occupancy" (=) "=" (field_expression) "output->buttonState" (identifier) "output" (->) "->" (field_identifier) "buttonState" (;) ";" (expression_statement) "Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;" (assignment_expression) "Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY" (field_expression) "Req.attrID" (identifier) "Req" (.) "." (field_identifier) "attrID" (=) "=" (identifier) "ATTRID_OCCUPANCY_SENSING_OCCUPANCY" (;) ";" (expression_statement) "Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING;" (assignment_expression) "Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING" (field_expression) "Req.cluster" (identifier) "Req" (.) "." (field_identifier) "cluster" (=) "=" (identifier) "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING" (;) ";" (expression_statement) "Req.endpoint = SENSOR_ENDPOINT;" (assignment_expression) "Req.endpoint = SENSOR_ENDPOINT" (field_expression) "Req.endpoint" (identifier) "Req" (.) "." (field_identifier) "endpoint" (=) "=" (identifier) "SENSOR_ENDPOINT" (;) ";" (expression_statement) "Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req);" (call_expression) "Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req)" (identifier) "Zstackapi_bdbRepChangedAttrValueReq" (argument_list) "(appServiceTaskId, &Req)" (() "(" (identifier) "appServiceTaskId" (,) "," (pointer_expression) "&Req" (&) "&" (identifier) "Req" ()) ")" (;) ";" (}) "}"
925
2
{"language": "c", "success": true, "metadata": {"lines": 191, "avg_line_length": 31.62, "nodes": 549, "errors": 0, "source_hash": "8c17d7814b23f5612b739a8d26988eaf95ad28252e5f331f5261574824864ba7", "categorized_nodes": 399}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <Application/zcl_sensor.h>\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<Application/zcl_sensor.h>", "parent": 0, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 35}}, {"id": 3, "type": "preproc_include", "text": "#include \"zcomdef.h\"\r\n", "parent": null, "children": [4, 5], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"zcomdef.h\"", "parent": 3, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include \"zcl.h\"\r\n", "parent": null, "children": [7, 8], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"zcl.h\"", "parent": 6, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 16}}, {"id": 9, "type": "preproc_include", "text": "#include \"zcl_general.h\"\r\n", "parent": null, "children": [10, 11], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"zcl_general.h\"", "parent": 9, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 24}}, {"id": 12, "type": "preproc_include", "text": "#include \"zcl_ha.h\"\r\n", "parent": null, "children": [13, 14], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"zcl_ha.h\"", "parent": 12, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include \"zcl_ms.h\"\r\n", "parent": null, "children": [16, 17], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"zcl_ms.h\"", "parent": 15, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 19}}, {"id": 18, "type": "preproc_include", "text": "#include \"zcl_port.h\"\r\n", "parent": null, "children": [19, 20], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"zcl_port.h\"", "parent": 18, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 21}}, {"id": 21, "type": "preproc_include", "text": "#include \"zstackapi.h\"\r\n", "parent": null, "children": [22, 23], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"zstackapi.h\"", "parent": 21, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 22}}, {"id": 24, "type": "preproc_if", "text": "#if defined(SENSOR_MOVEMENT)\r\n#include <Application/sensor_controller/MOVEMENT/scif.h>\r\n#elif defined(SENSOR_REED)\r\n#include <Application/sensor_controller/REED/scif.h>\r\n#else\r\ntypedef struct {\r\n uint16_t buttonState; ///< Current button state\r\n} SCIF_BUTTON_DEBOUNCER_OUTPUT_T;\r\n\r\n#endif", "parent": null, "children": [25, 26, 29, 30, 33, 52], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 25, "type": "#if", "text": "#if", "parent": 24, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 3}}, {"id": 26, "type": "preproc_defined", "text": "defined(SENSOR_MOVEMENT)", "parent": 24, "children": [27, 28], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 28}}, {"id": 27, "type": "defined", "text": "defined", "parent": 26, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 11}}, {"id": 28, "type": "identifier", "text": "SENSOR_MOVEMENT", "parent": 26, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 27}}, {"id": 29, "type": "\n", "text": "\n", "parent": 24, "children": [], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 32, "column": 0}}, {"id": 30, "type": "preproc_include", "text": "#include <Application/sensor_controller/MOVEMENT/scif.h>\r\n", "parent": 24, "children": [31, 32], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 32, "type": "system_lib_string", "text": "<Application/sensor_controller/MOVEMENT/scif.h>", "parent": 30, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 56}}, {"id": 33, "type": "preproc_elif", "text": "#elif defined(SENSOR_REED)\r\n#include <Application/sensor_controller/REED/scif.h>\r\n#else\r\ntypedef struct {\r\n uint16_t buttonState; ///< Current button state\r\n} SCIF_BUTTON_DEBOUNCER_OUTPUT_T;", "parent": 24, "children": [34, 35, 38, 39, 42], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 38, "column": 33}}, {"id": 34, "type": "#elif", "text": "#elif", "parent": 33, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 5}}, {"id": 35, "type": "preproc_defined", "text": "defined(SENSOR_REED)", "parent": 33, "children": [36, 37], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 26}}, {"id": 36, "type": "defined", "text": "defined", "parent": 35, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 13}}, {"id": 37, "type": "identifier", "text": "SENSOR_REED", "parent": 35, "children": [], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 25}}, {"id": 38, "type": "\n", "text": "\n", "parent": 33, "children": [], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 34, "column": 0}}, {"id": 39, "type": "preproc_include", "text": "#include <Application/sensor_controller/REED/scif.h>\r\n", "parent": 33, "children": [40, 41], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 41, "type": "system_lib_string", "text": "<Application/sensor_controller/REED/scif.h>", "parent": 39, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 52}}, {"id": 42, "type": "preproc_else", "text": "#else\r\ntypedef struct {\r\n uint16_t buttonState; ///< Current button state\r\n} SCIF_BUTTON_DEBOUNCER_OUTPUT_T;", "parent": 33, "children": [43, 44], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 38, "column": 33}}, {"id": 43, "type": "#else", "text": "#else", "parent": 42, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 5}}, {"id": 44, "type": "type_definition", "text": "typedef struct {\r\n uint16_t buttonState; ///< Current button state\r\n} SCIF_BUTTON_DEBOUNCER_OUTPUT_T;", "parent": 42, "children": [45, 46, 51], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 38, "column": 33}}, {"id": 45, "type": "typedef", "text": "typedef", "parent": 44, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 46, "type": "struct_specifier", "text": "struct {\r\n uint16_t buttonState; ///< Current button state\r\n}", "parent": 44, "children": [47], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 38, "column": 1}}, {"id": 47, "type": "struct", "text": "struct", "parent": 46, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 14}}, {"id": 48, "type": "field_declaration", "text": "uint16_t buttonState;", "parent": 46, "children": [49, 50], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 25}}, {"id": 49, "type": "primitive_type", "text": "uint16_t", "parent": 48, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 12}}, {"id": 50, "type": "field_identifier", "text": "buttonState", "parent": 48, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 24}}, {"id": 51, "type": "type_identifier", "text": "SCIF_BUTTON_DEBOUNCER_OUTPUT_T", "parent": 44, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 32}}, {"id": 52, "type": "#endif", "text": "#endif", "parent": 24, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 53, "type": "preproc_include", "text": "#include \"zcl_consts.h\"\r\n", "parent": null, "children": [54, 55], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 0}}, {"id": 54, "type": "#include", "text": "#include", "parent": 53, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 8}}, {"id": 55, "type": "string_literal", "text": "\"zcl_consts.h\"", "parent": 53, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 23}}, {"id": 56, "type": "declaration", "text": "static uint8_t reportableChange[] = {0x32, 0x00, 0x00, 0x00};", "parent": null, "children": [57, 58], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 61}}, {"id": 57, "type": "primitive_type", "text": "uint8_t", "parent": 56, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 14}}, {"id": 58, "type": "init_declarator", "text": "reportableChange[] = {0x32, 0x00, 0x00, 0x00}", "parent": 56, "children": [59, 61, 62], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 60}}, {"id": 59, "type": "array_declarator", "text": "reportableChange[]", "parent": 58, "children": [60], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 33}}, {"id": 60, "type": "identifier", "text": "reportableChange", "parent": 59, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 31}}, {"id": 61, "type": "=", "text": "=", "parent": 58, "children": [], "start_point": {"row": 44, "column": 34}, "end_point": {"row": 44, "column": 35}}, {"id": 62, "type": "initializer_list", "text": "{0x32, 0x00, 0x00, 0x00}", "parent": 58, "children": [63, 64, 65, 66], "start_point": {"row": 44, "column": 36}, "end_point": {"row": 44, "column": 60}}, {"id": 63, "type": "number_literal", "text": "0x32", "parent": 62, "children": [], "start_point": {"row": 44, "column": 37}, "end_point": {"row": 44, "column": 41}}, {"id": 64, "type": "number_literal", "text": "0x00", "parent": 62, "children": [], "start_point": {"row": 44, "column": 43}, "end_point": {"row": 44, "column": 47}}, {"id": 65, "type": "number_literal", "text": "0x00", "parent": 62, "children": [], "start_point": {"row": 44, "column": 49}, "end_point": {"row": 44, "column": 53}}, {"id": 66, "type": "number_literal", "text": "0x00", "parent": 62, "children": [], "start_point": {"row": 44, "column": 55}, "end_point": {"row": 44, "column": 59}}, {"id": 67, "type": "declaration", "text": "uint8_t zclOccupancySensor_Occupancy = DOOR_STATE_CLOSED;", "parent": null, "children": [68, 69], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 57}}, {"id": 68, "type": "primitive_type", "text": "uint8_t", "parent": 67, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 7}}, {"id": 69, "type": "init_declarator", "text": "zclOccupancySensor_Occupancy = DOOR_STATE_CLOSED", "parent": 67, "children": [70, 71, 72], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 56}}, {"id": 70, "type": "identifier", "text": "zclOccupancySensor_Occupancy", "parent": 69, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 36}}, {"id": 71, "type": "=", "text": "=", "parent": 69, "children": [], "start_point": {"row": 47, "column": 37}, "end_point": {"row": 47, "column": 38}}, {"id": 72, "type": "identifier", "text": "DOOR_STATE_CLOSED", "parent": 69, "children": [], "start_point": {"row": 47, "column": 39}, "end_point": {"row": 47, "column": 56}}, {"id": 73, "type": "declaration", "text": "const uint8_t zclOccupancySensor_OccupancySensorType = PIR_SENSOR_TYPE;", "parent": null, "children": [74, 75], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 71}}, {"id": 74, "type": "primitive_type", "text": "uint8_t", "parent": 73, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 13}}, {"id": 75, "type": "init_declarator", "text": "zclOccupancySensor_OccupancySensorType = PIR_SENSOR_TYPE", "parent": 73, "children": [76, 77, 78], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 70}}, {"id": 76, "type": "identifier", "text": "zclOccupancySensor_OccupancySensorType", "parent": 75, "children": [], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 52}}, {"id": 77, "type": "=", "text": "=", "parent": 75, "children": [], "start_point": {"row": 48, "column": 53}, "end_point": {"row": 48, "column": 54}}, {"id": 78, "type": "identifier", "text": "PIR_SENSOR_TYPE", "parent": 75, "children": [], "start_point": {"row": 48, "column": 55}, "end_point": {"row": 48, "column": 70}}, {"id": 79, "type": "declaration", "text": "static CONST zclAttrRec_t zclSensor_Attrs[] =\r\n{\r\n {\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n { // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY,\r\n ZCL_DATATYPE_BITMAP8,\r\n ACCESS_CONTROL_READ | ACCESS_REPORTABLE,\r\n (void *)&zclOccupancySensor_Occupancy\r\n }\r\n },\r\n {\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n { // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE,\r\n ZCL_DATATYPE_ENUM8,\r\n ACCESS_CONTROL_READ,\r\n (void *)&zclOccupancySensor_OccupancySensorType\r\n }\r\n },\r\n};", "parent": null, "children": [80, 81, 83], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 71, "column": 2}}, {"id": 80, "type": "type_identifier", "text": "CONST", "parent": 79, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 12}}, {"id": 81, "type": "ERROR", "text": "zclAttrRec_t", "parent": 79, "children": [82], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 25}}, {"id": 82, "type": "identifier", "text": "zclAttrRec_t", "parent": 81, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 25}}, {"id": 83, "type": "init_declarator", "text": "zclSensor_Attrs[] =\r\n{\r\n {\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n { // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY,\r\n ZCL_DATATYPE_BITMAP8,\r\n ACCESS_CONTROL_READ | ACCESS_REPORTABLE,\r\n (void *)&zclOccupancySensor_Occupancy\r\n }\r\n },\r\n {\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n { // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE,\r\n ZCL_DATATYPE_ENUM8,\r\n ACCESS_CONTROL_READ,\r\n (void *)&zclOccupancySensor_OccupancySensorType\r\n }\r\n },\r\n}", "parent": 79, "children": [84, 86, 87], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 71, "column": 1}}, {"id": 84, "type": "array_declarator", "text": "zclSensor_Attrs[]", "parent": 83, "children": [85], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 43}}, {"id": 85, "type": "identifier", "text": "zclSensor_Attrs", "parent": 84, "children": [], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 41}}, {"id": 86, "type": "=", "text": "=", "parent": 83, "children": [], "start_point": {"row": 51, "column": 44}, "end_point": {"row": 51, "column": 45}}, {"id": 87, "type": "initializer_list", "text": "{\r\n {\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n { // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY,\r\n ZCL_DATATYPE_BITMAP8,\r\n ACCESS_CONTROL_READ | ACCESS_REPORTABLE,\r\n (void *)&zclOccupancySensor_Occupancy\r\n }\r\n },\r\n {\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n { // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE,\r\n ZCL_DATATYPE_ENUM8,\r\n ACCESS_CONTROL_READ,\r\n (void *)&zclOccupancySensor_OccupancySensorType\r\n }\r\n },\r\n}", "parent": 83, "children": [88, 103], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 71, "column": 1}}, {"id": 88, "type": "initializer_list", "text": "{\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n { // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY,\r\n ZCL_DATATYPE_BITMAP8,\r\n ACCESS_CONTROL_READ | ACCESS_REPORTABLE,\r\n (void *)&zclOccupancySensor_Occupancy\r\n }\r\n }", "parent": 87, "children": [89, 90], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 61, "column": 2}}, {"id": 89, "type": "identifier", "text": "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING", "parent": 88, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 37}}, {"id": 90, "type": "initializer_list", "text": "{ // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY,\r\n ZCL_DATATYPE_BITMAP8,\r\n ACCESS_CONTROL_READ | ACCESS_REPORTABLE,\r\n (void *)&zclOccupancySensor_Occupancy\r\n }", "parent": 88, "children": [91, 92, 93, 96], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 60, "column": 4}}, {"id": 91, "type": "identifier", "text": "ATTRID_OCCUPANCY_SENSING_OCCUPANCY", "parent": 90, "children": [], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 56, "column": 39}}, {"id": 92, "type": "identifier", "text": "ZCL_DATATYPE_BITMAP8", "parent": 90, "children": [], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 25}}, {"id": 93, "type": "binary_expression", "text": "ACCESS_CONTROL_READ | ACCESS_REPORTABLE", "parent": 90, "children": [94, 95], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 44}}, {"id": 94, "type": "identifier", "text": "ACCESS_CONTROL_READ", "parent": 93, "children": [], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 24}}, {"id": 95, "type": "identifier", "text": "ACCESS_REPORTABLE", "parent": 93, "children": [], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 44}}, {"id": 96, "type": "cast_expression", "text": "(void *)&zclOccupancySensor_Occupancy", "parent": 90, "children": [97, 101], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 42}}, {"id": 97, "type": "type_descriptor", "text": "void *", "parent": 96, "children": [98, 99], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 12}}, {"id": 98, "type": "primitive_type", "text": "void", "parent": 97, "children": [], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 10}}, {"id": 99, "type": "abstract_pointer_declarator", "text": "*", "parent": 97, "children": [100], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 12}}, {"id": 100, "type": "*", "text": "*", "parent": 99, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 12}}, {"id": 101, "type": "pointer_expression", "text": "&zclOccupancySensor_Occupancy", "parent": 96, "children": [102], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 42}}, {"id": 102, "type": "identifier", "text": "zclOccupancySensor_Occupancy", "parent": 101, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 42}}, {"id": 103, "type": "initializer_list", "text": "{\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n { // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE,\r\n ZCL_DATATYPE_ENUM8,\r\n ACCESS_CONTROL_READ,\r\n (void *)&zclOccupancySensor_OccupancySensorType\r\n }\r\n }", "parent": 87, "children": [104, 105], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 70, "column": 2}}, {"id": 104, "type": "identifier", "text": "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING", "parent": 103, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 37}}, {"id": 105, "type": "initializer_list", "text": "{ // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE,\r\n ZCL_DATATYPE_ENUM8,\r\n ACCESS_CONTROL_READ,\r\n (void *)&zclOccupancySensor_OccupancySensorType\r\n }", "parent": 103, "children": [106, 107, 108, 109], "start_point": {"row": 64, "column": 3}, "end_point": {"row": 69, "column": 4}}, {"id": 106, "type": "identifier", "text": "ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE", "parent": 105, "children": [], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 51}}, {"id": 107, "type": "identifier", "text": "ZCL_DATATYPE_ENUM8", "parent": 105, "children": [], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 23}}, {"id": 108, "type": "identifier", "text": "ACCESS_CONTROL_READ", "parent": 105, "children": [], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 24}}, {"id": 109, "type": "cast_expression", "text": "(void *)&zclOccupancySensor_OccupancySensorType", "parent": 105, "children": [110, 114], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 52}}, {"id": 110, "type": "type_descriptor", "text": "void *", "parent": 109, "children": [111, 112], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 12}}, {"id": 111, "type": "primitive_type", "text": "void", "parent": 110, "children": [], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 10}}, {"id": 112, "type": "abstract_pointer_declarator", "text": "*", "parent": 110, "children": [113], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 12}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 12}}, {"id": 114, "type": "pointer_expression", "text": "&zclOccupancySensor_OccupancySensorType", "parent": 109, "children": [115], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 52}}, {"id": 115, "type": "identifier", "text": "zclOccupancySensor_OccupancySensorType", "parent": 114, "children": [], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 52}}, {"id": 116, "type": "declaration", "text": "static uint8_t CONST zclSensor_NumAttributes = ( sizeof(zclSensor_Attrs) / sizeof(zclSensor_Attrs[0]) );", "parent": null, "children": [117, 118, 120], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 104}}, {"id": 117, "type": "primitive_type", "text": "uint8_t", "parent": 116, "children": [], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 14}}, {"id": 118, "type": "ERROR", "text": "CONST", "parent": 116, "children": [119], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 20}}, {"id": 119, "type": "identifier", "text": "CONST", "parent": 118, "children": [], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 20}}, {"id": 120, "type": "init_declarator", "text": "zclSensor_NumAttributes = ( sizeof(zclSensor_Attrs) / sizeof(zclSensor_Attrs[0]) )", "parent": 116, "children": [121, 122, 123], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 103}}, {"id": 121, "type": "identifier", "text": "zclSensor_NumAttributes", "parent": 120, "children": [], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 44}}, {"id": 122, "type": "=", "text": "=", "parent": 120, "children": [], "start_point": {"row": 73, "column": 45}, "end_point": {"row": 73, "column": 46}}, {"id": 123, "type": "parenthesized_expression", "text": "( sizeof(zclSensor_Attrs) / sizeof(zclSensor_Attrs[0]) )", "parent": 120, "children": [124], "start_point": {"row": 73, "column": 47}, "end_point": {"row": 73, "column": 103}}, {"id": 124, "type": "binary_expression", "text": "sizeof(zclSensor_Attrs) / sizeof(zclSensor_Attrs[0])", "parent": 123, "children": [125, 128, 129], "start_point": {"row": 73, "column": 49}, "end_point": {"row": 73, "column": 101}}, {"id": 125, "type": "sizeof_expression", "text": "sizeof(zclSensor_Attrs)", "parent": 124, "children": [126], "start_point": {"row": 73, "column": 49}, "end_point": {"row": 73, "column": 72}}, {"id": 126, "type": "parenthesized_expression", "text": "(zclSensor_Attrs)", "parent": 125, "children": [127], "start_point": {"row": 73, "column": 55}, "end_point": {"row": 73, "column": 72}}, {"id": 127, "type": "identifier", "text": "zclSensor_Attrs", "parent": 126, "children": [], "start_point": {"row": 73, "column": 56}, "end_point": {"row": 73, "column": 71}}, {"id": 128, "type": "/", "text": "/", "parent": 124, "children": [], "start_point": {"row": 73, "column": 73}, "end_point": {"row": 73, "column": 74}}, {"id": 129, "type": "sizeof_expression", "text": "sizeof(zclSensor_Attrs[0])", "parent": 124, "children": [130], "start_point": {"row": 73, "column": 75}, "end_point": {"row": 73, "column": 101}}, {"id": 130, "type": "parenthesized_expression", "text": "(zclSensor_Attrs[0])", "parent": 129, "children": [131], "start_point": {"row": 73, "column": 81}, "end_point": {"row": 73, "column": 101}}, {"id": 131, "type": "subscript_expression", "text": "zclSensor_Attrs[0]", "parent": 130, "children": [132, 133], "start_point": {"row": 73, "column": 82}, "end_point": {"row": 73, "column": 100}}, {"id": 132, "type": "identifier", "text": "zclSensor_Attrs", "parent": 131, "children": [], "start_point": {"row": 73, "column": 82}, "end_point": {"row": 73, "column": 97}}, {"id": 133, "type": "number_literal", "text": "0", "parent": 131, "children": [], "start_point": {"row": 73, "column": 98}, "end_point": {"row": 73, "column": 99}}, {"id": 134, "type": "preproc_def", "text": "#define ZCLSENSOR_MAX_INCLUSTERS 4\r\n", "parent": null, "children": [135, 136, 137], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 83, "column": 0}}, {"id": 135, "type": "#define", "text": "#define", "parent": 134, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 7}}, {"id": 136, "type": "identifier", "text": "ZCLSENSOR_MAX_INCLUSTERS", "parent": 134, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 32}}, {"id": 137, "type": "preproc_arg", "text": "4\r", "parent": 134, "children": [], "start_point": {"row": 82, "column": 39}, "end_point": {"row": 82, "column": 41}}, {"id": 138, "type": "declaration", "text": "static const cId_t zclSensor_InClusterList[ZCLSENSOR_MAX_INCLUSTERS] =\r\n{\r\n ZCL_CLUSTER_ID_GENERAL_BASIC,\r\n ZCL_CLUSTER_ID_GENERAL_IDENTIFY,\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n ZCL_CLUSTER_ID_GENERAL_POWER_CFG\r\n};", "parent": null, "children": [139, 140], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 89, "column": 2}}, {"id": 139, "type": "type_identifier", "text": "cId_t", "parent": 138, "children": [], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 18}}, {"id": 140, "type": "init_declarator", "text": "zclSensor_InClusterList[ZCLSENSOR_MAX_INCLUSTERS] =\r\n{\r\n ZCL_CLUSTER_ID_GENERAL_BASIC,\r\n ZCL_CLUSTER_ID_GENERAL_IDENTIFY,\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n ZCL_CLUSTER_ID_GENERAL_POWER_CFG\r\n}", "parent": 138, "children": [141, 144, 145], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 89, "column": 1}}, {"id": 141, "type": "array_declarator", "text": "zclSensor_InClusterList[ZCLSENSOR_MAX_INCLUSTERS]", "parent": 140, "children": [142, 143], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 68}}, {"id": 142, "type": "identifier", "text": "zclSensor_InClusterList", "parent": 141, "children": [], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 42}}, {"id": 143, "type": "identifier", "text": "ZCLSENSOR_MAX_INCLUSTERS", "parent": 141, "children": [], "start_point": {"row": 83, "column": 43}, "end_point": {"row": 83, "column": 67}}, {"id": 144, "type": "=", "text": "=", "parent": 140, "children": [], "start_point": {"row": 83, "column": 69}, "end_point": {"row": 83, "column": 70}}, {"id": 145, "type": "initializer_list", "text": "{\r\n ZCL_CLUSTER_ID_GENERAL_BASIC,\r\n ZCL_CLUSTER_ID_GENERAL_IDENTIFY,\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n ZCL_CLUSTER_ID_GENERAL_POWER_CFG\r\n}", "parent": 140, "children": [146, 147, 148, 149], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 89, "column": 1}}, {"id": 146, "type": "identifier", "text": "ZCL_CLUSTER_ID_GENERAL_BASIC", "parent": 145, "children": [], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 33}}, {"id": 147, "type": "identifier", "text": "ZCL_CLUSTER_ID_GENERAL_IDENTIFY", "parent": 145, "children": [], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 36}}, {"id": 148, "type": "identifier", "text": "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING", "parent": 145, "children": [], "start_point": {"row": 87, "column": 5}, "end_point": {"row": 87, "column": 40}}, {"id": 149, "type": "identifier", "text": "ZCL_CLUSTER_ID_GENERAL_POWER_CFG", "parent": 145, "children": [], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 37}}, {"id": 150, "type": "preproc_def", "text": "#define ZCLSENSOR_MAX_OUTCLUSTERS 1\r\n", "parent": null, "children": [151, 152, 153], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 92, "column": 0}}, {"id": 151, "type": "#define", "text": "#define", "parent": 150, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 7}}, {"id": 152, "type": "identifier", "text": "ZCLSENSOR_MAX_OUTCLUSTERS", "parent": 150, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 33}}, {"id": 153, "type": "preproc_arg", "text": "1\r", "parent": 150, "children": [], "start_point": {"row": 91, "column": 40}, "end_point": {"row": 91, "column": 42}}, {"id": 154, "type": "declaration", "text": "static const cId_t zclSensor_OutClusterList[ZCLSENSOR_MAX_OUTCLUSTERS] =\r\n{\r\n ZCL_CLUSTER_ID_GENERAL_IDENTIFY\r\n};", "parent": null, "children": [155, 156], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 95, "column": 2}}, {"id": 155, "type": "type_identifier", "text": "cId_t", "parent": 154, "children": [], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 18}}, {"id": 156, "type": "init_declarator", "text": "zclSensor_OutClusterList[ZCLSENSOR_MAX_OUTCLUSTERS] =\r\n{\r\n ZCL_CLUSTER_ID_GENERAL_IDENTIFY\r\n}", "parent": 154, "children": [157, 160, 161], "start_point": {"row": 92, "column": 19}, "end_point": {"row": 95, "column": 1}}, {"id": 157, "type": "array_declarator", "text": "zclSensor_OutClusterList[ZCLSENSOR_MAX_OUTCLUSTERS]", "parent": 156, "children": [158, 159], "start_point": {"row": 92, "column": 19}, "end_point": {"row": 92, "column": 70}}, {"id": 158, "type": "identifier", "text": "zclSensor_OutClusterList", "parent": 157, "children": [], "start_point": {"row": 92, "column": 19}, "end_point": {"row": 92, "column": 43}}, {"id": 159, "type": "identifier", "text": "ZCLSENSOR_MAX_OUTCLUSTERS", "parent": 157, "children": [], "start_point": {"row": 92, "column": 44}, "end_point": {"row": 92, "column": 69}}, {"id": 160, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 92, "column": 71}, "end_point": {"row": 92, "column": 72}}, {"id": 161, "type": "initializer_list", "text": "{\r\n ZCL_CLUSTER_ID_GENERAL_IDENTIFY\r\n}", "parent": 156, "children": [162], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 95, "column": 1}}, {"id": 162, "type": "identifier", "text": "ZCL_CLUSTER_ID_GENERAL_IDENTIFY", "parent": 161, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 35}}, {"id": 163, "type": "declaration", "text": "static SimpleDescriptionFormat_t zclSensor_SimpleDesc =\r\n{\r\n SENSOR_ENDPOINT, // int Endpoint;\r\n ZCL_HA_PROFILE_ID, // uint16_t AppProfId[2];\r\n ZCL_DEVICEID_OCCUPANCY_SENSOR, // uint16_t AppDeviceId[2];\r\n SENSOR_DEVICE_VERSION, // int AppDevVer:4;\r\n SENSOR_FLAGS, // int AppFlags:4;\r\n ZCLSENSOR_MAX_INCLUSTERS, // byte AppNumInClusters;\r\n (cId_t *)zclSensor_InClusterList, // byte *pAppInClusterList;\r\n ZCLSENSOR_MAX_OUTCLUSTERS, // byte AppNumInClusters;\r\n (cId_t *)zclSensor_OutClusterList // byte *pAppInClusterList;\r\n};", "parent": null, "children": [164, 165], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 108, "column": 2}}, {"id": 164, "type": "type_identifier", "text": "SimpleDescriptionFormat_t", "parent": 163, "children": [], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 32}}, {"id": 165, "type": "init_declarator", "text": "zclSensor_SimpleDesc =\r\n{\r\n SENSOR_ENDPOINT, // int Endpoint;\r\n ZCL_HA_PROFILE_ID, // uint16_t AppProfId[2];\r\n ZCL_DEVICEID_OCCUPANCY_SENSOR, // uint16_t AppDeviceId[2];\r\n SENSOR_DEVICE_VERSION, // int AppDevVer:4;\r\n SENSOR_FLAGS, // int AppFlags:4;\r\n ZCLSENSOR_MAX_INCLUSTERS, // byte AppNumInClusters;\r\n (cId_t *)zclSensor_InClusterList, // byte *pAppInClusterList;\r\n ZCLSENSOR_MAX_OUTCLUSTERS, // byte AppNumInClusters;\r\n (cId_t *)zclSensor_OutClusterList // byte *pAppInClusterList;\r\n}", "parent": 163, "children": [166, 167, 168], "start_point": {"row": 97, "column": 33}, "end_point": {"row": 108, "column": 1}}, {"id": 166, "type": "identifier", "text": "zclSensor_SimpleDesc", "parent": 165, "children": [], "start_point": {"row": 97, "column": 33}, "end_point": {"row": 97, "column": 53}}, {"id": 167, "type": "=", "text": "=", "parent": 165, "children": [], "start_point": {"row": 97, "column": 54}, "end_point": {"row": 97, "column": 55}}, {"id": 168, "type": "initializer_list", "text": "{\r\n SENSOR_ENDPOINT, // int Endpoint;\r\n ZCL_HA_PROFILE_ID, // uint16_t AppProfId[2];\r\n ZCL_DEVICEID_OCCUPANCY_SENSOR, // uint16_t AppDeviceId[2];\r\n SENSOR_DEVICE_VERSION, // int AppDevVer:4;\r\n SENSOR_FLAGS, // int AppFlags:4;\r\n ZCLSENSOR_MAX_INCLUSTERS, // byte AppNumInClusters;\r\n (cId_t *)zclSensor_InClusterList, // byte *pAppInClusterList;\r\n ZCLSENSOR_MAX_OUTCLUSTERS, // byte AppNumInClusters;\r\n (cId_t *)zclSensor_OutClusterList // byte *pAppInClusterList;\r\n}", "parent": 165, "children": [169, 170, 171, 172, 173, 174, 175, 181, 182], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 108, "column": 1}}, {"id": 169, "type": "identifier", "text": "SENSOR_ENDPOINT", "parent": 168, "children": [], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 19}}, {"id": 170, "type": "identifier", "text": "ZCL_HA_PROFILE_ID", "parent": 168, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 21}}, {"id": 171, "type": "identifier", "text": "ZCL_DEVICEID_OCCUPANCY_SENSOR", "parent": 168, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 33}}, {"id": 172, "type": "identifier", "text": "SENSOR_DEVICE_VERSION", "parent": 168, "children": [], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 25}}, {"id": 173, "type": "identifier", "text": "SENSOR_FLAGS", "parent": 168, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 16}}, {"id": 174, "type": "identifier", "text": "ZCLSENSOR_MAX_INCLUSTERS", "parent": 168, "children": [], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 28}}, {"id": 175, "type": "cast_expression", "text": "(cId_t *)zclSensor_InClusterList", "parent": 168, "children": [176, 180], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 36}}, {"id": 176, "type": "type_descriptor", "text": "cId_t *", "parent": 175, "children": [177, 178], "start_point": {"row": 105, "column": 5}, "end_point": {"row": 105, "column": 12}}, {"id": 177, "type": "type_identifier", "text": "cId_t", "parent": 176, "children": [], "start_point": {"row": 105, "column": 5}, "end_point": {"row": 105, "column": 10}}, {"id": 178, "type": "abstract_pointer_declarator", "text": "*", "parent": 176, "children": [179], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 12}}, {"id": 179, "type": "*", "text": "*", "parent": 178, "children": [], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 12}}, {"id": 180, "type": "identifier", "text": "zclSensor_InClusterList", "parent": 175, "children": [], "start_point": {"row": 105, "column": 13}, "end_point": {"row": 105, "column": 36}}, {"id": 181, "type": "identifier", "text": "ZCLSENSOR_MAX_OUTCLUSTERS", "parent": 168, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 29}}, {"id": 182, "type": "cast_expression", "text": "(cId_t *)zclSensor_OutClusterList", "parent": 168, "children": [183, 187], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 37}}, {"id": 183, "type": "type_descriptor", "text": "cId_t *", "parent": 182, "children": [184, 185], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 12}}, {"id": 184, "type": "type_identifier", "text": "cId_t", "parent": 183, "children": [], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 10}}, {"id": 185, "type": "abstract_pointer_declarator", "text": "*", "parent": 183, "children": [186], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 12}}, {"id": 186, "type": "*", "text": "*", "parent": 185, "children": [], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 12}}, {"id": 187, "type": "identifier", "text": "zclSensor_OutClusterList", "parent": 182, "children": [], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 37}}, {"id": 188, "type": "function_definition", "text": "void zclAddButtonAttrs(uint8_t endPoint) {\r\n\r\n zcl_registerAttrList( endPoint, zclSensor_NumAttributes, zclSensor_Attrs );\r\n}", "parent": null, "children": [189, 190], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 114, "column": 1}}, {"id": 189, "type": "primitive_type", "text": "void", "parent": 188, "children": [], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 111, "column": 4}}, {"id": 190, "type": "function_declarator", "text": "zclAddButtonAttrs(uint8_t endPoint)", "parent": 188, "children": [191, 192], "start_point": {"row": 111, "column": 5}, "end_point": {"row": 111, "column": 40}}, {"id": 191, "type": "identifier", "text": "zclAddButtonAttrs", "parent": 190, "children": [], "start_point": {"row": 111, "column": 5}, "end_point": {"row": 111, "column": 22}}, {"id": 192, "type": "parameter_list", "text": "(uint8_t endPoint)", "parent": 190, "children": [193], "start_point": {"row": 111, "column": 22}, "end_point": {"row": 111, "column": 40}}, {"id": 193, "type": "parameter_declaration", "text": "uint8_t endPoint", "parent": 192, "children": [194, 195], "start_point": {"row": 111, "column": 23}, "end_point": {"row": 111, "column": 39}}, {"id": 194, "type": "primitive_type", "text": "uint8_t", "parent": 193, "children": [], "start_point": {"row": 111, "column": 23}, "end_point": {"row": 111, "column": 30}}, {"id": 195, "type": "identifier", "text": "endPoint", "parent": 193, "children": [], "start_point": {"row": 111, "column": 31}, "end_point": {"row": 111, "column": 39}}, {"id": 196, "type": "call_expression", "text": "zcl_registerAttrList( endPoint, zclSensor_NumAttributes, zclSensor_Attrs )", "parent": 188, "children": [197, 198], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 78}}, {"id": 197, "type": "identifier", "text": "zcl_registerAttrList", "parent": 196, "children": [], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 24}}, {"id": 198, "type": "argument_list", "text": "( endPoint, zclSensor_NumAttributes, zclSensor_Attrs )", "parent": 196, "children": [199, 200, 201], "start_point": {"row": 113, "column": 24}, "end_point": {"row": 113, "column": 78}}, {"id": 199, "type": "identifier", "text": "endPoint", "parent": 198, "children": [], "start_point": {"row": 113, "column": 26}, "end_point": {"row": 113, "column": 34}}, {"id": 200, "type": "identifier", "text": "zclSensor_NumAttributes", "parent": 198, "children": [], "start_point": {"row": 113, "column": 36}, "end_point": {"row": 113, "column": 59}}, {"id": 201, "type": "identifier", "text": "zclSensor_Attrs", "parent": 198, "children": [], "start_point": {"row": 113, "column": 61}, "end_point": {"row": 113, "column": 76}}, {"id": 202, "type": "declaration", "text": "static endPointDesc_t zclSensorEpDesc = {0};", "parent": null, "children": [203, 204], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 45}}, {"id": 203, "type": "type_identifier", "text": "endPointDesc_t", "parent": 202, "children": [], "start_point": {"row": 116, "column": 7}, "end_point": {"row": 116, "column": 21}}, {"id": 204, "type": "init_declarator", "text": "zclSensorEpDesc = {0}", "parent": 202, "children": [205, 206, 207], "start_point": {"row": 116, "column": 23}, "end_point": {"row": 116, "column": 44}}, {"id": 205, "type": "identifier", "text": "zclSensorEpDesc", "parent": 204, "children": [], "start_point": {"row": 116, "column": 23}, "end_point": {"row": 116, "column": 38}}, {"id": 206, "type": "=", "text": "=", "parent": 204, "children": [], "start_point": {"row": 116, "column": 39}, "end_point": {"row": 116, "column": 40}}, {"id": 207, "type": "initializer_list", "text": "{0}", "parent": 204, "children": [208], "start_point": {"row": 116, "column": 41}, "end_point": {"row": 116, "column": 44}}, {"id": 208, "type": "number_literal", "text": "0", "parent": 207, "children": [], "start_point": {"row": 116, "column": 42}, "end_point": {"row": 116, "column": 43}}, {"id": 209, "type": "function_definition", "text": "void zclAddButtonEndPoints(uint8_t endPoint, uint8_t appServiceTaskId) {\r\n\r\n zclSensorEpDesc.endPoint = endPoint;\r\n zclSensorEpDesc.simpleDesc = &zclSensor_SimpleDesc;\r\n zclport_registerEndpoint(appServiceTaskId, &zclSensorEpDesc);\r\n}", "parent": null, "children": [210, 211], "start_point": {"row": 118, "column": 0}, "end_point": {"row": 123, "column": 1}}, {"id": 210, "type": "primitive_type", "text": "void", "parent": 209, "children": [], "start_point": {"row": 118, "column": 0}, "end_point": {"row": 118, "column": 4}}, {"id": 211, "type": "function_declarator", "text": "zclAddButtonEndPoints(uint8_t endPoint, uint8_t appServiceTaskId)", "parent": 209, "children": [212, 213], "start_point": {"row": 118, "column": 5}, "end_point": {"row": 118, "column": 70}}, {"id": 212, "type": "identifier", "text": "zclAddButtonEndPoints", "parent": 211, "children": [], "start_point": {"row": 118, "column": 5}, "end_point": {"row": 118, "column": 26}}, {"id": 213, "type": "parameter_list", "text": "(uint8_t endPoint, uint8_t appServiceTaskId)", "parent": 211, "children": [214, 217], "start_point": {"row": 118, "column": 26}, "end_point": {"row": 118, "column": 70}}, {"id": 214, "type": "parameter_declaration", "text": "uint8_t endPoint", "parent": 213, "children": [215, 216], "start_point": {"row": 118, "column": 27}, "end_point": {"row": 118, "column": 43}}, {"id": 215, "type": "primitive_type", "text": "uint8_t", "parent": 214, "children": [], "start_point": {"row": 118, "column": 27}, "end_point": {"row": 118, "column": 34}}, {"id": 216, "type": "identifier", "text": "endPoint", "parent": 214, "children": [], "start_point": {"row": 118, "column": 35}, "end_point": {"row": 118, "column": 43}}, {"id": 217, "type": "parameter_declaration", "text": "uint8_t appServiceTaskId", "parent": 213, "children": [218, 219], "start_point": {"row": 118, "column": 45}, "end_point": {"row": 118, "column": 69}}, {"id": 218, "type": "primitive_type", "text": "uint8_t", "parent": 217, "children": [], "start_point": {"row": 118, "column": 45}, "end_point": {"row": 118, "column": 52}}, {"id": 219, "type": "identifier", "text": "appServiceTaskId", "parent": 217, "children": [], "start_point": {"row": 118, "column": 53}, "end_point": {"row": 118, "column": 69}}, {"id": 220, "type": "assignment_expression", "text": "zclSensorEpDesc.endPoint = endPoint", "parent": 209, "children": [221, 224, 225], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 39}}, {"id": 221, "type": "field_expression", "text": "zclSensorEpDesc.endPoint", "parent": 220, "children": [222, 223], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 28}}, {"id": 222, "type": "identifier", "text": "zclSensorEpDesc", "parent": 221, "children": [], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 19}}, {"id": 223, "type": "field_identifier", "text": "endPoint", "parent": 221, "children": [], "start_point": {"row": 120, "column": 20}, "end_point": {"row": 120, "column": 28}}, {"id": 224, "type": "=", "text": "=", "parent": 220, "children": [], "start_point": {"row": 120, "column": 29}, "end_point": {"row": 120, "column": 30}}, {"id": 225, "type": "identifier", "text": "endPoint", "parent": 220, "children": [], "start_point": {"row": 120, "column": 31}, "end_point": {"row": 120, "column": 39}}, {"id": 226, "type": "assignment_expression", "text": "zclSensorEpDesc.simpleDesc = &zclSensor_SimpleDesc", "parent": 209, "children": [227, 230, 231], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 54}}, {"id": 227, "type": "field_expression", "text": "zclSensorEpDesc.simpleDesc", "parent": 226, "children": [228, 229], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 30}}, {"id": 228, "type": "identifier", "text": "zclSensorEpDesc", "parent": 227, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 19}}, {"id": 229, "type": "field_identifier", "text": "simpleDesc", "parent": 227, "children": [], "start_point": {"row": 121, "column": 20}, "end_point": {"row": 121, "column": 30}}, {"id": 230, "type": "=", "text": "=", "parent": 226, "children": [], "start_point": {"row": 121, "column": 31}, "end_point": {"row": 121, "column": 32}}, {"id": 231, "type": "pointer_expression", "text": "&zclSensor_SimpleDesc", "parent": 226, "children": [232], "start_point": {"row": 121, "column": 33}, "end_point": {"row": 121, "column": 54}}, {"id": 232, "type": "identifier", "text": "zclSensor_SimpleDesc", "parent": 231, "children": [], "start_point": {"row": 121, "column": 34}, "end_point": {"row": 121, "column": 54}}, {"id": 233, "type": "call_expression", "text": "zclport_registerEndpoint(appServiceTaskId, &zclSensorEpDesc)", "parent": 209, "children": [234, 235], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 64}}, {"id": 234, "type": "identifier", "text": "zclport_registerEndpoint", "parent": 233, "children": [], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 28}}, {"id": 235, "type": "argument_list", "text": "(appServiceTaskId, &zclSensorEpDesc)", "parent": 233, "children": [236, 237], "start_point": {"row": 122, "column": 28}, "end_point": {"row": 122, "column": 64}}, {"id": 236, "type": "identifier", "text": "appServiceTaskId", "parent": 235, "children": [], "start_point": {"row": 122, "column": 29}, "end_point": {"row": 122, "column": 45}}, {"id": 237, "type": "pointer_expression", "text": "&zclSensorEpDesc", "parent": 235, "children": [238], "start_point": {"row": 122, "column": 47}, "end_point": {"row": 122, "column": 63}}, {"id": 238, "type": "identifier", "text": "zclSensorEpDesc", "parent": 237, "children": [], "start_point": {"row": 122, "column": 48}, "end_point": {"row": 122, "column": 63}}, {"id": 239, "type": "function_definition", "text": "void ZclButtonReport(void) {\r\n\r\n zclReportCmd_t *pReportCmd;\r\n pReportCmd = malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) );\r\n if(pReportCmd != NULL)\r\n {\r\n // Fill in the single attribute information for the temperature reading\r\n pReportCmd->numAttr = 1;\r\n pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;\r\n pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8;\r\n pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy;// (uint8 *)&(zclSampleTemperatureSensor_MeasuredValue);\r\n\r\n afAddrType_t dstaddr;\r\n dstaddr.addr.shortAddr = 0x0000;\r\n dstaddr.addrMode = afAddr16Bit;\r\n dstaddr.endPoint = 1;\r\n dstaddr.panId = 0;\r\n\r\n // Call ZCL function to send the report\r\n zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 );\r\n\r\n free(pReportCmd);\r\n }\r\n}", "parent": null, "children": [240, 241], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 148, "column": 1}}, {"id": 240, "type": "primitive_type", "text": "void", "parent": 239, "children": [], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 125, "column": 4}}, {"id": 241, "type": "function_declarator", "text": "ZclButtonReport(void)", "parent": 239, "children": [242, 243], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 26}}, {"id": 242, "type": "identifier", "text": "ZclButtonReport", "parent": 241, "children": [], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 20}}, {"id": 243, "type": "parameter_list", "text": "(void)", "parent": 241, "children": [244], "start_point": {"row": 125, "column": 20}, "end_point": {"row": 125, "column": 26}}, {"id": 244, "type": "parameter_declaration", "text": "void", "parent": 243, "children": [245], "start_point": {"row": 125, "column": 21}, "end_point": {"row": 125, "column": 25}}, {"id": 245, "type": "primitive_type", "text": "void", "parent": 244, "children": [], "start_point": {"row": 125, "column": 21}, "end_point": {"row": 125, "column": 25}}, {"id": 246, "type": "declaration", "text": "zclReportCmd_t *pReportCmd;", "parent": 239, "children": [247, 248], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 31}}, {"id": 247, "type": "type_identifier", "text": "zclReportCmd_t", "parent": 246, "children": [], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 18}}, {"id": 248, "type": "pointer_declarator", "text": "*pReportCmd", "parent": 246, "children": [249, 250], "start_point": {"row": 127, "column": 19}, "end_point": {"row": 127, "column": 30}}, {"id": 249, "type": "*", "text": "*", "parent": 248, "children": [], "start_point": {"row": 127, "column": 19}, "end_point": {"row": 127, "column": 20}}, {"id": 250, "type": "identifier", "text": "pReportCmd", "parent": 248, "children": [], "start_point": {"row": 127, "column": 20}, "end_point": {"row": 127, "column": 30}}, {"id": 251, "type": "assignment_expression", "text": "pReportCmd = malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) )", "parent": 239, "children": [252, 253, 254], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 71}}, {"id": 252, "type": "identifier", "text": "pReportCmd", "parent": 251, "children": [], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 14}}, {"id": 253, "type": "=", "text": "=", "parent": 251, "children": [], "start_point": {"row": 128, "column": 15}, "end_point": {"row": 128, "column": 16}}, {"id": 254, "type": "call_expression", "text": "malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) )", "parent": 251, "children": [255, 256], "start_point": {"row": 128, "column": 17}, "end_point": {"row": 128, "column": 71}}, {"id": 255, "type": "identifier", "text": "malloc", "parent": 254, "children": [], "start_point": {"row": 128, "column": 17}, "end_point": {"row": 128, "column": 23}}, {"id": 256, "type": "argument_list", "text": "( sizeof(zclReportCmd_t) + sizeof(zclReport_t) )", "parent": 254, "children": [257], "start_point": {"row": 128, "column": 23}, "end_point": {"row": 128, "column": 71}}, {"id": 257, "type": "binary_expression", "text": "sizeof(zclReportCmd_t) + sizeof(zclReport_t)", "parent": 256, "children": [258, 261, 262], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 69}}, {"id": 258, "type": "sizeof_expression", "text": "sizeof(zclReportCmd_t)", "parent": 257, "children": [259], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 47}}, {"id": 259, "type": "parenthesized_expression", "text": "(zclReportCmd_t)", "parent": 258, "children": [260], "start_point": {"row": 128, "column": 31}, "end_point": {"row": 128, "column": 47}}, {"id": 260, "type": "identifier", "text": "zclReportCmd_t", "parent": 259, "children": [], "start_point": {"row": 128, "column": 32}, "end_point": {"row": 128, "column": 46}}, {"id": 261, "type": "+", "text": "+", "parent": 257, "children": [], "start_point": {"row": 128, "column": 48}, "end_point": {"row": 128, "column": 49}}, {"id": 262, "type": "sizeof_expression", "text": "sizeof(zclReport_t)", "parent": 257, "children": [263], "start_point": {"row": 128, "column": 50}, "end_point": {"row": 128, "column": 69}}, {"id": 263, "type": "parenthesized_expression", "text": "(zclReport_t)", "parent": 262, "children": [264], "start_point": {"row": 128, "column": 56}, "end_point": {"row": 128, "column": 69}}, {"id": 264, "type": "identifier", "text": "zclReport_t", "parent": 263, "children": [], "start_point": {"row": 128, "column": 57}, "end_point": {"row": 128, "column": 68}}, {"id": 265, "type": "if_statement", "text": "if(pReportCmd != NULL)\r\n {\r\n // Fill in the single attribute information for the temperature reading\r\n pReportCmd->numAttr = 1;\r\n pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;\r\n pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8;\r\n pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy;// (uint8 *)&(zclSampleTemperatureSensor_MeasuredValue);\r\n\r\n afAddrType_t dstaddr;\r\n dstaddr.addr.shortAddr = 0x0000;\r\n dstaddr.addrMode = afAddr16Bit;\r\n dstaddr.endPoint = 1;\r\n dstaddr.panId = 0;\r\n\r\n // Call ZCL function to send the report\r\n zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 );\r\n\r\n free(pReportCmd);\r\n }", "parent": 239, "children": [266], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 147, "column": 5}}, {"id": 266, "type": "parenthesized_expression", "text": "(pReportCmd != NULL)", "parent": 265, "children": [267], "start_point": {"row": 129, "column": 6}, "end_point": {"row": 129, "column": 26}}, {"id": 267, "type": "binary_expression", "text": "pReportCmd != NULL", "parent": 266, "children": [268, 269, 270], "start_point": {"row": 129, "column": 7}, "end_point": {"row": 129, "column": 25}}, {"id": 268, "type": "identifier", "text": "pReportCmd", "parent": 267, "children": [], "start_point": {"row": 129, "column": 7}, "end_point": {"row": 129, "column": 17}}, {"id": 269, "type": "!=", "text": "!=", "parent": 267, "children": [], "start_point": {"row": 129, "column": 18}, "end_point": {"row": 129, "column": 20}}, {"id": 270, "type": "null", "text": "NULL", "parent": 267, "children": [271], "start_point": {"row": 129, "column": 21}, "end_point": {"row": 129, "column": 25}}, {"id": 271, "type": "NULL", "text": "NULL", "parent": 270, "children": [], "start_point": {"row": 129, "column": 21}, "end_point": {"row": 129, "column": 25}}, {"id": 272, "type": "assignment_expression", "text": "pReportCmd->numAttr = 1", "parent": 265, "children": [273, 276, 277], "start_point": {"row": 132, "column": 8}, "end_point": {"row": 132, "column": 31}}, {"id": 273, "type": "field_expression", "text": "pReportCmd->numAttr", "parent": 272, "children": [274, 275], "start_point": {"row": 132, "column": 8}, "end_point": {"row": 132, "column": 27}}, {"id": 274, "type": "identifier", "text": "pReportCmd", "parent": 273, "children": [], "start_point": {"row": 132, "column": 8}, "end_point": {"row": 132, "column": 18}}, {"id": 275, "type": "field_identifier", "text": "numAttr", "parent": 273, "children": [], "start_point": {"row": 132, "column": 20}, "end_point": {"row": 132, "column": 27}}, {"id": 276, "type": "=", "text": "=", "parent": 272, "children": [], "start_point": {"row": 132, "column": 28}, "end_point": {"row": 132, "column": 29}}, {"id": 277, "type": "number_literal", "text": "1", "parent": 272, "children": [], "start_point": {"row": 132, "column": 30}, "end_point": {"row": 132, "column": 31}}, {"id": 278, "type": "assignment_expression", "text": "pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY", "parent": 265, "children": [279, 286, 287], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 75}}, {"id": 279, "type": "field_expression", "text": "pReportCmd->attrList[0].attrID", "parent": 278, "children": [280, 285], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 38}}, {"id": 280, "type": "subscript_expression", "text": "pReportCmd->attrList[0]", "parent": 279, "children": [281, 284], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 31}}, {"id": 281, "type": "field_expression", "text": "pReportCmd->attrList", "parent": 280, "children": [282, 283], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 28}}, {"id": 282, "type": "identifier", "text": "pReportCmd", "parent": 281, "children": [], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 18}}, {"id": 283, "type": "field_identifier", "text": "attrList", "parent": 281, "children": [], "start_point": {"row": 133, "column": 20}, "end_point": {"row": 133, "column": 28}}, {"id": 284, "type": "number_literal", "text": "0", "parent": 280, "children": [], "start_point": {"row": 133, "column": 29}, "end_point": {"row": 133, "column": 30}}, {"id": 285, "type": "field_identifier", "text": "attrID", "parent": 279, "children": [], "start_point": {"row": 133, "column": 32}, "end_point": {"row": 133, "column": 38}}, {"id": 286, "type": "=", "text": "=", "parent": 278, "children": [], "start_point": {"row": 133, "column": 39}, "end_point": {"row": 133, "column": 40}}, {"id": 287, "type": "identifier", "text": "ATTRID_OCCUPANCY_SENSING_OCCUPANCY", "parent": 278, "children": [], "start_point": {"row": 133, "column": 41}, "end_point": {"row": 133, "column": 75}}, {"id": 288, "type": "assignment_expression", "text": "pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8", "parent": 265, "children": [289, 296, 297], "start_point": {"row": 134, "column": 8}, "end_point": {"row": 134, "column": 63}}, {"id": 289, "type": "field_expression", "text": "pReportCmd->attrList[0].dataType", "parent": 288, "children": [290, 295], "start_point": {"row": 134, "column": 8}, "end_point": {"row": 134, "column": 40}}, {"id": 290, "type": "subscript_expression", "text": "pReportCmd->attrList[0]", "parent": 289, "children": [291, 294], "start_point": {"row": 134, "column": 8}, "end_point": {"row": 134, "column": 31}}, {"id": 291, "type": "field_expression", "text": "pReportCmd->attrList", "parent": 290, "children": [292, 293], "start_point": {"row": 134, "column": 8}, "end_point": {"row": 134, "column": 28}}, {"id": 292, "type": "identifier", "text": "pReportCmd", "parent": 291, "children": [], "start_point": {"row": 134, "column": 8}, "end_point": {"row": 134, "column": 18}}, {"id": 293, "type": "field_identifier", "text": "attrList", "parent": 291, "children": [], "start_point": {"row": 134, "column": 20}, "end_point": {"row": 134, "column": 28}}, {"id": 294, "type": "number_literal", "text": "0", "parent": 290, "children": [], "start_point": {"row": 134, "column": 29}, "end_point": {"row": 134, "column": 30}}, {"id": 295, "type": "field_identifier", "text": "dataType", "parent": 289, "children": [], "start_point": {"row": 134, "column": 32}, "end_point": {"row": 134, "column": 40}}, {"id": 296, "type": "=", "text": "=", "parent": 288, "children": [], "start_point": {"row": 134, "column": 41}, "end_point": {"row": 134, "column": 42}}, {"id": 297, "type": "identifier", "text": "ZCL_DATATYPE_BITMAP8", "parent": 288, "children": [], "start_point": {"row": 134, "column": 43}, "end_point": {"row": 134, "column": 63}}, {"id": 298, "type": "assignment_expression", "text": "pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy", "parent": 265, "children": [299, 306, 307], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 80}}, {"id": 299, "type": "field_expression", "text": "pReportCmd->attrList[0].attrData", "parent": 298, "children": [300, 305], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 40}}, {"id": 300, "type": "subscript_expression", "text": "pReportCmd->attrList[0]", "parent": 299, "children": [301, 304], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 31}}, {"id": 301, "type": "field_expression", "text": "pReportCmd->attrList", "parent": 300, "children": [302, 303], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 28}}, {"id": 302, "type": "identifier", "text": "pReportCmd", "parent": 301, "children": [], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 18}}, {"id": 303, "type": "field_identifier", "text": "attrList", "parent": 301, "children": [], "start_point": {"row": 135, "column": 20}, "end_point": {"row": 135, "column": 28}}, {"id": 304, "type": "number_literal", "text": "0", "parent": 300, "children": [], "start_point": {"row": 135, "column": 29}, "end_point": {"row": 135, "column": 30}}, {"id": 305, "type": "field_identifier", "text": "attrData", "parent": 299, "children": [], "start_point": {"row": 135, "column": 32}, "end_point": {"row": 135, "column": 40}}, {"id": 306, "type": "=", "text": "=", "parent": 298, "children": [], "start_point": {"row": 135, "column": 41}, "end_point": {"row": 135, "column": 42}}, {"id": 307, "type": "cast_expression", "text": "(void *)&zclOccupancySensor_Occupancy", "parent": 298, "children": [308, 312], "start_point": {"row": 135, "column": 43}, "end_point": {"row": 135, "column": 80}}, {"id": 308, "type": "type_descriptor", "text": "void *", "parent": 307, "children": [309, 310], "start_point": {"row": 135, "column": 44}, "end_point": {"row": 135, "column": 50}}, {"id": 309, "type": "primitive_type", "text": "void", "parent": 308, "children": [], "start_point": {"row": 135, "column": 44}, "end_point": {"row": 135, "column": 48}}, {"id": 310, "type": "abstract_pointer_declarator", "text": "*", "parent": 308, "children": [311], "start_point": {"row": 135, "column": 49}, "end_point": {"row": 135, "column": 50}}, {"id": 311, "type": "*", "text": "*", "parent": 310, "children": [], "start_point": {"row": 135, "column": 49}, "end_point": {"row": 135, "column": 50}}, {"id": 312, "type": "pointer_expression", "text": "&zclOccupancySensor_Occupancy", "parent": 307, "children": [313], "start_point": {"row": 135, "column": 51}, "end_point": {"row": 135, "column": 80}}, {"id": 313, "type": "identifier", "text": "zclOccupancySensor_Occupancy", "parent": 312, "children": [], "start_point": {"row": 135, "column": 52}, "end_point": {"row": 135, "column": 80}}, {"id": 314, "type": "declaration", "text": "afAddrType_t dstaddr;", "parent": 265, "children": [315, 316], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 29}}, {"id": 315, "type": "type_identifier", "text": "afAddrType_t", "parent": 314, "children": [], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 20}}, {"id": 316, "type": "identifier", "text": "dstaddr", "parent": 314, "children": [], "start_point": {"row": 137, "column": 21}, "end_point": {"row": 137, "column": 28}}, {"id": 317, "type": "assignment_expression", "text": "dstaddr.addr.shortAddr = 0x0000", "parent": 265, "children": [318, 323, 324], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 39}}, {"id": 318, "type": "field_expression", "text": "dstaddr.addr.shortAddr", "parent": 317, "children": [319, 322], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 30}}, {"id": 319, "type": "field_expression", "text": "dstaddr.addr", "parent": 318, "children": [320, 321], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 20}}, {"id": 320, "type": "identifier", "text": "dstaddr", "parent": 319, "children": [], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 15}}, {"id": 321, "type": "field_identifier", "text": "addr", "parent": 319, "children": [], "start_point": {"row": 138, "column": 16}, "end_point": {"row": 138, "column": 20}}, {"id": 322, "type": "field_identifier", "text": "shortAddr", "parent": 318, "children": [], "start_point": {"row": 138, "column": 21}, "end_point": {"row": 138, "column": 30}}, {"id": 323, "type": "=", "text": "=", "parent": 317, "children": [], "start_point": {"row": 138, "column": 31}, "end_point": {"row": 138, "column": 32}}, {"id": 324, "type": "number_literal", "text": "0x0000", "parent": 317, "children": [], "start_point": {"row": 138, "column": 33}, "end_point": {"row": 138, "column": 39}}, {"id": 325, "type": "assignment_expression", "text": "dstaddr.addrMode = afAddr16Bit", "parent": 265, "children": [326, 329, 330], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 38}}, {"id": 326, "type": "field_expression", "text": "dstaddr.addrMode", "parent": 325, "children": [327, 328], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 24}}, {"id": 327, "type": "identifier", "text": "dstaddr", "parent": 326, "children": [], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 15}}, {"id": 328, "type": "field_identifier", "text": "addrMode", "parent": 326, "children": [], "start_point": {"row": 139, "column": 16}, "end_point": {"row": 139, "column": 24}}, {"id": 329, "type": "=", "text": "=", "parent": 325, "children": [], "start_point": {"row": 139, "column": 25}, "end_point": {"row": 139, "column": 26}}, {"id": 330, "type": "identifier", "text": "afAddr16Bit", "parent": 325, "children": [], "start_point": {"row": 139, "column": 27}, "end_point": {"row": 139, "column": 38}}, {"id": 331, "type": "assignment_expression", "text": "dstaddr.endPoint = 1", "parent": 265, "children": [332, 335, 336], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 28}}, {"id": 332, "type": "field_expression", "text": "dstaddr.endPoint", "parent": 331, "children": [333, 334], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 24}}, {"id": 333, "type": "identifier", "text": "dstaddr", "parent": 332, "children": [], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 15}}, {"id": 334, "type": "field_identifier", "text": "endPoint", "parent": 332, "children": [], "start_point": {"row": 140, "column": 16}, "end_point": {"row": 140, "column": 24}}, {"id": 335, "type": "=", "text": "=", "parent": 331, "children": [], "start_point": {"row": 140, "column": 25}, "end_point": {"row": 140, "column": 26}}, {"id": 336, "type": "number_literal", "text": "1", "parent": 331, "children": [], "start_point": {"row": 140, "column": 27}, "end_point": {"row": 140, "column": 28}}, {"id": 337, "type": "assignment_expression", "text": "dstaddr.panId = 0", "parent": 265, "children": [338, 341, 342], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 25}}, {"id": 338, "type": "field_expression", "text": "dstaddr.panId", "parent": 337, "children": [339, 340], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 21}}, {"id": 339, "type": "identifier", "text": "dstaddr", "parent": 338, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 15}}, {"id": 340, "type": "field_identifier", "text": "panId", "parent": 338, "children": [], "start_point": {"row": 141, "column": 16}, "end_point": {"row": 141, "column": 21}}, {"id": 341, "type": "=", "text": "=", "parent": 337, "children": [], "start_point": {"row": 141, "column": 22}, "end_point": {"row": 141, "column": 23}}, {"id": 342, "type": "number_literal", "text": "0", "parent": 337, "children": [], "start_point": {"row": 141, "column": 24}, "end_point": {"row": 141, "column": 25}}, {"id": 343, "type": "call_expression", "text": "zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 )", "parent": 265, "children": [344, 345], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 137}}, {"id": 344, "type": "identifier", "text": "zcl_SendReportCmd", "parent": 343, "children": [], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 25}}, {"id": 345, "type": "argument_list", "text": "(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 )", "parent": 343, "children": [346, 347, 349, 350, 351, 352, 353], "start_point": {"row": 144, "column": 25}, "end_point": {"row": 144, "column": 137}}, {"id": 346, "type": "identifier", "text": "SENSOR_ENDPOINT", "parent": 345, "children": [], "start_point": {"row": 144, "column": 26}, "end_point": {"row": 144, "column": 41}}, {"id": 347, "type": "pointer_expression", "text": "&dstaddr", "parent": 345, "children": [348], "start_point": {"row": 144, "column": 43}, "end_point": {"row": 144, "column": 51}}, {"id": 348, "type": "identifier", "text": "dstaddr", "parent": 347, "children": [], "start_point": {"row": 144, "column": 44}, "end_point": {"row": 144, "column": 51}}, {"id": 349, "type": "identifier", "text": "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING", "parent": 345, "children": [], "start_point": {"row": 144, "column": 53}, "end_point": {"row": 144, "column": 88}}, {"id": 350, "type": "identifier", "text": "pReportCmd", "parent": 345, "children": [], "start_point": {"row": 144, "column": 90}, "end_point": {"row": 144, "column": 100}}, {"id": 351, "type": "identifier", "text": "ZCL_FRAME_SERVER_CLIENT_DIR", "parent": 345, "children": [], "start_point": {"row": 144, "column": 102}, "end_point": {"row": 144, "column": 129}}, {"id": 352, "type": "number_literal", "text": "1", "parent": 345, "children": [], "start_point": {"row": 144, "column": 131}, "end_point": {"row": 144, "column": 132}}, {"id": 353, "type": "number_literal", "text": "0", "parent": 345, "children": [], "start_point": {"row": 144, "column": 134}, "end_point": {"row": 144, "column": 135}}, {"id": 354, "type": "call_expression", "text": "free(pReportCmd)", "parent": 265, "children": [355, 356], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 24}}, {"id": 355, "type": "identifier", "text": "free", "parent": 354, "children": [], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 12}}, {"id": 356, "type": "argument_list", "text": "(pReportCmd)", "parent": 354, "children": [357], "start_point": {"row": 146, "column": 12}, "end_point": {"row": 146, "column": 24}}, {"id": 357, "type": "identifier", "text": "pReportCmd", "parent": 356, "children": [], "start_point": {"row": 146, "column": 13}, "end_point": {"row": 146, "column": 23}}, {"id": 358, "type": "function_definition", "text": "void ZclButtonConfigureReport(bdbReportAttrCfgData_t *report, uint8_t appServiceTaskId) {\r\n zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t Req = {0};\r\n\r\n if (zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS) {\r\n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;\r\n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING;\r\n Req.endpoint = SENSOR_ENDPOINT;\r\n Req.maxReportInt = 3600;\r\n Req.minReportInt = 0;\r\n OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE);\r\n Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req);\r\n\r\n }\r\n}", "parent": null, "children": [359, 360], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 163, "column": 1}}, {"id": 359, "type": "primitive_type", "text": "void", "parent": 358, "children": [], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 150, "column": 4}}, {"id": 360, "type": "function_declarator", "text": "ZclButtonConfigureReport(bdbReportAttrCfgData_t *report, uint8_t appServiceTaskId)", "parent": 358, "children": [361, 362], "start_point": {"row": 150, "column": 5}, "end_point": {"row": 150, "column": 87}}, {"id": 361, "type": "identifier", "text": "ZclButtonConfigureReport", "parent": 360, "children": [], "start_point": {"row": 150, "column": 5}, "end_point": {"row": 150, "column": 29}}, {"id": 362, "type": "parameter_list", "text": "(bdbReportAttrCfgData_t *report, uint8_t appServiceTaskId)", "parent": 360, "children": [363, 368], "start_point": {"row": 150, "column": 29}, "end_point": {"row": 150, "column": 87}}, {"id": 363, "type": "parameter_declaration", "text": "bdbReportAttrCfgData_t *report", "parent": 362, "children": [364, 365], "start_point": {"row": 150, "column": 30}, "end_point": {"row": 150, "column": 60}}, {"id": 364, "type": "type_identifier", "text": "bdbReportAttrCfgData_t", "parent": 363, "children": [], "start_point": {"row": 150, "column": 30}, "end_point": {"row": 150, "column": 52}}, {"id": 365, "type": "pointer_declarator", "text": "*report", "parent": 363, "children": [366, 367], "start_point": {"row": 150, "column": 53}, "end_point": {"row": 150, "column": 60}}, {"id": 366, "type": "*", "text": "*", "parent": 365, "children": [], "start_point": {"row": 150, "column": 53}, "end_point": {"row": 150, "column": 54}}, {"id": 367, "type": "identifier", "text": "report", "parent": 365, "children": [], "start_point": {"row": 150, "column": 54}, "end_point": {"row": 150, "column": 60}}, {"id": 368, "type": "parameter_declaration", "text": "uint8_t appServiceTaskId", "parent": 362, "children": [369, 370], "start_point": {"row": 150, "column": 62}, "end_point": {"row": 150, "column": 86}}, {"id": 369, "type": "primitive_type", "text": "uint8_t", "parent": 368, "children": [], "start_point": {"row": 150, "column": 62}, "end_point": {"row": 150, "column": 69}}, {"id": 370, "type": "identifier", "text": "appServiceTaskId", "parent": 368, "children": [], "start_point": {"row": 150, "column": 70}, "end_point": {"row": 150, "column": 86}}, {"id": 371, "type": "declaration", "text": "zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t Req = {0};", "parent": 358, "children": [372, 373], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 62}}, {"id": 372, "type": "type_identifier", "text": "zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t", "parent": 371, "children": [], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 51}}, {"id": 373, "type": "init_declarator", "text": "Req = {0}", "parent": 371, "children": [374, 375, 376], "start_point": {"row": 151, "column": 52}, "end_point": {"row": 151, "column": 61}}, {"id": 374, "type": "identifier", "text": "Req", "parent": 373, "children": [], "start_point": {"row": 151, "column": 52}, "end_point": {"row": 151, "column": 55}}, {"id": 375, "type": "=", "text": "=", "parent": 373, "children": [], "start_point": {"row": 151, "column": 56}, "end_point": {"row": 151, "column": 57}}, {"id": 376, "type": "initializer_list", "text": "{0}", "parent": 373, "children": [377], "start_point": {"row": 151, "column": 58}, "end_point": {"row": 151, "column": 61}}, {"id": 377, "type": "number_literal", "text": "0", "parent": 376, "children": [], "start_point": {"row": 151, "column": 59}, "end_point": {"row": 151, "column": 60}}, {"id": 378, "type": "if_statement", "text": "if (zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS) {\r\n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;\r\n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING;\r\n Req.endpoint = SENSOR_ENDPOINT;\r\n Req.maxReportInt = 3600;\r\n Req.minReportInt = 0;\r\n OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE);\r\n Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req);\r\n\r\n }", "parent": 358, "children": [379], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 162, "column": 5}}, {"id": 379, "type": "parenthesized_expression", "text": "(zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS)", "parent": 378, "children": [380], "start_point": {"row": 153, "column": 7}, "end_point": {"row": 153, "column": 68}}, {"id": 380, "type": "binary_expression", "text": "zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS", "parent": 379, "children": [381, 386, 387], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 67}}, {"id": 381, "type": "call_expression", "text": "zlcGetButtonBdbReport(report, true)", "parent": 380, "children": [382, 383], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 43}}, {"id": 382, "type": "identifier", "text": "zlcGetButtonBdbReport", "parent": 381, "children": [], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 29}}, {"id": 383, "type": "argument_list", "text": "(report, true)", "parent": 381, "children": [384, 385], "start_point": {"row": 153, "column": 29}, "end_point": {"row": 153, "column": 43}}, {"id": 384, "type": "identifier", "text": "report", "parent": 383, "children": [], "start_point": {"row": 153, "column": 30}, "end_point": {"row": 153, "column": 36}}, {"id": 385, "type": "true", "text": "true", "parent": 383, "children": [], "start_point": {"row": 153, "column": 38}, "end_point": {"row": 153, "column": 42}}, {"id": 386, "type": "!=", "text": "!=", "parent": 380, "children": [], "start_point": {"row": 153, "column": 44}, "end_point": {"row": 153, "column": 46}}, {"id": 387, "type": "identifier", "text": "BDBREPORTING_SUCCESS", "parent": 380, "children": [], "start_point": {"row": 153, "column": 47}, "end_point": {"row": 153, "column": 67}}, {"id": 388, "type": "assignment_expression", "text": "Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY", "parent": 378, "children": [389, 392, 393], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 55}}, {"id": 389, "type": "field_expression", "text": "Req.attrID", "parent": 388, "children": [390, 391], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 18}}, {"id": 390, "type": "identifier", "text": "Req", "parent": 389, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 11}}, {"id": 391, "type": "field_identifier", "text": "attrID", "parent": 389, "children": [], "start_point": {"row": 154, "column": 12}, "end_point": {"row": 154, "column": 18}}, {"id": 392, "type": "=", "text": "=", "parent": 388, "children": [], "start_point": {"row": 154, "column": 19}, "end_point": {"row": 154, "column": 20}}, {"id": 393, "type": "identifier", "text": "ATTRID_OCCUPANCY_SENSING_OCCUPANCY", "parent": 388, "children": [], "start_point": {"row": 154, "column": 21}, "end_point": {"row": 154, "column": 55}}, {"id": 394, "type": "assignment_expression", "text": "Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING", "parent": 378, "children": [395, 398, 399], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 57}}, {"id": 395, "type": "field_expression", "text": "Req.cluster", "parent": 394, "children": [396, 397], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 19}}, {"id": 396, "type": "identifier", "text": "Req", "parent": 395, "children": [], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 11}}, {"id": 397, "type": "field_identifier", "text": "cluster", "parent": 395, "children": [], "start_point": {"row": 155, "column": 12}, "end_point": {"row": 155, "column": 19}}, {"id": 398, "type": "=", "text": "=", "parent": 394, "children": [], "start_point": {"row": 155, "column": 20}, "end_point": {"row": 155, "column": 21}}, {"id": 399, "type": "identifier", "text": "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING", "parent": 394, "children": [], "start_point": {"row": 155, "column": 22}, "end_point": {"row": 155, "column": 57}}, {"id": 400, "type": "assignment_expression", "text": "Req.endpoint = SENSOR_ENDPOINT", "parent": 378, "children": [401, 404, 405], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 38}}, {"id": 401, "type": "field_expression", "text": "Req.endpoint", "parent": 400, "children": [402, 403], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 20}}, {"id": 402, "type": "identifier", "text": "Req", "parent": 401, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 11}}, {"id": 403, "type": "field_identifier", "text": "endpoint", "parent": 401, "children": [], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 20}}, {"id": 404, "type": "=", "text": "=", "parent": 400, "children": [], "start_point": {"row": 156, "column": 21}, "end_point": {"row": 156, "column": 22}}, {"id": 405, "type": "identifier", "text": "SENSOR_ENDPOINT", "parent": 400, "children": [], "start_point": {"row": 156, "column": 23}, "end_point": {"row": 156, "column": 38}}, {"id": 406, "type": "assignment_expression", "text": "Req.maxReportInt = 3600", "parent": 378, "children": [407, 410, 411], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 31}}, {"id": 407, "type": "field_expression", "text": "Req.maxReportInt", "parent": 406, "children": [408, 409], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 24}}, {"id": 408, "type": "identifier", "text": "Req", "parent": 407, "children": [], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 11}}, {"id": 409, "type": "field_identifier", "text": "maxReportInt", "parent": 407, "children": [], "start_point": {"row": 157, "column": 12}, "end_point": {"row": 157, "column": 24}}, {"id": 410, "type": "=", "text": "=", "parent": 406, "children": [], "start_point": {"row": 157, "column": 25}, "end_point": {"row": 157, "column": 26}}, {"id": 411, "type": "number_literal", "text": "3600", "parent": 406, "children": [], "start_point": {"row": 157, "column": 27}, "end_point": {"row": 157, "column": 31}}, {"id": 412, "type": "assignment_expression", "text": "Req.minReportInt = 0", "parent": 378, "children": [413, 416, 417], "start_point": {"row": 158, "column": 8}, "end_point": {"row": 158, "column": 28}}, {"id": 413, "type": "field_expression", "text": "Req.minReportInt", "parent": 412, "children": [414, 415], "start_point": {"row": 158, "column": 8}, "end_point": {"row": 158, "column": 24}}, {"id": 414, "type": "identifier", "text": "Req", "parent": 413, "children": [], "start_point": {"row": 158, "column": 8}, "end_point": {"row": 158, "column": 11}}, {"id": 415, "type": "field_identifier", "text": "minReportInt", "parent": 413, "children": [], "start_point": {"row": 158, "column": 12}, "end_point": {"row": 158, "column": 24}}, {"id": 416, "type": "=", "text": "=", "parent": 412, "children": [], "start_point": {"row": 158, "column": 25}, "end_point": {"row": 158, "column": 26}}, {"id": 417, "type": "number_literal", "text": "0", "parent": 412, "children": [], "start_point": {"row": 158, "column": 27}, "end_point": {"row": 158, "column": 28}}, {"id": 418, "type": "call_expression", "text": "OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE)", "parent": 378, "children": [419, 420], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 96}}, {"id": 419, "type": "identifier", "text": "OsalPort_memcpy", "parent": 418, "children": [], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 23}}, {"id": 420, "type": "argument_list", "text": "(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE)", "parent": 418, "children": [421, 424, 425], "start_point": {"row": 159, "column": 23}, "end_point": {"row": 159, "column": 96}}, {"id": 421, "type": "field_expression", "text": "Req.reportableChange", "parent": 420, "children": [422, 423], "start_point": {"row": 159, "column": 24}, "end_point": {"row": 159, "column": 44}}, {"id": 422, "type": "identifier", "text": "Req", "parent": 421, "children": [], "start_point": {"row": 159, "column": 24}, "end_point": {"row": 159, "column": 27}}, {"id": 423, "type": "field_identifier", "text": "reportableChange", "parent": 421, "children": [], "start_point": {"row": 159, "column": 28}, "end_point": {"row": 159, "column": 44}}, {"id": 424, "type": "identifier", "text": "reportableChange", "parent": 420, "children": [], "start_point": {"row": 159, "column": 45}, "end_point": {"row": 159, "column": 61}}, {"id": 425, "type": "identifier", "text": "BDBREPORTING_MAX_ANALOG_ATTR_SIZE", "parent": 420, "children": [], "start_point": {"row": 159, "column": 62}, "end_point": {"row": 159, "column": 95}}, {"id": 426, "type": "call_expression", "text": "Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req)", "parent": 378, "children": [427, 428], "start_point": {"row": 160, "column": 8}, "end_point": {"row": 160, "column": 79}}, {"id": 427, "type": "identifier", "text": "Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq", "parent": 426, "children": [], "start_point": {"row": 160, "column": 8}, "end_point": {"row": 160, "column": 56}}, {"id": 428, "type": "argument_list", "text": "(appServiceTaskId,&Req)", "parent": 426, "children": [429, 430], "start_point": {"row": 160, "column": 56}, "end_point": {"row": 160, "column": 79}}, {"id": 429, "type": "identifier", "text": "appServiceTaskId", "parent": 428, "children": [], "start_point": {"row": 160, "column": 57}, "end_point": {"row": 160, "column": 73}}, {"id": 430, "type": "pointer_expression", "text": "&Req", "parent": 428, "children": [431], "start_point": {"row": 160, "column": 74}, "end_point": {"row": 160, "column": 78}}, {"id": 431, "type": "identifier", "text": "Req", "parent": 430, "children": [], "start_point": {"row": 160, "column": 75}, "end_point": {"row": 160, "column": 78}}, {"id": 432, "type": "function_definition", "text": "uint8_t zlcGetButtonBdbReport(bdbReportAttrCfgData_t *report, bool check) {\r\n\r\n// return BDBREPORTING_SUCCESS;\r\n return bdb_getReport(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check );\r\n}", "parent": null, "children": [433, 434], "start_point": {"row": 165, "column": 0}, "end_point": {"row": 169, "column": 1}}, {"id": 433, "type": "primitive_type", "text": "uint8_t", "parent": 432, "children": [], "start_point": {"row": 165, "column": 0}, "end_point": {"row": 165, "column": 7}}, {"id": 434, "type": "function_declarator", "text": "zlcGetButtonBdbReport(bdbReportAttrCfgData_t *report, bool check)", "parent": 432, "children": [435, 436], "start_point": {"row": 165, "column": 8}, "end_point": {"row": 165, "column": 73}}, {"id": 435, "type": "identifier", "text": "zlcGetButtonBdbReport", "parent": 434, "children": [], "start_point": {"row": 165, "column": 8}, "end_point": {"row": 165, "column": 29}}, {"id": 436, "type": "parameter_list", "text": "(bdbReportAttrCfgData_t *report, bool check)", "parent": 434, "children": [437, 442], "start_point": {"row": 165, "column": 29}, "end_point": {"row": 165, "column": 73}}, {"id": 437, "type": "parameter_declaration", "text": "bdbReportAttrCfgData_t *report", "parent": 436, "children": [438, 439], "start_point": {"row": 165, "column": 30}, "end_point": {"row": 165, "column": 60}}, {"id": 438, "type": "type_identifier", "text": "bdbReportAttrCfgData_t", "parent": 437, "children": [], "start_point": {"row": 165, "column": 30}, "end_point": {"row": 165, "column": 52}}, {"id": 439, "type": "pointer_declarator", "text": "*report", "parent": 437, "children": [440, 441], "start_point": {"row": 165, "column": 53}, "end_point": {"row": 165, "column": 60}}, {"id": 440, "type": "*", "text": "*", "parent": 439, "children": [], "start_point": {"row": 165, "column": 53}, "end_point": {"row": 165, "column": 54}}, {"id": 441, "type": "identifier", "text": "report", "parent": 439, "children": [], "start_point": {"row": 165, "column": 54}, "end_point": {"row": 165, "column": 60}}, {"id": 442, "type": "parameter_declaration", "text": "bool check", "parent": 436, "children": [443, 444], "start_point": {"row": 165, "column": 62}, "end_point": {"row": 165, "column": 72}}, {"id": 443, "type": "primitive_type", "text": "bool", "parent": 442, "children": [], "start_point": {"row": 165, "column": 62}, "end_point": {"row": 165, "column": 66}}, {"id": 444, "type": "identifier", "text": "check", "parent": 442, "children": [], "start_point": {"row": 165, "column": 67}, "end_point": {"row": 165, "column": 72}}, {"id": 445, "type": "return_statement", "text": "return bdb_getReport(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check );", "parent": 432, "children": [446], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 131}}, {"id": 446, "type": "call_expression", "text": "bdb_getReport(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check )", "parent": 445, "children": [447, 448], "start_point": {"row": 168, "column": 11}, "end_point": {"row": 168, "column": 130}}, {"id": 447, "type": "identifier", "text": "bdb_getReport", "parent": 446, "children": [], "start_point": {"row": 168, "column": 11}, "end_point": {"row": 168, "column": 24}}, {"id": 448, "type": "argument_list", "text": "(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check )", "parent": 446, "children": [449, 450, 451, 452, 453], "start_point": {"row": 168, "column": 24}, "end_point": {"row": 168, "column": 130}}, {"id": 449, "type": "identifier", "text": "SENSOR_ENDPOINT", "parent": 448, "children": [], "start_point": {"row": 168, "column": 25}, "end_point": {"row": 168, "column": 40}}, {"id": 450, "type": "identifier", "text": "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING", "parent": 448, "children": [], "start_point": {"row": 168, "column": 42}, "end_point": {"row": 168, "column": 77}}, {"id": 451, "type": "identifier", "text": "ATTRID_OCCUPANCY_SENSING_OCCUPANCY", "parent": 448, "children": [], "start_point": {"row": 168, "column": 79}, "end_point": {"row": 168, "column": 113}}, {"id": 452, "type": "identifier", "text": "report", "parent": 448, "children": [], "start_point": {"row": 168, "column": 115}, "end_point": {"row": 168, "column": 121}}, {"id": 453, "type": "identifier", "text": "check", "parent": 448, "children": [], "start_point": {"row": 168, "column": 123}, "end_point": {"row": 168, "column": 128}}, {"id": 454, "type": "function_definition", "text": "void process_door_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) {\r\n zstack_bdbRepChangedAttrValueReq_t Req;\r\n\r\n zclOccupancySensor_Occupancy = 1-output->buttonState;\r\n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;\r\n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING;\r\n Req.endpoint = SENSOR_ENDPOINT;\r\n Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req);\r\n}", "parent": null, "children": [455, 456], "start_point": {"row": 172, "column": 0}, "end_point": {"row": 180, "column": 1}}, {"id": 455, "type": "primitive_type", "text": "void", "parent": 454, "children": [], "start_point": {"row": 172, "column": 0}, "end_point": {"row": 172, "column": 4}}, {"id": 456, "type": "function_declarator", "text": "process_door_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId)", "parent": 454, "children": [457, 458], "start_point": {"row": 172, "column": 5}, "end_point": {"row": 172, "column": 90}}, {"id": 457, "type": "identifier", "text": "process_door_sensor", "parent": 456, "children": [], "start_point": {"row": 172, "column": 5}, "end_point": {"row": 172, "column": 24}}, {"id": 458, "type": "parameter_list", "text": "(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId)", "parent": 456, "children": [459, 464], "start_point": {"row": 172, "column": 24}, "end_point": {"row": 172, "column": 90}}, {"id": 459, "type": "parameter_declaration", "text": "SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output", "parent": 458, "children": [460, 461], "start_point": {"row": 172, "column": 25}, "end_point": {"row": 172, "column": 63}}, {"id": 460, "type": "type_identifier", "text": "SCIF_BUTTON_DEBOUNCER_OUTPUT_T", "parent": 459, "children": [], "start_point": {"row": 172, "column": 25}, "end_point": {"row": 172, "column": 55}}, {"id": 461, "type": "pointer_declarator", "text": "*output", "parent": 459, "children": [462, 463], "start_point": {"row": 172, "column": 56}, "end_point": {"row": 172, "column": 63}}, {"id": 462, "type": "*", "text": "*", "parent": 461, "children": [], "start_point": {"row": 172, "column": 56}, "end_point": {"row": 172, "column": 57}}, {"id": 463, "type": "identifier", "text": "output", "parent": 461, "children": [], "start_point": {"row": 172, "column": 57}, "end_point": {"row": 172, "column": 63}}, {"id": 464, "type": "parameter_declaration", "text": "uint8_t appServiceTaskId", "parent": 458, "children": [465, 466], "start_point": {"row": 172, "column": 65}, "end_point": {"row": 172, "column": 89}}, {"id": 465, "type": "primitive_type", "text": "uint8_t", "parent": 464, "children": [], "start_point": {"row": 172, "column": 65}, "end_point": {"row": 172, "column": 72}}, {"id": 466, "type": "identifier", "text": "appServiceTaskId", "parent": 464, "children": [], "start_point": {"row": 172, "column": 73}, "end_point": {"row": 172, "column": 89}}, {"id": 467, "type": "declaration", "text": "zstack_bdbRepChangedAttrValueReq_t Req;", "parent": 454, "children": [468, 469], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 43}}, {"id": 468, "type": "type_identifier", "text": "zstack_bdbRepChangedAttrValueReq_t", "parent": 467, "children": [], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 38}}, {"id": 469, "type": "identifier", "text": "Req", "parent": 467, "children": [], "start_point": {"row": 173, "column": 39}, "end_point": {"row": 173, "column": 42}}, {"id": 470, "type": "assignment_expression", "text": "zclOccupancySensor_Occupancy = 1-output->buttonState", "parent": 454, "children": [471, 472, 473], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 56}}, {"id": 471, "type": "identifier", "text": "zclOccupancySensor_Occupancy", "parent": 470, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 32}}, {"id": 472, "type": "=", "text": "=", "parent": 470, "children": [], "start_point": {"row": 175, "column": 33}, "end_point": {"row": 175, "column": 34}}, {"id": 473, "type": "binary_expression", "text": "1-output->buttonState", "parent": 470, "children": [474, 475, 476], "start_point": {"row": 175, "column": 35}, "end_point": {"row": 175, "column": 56}}, {"id": 474, "type": "number_literal", "text": "1", "parent": 473, "children": [], "start_point": {"row": 175, "column": 35}, "end_point": {"row": 175, "column": 36}}, {"id": 475, "type": "-", "text": "-", "parent": 473, "children": [], "start_point": {"row": 175, "column": 36}, "end_point": {"row": 175, "column": 37}}, {"id": 476, "type": "field_expression", "text": "output->buttonState", "parent": 473, "children": [477, 478], "start_point": {"row": 175, "column": 37}, "end_point": {"row": 175, "column": 56}}, {"id": 477, "type": "identifier", "text": "output", "parent": 476, "children": [], "start_point": {"row": 175, "column": 37}, "end_point": {"row": 175, "column": 43}}, {"id": 478, "type": "field_identifier", "text": "buttonState", "parent": 476, "children": [], "start_point": {"row": 175, "column": 45}, "end_point": {"row": 175, "column": 56}}, {"id": 479, "type": "assignment_expression", "text": "Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY", "parent": 454, "children": [480, 483, 484], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 51}}, {"id": 480, "type": "field_expression", "text": "Req.attrID", "parent": 479, "children": [481, 482], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 14}}, {"id": 481, "type": "identifier", "text": "Req", "parent": 480, "children": [], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 7}}, {"id": 482, "type": "field_identifier", "text": "attrID", "parent": 480, "children": [], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 14}}, {"id": 483, "type": "=", "text": "=", "parent": 479, "children": [], "start_point": {"row": 176, "column": 15}, "end_point": {"row": 176, "column": 16}}, {"id": 484, "type": "identifier", "text": "ATTRID_OCCUPANCY_SENSING_OCCUPANCY", "parent": 479, "children": [], "start_point": {"row": 176, "column": 17}, "end_point": {"row": 176, "column": 51}}, {"id": 485, "type": "assignment_expression", "text": "Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING", "parent": 454, "children": [486, 489, 490], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 53}}, {"id": 486, "type": "field_expression", "text": "Req.cluster", "parent": 485, "children": [487, 488], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 15}}, {"id": 487, "type": "identifier", "text": "Req", "parent": 486, "children": [], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 7}}, {"id": 488, "type": "field_identifier", "text": "cluster", "parent": 486, "children": [], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 15}}, {"id": 489, "type": "=", "text": "=", "parent": 485, "children": [], "start_point": {"row": 177, "column": 16}, "end_point": {"row": 177, "column": 17}}, {"id": 490, "type": "identifier", "text": "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING", "parent": 485, "children": [], "start_point": {"row": 177, "column": 18}, "end_point": {"row": 177, "column": 53}}, {"id": 491, "type": "assignment_expression", "text": "Req.endpoint = SENSOR_ENDPOINT", "parent": 454, "children": [492, 495, 496], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 178, "column": 34}}, {"id": 492, "type": "field_expression", "text": "Req.endpoint", "parent": 491, "children": [493, 494], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 178, "column": 16}}, {"id": 493, "type": "identifier", "text": "Req", "parent": 492, "children": [], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 178, "column": 7}}, {"id": 494, "type": "field_identifier", "text": "endpoint", "parent": 492, "children": [], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 16}}, {"id": 495, "type": "=", "text": "=", "parent": 491, "children": [], "start_point": {"row": 178, "column": 17}, "end_point": {"row": 178, "column": 18}}, {"id": 496, "type": "identifier", "text": "SENSOR_ENDPOINT", "parent": 491, "children": [], "start_point": {"row": 178, "column": 19}, "end_point": {"row": 178, "column": 34}}, {"id": 497, "type": "call_expression", "text": "Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req)", "parent": 454, "children": [498, 499], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 63}}, {"id": 498, "type": "identifier", "text": "Zstackapi_bdbRepChangedAttrValueReq", "parent": 497, "children": [], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 39}}, {"id": 499, "type": "argument_list", "text": "(appServiceTaskId, &Req)", "parent": 497, "children": [500, 501], "start_point": {"row": 179, "column": 39}, "end_point": {"row": 179, "column": 63}}, {"id": 500, "type": "identifier", "text": "appServiceTaskId", "parent": 499, "children": [], "start_point": {"row": 179, "column": 40}, "end_point": {"row": 179, "column": 56}}, {"id": 501, "type": "pointer_expression", "text": "&Req", "parent": 499, "children": [502], "start_point": {"row": 179, "column": 58}, "end_point": {"row": 179, "column": 62}}, {"id": 502, "type": "identifier", "text": "Req", "parent": 501, "children": [], "start_point": {"row": 179, "column": 59}, "end_point": {"row": 179, "column": 62}}, {"id": 503, "type": "function_definition", "text": "void process_movement_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) {\r\n zstack_bdbRepChangedAttrValueReq_t Req;\r\n\r\n zclOccupancySensor_Occupancy = output->buttonState;\r\n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;\r\n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING;\r\n Req.endpoint = SENSOR_ENDPOINT;\r\n Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req);\r\n}", "parent": null, "children": [504, 505], "start_point": {"row": 182, "column": 0}, "end_point": {"row": 190, "column": 1}}, {"id": 504, "type": "primitive_type", "text": "void", "parent": 503, "children": [], "start_point": {"row": 182, "column": 0}, "end_point": {"row": 182, "column": 4}}, {"id": 505, "type": "function_declarator", "text": "process_movement_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId)", "parent": 503, "children": [506, 507], "start_point": {"row": 182, "column": 5}, "end_point": {"row": 182, "column": 94}}, {"id": 506, "type": "identifier", "text": "process_movement_sensor", "parent": 505, "children": [], "start_point": {"row": 182, "column": 5}, "end_point": {"row": 182, "column": 28}}, {"id": 507, "type": "parameter_list", "text": "(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId)", "parent": 505, "children": [508, 513], "start_point": {"row": 182, "column": 28}, "end_point": {"row": 182, "column": 94}}, {"id": 508, "type": "parameter_declaration", "text": "SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output", "parent": 507, "children": [509, 510], "start_point": {"row": 182, "column": 29}, "end_point": {"row": 182, "column": 67}}, {"id": 509, "type": "type_identifier", "text": "SCIF_BUTTON_DEBOUNCER_OUTPUT_T", "parent": 508, "children": [], "start_point": {"row": 182, "column": 29}, "end_point": {"row": 182, "column": 59}}, {"id": 510, "type": "pointer_declarator", "text": "*output", "parent": 508, "children": [511, 512], "start_point": {"row": 182, "column": 60}, "end_point": {"row": 182, "column": 67}}, {"id": 511, "type": "*", "text": "*", "parent": 510, "children": [], "start_point": {"row": 182, "column": 60}, "end_point": {"row": 182, "column": 61}}, {"id": 512, "type": "identifier", "text": "output", "parent": 510, "children": [], "start_point": {"row": 182, "column": 61}, "end_point": {"row": 182, "column": 67}}, {"id": 513, "type": "parameter_declaration", "text": "uint8_t appServiceTaskId", "parent": 507, "children": [514, 515], "start_point": {"row": 182, "column": 69}, "end_point": {"row": 182, "column": 93}}, {"id": 514, "type": "primitive_type", "text": "uint8_t", "parent": 513, "children": [], "start_point": {"row": 182, "column": 69}, "end_point": {"row": 182, "column": 76}}, {"id": 515, "type": "identifier", "text": "appServiceTaskId", "parent": 513, "children": [], "start_point": {"row": 182, "column": 77}, "end_point": {"row": 182, "column": 93}}, {"id": 516, "type": "declaration", "text": "zstack_bdbRepChangedAttrValueReq_t Req;", "parent": 503, "children": [517, 518], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 43}}, {"id": 517, "type": "type_identifier", "text": "zstack_bdbRepChangedAttrValueReq_t", "parent": 516, "children": [], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 38}}, {"id": 518, "type": "identifier", "text": "Req", "parent": 516, "children": [], "start_point": {"row": 183, "column": 39}, "end_point": {"row": 183, "column": 42}}, {"id": 519, "type": "assignment_expression", "text": "zclOccupancySensor_Occupancy = output->buttonState", "parent": 503, "children": [520, 521, 522], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 54}}, {"id": 520, "type": "identifier", "text": "zclOccupancySensor_Occupancy", "parent": 519, "children": [], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 32}}, {"id": 521, "type": "=", "text": "=", "parent": 519, "children": [], "start_point": {"row": 185, "column": 33}, "end_point": {"row": 185, "column": 34}}, {"id": 522, "type": "field_expression", "text": "output->buttonState", "parent": 519, "children": [523, 524], "start_point": {"row": 185, "column": 35}, "end_point": {"row": 185, "column": 54}}, {"id": 523, "type": "identifier", "text": "output", "parent": 522, "children": [], "start_point": {"row": 185, "column": 35}, "end_point": {"row": 185, "column": 41}}, {"id": 524, "type": "field_identifier", "text": "buttonState", "parent": 522, "children": [], "start_point": {"row": 185, "column": 43}, "end_point": {"row": 185, "column": 54}}, {"id": 525, "type": "assignment_expression", "text": "Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY", "parent": 503, "children": [526, 529, 530], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 51}}, {"id": 526, "type": "field_expression", "text": "Req.attrID", "parent": 525, "children": [527, 528], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 14}}, {"id": 527, "type": "identifier", "text": "Req", "parent": 526, "children": [], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 7}}, {"id": 528, "type": "field_identifier", "text": "attrID", "parent": 526, "children": [], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 186, "column": 14}}, {"id": 529, "type": "=", "text": "=", "parent": 525, "children": [], "start_point": {"row": 186, "column": 15}, "end_point": {"row": 186, "column": 16}}, {"id": 530, "type": "identifier", "text": "ATTRID_OCCUPANCY_SENSING_OCCUPANCY", "parent": 525, "children": [], "start_point": {"row": 186, "column": 17}, "end_point": {"row": 186, "column": 51}}, {"id": 531, "type": "assignment_expression", "text": "Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING", "parent": 503, "children": [532, 535, 536], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 187, "column": 53}}, {"id": 532, "type": "field_expression", "text": "Req.cluster", "parent": 531, "children": [533, 534], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 187, "column": 15}}, {"id": 533, "type": "identifier", "text": "Req", "parent": 532, "children": [], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 187, "column": 7}}, {"id": 534, "type": "field_identifier", "text": "cluster", "parent": 532, "children": [], "start_point": {"row": 187, "column": 8}, "end_point": {"row": 187, "column": 15}}, {"id": 535, "type": "=", "text": "=", "parent": 531, "children": [], "start_point": {"row": 187, "column": 16}, "end_point": {"row": 187, "column": 17}}, {"id": 536, "type": "identifier", "text": "ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING", "parent": 531, "children": [], "start_point": {"row": 187, "column": 18}, "end_point": {"row": 187, "column": 53}}, {"id": 537, "type": "assignment_expression", "text": "Req.endpoint = SENSOR_ENDPOINT", "parent": 503, "children": [538, 541, 542], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 34}}, {"id": 538, "type": "field_expression", "text": "Req.endpoint", "parent": 537, "children": [539, 540], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 16}}, {"id": 539, "type": "identifier", "text": "Req", "parent": 538, "children": [], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 7}}, {"id": 540, "type": "field_identifier", "text": "endpoint", "parent": 538, "children": [], "start_point": {"row": 188, "column": 8}, "end_point": {"row": 188, "column": 16}}, {"id": 541, "type": "=", "text": "=", "parent": 537, "children": [], "start_point": {"row": 188, "column": 17}, "end_point": {"row": 188, "column": 18}}, {"id": 542, "type": "identifier", "text": "SENSOR_ENDPOINT", "parent": 537, "children": [], "start_point": {"row": 188, "column": 19}, "end_point": {"row": 188, "column": 34}}, {"id": 543, "type": "call_expression", "text": "Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req)", "parent": 503, "children": [544, 545], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 63}}, {"id": 544, "type": "identifier", "text": "Zstackapi_bdbRepChangedAttrValueReq", "parent": 543, "children": [], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 39}}, {"id": 545, "type": "argument_list", "text": "(appServiceTaskId, &Req)", "parent": 543, "children": [546, 547], "start_point": {"row": 189, "column": 39}, "end_point": {"row": 189, "column": 63}}, {"id": 546, "type": "identifier", "text": "appServiceTaskId", "parent": 545, "children": [], "start_point": {"row": 189, "column": 40}, "end_point": {"row": 189, "column": 56}}, {"id": 547, "type": "pointer_expression", "text": "&Req", "parent": 545, "children": [548], "start_point": {"row": 189, "column": 58}, "end_point": {"row": 189, "column": 62}}, {"id": 548, "type": "identifier", "text": "Req", "parent": 547, "children": [], "start_point": {"row": 189, "column": 59}, "end_point": {"row": 189, "column": 62}}]}, "node_categories": {"declarations": {"functions": [188, 190, 209, 211, 239, 241, 358, 360, 432, 434, 454, 456, 503, 505], "variables": [44, 48, 56, 67, 73, 79, 116, 138, 154, 163, 193, 202, 214, 217, 244, 246, 314, 363, 368, 371, 437, 442, 459, 464, 467, 508, 513, 516], "classes": [46, 47], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 30, 31, 39, 40, 53, 54], "modules": [], "enums": []}, "statements": {"expressions": [93, 96, 101, 109, 114, 123, 124, 125, 126, 129, 130, 131, 175, 182, 196, 221, 227, 231, 233, 237, 254, 257, 258, 259, 262, 263, 266, 267, 273, 279, 280, 281, 289, 290, 291, 299, 300, 301, 307, 312, 318, 319, 326, 332, 338, 343, 347, 354, 379, 380, 381, 389, 395, 401, 407, 413, 418, 421, 426, 430, 446, 473, 476, 480, 486, 492, 497, 501, 522, 526, 532, 538, 543, 547], "assignments": [220, 226, 251, 272, 278, 288, 298, 317, 325, 331, 337, 388, 394, 400, 406, 412, 470, 479, 485, 491, 519, 525, 531, 537], "loops": [], "conditionals": [24, 25, 28, 33, 34, 37, 50, 51, 52, 60, 70, 72, 76, 78, 80, 82, 85, 89, 91, 92, 94, 95, 102, 104, 106, 107, 108, 115, 119, 121, 127, 132, 136, 139, 142, 143, 146, 147, 148, 149, 152, 155, 158, 159, 162, 164, 166, 169, 170, 171, 172, 173, 174, 177, 180, 181, 184, 187, 191, 195, 197, 199, 200, 201, 203, 205, 212, 216, 219, 222, 223, 225, 228, 229, 232, 234, 236, 238, 242, 247, 250, 252, 255, 260, 264, 265, 268, 274, 275, 282, 283, 285, 287, 292, 293, 295, 297, 302, 303, 305, 313, 315, 316, 320, 321, 322, 327, 328, 330, 333, 334, 339, 340, 344, 346, 348, 349, 350, 351, 355, 357, 361, 364, 367, 370, 372, 374, 378, 382, 384, 387, 390, 391, 393, 396, 397, 399, 402, 403, 405, 408, 409, 414, 415, 419, 422, 423, 424, 425, 427, 429, 431, 435, 438, 441, 444, 447, 449, 450, 451, 452, 453, 457, 460, 463, 466, 468, 469, 471, 477, 478, 481, 482, 484, 487, 488, 490, 493, 494, 496, 498, 500, 502, 506, 509, 512, 515, 517, 518, 520, 523, 524, 527, 528, 530, 533, 534, 536, 539, 540, 542, 544, 546, 548], "returns": [445], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 32, 41, 55, 63, 64, 65, 66, 133, 208, 277, 284, 294, 304, 324, 336, 342, 352, 353, 377, 411, 417, 474], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 188, "universal_type": "function", "name": "zclAddButtonAttrs", "text_snippet": "void zclAddButtonAttrs(uint8_t endPoint) {\r\n\r\n zcl_registerAttrList( endPoint, zclSensor_NumAttri"}, {"node_id": 190, "universal_type": "function", "name": "unknown", "text_snippet": "zclAddButtonAttrs(uint8_t endPoint)"}, {"node_id": 209, "universal_type": "function", "name": "zclAddButtonEndPoints", "text_snippet": "void zclAddButtonEndPoints(uint8_t endPoint, uint8_t appServiceTaskId) {\r\n\r\n zclSensorEpDesc.endP"}, {"node_id": 211, "universal_type": "function", "name": "unknown", "text_snippet": "zclAddButtonEndPoints(uint8_t endPoint, uint8_t appServiceTaskId)"}, {"node_id": 239, "universal_type": "function", "name": "ZclButtonReport", "text_snippet": "void ZclButtonReport(void) {\r\n\r\n zclReportCmd_t *pReportCmd;\r\n pReportCmd = malloc( sizeof(zcl"}, {"node_id": 241, "universal_type": "function", "name": "unknown", "text_snippet": "ZclButtonReport(void)"}, {"node_id": 358, "universal_type": "function", "name": "ZclButtonConfigureReport", "text_snippet": "void ZclButtonConfigureReport(bdbReportAttrCfgData_t *report, uint8_t appServiceTaskId) {\r\n zstac"}, {"node_id": 360, "universal_type": "function", "name": "unknown", "text_snippet": "ZclButtonConfigureReport(bdbReportAttrCfgData_t *report, uint8_t appServiceTaskId)"}, {"node_id": 432, "universal_type": "function", "name": "check)", "text_snippet": "uint8_t zlcGetButtonBdbReport(bdbReportAttrCfgData_t *report, bool check) {\r\n\r\n// return BDBREPOR"}, {"node_id": 434, "universal_type": "function", "name": "check)", "text_snippet": "zlcGetButtonBdbReport(bdbReportAttrCfgData_t *report, bool check)"}, {"node_id": 454, "universal_type": "function", "name": "process_door_sensor", "text_snippet": "void process_door_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) {\r\n zs"}, {"node_id": 456, "universal_type": "function", "name": "unknown", "text_snippet": "process_door_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId)"}, {"node_id": 503, "universal_type": "function", "name": "process_movement_sensor", "text_snippet": "void process_movement_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) {\r\n "}, {"node_id": 505, "universal_type": "function", "name": "unknown", "text_snippet": "process_movement_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId)"}], "class_declarations": [{"node_id": 46, "universal_type": "class", "name": "{", "text_snippet": "struct {\r\n uint16_t buttonState; ///< Current button state\r\n}"}, {"node_id": 47, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <Application/zcl_sensor.h>\r\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"zcomdef.h\"\r\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"zcl.h\"\r\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"zcl_general.h\"\r\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"zcl_ha.h\"\r\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"zcl_ms.h\"\r\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"zcl_port.h\"\r\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"zstackapi.h\"\r\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 30, "text": "#include <Application/sensor_controller/MOVEMENT/scif.h>\r\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 39, "text": "#include <Application/sensor_controller/REED/scif.h>\r\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 53, "text": "#include \"zcl_consts.h\"\r\n"}, {"node_id": 54, "text": "#include"}]}, "original_source_code": "/*\r\n * zcl_adc.c\r\n *\r\n * Created on: 31 Jan 2022\r\n * Author: BigBob\r\n */\r\n/*\r\n * zcl_light.c\r\n *\r\n * Created on: 27 Jan 2022\r\n * Author: BigBob\r\n */\r\n\r\n/*\r\n * zcl_temp_humid.c\r\n *\r\n * Created on: 26 Jan 2022\r\n * Author: BigBob\r\n */\r\n/*********************************************************************\r\n * INCLUDES\r\n */\r\n#include <Application/zcl_sensor.h>\r\n#include \"zcomdef.h\"\r\n#include \"zcl.h\"\r\n#include \"zcl_general.h\"\r\n#include \"zcl_ha.h\"\r\n#include \"zcl_ms.h\"\r\n#include \"zcl_port.h\"\r\n#include \"zstackapi.h\"\r\n\r\n#if defined(SENSOR_MOVEMENT)\r\n#include <Application/sensor_controller/MOVEMENT/scif.h>\r\n#elif defined(SENSOR_REED)\r\n#include <Application/sensor_controller/REED/scif.h>\r\n#else\r\ntypedef struct {\r\n uint16_t buttonState; ///< Current button state\r\n} SCIF_BUTTON_DEBOUNCER_OUTPUT_T;\r\n\r\n#endif\r\n\r\n#include \"zcl_consts.h\"\r\n\r\nstatic uint8_t reportableChange[] = {0x32, 0x00, 0x00, 0x00}; // 50 in int16_t\r\n\r\n// Occupancy Sensor Cluster\r\nuint8_t zclOccupancySensor_Occupancy = DOOR_STATE_CLOSED;\r\nconst uint8_t zclOccupancySensor_OccupancySensorType = PIR_SENSOR_TYPE;\r\n\r\n\r\nstatic CONST zclAttrRec_t zclSensor_Attrs[] =\r\n{\r\n {\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n { // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY,\r\n ZCL_DATATYPE_BITMAP8,\r\n ACCESS_CONTROL_READ | ACCESS_REPORTABLE,\r\n (void *)&zclOccupancySensor_Occupancy\r\n }\r\n },\r\n {\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n { // Attribute record\r\n ATTRID_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE,\r\n ZCL_DATATYPE_ENUM8,\r\n ACCESS_CONTROL_READ,\r\n (void *)&zclOccupancySensor_OccupancySensorType\r\n }\r\n },\r\n};\r\n\r\nstatic uint8_t CONST zclSensor_NumAttributes = ( sizeof(zclSensor_Attrs) / sizeof(zclSensor_Attrs[0]) );\r\n\r\n\r\n /*********************************************************************\r\n * SIMPLE DESCRIPTOR\r\n */\r\n // This is the Cluster ID List and should be filled with Application\r\n // specific cluster IDs.\r\n\r\n#define ZCLSENSOR_MAX_INCLUSTERS 4\r\nstatic const cId_t zclSensor_InClusterList[ZCLSENSOR_MAX_INCLUSTERS] =\r\n{\r\n ZCL_CLUSTER_ID_GENERAL_BASIC,\r\n ZCL_CLUSTER_ID_GENERAL_IDENTIFY,\r\n ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING,\r\n ZCL_CLUSTER_ID_GENERAL_POWER_CFG\r\n};\r\n\r\n#define ZCLSENSOR_MAX_OUTCLUSTERS 1\r\nstatic const cId_t zclSensor_OutClusterList[ZCLSENSOR_MAX_OUTCLUSTERS] =\r\n{\r\n ZCL_CLUSTER_ID_GENERAL_IDENTIFY\r\n};\r\n\r\nstatic SimpleDescriptionFormat_t zclSensor_SimpleDesc =\r\n{\r\n SENSOR_ENDPOINT, // int Endpoint;\r\n ZCL_HA_PROFILE_ID, // uint16_t AppProfId[2];\r\n ZCL_DEVICEID_OCCUPANCY_SENSOR, // uint16_t AppDeviceId[2];\r\n SENSOR_DEVICE_VERSION, // int AppDevVer:4;\r\n SENSOR_FLAGS, // int AppFlags:4;\r\n ZCLSENSOR_MAX_INCLUSTERS, // byte AppNumInClusters;\r\n (cId_t *)zclSensor_InClusterList, // byte *pAppInClusterList;\r\n ZCLSENSOR_MAX_OUTCLUSTERS, // byte AppNumInClusters;\r\n (cId_t *)zclSensor_OutClusterList // byte *pAppInClusterList;\r\n};\r\n\r\n\r\nvoid zclAddButtonAttrs(uint8_t endPoint) {\r\n\r\n zcl_registerAttrList( endPoint, zclSensor_NumAttributes, zclSensor_Attrs );\r\n}\r\n\r\nstatic endPointDesc_t zclSensorEpDesc = {0};\r\n\r\nvoid zclAddButtonEndPoints(uint8_t endPoint, uint8_t appServiceTaskId) {\r\n\r\n zclSensorEpDesc.endPoint = endPoint;\r\n zclSensorEpDesc.simpleDesc = &zclSensor_SimpleDesc;\r\n zclport_registerEndpoint(appServiceTaskId, &zclSensorEpDesc);\r\n}\r\n\r\nvoid ZclButtonReport(void) {\r\n\r\n zclReportCmd_t *pReportCmd;\r\n pReportCmd = malloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) );\r\n if(pReportCmd != NULL)\r\n {\r\n // Fill in the single attribute information for the temperature reading\r\n pReportCmd->numAttr = 1;\r\n pReportCmd->attrList[0].attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;\r\n pReportCmd->attrList[0].dataType = ZCL_DATATYPE_BITMAP8;\r\n pReportCmd->attrList[0].attrData = (void *)&zclOccupancySensor_Occupancy;// (uint8 *)&(zclSampleTemperatureSensor_MeasuredValue);\r\n\r\n afAddrType_t dstaddr;\r\n dstaddr.addr.shortAddr = 0x0000;\r\n dstaddr.addrMode = afAddr16Bit;\r\n dstaddr.endPoint = 1;\r\n dstaddr.panId = 0;\r\n\r\n // Call ZCL function to send the report\r\n zcl_SendReportCmd(SENSOR_ENDPOINT, &dstaddr, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 );\r\n\r\n free(pReportCmd);\r\n }\r\n}\r\n\r\nvoid ZclButtonConfigureReport(bdbReportAttrCfgData_t *report, uint8_t appServiceTaskId) {\r\n zstack_bdbRepAddAttrCfgRecordDefaultToListReq_t Req = {0};\r\n\r\n if (zlcGetButtonBdbReport(report, true) != BDBREPORTING_SUCCESS) {\r\n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;\r\n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING;\r\n Req.endpoint = SENSOR_ENDPOINT;\r\n Req.maxReportInt = 3600;\r\n Req.minReportInt = 0;\r\n OsalPort_memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE);\r\n Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req);\r\n\r\n }\r\n}\r\n\r\nuint8_t zlcGetButtonBdbReport(bdbReportAttrCfgData_t *report, bool check) {\r\n\r\n// return BDBREPORTING_SUCCESS;\r\n return bdb_getReport(SENSOR_ENDPOINT, ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING, ATTRID_OCCUPANCY_SENSING_OCCUPANCY, report, check );\r\n}\r\n\r\n\r\nvoid process_door_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) {\r\n zstack_bdbRepChangedAttrValueReq_t Req;\r\n\r\n zclOccupancySensor_Occupancy = 1-output->buttonState;\r\n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;\r\n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING;\r\n Req.endpoint = SENSOR_ENDPOINT;\r\n Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req);\r\n}\r\n\r\nvoid process_movement_sensor(SCIF_BUTTON_DEBOUNCER_OUTPUT_T *output, uint8_t appServiceTaskId) {\r\n zstack_bdbRepChangedAttrValueReq_t Req;\r\n\r\n zclOccupancySensor_Occupancy = output->buttonState;\r\n Req.attrID = ATTRID_OCCUPANCY_SENSING_OCCUPANCY;\r\n Req.cluster = ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING;\r\n Req.endpoint = SENSOR_ENDPOINT;\r\n Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req);\r\n}\r\n\r\n\r\n\r\n"}
340
c
// // Created by <NAME> on 2020-07-04. // #ifndef MATPLOTPLUSPLUS_SURFACE_H #define MATPLOTPLUSPLUS_SURFACE_H #include <array> #include <matplot/core/figure.h> #include <matplot/util/concepts.h> #include <matplot/util/handle_types.h> #include <optional> #include <matplot/core/axes_object.h> #include <matplot/core/line_spec.h> #include <matplot/util/common.h> namespace matplot { class axes; /// Surfaces might include data for contours but, if you only want contours, /// it's best to use the contour, contourf, fcontour functions to plot it in /// 2d class surface : public axes_object { public: explicit surface(class axes *parent); /// Grid surface surface(class axes *parent, const vector_2d &X, const vector_2d &Y, const vector_2d &Z, const vector_2d &C, const std::string &line_spec = ""); /// Parametric surface // surface(class xlim* parent, const vector_1d& x, const // vector_1d& y, const vector_1d& z, const vector_1d& c, const // std::string& line_spec = ""); /// If we receive an axes_handle, we can convert it to a raw /// pointer because there is no ownership involved here template <class... Args> surface(const axes_handle &parent, Args... args) : surface(parent.get(), args...) {} public /* mandatory virtual functions */: std::string set_variables_string() override; std::string plot_string() override; std::string legend_string(const std::string &title) override; std::string data_string() override; double xmax() override; double xmin() override; double ymax() override; double ymin() override; enum axes_object::axes_category axes_category() override; public /* getters and setters */: class surface &line_style(const std::string &line_spec); const matplot::line_spec &line_spec() const; matplot::line_spec &line_spec(); class surface &line_spec(const class line_spec &line_spec); const vector_2d &Y_data() const; class surface &Y_data(const vector_2d &Y_data); const vector_2d &X_data() const; class surface &X_data(const vector_2d &X_data); const vector_2d &Z_data() const; class surface &Z_data(const vector_2d &Z_data); size_t norm() const; class surface &norm(size_t norm); const vector_2d &x_data() const; class surface &x_data(const vector_2d &x_data); const vector_2d &y_data() const; class surface &y_data(const vector_2d &y_data); const vector_2d &z_data() const; class surface &z_data(const vector_2d &z_data); bool hidden_3d() const; class surface &hidden_3d(bool hidden_3_d); bool surface_visible() const; class surface &surface_visible(bool surface_visible); bool surface_in_2d() const; class surface &surface_in_2d(bool surface_in_2d); bool palette_map_at_bottom() const; class surface &palette_map_at_bottom(bool palette_map_at_bottom); bool palette_map_at_surface() const; class surface &palette_map_at_surface(bool palette_map_at_surface); bool palette_map_at_top() const; class surface &palette_map_at_top(bool palette_map_at_top); bool contour_base() const; class surface &contour_base(bool contour_base); bool contour_surface() const; class surface &contour_surface(bool contour_surface); size_t contour_levels() const; class surface &contour_levels(size_t contour_levels); const std::vector<double> &contour_values() const; class surface & contour_values(const std::vector<double> &contour_values); bool contour_text() const; class surface &contour_text(bool contour_text); const float font_size() const; class surface &font_size(const float &font_size); const std::string font() const; class surface &font(const std::string &font); const std::string &font_weight() const; class surface &font_weight(const std::string &font_weight); const color_array &font_color() const; class surface &font_color(const color_array &font_color); class surface &font_color(const std::string &font_color); bool depthorder() const; class surface &depthorder(bool depthorder); float face_alpha() const; class surface &face_alpha(float face_alpha); bool lighting() const; class surface &lighting(bool lighting); float primary() const; class surface &primary(float amount); float specular() const; class surface &specular(float amount); const class line_spec &contour_line_spec() const; class line_spec &contour_line_spec(); class surface & contour_line_spec(const class line_spec &contour_line_spec); bool curtain() const; class surface &curtain(bool curtain); bool waterfall() const; class surface &waterfall(bool waterfall); bool fences() const; class surface &fences(bool fences); bool ribbons() const; class surface &ribbons(bool ribbons); double ribbon_width() const; class surface &ribbon_width(double ribbon_width); bool visible() const; class surface &visible(bool visible); public /* getters and setters bypassing the line_spec */: float line_width() const; class surface &line_width(float line_width); const std::array<float, 4> &edge_color() const; template <class T> class surface &edge_color(T c) { line_spec().color(c); touch(); return *this; } inline class surface &edge_color(std::initializer_list<float> c) { line_spec().color(c); touch(); return *this; } double zmin() override; double zmax() override; protected: void maybe_update_line_spec(); std::string grid_data_string(); std::string ribbon_data_string(); size_t create_line_index(); protected: /// Data in the xlim vector_2d X_data_{}; vector_2d Y_data_{}; vector_2d Z_data_{}; vector_2d C_data_{}; /// Interpret data as a flat array of parametrics values /// If false, data needs to represent a grid /// If true, data represents a free form bool is_parametric_{false}; /// Preprocess zmin / zmax double zmin_{NaN}; double zmax_{NaN}; /// Style size_t norm_{2}; bool hidden3d_{false}; bool depthorder_{false}; float face_alpha_{.95}; class line_spec line_spec_; bool lighting_{false}; float primary_{-1.}; float specular_{-1.}; bool curtain_{false}; bool waterfall_{false}; bool fences_{false}; bool ribbons_{false}; double ribbon_width_{0.75}; // Line surface bool surface_visible_{true}; bool surface_in_2d_{false}; // Solid surface bool palette_map_at_bottom_{false}; bool palette_map_at_surface_{true}; bool palette_map_at_top_{false}; class line_spec contour_line_spec_; bool contour_base_{false}; bool contour_surface_{false}; size_t contour_levels_{9}; std::vector<double> contour_values_{}; bool contour_text_{false}; std::optional<float> font_size_{std::nullopt}; std::optional<std::string> font_{std::nullopt}; std::string font_weight_{"normal"}; color_array font_color_{0, 0, 0, 0}; /// True if visible bool visible_{true}; }; } // namespace matplot #endif // MATPLOTPLUSPLUS_SURFACE_H
40.49
191
(ERROR) "//\n// Created by <NAME> on 2020-07-04.\n//\n\n#ifndef MATPLOTPLUSPLUS_SURFACE_H\n#define MATPLOTPLUSPLUS_SURFACE_H\n\n#include <array>\n#include <matplot/core/figure.h>\n#include <matplot/util/concepts.h>\n#include <matplot/util/handle_types.h>\n#include <optional>\n\n#include <matplot/core/axes_object.h>\n#include <matplot/core/line_spec.h>\n#include <matplot/util/common.h>\n\nnamespace matplot {\n class axes;\n\n /// Surfaces might include data for contours but, if you only want contours,\n /// it's best to use the contour, contourf, fcontour functions to plot it in\n /// 2d\n class surface : public axes_object {\n public:\n explicit surface(class axes *parent);\n\n /// Grid surface\n surface(class axes *parent, const vector_2d &X, const vector_2d &Y,\n const vector_2d &Z, const vector_2d &C,\n const std::string &line_spec = "");\n\n /// Parametric surface\n // surface(class xlim* parent, const vector_1d& x, const\n // vector_1d& y, const vector_1d& z, const vector_1d& c, const\n // std::string& line_spec = "");\n\n /// If we receive an axes_handle, we can convert it to a raw\n /// pointer because there is no ownership involved here\n template <class... Args>\n surface(const axes_handle &parent, Args... args)\n : surface(parent.get(), args...) {}\n\n public /* mandatory virtual functions */:\n std::string set_variables_string() override;\n std::string plot_string() override;\n std::string legend_string(const std::string &title) override;\n std::string data_string() override;\n double xmax() override;\n double xmin() override;\n double ymax() override;\n double ymin() override;\n enum axes_object::axes_category axes_category() override;\n\n public /* getters and setters */:\n class surface &line_style(const std::string &line_spec);\n\n const matplot::line_spec &line_spec() const;\n matplot::line_spec &line_spec();\n class surface &line_spec(const class line_spec &line_spec);\n\n const vector_2d &Y_data() const;\n class surface &Y_data(const vector_2d &Y_data);\n\n const vector_2d &X_data() const;\n class surface &X_data(const vector_2d &X_data);\n\n const vector_2d &Z_data() const;\n class surface &Z_data(const vector_2d &Z_data);\n\n size_t norm() const;\n class surface &norm(size_t norm);\n\n const vector_2d &x_data() const;\n class surface &x_data(const vector_2d &x_data);\n\n const vector_2d &y_data() const;\n class surface &y_data(const vector_2d &y_data);\n\n const vector_2d &z_data() const;\n class surface &z_data(const vector_2d &z_data);\n\n bool hidden_3d() const;\n class surface &hidden_3d(bool hidden_3_d);\n\n bool surface_visible() const;\n class surface &surface_visible(bool surface_visible);\n\n bool surface_in_2d() const;\n class surface &surface_in_2d(bool surface_in_2d);\n\n bool palette_map_at_bottom() const;\n class surface &palette_map_at_bottom(bool palette_map_at_bottom);\n\n bool palette_map_at_surface() const;\n class surface &palette_map_at_surface(bool palette_map_at_surface);\n\n bool palette_map_at_top() const;\n class surface &palette_map_at_top(bool palette_map_at_top);\n\n bool contour_base() const;\n class surface &contour_base(bool contour_base);\n\n bool contour_surface() const;\n class surface &contour_surface(bool contour_surface);\n\n size_t contour_levels() const;\n class surface &contour_levels(size_t contour_levels);\n\n const std::vector<double> &contour_values() const;\n class surface &\n contour_values(const std::vector<double> &contour_values);\n\n bool contour_text() const;\n class surface &contour_text(bool contour_text);\n\n const float font_size() const;\n class surface &font_size(const float &font_size);\n\n const std::string font() const;\n class surface &font(const std::string &font);\n\n const std::string &font_weight() const;\n class surface &font_weight(const std::string &font_weight);\n\n const color_array &font_color() const;\n class surface &font_color(const color_array &font_color);\n class surface &font_color(const std::string &font_color);\n\n bool depthorder() const;\n\n class surface &depthorder(bool depthorder);\n\n float face_alpha() const;\n class surface &face_alpha(float face_alpha);\n\n bool lighting() const;\n class surface &lighting(bool lighting);\n\n float primary() const;\n class surface &primary(float amount);\n\n float specular() const;\n class surface &specular(float amount);\n\n const class line_spec &contour_line_spec() const;\n class line_spec &contour_line_spec();\n class surface &\n contour_line_spec(const class line_spec &contour_line_spec);\n\n bool curtain() const;\n class surface &curtain(bool curtain);\n\n bool waterfall() const;\n class surface &waterfall(bool waterfall);\n\n bool fences() const;\n class surface &fences(bool fences);\n\n bool ribbons() const;\n class surface &ribbons(bool ribbons);\n\n double ribbon_width() const;\n class surface &ribbon_width(double ribbon_width);\n\n bool visible() const;\n class surface &visible(bool visible);\n\n public /* getters and setters bypassing the line_spec */:\n float line_width() const;\n class surface &line_width(float line_width);\n\n const std::array<float, 4> &edge_color() const;\n\n template <class T> class surface &edge_color(T c) {\n line_spec().color(c);\n touch();\n return *this;\n }\n\n inline class surface &edge_color(std::initializer_list<float> c) {\n line_spec().color(c);\n touch();\n return *this;\n }\n\n double zmin() override;\n double zmax() override;\n\n protected:\n void maybe_update_line_spec();\n std::string grid_data_string();\n std::string ribbon_data_string();\n size_t create_line_index();\n\n protected:\n /// Data in the xlim\n vector_2d X_data_{};\n vector_2d Y_data_{};\n vector_2d Z_data_{};\n vector_2d C_data_{};\n\n /// Interpret data as a flat array of parametrics values\n /// If false, data needs to represent a grid\n /// If true, data represents a free form\n bool is_parametric_{false};\n\n /// Preprocess zmin / zmax\n double zmin_{NaN};\n double zmax_{NaN};\n\n /// Style\n size_t norm_{2};\n bool hidden3d_{false};\n bool depthorder_{false};\n float face_alpha_{.95};\n class line_spec line_spec_;\n bool lighting_{false};\n float primary_{-1.};\n float specular_{-1.};\n bool curtain_{false};\n bool waterfall_{false};\n bool fences_{false};\n bool ribbons_{false};\n double ribbon_width_{0.75};\n\n // Line surface\n bool surface_visible_{true};\n bool surface_in_2d_{false};\n\n // Solid surface\n bool palette_map_at_bottom_{false};\n bool palette_map_at_surface_{true};\n bool palette_map_at_top_{false};\n\n class line_spec contour_line_spec_;\n bool contour_base_{false};\n bool contour_surface_{false};\n size_t contour_levels_{9};\n std::vector<double> contour_values_{};\n\n bool contour_text_{false};\n std::optional<float> font_size_{std::nullopt};\n std::optional<std::string> font_{std::nullopt};\n std::string font_weight_{"normal"};\n color_array font_color_{0, 0, 0, 0};\n\n /// True if visible\n bool visible_{true};\n };\n} // namespace matplot\n\n#endif // MATPLOTPLUSPLUS_SURFACE_H\n" (comment) "//" (comment) "// Created by <NAME> on 2020-07-04." (comment) "//" (#ifndef) "#ifndef" (identifier) "MATPLOTPLUSPLUS_SURFACE_H" (preproc_def) "#define MATPLOTPLUSPLUS_SURFACE_H\n" (#define) "#define" (identifier) "MATPLOTPLUSPLUS_SURFACE_H" (preproc_include) "#include <array>\n" (#include) "#include" (system_lib_string) "<array>" (preproc_include) "#include <matplot/core/figure.h>\n" (#include) "#include" (system_lib_string) "<matplot/core/figure.h>" (preproc_include) "#include <matplot/util/concepts.h>\n" (#include) "#include" (system_lib_string) "<matplot/util/concepts.h>" (preproc_include) "#include <matplot/util/handle_types.h>\n" (#include) "#include" (system_lib_string) "<matplot/util/handle_types.h>" (preproc_include) "#include <optional>\n" (#include) "#include" (system_lib_string) "<optional>" (preproc_include) "#include <matplot/core/axes_object.h>\n" (#include) "#include" (system_lib_string) "<matplot/core/axes_object.h>" (preproc_include) "#include <matplot/core/line_spec.h>\n" (#include) "#include" (system_lib_string) "<matplot/core/line_spec.h>" (preproc_include) "#include <matplot/util/common.h>\n" (#include) "#include" (system_lib_string) "<matplot/util/common.h>" (type_identifier) "namespace" (identifier) "matplot" ({) "{" (declaration) "class axes;" (type_identifier) "class" (identifier) "axes" (;) ";" (comment) "/// Surfaces might include data for contours but, if you only want contours," (comment) "/// it's best to use the contour, contourf, fcontour functions to plot it in" (comment) "/// 2d" (type_identifier) "class" (ERROR) "surface : public" (identifier) "surface" (:) ":" (identifier) "public" (identifier) "axes_object" ({) "{" (labeled_statement) "public:\n explicit surface(class axes *parent);" (statement_identifier) "public" (:) ":" (declaration) "explicit surface(class axes *parent);" (type_identifier) "explicit" (function_declarator) "surface(class axes *parent)" (identifier) "surface" (parameter_list) "(class axes *parent)" (() "(" (parameter_declaration) "class axes *parent" (type_identifier) "class" (ERROR) "axes" (identifier) "axes" (pointer_declarator) "*parent" (*) "*" (identifier) "parent" ()) ")" (;) ";" (comment) "/// Grid surface" (declaration) "surface(class axes *parent, const vector_2d &X, const vector_2d &Y,\n const vector_2d &Z, const vector_2d &C,\n const std::string &line_spec = "");" (macro_type_specifier) "surface(class axes *" (identifier) "surface" (() "(" (ERROR) "class" (type_identifier) "class" (type_descriptor) "axes *" (type_identifier) "axes" (abstract_pointer_declarator) "*" (*) "*" ()) "" (identifier) "parent" (,) "," (identifier) "const" (ERROR) "vector_2d &X" (identifier) "vector_2d" (&) "&" (identifier) "X" (,) "," (identifier) "const" (ERROR) "vector_2d &Y" (identifier) "vector_2d" (&) "&" (identifier) "Y" (,) "," (identifier) "const" (ERROR) "vector_2d &Z" (identifier) "vector_2d" (&) "&" (identifier) "Z" (,) "," (identifier) "const" (ERROR) "vector_2d &C" (identifier) "vector_2d" (&) "&" (identifier) "C" (,) "," (ERROR) "const std::string &" (identifier) "const" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (&) "&" (init_declarator) "line_spec = """ (identifier) "line_spec" (=) "=" (string_literal) """" (") """ (") """ (ERROR) ")" ()) ")" (;) ";" (comment) "/// Parametric surface" (comment) "// surface(class xlim* parent, const vector_1d& x, const" (comment) "// vector_1d& y, const vector_1d& z, const vector_1d& c, const" (comment) "// std::string& line_spec = "");" (comment) "/// If we receive an axes_handle, we can convert it to a raw" (comment) "/// pointer because there is no ownership involved here" (ERROR) "template <class... Args>\n surface(const axes_handle &parent, Args... args)\n :" (binary_expression) "template <class... Args>\n surface(const axes_handle &parent, Args... args)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "... Args" (...) "..." (identifier) "Args" (>) ">" (call_expression) "surface(const axes_handle &parent, Args... args)" (identifier) "surface" (argument_list) "(const axes_handle &parent, Args... args)" (() "(" (ERROR) "const" (identifier) "const" (binary_expression) "axes_handle &parent" (identifier) "axes_handle" (&) "&" (identifier) "parent" (,) "," (ERROR) "Args..." (identifier) "Args" (...) "..." (identifier) "args" ()) ")" (:) ":" (expression_statement) "surface(parent.get(), args...)" (call_expression) "surface(parent.get(), args...)" (identifier) "surface" (argument_list) "(parent.get(), args...)" (() "(" (call_expression) "parent.get()" (field_expression) "parent.get" (identifier) "parent" (.) "." (field_identifier) "get" (argument_list) "()" (() "(" ()) ")" (,) "," (identifier) "args" (ERROR) "..." (...) "..." ()) ")" (;) "" (compound_statement) "{}" ({) "{" (}) "}" (labeled_statement) "public /* mandatory virtual functions */:\n std::string set_variables_string() override;" (statement_identifier) "public" (comment) "/* mandatory virtual functions */" (:) ":" (labeled_statement) "std::string set_variables_string() override;" (statement_identifier) "std" (:) ":" (ERROR) ":string set_variables_string() override" (:) ":" (type_identifier) "string" (function_declarator) "set_variables_string() override" (identifier) "set_variables_string" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (labeled_statement) "std::string plot_string() override;" (statement_identifier) "std" (:) ":" (ERROR) ":string plot_string() override" (:) ":" (type_identifier) "string" (function_declarator) "plot_string() override" (identifier) "plot_string" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (labeled_statement) "std::string legend_string(const std::string &title) override;" (statement_identifier) "std" (ERROR) "::string legend_string(const std:" (:) ":" (:) ":" (type_identifier) "string" (identifier) "legend_string" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "std" (:) ":" (:) ":" (expression_statement) "string &title) override;" (binary_expression) "string &title" (identifier) "string" (&) "&" (identifier) "title" (ERROR) ") override" ()) ")" (identifier) "override" (;) ";" (labeled_statement) "std::string data_string() override;" (statement_identifier) "std" (:) ":" (ERROR) ":string data_string() override" (:) ":" (type_identifier) "string" (function_declarator) "data_string() override" (identifier) "data_string" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (function_definition) "double xmax() override;\n double xmin() override;\n double ymax() override;\n double ymin() override;\n enum axes_object::axes_category axes_category() override;\n\n public /* getters and setters */:\n class surface &line_style(const std::string &line_spec);\n\n const matplot::line_spec &line_spec() const;\n matplot::line_spec &line_spec();\n class surface &line_spec(const class line_spec &line_spec);\n\n const vector_2d &Y_data() const;\n class surface &Y_data(const vector_2d &Y_data);\n\n const vector_2d &X_data() const;\n class surface &X_data(const vector_2d &X_data);\n\n const vector_2d &Z_data() const;\n class surface &Z_data(const vector_2d &Z_data);\n\n size_t norm() const;\n class surface &norm(size_t norm);\n\n const vector_2d &x_data() const;\n class surface &x_data(const vector_2d &x_data);\n\n const vector_2d &y_data() const;\n class surface &y_data(const vector_2d &y_data);\n\n const vector_2d &z_data() const;\n class surface &z_data(const vector_2d &z_data);\n\n bool hidden_3d() const;\n class surface &hidden_3d(bool hidden_3_d);\n\n bool surface_visible() const;\n class surface &surface_visible(bool surface_visible);\n\n bool surface_in_2d() const;\n class surface &surface_in_2d(bool surface_in_2d);\n\n bool palette_map_at_bottom() const;\n class surface &palette_map_at_bottom(bool palette_map_at_bottom);\n\n bool palette_map_at_surface() const;\n class surface &palette_map_at_surface(bool palette_map_at_surface);\n\n bool palette_map_at_top() const;\n class surface &palette_map_at_top(bool palette_map_at_top);\n\n bool contour_base() const;\n class surface &contour_base(bool contour_base);\n\n bool contour_surface() const;\n class surface &contour_surface(bool contour_surface);\n\n size_t contour_levels() const;\n class surface &contour_levels(size_t contour_levels);\n\n const std::vector<double> &contour_values() const;\n class surface &\n contour_values(const std::vector<double> &contour_values);\n\n bool contour_text() const;\n class surface &contour_text(bool contour_text);\n\n const float font_size() const;\n class surface &font_size(const float &font_size);\n\n const std::string font() const;\n class surface &font(const std::string &font);\n\n const std::string &font_weight() const;\n class surface &font_weight(const std::string &font_weight);\n\n const color_array &font_color() const;\n class surface &font_color(const color_array &font_color);\n class surface &font_color(const std::string &font_color);\n\n bool depthorder() const;\n\n class surface &depthorder(bool depthorder);\n\n float face_alpha() const;\n class surface &face_alpha(float face_alpha);\n\n bool lighting() const;\n class surface &lighting(bool lighting);\n\n float primary() const;\n class surface &primary(float amount);\n\n float specular() const;\n class surface &specular(float amount);\n\n const class line_spec &contour_line_spec() const;\n class line_spec &contour_line_spec();\n class surface &\n contour_line_spec(const class line_spec &contour_line_spec);\n\n bool curtain() const;\n class surface &curtain(bool curtain);\n\n bool waterfall() const;\n class surface &waterfall(bool waterfall);\n\n bool fences() const;\n class surface &fences(bool fences);\n\n bool ribbons() const;\n class surface &ribbons(bool ribbons);\n\n double ribbon_width() const;\n class surface &ribbon_width(double ribbon_width);\n\n bool visible() const;\n class surface &visible(bool visible);\n\n public /* getters and setters bypassing the line_spec */:\n float line_width() const;\n class surface &line_width(float line_width);\n\n const std::array<float, 4> &edge_color() const;\n\n template <class T> class surface &edge_color(T c) {\n line_spec().color(c);\n touch();\n return *this;\n }\n\n inline class surface &edge_color(std::initializer_list<float> c) {\n line_spec().color(c);\n touch();\n return *this;\n }" (primitive_type) "double" (function_declarator) "xmax()" (identifier) "xmax" (parameter_list) "()" (() "(" ()) ")" (declaration) "override;" (type_identifier) "override" (identifier) "" (;) ";" (ERROR) "double xmin() override;\n double ymax() override;\n double ymin() override;" (primitive_type) "double" (function_declarator) "xmin() override" (identifier) "xmin" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (primitive_type) "double" (function_declarator) "ymax() override" (identifier) "ymax" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (primitive_type) "double" (function_declarator) "ymin() override" (identifier) "ymin" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (declaration) "enum axes_object::axes_category axes_category() override;\n\n public /* getters and setters */:\n class surface &line_style(const std::string &line_spec);" (enum_specifier) "enum axes_object" (enum) "enum" (type_identifier) "axes_object" (ERROR) "::axes_category axes_category() override;\n\n public /* getters and setters */:\n class surface &" (:) ":" (:) ":" (identifier) "axes_category" (function_declarator) "axes_category() override" (identifier) "axes_category" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (identifier) "public" (comment) "/* getters and setters */" (:) ":" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "line_style(const std::string &line_spec)" (identifier) "line_style" (parameter_list) "(const std::string &line_spec)" (() "(" (parameter_declaration) "const std::string &line_spec" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "line_spec" ()) ")" (;) ";" (declaration) "const matplot::line_spec &line_spec() const;\n matplot::line_spec &line_spec();" (type_qualifier) "const" (const) "const" (type_identifier) "matplot" (ERROR) "::line_spec &line_spec() const;\n matplot::line_spec &" (:) ":" (:) ":" (identifier) "line_spec" (&) "&" (function_declarator) "line_spec() const" (identifier) "line_spec" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "matplot" (:) ":" (:) ":" (identifier) "line_spec" (&) "&" (function_declarator) "line_spec()" (identifier) "line_spec" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "class surface &line_spec(const class line_spec &line_spec);" (type_identifier) "class" (ERROR) "surface &" (identifier) "surface" (&) "&" (function_declarator) "line_spec(const class line_spec &line_spec)" (identifier) "line_spec" (parameter_list) "(const class line_spec &line_spec)" (() "(" (parameter_declaration) "const class line_spec" (type_qualifier) "const" (const) "const" (type_identifier) "class" (identifier) "line_spec" (ERROR) "&line_spec" (&) "&" (identifier) "line_spec" ()) ")" (;) ";" (declaration) "const vector_2d &Y_data() const;\n class surface &Y_data(const vector_2d &Y_data);" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&Y_data() const;\n class surface &" (&) "&" (function_declarator) "Y_data() const" (identifier) "Y_data" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "Y_data(const vector_2d &Y_data)" (identifier) "Y_data" (parameter_list) "(const vector_2d &Y_data)" (() "(" (parameter_declaration) "const vector_2d &Y_data" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&" (&) "&" (identifier) "Y_data" ()) ")" (;) ";" (declaration) "const vector_2d &X_data() const;\n class surface &X_data(const vector_2d &X_data);" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&X_data() const;\n class surface &" (&) "&" (function_declarator) "X_data() const" (identifier) "X_data" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "X_data(const vector_2d &X_data)" (identifier) "X_data" (parameter_list) "(const vector_2d &X_data)" (() "(" (parameter_declaration) "const vector_2d &X_data" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&" (&) "&" (identifier) "X_data" ()) ")" (;) ";" (declaration) "const vector_2d &Z_data() const;\n class surface &Z_data(const vector_2d &Z_data);" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&Z_data() const;\n class surface &" (&) "&" (function_declarator) "Z_data() const" (identifier) "Z_data" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "Z_data(const vector_2d &Z_data)" (identifier) "Z_data" (parameter_list) "(const vector_2d &Z_data)" (() "(" (parameter_declaration) "const vector_2d &Z_data" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&" (&) "&" (identifier) "Z_data" ()) ")" (;) ";" (declaration) "size_t norm() const;\n class surface &norm(size_t norm);" (primitive_type) "size_t" (ERROR) "norm() const;\n class surface &" (function_declarator) "norm() const" (identifier) "norm" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "norm(size_t norm)" (identifier) "norm" (parameter_list) "(size_t norm)" (() "(" (parameter_declaration) "size_t norm" (primitive_type) "size_t" (identifier) "norm" ()) ")" (;) ";" (declaration) "const vector_2d &x_data() const;\n class surface &x_data(const vector_2d &x_data);" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&x_data() const;\n class surface &" (&) "&" (function_declarator) "x_data() const" (identifier) "x_data" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "x_data(const vector_2d &x_data)" (identifier) "x_data" (parameter_list) "(const vector_2d &x_data)" (() "(" (parameter_declaration) "const vector_2d &x_data" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&" (&) "&" (identifier) "x_data" ()) ")" (;) ";" (declaration) "const vector_2d &y_data() const;\n class surface &y_data(const vector_2d &y_data);" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&y_data() const;\n class surface &" (&) "&" (function_declarator) "y_data() const" (identifier) "y_data" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "y_data(const vector_2d &y_data)" (identifier) "y_data" (parameter_list) "(const vector_2d &y_data)" (() "(" (parameter_declaration) "const vector_2d &y_data" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&" (&) "&" (identifier) "y_data" ()) ")" (;) ";" (declaration) "const vector_2d &z_data() const;\n class surface &z_data(const vector_2d &z_data);" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&z_data() const;\n class surface &" (&) "&" (function_declarator) "z_data() const" (identifier) "z_data" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "z_data(const vector_2d &z_data)" (identifier) "z_data" (parameter_list) "(const vector_2d &z_data)" (() "(" (parameter_declaration) "const vector_2d &z_data" (type_qualifier) "const" (const) "const" (type_identifier) "vector_2d" (ERROR) "&" (&) "&" (identifier) "z_data" ()) ")" (;) ";" (declaration) "bool hidden_3d() const;\n class surface &hidden_3d(bool hidden_3_d);" (primitive_type) "bool" (ERROR) "hidden_3d() const;\n class surface &" (function_declarator) "hidden_3d() const" (identifier) "hidden_3d" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "hidden_3d(bool hidden_3_d)" (identifier) "hidden_3d" (parameter_list) "(bool hidden_3_d)" (() "(" (parameter_declaration) "bool hidden_3_d" (primitive_type) "bool" (identifier) "hidden_3_d" ()) ")" (;) ";" (declaration) "bool surface_visible() const;\n class surface &surface_visible(bool surface_visible);" (primitive_type) "bool" (ERROR) "surface_visible() const;\n class surface &" (function_declarator) "surface_visible() const" (identifier) "surface_visible" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "surface_visible(bool surface_visible)" (identifier) "surface_visible" (parameter_list) "(bool surface_visible)" (() "(" (parameter_declaration) "bool surface_visible" (primitive_type) "bool" (identifier) "surface_visible" ()) ")" (;) ";" (declaration) "bool surface_in_2d() const;\n class surface &surface_in_2d(bool surface_in_2d);" (primitive_type) "bool" (ERROR) "surface_in_2d() const;\n class surface &" (function_declarator) "surface_in_2d() const" (identifier) "surface_in_2d" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "surface_in_2d(bool surface_in_2d)" (identifier) "surface_in_2d" (parameter_list) "(bool surface_in_2d)" (() "(" (parameter_declaration) "bool surface_in_2d" (primitive_type) "bool" (identifier) "surface_in_2d" ()) ")" (;) ";" (declaration) "bool palette_map_at_bottom() const;\n class surface &palette_map_at_bottom(bool palette_map_at_bottom);" (primitive_type) "bool" (ERROR) "palette_map_at_bottom() const;\n class surface &" (function_declarator) "palette_map_at_bottom() const" (identifier) "palette_map_at_bottom" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "palette_map_at_bottom(bool palette_map_at_bottom)" (identifier) "palette_map_at_bottom" (parameter_list) "(bool palette_map_at_bottom)" (() "(" (parameter_declaration) "bool palette_map_at_bottom" (primitive_type) "bool" (identifier) "palette_map_at_bottom" ()) ")" (;) ";" (declaration) "bool palette_map_at_surface() const;\n class surface &palette_map_at_surface(bool palette_map_at_surface);" (primitive_type) "bool" (ERROR) "palette_map_at_surface() const;\n class surface &" (function_declarator) "palette_map_at_surface() const" (identifier) "palette_map_at_surface" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "palette_map_at_surface(bool palette_map_at_surface)" (identifier) "palette_map_at_surface" (parameter_list) "(bool palette_map_at_surface)" (() "(" (parameter_declaration) "bool palette_map_at_surface" (primitive_type) "bool" (identifier) "palette_map_at_surface" ()) ")" (;) ";" (declaration) "bool palette_map_at_top() const;\n class surface &palette_map_at_top(bool palette_map_at_top);" (primitive_type) "bool" (ERROR) "palette_map_at_top() const;\n class surface &" (function_declarator) "palette_map_at_top() const" (identifier) "palette_map_at_top" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "palette_map_at_top(bool palette_map_at_top)" (identifier) "palette_map_at_top" (parameter_list) "(bool palette_map_at_top)" (() "(" (parameter_declaration) "bool palette_map_at_top" (primitive_type) "bool" (identifier) "palette_map_at_top" ()) ")" (;) ";" (declaration) "bool contour_base() const;\n class surface &contour_base(bool contour_base);" (primitive_type) "bool" (ERROR) "contour_base() const;\n class surface &" (function_declarator) "contour_base() const" (identifier) "contour_base" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "contour_base(bool contour_base)" (identifier) "contour_base" (parameter_list) "(bool contour_base)" (() "(" (parameter_declaration) "bool contour_base" (primitive_type) "bool" (identifier) "contour_base" ()) ")" (;) ";" (declaration) "bool contour_surface() const;\n class surface &contour_surface(bool contour_surface);" (primitive_type) "bool" (ERROR) "contour_surface() const;\n class surface &" (function_declarator) "contour_surface() const" (identifier) "contour_surface" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "contour_surface(bool contour_surface)" (identifier) "contour_surface" (parameter_list) "(bool contour_surface)" (() "(" (parameter_declaration) "bool contour_surface" (primitive_type) "bool" (identifier) "contour_surface" ()) ")" (;) ";" (declaration) "size_t contour_levels() const;\n class surface &contour_levels(size_t contour_levels);" (primitive_type) "size_t" (ERROR) "contour_levels() const;\n class surface &" (function_declarator) "contour_levels() const" (identifier) "contour_levels" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "contour_levels(size_t contour_levels)" (identifier) "contour_levels" (parameter_list) "(size_t contour_levels)" (() "(" (parameter_declaration) "size_t contour_levels" (primitive_type) "size_t" (identifier) "contour_levels" ()) ")" (;) ";" (declaration) "const std::vector<double> &contour_values() const;\n class surface &\n contour_values(const std::vector<double> &contour_values);" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::vector<double> &contour_values() const;\n class surface &" (:) ":" (:) ":" (identifier) "vector" (<) "<" (primitive_type) "double" (>) ">" (&) "&" (function_declarator) "contour_values() const" (identifier) "contour_values" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "contour_values(const std::vector<double> &contour_values)" (identifier) "contour_values" (parameter_list) "(const std::vector<double> &contour_values)" (() "(" (parameter_declaration) "const std::vector<double> &contour_values" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::vector<double> &" (:) ":" (:) ":" (identifier) "vector" (<) "<" (primitive_type) "double" (>) ">" (&) "&" (identifier) "contour_values" ()) ")" (;) ";" (declaration) "bool contour_text() const;\n class surface &contour_text(bool contour_text);" (primitive_type) "bool" (ERROR) "contour_text() const;\n class surface &" (function_declarator) "contour_text() const" (identifier) "contour_text" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "contour_text(bool contour_text)" (identifier) "contour_text" (parameter_list) "(bool contour_text)" (() "(" (parameter_declaration) "bool contour_text" (primitive_type) "bool" (identifier) "contour_text" ()) ")" (;) ";" (declaration) "const float font_size() const;\n class surface &font_size(const float &font_size);" (type_qualifier) "const" (const) "const" (primitive_type) "float" (ERROR) "font_size() const;\n class surface &" (function_declarator) "font_size() const" (identifier) "font_size" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "font_size(const float &font_size)" (identifier) "font_size" (parameter_list) "(const float &font_size)" (() "(" (parameter_declaration) "const float &font_size" (type_qualifier) "const" (const) "const" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "font_size" ()) ")" (;) ";" (declaration) "const std::string font() const;\n class surface &font(const std::string &font);" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string font() const;\n class surface &" (:) ":" (:) ":" (identifier) "string" (function_declarator) "font() const" (identifier) "font" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "font(const std::string &font)" (identifier) "font" (parameter_list) "(const std::string &font)" (() "(" (parameter_declaration) "const std::string &font" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "font" ()) ")" (;) ";" (declaration) "const std::string &font_weight() const;\n class surface &font_weight(const std::string &font_weight);" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &font_weight() const;\n class surface &" (:) ":" (:) ":" (identifier) "string" (&) "&" (function_declarator) "font_weight() const" (identifier) "font_weight" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "font_weight(const std::string &font_weight)" (identifier) "font_weight" (parameter_list) "(const std::string &font_weight)" (() "(" (parameter_declaration) "const std::string &font_weight" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "font_weight" ()) ")" (;) ";" (declaration) "const color_array &font_color() const;\n class surface &font_color(const color_array &font_color);" (type_qualifier) "const" (const) "const" (type_identifier) "color_array" (ERROR) "&font_color() const;\n class surface &" (&) "&" (function_declarator) "font_color() const" (identifier) "font_color" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "font_color(const color_array &font_color)" (identifier) "font_color" (parameter_list) "(const color_array &font_color)" (() "(" (parameter_declaration) "const color_array &font_color" (type_qualifier) "const" (const) "const" (type_identifier) "color_array" (ERROR) "&" (&) "&" (identifier) "font_color" ()) ")" (;) ";" (declaration) "class surface &font_color(const std::string &font_color);" (type_identifier) "class" (ERROR) "surface &" (identifier) "surface" (&) "&" (function_declarator) "font_color(const std::string &font_color)" (identifier) "font_color" (parameter_list) "(const std::string &font_color)" (() "(" (parameter_declaration) "const std::string &font_color" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "font_color" ()) ")" (;) ";" (declaration) "bool depthorder() const;\n\n class surface &depthorder(bool depthorder);" (primitive_type) "bool" (ERROR) "depthorder() const;\n\n class surface &" (function_declarator) "depthorder() const" (identifier) "depthorder" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "depthorder(bool depthorder)" (identifier) "depthorder" (parameter_list) "(bool depthorder)" (() "(" (parameter_declaration) "bool depthorder" (primitive_type) "bool" (identifier) "depthorder" ()) ")" (;) ";" (declaration) "float face_alpha() const;\n class surface &face_alpha(float face_alpha);" (primitive_type) "float" (ERROR) "face_alpha() const;\n class surface &" (function_declarator) "face_alpha() const" (identifier) "face_alpha" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "face_alpha(float face_alpha)" (identifier) "face_alpha" (parameter_list) "(float face_alpha)" (() "(" (parameter_declaration) "float face_alpha" (primitive_type) "float" (identifier) "face_alpha" ()) ")" (;) ";" (declaration) "bool lighting() const;\n class surface &lighting(bool lighting);" (primitive_type) "bool" (ERROR) "lighting() const;\n class surface &" (function_declarator) "lighting() const" (identifier) "lighting" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "lighting(bool lighting)" (identifier) "lighting" (parameter_list) "(bool lighting)" (() "(" (parameter_declaration) "bool lighting" (primitive_type) "bool" (identifier) "lighting" ()) ")" (;) ";" (declaration) "float primary() const;\n class surface &primary(float amount);" (primitive_type) "float" (ERROR) "primary() const;\n class surface &" (function_declarator) "primary() const" (identifier) "primary" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "primary(float amount)" (identifier) "primary" (parameter_list) "(float amount)" (() "(" (parameter_declaration) "float amount" (primitive_type) "float" (identifier) "amount" ()) ")" (;) ";" (declaration) "float specular() const;\n class surface &specular(float amount);" (primitive_type) "float" (ERROR) "specular() const;\n class surface &" (function_declarator) "specular() const" (identifier) "specular" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "specular(float amount)" (identifier) "specular" (parameter_list) "(float amount)" (() "(" (parameter_declaration) "float amount" (primitive_type) "float" (identifier) "amount" ()) ")" (;) ";" (declaration) "const class line_spec &contour_line_spec() const;\n class line_spec &contour_line_spec();" (type_qualifier) "const" (const) "const" (type_identifier) "class" (ERROR) "line_spec &contour_line_spec() const;\n class line_spec &" (identifier) "line_spec" (&) "&" (function_declarator) "contour_line_spec() const" (identifier) "contour_line_spec" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "line_spec" (&) "&" (function_declarator) "contour_line_spec()" (identifier) "contour_line_spec" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "class surface &\n contour_line_spec(const class line_spec &contour_line_spec);" (type_identifier) "class" (ERROR) "surface &" (identifier) "surface" (&) "&" (function_declarator) "contour_line_spec(const class line_spec &contour_line_spec)" (identifier) "contour_line_spec" (parameter_list) "(const class line_spec &contour_line_spec)" (() "(" (parameter_declaration) "const class line_spec &contour_line_spec" (type_qualifier) "const" (const) "const" (type_identifier) "class" (ERROR) "line_spec &" (identifier) "line_spec" (&) "&" (identifier) "contour_line_spec" ()) ")" (;) ";" (declaration) "bool curtain() const;\n class surface &curtain(bool curtain);" (primitive_type) "bool" (ERROR) "curtain() const;\n class surface &" (function_declarator) "curtain() const" (identifier) "curtain" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "curtain(bool curtain)" (identifier) "curtain" (parameter_list) "(bool curtain)" (() "(" (parameter_declaration) "bool curtain" (primitive_type) "bool" (identifier) "curtain" ()) ")" (;) ";" (declaration) "bool waterfall() const;\n class surface &waterfall(bool waterfall);" (primitive_type) "bool" (ERROR) "waterfall() const;\n class surface &" (function_declarator) "waterfall() const" (identifier) "waterfall" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "waterfall(bool waterfall)" (identifier) "waterfall" (parameter_list) "(bool waterfall)" (() "(" (parameter_declaration) "bool waterfall" (primitive_type) "bool" (identifier) "waterfall" ()) ")" (;) ";" (declaration) "bool fences() const;\n class surface &fences(bool fences);" (primitive_type) "bool" (ERROR) "fences() const;\n class surface &" (function_declarator) "fences() const" (identifier) "fences" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "fences(bool fences)" (identifier) "fences" (parameter_list) "(bool fences)" (() "(" (parameter_declaration) "bool fences" (primitive_type) "bool" (identifier) "fences" ()) ")" (;) ";" (declaration) "bool ribbons() const;\n class surface &ribbons(bool ribbons);" (primitive_type) "bool" (ERROR) "ribbons() const;\n class surface &" (function_declarator) "ribbons() const" (identifier) "ribbons" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "ribbons(bool ribbons)" (identifier) "ribbons" (parameter_list) "(bool ribbons)" (() "(" (parameter_declaration) "bool ribbons" (primitive_type) "bool" (identifier) "ribbons" ()) ")" (;) ";" (declaration) "double ribbon_width() const;\n class surface &ribbon_width(double ribbon_width);" (primitive_type) "double" (ERROR) "ribbon_width() const;\n class surface &" (function_declarator) "ribbon_width() const" (identifier) "ribbon_width" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "ribbon_width(double ribbon_width)" (identifier) "ribbon_width" (parameter_list) "(double ribbon_width)" (() "(" (parameter_declaration) "double ribbon_width" (primitive_type) "double" (identifier) "ribbon_width" ()) ")" (;) ";" (declaration) "bool visible() const;\n class surface &visible(bool visible);" (primitive_type) "bool" (ERROR) "visible() const;\n class surface &" (function_declarator) "visible() const" (identifier) "visible" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "visible(bool visible)" (identifier) "visible" (parameter_list) "(bool visible)" (() "(" (parameter_declaration) "bool visible" (primitive_type) "bool" (identifier) "visible" ()) ")" (;) ";" (declaration) "public /* getters and setters bypassing the line_spec */:\n float line_width() const;\n class surface &line_width(float line_width);" (type_identifier) "public" (comment) "/* getters and setters bypassing the line_spec */" (ERROR) ":\n float line_width() const;\n class surface &" (:) ":" (primitive_type) "float" (function_declarator) "line_width() const" (identifier) "line_width" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "line_width(float line_width)" (identifier) "line_width" (parameter_list) "(float line_width)" (() "(" (parameter_declaration) "float line_width" (primitive_type) "float" (identifier) "line_width" ()) ")" (;) ";" (declaration) "const std::array<float, 4> &edge_color() const;\n\n template <class T> class surface &edge_color(T c) {\n line_spec().color(c);\n touch();" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::" (:) ":" (:) ":" (identifier) "array" (ERROR) "<float" (<) "<" (primitive_type) "float" (,) "," (ERROR) "4> &edge_color() const;\n\n template <class T> class surface &edge_color(T c) {\n line_spec().color(c);" (number_literal) "4" (>) ">" (&) "&" (function_declarator) "edge_color() const" (identifier) "edge_color" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "template" (<) "<" (identifier) "class" (identifier) "T" (>) ">" (identifier) "class" (identifier) "surface" (&) "&" (function_declarator) "edge_color(T c)" (identifier) "edge_color" (parameter_list) "(T c)" (() "(" (parameter_declaration) "T c" (type_identifier) "T" (identifier) "c" ()) ")" ({) "{" (function_declarator) "line_spec().color(c)" (identifier) "line_spec" (parameter_list) "()" (() "(" ()) ")" (ERROR) "." (.) "." (call_expression) "color(c)" (identifier) "color" (argument_list) "(c)" (() "(" (identifier) "c" ()) ")" (;) ";" (function_declarator) "touch()" (identifier) "touch" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "return *this;" (type_identifier) "return" (pointer_declarator) "*this" (*) "*" (identifier) "this" (;) ";" (ERROR) "}\n\n inline class surface &edge_color(std::initializer_list<float> c)" (}) "}" (storage_class_specifier) "inline" (inline) "inline" (type_identifier) "class" (ERROR) "surface &" (identifier) "surface" (&) "&" (function_declarator) "edge_color(std::initializer_list<float> c)" (identifier) "edge_color" (parameter_list) "(std::initializer_list<float> c)" (() "(" (parameter_declaration) "std::initializer_list<float> c" (type_identifier) "std" (ERROR) "::initializer_list<float>" (:) ":" (:) ":" (identifier) "initializer_list" (<) "<" (primitive_type) "float" (>) ">" (identifier) "c" ()) ")" (compound_statement) "{\n line_spec().color(c);\n touch();\n return *this;\n }" ({) "{" (expression_statement) "line_spec().color(c);" (call_expression) "line_spec().color(c)" (field_expression) "line_spec().color" (call_expression) "line_spec()" (identifier) "line_spec" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "color" (argument_list) "(c)" (() "(" (identifier) "c" ()) ")" (;) ";" (expression_statement) "touch();" (call_expression) "touch()" (identifier) "touch" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return *this;" (return) "return" (pointer_expression) "*this" (*) "*" (identifier) "this" (;) ";" (}) "}" (ERROR) "double zmin() override;\n double zmax() override" (primitive_type) "double" (function_declarator) "zmin()" (identifier) "zmin" (parameter_list) "()" (() "(" ()) ")" (declaration) "override;" (type_identifier) "override" (identifier) "" (;) ";" (primitive_type) "double" (function_declarator) "zmax() override" (identifier) "zmax" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (labeled_statement) "protected:\n void maybe_update_line_spec();" (statement_identifier) "protected" (:) ":" (declaration) "void maybe_update_line_spec();" (primitive_type) "void" (function_declarator) "maybe_update_line_spec()" (identifier) "maybe_update_line_spec" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "std::string grid_data_string();" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string grid_data_string();" (type_identifier) "string" (function_declarator) "grid_data_string()" (identifier) "grid_data_string" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "std::string ribbon_data_string();" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string ribbon_data_string();" (type_identifier) "string" (function_declarator) "ribbon_data_string()" (identifier) "ribbon_data_string" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "size_t create_line_index();" (primitive_type) "size_t" (function_declarator) "create_line_index()" (identifier) "create_line_index" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "protected:\n /// Data in the xlim\n vector_2d X_data_{}" (statement_identifier) "protected" (:) ":" (comment) "/// Data in the xlim" (ERROR) "vector_2d X_data_" (type_identifier) "vector_2d" (identifier) "X_data_" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "vector_2d Y_data_{}" (type_identifier) "vector_2d" (identifier) "Y_data_" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "vector_2d Z_data_{}" (type_identifier) "vector_2d" (identifier) "Z_data_" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "vector_2d C_data_{}" (type_identifier) "vector_2d" (identifier) "C_data_" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (comment) "/// Interpret data as a flat array of parametrics values" (comment) "/// If false, data needs to represent a grid" (comment) "/// If true, data represents a free form" (primitive_type) "bool" (identifier) "is_parametric_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (comment) "/// Preprocess zmin / zmax" (primitive_type) "double" (identifier) "zmin_" ({) "{" (expression_statement) "NaN};" (identifier) "NaN" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "double" (identifier) "zmax_" ({) "{" (expression_statement) "NaN};" (identifier) "NaN" (ERROR) "}" (}) "}" (;) ";" (comment) "/// Style" (primitive_type) "size_t" (identifier) "norm_" ({) "{" (expression_statement) "2};" (number_literal) "2" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "bool" (identifier) "hidden3d_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "bool" (identifier) "depthorder_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "float" (identifier) "face_alpha_" ({) "{" (expression_statement) ".95};" (number_literal) ".95" (ERROR) "}" (}) "}" (;) ";" (declaration) "class line_spec line_spec_;" (type_identifier) "class" (ERROR) "line_spec" (identifier) "line_spec" (identifier) "line_spec_" (;) ";" (primitive_type) "bool" (identifier) "lighting_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "float" (identifier) "primary_" ({) "{" (expression_statement) "-1.};" (number_literal) "-1." (ERROR) "}" (}) "}" (;) ";" (primitive_type) "float" (identifier) "specular_" ({) "{" (expression_statement) "-1.};" (number_literal) "-1." (ERROR) "}" (}) "}" (;) ";" (primitive_type) "bool" (identifier) "curtain_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "bool" (identifier) "waterfall_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "bool" (identifier) "fences_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "bool" (identifier) "ribbons_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "double" (identifier) "ribbon_width_" ({) "{" (expression_statement) "0.75};" (number_literal) "0.75" (ERROR) "}" (}) "}" (;) ";" (comment) "// Line surface" (primitive_type) "bool" (identifier) "surface_visible_" ({) "{" (expression_statement) "true};" (true) "true" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "bool" (identifier) "surface_in_2d_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (comment) "// Solid surface" (primitive_type) "bool" (identifier) "palette_map_at_bottom_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "bool" (identifier) "palette_map_at_surface_" ({) "{" (expression_statement) "true};" (true) "true" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "bool" (identifier) "palette_map_at_top_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (declaration) "class line_spec contour_line_spec_;" (type_identifier) "class" (ERROR) "line_spec" (identifier) "line_spec" (identifier) "contour_line_spec_" (;) ";" (primitive_type) "bool" (identifier) "contour_base_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (primitive_type) "bool" (identifier) "contour_surface_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (function_definition) "size_t contour_levels_{9}" (primitive_type) "size_t" (identifier) "contour_levels_" (compound_statement) "{9}" ({) "{" (ERROR) "9" (number_literal) "9" (}) "}" (expression_statement) ";" (;) ";" (labeled_statement) "std::vector<double> contour_values_{}" (statement_identifier) "std" (:) ":" (ERROR) ":vector<double> contour_values_" (:) ":" (binary_expression) "vector<double> contour_values_" (binary_expression) "vector<double" (identifier) "vector" (<) "<" (identifier) "double" (>) ">" (identifier) "contour_values_" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (primitive_type) "bool" (identifier) "contour_text_" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (identifier) "std" (:) ":" (ERROR) ":optional<float> font_size_" (:) ":" (binary_expression) "optional<float> font_size_" (binary_expression) "optional<float" (identifier) "optional" (<) "<" (identifier) "float" (>) ">" (identifier) "font_size_" ({) "{" (labeled_statement) "std::nullopt};" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "nullopt};" (identifier) "nullopt" (ERROR) "}" (}) "}" (;) ";" (labeled_statement) "std::optional<std::string> font_" (statement_identifier) "std" (ERROR) "::optional<std:" (:) ":" (:) ":" (binary_expression) "optional<std" (identifier) "optional" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "string> font_" (binary_expression) "string> font_" (identifier) "string" (>) ">" (identifier) "font_" (;) "" ({) "{" (labeled_statement) "std::nullopt};" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "nullopt};" (identifier) "nullopt" (ERROR) "}" (}) "}" (;) ";" (identifier) "std" (:) ":" (ERROR) ":string font_weight_" (:) ":" (type_identifier) "string" (identifier) "font_weight_" ({) "{" (expression_statement) ""normal"};" (string_literal) ""normal"" (") """ (string_content) "normal" (") """ (ERROR) "}" (}) "}" (;) ";" (function_definition) "color_array font_color_{0, 0, 0, 0};\n\n /// True if visible\n bool visible_{true};\n };\n}" (type_identifier) "color_array" (identifier) "font_color_" (compound_statement) "{0, 0, 0, 0};\n\n /// True if visible\n bool visible_{true};\n };\n}" ({) "{" (expression_statement) "0, 0, 0, 0};" (comma_expression) "0, 0, 0, 0" (number_literal) "0" (,) "," (comma_expression) "0, 0, 0" (number_literal) "0" (,) "," (comma_expression) "0, 0" (number_literal) "0" (,) "," (number_literal) "0" (ERROR) "}" (}) "}" (;) ";" (comment) "/// True if visible" (function_definition) "bool visible_{true};\n }" (primitive_type) "bool" (identifier) "visible_" (compound_statement) "{true};\n }" ({) "{" (expression_statement) "true};" (true) "true" (ERROR) "}" (}) "}" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace matplot" (preproc_call) "#endif // MATPLOTPLUSPLUS_SURFACE_H\n" (preproc_directive) "#endif" (comment) "// MATPLOTPLUSPLUS_SURFACE_H"
1,831
124
{"language": "c", "success": true, "metadata": {"lines": 191, "avg_line_length": 40.49, "nodes": 949, "errors": 0, "source_hash": "44e6a4f716113a2bbc8ade7739eb1e2f2cdc18f1bca0adcca659cf02eb0ca857", "categorized_nodes": 620}, "ast": {"root": "ERROR", "nodes": [{"id": 0, "type": "ERROR", "text": "//\n// Created by <NAME> on 2020-07-04.\n//\n\n#ifndef MATPLOTPLUSPLUS_SURFACE_H\n#define MATPLOTPLUSPLUS_SURFACE_H\n\n#include <array>\n#include <matplot/core/figure.h>\n#include <matplot/util/concepts.h>\n#include <matplot/util/handle_types.h>\n#include <optional>\n\n#include <matplot/core/axes_object.h>\n#include <matplot/core/line_spec.h>\n#include <matplot/util/common.h>\n\nnamespace matplot {\n class axes;\n\n /// Surfaces might include data for contours but, if you only want contours,\n /// it's best to use the contour, contourf, fcontour functions to plot it in\n /// 2d\n class surface : public axes_object {\n public:\n explicit surface(class axes *parent);\n\n /// Grid surface\n surface(class axes *parent, const vector_2d &X, const vector_2d &Y,\n const vector_2d &Z, const vector_2d &C,\n const std::string &line_spec = \"\");\n\n /// Parametric surface\n // surface(class xlim* parent, const vector_1d& x, const\n // vector_1d& y, const vector_1d& z, const vector_1d& c, const\n // std::string& line_spec = \"\");\n\n /// If we receive an axes_handle, we can convert it to a raw\n /// pointer because there is no ownership involved here\n template <class... Args>\n surface(const axes_handle &parent, Args... args)\n : surface(parent.get(), args...) {}\n\n public /* mandatory virtual functions */:\n std::string set_variables_string() override;\n std::string plot_string() override;\n std::string legend_string(const std::string &title) override;\n std::string data_string() override;\n double xmax() override;\n double xmin() override;\n double ymax() override;\n double ymin() override;\n enum axes_object::axes_category axes_category() override;\n\n public /* getters and setters */:\n class surface &line_style(const std::string &line_spec);\n\n const matplot::line_spec &line_spec() const;\n matplot::line_spec &line_spec();\n class surface &line_spec(const class line_spec &line_spec);\n\n const vector_2d &Y_data() const;\n class surface &Y_data(const vector_2d &Y_data);\n\n const vector_2d &X_data() const;\n class surface &X_data(const vector_2d &X_data);\n\n const vector_2d &Z_data() const;\n class surface &Z_data(const vector_2d &Z_data);\n\n size_t norm() const;\n class surface &norm(size_t norm);\n\n const vector_2d &x_data() const;\n class surface &x_data(const vector_2d &x_data);\n\n const vector_2d &y_data() const;\n class surface &y_data(const vector_2d &y_data);\n\n const vector_2d &z_data() const;\n class surface &z_data(const vector_2d &z_data);\n\n bool hidden_3d() const;\n class surface &hidden_3d(bool hidden_3_d);\n\n bool surface_visible() const;\n class surface &surface_visible(bool surface_visible);\n\n bool surface_in_2d() const;\n class surface &surface_in_2d(bool surface_in_2d);\n\n bool palette_map_at_bottom() const;\n class surface &palette_map_at_bottom(bool palette_map_at_bottom);\n\n bool palette_map_at_surface() const;\n class surface &palette_map_at_surface(bool palette_map_at_surface);\n\n bool palette_map_at_top() const;\n class surface &palette_map_at_top(bool palette_map_at_top);\n\n bool contour_base() const;\n class surface &contour_base(bool contour_base);\n\n bool contour_surface() const;\n class surface &contour_surface(bool contour_surface);\n\n size_t contour_levels() const;\n class surface &contour_levels(size_t contour_levels);\n\n const std::vector<double> &contour_values() const;\n class surface &\n contour_values(const std::vector<double> &contour_values);\n\n bool contour_text() const;\n class surface &contour_text(bool contour_text);\n\n const float font_size() const;\n class surface &font_size(const float &font_size);\n\n const std::string font() const;\n class surface &font(const std::string &font);\n\n const std::string &font_weight() const;\n class surface &font_weight(const std::string &font_weight);\n\n const color_array &font_color() const;\n class surface &font_color(const color_array &font_color);\n class surface &font_color(const std::string &font_color);\n\n bool depthorder() const;\n\n class surface &depthorder(bool depthorder);\n\n float face_alpha() const;\n class surface &face_alpha(float face_alpha);\n\n bool lighting() const;\n class surface &lighting(bool lighting);\n\n float primary() const;\n class surface &primary(float amount);\n\n float specular() const;\n class surface &specular(float amount);\n\n const class line_spec &contour_line_spec() const;\n class line_spec &contour_line_spec();\n class surface &\n contour_line_spec(const class line_spec &contour_line_spec);\n\n bool curtain() const;\n class surface &curtain(bool curtain);\n\n bool waterfall() const;\n class surface &waterfall(bool waterfall);\n\n bool fences() const;\n class surface &fences(bool fences);\n\n bool ribbons() const;\n class surface &ribbons(bool ribbons);\n\n double ribbon_width() const;\n class surface &ribbon_width(double ribbon_width);\n\n bool visible() const;\n class surface &visible(bool visible);\n\n public /* getters and setters bypassing the line_spec */:\n float line_width() const;\n class surface &line_width(float line_width);\n\n const std::array<float, 4> &edge_color() const;\n\n template <class T> class surface &edge_color(T c) {\n line_spec().color(c);\n touch();\n return *this;\n }\n\n inline class surface &edge_color(std::initializer_list<float> c) {\n line_spec().color(c);\n touch();\n return *this;\n }\n\n double zmin() override;\n double zmax() override;\n\n protected:\n void maybe_update_line_spec();\n std::string grid_data_string();\n std::string ribbon_data_string();\n size_t create_line_index();\n\n protected:\n /// Data in the xlim\n vector_2d X_data_{};\n vector_2d Y_data_{};\n vector_2d Z_data_{};\n vector_2d C_data_{};\n\n /// Interpret data as a flat array of parametrics values\n /// If false, data needs to represent a grid\n /// If true, data represents a free form\n bool is_parametric_{false};\n\n /// Preprocess zmin / zmax\n double zmin_{NaN};\n double zmax_{NaN};\n\n /// Style\n size_t norm_{2};\n bool hidden3d_{false};\n bool depthorder_{false};\n float face_alpha_{.95};\n class line_spec line_spec_;\n bool lighting_{false};\n float primary_{-1.};\n float specular_{-1.};\n bool curtain_{false};\n bool waterfall_{false};\n bool fences_{false};\n bool ribbons_{false};\n double ribbon_width_{0.75};\n\n // Line surface\n bool surface_visible_{true};\n bool surface_in_2d_{false};\n\n // Solid surface\n bool palette_map_at_bottom_{false};\n bool palette_map_at_surface_{true};\n bool palette_map_at_top_{false};\n\n class line_spec contour_line_spec_;\n bool contour_base_{false};\n bool contour_surface_{false};\n size_t contour_levels_{9};\n std::vector<double> contour_values_{};\n\n bool contour_text_{false};\n std::optional<float> font_size_{std::nullopt};\n std::optional<std::string> font_{std::nullopt};\n std::string font_weight_{\"normal\"};\n color_array font_color_{0, 0, 0, 0};\n\n /// True if visible\n bool visible_{true};\n };\n} // namespace matplot\n\n#endif // MATPLOTPLUSPLUS_SURFACE_H\n", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 31, 32, 34, 36, 37, 49, 76, 102, 111, 119, 130, 138, 759, 772, 778, 785, 792, 797, 801, 804, 807, 810, 811, 813, 814, 816, 817, 819, 820, 822, 823, 825, 826, 828, 829, 831, 835, 836, 838, 839, 841, 842, 844, 845, 847, 848, 850, 851, 853, 854, 856, 857, 859, 860, 862, 863, 865, 866, 868, 869, 871, 872, 874, 878, 879, 881, 882, 884, 889, 899, 900, 902, 903, 911, 914, 925, 928, 929, 933, 947], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 253, "column": 0}}, {"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": "MATPLOTPLUSPLUS_SURFACE_H", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 33}}, {"id": 3, "type": "preproc_def", "text": "#define MATPLOTPLUSPLUS_SURFACE_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": "MATPLOTPLUSPLUS_SURFACE_H", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 33}}, {"id": 6, "type": "preproc_include", "text": "#include <array>\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": "<array>", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 16}}, {"id": 9, "type": "preproc_include", "text": "#include <matplot/core/figure.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": "<matplot/core/figure.h>", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 32}}, {"id": 12, "type": "preproc_include", "text": "#include <matplot/util/concepts.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": "system_lib_string", "text": "<matplot/util/concepts.h>", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 34}}, {"id": 15, "type": "preproc_include", "text": "#include <matplot/util/handle_types.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": "system_lib_string", "text": "<matplot/util/handle_types.h>", "parent": 15, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 38}}, {"id": 18, "type": "preproc_include", "text": "#include <optional>\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": "system_lib_string", "text": "<optional>", "parent": 18, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 19}}, {"id": 21, "type": "preproc_include", "text": "#include <matplot/core/axes_object.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": "system_lib_string", "text": "<matplot/core/axes_object.h>", "parent": 21, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 37}}, {"id": 24, "type": "preproc_include", "text": "#include <matplot/core/line_spec.h>\n", "parent": 0, "children": [25, 26], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<matplot/core/line_spec.h>", "parent": 24, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 35}}, {"id": 27, "type": "preproc_include", "text": "#include <matplot/util/common.h>\n", "parent": 0, "children": [28, 29], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 29, "type": "system_lib_string", "text": "<matplot/util/common.h>", "parent": 27, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 32}}, {"id": 30, "type": "type_identifier", "text": "namespace", "parent": 0, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 9}}, {"id": 31, "type": "identifier", "text": "matplot", "parent": 0, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 17}}, {"id": 32, "type": "declaration", "text": "class axes;", "parent": 0, "children": [33], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 15}}, {"id": 33, "type": "identifier", "text": "axes", "parent": 32, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 14}}, {"id": 34, "type": "ERROR", "text": "surface : public", "parent": 0, "children": [35], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 26}}, {"id": 35, "type": "identifier", "text": "surface", "parent": 34, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 17}}, {"id": 36, "type": "identifier", "text": "axes_object", "parent": 0, "children": [], "start_point": {"row": 23, "column": 27}, "end_point": {"row": 23, "column": 38}}, {"id": 37, "type": "labeled_statement", "text": "public:\n explicit surface(class axes *parent);", "parent": 0, "children": [38], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 25, "column": 45}}, {"id": 38, "type": "declaration", "text": "explicit surface(class axes *parent);", "parent": 37, "children": [39, 40], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 45}}, {"id": 39, "type": "type_identifier", "text": "explicit", "parent": 38, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 16}}, {"id": 40, "type": "function_declarator", "text": "surface(class axes *parent)", "parent": 38, "children": [41, 42], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 44}}, {"id": 41, "type": "identifier", "text": "surface", "parent": 40, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 24}}, {"id": 42, "type": "parameter_list", "text": "(class axes *parent)", "parent": 40, "children": [43], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 44}}, {"id": 43, "type": "parameter_declaration", "text": "class axes *parent", "parent": 42, "children": [44, 46], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 43}}, {"id": 44, "type": "ERROR", "text": "axes", "parent": 43, "children": [45], "start_point": {"row": 25, "column": 31}, "end_point": {"row": 25, "column": 35}}, {"id": 45, "type": "identifier", "text": "axes", "parent": 44, "children": [], "start_point": {"row": 25, "column": 31}, "end_point": {"row": 25, "column": 35}}, {"id": 46, "type": "pointer_declarator", "text": "*parent", "parent": 43, "children": [47, 48], "start_point": {"row": 25, "column": 36}, "end_point": {"row": 25, "column": 43}}, {"id": 47, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 25, "column": 36}, "end_point": {"row": 25, "column": 37}}, {"id": 48, "type": "identifier", "text": "parent", "parent": 46, "children": [], "start_point": {"row": 25, "column": 37}, "end_point": {"row": 25, "column": 43}}, {"id": 49, "type": "declaration", "text": "surface(class axes *parent, const vector_2d &X, const vector_2d &Y,\n const vector_2d &Z, const vector_2d &C,\n const std::string &line_spec = \"\");", "parent": 0, "children": [50, 56, 57, 60, 63, 66, 69, 72], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 30, "column": 51}}, {"id": 50, "type": "macro_type_specifier", "text": "surface(class axes *", "parent": 49, "children": [51, 52], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 28}}, {"id": 51, "type": "identifier", "text": "surface", "parent": 50, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 15}}, {"id": 52, "type": "type_descriptor", "text": "axes *", "parent": 50, "children": [53, 54], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 28}}, {"id": 53, "type": "type_identifier", "text": "axes", "parent": 52, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 26}}, {"id": 54, "type": "abstract_pointer_declarator", "text": "*", "parent": 52, "children": [55], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 28}}, {"id": 55, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 28}}, {"id": 56, "type": "identifier", "text": "parent", "parent": 49, "children": [], "start_point": {"row": 28, "column": 28}, "end_point": {"row": 28, "column": 34}}, {"id": 57, "type": "ERROR", "text": "vector_2d &X", "parent": 49, "children": [58, 59], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 54}}, {"id": 58, "type": "identifier", "text": "vector_2d", "parent": 57, "children": [], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 51}}, {"id": 59, "type": "identifier", "text": "X", "parent": 57, "children": [], "start_point": {"row": 28, "column": 53}, "end_point": {"row": 28, "column": 54}}, {"id": 60, "type": "ERROR", "text": "vector_2d &Y", "parent": 49, "children": [61, 62], "start_point": {"row": 28, "column": 62}, "end_point": {"row": 28, "column": 74}}, {"id": 61, "type": "identifier", "text": "vector_2d", "parent": 60, "children": [], "start_point": {"row": 28, "column": 62}, "end_point": {"row": 28, "column": 71}}, {"id": 62, "type": "identifier", "text": "Y", "parent": 60, "children": [], "start_point": {"row": 28, "column": 73}, "end_point": {"row": 28, "column": 74}}, {"id": 63, "type": "ERROR", "text": "vector_2d &Z", "parent": 49, "children": [64, 65], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 34}}, {"id": 64, "type": "identifier", "text": "vector_2d", "parent": 63, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 31}}, {"id": 65, "type": "identifier", "text": "Z", "parent": 63, "children": [], "start_point": {"row": 29, "column": 33}, "end_point": {"row": 29, "column": 34}}, {"id": 66, "type": "ERROR", "text": "vector_2d &C", "parent": 49, "children": [67, 68], "start_point": {"row": 29, "column": 42}, "end_point": {"row": 29, "column": 54}}, {"id": 67, "type": "identifier", "text": "vector_2d", "parent": 66, "children": [], "start_point": {"row": 29, "column": 42}, "end_point": {"row": 29, "column": 51}}, {"id": 68, "type": "identifier", "text": "C", "parent": 66, "children": [], "start_point": {"row": 29, "column": 53}, "end_point": {"row": 29, "column": 54}}, {"id": 69, "type": "ERROR", "text": "const std::string &", "parent": 49, "children": [70, 71], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 35}}, {"id": 70, "type": "identifier", "text": "std", "parent": 69, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 25}}, {"id": 71, "type": "identifier", "text": "string", "parent": 69, "children": [], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 33}}, {"id": 72, "type": "init_declarator", "text": "line_spec = \"\"", "parent": 49, "children": [73, 74, 75], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 49}}, {"id": 73, "type": "identifier", "text": "line_spec", "parent": 72, "children": [], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 44}}, {"id": 74, "type": "=", "text": "=", "parent": 72, "children": [], "start_point": {"row": 30, "column": 45}, "end_point": {"row": 30, "column": 46}}, {"id": 75, "type": "string_literal", "text": "\"\"", "parent": 72, "children": [], "start_point": {"row": 30, "column": 47}, "end_point": {"row": 30, "column": 49}}, {"id": 76, "type": "ERROR", "text": "template <class... Args>\n surface(const axes_handle &parent, Args... args)\n :", "parent": 0, "children": [77], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 41, "column": 13}}, {"id": 77, "type": "binary_expression", "text": "template <class... Args>\n surface(const axes_handle &parent, Args... args)", "parent": 76, "children": [78, 81, 83, 84], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 40, "column": 56}}, {"id": 78, "type": "binary_expression", "text": "template <class", "parent": 77, "children": [79, 80], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 23}}, {"id": 79, "type": "identifier", "text": "template", "parent": 78, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 16}}, {"id": 80, "type": "<", "text": "<", "parent": 78, "children": [], "start_point": {"row": 39, "column": 17}, "end_point": {"row": 39, "column": 18}}, {"id": 81, "type": "ERROR", "text": "... Args", "parent": 77, "children": [82], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 31}}, {"id": 82, "type": "identifier", "text": "Args", "parent": 81, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 31}}, {"id": 83, "type": ">", "text": ">", "parent": 77, "children": [], "start_point": {"row": 39, "column": 31}, "end_point": {"row": 39, "column": 32}}, {"id": 84, "type": "call_expression", "text": "surface(const axes_handle &parent, Args... args)", "parent": 77, "children": [85, 86], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 56}}, {"id": 85, "type": "identifier", "text": "surface", "parent": 84, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 15}}, {"id": 86, "type": "argument_list", "text": "(const axes_handle &parent, Args... args)", "parent": 84, "children": [87, 90, 92], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 56}}, {"id": 87, "type": "binary_expression", "text": "axes_handle &parent", "parent": 86, "children": [88, 89], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 41}}, {"id": 88, "type": "identifier", "text": "axes_handle", "parent": 87, "children": [], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 33}}, {"id": 89, "type": "identifier", "text": "parent", "parent": 87, "children": [], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 41}}, {"id": 90, "type": "ERROR", "text": "Args...", "parent": 86, "children": [91], "start_point": {"row": 40, "column": 43}, "end_point": {"row": 40, "column": 50}}, {"id": 91, "type": "identifier", "text": "Args", "parent": 90, "children": [], "start_point": {"row": 40, "column": 43}, "end_point": {"row": 40, "column": 47}}, {"id": 92, "type": "identifier", "text": "args", "parent": 86, "children": [], "start_point": {"row": 40, "column": 51}, "end_point": {"row": 40, "column": 55}}, {"id": 93, "type": "call_expression", "text": "surface(parent.get(), args...)", "parent": 0, "children": [94, 95], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 44}}, {"id": 94, "type": "identifier", "text": "surface", "parent": 93, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 21}}, {"id": 95, "type": "argument_list", "text": "(parent.get(), args...)", "parent": 93, "children": [96, 101], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 44}}, {"id": 96, "type": "call_expression", "text": "parent.get()", "parent": 95, "children": [97, 100], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 34}}, {"id": 97, "type": "field_expression", "text": "parent.get", "parent": 96, "children": [98, 99], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 32}}, {"id": 98, "type": "identifier", "text": "parent", "parent": 97, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 28}}, {"id": 99, "type": "field_identifier", "text": "get", "parent": 97, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 32}}, {"id": 100, "type": "argument_list", "text": "()", "parent": 96, "children": [], "start_point": {"row": 41, "column": 32}, "end_point": {"row": 41, "column": 34}}, {"id": 101, "type": "identifier", "text": "args", "parent": 95, "children": [], "start_point": {"row": 41, "column": 36}, "end_point": {"row": 41, "column": 40}}, {"id": 102, "type": "labeled_statement", "text": "public /* mandatory virtual functions */:\n std::string set_variables_string() override;", "parent": 0, "children": [103], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 44, "column": 52}}, {"id": 103, "type": "labeled_statement", "text": "std::string set_variables_string() override;", "parent": 102, "children": [104, 105], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 52}}, {"id": 104, "type": "statement_identifier", "text": "std", "parent": 103, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 11}}, {"id": 105, "type": "ERROR", "text": ":string set_variables_string() override", "parent": 103, "children": [106, 107], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 51}}, {"id": 106, "type": "type_identifier", "text": "string", "parent": 105, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 19}}, {"id": 107, "type": "function_declarator", "text": "set_variables_string() override", "parent": 105, "children": [108, 109, 110], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 51}}, {"id": 108, "type": "identifier", "text": "set_variables_string", "parent": 107, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 40}}, {"id": 109, "type": "parameter_list", "text": "()", "parent": 107, "children": [], "start_point": {"row": 44, "column": 40}, "end_point": {"row": 44, "column": 42}}, {"id": 110, "type": "identifier", "text": "override", "parent": 107, "children": [], "start_point": {"row": 44, "column": 43}, "end_point": {"row": 44, "column": 51}}, {"id": 111, "type": "labeled_statement", "text": "std::string plot_string() override;", "parent": 0, "children": [112, 113], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 43}}, {"id": 112, "type": "statement_identifier", "text": "std", "parent": 111, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 11}}, {"id": 113, "type": "ERROR", "text": ":string plot_string() override", "parent": 111, "children": [114, 115], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 42}}, {"id": 114, "type": "type_identifier", "text": "string", "parent": 113, "children": [], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 19}}, {"id": 115, "type": "function_declarator", "text": "plot_string() override", "parent": 113, "children": [116, 117, 118], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 42}}, {"id": 116, "type": "identifier", "text": "plot_string", "parent": 115, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 31}}, {"id": 117, "type": "parameter_list", "text": "()", "parent": 115, "children": [], "start_point": {"row": 45, "column": 31}, "end_point": {"row": 45, "column": 33}}, {"id": 118, "type": "identifier", "text": "override", "parent": 115, "children": [], "start_point": {"row": 45, "column": 34}, "end_point": {"row": 45, "column": 42}}, {"id": 119, "type": "labeled_statement", "text": "std::string legend_string(const std::string &title) override;", "parent": 0, "children": [120, 121], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 69}}, {"id": 120, "type": "statement_identifier", "text": "std", "parent": 119, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 11}}, {"id": 121, "type": "ERROR", "text": "::string legend_string(const std:", "parent": 119, "children": [122, 123, 124], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 44}}, {"id": 122, "type": "type_identifier", "text": "string", "parent": 121, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 19}}, {"id": 123, "type": "identifier", "text": "legend_string", "parent": 121, "children": [], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 33}}, {"id": 124, "type": "type_identifier", "text": "std", "parent": 121, "children": [], "start_point": {"row": 46, "column": 40}, "end_point": {"row": 46, "column": 43}}, {"id": 125, "type": "binary_expression", "text": "string &title", "parent": 119, "children": [126, 127], "start_point": {"row": 46, "column": 45}, "end_point": {"row": 46, "column": 58}}, {"id": 126, "type": "identifier", "text": "string", "parent": 125, "children": [], "start_point": {"row": 46, "column": 45}, "end_point": {"row": 46, "column": 51}}, {"id": 127, "type": "identifier", "text": "title", "parent": 125, "children": [], "start_point": {"row": 46, "column": 53}, "end_point": {"row": 46, "column": 58}}, {"id": 128, "type": "ERROR", "text": ") override", "parent": 119, "children": [129], "start_point": {"row": 46, "column": 58}, "end_point": {"row": 46, "column": 68}}, {"id": 129, "type": "identifier", "text": "override", "parent": 128, "children": [], "start_point": {"row": 46, "column": 60}, "end_point": {"row": 46, "column": 68}}, {"id": 130, "type": "labeled_statement", "text": "std::string data_string() override;", "parent": 0, "children": [131, 132], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 43}}, {"id": 131, "type": "statement_identifier", "text": "std", "parent": 130, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 11}}, {"id": 132, "type": "ERROR", "text": ":string data_string() override", "parent": 130, "children": [133, 134], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 42}}, {"id": 133, "type": "type_identifier", "text": "string", "parent": 132, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 19}}, {"id": 134, "type": "function_declarator", "text": "data_string() override", "parent": 132, "children": [135, 136, 137], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 42}}, {"id": 135, "type": "identifier", "text": "data_string", "parent": 134, "children": [], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 31}}, {"id": 136, "type": "parameter_list", "text": "()", "parent": 134, "children": [], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 33}}, {"id": 137, "type": "identifier", "text": "override", "parent": 134, "children": [], "start_point": {"row": 47, "column": 34}, "end_point": {"row": 47, "column": 42}}, {"id": 138, "type": "function_definition", "text": "double xmax() override;\n double xmin() override;\n double ymax() override;\n double ymin() override;\n enum axes_object::axes_category axes_category() override;\n\n public /* getters and setters */:\n class surface &line_style(const std::string &line_spec);\n\n const matplot::line_spec &line_spec() const;\n matplot::line_spec &line_spec();\n class surface &line_spec(const class line_spec &line_spec);\n\n const vector_2d &Y_data() const;\n class surface &Y_data(const vector_2d &Y_data);\n\n const vector_2d &X_data() const;\n class surface &X_data(const vector_2d &X_data);\n\n const vector_2d &Z_data() const;\n class surface &Z_data(const vector_2d &Z_data);\n\n size_t norm() const;\n class surface &norm(size_t norm);\n\n const vector_2d &x_data() const;\n class surface &x_data(const vector_2d &x_data);\n\n const vector_2d &y_data() const;\n class surface &y_data(const vector_2d &y_data);\n\n const vector_2d &z_data() const;\n class surface &z_data(const vector_2d &z_data);\n\n bool hidden_3d() const;\n class surface &hidden_3d(bool hidden_3_d);\n\n bool surface_visible() const;\n class surface &surface_visible(bool surface_visible);\n\n bool surface_in_2d() const;\n class surface &surface_in_2d(bool surface_in_2d);\n\n bool palette_map_at_bottom() const;\n class surface &palette_map_at_bottom(bool palette_map_at_bottom);\n\n bool palette_map_at_surface() const;\n class surface &palette_map_at_surface(bool palette_map_at_surface);\n\n bool palette_map_at_top() const;\n class surface &palette_map_at_top(bool palette_map_at_top);\n\n bool contour_base() const;\n class surface &contour_base(bool contour_base);\n\n bool contour_surface() const;\n class surface &contour_surface(bool contour_surface);\n\n size_t contour_levels() const;\n class surface &contour_levels(size_t contour_levels);\n\n const std::vector<double> &contour_values() const;\n class surface &\n contour_values(const std::vector<double> &contour_values);\n\n bool contour_text() const;\n class surface &contour_text(bool contour_text);\n\n const float font_size() const;\n class surface &font_size(const float &font_size);\n\n const std::string font() const;\n class surface &font(const std::string &font);\n\n const std::string &font_weight() const;\n class surface &font_weight(const std::string &font_weight);\n\n const color_array &font_color() const;\n class surface &font_color(const color_array &font_color);\n class surface &font_color(const std::string &font_color);\n\n bool depthorder() const;\n\n class surface &depthorder(bool depthorder);\n\n float face_alpha() const;\n class surface &face_alpha(float face_alpha);\n\n bool lighting() const;\n class surface &lighting(bool lighting);\n\n float primary() const;\n class surface &primary(float amount);\n\n float specular() const;\n class surface &specular(float amount);\n\n const class line_spec &contour_line_spec() const;\n class line_spec &contour_line_spec();\n class surface &\n contour_line_spec(const class line_spec &contour_line_spec);\n\n bool curtain() const;\n class surface &curtain(bool curtain);\n\n bool waterfall() const;\n class surface &waterfall(bool waterfall);\n\n bool fences() const;\n class surface &fences(bool fences);\n\n bool ribbons() const;\n class surface &ribbons(bool ribbons);\n\n double ribbon_width() const;\n class surface &ribbon_width(double ribbon_width);\n\n bool visible() const;\n class surface &visible(bool visible);\n\n public /* getters and setters bypassing the line_spec */:\n float line_width() const;\n class surface &line_width(float line_width);\n\n const std::array<float, 4> &edge_color() const;\n\n template <class T> class surface &edge_color(T c) {\n line_spec().color(c);\n touch();\n return *this;\n }\n\n inline class surface &edge_color(std::initializer_list<float> c) {\n line_spec().color(c);\n touch();\n return *this;\n }", "parent": 0, "children": [139, 140, 143, 146, 162, 181, 193, 203, 216, 229, 242, 255, 268, 281, 294, 307, 320, 333, 346, 359, 372, 385, 398, 411, 433, 446, 459, 475, 491, 504, 515, 528, 541, 554, 567, 580, 590, 600, 613, 626, 639, 652, 665, 678, 691, 724, 728], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 184, "column": 9}}, {"id": 139, "type": "primitive_type", "text": "double", "parent": 138, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 14}}, {"id": 140, "type": "function_declarator", "text": "xmax()", "parent": 138, "children": [141, 142], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 21}}, {"id": 141, "type": "identifier", "text": "xmax", "parent": 140, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 19}}, {"id": 142, "type": "parameter_list", "text": "()", "parent": 140, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 21}}, {"id": 143, "type": "declaration", "text": "override;", "parent": 138, "children": [144, 145], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 31}}, {"id": 144, "type": "type_identifier", "text": "override", "parent": 143, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 30}}, {"id": 145, "type": "identifier", "text": "", "parent": 143, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 30}}, {"id": 146, "type": "ERROR", "text": "double xmin() override;\n double ymax() override;\n double ymin() override;", "parent": 138, "children": [147, 148, 152, 153, 157, 158], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 51, "column": 31}}, {"id": 147, "type": "primitive_type", "text": "double", "parent": 146, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 14}}, {"id": 148, "type": "function_declarator", "text": "xmin() override", "parent": 146, "children": [149, 150, 151], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 30}}, {"id": 149, "type": "identifier", "text": "xmin", "parent": 148, "children": [], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 19}}, {"id": 150, "type": "parameter_list", "text": "()", "parent": 148, "children": [], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 21}}, {"id": 151, "type": "identifier", "text": "override", "parent": 148, "children": [], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 30}}, {"id": 152, "type": "primitive_type", "text": "double", "parent": 146, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 14}}, {"id": 153, "type": "function_declarator", "text": "ymax() override", "parent": 146, "children": [154, 155, 156], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 30}}, {"id": 154, "type": "identifier", "text": "ymax", "parent": 153, "children": [], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 19}}, {"id": 155, "type": "parameter_list", "text": "()", "parent": 153, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 21}}, {"id": 156, "type": "identifier", "text": "override", "parent": 153, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 30}}, {"id": 157, "type": "primitive_type", "text": "double", "parent": 146, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 14}}, {"id": 158, "type": "function_declarator", "text": "ymin() override", "parent": 146, "children": [159, 160, 161], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 30}}, {"id": 159, "type": "identifier", "text": "ymin", "parent": 158, "children": [], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 19}}, {"id": 160, "type": "parameter_list", "text": "()", "parent": 158, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 21}}, {"id": 161, "type": "identifier", "text": "override", "parent": 158, "children": [], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 30}}, {"id": 162, "type": "declaration", "text": "enum axes_object::axes_category axes_category() override;\n\n public /* getters and setters */:\n class surface &line_style(const std::string &line_spec);", "parent": 138, "children": [163, 166, 173], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 55, "column": 64}}, {"id": 163, "type": "enum_specifier", "text": "enum axes_object", "parent": 162, "children": [164, 165], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 24}}, {"id": 164, "type": "enum", "text": "enum", "parent": 163, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 12}}, {"id": 165, "type": "type_identifier", "text": "axes_object", "parent": 163, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 24}}, {"id": 166, "type": "ERROR", "text": "::axes_category axes_category() override;\n\n public /* getters and setters */:\n class surface &", "parent": 162, "children": [167, 168, 172], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 55, "column": 23}}, {"id": 167, "type": "identifier", "text": "axes_category", "parent": 166, "children": [], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 39}}, {"id": 168, "type": "function_declarator", "text": "axes_category() override", "parent": 166, "children": [169, 170, 171], "start_point": {"row": 52, "column": 40}, "end_point": {"row": 52, "column": 64}}, {"id": 169, "type": "identifier", "text": "axes_category", "parent": 168, "children": [], "start_point": {"row": 52, "column": 40}, "end_point": {"row": 52, "column": 53}}, {"id": 170, "type": "parameter_list", "text": "()", "parent": 168, "children": [], "start_point": {"row": 52, "column": 53}, "end_point": {"row": 52, "column": 55}}, {"id": 171, "type": "identifier", "text": "override", "parent": 168, "children": [], "start_point": {"row": 52, "column": 56}, "end_point": {"row": 52, "column": 64}}, {"id": 172, "type": "identifier", "text": "surface", "parent": 166, "children": [], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 21}}, {"id": 173, "type": "function_declarator", "text": "line_style(const std::string &line_spec)", "parent": 162, "children": [174, 175], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 63}}, {"id": 174, "type": "identifier", "text": "line_style", "parent": 173, "children": [], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 33}}, {"id": 175, "type": "parameter_list", "text": "(const std::string &line_spec)", "parent": 173, "children": [176], "start_point": {"row": 55, "column": 33}, "end_point": {"row": 55, "column": 63}}, {"id": 176, "type": "parameter_declaration", "text": "const std::string &line_spec", "parent": 175, "children": [177, 178, 180], "start_point": {"row": 55, "column": 34}, "end_point": {"row": 55, "column": 62}}, {"id": 177, "type": "type_identifier", "text": "std", "parent": 176, "children": [], "start_point": {"row": 55, "column": 40}, "end_point": {"row": 55, "column": 43}}, {"id": 178, "type": "ERROR", "text": "::string &", "parent": 176, "children": [179], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 53}}, {"id": 179, "type": "identifier", "text": "string", "parent": 178, "children": [], "start_point": {"row": 55, "column": 45}, "end_point": {"row": 55, "column": 51}}, {"id": 180, "type": "identifier", "text": "line_spec", "parent": 176, "children": [], "start_point": {"row": 55, "column": 53}, "end_point": {"row": 55, "column": 62}}, {"id": 181, "type": "declaration", "text": "const matplot::line_spec &line_spec() const;\n matplot::line_spec &line_spec();", "parent": 138, "children": [182, 183, 190], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 58, "column": 40}}, {"id": 182, "type": "type_identifier", "text": "matplot", "parent": 181, "children": [], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 21}}, {"id": 183, "type": "ERROR", "text": "::line_spec &line_spec() const;\n matplot::line_spec &", "parent": 181, "children": [184, 185, 188, 189], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 58, "column": 28}}, {"id": 184, "type": "identifier", "text": "line_spec", "parent": 183, "children": [], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 32}}, {"id": 185, "type": "function_declarator", "text": "line_spec() const", "parent": 183, "children": [186, 187], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 51}}, {"id": 186, "type": "identifier", "text": "line_spec", "parent": 185, "children": [], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 43}}, {"id": 187, "type": "parameter_list", "text": "()", "parent": 185, "children": [], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 57, "column": 45}}, {"id": 188, "type": "identifier", "text": "matplot", "parent": 183, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 15}}, {"id": 189, "type": "identifier", "text": "line_spec", "parent": 183, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 26}}, {"id": 190, "type": "function_declarator", "text": "line_spec()", "parent": 181, "children": [191, 192], "start_point": {"row": 58, "column": 28}, "end_point": {"row": 58, "column": 39}}, {"id": 191, "type": "identifier", "text": "line_spec", "parent": 190, "children": [], "start_point": {"row": 58, "column": 28}, "end_point": {"row": 58, "column": 37}}, {"id": 192, "type": "parameter_list", "text": "()", "parent": 190, "children": [], "start_point": {"row": 58, "column": 37}, "end_point": {"row": 58, "column": 39}}, {"id": 193, "type": "declaration", "text": "class surface &line_spec(const class line_spec &line_spec);", "parent": 138, "children": [194, 196], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 67}}, {"id": 194, "type": "ERROR", "text": "surface &", "parent": 193, "children": [195], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 23}}, {"id": 195, "type": "identifier", "text": "surface", "parent": 194, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 21}}, {"id": 196, "type": "function_declarator", "text": "line_spec(const class line_spec &line_spec)", "parent": 193, "children": [197, 198], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 66}}, {"id": 197, "type": "identifier", "text": "line_spec", "parent": 196, "children": [], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 32}}, {"id": 198, "type": "parameter_list", "text": "(const class line_spec &line_spec)", "parent": 196, "children": [199, 201], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 59, "column": 66}}, {"id": 199, "type": "parameter_declaration", "text": "const class line_spec", "parent": 198, "children": [200], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 54}}, {"id": 200, "type": "identifier", "text": "line_spec", "parent": 199, "children": [], "start_point": {"row": 59, "column": 45}, "end_point": {"row": 59, "column": 54}}, {"id": 201, "type": "ERROR", "text": "&line_spec", "parent": 198, "children": [202], "start_point": {"row": 59, "column": 55}, "end_point": {"row": 59, "column": 65}}, {"id": 202, "type": "identifier", "text": "line_spec", "parent": 201, "children": [], "start_point": {"row": 59, "column": 56}, "end_point": {"row": 59, "column": 65}}, {"id": 203, "type": "declaration", "text": "const vector_2d &Y_data() const;\n class surface &Y_data(const vector_2d &Y_data);", "parent": 138, "children": [204, 205, 210], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 62, "column": 55}}, {"id": 204, "type": "type_identifier", "text": "vector_2d", "parent": 203, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 23}}, {"id": 205, "type": "ERROR", "text": "&Y_data() const;\n class surface &", "parent": 203, "children": [206, 209], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 62, "column": 23}}, {"id": 206, "type": "function_declarator", "text": "Y_data() const", "parent": 205, "children": [207, 208], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 39}}, {"id": 207, "type": "identifier", "text": "Y_data", "parent": 206, "children": [], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 31}}, {"id": 208, "type": "parameter_list", "text": "()", "parent": 206, "children": [], "start_point": {"row": 61, "column": 31}, "end_point": {"row": 61, "column": 33}}, {"id": 209, "type": "identifier", "text": "surface", "parent": 205, "children": [], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 21}}, {"id": 210, "type": "function_declarator", "text": "Y_data(const vector_2d &Y_data)", "parent": 203, "children": [211, 212], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 54}}, {"id": 211, "type": "identifier", "text": "Y_data", "parent": 210, "children": [], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 29}}, {"id": 212, "type": "parameter_list", "text": "(const vector_2d &Y_data)", "parent": 210, "children": [213], "start_point": {"row": 62, "column": 29}, "end_point": {"row": 62, "column": 54}}, {"id": 213, "type": "parameter_declaration", "text": "const vector_2d &Y_data", "parent": 212, "children": [214, 215], "start_point": {"row": 62, "column": 30}, "end_point": {"row": 62, "column": 53}}, {"id": 214, "type": "type_identifier", "text": "vector_2d", "parent": 213, "children": [], "start_point": {"row": 62, "column": 36}, "end_point": {"row": 62, "column": 45}}, {"id": 215, "type": "identifier", "text": "Y_data", "parent": 213, "children": [], "start_point": {"row": 62, "column": 47}, "end_point": {"row": 62, "column": 53}}, {"id": 216, "type": "declaration", "text": "const vector_2d &X_data() const;\n class surface &X_data(const vector_2d &X_data);", "parent": 138, "children": [217, 218, 223], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 65, "column": 55}}, {"id": 217, "type": "type_identifier", "text": "vector_2d", "parent": 216, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 23}}, {"id": 218, "type": "ERROR", "text": "&X_data() const;\n class surface &", "parent": 216, "children": [219, 222], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 65, "column": 23}}, {"id": 219, "type": "function_declarator", "text": "X_data() const", "parent": 218, "children": [220, 221], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 39}}, {"id": 220, "type": "identifier", "text": "X_data", "parent": 219, "children": [], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 31}}, {"id": 221, "type": "parameter_list", "text": "()", "parent": 219, "children": [], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 33}}, {"id": 222, "type": "identifier", "text": "surface", "parent": 218, "children": [], "start_point": {"row": 65, "column": 14}, "end_point": {"row": 65, "column": 21}}, {"id": 223, "type": "function_declarator", "text": "X_data(const vector_2d &X_data)", "parent": 216, "children": [224, 225], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 54}}, {"id": 224, "type": "identifier", "text": "X_data", "parent": 223, "children": [], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 29}}, {"id": 225, "type": "parameter_list", "text": "(const vector_2d &X_data)", "parent": 223, "children": [226], "start_point": {"row": 65, "column": 29}, "end_point": {"row": 65, "column": 54}}, {"id": 226, "type": "parameter_declaration", "text": "const vector_2d &X_data", "parent": 225, "children": [227, 228], "start_point": {"row": 65, "column": 30}, "end_point": {"row": 65, "column": 53}}, {"id": 227, "type": "type_identifier", "text": "vector_2d", "parent": 226, "children": [], "start_point": {"row": 65, "column": 36}, "end_point": {"row": 65, "column": 45}}, {"id": 228, "type": "identifier", "text": "X_data", "parent": 226, "children": [], "start_point": {"row": 65, "column": 47}, "end_point": {"row": 65, "column": 53}}, {"id": 229, "type": "declaration", "text": "const vector_2d &Z_data() const;\n class surface &Z_data(const vector_2d &Z_data);", "parent": 138, "children": [230, 231, 236], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 68, "column": 55}}, {"id": 230, "type": "type_identifier", "text": "vector_2d", "parent": 229, "children": [], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 23}}, {"id": 231, "type": "ERROR", "text": "&Z_data() const;\n class surface &", "parent": 229, "children": [232, 235], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 68, "column": 23}}, {"id": 232, "type": "function_declarator", "text": "Z_data() const", "parent": 231, "children": [233, 234], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 39}}, {"id": 233, "type": "identifier", "text": "Z_data", "parent": 232, "children": [], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 31}}, {"id": 234, "type": "parameter_list", "text": "()", "parent": 232, "children": [], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 33}}, {"id": 235, "type": "identifier", "text": "surface", "parent": 231, "children": [], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 21}}, {"id": 236, "type": "function_declarator", "text": "Z_data(const vector_2d &Z_data)", "parent": 229, "children": [237, 238], "start_point": {"row": 68, "column": 23}, "end_point": {"row": 68, "column": 54}}, {"id": 237, "type": "identifier", "text": "Z_data", "parent": 236, "children": [], "start_point": {"row": 68, "column": 23}, "end_point": {"row": 68, "column": 29}}, {"id": 238, "type": "parameter_list", "text": "(const vector_2d &Z_data)", "parent": 236, "children": [239], "start_point": {"row": 68, "column": 29}, "end_point": {"row": 68, "column": 54}}, {"id": 239, "type": "parameter_declaration", "text": "const vector_2d &Z_data", "parent": 238, "children": [240, 241], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 53}}, {"id": 240, "type": "type_identifier", "text": "vector_2d", "parent": 239, "children": [], "start_point": {"row": 68, "column": 36}, "end_point": {"row": 68, "column": 45}}, {"id": 241, "type": "identifier", "text": "Z_data", "parent": 239, "children": [], "start_point": {"row": 68, "column": 47}, "end_point": {"row": 68, "column": 53}}, {"id": 242, "type": "declaration", "text": "size_t norm() const;\n class surface &norm(size_t norm);", "parent": 138, "children": [243, 244, 249], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 71, "column": 41}}, {"id": 243, "type": "primitive_type", "text": "size_t", "parent": 242, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 14}}, {"id": 244, "type": "ERROR", "text": "norm() const;\n class surface &", "parent": 242, "children": [245, 248], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 71, "column": 23}}, {"id": 245, "type": "function_declarator", "text": "norm() const", "parent": 244, "children": [246, 247], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 27}}, {"id": 246, "type": "identifier", "text": "norm", "parent": 245, "children": [], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 19}}, {"id": 247, "type": "parameter_list", "text": "()", "parent": 245, "children": [], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 21}}, {"id": 248, "type": "identifier", "text": "surface", "parent": 244, "children": [], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 21}}, {"id": 249, "type": "function_declarator", "text": "norm(size_t norm)", "parent": 242, "children": [250, 251], "start_point": {"row": 71, "column": 23}, "end_point": {"row": 71, "column": 40}}, {"id": 250, "type": "identifier", "text": "norm", "parent": 249, "children": [], "start_point": {"row": 71, "column": 23}, "end_point": {"row": 71, "column": 27}}, {"id": 251, "type": "parameter_list", "text": "(size_t norm)", "parent": 249, "children": [252], "start_point": {"row": 71, "column": 27}, "end_point": {"row": 71, "column": 40}}, {"id": 252, "type": "parameter_declaration", "text": "size_t norm", "parent": 251, "children": [253, 254], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 39}}, {"id": 253, "type": "primitive_type", "text": "size_t", "parent": 252, "children": [], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 34}}, {"id": 254, "type": "identifier", "text": "norm", "parent": 252, "children": [], "start_point": {"row": 71, "column": 35}, "end_point": {"row": 71, "column": 39}}, {"id": 255, "type": "declaration", "text": "const vector_2d &x_data() const;\n class surface &x_data(const vector_2d &x_data);", "parent": 138, "children": [256, 257, 262], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 74, "column": 55}}, {"id": 256, "type": "type_identifier", "text": "vector_2d", "parent": 255, "children": [], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 23}}, {"id": 257, "type": "ERROR", "text": "&x_data() const;\n class surface &", "parent": 255, "children": [258, 261], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 74, "column": 23}}, {"id": 258, "type": "function_declarator", "text": "x_data() const", "parent": 257, "children": [259, 260], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 39}}, {"id": 259, "type": "identifier", "text": "x_data", "parent": 258, "children": [], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 31}}, {"id": 260, "type": "parameter_list", "text": "()", "parent": 258, "children": [], "start_point": {"row": 73, "column": 31}, "end_point": {"row": 73, "column": 33}}, {"id": 261, "type": "identifier", "text": "surface", "parent": 257, "children": [], "start_point": {"row": 74, "column": 14}, "end_point": {"row": 74, "column": 21}}, {"id": 262, "type": "function_declarator", "text": "x_data(const vector_2d &x_data)", "parent": 255, "children": [263, 264], "start_point": {"row": 74, "column": 23}, "end_point": {"row": 74, "column": 54}}, {"id": 263, "type": "identifier", "text": "x_data", "parent": 262, "children": [], "start_point": {"row": 74, "column": 23}, "end_point": {"row": 74, "column": 29}}, {"id": 264, "type": "parameter_list", "text": "(const vector_2d &x_data)", "parent": 262, "children": [265], "start_point": {"row": 74, "column": 29}, "end_point": {"row": 74, "column": 54}}, {"id": 265, "type": "parameter_declaration", "text": "const vector_2d &x_data", "parent": 264, "children": [266, 267], "start_point": {"row": 74, "column": 30}, "end_point": {"row": 74, "column": 53}}, {"id": 266, "type": "type_identifier", "text": "vector_2d", "parent": 265, "children": [], "start_point": {"row": 74, "column": 36}, "end_point": {"row": 74, "column": 45}}, {"id": 267, "type": "identifier", "text": "x_data", "parent": 265, "children": [], "start_point": {"row": 74, "column": 47}, "end_point": {"row": 74, "column": 53}}, {"id": 268, "type": "declaration", "text": "const vector_2d &y_data() const;\n class surface &y_data(const vector_2d &y_data);", "parent": 138, "children": [269, 270, 275], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 77, "column": 55}}, {"id": 269, "type": "type_identifier", "text": "vector_2d", "parent": 268, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 23}}, {"id": 270, "type": "ERROR", "text": "&y_data() const;\n class surface &", "parent": 268, "children": [271, 274], "start_point": {"row": 76, "column": 24}, "end_point": {"row": 77, "column": 23}}, {"id": 271, "type": "function_declarator", "text": "y_data() const", "parent": 270, "children": [272, 273], "start_point": {"row": 76, "column": 25}, "end_point": {"row": 76, "column": 39}}, {"id": 272, "type": "identifier", "text": "y_data", "parent": 271, "children": [], "start_point": {"row": 76, "column": 25}, "end_point": {"row": 76, "column": 31}}, {"id": 273, "type": "parameter_list", "text": "()", "parent": 271, "children": [], "start_point": {"row": 76, "column": 31}, "end_point": {"row": 76, "column": 33}}, {"id": 274, "type": "identifier", "text": "surface", "parent": 270, "children": [], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 21}}, {"id": 275, "type": "function_declarator", "text": "y_data(const vector_2d &y_data)", "parent": 268, "children": [276, 277], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 54}}, {"id": 276, "type": "identifier", "text": "y_data", "parent": 275, "children": [], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 29}}, {"id": 277, "type": "parameter_list", "text": "(const vector_2d &y_data)", "parent": 275, "children": [278], "start_point": {"row": 77, "column": 29}, "end_point": {"row": 77, "column": 54}}, {"id": 278, "type": "parameter_declaration", "text": "const vector_2d &y_data", "parent": 277, "children": [279, 280], "start_point": {"row": 77, "column": 30}, "end_point": {"row": 77, "column": 53}}, {"id": 279, "type": "type_identifier", "text": "vector_2d", "parent": 278, "children": [], "start_point": {"row": 77, "column": 36}, "end_point": {"row": 77, "column": 45}}, {"id": 280, "type": "identifier", "text": "y_data", "parent": 278, "children": [], "start_point": {"row": 77, "column": 47}, "end_point": {"row": 77, "column": 53}}, {"id": 281, "type": "declaration", "text": "const vector_2d &z_data() const;\n class surface &z_data(const vector_2d &z_data);", "parent": 138, "children": [282, 283, 288], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 80, "column": 55}}, {"id": 282, "type": "type_identifier", "text": "vector_2d", "parent": 281, "children": [], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 23}}, {"id": 283, "type": "ERROR", "text": "&z_data() const;\n class surface &", "parent": 281, "children": [284, 287], "start_point": {"row": 79, "column": 24}, "end_point": {"row": 80, "column": 23}}, {"id": 284, "type": "function_declarator", "text": "z_data() const", "parent": 283, "children": [285, 286], "start_point": {"row": 79, "column": 25}, "end_point": {"row": 79, "column": 39}}, {"id": 285, "type": "identifier", "text": "z_data", "parent": 284, "children": [], "start_point": {"row": 79, "column": 25}, "end_point": {"row": 79, "column": 31}}, {"id": 286, "type": "parameter_list", "text": "()", "parent": 284, "children": [], "start_point": {"row": 79, "column": 31}, "end_point": {"row": 79, "column": 33}}, {"id": 287, "type": "identifier", "text": "surface", "parent": 283, "children": [], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 21}}, {"id": 288, "type": "function_declarator", "text": "z_data(const vector_2d &z_data)", "parent": 281, "children": [289, 290], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 54}}, {"id": 289, "type": "identifier", "text": "z_data", "parent": 288, "children": [], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 29}}, {"id": 290, "type": "parameter_list", "text": "(const vector_2d &z_data)", "parent": 288, "children": [291], "start_point": {"row": 80, "column": 29}, "end_point": {"row": 80, "column": 54}}, {"id": 291, "type": "parameter_declaration", "text": "const vector_2d &z_data", "parent": 290, "children": [292, 293], "start_point": {"row": 80, "column": 30}, "end_point": {"row": 80, "column": 53}}, {"id": 292, "type": "type_identifier", "text": "vector_2d", "parent": 291, "children": [], "start_point": {"row": 80, "column": 36}, "end_point": {"row": 80, "column": 45}}, {"id": 293, "type": "identifier", "text": "z_data", "parent": 291, "children": [], "start_point": {"row": 80, "column": 47}, "end_point": {"row": 80, "column": 53}}, {"id": 294, "type": "declaration", "text": "bool hidden_3d() const;\n class surface &hidden_3d(bool hidden_3_d);", "parent": 138, "children": [295, 296, 301], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 83, "column": 50}}, {"id": 295, "type": "primitive_type", "text": "bool", "parent": 294, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 12}}, {"id": 296, "type": "ERROR", "text": "hidden_3d() const;\n class surface &", "parent": 294, "children": [297, 300], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 83, "column": 23}}, {"id": 297, "type": "function_declarator", "text": "hidden_3d() const", "parent": 296, "children": [298, 299], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 30}}, {"id": 298, "type": "identifier", "text": "hidden_3d", "parent": 297, "children": [], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 22}}, {"id": 299, "type": "parameter_list", "text": "()", "parent": 297, "children": [], "start_point": {"row": 82, "column": 22}, "end_point": {"row": 82, "column": 24}}, {"id": 300, "type": "identifier", "text": "surface", "parent": 296, "children": [], "start_point": {"row": 83, "column": 14}, "end_point": {"row": 83, "column": 21}}, {"id": 301, "type": "function_declarator", "text": "hidden_3d(bool hidden_3_d)", "parent": 294, "children": [302, 303], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 49}}, {"id": 302, "type": "identifier", "text": "hidden_3d", "parent": 301, "children": [], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 32}}, {"id": 303, "type": "parameter_list", "text": "(bool hidden_3_d)", "parent": 301, "children": [304], "start_point": {"row": 83, "column": 32}, "end_point": {"row": 83, "column": 49}}, {"id": 304, "type": "parameter_declaration", "text": "bool hidden_3_d", "parent": 303, "children": [305, 306], "start_point": {"row": 83, "column": 33}, "end_point": {"row": 83, "column": 48}}, {"id": 305, "type": "primitive_type", "text": "bool", "parent": 304, "children": [], "start_point": {"row": 83, "column": 33}, "end_point": {"row": 83, "column": 37}}, {"id": 306, "type": "identifier", "text": "hidden_3_d", "parent": 304, "children": [], "start_point": {"row": 83, "column": 38}, "end_point": {"row": 83, "column": 48}}, {"id": 307, "type": "declaration", "text": "bool surface_visible() const;\n class surface &surface_visible(bool surface_visible);", "parent": 138, "children": [308, 309, 314], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 86, "column": 61}}, {"id": 308, "type": "primitive_type", "text": "bool", "parent": 307, "children": [], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 12}}, {"id": 309, "type": "ERROR", "text": "surface_visible() const;\n class surface &", "parent": 307, "children": [310, 313], "start_point": {"row": 85, "column": 13}, "end_point": {"row": 86, "column": 23}}, {"id": 310, "type": "function_declarator", "text": "surface_visible() const", "parent": 309, "children": [311, 312], "start_point": {"row": 85, "column": 13}, "end_point": {"row": 85, "column": 36}}, {"id": 311, "type": "identifier", "text": "surface_visible", "parent": 310, "children": [], "start_point": {"row": 85, "column": 13}, "end_point": {"row": 85, "column": 28}}, {"id": 312, "type": "parameter_list", "text": "()", "parent": 310, "children": [], "start_point": {"row": 85, "column": 28}, "end_point": {"row": 85, "column": 30}}, {"id": 313, "type": "identifier", "text": "surface", "parent": 309, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 21}}, {"id": 314, "type": "function_declarator", "text": "surface_visible(bool surface_visible)", "parent": 307, "children": [315, 316], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 60}}, {"id": 315, "type": "identifier", "text": "surface_visible", "parent": 314, "children": [], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 38}}, {"id": 316, "type": "parameter_list", "text": "(bool surface_visible)", "parent": 314, "children": [317], "start_point": {"row": 86, "column": 38}, "end_point": {"row": 86, "column": 60}}, {"id": 317, "type": "parameter_declaration", "text": "bool surface_visible", "parent": 316, "children": [318, 319], "start_point": {"row": 86, "column": 39}, "end_point": {"row": 86, "column": 59}}, {"id": 318, "type": "primitive_type", "text": "bool", "parent": 317, "children": [], "start_point": {"row": 86, "column": 39}, "end_point": {"row": 86, "column": 43}}, {"id": 319, "type": "identifier", "text": "surface_visible", "parent": 317, "children": [], "start_point": {"row": 86, "column": 44}, "end_point": {"row": 86, "column": 59}}, {"id": 320, "type": "declaration", "text": "bool surface_in_2d() const;\n class surface &surface_in_2d(bool surface_in_2d);", "parent": 138, "children": [321, 322, 327], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 89, "column": 57}}, {"id": 321, "type": "primitive_type", "text": "bool", "parent": 320, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 12}}, {"id": 322, "type": "ERROR", "text": "surface_in_2d() const;\n class surface &", "parent": 320, "children": [323, 326], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 89, "column": 23}}, {"id": 323, "type": "function_declarator", "text": "surface_in_2d() const", "parent": 322, "children": [324, 325], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 34}}, {"id": 324, "type": "identifier", "text": "surface_in_2d", "parent": 323, "children": [], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 26}}, {"id": 325, "type": "parameter_list", "text": "()", "parent": 323, "children": [], "start_point": {"row": 88, "column": 26}, "end_point": {"row": 88, "column": 28}}, {"id": 326, "type": "identifier", "text": "surface", "parent": 322, "children": [], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 21}}, {"id": 327, "type": "function_declarator", "text": "surface_in_2d(bool surface_in_2d)", "parent": 320, "children": [328, 329], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 56}}, {"id": 328, "type": "identifier", "text": "surface_in_2d", "parent": 327, "children": [], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 36}}, {"id": 329, "type": "parameter_list", "text": "(bool surface_in_2d)", "parent": 327, "children": [330], "start_point": {"row": 89, "column": 36}, "end_point": {"row": 89, "column": 56}}, {"id": 330, "type": "parameter_declaration", "text": "bool surface_in_2d", "parent": 329, "children": [331, 332], "start_point": {"row": 89, "column": 37}, "end_point": {"row": 89, "column": 55}}, {"id": 331, "type": "primitive_type", "text": "bool", "parent": 330, "children": [], "start_point": {"row": 89, "column": 37}, "end_point": {"row": 89, "column": 41}}, {"id": 332, "type": "identifier", "text": "surface_in_2d", "parent": 330, "children": [], "start_point": {"row": 89, "column": 42}, "end_point": {"row": 89, "column": 55}}, {"id": 333, "type": "declaration", "text": "bool palette_map_at_bottom() const;\n class surface &palette_map_at_bottom(bool palette_map_at_bottom);", "parent": 138, "children": [334, 335, 340], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 92, "column": 73}}, {"id": 334, "type": "primitive_type", "text": "bool", "parent": 333, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 12}}, {"id": 335, "type": "ERROR", "text": "palette_map_at_bottom() const;\n class surface &", "parent": 333, "children": [336, 339], "start_point": {"row": 91, "column": 13}, "end_point": {"row": 92, "column": 23}}, {"id": 336, "type": "function_declarator", "text": "palette_map_at_bottom() const", "parent": 335, "children": [337, 338], "start_point": {"row": 91, "column": 13}, "end_point": {"row": 91, "column": 42}}, {"id": 337, "type": "identifier", "text": "palette_map_at_bottom", "parent": 336, "children": [], "start_point": {"row": 91, "column": 13}, "end_point": {"row": 91, "column": 34}}, {"id": 338, "type": "parameter_list", "text": "()", "parent": 336, "children": [], "start_point": {"row": 91, "column": 34}, "end_point": {"row": 91, "column": 36}}, {"id": 339, "type": "identifier", "text": "surface", "parent": 335, "children": [], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 21}}, {"id": 340, "type": "function_declarator", "text": "palette_map_at_bottom(bool palette_map_at_bottom)", "parent": 333, "children": [341, 342], "start_point": {"row": 92, "column": 23}, "end_point": {"row": 92, "column": 72}}, {"id": 341, "type": "identifier", "text": "palette_map_at_bottom", "parent": 340, "children": [], "start_point": {"row": 92, "column": 23}, "end_point": {"row": 92, "column": 44}}, {"id": 342, "type": "parameter_list", "text": "(bool palette_map_at_bottom)", "parent": 340, "children": [343], "start_point": {"row": 92, "column": 44}, "end_point": {"row": 92, "column": 72}}, {"id": 343, "type": "parameter_declaration", "text": "bool palette_map_at_bottom", "parent": 342, "children": [344, 345], "start_point": {"row": 92, "column": 45}, "end_point": {"row": 92, "column": 71}}, {"id": 344, "type": "primitive_type", "text": "bool", "parent": 343, "children": [], "start_point": {"row": 92, "column": 45}, "end_point": {"row": 92, "column": 49}}, {"id": 345, "type": "identifier", "text": "palette_map_at_bottom", "parent": 343, "children": [], "start_point": {"row": 92, "column": 50}, "end_point": {"row": 92, "column": 71}}, {"id": 346, "type": "declaration", "text": "bool palette_map_at_surface() const;\n class surface &palette_map_at_surface(bool palette_map_at_surface);", "parent": 138, "children": [347, 348, 353], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 95, "column": 75}}, {"id": 347, "type": "primitive_type", "text": "bool", "parent": 346, "children": [], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 12}}, {"id": 348, "type": "ERROR", "text": "palette_map_at_surface() const;\n class surface &", "parent": 346, "children": [349, 352], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 95, "column": 23}}, {"id": 349, "type": "function_declarator", "text": "palette_map_at_surface() const", "parent": 348, "children": [350, 351], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 43}}, {"id": 350, "type": "identifier", "text": "palette_map_at_surface", "parent": 349, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 35}}, {"id": 351, "type": "parameter_list", "text": "()", "parent": 349, "children": [], "start_point": {"row": 94, "column": 35}, "end_point": {"row": 94, "column": 37}}, {"id": 352, "type": "identifier", "text": "surface", "parent": 348, "children": [], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 21}}, {"id": 353, "type": "function_declarator", "text": "palette_map_at_surface(bool palette_map_at_surface)", "parent": 346, "children": [354, 355], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 74}}, {"id": 354, "type": "identifier", "text": "palette_map_at_surface", "parent": 353, "children": [], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 45}}, {"id": 355, "type": "parameter_list", "text": "(bool palette_map_at_surface)", "parent": 353, "children": [356], "start_point": {"row": 95, "column": 45}, "end_point": {"row": 95, "column": 74}}, {"id": 356, "type": "parameter_declaration", "text": "bool palette_map_at_surface", "parent": 355, "children": [357, 358], "start_point": {"row": 95, "column": 46}, "end_point": {"row": 95, "column": 73}}, {"id": 357, "type": "primitive_type", "text": "bool", "parent": 356, "children": [], "start_point": {"row": 95, "column": 46}, "end_point": {"row": 95, "column": 50}}, {"id": 358, "type": "identifier", "text": "palette_map_at_surface", "parent": 356, "children": [], "start_point": {"row": 95, "column": 51}, "end_point": {"row": 95, "column": 73}}, {"id": 359, "type": "declaration", "text": "bool palette_map_at_top() const;\n class surface &palette_map_at_top(bool palette_map_at_top);", "parent": 138, "children": [360, 361, 366], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 98, "column": 67}}, {"id": 360, "type": "primitive_type", "text": "bool", "parent": 359, "children": [], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 12}}, {"id": 361, "type": "ERROR", "text": "palette_map_at_top() const;\n class surface &", "parent": 359, "children": [362, 365], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 98, "column": 23}}, {"id": 362, "type": "function_declarator", "text": "palette_map_at_top() const", "parent": 361, "children": [363, 364], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 39}}, {"id": 363, "type": "identifier", "text": "palette_map_at_top", "parent": 362, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 31}}, {"id": 364, "type": "parameter_list", "text": "()", "parent": 362, "children": [], "start_point": {"row": 97, "column": 31}, "end_point": {"row": 97, "column": 33}}, {"id": 365, "type": "identifier", "text": "surface", "parent": 361, "children": [], "start_point": {"row": 98, "column": 14}, "end_point": {"row": 98, "column": 21}}, {"id": 366, "type": "function_declarator", "text": "palette_map_at_top(bool palette_map_at_top)", "parent": 359, "children": [367, 368], "start_point": {"row": 98, "column": 23}, "end_point": {"row": 98, "column": 66}}, {"id": 367, "type": "identifier", "text": "palette_map_at_top", "parent": 366, "children": [], "start_point": {"row": 98, "column": 23}, "end_point": {"row": 98, "column": 41}}, {"id": 368, "type": "parameter_list", "text": "(bool palette_map_at_top)", "parent": 366, "children": [369], "start_point": {"row": 98, "column": 41}, "end_point": {"row": 98, "column": 66}}, {"id": 369, "type": "parameter_declaration", "text": "bool palette_map_at_top", "parent": 368, "children": [370, 371], "start_point": {"row": 98, "column": 42}, "end_point": {"row": 98, "column": 65}}, {"id": 370, "type": "primitive_type", "text": "bool", "parent": 369, "children": [], "start_point": {"row": 98, "column": 42}, "end_point": {"row": 98, "column": 46}}, {"id": 371, "type": "identifier", "text": "palette_map_at_top", "parent": 369, "children": [], "start_point": {"row": 98, "column": 47}, "end_point": {"row": 98, "column": 65}}, {"id": 372, "type": "declaration", "text": "bool contour_base() const;\n class surface &contour_base(bool contour_base);", "parent": 138, "children": [373, 374, 379], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 101, "column": 55}}, {"id": 373, "type": "primitive_type", "text": "bool", "parent": 372, "children": [], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 12}}, {"id": 374, "type": "ERROR", "text": "contour_base() const;\n class surface &", "parent": 372, "children": [375, 378], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 101, "column": 23}}, {"id": 375, "type": "function_declarator", "text": "contour_base() const", "parent": 374, "children": [376, 377], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 33}}, {"id": 376, "type": "identifier", "text": "contour_base", "parent": 375, "children": [], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 25}}, {"id": 377, "type": "parameter_list", "text": "()", "parent": 375, "children": [], "start_point": {"row": 100, "column": 25}, "end_point": {"row": 100, "column": 27}}, {"id": 378, "type": "identifier", "text": "surface", "parent": 374, "children": [], "start_point": {"row": 101, "column": 14}, "end_point": {"row": 101, "column": 21}}, {"id": 379, "type": "function_declarator", "text": "contour_base(bool contour_base)", "parent": 372, "children": [380, 381], "start_point": {"row": 101, "column": 23}, "end_point": {"row": 101, "column": 54}}, {"id": 380, "type": "identifier", "text": "contour_base", "parent": 379, "children": [], "start_point": {"row": 101, "column": 23}, "end_point": {"row": 101, "column": 35}}, {"id": 381, "type": "parameter_list", "text": "(bool contour_base)", "parent": 379, "children": [382], "start_point": {"row": 101, "column": 35}, "end_point": {"row": 101, "column": 54}}, {"id": 382, "type": "parameter_declaration", "text": "bool contour_base", "parent": 381, "children": [383, 384], "start_point": {"row": 101, "column": 36}, "end_point": {"row": 101, "column": 53}}, {"id": 383, "type": "primitive_type", "text": "bool", "parent": 382, "children": [], "start_point": {"row": 101, "column": 36}, "end_point": {"row": 101, "column": 40}}, {"id": 384, "type": "identifier", "text": "contour_base", "parent": 382, "children": [], "start_point": {"row": 101, "column": 41}, "end_point": {"row": 101, "column": 53}}, {"id": 385, "type": "declaration", "text": "bool contour_surface() const;\n class surface &contour_surface(bool contour_surface);", "parent": 138, "children": [386, 387, 392], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 104, "column": 61}}, {"id": 386, "type": "primitive_type", "text": "bool", "parent": 385, "children": [], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 12}}, {"id": 387, "type": "ERROR", "text": "contour_surface() const;\n class surface &", "parent": 385, "children": [388, 391], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 104, "column": 23}}, {"id": 388, "type": "function_declarator", "text": "contour_surface() const", "parent": 387, "children": [389, 390], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 36}}, {"id": 389, "type": "identifier", "text": "contour_surface", "parent": 388, "children": [], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 28}}, {"id": 390, "type": "parameter_list", "text": "()", "parent": 388, "children": [], "start_point": {"row": 103, "column": 28}, "end_point": {"row": 103, "column": 30}}, {"id": 391, "type": "identifier", "text": "surface", "parent": 387, "children": [], "start_point": {"row": 104, "column": 14}, "end_point": {"row": 104, "column": 21}}, {"id": 392, "type": "function_declarator", "text": "contour_surface(bool contour_surface)", "parent": 385, "children": [393, 394], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 60}}, {"id": 393, "type": "identifier", "text": "contour_surface", "parent": 392, "children": [], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 38}}, {"id": 394, "type": "parameter_list", "text": "(bool contour_surface)", "parent": 392, "children": [395], "start_point": {"row": 104, "column": 38}, "end_point": {"row": 104, "column": 60}}, {"id": 395, "type": "parameter_declaration", "text": "bool contour_surface", "parent": 394, "children": [396, 397], "start_point": {"row": 104, "column": 39}, "end_point": {"row": 104, "column": 59}}, {"id": 396, "type": "primitive_type", "text": "bool", "parent": 395, "children": [], "start_point": {"row": 104, "column": 39}, "end_point": {"row": 104, "column": 43}}, {"id": 397, "type": "identifier", "text": "contour_surface", "parent": 395, "children": [], "start_point": {"row": 104, "column": 44}, "end_point": {"row": 104, "column": 59}}, {"id": 398, "type": "declaration", "text": "size_t contour_levels() const;\n class surface &contour_levels(size_t contour_levels);", "parent": 138, "children": [399, 400, 405], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 107, "column": 61}}, {"id": 399, "type": "primitive_type", "text": "size_t", "parent": 398, "children": [], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 14}}, {"id": 400, "type": "ERROR", "text": "contour_levels() const;\n class surface &", "parent": 398, "children": [401, 404], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 107, "column": 23}}, {"id": 401, "type": "function_declarator", "text": "contour_levels() const", "parent": 400, "children": [402, 403], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 37}}, {"id": 402, "type": "identifier", "text": "contour_levels", "parent": 401, "children": [], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 29}}, {"id": 403, "type": "parameter_list", "text": "()", "parent": 401, "children": [], "start_point": {"row": 106, "column": 29}, "end_point": {"row": 106, "column": 31}}, {"id": 404, "type": "identifier", "text": "surface", "parent": 400, "children": [], "start_point": {"row": 107, "column": 14}, "end_point": {"row": 107, "column": 21}}, {"id": 405, "type": "function_declarator", "text": "contour_levels(size_t contour_levels)", "parent": 398, "children": [406, 407], "start_point": {"row": 107, "column": 23}, "end_point": {"row": 107, "column": 60}}, {"id": 406, "type": "identifier", "text": "contour_levels", "parent": 405, "children": [], "start_point": {"row": 107, "column": 23}, "end_point": {"row": 107, "column": 37}}, {"id": 407, "type": "parameter_list", "text": "(size_t contour_levels)", "parent": 405, "children": [408], "start_point": {"row": 107, "column": 37}, "end_point": {"row": 107, "column": 60}}, {"id": 408, "type": "parameter_declaration", "text": "size_t contour_levels", "parent": 407, "children": [409, 410], "start_point": {"row": 107, "column": 38}, "end_point": {"row": 107, "column": 59}}, {"id": 409, "type": "primitive_type", "text": "size_t", "parent": 408, "children": [], "start_point": {"row": 107, "column": 38}, "end_point": {"row": 107, "column": 44}}, {"id": 410, "type": "identifier", "text": "contour_levels", "parent": 408, "children": [], "start_point": {"row": 107, "column": 45}, "end_point": {"row": 107, "column": 59}}, {"id": 411, "type": "declaration", "text": "const std::vector<double> &contour_values() const;\n class surface &\n contour_values(const std::vector<double> &contour_values);", "parent": 138, "children": [412, 413, 422], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 111, "column": 66}}, {"id": 412, "type": "type_identifier", "text": "std", "parent": 411, "children": [], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 17}}, {"id": 413, "type": "ERROR", "text": "::vector<double> &contour_values() const;\n class surface &", "parent": 411, "children": [414, 415, 416, 417, 418, 421], "start_point": {"row": 109, "column": 17}, "end_point": {"row": 110, "column": 23}}, {"id": 414, "type": "identifier", "text": "vector", "parent": 413, "children": [], "start_point": {"row": 109, "column": 19}, "end_point": {"row": 109, "column": 25}}, {"id": 415, "type": "<", "text": "<", "parent": 413, "children": [], "start_point": {"row": 109, "column": 25}, "end_point": {"row": 109, "column": 26}}, {"id": 416, "type": "primitive_type", "text": "double", "parent": 413, "children": [], "start_point": {"row": 109, "column": 26}, "end_point": {"row": 109, "column": 32}}, {"id": 417, "type": ">", "text": ">", "parent": 413, "children": [], "start_point": {"row": 109, "column": 32}, "end_point": {"row": 109, "column": 33}}, {"id": 418, "type": "function_declarator", "text": "contour_values() const", "parent": 413, "children": [419, 420], "start_point": {"row": 109, "column": 35}, "end_point": {"row": 109, "column": 57}}, {"id": 419, "type": "identifier", "text": "contour_values", "parent": 418, "children": [], "start_point": {"row": 109, "column": 35}, "end_point": {"row": 109, "column": 49}}, {"id": 420, "type": "parameter_list", "text": "()", "parent": 418, "children": [], "start_point": {"row": 109, "column": 49}, "end_point": {"row": 109, "column": 51}}, {"id": 421, "type": "identifier", "text": "surface", "parent": 413, "children": [], "start_point": {"row": 110, "column": 14}, "end_point": {"row": 110, "column": 21}}, {"id": 422, "type": "function_declarator", "text": "contour_values(const std::vector<double> &contour_values)", "parent": 411, "children": [423, 424], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 65}}, {"id": 423, "type": "identifier", "text": "contour_values", "parent": 422, "children": [], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 22}}, {"id": 424, "type": "parameter_list", "text": "(const std::vector<double> &contour_values)", "parent": 422, "children": [425], "start_point": {"row": 111, "column": 22}, "end_point": {"row": 111, "column": 65}}, {"id": 425, "type": "parameter_declaration", "text": "const std::vector<double> &contour_values", "parent": 424, "children": [426, 427, 432], "start_point": {"row": 111, "column": 23}, "end_point": {"row": 111, "column": 64}}, {"id": 426, "type": "type_identifier", "text": "std", "parent": 425, "children": [], "start_point": {"row": 111, "column": 29}, "end_point": {"row": 111, "column": 32}}, {"id": 427, "type": "ERROR", "text": "::vector<double> &", "parent": 425, "children": [428, 429, 430, 431], "start_point": {"row": 111, "column": 32}, "end_point": {"row": 111, "column": 50}}, {"id": 428, "type": "identifier", "text": "vector", "parent": 427, "children": [], "start_point": {"row": 111, "column": 34}, "end_point": {"row": 111, "column": 40}}, {"id": 429, "type": "<", "text": "<", "parent": 427, "children": [], "start_point": {"row": 111, "column": 40}, "end_point": {"row": 111, "column": 41}}, {"id": 430, "type": "primitive_type", "text": "double", "parent": 427, "children": [], "start_point": {"row": 111, "column": 41}, "end_point": {"row": 111, "column": 47}}, {"id": 431, "type": ">", "text": ">", "parent": 427, "children": [], "start_point": {"row": 111, "column": 47}, "end_point": {"row": 111, "column": 48}}, {"id": 432, "type": "identifier", "text": "contour_values", "parent": 425, "children": [], "start_point": {"row": 111, "column": 50}, "end_point": {"row": 111, "column": 64}}, {"id": 433, "type": "declaration", "text": "bool contour_text() const;\n class surface &contour_text(bool contour_text);", "parent": 138, "children": [434, 435, 440], "start_point": {"row": 113, "column": 8}, "end_point": {"row": 114, "column": 55}}, {"id": 434, "type": "primitive_type", "text": "bool", "parent": 433, "children": [], "start_point": {"row": 113, "column": 8}, "end_point": {"row": 113, "column": 12}}, {"id": 435, "type": "ERROR", "text": "contour_text() const;\n class surface &", "parent": 433, "children": [436, 439], "start_point": {"row": 113, "column": 13}, "end_point": {"row": 114, "column": 23}}, {"id": 436, "type": "function_declarator", "text": "contour_text() const", "parent": 435, "children": [437, 438], "start_point": {"row": 113, "column": 13}, "end_point": {"row": 113, "column": 33}}, {"id": 437, "type": "identifier", "text": "contour_text", "parent": 436, "children": [], "start_point": {"row": 113, "column": 13}, "end_point": {"row": 113, "column": 25}}, {"id": 438, "type": "parameter_list", "text": "()", "parent": 436, "children": [], "start_point": {"row": 113, "column": 25}, "end_point": {"row": 113, "column": 27}}, {"id": 439, "type": "identifier", "text": "surface", "parent": 435, "children": [], "start_point": {"row": 114, "column": 14}, "end_point": {"row": 114, "column": 21}}, {"id": 440, "type": "function_declarator", "text": "contour_text(bool contour_text)", "parent": 433, "children": [441, 442], "start_point": {"row": 114, "column": 23}, "end_point": {"row": 114, "column": 54}}, {"id": 441, "type": "identifier", "text": "contour_text", "parent": 440, "children": [], "start_point": {"row": 114, "column": 23}, "end_point": {"row": 114, "column": 35}}, {"id": 442, "type": "parameter_list", "text": "(bool contour_text)", "parent": 440, "children": [443], "start_point": {"row": 114, "column": 35}, "end_point": {"row": 114, "column": 54}}, {"id": 443, "type": "parameter_declaration", "text": "bool contour_text", "parent": 442, "children": [444, 445], "start_point": {"row": 114, "column": 36}, "end_point": {"row": 114, "column": 53}}, {"id": 444, "type": "primitive_type", "text": "bool", "parent": 443, "children": [], "start_point": {"row": 114, "column": 36}, "end_point": {"row": 114, "column": 40}}, {"id": 445, "type": "identifier", "text": "contour_text", "parent": 443, "children": [], "start_point": {"row": 114, "column": 41}, "end_point": {"row": 114, "column": 53}}, {"id": 446, "type": "declaration", "text": "const float font_size() const;\n class surface &font_size(const float &font_size);", "parent": 138, "children": [447, 448, 453], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 117, "column": 57}}, {"id": 447, "type": "primitive_type", "text": "float", "parent": 446, "children": [], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 19}}, {"id": 448, "type": "ERROR", "text": "font_size() const;\n class surface &", "parent": 446, "children": [449, 452], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 117, "column": 23}}, {"id": 449, "type": "function_declarator", "text": "font_size() const", "parent": 448, "children": [450, 451], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 37}}, {"id": 450, "type": "identifier", "text": "font_size", "parent": 449, "children": [], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 29}}, {"id": 451, "type": "parameter_list", "text": "()", "parent": 449, "children": [], "start_point": {"row": 116, "column": 29}, "end_point": {"row": 116, "column": 31}}, {"id": 452, "type": "identifier", "text": "surface", "parent": 448, "children": [], "start_point": {"row": 117, "column": 14}, "end_point": {"row": 117, "column": 21}}, {"id": 453, "type": "function_declarator", "text": "font_size(const float &font_size)", "parent": 446, "children": [454, 455], "start_point": {"row": 117, "column": 23}, "end_point": {"row": 117, "column": 56}}, {"id": 454, "type": "identifier", "text": "font_size", "parent": 453, "children": [], "start_point": {"row": 117, "column": 23}, "end_point": {"row": 117, "column": 32}}, {"id": 455, "type": "parameter_list", "text": "(const float &font_size)", "parent": 453, "children": [456], "start_point": {"row": 117, "column": 32}, "end_point": {"row": 117, "column": 56}}, {"id": 456, "type": "parameter_declaration", "text": "const float &font_size", "parent": 455, "children": [457, 458], "start_point": {"row": 117, "column": 33}, "end_point": {"row": 117, "column": 55}}, {"id": 457, "type": "primitive_type", "text": "float", "parent": 456, "children": [], "start_point": {"row": 117, "column": 39}, "end_point": {"row": 117, "column": 44}}, {"id": 458, "type": "identifier", "text": "font_size", "parent": 456, "children": [], "start_point": {"row": 117, "column": 46}, "end_point": {"row": 117, "column": 55}}, {"id": 459, "type": "declaration", "text": "const std::string font() const;\n class surface &font(const std::string &font);", "parent": 138, "children": [460, 461, 467], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 120, "column": 53}}, {"id": 460, "type": "type_identifier", "text": "std", "parent": 459, "children": [], "start_point": {"row": 119, "column": 14}, "end_point": {"row": 119, "column": 17}}, {"id": 461, "type": "ERROR", "text": "::string font() const;\n class surface &", "parent": 459, "children": [462, 463, 466], "start_point": {"row": 119, "column": 17}, "end_point": {"row": 120, "column": 23}}, {"id": 462, "type": "identifier", "text": "string", "parent": 461, "children": [], "start_point": {"row": 119, "column": 19}, "end_point": {"row": 119, "column": 25}}, {"id": 463, "type": "function_declarator", "text": "font() const", "parent": 461, "children": [464, 465], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 38}}, {"id": 464, "type": "identifier", "text": "font", "parent": 463, "children": [], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 30}}, {"id": 465, "type": "parameter_list", "text": "()", "parent": 463, "children": [], "start_point": {"row": 119, "column": 30}, "end_point": {"row": 119, "column": 32}}, {"id": 466, "type": "identifier", "text": "surface", "parent": 461, "children": [], "start_point": {"row": 120, "column": 14}, "end_point": {"row": 120, "column": 21}}, {"id": 467, "type": "function_declarator", "text": "font(const std::string &font)", "parent": 459, "children": [468, 469], "start_point": {"row": 120, "column": 23}, "end_point": {"row": 120, "column": 52}}, {"id": 468, "type": "identifier", "text": "font", "parent": 467, "children": [], "start_point": {"row": 120, "column": 23}, "end_point": {"row": 120, "column": 27}}, {"id": 469, "type": "parameter_list", "text": "(const std::string &font)", "parent": 467, "children": [470], "start_point": {"row": 120, "column": 27}, "end_point": {"row": 120, "column": 52}}, {"id": 470, "type": "parameter_declaration", "text": "const std::string &font", "parent": 469, "children": [471, 472, 474], "start_point": {"row": 120, "column": 28}, "end_point": {"row": 120, "column": 51}}, {"id": 471, "type": "type_identifier", "text": "std", "parent": 470, "children": [], "start_point": {"row": 120, "column": 34}, "end_point": {"row": 120, "column": 37}}, {"id": 472, "type": "ERROR", "text": "::string &", "parent": 470, "children": [473], "start_point": {"row": 120, "column": 37}, "end_point": {"row": 120, "column": 47}}, {"id": 473, "type": "identifier", "text": "string", "parent": 472, "children": [], "start_point": {"row": 120, "column": 39}, "end_point": {"row": 120, "column": 45}}, {"id": 474, "type": "identifier", "text": "font", "parent": 470, "children": [], "start_point": {"row": 120, "column": 47}, "end_point": {"row": 120, "column": 51}}, {"id": 475, "type": "declaration", "text": "const std::string &font_weight() const;\n class surface &font_weight(const std::string &font_weight);", "parent": 138, "children": [476, 477, 483], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 123, "column": 67}}, {"id": 476, "type": "type_identifier", "text": "std", "parent": 475, "children": [], "start_point": {"row": 122, "column": 14}, "end_point": {"row": 122, "column": 17}}, {"id": 477, "type": "ERROR", "text": "::string &font_weight() const;\n class surface &", "parent": 475, "children": [478, 479, 482], "start_point": {"row": 122, "column": 17}, "end_point": {"row": 123, "column": 23}}, {"id": 478, "type": "identifier", "text": "string", "parent": 477, "children": [], "start_point": {"row": 122, "column": 19}, "end_point": {"row": 122, "column": 25}}, {"id": 479, "type": "function_declarator", "text": "font_weight() const", "parent": 477, "children": [480, 481], "start_point": {"row": 122, "column": 27}, "end_point": {"row": 122, "column": 46}}, {"id": 480, "type": "identifier", "text": "font_weight", "parent": 479, "children": [], "start_point": {"row": 122, "column": 27}, "end_point": {"row": 122, "column": 38}}, {"id": 481, "type": "parameter_list", "text": "()", "parent": 479, "children": [], "start_point": {"row": 122, "column": 38}, "end_point": {"row": 122, "column": 40}}, {"id": 482, "type": "identifier", "text": "surface", "parent": 477, "children": [], "start_point": {"row": 123, "column": 14}, "end_point": {"row": 123, "column": 21}}, {"id": 483, "type": "function_declarator", "text": "font_weight(const std::string &font_weight)", "parent": 475, "children": [484, 485], "start_point": {"row": 123, "column": 23}, "end_point": {"row": 123, "column": 66}}, {"id": 484, "type": "identifier", "text": "font_weight", "parent": 483, "children": [], "start_point": {"row": 123, "column": 23}, "end_point": {"row": 123, "column": 34}}, {"id": 485, "type": "parameter_list", "text": "(const std::string &font_weight)", "parent": 483, "children": [486], "start_point": {"row": 123, "column": 34}, "end_point": {"row": 123, "column": 66}}, {"id": 486, "type": "parameter_declaration", "text": "const std::string &font_weight", "parent": 485, "children": [487, 488, 490], "start_point": {"row": 123, "column": 35}, "end_point": {"row": 123, "column": 65}}, {"id": 487, "type": "type_identifier", "text": "std", "parent": 486, "children": [], "start_point": {"row": 123, "column": 41}, "end_point": {"row": 123, "column": 44}}, {"id": 488, "type": "ERROR", "text": "::string &", "parent": 486, "children": [489], "start_point": {"row": 123, "column": 44}, "end_point": {"row": 123, "column": 54}}, {"id": 489, "type": "identifier", "text": "string", "parent": 488, "children": [], "start_point": {"row": 123, "column": 46}, "end_point": {"row": 123, "column": 52}}, {"id": 490, "type": "identifier", "text": "font_weight", "parent": 486, "children": [], "start_point": {"row": 123, "column": 54}, "end_point": {"row": 123, "column": 65}}, {"id": 491, "type": "declaration", "text": "const color_array &font_color() const;\n class surface &font_color(const color_array &font_color);", "parent": 138, "children": [492, 493, 498], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 126, "column": 65}}, {"id": 492, "type": "type_identifier", "text": "color_array", "parent": 491, "children": [], "start_point": {"row": 125, "column": 14}, "end_point": {"row": 125, "column": 25}}, {"id": 493, "type": "ERROR", "text": "&font_color() const;\n class surface &", "parent": 491, "children": [494, 497], "start_point": {"row": 125, "column": 26}, "end_point": {"row": 126, "column": 23}}, {"id": 494, "type": "function_declarator", "text": "font_color() const", "parent": 493, "children": [495, 496], "start_point": {"row": 125, "column": 27}, "end_point": {"row": 125, "column": 45}}, {"id": 495, "type": "identifier", "text": "font_color", "parent": 494, "children": [], "start_point": {"row": 125, "column": 27}, "end_point": {"row": 125, "column": 37}}, {"id": 496, "type": "parameter_list", "text": "()", "parent": 494, "children": [], "start_point": {"row": 125, "column": 37}, "end_point": {"row": 125, "column": 39}}, {"id": 497, "type": "identifier", "text": "surface", "parent": 493, "children": [], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 21}}, {"id": 498, "type": "function_declarator", "text": "font_color(const color_array &font_color)", "parent": 491, "children": [499, 500], "start_point": {"row": 126, "column": 23}, "end_point": {"row": 126, "column": 64}}, {"id": 499, "type": "identifier", "text": "font_color", "parent": 498, "children": [], "start_point": {"row": 126, "column": 23}, "end_point": {"row": 126, "column": 33}}, {"id": 500, "type": "parameter_list", "text": "(const color_array &font_color)", "parent": 498, "children": [501], "start_point": {"row": 126, "column": 33}, "end_point": {"row": 126, "column": 64}}, {"id": 501, "type": "parameter_declaration", "text": "const color_array &font_color", "parent": 500, "children": [502, 503], "start_point": {"row": 126, "column": 34}, "end_point": {"row": 126, "column": 63}}, {"id": 502, "type": "type_identifier", "text": "color_array", "parent": 501, "children": [], "start_point": {"row": 126, "column": 40}, "end_point": {"row": 126, "column": 51}}, {"id": 503, "type": "identifier", "text": "font_color", "parent": 501, "children": [], "start_point": {"row": 126, "column": 53}, "end_point": {"row": 126, "column": 63}}, {"id": 504, "type": "declaration", "text": "class surface &font_color(const std::string &font_color);", "parent": 138, "children": [505, 507], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 65}}, {"id": 505, "type": "ERROR", "text": "surface &", "parent": 504, "children": [506], "start_point": {"row": 127, "column": 14}, "end_point": {"row": 127, "column": 23}}, {"id": 506, "type": "identifier", "text": "surface", "parent": 505, "children": [], "start_point": {"row": 127, "column": 14}, "end_point": {"row": 127, "column": 21}}, {"id": 507, "type": "function_declarator", "text": "font_color(const std::string &font_color)", "parent": 504, "children": [508, 509], "start_point": {"row": 127, "column": 23}, "end_point": {"row": 127, "column": 64}}, {"id": 508, "type": "identifier", "text": "font_color", "parent": 507, "children": [], "start_point": {"row": 127, "column": 23}, "end_point": {"row": 127, "column": 33}}, {"id": 509, "type": "parameter_list", "text": "(const std::string &font_color)", "parent": 507, "children": [510], "start_point": {"row": 127, "column": 33}, "end_point": {"row": 127, "column": 64}}, {"id": 510, "type": "parameter_declaration", "text": "const std::string &font_color", "parent": 509, "children": [511, 512, 514], "start_point": {"row": 127, "column": 34}, "end_point": {"row": 127, "column": 63}}, {"id": 511, "type": "type_identifier", "text": "std", "parent": 510, "children": [], "start_point": {"row": 127, "column": 40}, "end_point": {"row": 127, "column": 43}}, {"id": 512, "type": "ERROR", "text": "::string &", "parent": 510, "children": [513], "start_point": {"row": 127, "column": 43}, "end_point": {"row": 127, "column": 53}}, {"id": 513, "type": "identifier", "text": "string", "parent": 512, "children": [], "start_point": {"row": 127, "column": 45}, "end_point": {"row": 127, "column": 51}}, {"id": 514, "type": "identifier", "text": "font_color", "parent": 510, "children": [], "start_point": {"row": 127, "column": 53}, "end_point": {"row": 127, "column": 63}}, {"id": 515, "type": "declaration", "text": "bool depthorder() const;\n\n class surface &depthorder(bool depthorder);", "parent": 138, "children": [516, 517, 522], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 131, "column": 51}}, {"id": 516, "type": "primitive_type", "text": "bool", "parent": 515, "children": [], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 12}}, {"id": 517, "type": "ERROR", "text": "depthorder() const;\n\n class surface &", "parent": 515, "children": [518, 521], "start_point": {"row": 129, "column": 13}, "end_point": {"row": 131, "column": 23}}, {"id": 518, "type": "function_declarator", "text": "depthorder() const", "parent": 517, "children": [519, 520], "start_point": {"row": 129, "column": 13}, "end_point": {"row": 129, "column": 31}}, {"id": 519, "type": "identifier", "text": "depthorder", "parent": 518, "children": [], "start_point": {"row": 129, "column": 13}, "end_point": {"row": 129, "column": 23}}, {"id": 520, "type": "parameter_list", "text": "()", "parent": 518, "children": [], "start_point": {"row": 129, "column": 23}, "end_point": {"row": 129, "column": 25}}, {"id": 521, "type": "identifier", "text": "surface", "parent": 517, "children": [], "start_point": {"row": 131, "column": 14}, "end_point": {"row": 131, "column": 21}}, {"id": 522, "type": "function_declarator", "text": "depthorder(bool depthorder)", "parent": 515, "children": [523, 524], "start_point": {"row": 131, "column": 23}, "end_point": {"row": 131, "column": 50}}, {"id": 523, "type": "identifier", "text": "depthorder", "parent": 522, "children": [], "start_point": {"row": 131, "column": 23}, "end_point": {"row": 131, "column": 33}}, {"id": 524, "type": "parameter_list", "text": "(bool depthorder)", "parent": 522, "children": [525], "start_point": {"row": 131, "column": 33}, "end_point": {"row": 131, "column": 50}}, {"id": 525, "type": "parameter_declaration", "text": "bool depthorder", "parent": 524, "children": [526, 527], "start_point": {"row": 131, "column": 34}, "end_point": {"row": 131, "column": 49}}, {"id": 526, "type": "primitive_type", "text": "bool", "parent": 525, "children": [], "start_point": {"row": 131, "column": 34}, "end_point": {"row": 131, "column": 38}}, {"id": 527, "type": "identifier", "text": "depthorder", "parent": 525, "children": [], "start_point": {"row": 131, "column": 39}, "end_point": {"row": 131, "column": 49}}, {"id": 528, "type": "declaration", "text": "float face_alpha() const;\n class surface &face_alpha(float face_alpha);", "parent": 138, "children": [529, 530, 535], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 134, "column": 52}}, {"id": 529, "type": "primitive_type", "text": "float", "parent": 528, "children": [], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 13}}, {"id": 530, "type": "ERROR", "text": "face_alpha() const;\n class surface &", "parent": 528, "children": [531, 534], "start_point": {"row": 133, "column": 14}, "end_point": {"row": 134, "column": 23}}, {"id": 531, "type": "function_declarator", "text": "face_alpha() const", "parent": 530, "children": [532, 533], "start_point": {"row": 133, "column": 14}, "end_point": {"row": 133, "column": 32}}, {"id": 532, "type": "identifier", "text": "face_alpha", "parent": 531, "children": [], "start_point": {"row": 133, "column": 14}, "end_point": {"row": 133, "column": 24}}, {"id": 533, "type": "parameter_list", "text": "()", "parent": 531, "children": [], "start_point": {"row": 133, "column": 24}, "end_point": {"row": 133, "column": 26}}, {"id": 534, "type": "identifier", "text": "surface", "parent": 530, "children": [], "start_point": {"row": 134, "column": 14}, "end_point": {"row": 134, "column": 21}}, {"id": 535, "type": "function_declarator", "text": "face_alpha(float face_alpha)", "parent": 528, "children": [536, 537], "start_point": {"row": 134, "column": 23}, "end_point": {"row": 134, "column": 51}}, {"id": 536, "type": "identifier", "text": "face_alpha", "parent": 535, "children": [], "start_point": {"row": 134, "column": 23}, "end_point": {"row": 134, "column": 33}}, {"id": 537, "type": "parameter_list", "text": "(float face_alpha)", "parent": 535, "children": [538], "start_point": {"row": 134, "column": 33}, "end_point": {"row": 134, "column": 51}}, {"id": 538, "type": "parameter_declaration", "text": "float face_alpha", "parent": 537, "children": [539, 540], "start_point": {"row": 134, "column": 34}, "end_point": {"row": 134, "column": 50}}, {"id": 539, "type": "primitive_type", "text": "float", "parent": 538, "children": [], "start_point": {"row": 134, "column": 34}, "end_point": {"row": 134, "column": 39}}, {"id": 540, "type": "identifier", "text": "face_alpha", "parent": 538, "children": [], "start_point": {"row": 134, "column": 40}, "end_point": {"row": 134, "column": 50}}, {"id": 541, "type": "declaration", "text": "bool lighting() const;\n class surface &lighting(bool lighting);", "parent": 138, "children": [542, 543, 548], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 137, "column": 47}}, {"id": 542, "type": "primitive_type", "text": "bool", "parent": 541, "children": [], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 136, "column": 12}}, {"id": 543, "type": "ERROR", "text": "lighting() const;\n class surface &", "parent": 541, "children": [544, 547], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 137, "column": 23}}, {"id": 544, "type": "function_declarator", "text": "lighting() const", "parent": 543, "children": [545, 546], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 29}}, {"id": 545, "type": "identifier", "text": "lighting", "parent": 544, "children": [], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 21}}, {"id": 546, "type": "parameter_list", "text": "()", "parent": 544, "children": [], "start_point": {"row": 136, "column": 21}, "end_point": {"row": 136, "column": 23}}, {"id": 547, "type": "identifier", "text": "surface", "parent": 543, "children": [], "start_point": {"row": 137, "column": 14}, "end_point": {"row": 137, "column": 21}}, {"id": 548, "type": "function_declarator", "text": "lighting(bool lighting)", "parent": 541, "children": [549, 550], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 46}}, {"id": 549, "type": "identifier", "text": "lighting", "parent": 548, "children": [], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 31}}, {"id": 550, "type": "parameter_list", "text": "(bool lighting)", "parent": 548, "children": [551], "start_point": {"row": 137, "column": 31}, "end_point": {"row": 137, "column": 46}}, {"id": 551, "type": "parameter_declaration", "text": "bool lighting", "parent": 550, "children": [552, 553], "start_point": {"row": 137, "column": 32}, "end_point": {"row": 137, "column": 45}}, {"id": 552, "type": "primitive_type", "text": "bool", "parent": 551, "children": [], "start_point": {"row": 137, "column": 32}, "end_point": {"row": 137, "column": 36}}, {"id": 553, "type": "identifier", "text": "lighting", "parent": 551, "children": [], "start_point": {"row": 137, "column": 37}, "end_point": {"row": 137, "column": 45}}, {"id": 554, "type": "declaration", "text": "float primary() const;\n class surface &primary(float amount);", "parent": 138, "children": [555, 556, 561], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 140, "column": 45}}, {"id": 555, "type": "primitive_type", "text": "float", "parent": 554, "children": [], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 13}}, {"id": 556, "type": "ERROR", "text": "primary() const;\n class surface &", "parent": 554, "children": [557, 560], "start_point": {"row": 139, "column": 14}, "end_point": {"row": 140, "column": 23}}, {"id": 557, "type": "function_declarator", "text": "primary() const", "parent": 556, "children": [558, 559], "start_point": {"row": 139, "column": 14}, "end_point": {"row": 139, "column": 29}}, {"id": 558, "type": "identifier", "text": "primary", "parent": 557, "children": [], "start_point": {"row": 139, "column": 14}, "end_point": {"row": 139, "column": 21}}, {"id": 559, "type": "parameter_list", "text": "()", "parent": 557, "children": [], "start_point": {"row": 139, "column": 21}, "end_point": {"row": 139, "column": 23}}, {"id": 560, "type": "identifier", "text": "surface", "parent": 556, "children": [], "start_point": {"row": 140, "column": 14}, "end_point": {"row": 140, "column": 21}}, {"id": 561, "type": "function_declarator", "text": "primary(float amount)", "parent": 554, "children": [562, 563], "start_point": {"row": 140, "column": 23}, "end_point": {"row": 140, "column": 44}}, {"id": 562, "type": "identifier", "text": "primary", "parent": 561, "children": [], "start_point": {"row": 140, "column": 23}, "end_point": {"row": 140, "column": 30}}, {"id": 563, "type": "parameter_list", "text": "(float amount)", "parent": 561, "children": [564], "start_point": {"row": 140, "column": 30}, "end_point": {"row": 140, "column": 44}}, {"id": 564, "type": "parameter_declaration", "text": "float amount", "parent": 563, "children": [565, 566], "start_point": {"row": 140, "column": 31}, "end_point": {"row": 140, "column": 43}}, {"id": 565, "type": "primitive_type", "text": "float", "parent": 564, "children": [], "start_point": {"row": 140, "column": 31}, "end_point": {"row": 140, "column": 36}}, {"id": 566, "type": "identifier", "text": "amount", "parent": 564, "children": [], "start_point": {"row": 140, "column": 37}, "end_point": {"row": 140, "column": 43}}, {"id": 567, "type": "declaration", "text": "float specular() const;\n class surface &specular(float amount);", "parent": 138, "children": [568, 569, 574], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 143, "column": 46}}, {"id": 568, "type": "primitive_type", "text": "float", "parent": 567, "children": [], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 13}}, {"id": 569, "type": "ERROR", "text": "specular() const;\n class surface &", "parent": 567, "children": [570, 573], "start_point": {"row": 142, "column": 14}, "end_point": {"row": 143, "column": 23}}, {"id": 570, "type": "function_declarator", "text": "specular() const", "parent": 569, "children": [571, 572], "start_point": {"row": 142, "column": 14}, "end_point": {"row": 142, "column": 30}}, {"id": 571, "type": "identifier", "text": "specular", "parent": 570, "children": [], "start_point": {"row": 142, "column": 14}, "end_point": {"row": 142, "column": 22}}, {"id": 572, "type": "parameter_list", "text": "()", "parent": 570, "children": [], "start_point": {"row": 142, "column": 22}, "end_point": {"row": 142, "column": 24}}, {"id": 573, "type": "identifier", "text": "surface", "parent": 569, "children": [], "start_point": {"row": 143, "column": 14}, "end_point": {"row": 143, "column": 21}}, {"id": 574, "type": "function_declarator", "text": "specular(float amount)", "parent": 567, "children": [575, 576], "start_point": {"row": 143, "column": 23}, "end_point": {"row": 143, "column": 45}}, {"id": 575, "type": "identifier", "text": "specular", "parent": 574, "children": [], "start_point": {"row": 143, "column": 23}, "end_point": {"row": 143, "column": 31}}, {"id": 576, "type": "parameter_list", "text": "(float amount)", "parent": 574, "children": [577], "start_point": {"row": 143, "column": 31}, "end_point": {"row": 143, "column": 45}}, {"id": 577, "type": "parameter_declaration", "text": "float amount", "parent": 576, "children": [578, 579], "start_point": {"row": 143, "column": 32}, "end_point": {"row": 143, "column": 44}}, {"id": 578, "type": "primitive_type", "text": "float", "parent": 577, "children": [], "start_point": {"row": 143, "column": 32}, "end_point": {"row": 143, "column": 37}}, {"id": 579, "type": "identifier", "text": "amount", "parent": 577, "children": [], "start_point": {"row": 143, "column": 38}, "end_point": {"row": 143, "column": 44}}, {"id": 580, "type": "declaration", "text": "const class line_spec &contour_line_spec() const;\n class line_spec &contour_line_spec();", "parent": 138, "children": [581, 587], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 146, "column": 45}}, {"id": 581, "type": "ERROR", "text": "line_spec &contour_line_spec() const;\n class line_spec &", "parent": 580, "children": [582, 583, 586], "start_point": {"row": 145, "column": 20}, "end_point": {"row": 146, "column": 25}}, {"id": 582, "type": "identifier", "text": "line_spec", "parent": 581, "children": [], "start_point": {"row": 145, "column": 20}, "end_point": {"row": 145, "column": 29}}, {"id": 583, "type": "function_declarator", "text": "contour_line_spec() const", "parent": 581, "children": [584, 585], "start_point": {"row": 145, "column": 31}, "end_point": {"row": 145, "column": 56}}, {"id": 584, "type": "identifier", "text": "contour_line_spec", "parent": 583, "children": [], "start_point": {"row": 145, "column": 31}, "end_point": {"row": 145, "column": 48}}, {"id": 585, "type": "parameter_list", "text": "()", "parent": 583, "children": [], "start_point": {"row": 145, "column": 48}, "end_point": {"row": 145, "column": 50}}, {"id": 586, "type": "identifier", "text": "line_spec", "parent": 581, "children": [], "start_point": {"row": 146, "column": 14}, "end_point": {"row": 146, "column": 23}}, {"id": 587, "type": "function_declarator", "text": "contour_line_spec()", "parent": 580, "children": [588, 589], "start_point": {"row": 146, "column": 25}, "end_point": {"row": 146, "column": 44}}, {"id": 588, "type": "identifier", "text": "contour_line_spec", "parent": 587, "children": [], "start_point": {"row": 146, "column": 25}, "end_point": {"row": 146, "column": 42}}, {"id": 589, "type": "parameter_list", "text": "()", "parent": 587, "children": [], "start_point": {"row": 146, "column": 42}, "end_point": {"row": 146, "column": 44}}, {"id": 590, "type": "declaration", "text": "class surface &\n contour_line_spec(const class line_spec &contour_line_spec);", "parent": 138, "children": [591, 593], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 148, "column": 68}}, {"id": 591, "type": "ERROR", "text": "surface &", "parent": 590, "children": [592], "start_point": {"row": 147, "column": 14}, "end_point": {"row": 147, "column": 23}}, {"id": 592, "type": "identifier", "text": "surface", "parent": 591, "children": [], "start_point": {"row": 147, "column": 14}, "end_point": {"row": 147, "column": 21}}, {"id": 593, "type": "function_declarator", "text": "contour_line_spec(const class line_spec &contour_line_spec)", "parent": 590, "children": [594, 595], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 67}}, {"id": 594, "type": "identifier", "text": "contour_line_spec", "parent": 593, "children": [], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 25}}, {"id": 595, "type": "parameter_list", "text": "(const class line_spec &contour_line_spec)", "parent": 593, "children": [596], "start_point": {"row": 148, "column": 25}, "end_point": {"row": 148, "column": 67}}, {"id": 596, "type": "parameter_declaration", "text": "const class line_spec &contour_line_spec", "parent": 595, "children": [597, 599], "start_point": {"row": 148, "column": 26}, "end_point": {"row": 148, "column": 66}}, {"id": 597, "type": "ERROR", "text": "line_spec &", "parent": 596, "children": [598], "start_point": {"row": 148, "column": 38}, "end_point": {"row": 148, "column": 49}}, {"id": 598, "type": "identifier", "text": "line_spec", "parent": 597, "children": [], "start_point": {"row": 148, "column": 38}, "end_point": {"row": 148, "column": 47}}, {"id": 599, "type": "identifier", "text": "contour_line_spec", "parent": 596, "children": [], "start_point": {"row": 148, "column": 49}, "end_point": {"row": 148, "column": 66}}, {"id": 600, "type": "declaration", "text": "bool curtain() const;\n class surface &curtain(bool curtain);", "parent": 138, "children": [601, 602, 607], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 151, "column": 45}}, {"id": 601, "type": "primitive_type", "text": "bool", "parent": 600, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 12}}, {"id": 602, "type": "ERROR", "text": "curtain() const;\n class surface &", "parent": 600, "children": [603, 606], "start_point": {"row": 150, "column": 13}, "end_point": {"row": 151, "column": 23}}, {"id": 603, "type": "function_declarator", "text": "curtain() const", "parent": 602, "children": [604, 605], "start_point": {"row": 150, "column": 13}, "end_point": {"row": 150, "column": 28}}, {"id": 604, "type": "identifier", "text": "curtain", "parent": 603, "children": [], "start_point": {"row": 150, "column": 13}, "end_point": {"row": 150, "column": 20}}, {"id": 605, "type": "parameter_list", "text": "()", "parent": 603, "children": [], "start_point": {"row": 150, "column": 20}, "end_point": {"row": 150, "column": 22}}, {"id": 606, "type": "identifier", "text": "surface", "parent": 602, "children": [], "start_point": {"row": 151, "column": 14}, "end_point": {"row": 151, "column": 21}}, {"id": 607, "type": "function_declarator", "text": "curtain(bool curtain)", "parent": 600, "children": [608, 609], "start_point": {"row": 151, "column": 23}, "end_point": {"row": 151, "column": 44}}, {"id": 608, "type": "identifier", "text": "curtain", "parent": 607, "children": [], "start_point": {"row": 151, "column": 23}, "end_point": {"row": 151, "column": 30}}, {"id": 609, "type": "parameter_list", "text": "(bool curtain)", "parent": 607, "children": [610], "start_point": {"row": 151, "column": 30}, "end_point": {"row": 151, "column": 44}}, {"id": 610, "type": "parameter_declaration", "text": "bool curtain", "parent": 609, "children": [611, 612], "start_point": {"row": 151, "column": 31}, "end_point": {"row": 151, "column": 43}}, {"id": 611, "type": "primitive_type", "text": "bool", "parent": 610, "children": [], "start_point": {"row": 151, "column": 31}, "end_point": {"row": 151, "column": 35}}, {"id": 612, "type": "identifier", "text": "curtain", "parent": 610, "children": [], "start_point": {"row": 151, "column": 36}, "end_point": {"row": 151, "column": 43}}, {"id": 613, "type": "declaration", "text": "bool waterfall() const;\n class surface &waterfall(bool waterfall);", "parent": 138, "children": [614, 615, 620], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 154, "column": 49}}, {"id": 614, "type": "primitive_type", "text": "bool", "parent": 613, "children": [], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 12}}, {"id": 615, "type": "ERROR", "text": "waterfall() const;\n class surface &", "parent": 613, "children": [616, 619], "start_point": {"row": 153, "column": 13}, "end_point": {"row": 154, "column": 23}}, {"id": 616, "type": "function_declarator", "text": "waterfall() const", "parent": 615, "children": [617, 618], "start_point": {"row": 153, "column": 13}, "end_point": {"row": 153, "column": 30}}, {"id": 617, "type": "identifier", "text": "waterfall", "parent": 616, "children": [], "start_point": {"row": 153, "column": 13}, "end_point": {"row": 153, "column": 22}}, {"id": 618, "type": "parameter_list", "text": "()", "parent": 616, "children": [], "start_point": {"row": 153, "column": 22}, "end_point": {"row": 153, "column": 24}}, {"id": 619, "type": "identifier", "text": "surface", "parent": 615, "children": [], "start_point": {"row": 154, "column": 14}, "end_point": {"row": 154, "column": 21}}, {"id": 620, "type": "function_declarator", "text": "waterfall(bool waterfall)", "parent": 613, "children": [621, 622], "start_point": {"row": 154, "column": 23}, "end_point": {"row": 154, "column": 48}}, {"id": 621, "type": "identifier", "text": "waterfall", "parent": 620, "children": [], "start_point": {"row": 154, "column": 23}, "end_point": {"row": 154, "column": 32}}, {"id": 622, "type": "parameter_list", "text": "(bool waterfall)", "parent": 620, "children": [623], "start_point": {"row": 154, "column": 32}, "end_point": {"row": 154, "column": 48}}, {"id": 623, "type": "parameter_declaration", "text": "bool waterfall", "parent": 622, "children": [624, 625], "start_point": {"row": 154, "column": 33}, "end_point": {"row": 154, "column": 47}}, {"id": 624, "type": "primitive_type", "text": "bool", "parent": 623, "children": [], "start_point": {"row": 154, "column": 33}, "end_point": {"row": 154, "column": 37}}, {"id": 625, "type": "identifier", "text": "waterfall", "parent": 623, "children": [], "start_point": {"row": 154, "column": 38}, "end_point": {"row": 154, "column": 47}}, {"id": 626, "type": "declaration", "text": "bool fences() const;\n class surface &fences(bool fences);", "parent": 138, "children": [627, 628, 633], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 157, "column": 43}}, {"id": 627, "type": "primitive_type", "text": "bool", "parent": 626, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 12}}, {"id": 628, "type": "ERROR", "text": "fences() const;\n class surface &", "parent": 626, "children": [629, 632], "start_point": {"row": 156, "column": 13}, "end_point": {"row": 157, "column": 23}}, {"id": 629, "type": "function_declarator", "text": "fences() const", "parent": 628, "children": [630, 631], "start_point": {"row": 156, "column": 13}, "end_point": {"row": 156, "column": 27}}, {"id": 630, "type": "identifier", "text": "fences", "parent": 629, "children": [], "start_point": {"row": 156, "column": 13}, "end_point": {"row": 156, "column": 19}}, {"id": 631, "type": "parameter_list", "text": "()", "parent": 629, "children": [], "start_point": {"row": 156, "column": 19}, "end_point": {"row": 156, "column": 21}}, {"id": 632, "type": "identifier", "text": "surface", "parent": 628, "children": [], "start_point": {"row": 157, "column": 14}, "end_point": {"row": 157, "column": 21}}, {"id": 633, "type": "function_declarator", "text": "fences(bool fences)", "parent": 626, "children": [634, 635], "start_point": {"row": 157, "column": 23}, "end_point": {"row": 157, "column": 42}}, {"id": 634, "type": "identifier", "text": "fences", "parent": 633, "children": [], "start_point": {"row": 157, "column": 23}, "end_point": {"row": 157, "column": 29}}, {"id": 635, "type": "parameter_list", "text": "(bool fences)", "parent": 633, "children": [636], "start_point": {"row": 157, "column": 29}, "end_point": {"row": 157, "column": 42}}, {"id": 636, "type": "parameter_declaration", "text": "bool fences", "parent": 635, "children": [637, 638], "start_point": {"row": 157, "column": 30}, "end_point": {"row": 157, "column": 41}}, {"id": 637, "type": "primitive_type", "text": "bool", "parent": 636, "children": [], "start_point": {"row": 157, "column": 30}, "end_point": {"row": 157, "column": 34}}, {"id": 638, "type": "identifier", "text": "fences", "parent": 636, "children": [], "start_point": {"row": 157, "column": 35}, "end_point": {"row": 157, "column": 41}}, {"id": 639, "type": "declaration", "text": "bool ribbons() const;\n class surface &ribbons(bool ribbons);", "parent": 138, "children": [640, 641, 646], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 160, "column": 45}}, {"id": 640, "type": "primitive_type", "text": "bool", "parent": 639, "children": [], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 12}}, {"id": 641, "type": "ERROR", "text": "ribbons() const;\n class surface &", "parent": 639, "children": [642, 645], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 160, "column": 23}}, {"id": 642, "type": "function_declarator", "text": "ribbons() const", "parent": 641, "children": [643, 644], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 28}}, {"id": 643, "type": "identifier", "text": "ribbons", "parent": 642, "children": [], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 20}}, {"id": 644, "type": "parameter_list", "text": "()", "parent": 642, "children": [], "start_point": {"row": 159, "column": 20}, "end_point": {"row": 159, "column": 22}}, {"id": 645, "type": "identifier", "text": "surface", "parent": 641, "children": [], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 21}}, {"id": 646, "type": "function_declarator", "text": "ribbons(bool ribbons)", "parent": 639, "children": [647, 648], "start_point": {"row": 160, "column": 23}, "end_point": {"row": 160, "column": 44}}, {"id": 647, "type": "identifier", "text": "ribbons", "parent": 646, "children": [], "start_point": {"row": 160, "column": 23}, "end_point": {"row": 160, "column": 30}}, {"id": 648, "type": "parameter_list", "text": "(bool ribbons)", "parent": 646, "children": [649], "start_point": {"row": 160, "column": 30}, "end_point": {"row": 160, "column": 44}}, {"id": 649, "type": "parameter_declaration", "text": "bool ribbons", "parent": 648, "children": [650, 651], "start_point": {"row": 160, "column": 31}, "end_point": {"row": 160, "column": 43}}, {"id": 650, "type": "primitive_type", "text": "bool", "parent": 649, "children": [], "start_point": {"row": 160, "column": 31}, "end_point": {"row": 160, "column": 35}}, {"id": 651, "type": "identifier", "text": "ribbons", "parent": 649, "children": [], "start_point": {"row": 160, "column": 36}, "end_point": {"row": 160, "column": 43}}, {"id": 652, "type": "declaration", "text": "double ribbon_width() const;\n class surface &ribbon_width(double ribbon_width);", "parent": 138, "children": [653, 654, 659], "start_point": {"row": 162, "column": 8}, "end_point": {"row": 163, "column": 57}}, {"id": 653, "type": "primitive_type", "text": "double", "parent": 652, "children": [], "start_point": {"row": 162, "column": 8}, "end_point": {"row": 162, "column": 14}}, {"id": 654, "type": "ERROR", "text": "ribbon_width() const;\n class surface &", "parent": 652, "children": [655, 658], "start_point": {"row": 162, "column": 15}, "end_point": {"row": 163, "column": 23}}, {"id": 655, "type": "function_declarator", "text": "ribbon_width() const", "parent": 654, "children": [656, 657], "start_point": {"row": 162, "column": 15}, "end_point": {"row": 162, "column": 35}}, {"id": 656, "type": "identifier", "text": "ribbon_width", "parent": 655, "children": [], "start_point": {"row": 162, "column": 15}, "end_point": {"row": 162, "column": 27}}, {"id": 657, "type": "parameter_list", "text": "()", "parent": 655, "children": [], "start_point": {"row": 162, "column": 27}, "end_point": {"row": 162, "column": 29}}, {"id": 658, "type": "identifier", "text": "surface", "parent": 654, "children": [], "start_point": {"row": 163, "column": 14}, "end_point": {"row": 163, "column": 21}}, {"id": 659, "type": "function_declarator", "text": "ribbon_width(double ribbon_width)", "parent": 652, "children": [660, 661], "start_point": {"row": 163, "column": 23}, "end_point": {"row": 163, "column": 56}}, {"id": 660, "type": "identifier", "text": "ribbon_width", "parent": 659, "children": [], "start_point": {"row": 163, "column": 23}, "end_point": {"row": 163, "column": 35}}, {"id": 661, "type": "parameter_list", "text": "(double ribbon_width)", "parent": 659, "children": [662], "start_point": {"row": 163, "column": 35}, "end_point": {"row": 163, "column": 56}}, {"id": 662, "type": "parameter_declaration", "text": "double ribbon_width", "parent": 661, "children": [663, 664], "start_point": {"row": 163, "column": 36}, "end_point": {"row": 163, "column": 55}}, {"id": 663, "type": "primitive_type", "text": "double", "parent": 662, "children": [], "start_point": {"row": 163, "column": 36}, "end_point": {"row": 163, "column": 42}}, {"id": 664, "type": "identifier", "text": "ribbon_width", "parent": 662, "children": [], "start_point": {"row": 163, "column": 43}, "end_point": {"row": 163, "column": 55}}, {"id": 665, "type": "declaration", "text": "bool visible() const;\n class surface &visible(bool visible);", "parent": 138, "children": [666, 667, 672], "start_point": {"row": 165, "column": 8}, "end_point": {"row": 166, "column": 45}}, {"id": 666, "type": "primitive_type", "text": "bool", "parent": 665, "children": [], "start_point": {"row": 165, "column": 8}, "end_point": {"row": 165, "column": 12}}, {"id": 667, "type": "ERROR", "text": "visible() const;\n class surface &", "parent": 665, "children": [668, 671], "start_point": {"row": 165, "column": 13}, "end_point": {"row": 166, "column": 23}}, {"id": 668, "type": "function_declarator", "text": "visible() const", "parent": 667, "children": [669, 670], "start_point": {"row": 165, "column": 13}, "end_point": {"row": 165, "column": 28}}, {"id": 669, "type": "identifier", "text": "visible", "parent": 668, "children": [], "start_point": {"row": 165, "column": 13}, "end_point": {"row": 165, "column": 20}}, {"id": 670, "type": "parameter_list", "text": "()", "parent": 668, "children": [], "start_point": {"row": 165, "column": 20}, "end_point": {"row": 165, "column": 22}}, {"id": 671, "type": "identifier", "text": "surface", "parent": 667, "children": [], "start_point": {"row": 166, "column": 14}, "end_point": {"row": 166, "column": 21}}, {"id": 672, "type": "function_declarator", "text": "visible(bool visible)", "parent": 665, "children": [673, 674], "start_point": {"row": 166, "column": 23}, "end_point": {"row": 166, "column": 44}}, {"id": 673, "type": "identifier", "text": "visible", "parent": 672, "children": [], "start_point": {"row": 166, "column": 23}, "end_point": {"row": 166, "column": 30}}, {"id": 674, "type": "parameter_list", "text": "(bool visible)", "parent": 672, "children": [675], "start_point": {"row": 166, "column": 30}, "end_point": {"row": 166, "column": 44}}, {"id": 675, "type": "parameter_declaration", "text": "bool visible", "parent": 674, "children": [676, 677], "start_point": {"row": 166, "column": 31}, "end_point": {"row": 166, "column": 43}}, {"id": 676, "type": "primitive_type", "text": "bool", "parent": 675, "children": [], "start_point": {"row": 166, "column": 31}, "end_point": {"row": 166, "column": 35}}, {"id": 677, "type": "identifier", "text": "visible", "parent": 675, "children": [], "start_point": {"row": 166, "column": 36}, "end_point": {"row": 166, "column": 43}}, {"id": 678, "type": "declaration", "text": "public /* getters and setters bypassing the line_spec */:\n float line_width() const;\n class surface &line_width(float line_width);", "parent": 138, "children": [679, 685], "start_point": {"row": 168, "column": 6}, "end_point": {"row": 170, "column": 52}}, {"id": 679, "type": "ERROR", "text": ":\n float line_width() const;\n class surface &", "parent": 678, "children": [680, 681, 684], "start_point": {"row": 168, "column": 62}, "end_point": {"row": 170, "column": 23}}, {"id": 680, "type": "primitive_type", "text": "float", "parent": 679, "children": [], "start_point": {"row": 169, "column": 8}, "end_point": {"row": 169, "column": 13}}, {"id": 681, "type": "function_declarator", "text": "line_width() const", "parent": 679, "children": [682, 683], "start_point": {"row": 169, "column": 14}, "end_point": {"row": 169, "column": 32}}, {"id": 682, "type": "identifier", "text": "line_width", "parent": 681, "children": [], "start_point": {"row": 169, "column": 14}, "end_point": {"row": 169, "column": 24}}, {"id": 683, "type": "parameter_list", "text": "()", "parent": 681, "children": [], "start_point": {"row": 169, "column": 24}, "end_point": {"row": 169, "column": 26}}, {"id": 684, "type": "identifier", "text": "surface", "parent": 679, "children": [], "start_point": {"row": 170, "column": 14}, "end_point": {"row": 170, "column": 21}}, {"id": 685, "type": "function_declarator", "text": "line_width(float line_width)", "parent": 678, "children": [686, 687], "start_point": {"row": 170, "column": 23}, "end_point": {"row": 170, "column": 51}}, {"id": 686, "type": "identifier", "text": "line_width", "parent": 685, "children": [], "start_point": {"row": 170, "column": 23}, "end_point": {"row": 170, "column": 33}}, {"id": 687, "type": "parameter_list", "text": "(float line_width)", "parent": 685, "children": [688], "start_point": {"row": 170, "column": 33}, "end_point": {"row": 170, "column": 51}}, {"id": 688, "type": "parameter_declaration", "text": "float line_width", "parent": 687, "children": [689, 690], "start_point": {"row": 170, "column": 34}, "end_point": {"row": 170, "column": 50}}, {"id": 689, "type": "primitive_type", "text": "float", "parent": 688, "children": [], "start_point": {"row": 170, "column": 34}, "end_point": {"row": 170, "column": 39}}, {"id": 690, "type": "identifier", "text": "line_width", "parent": 688, "children": [], "start_point": {"row": 170, "column": 40}, "end_point": {"row": 170, "column": 50}}, {"id": 691, "type": "declaration", "text": "const std::array<float, 4> &edge_color() const;\n\n template <class T> class surface &edge_color(T c) {\n line_spec().color(c);\n touch();", "parent": 138, "children": [692, 693, 694, 697, 721], "start_point": {"row": 172, "column": 8}, "end_point": {"row": 176, "column": 20}}, {"id": 692, "type": "type_identifier", "text": "std", "parent": 691, "children": [], "start_point": {"row": 172, "column": 14}, "end_point": {"row": 172, "column": 17}}, {"id": 693, "type": "identifier", "text": "array", "parent": 691, "children": [], "start_point": {"row": 172, "column": 19}, "end_point": {"row": 172, "column": 24}}, {"id": 694, "type": "ERROR", "text": "<float", "parent": 691, "children": [695, 696], "start_point": {"row": 172, "column": 24}, "end_point": {"row": 172, "column": 30}}, {"id": 695, "type": "<", "text": "<", "parent": 694, "children": [], "start_point": {"row": 172, "column": 24}, "end_point": {"row": 172, "column": 25}}, {"id": 696, "type": "primitive_type", "text": "float", "parent": 694, "children": [], "start_point": {"row": 172, "column": 25}, "end_point": {"row": 172, "column": 30}}, {"id": 697, "type": "ERROR", "text": "4> &edge_color() const;\n\n template <class T> class surface &edge_color(T c) {\n line_spec().color(c);", "parent": 691, "children": [698, 699, 700, 703, 704, 705, 706, 707, 708, 714], "start_point": {"row": 172, "column": 32}, "end_point": {"row": 175, "column": 33}}, {"id": 698, "type": "number_literal", "text": "4", "parent": 697, "children": [], "start_point": {"row": 172, "column": 32}, "end_point": {"row": 172, "column": 33}}, {"id": 699, "type": ">", "text": ">", "parent": 697, "children": [], "start_point": {"row": 172, "column": 33}, "end_point": {"row": 172, "column": 34}}, {"id": 700, "type": "function_declarator", "text": "edge_color() const", "parent": 697, "children": [701, 702], "start_point": {"row": 172, "column": 36}, "end_point": {"row": 172, "column": 54}}, {"id": 701, "type": "identifier", "text": "edge_color", "parent": 700, "children": [], "start_point": {"row": 172, "column": 36}, "end_point": {"row": 172, "column": 46}}, {"id": 702, "type": "parameter_list", "text": "()", "parent": 700, "children": [], "start_point": {"row": 172, "column": 46}, "end_point": {"row": 172, "column": 48}}, {"id": 703, "type": "identifier", "text": "template", "parent": 697, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 16}}, {"id": 704, "type": "<", "text": "<", "parent": 697, "children": [], "start_point": {"row": 174, "column": 17}, "end_point": {"row": 174, "column": 18}}, {"id": 705, "type": "identifier", "text": "T", "parent": 697, "children": [], "start_point": {"row": 174, "column": 24}, "end_point": {"row": 174, "column": 25}}, {"id": 706, "type": ">", "text": ">", "parent": 697, "children": [], "start_point": {"row": 174, "column": 25}, "end_point": {"row": 174, "column": 26}}, {"id": 707, "type": "identifier", "text": "surface", "parent": 697, "children": [], "start_point": {"row": 174, "column": 33}, "end_point": {"row": 174, "column": 40}}, {"id": 708, "type": "function_declarator", "text": "edge_color(T c)", "parent": 697, "children": [709, 710], "start_point": {"row": 174, "column": 42}, "end_point": {"row": 174, "column": 57}}, {"id": 709, "type": "identifier", "text": "edge_color", "parent": 708, "children": [], "start_point": {"row": 174, "column": 42}, "end_point": {"row": 174, "column": 52}}, {"id": 710, "type": "parameter_list", "text": "(T c)", "parent": 708, "children": [711], "start_point": {"row": 174, "column": 52}, "end_point": {"row": 174, "column": 57}}, {"id": 711, "type": "parameter_declaration", "text": "T c", "parent": 710, "children": [712, 713], "start_point": {"row": 174, "column": 53}, "end_point": {"row": 174, "column": 56}}, {"id": 712, "type": "type_identifier", "text": "T", "parent": 711, "children": [], "start_point": {"row": 174, "column": 53}, "end_point": {"row": 174, "column": 54}}, {"id": 713, "type": "identifier", "text": "c", "parent": 711, "children": [], "start_point": {"row": 174, "column": 55}, "end_point": {"row": 174, "column": 56}}, {"id": 714, "type": "function_declarator", "text": "line_spec().color(c)", "parent": 697, "children": [715, 716, 717], "start_point": {"row": 175, "column": 12}, "end_point": {"row": 175, "column": 32}}, {"id": 715, "type": "identifier", "text": "line_spec", "parent": 714, "children": [], "start_point": {"row": 175, "column": 12}, "end_point": {"row": 175, "column": 21}}, {"id": 716, "type": "parameter_list", "text": "()", "parent": 714, "children": [], "start_point": {"row": 175, "column": 21}, "end_point": {"row": 175, "column": 23}}, {"id": 717, "type": "call_expression", "text": "color(c)", "parent": 714, "children": [718, 719], "start_point": {"row": 175, "column": 24}, "end_point": {"row": 175, "column": 32}}, {"id": 718, "type": "identifier", "text": "color", "parent": 717, "children": [], "start_point": {"row": 175, "column": 24}, "end_point": {"row": 175, "column": 29}}, {"id": 719, "type": "argument_list", "text": "(c)", "parent": 717, "children": [720], "start_point": {"row": 175, "column": 29}, "end_point": {"row": 175, "column": 32}}, {"id": 720, "type": "identifier", "text": "c", "parent": 719, "children": [], "start_point": {"row": 175, "column": 30}, "end_point": {"row": 175, "column": 31}}, {"id": 721, "type": "function_declarator", "text": "touch()", "parent": 691, "children": [722, 723], "start_point": {"row": 176, "column": 12}, "end_point": {"row": 176, "column": 19}}, {"id": 722, "type": "identifier", "text": "touch", "parent": 721, "children": [], "start_point": {"row": 176, "column": 12}, "end_point": {"row": 176, "column": 17}}, {"id": 723, "type": "parameter_list", "text": "()", "parent": 721, "children": [], "start_point": {"row": 176, "column": 17}, "end_point": {"row": 176, "column": 19}}, {"id": 724, "type": "declaration", "text": "return *this;", "parent": 138, "children": [725], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 177, "column": 25}}, {"id": 725, "type": "pointer_declarator", "text": "*this", "parent": 724, "children": [726, 727], "start_point": {"row": 177, "column": 19}, "end_point": {"row": 177, "column": 24}}, {"id": 726, "type": "*", "text": "*", "parent": 725, "children": [], "start_point": {"row": 177, "column": 19}, "end_point": {"row": 177, "column": 20}}, {"id": 727, "type": "identifier", "text": "this", "parent": 725, "children": [], "start_point": {"row": 177, "column": 20}, "end_point": {"row": 177, "column": 24}}, {"id": 728, "type": "ERROR", "text": "}\n\n inline class surface &edge_color(std::initializer_list<float> c)", "parent": 138, "children": [729, 731, 733], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 180, "column": 72}}, {"id": 729, "type": "storage_class_specifier", "text": "inline", "parent": 728, "children": [730], "start_point": {"row": 180, "column": 8}, "end_point": {"row": 180, "column": 14}}, {"id": 730, "type": "inline", "text": "inline", "parent": 729, "children": [], "start_point": {"row": 180, "column": 8}, "end_point": {"row": 180, "column": 14}}, {"id": 731, "type": "ERROR", "text": "surface &", "parent": 728, "children": [732], "start_point": {"row": 180, "column": 21}, "end_point": {"row": 180, "column": 30}}, {"id": 732, "type": "identifier", "text": "surface", "parent": 731, "children": [], "start_point": {"row": 180, "column": 21}, "end_point": {"row": 180, "column": 28}}, {"id": 733, "type": "function_declarator", "text": "edge_color(std::initializer_list<float> c)", "parent": 728, "children": [734, 735], "start_point": {"row": 180, "column": 30}, "end_point": {"row": 180, "column": 72}}, {"id": 734, "type": "identifier", "text": "edge_color", "parent": 733, "children": [], "start_point": {"row": 180, "column": 30}, "end_point": {"row": 180, "column": 40}}, {"id": 735, "type": "parameter_list", "text": "(std::initializer_list<float> c)", "parent": 733, "children": [736], "start_point": {"row": 180, "column": 40}, "end_point": {"row": 180, "column": 72}}, {"id": 736, "type": "parameter_declaration", "text": "std::initializer_list<float> c", "parent": 735, "children": [737, 738, 743], "start_point": {"row": 180, "column": 41}, "end_point": {"row": 180, "column": 71}}, {"id": 737, "type": "type_identifier", "text": "std", "parent": 736, "children": [], "start_point": {"row": 180, "column": 41}, "end_point": {"row": 180, "column": 44}}, {"id": 738, "type": "ERROR", "text": "::initializer_list<float>", "parent": 736, "children": [739, 740, 741, 742], "start_point": {"row": 180, "column": 44}, "end_point": {"row": 180, "column": 69}}, {"id": 739, "type": "identifier", "text": "initializer_list", "parent": 738, "children": [], "start_point": {"row": 180, "column": 46}, "end_point": {"row": 180, "column": 62}}, {"id": 740, "type": "<", "text": "<", "parent": 738, "children": [], "start_point": {"row": 180, "column": 62}, "end_point": {"row": 180, "column": 63}}, {"id": 741, "type": "primitive_type", "text": "float", "parent": 738, "children": [], "start_point": {"row": 180, "column": 63}, "end_point": {"row": 180, "column": 68}}, {"id": 742, "type": ">", "text": ">", "parent": 738, "children": [], "start_point": {"row": 180, "column": 68}, "end_point": {"row": 180, "column": 69}}, {"id": 743, "type": "identifier", "text": "c", "parent": 736, "children": [], "start_point": {"row": 180, "column": 70}, "end_point": {"row": 180, "column": 71}}, {"id": 744, "type": "call_expression", "text": "line_spec().color(c)", "parent": 138, "children": [745, 750], "start_point": {"row": 181, "column": 12}, "end_point": {"row": 181, "column": 32}}, {"id": 745, "type": "field_expression", "text": "line_spec().color", "parent": 744, "children": [746, 749], "start_point": {"row": 181, "column": 12}, "end_point": {"row": 181, "column": 29}}, {"id": 746, "type": "call_expression", "text": "line_spec()", "parent": 745, "children": [747, 748], "start_point": {"row": 181, "column": 12}, "end_point": {"row": 181, "column": 23}}, {"id": 747, "type": "identifier", "text": "line_spec", "parent": 746, "children": [], "start_point": {"row": 181, "column": 12}, "end_point": {"row": 181, "column": 21}}, {"id": 748, "type": "argument_list", "text": "()", "parent": 746, "children": [], "start_point": {"row": 181, "column": 21}, "end_point": {"row": 181, "column": 23}}, {"id": 749, "type": "field_identifier", "text": "color", "parent": 745, "children": [], "start_point": {"row": 181, "column": 24}, "end_point": {"row": 181, "column": 29}}, {"id": 750, "type": "argument_list", "text": "(c)", "parent": 744, "children": [751], "start_point": {"row": 181, "column": 29}, "end_point": {"row": 181, "column": 32}}, {"id": 751, "type": "identifier", "text": "c", "parent": 750, "children": [], "start_point": {"row": 181, "column": 30}, "end_point": {"row": 181, "column": 31}}, {"id": 752, "type": "call_expression", "text": "touch()", "parent": 138, "children": [753, 754], "start_point": {"row": 182, "column": 12}, "end_point": {"row": 182, "column": 19}}, {"id": 753, "type": "identifier", "text": "touch", "parent": 752, "children": [], "start_point": {"row": 182, "column": 12}, "end_point": {"row": 182, "column": 17}}, {"id": 754, "type": "argument_list", "text": "()", "parent": 752, "children": [], "start_point": {"row": 182, "column": 17}, "end_point": {"row": 182, "column": 19}}, {"id": 755, "type": "return_statement", "text": "return *this;", "parent": 138, "children": [756], "start_point": {"row": 183, "column": 12}, "end_point": {"row": 183, "column": 25}}, {"id": 756, "type": "pointer_expression", "text": "*this", "parent": 755, "children": [757, 758], "start_point": {"row": 183, "column": 19}, "end_point": {"row": 183, "column": 24}}, {"id": 757, "type": "*", "text": "*", "parent": 756, "children": [], "start_point": {"row": 183, "column": 19}, "end_point": {"row": 183, "column": 20}}, {"id": 758, "type": "identifier", "text": "this", "parent": 756, "children": [], "start_point": {"row": 183, "column": 20}, "end_point": {"row": 183, "column": 24}}, {"id": 759, "type": "ERROR", "text": "double zmin() override;\n double zmax() override", "parent": 0, "children": [760, 761, 764, 767, 768], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 187, "column": 30}}, {"id": 760, "type": "primitive_type", "text": "double", "parent": 759, "children": [], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 186, "column": 14}}, {"id": 761, "type": "function_declarator", "text": "zmin()", "parent": 759, "children": [762, 763], "start_point": {"row": 186, "column": 15}, "end_point": {"row": 186, "column": 21}}, {"id": 762, "type": "identifier", "text": "zmin", "parent": 761, "children": [], "start_point": {"row": 186, "column": 15}, "end_point": {"row": 186, "column": 19}}, {"id": 763, "type": "parameter_list", "text": "()", "parent": 761, "children": [], "start_point": {"row": 186, "column": 19}, "end_point": {"row": 186, "column": 21}}, {"id": 764, "type": "declaration", "text": "override;", "parent": 759, "children": [765, 766], "start_point": {"row": 186, "column": 22}, "end_point": {"row": 186, "column": 31}}, {"id": 765, "type": "type_identifier", "text": "override", "parent": 764, "children": [], "start_point": {"row": 186, "column": 22}, "end_point": {"row": 186, "column": 30}}, {"id": 766, "type": "identifier", "text": "", "parent": 764, "children": [], "start_point": {"row": 186, "column": 30}, "end_point": {"row": 186, "column": 30}}, {"id": 767, "type": "primitive_type", "text": "double", "parent": 759, "children": [], "start_point": {"row": 187, "column": 8}, "end_point": {"row": 187, "column": 14}}, {"id": 768, "type": "function_declarator", "text": "zmax() override", "parent": 759, "children": [769, 770, 771], "start_point": {"row": 187, "column": 15}, "end_point": {"row": 187, "column": 30}}, {"id": 769, "type": "identifier", "text": "zmax", "parent": 768, "children": [], "start_point": {"row": 187, "column": 15}, "end_point": {"row": 187, "column": 19}}, {"id": 770, "type": "parameter_list", "text": "()", "parent": 768, "children": [], "start_point": {"row": 187, "column": 19}, "end_point": {"row": 187, "column": 21}}, {"id": 771, "type": "identifier", "text": "override", "parent": 768, "children": [], "start_point": {"row": 187, "column": 22}, "end_point": {"row": 187, "column": 30}}, {"id": 772, "type": "labeled_statement", "text": "protected:\n void maybe_update_line_spec();", "parent": 0, "children": [773], "start_point": {"row": 189, "column": 6}, "end_point": {"row": 190, "column": 38}}, {"id": 773, "type": "declaration", "text": "void maybe_update_line_spec();", "parent": 772, "children": [774, 775], "start_point": {"row": 190, "column": 8}, "end_point": {"row": 190, "column": 38}}, {"id": 774, "type": "primitive_type", "text": "void", "parent": 773, "children": [], "start_point": {"row": 190, "column": 8}, "end_point": {"row": 190, "column": 12}}, {"id": 775, "type": "function_declarator", "text": "maybe_update_line_spec()", "parent": 773, "children": [776, 777], "start_point": {"row": 190, "column": 13}, "end_point": {"row": 190, "column": 37}}, {"id": 776, "type": "identifier", "text": "maybe_update_line_spec", "parent": 775, "children": [], "start_point": {"row": 190, "column": 13}, "end_point": {"row": 190, "column": 35}}, {"id": 777, "type": "parameter_list", "text": "()", "parent": 775, "children": [], "start_point": {"row": 190, "column": 35}, "end_point": {"row": 190, "column": 37}}, {"id": 778, "type": "labeled_statement", "text": "std::string grid_data_string();", "parent": 0, "children": [779, 780], "start_point": {"row": 191, "column": 8}, "end_point": {"row": 191, "column": 39}}, {"id": 779, "type": "statement_identifier", "text": "std", "parent": 778, "children": [], "start_point": {"row": 191, "column": 8}, "end_point": {"row": 191, "column": 11}}, {"id": 780, "type": "declaration", "text": "string grid_data_string();", "parent": 778, "children": [781, 782], "start_point": {"row": 191, "column": 13}, "end_point": {"row": 191, "column": 39}}, {"id": 781, "type": "type_identifier", "text": "string", "parent": 780, "children": [], "start_point": {"row": 191, "column": 13}, "end_point": {"row": 191, "column": 19}}, {"id": 782, "type": "function_declarator", "text": "grid_data_string()", "parent": 780, "children": [783, 784], "start_point": {"row": 191, "column": 20}, "end_point": {"row": 191, "column": 38}}, {"id": 783, "type": "identifier", "text": "grid_data_string", "parent": 782, "children": [], "start_point": {"row": 191, "column": 20}, "end_point": {"row": 191, "column": 36}}, {"id": 784, "type": "parameter_list", "text": "()", "parent": 782, "children": [], "start_point": {"row": 191, "column": 36}, "end_point": {"row": 191, "column": 38}}, {"id": 785, "type": "labeled_statement", "text": "std::string ribbon_data_string();", "parent": 0, "children": [786, 787], "start_point": {"row": 192, "column": 8}, "end_point": {"row": 192, "column": 41}}, {"id": 786, "type": "statement_identifier", "text": "std", "parent": 785, "children": [], "start_point": {"row": 192, "column": 8}, "end_point": {"row": 192, "column": 11}}, {"id": 787, "type": "declaration", "text": "string ribbon_data_string();", "parent": 785, "children": [788, 789], "start_point": {"row": 192, "column": 13}, "end_point": {"row": 192, "column": 41}}, {"id": 788, "type": "type_identifier", "text": "string", "parent": 787, "children": [], "start_point": {"row": 192, "column": 13}, "end_point": {"row": 192, "column": 19}}, {"id": 789, "type": "function_declarator", "text": "ribbon_data_string()", "parent": 787, "children": [790, 791], "start_point": {"row": 192, "column": 20}, "end_point": {"row": 192, "column": 40}}, {"id": 790, "type": "identifier", "text": "ribbon_data_string", "parent": 789, "children": [], "start_point": {"row": 192, "column": 20}, "end_point": {"row": 192, "column": 38}}, {"id": 791, "type": "parameter_list", "text": "()", "parent": 789, "children": [], "start_point": {"row": 192, "column": 38}, "end_point": {"row": 192, "column": 40}}, {"id": 792, "type": "declaration", "text": "size_t create_line_index();", "parent": 0, "children": [793, 794], "start_point": {"row": 193, "column": 8}, "end_point": {"row": 193, "column": 35}}, {"id": 793, "type": "primitive_type", "text": "size_t", "parent": 792, "children": [], "start_point": {"row": 193, "column": 8}, "end_point": {"row": 193, "column": 14}}, {"id": 794, "type": "function_declarator", "text": "create_line_index()", "parent": 792, "children": [795, 796], "start_point": {"row": 193, "column": 15}, "end_point": {"row": 193, "column": 34}}, {"id": 795, "type": "identifier", "text": "create_line_index", "parent": 794, "children": [], "start_point": {"row": 193, "column": 15}, "end_point": {"row": 193, "column": 32}}, {"id": 796, "type": "parameter_list", "text": "()", "parent": 794, "children": [], "start_point": {"row": 193, "column": 32}, "end_point": {"row": 193, "column": 34}}, {"id": 797, "type": "labeled_statement", "text": "protected:\n /// Data in the xlim\n vector_2d X_data_{}", "parent": 0, "children": [798], "start_point": {"row": 195, "column": 6}, "end_point": {"row": 197, "column": 27}}, {"id": 798, "type": "ERROR", "text": "vector_2d X_data_", "parent": 797, "children": [799, 800], "start_point": {"row": 197, "column": 8}, "end_point": {"row": 197, "column": 25}}, {"id": 799, "type": "type_identifier", "text": "vector_2d", "parent": 798, "children": [], "start_point": {"row": 197, "column": 8}, "end_point": {"row": 197, "column": 17}}, {"id": 800, "type": "identifier", "text": "X_data_", "parent": 798, "children": [], "start_point": {"row": 197, "column": 18}, "end_point": {"row": 197, "column": 25}}, {"id": 801, "type": "function_definition", "text": "vector_2d Y_data_{}", "parent": 0, "children": [802, 803], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 198, "column": 27}}, {"id": 802, "type": "type_identifier", "text": "vector_2d", "parent": 801, "children": [], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 198, "column": 17}}, {"id": 803, "type": "identifier", "text": "Y_data_", "parent": 801, "children": [], "start_point": {"row": 198, "column": 18}, "end_point": {"row": 198, "column": 25}}, {"id": 804, "type": "function_definition", "text": "vector_2d Z_data_{}", "parent": 0, "children": [805, 806], "start_point": {"row": 199, "column": 8}, "end_point": {"row": 199, "column": 27}}, {"id": 805, "type": "type_identifier", "text": "vector_2d", "parent": 804, "children": [], "start_point": {"row": 199, "column": 8}, "end_point": {"row": 199, "column": 17}}, {"id": 806, "type": "identifier", "text": "Z_data_", "parent": 804, "children": [], "start_point": {"row": 199, "column": 18}, "end_point": {"row": 199, "column": 25}}, {"id": 807, "type": "function_definition", "text": "vector_2d C_data_{}", "parent": 0, "children": [808, 809], "start_point": {"row": 200, "column": 8}, "end_point": {"row": 200, "column": 27}}, {"id": 808, "type": "type_identifier", "text": "vector_2d", "parent": 807, "children": [], "start_point": {"row": 200, "column": 8}, "end_point": {"row": 200, "column": 17}}, {"id": 809, "type": "identifier", "text": "C_data_", "parent": 807, "children": [], "start_point": {"row": 200, "column": 18}, "end_point": {"row": 200, "column": 25}}, {"id": 810, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 205, "column": 8}, "end_point": {"row": 205, "column": 12}}, {"id": 811, "type": "identifier", "text": "is_parametric_", "parent": 0, "children": [], "start_point": {"row": 205, "column": 13}, "end_point": {"row": 205, "column": 27}}, {"id": 812, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 205, "column": 28}, "end_point": {"row": 205, "column": 33}}, {"id": 813, "type": "primitive_type", "text": "double", "parent": 0, "children": [], "start_point": {"row": 208, "column": 8}, "end_point": {"row": 208, "column": 14}}, {"id": 814, "type": "identifier", "text": "zmin_", "parent": 0, "children": [], "start_point": {"row": 208, "column": 15}, "end_point": {"row": 208, "column": 20}}, {"id": 815, "type": "identifier", "text": "NaN", "parent": 0, "children": [], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 24}}, {"id": 816, "type": "primitive_type", "text": "double", "parent": 0, "children": [], "start_point": {"row": 209, "column": 8}, "end_point": {"row": 209, "column": 14}}, {"id": 817, "type": "identifier", "text": "zmax_", "parent": 0, "children": [], "start_point": {"row": 209, "column": 15}, "end_point": {"row": 209, "column": 20}}, {"id": 818, "type": "identifier", "text": "NaN", "parent": 0, "children": [], "start_point": {"row": 209, "column": 21}, "end_point": {"row": 209, "column": 24}}, {"id": 819, "type": "primitive_type", "text": "size_t", "parent": 0, "children": [], "start_point": {"row": 212, "column": 8}, "end_point": {"row": 212, "column": 14}}, {"id": 820, "type": "identifier", "text": "norm_", "parent": 0, "children": [], "start_point": {"row": 212, "column": 15}, "end_point": {"row": 212, "column": 20}}, {"id": 821, "type": "number_literal", "text": "2", "parent": 0, "children": [], "start_point": {"row": 212, "column": 21}, "end_point": {"row": 212, "column": 22}}, {"id": 822, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 213, "column": 8}, "end_point": {"row": 213, "column": 12}}, {"id": 823, "type": "identifier", "text": "hidden3d_", "parent": 0, "children": [], "start_point": {"row": 213, "column": 13}, "end_point": {"row": 213, "column": 22}}, {"id": 824, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 213, "column": 23}, "end_point": {"row": 213, "column": 28}}, {"id": 825, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 214, "column": 8}, "end_point": {"row": 214, "column": 12}}, {"id": 826, "type": "identifier", "text": "depthorder_", "parent": 0, "children": [], "start_point": {"row": 214, "column": 13}, "end_point": {"row": 214, "column": 24}}, {"id": 827, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 214, "column": 25}, "end_point": {"row": 214, "column": 30}}, {"id": 828, "type": "primitive_type", "text": "float", "parent": 0, "children": [], "start_point": {"row": 215, "column": 8}, "end_point": {"row": 215, "column": 13}}, {"id": 829, "type": "identifier", "text": "face_alpha_", "parent": 0, "children": [], "start_point": {"row": 215, "column": 14}, "end_point": {"row": 215, "column": 25}}, {"id": 830, "type": "number_literal", "text": ".95", "parent": 0, "children": [], "start_point": {"row": 215, "column": 26}, "end_point": {"row": 215, "column": 29}}, {"id": 831, "type": "declaration", "text": "class line_spec line_spec_;", "parent": 0, "children": [832, 834], "start_point": {"row": 216, "column": 8}, "end_point": {"row": 216, "column": 35}}, {"id": 832, "type": "ERROR", "text": "line_spec", "parent": 831, "children": [833], "start_point": {"row": 216, "column": 14}, "end_point": {"row": 216, "column": 23}}, {"id": 833, "type": "identifier", "text": "line_spec", "parent": 832, "children": [], "start_point": {"row": 216, "column": 14}, "end_point": {"row": 216, "column": 23}}, {"id": 834, "type": "identifier", "text": "line_spec_", "parent": 831, "children": [], "start_point": {"row": 216, "column": 24}, "end_point": {"row": 216, "column": 34}}, {"id": 835, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 217, "column": 8}, "end_point": {"row": 217, "column": 12}}, {"id": 836, "type": "identifier", "text": "lighting_", "parent": 0, "children": [], "start_point": {"row": 217, "column": 13}, "end_point": {"row": 217, "column": 22}}, {"id": 837, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 217, "column": 23}, "end_point": {"row": 217, "column": 28}}, {"id": 838, "type": "primitive_type", "text": "float", "parent": 0, "children": [], "start_point": {"row": 218, "column": 8}, "end_point": {"row": 218, "column": 13}}, {"id": 839, "type": "identifier", "text": "primary_", "parent": 0, "children": [], "start_point": {"row": 218, "column": 14}, "end_point": {"row": 218, "column": 22}}, {"id": 840, "type": "number_literal", "text": "-1.", "parent": 0, "children": [], "start_point": {"row": 218, "column": 23}, "end_point": {"row": 218, "column": 26}}, {"id": 841, "type": "primitive_type", "text": "float", "parent": 0, "children": [], "start_point": {"row": 219, "column": 8}, "end_point": {"row": 219, "column": 13}}, {"id": 842, "type": "identifier", "text": "specular_", "parent": 0, "children": [], "start_point": {"row": 219, "column": 14}, "end_point": {"row": 219, "column": 23}}, {"id": 843, "type": "number_literal", "text": "-1.", "parent": 0, "children": [], "start_point": {"row": 219, "column": 24}, "end_point": {"row": 219, "column": 27}}, {"id": 844, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 220, "column": 8}, "end_point": {"row": 220, "column": 12}}, {"id": 845, "type": "identifier", "text": "curtain_", "parent": 0, "children": [], "start_point": {"row": 220, "column": 13}, "end_point": {"row": 220, "column": 21}}, {"id": 846, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 220, "column": 22}, "end_point": {"row": 220, "column": 27}}, {"id": 847, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 221, "column": 8}, "end_point": {"row": 221, "column": 12}}, {"id": 848, "type": "identifier", "text": "waterfall_", "parent": 0, "children": [], "start_point": {"row": 221, "column": 13}, "end_point": {"row": 221, "column": 23}}, {"id": 849, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 221, "column": 24}, "end_point": {"row": 221, "column": 29}}, {"id": 850, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 222, "column": 8}, "end_point": {"row": 222, "column": 12}}, {"id": 851, "type": "identifier", "text": "fences_", "parent": 0, "children": [], "start_point": {"row": 222, "column": 13}, "end_point": {"row": 222, "column": 20}}, {"id": 852, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 222, "column": 21}, "end_point": {"row": 222, "column": 26}}, {"id": 853, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 223, "column": 8}, "end_point": {"row": 223, "column": 12}}, {"id": 854, "type": "identifier", "text": "ribbons_", "parent": 0, "children": [], "start_point": {"row": 223, "column": 13}, "end_point": {"row": 223, "column": 21}}, {"id": 855, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 223, "column": 22}, "end_point": {"row": 223, "column": 27}}, {"id": 856, "type": "primitive_type", "text": "double", "parent": 0, "children": [], "start_point": {"row": 224, "column": 8}, "end_point": {"row": 224, "column": 14}}, {"id": 857, "type": "identifier", "text": "ribbon_width_", "parent": 0, "children": [], "start_point": {"row": 224, "column": 15}, "end_point": {"row": 224, "column": 28}}, {"id": 858, "type": "number_literal", "text": "0.75", "parent": 0, "children": [], "start_point": {"row": 224, "column": 29}, "end_point": {"row": 224, "column": 33}}, {"id": 859, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 227, "column": 8}, "end_point": {"row": 227, "column": 12}}, {"id": 860, "type": "identifier", "text": "surface_visible_", "parent": 0, "children": [], "start_point": {"row": 227, "column": 13}, "end_point": {"row": 227, "column": 29}}, {"id": 861, "type": "true", "text": "true", "parent": 0, "children": [], "start_point": {"row": 227, "column": 30}, "end_point": {"row": 227, "column": 34}}, {"id": 862, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 228, "column": 8}, "end_point": {"row": 228, "column": 12}}, {"id": 863, "type": "identifier", "text": "surface_in_2d_", "parent": 0, "children": [], "start_point": {"row": 228, "column": 13}, "end_point": {"row": 228, "column": 27}}, {"id": 864, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 228, "column": 28}, "end_point": {"row": 228, "column": 33}}, {"id": 865, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 231, "column": 8}, "end_point": {"row": 231, "column": 12}}, {"id": 866, "type": "identifier", "text": "palette_map_at_bottom_", "parent": 0, "children": [], "start_point": {"row": 231, "column": 13}, "end_point": {"row": 231, "column": 35}}, {"id": 867, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 231, "column": 36}, "end_point": {"row": 231, "column": 41}}, {"id": 868, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 232, "column": 8}, "end_point": {"row": 232, "column": 12}}, {"id": 869, "type": "identifier", "text": "palette_map_at_surface_", "parent": 0, "children": [], "start_point": {"row": 232, "column": 13}, "end_point": {"row": 232, "column": 36}}, {"id": 870, "type": "true", "text": "true", "parent": 0, "children": [], "start_point": {"row": 232, "column": 37}, "end_point": {"row": 232, "column": 41}}, {"id": 871, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 233, "column": 12}}, {"id": 872, "type": "identifier", "text": "palette_map_at_top_", "parent": 0, "children": [], "start_point": {"row": 233, "column": 13}, "end_point": {"row": 233, "column": 32}}, {"id": 873, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 233, "column": 33}, "end_point": {"row": 233, "column": 38}}, {"id": 874, "type": "declaration", "text": "class line_spec contour_line_spec_;", "parent": 0, "children": [875, 877], "start_point": {"row": 235, "column": 8}, "end_point": {"row": 235, "column": 43}}, {"id": 875, "type": "ERROR", "text": "line_spec", "parent": 874, "children": [876], "start_point": {"row": 235, "column": 14}, "end_point": {"row": 235, "column": 23}}, {"id": 876, "type": "identifier", "text": "line_spec", "parent": 875, "children": [], "start_point": {"row": 235, "column": 14}, "end_point": {"row": 235, "column": 23}}, {"id": 877, "type": "identifier", "text": "contour_line_spec_", "parent": 874, "children": [], "start_point": {"row": 235, "column": 24}, "end_point": {"row": 235, "column": 42}}, {"id": 878, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 236, "column": 8}, "end_point": {"row": 236, "column": 12}}, {"id": 879, "type": "identifier", "text": "contour_base_", "parent": 0, "children": [], "start_point": {"row": 236, "column": 13}, "end_point": {"row": 236, "column": 26}}, {"id": 880, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 236, "column": 27}, "end_point": {"row": 236, "column": 32}}, {"id": 881, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 237, "column": 8}, "end_point": {"row": 237, "column": 12}}, {"id": 882, "type": "identifier", "text": "contour_surface_", "parent": 0, "children": [], "start_point": {"row": 237, "column": 13}, "end_point": {"row": 237, "column": 29}}, {"id": 883, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 237, "column": 30}, "end_point": {"row": 237, "column": 35}}, {"id": 884, "type": "function_definition", "text": "size_t contour_levels_{9}", "parent": 0, "children": [885, 886], "start_point": {"row": 238, "column": 8}, "end_point": {"row": 238, "column": 33}}, {"id": 885, "type": "primitive_type", "text": "size_t", "parent": 884, "children": [], "start_point": {"row": 238, "column": 8}, "end_point": {"row": 238, "column": 14}}, {"id": 886, "type": "identifier", "text": "contour_levels_", "parent": 884, "children": [], "start_point": {"row": 238, "column": 15}, "end_point": {"row": 238, "column": 30}}, {"id": 887, "type": "ERROR", "text": "9", "parent": 884, "children": [888], "start_point": {"row": 238, "column": 31}, "end_point": {"row": 238, "column": 32}}, {"id": 888, "type": "number_literal", "text": "9", "parent": 887, "children": [], "start_point": {"row": 238, "column": 31}, "end_point": {"row": 238, "column": 32}}, {"id": 889, "type": "labeled_statement", "text": "std::vector<double> contour_values_{}", "parent": 0, "children": [890, 891], "start_point": {"row": 239, "column": 8}, "end_point": {"row": 239, "column": 45}}, {"id": 890, "type": "statement_identifier", "text": "std", "parent": 889, "children": [], "start_point": {"row": 239, "column": 8}, "end_point": {"row": 239, "column": 11}}, {"id": 891, "type": "ERROR", "text": ":vector<double> contour_values_", "parent": 889, "children": [892], "start_point": {"row": 239, "column": 12}, "end_point": {"row": 239, "column": 43}}, {"id": 892, "type": "binary_expression", "text": "vector<double> contour_values_", "parent": 891, "children": [893, 897, 898], "start_point": {"row": 239, "column": 13}, "end_point": {"row": 239, "column": 43}}, {"id": 893, "type": "binary_expression", "text": "vector<double", "parent": 892, "children": [894, 895, 896], "start_point": {"row": 239, "column": 13}, "end_point": {"row": 239, "column": 26}}, {"id": 894, "type": "identifier", "text": "vector", "parent": 893, "children": [], "start_point": {"row": 239, "column": 13}, "end_point": {"row": 239, "column": 19}}, {"id": 895, "type": "<", "text": "<", "parent": 893, "children": [], "start_point": {"row": 239, "column": 19}, "end_point": {"row": 239, "column": 20}}, {"id": 896, "type": "identifier", "text": "double", "parent": 893, "children": [], "start_point": {"row": 239, "column": 20}, "end_point": {"row": 239, "column": 26}}, {"id": 897, "type": ">", "text": ">", "parent": 892, "children": [], "start_point": {"row": 239, "column": 26}, "end_point": {"row": 239, "column": 27}}, {"id": 898, "type": "identifier", "text": "contour_values_", "parent": 892, "children": [], "start_point": {"row": 239, "column": 28}, "end_point": {"row": 239, "column": 43}}, {"id": 899, "type": "primitive_type", "text": "bool", "parent": 0, "children": [], "start_point": {"row": 241, "column": 8}, "end_point": {"row": 241, "column": 12}}, {"id": 900, "type": "identifier", "text": "contour_text_", "parent": 0, "children": [], "start_point": {"row": 241, "column": 13}, "end_point": {"row": 241, "column": 26}}, {"id": 901, "type": "false", "text": "false", "parent": 0, "children": [], "start_point": {"row": 241, "column": 27}, "end_point": {"row": 241, "column": 32}}, {"id": 902, "type": "identifier", "text": "std", "parent": 0, "children": [], "start_point": {"row": 242, "column": 8}, "end_point": {"row": 242, "column": 11}}, {"id": 903, "type": "ERROR", "text": ":optional<float> font_size_", "parent": 0, "children": [904], "start_point": {"row": 242, "column": 12}, "end_point": {"row": 242, "column": 39}}, {"id": 904, "type": "binary_expression", "text": "optional<float> font_size_", "parent": 903, "children": [905, 909, 910], "start_point": {"row": 242, "column": 13}, "end_point": {"row": 242, "column": 39}}, {"id": 905, "type": "binary_expression", "text": "optional<float", "parent": 904, "children": [906, 907, 908], "start_point": {"row": 242, "column": 13}, "end_point": {"row": 242, "column": 27}}, {"id": 906, "type": "identifier", "text": "optional", "parent": 905, "children": [], "start_point": {"row": 242, "column": 13}, "end_point": {"row": 242, "column": 21}}, {"id": 907, "type": "<", "text": "<", "parent": 905, "children": [], "start_point": {"row": 242, "column": 21}, "end_point": {"row": 242, "column": 22}}, {"id": 908, "type": "identifier", "text": "float", "parent": 905, "children": [], "start_point": {"row": 242, "column": 22}, "end_point": {"row": 242, "column": 27}}, {"id": 909, "type": ">", "text": ">", "parent": 904, "children": [], "start_point": {"row": 242, "column": 27}, "end_point": {"row": 242, "column": 28}}, {"id": 910, "type": "identifier", "text": "font_size_", "parent": 904, "children": [], "start_point": {"row": 242, "column": 29}, "end_point": {"row": 242, "column": 39}}, {"id": 911, "type": "labeled_statement", "text": "std::nullopt};", "parent": 0, "children": [912], "start_point": {"row": 242, "column": 40}, "end_point": {"row": 242, "column": 54}}, {"id": 912, "type": "statement_identifier", "text": "std", "parent": 911, "children": [], "start_point": {"row": 242, "column": 40}, "end_point": {"row": 242, "column": 43}}, {"id": 913, "type": "identifier", "text": "nullopt", "parent": 911, "children": [], "start_point": {"row": 242, "column": 45}, "end_point": {"row": 242, "column": 52}}, {"id": 914, "type": "labeled_statement", "text": "std::optional<std::string> font_", "parent": 0, "children": [915, 916], "start_point": {"row": 243, "column": 8}, "end_point": {"row": 243, "column": 40}}, {"id": 915, "type": "statement_identifier", "text": "std", "parent": 914, "children": [], "start_point": {"row": 243, "column": 8}, "end_point": {"row": 243, "column": 11}}, {"id": 916, "type": "ERROR", "text": "::optional<std:", "parent": 914, "children": [917], "start_point": {"row": 243, "column": 11}, "end_point": {"row": 243, "column": 26}}, {"id": 917, "type": "binary_expression", "text": "optional<std", "parent": 916, "children": [918, 919, 920], "start_point": {"row": 243, "column": 13}, "end_point": {"row": 243, "column": 25}}, {"id": 918, "type": "identifier", "text": "optional", "parent": 917, "children": [], "start_point": {"row": 243, "column": 13}, "end_point": {"row": 243, "column": 21}}, {"id": 919, "type": "<", "text": "<", "parent": 917, "children": [], "start_point": {"row": 243, "column": 21}, "end_point": {"row": 243, "column": 22}}, {"id": 920, "type": "identifier", "text": "std", "parent": 917, "children": [], "start_point": {"row": 243, "column": 22}, "end_point": {"row": 243, "column": 25}}, {"id": 921, "type": "binary_expression", "text": "string> font_", "parent": 914, "children": [922, 923, 924], "start_point": {"row": 243, "column": 27}, "end_point": {"row": 243, "column": 40}}, {"id": 922, "type": "identifier", "text": "string", "parent": 921, "children": [], "start_point": {"row": 243, "column": 27}, "end_point": {"row": 243, "column": 33}}, {"id": 923, "type": ">", "text": ">", "parent": 921, "children": [], "start_point": {"row": 243, "column": 33}, "end_point": {"row": 243, "column": 34}}, {"id": 924, "type": "identifier", "text": "font_", "parent": 921, "children": [], "start_point": {"row": 243, "column": 35}, "end_point": {"row": 243, "column": 40}}, {"id": 925, "type": "labeled_statement", "text": "std::nullopt};", "parent": 0, "children": [926], "start_point": {"row": 243, "column": 41}, "end_point": {"row": 243, "column": 55}}, {"id": 926, "type": "statement_identifier", "text": "std", "parent": 925, "children": [], "start_point": {"row": 243, "column": 41}, "end_point": {"row": 243, "column": 44}}, {"id": 927, "type": "identifier", "text": "nullopt", "parent": 925, "children": [], "start_point": {"row": 243, "column": 46}, "end_point": {"row": 243, "column": 53}}, {"id": 928, "type": "identifier", "text": "std", "parent": 0, "children": [], "start_point": {"row": 244, "column": 8}, "end_point": {"row": 244, "column": 11}}, {"id": 929, "type": "ERROR", "text": ":string font_weight_", "parent": 0, "children": [930, 931], "start_point": {"row": 244, "column": 12}, "end_point": {"row": 244, "column": 32}}, {"id": 930, "type": "type_identifier", "text": "string", "parent": 929, "children": [], "start_point": {"row": 244, "column": 13}, "end_point": {"row": 244, "column": 19}}, {"id": 931, "type": "identifier", "text": "font_weight_", "parent": 929, "children": [], "start_point": {"row": 244, "column": 20}, "end_point": {"row": 244, "column": 32}}, {"id": 932, "type": "string_literal", "text": "\"normal\"", "parent": 0, "children": [], "start_point": {"row": 244, "column": 33}, "end_point": {"row": 244, "column": 41}}, {"id": 933, "type": "function_definition", "text": "color_array font_color_{0, 0, 0, 0};\n\n /// True if visible\n bool visible_{true};\n };\n}", "parent": 0, "children": [934, 935], "start_point": {"row": 245, "column": 8}, "end_point": {"row": 250, "column": 1}}, {"id": 934, "type": "type_identifier", "text": "color_array", "parent": 933, "children": [], "start_point": {"row": 245, "column": 8}, "end_point": {"row": 245, "column": 19}}, {"id": 935, "type": "identifier", "text": "font_color_", "parent": 933, "children": [], "start_point": {"row": 245, "column": 20}, "end_point": {"row": 245, "column": 31}}, {"id": 936, "type": "comma_expression", "text": "0, 0, 0, 0", "parent": 933, "children": [937, 938], "start_point": {"row": 245, "column": 32}, "end_point": {"row": 245, "column": 42}}, {"id": 937, "type": "number_literal", "text": "0", "parent": 936, "children": [], "start_point": {"row": 245, "column": 32}, "end_point": {"row": 245, "column": 33}}, {"id": 938, "type": "comma_expression", "text": "0, 0, 0", "parent": 936, "children": [939, 940], "start_point": {"row": 245, "column": 35}, "end_point": {"row": 245, "column": 42}}, {"id": 939, "type": "number_literal", "text": "0", "parent": 938, "children": [], "start_point": {"row": 245, "column": 35}, "end_point": {"row": 245, "column": 36}}, {"id": 940, "type": "comma_expression", "text": "0, 0", "parent": 938, "children": [941, 942], "start_point": {"row": 245, "column": 38}, "end_point": {"row": 245, "column": 42}}, {"id": 941, "type": "number_literal", "text": "0", "parent": 940, "children": [], "start_point": {"row": 245, "column": 38}, "end_point": {"row": 245, "column": 39}}, {"id": 942, "type": "number_literal", "text": "0", "parent": 940, "children": [], "start_point": {"row": 245, "column": 41}, "end_point": {"row": 245, "column": 42}}, {"id": 943, "type": "function_definition", "text": "bool visible_{true};\n }", "parent": 933, "children": [944, 945], "start_point": {"row": 248, "column": 8}, "end_point": {"row": 249, "column": 5}}, {"id": 944, "type": "primitive_type", "text": "bool", "parent": 943, "children": [], "start_point": {"row": 248, "column": 8}, "end_point": {"row": 248, "column": 12}}, {"id": 945, "type": "identifier", "text": "visible_", "parent": 943, "children": [], "start_point": {"row": 248, "column": 13}, "end_point": {"row": 248, "column": 21}}, {"id": 946, "type": "true", "text": "true", "parent": 943, "children": [], "start_point": {"row": 248, "column": 22}, "end_point": {"row": 248, "column": 26}}, {"id": 947, "type": "preproc_call", "text": "#endif // MATPLOTPLUSPLUS_SURFACE_H\n", "parent": 0, "children": [948], "start_point": {"row": 252, "column": 0}, "end_point": {"row": 253, "column": 0}}, {"id": 948, "type": "preproc_directive", "text": "#endif", "parent": 947, "children": [], "start_point": {"row": 252, "column": 0}, "end_point": {"row": 252, "column": 6}}]}, "node_categories": {"declarations": {"functions": [40, 107, 115, 134, 138, 140, 148, 153, 158, 168, 173, 185, 190, 196, 206, 210, 219, 223, 232, 236, 245, 249, 258, 262, 271, 275, 284, 288, 297, 301, 310, 314, 323, 327, 336, 340, 349, 353, 362, 366, 375, 379, 388, 392, 401, 405, 418, 422, 436, 440, 449, 453, 463, 467, 479, 483, 494, 498, 507, 518, 522, 531, 535, 544, 548, 557, 561, 570, 574, 583, 587, 593, 603, 607, 616, 620, 629, 633, 642, 646, 655, 659, 668, 672, 681, 685, 700, 708, 714, 721, 733, 761, 768, 775, 782, 789, 794, 801, 804, 807, 884, 933, 943], "variables": [32, 38, 43, 49, 143, 162, 176, 181, 193, 199, 203, 213, 216, 226, 229, 239, 242, 252, 255, 265, 268, 278, 281, 291, 294, 304, 307, 317, 320, 330, 333, 343, 346, 356, 359, 369, 372, 382, 385, 395, 398, 408, 411, 425, 433, 443, 446, 456, 459, 470, 475, 486, 491, 501, 504, 510, 515, 525, 528, 538, 541, 551, 554, 564, 567, 577, 580, 590, 596, 600, 610, 613, 623, 626, 636, 639, 649, 652, 662, 665, 675, 678, 688, 691, 711, 724, 736, 764, 773, 780, 787, 792, 831, 874], "classes": [729], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28], "modules": [], "enums": [163, 164]}, "statements": {"expressions": [77, 78, 84, 87, 93, 96, 97, 125, 717, 744, 745, 746, 752, 756, 892, 893, 904, 905, 917, 921, 936, 938, 940], "assignments": [], "loops": [], "conditionals": [1, 2, 5, 30, 31, 33, 35, 36, 39, 41, 45, 48, 50, 51, 53, 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 73, 79, 82, 85, 88, 89, 91, 92, 94, 98, 99, 101, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 123, 124, 126, 127, 129, 131, 133, 135, 137, 141, 144, 145, 149, 151, 154, 156, 159, 161, 165, 167, 169, 171, 172, 174, 177, 179, 180, 182, 184, 186, 188, 189, 191, 195, 197, 200, 202, 204, 207, 209, 211, 214, 215, 217, 220, 222, 224, 227, 228, 230, 233, 235, 237, 240, 241, 246, 248, 250, 254, 256, 259, 261, 263, 266, 267, 269, 272, 274, 276, 279, 280, 282, 285, 287, 289, 292, 293, 298, 300, 302, 306, 311, 313, 315, 319, 324, 326, 328, 332, 337, 339, 341, 345, 350, 352, 354, 358, 363, 365, 367, 371, 376, 378, 380, 384, 389, 391, 393, 397, 402, 404, 406, 410, 412, 414, 419, 421, 423, 426, 428, 432, 437, 439, 441, 445, 450, 452, 454, 458, 460, 462, 464, 466, 468, 471, 473, 474, 476, 478, 480, 482, 484, 487, 489, 490, 492, 495, 497, 499, 502, 503, 506, 508, 511, 513, 514, 519, 521, 523, 527, 532, 534, 536, 540, 545, 547, 549, 553, 558, 560, 562, 566, 571, 573, 575, 579, 582, 584, 586, 588, 592, 594, 598, 599, 604, 606, 608, 612, 617, 619, 621, 625, 630, 632, 634, 638, 643, 645, 647, 651, 656, 658, 660, 664, 669, 671, 673, 677, 682, 684, 686, 690, 692, 693, 701, 703, 705, 707, 709, 712, 713, 715, 718, 720, 722, 727, 732, 734, 737, 739, 743, 747, 749, 751, 753, 758, 762, 765, 766, 769, 771, 776, 779, 781, 783, 786, 788, 790, 795, 799, 800, 802, 803, 805, 806, 808, 809, 811, 814, 815, 817, 818, 820, 823, 826, 829, 833, 834, 836, 839, 842, 845, 848, 851, 854, 857, 860, 863, 866, 869, 872, 876, 877, 879, 882, 886, 890, 894, 896, 898, 900, 902, 906, 908, 910, 912, 913, 915, 918, 920, 922, 924, 926, 927, 928, 930, 931, 934, 935, 945], "returns": [755], "exceptions": []}, "expressions": {"calls": [947], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 75, 698, 821, 830, 840, 843, 858, 888, 932, 937, 939, 941, 942], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "surface(class axes *parent)"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "set_variables_string() override"}, {"node_id": 115, "universal_type": "function", "name": "unknown", "text_snippet": "plot_string() override"}, {"node_id": 134, "universal_type": "function", "name": "unknown", "text_snippet": "data_string() override"}, {"node_id": 138, "universal_type": "function", "name": "surface", "text_snippet": "double xmax() override;\n double xmin() override;\n double ymax() override;\n doub"}, {"node_id": 140, "universal_type": "function", "name": "unknown", "text_snippet": "xmax()"}, {"node_id": 148, "universal_type": "function", "name": "unknown", "text_snippet": "xmin() override"}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "ymax() override"}, {"node_id": 158, "universal_type": "function", "name": "unknown", "text_snippet": "ymin() override"}, {"node_id": 168, "universal_type": "function", "name": "unknown", "text_snippet": "axes_category() override"}, {"node_id": 173, "universal_type": "function", "name": "unknown", "text_snippet": "line_style(const std::string &line_spec)"}, {"node_id": 185, "universal_type": "function", "name": "unknown", "text_snippet": "line_spec() const"}, {"node_id": 190, "universal_type": "function", "name": "unknown", "text_snippet": "line_spec()"}, {"node_id": 196, "universal_type": "function", "name": "line_spec", "text_snippet": "line_spec(const class line_spec &line_spec)"}, {"node_id": 206, "universal_type": "function", "name": "unknown", "text_snippet": "Y_data() const"}, {"node_id": 210, "universal_type": "function", "name": "unknown", "text_snippet": "Y_data(const vector_2d &Y_data)"}, {"node_id": 219, "universal_type": "function", "name": "unknown", "text_snippet": "X_data() const"}, {"node_id": 223, "universal_type": "function", "name": "unknown", "text_snippet": "X_data(const vector_2d &X_data)"}, {"node_id": 232, "universal_type": "function", "name": "unknown", "text_snippet": "Z_data() const"}, {"node_id": 236, "universal_type": "function", "name": "unknown", "text_snippet": "Z_data(const vector_2d &Z_data)"}, {"node_id": 245, "universal_type": "function", "name": "unknown", "text_snippet": "norm() const"}, {"node_id": 249, "universal_type": "function", "name": "unknown", "text_snippet": "norm(size_t norm)"}, {"node_id": 258, "universal_type": "function", "name": "unknown", "text_snippet": "x_data() const"}, {"node_id": 262, "universal_type": "function", "name": "unknown", "text_snippet": "x_data(const vector_2d &x_data)"}, {"node_id": 271, "universal_type": "function", "name": "unknown", "text_snippet": "y_data() const"}, {"node_id": 275, "universal_type": "function", "name": "unknown", "text_snippet": "y_data(const vector_2d &y_data)"}, {"node_id": 284, "universal_type": "function", "name": "unknown", "text_snippet": "z_data() const"}, {"node_id": 288, "universal_type": "function", "name": "unknown", "text_snippet": "z_data(const vector_2d &z_data)"}, {"node_id": 297, "universal_type": "function", "name": "unknown", "text_snippet": "hidden_3d() const"}, {"node_id": 301, "universal_type": "function", "name": "unknown", "text_snippet": "hidden_3d(bool hidden_3_d)"}, {"node_id": 310, "universal_type": "function", "name": "unknown", "text_snippet": "surface_visible() const"}, {"node_id": 314, "universal_type": "function", "name": "unknown", "text_snippet": "surface_visible(bool surface_visible)"}, {"node_id": 323, "universal_type": "function", "name": "unknown", "text_snippet": "surface_in_2d() const"}, {"node_id": 327, "universal_type": "function", "name": "unknown", "text_snippet": "surface_in_2d(bool surface_in_2d)"}, {"node_id": 336, "universal_type": "function", "name": "unknown", "text_snippet": "palette_map_at_bottom() const"}, {"node_id": 340, "universal_type": "function", "name": "unknown", "text_snippet": "palette_map_at_bottom(bool palette_map_at_bottom)"}, {"node_id": 349, "universal_type": "function", "name": "unknown", "text_snippet": "palette_map_at_surface() const"}, {"node_id": 353, "universal_type": "function", "name": "unknown", "text_snippet": "palette_map_at_surface(bool palette_map_at_surface)"}, {"node_id": 362, "universal_type": "function", "name": "unknown", "text_snippet": "palette_map_at_top() const"}, {"node_id": 366, "universal_type": "function", "name": "unknown", "text_snippet": "palette_map_at_top(bool palette_map_at_top)"}, {"node_id": 375, "universal_type": "function", "name": "unknown", "text_snippet": "contour_base() const"}, {"node_id": 379, "universal_type": "function", "name": "unknown", "text_snippet": "contour_base(bool contour_base)"}, {"node_id": 388, "universal_type": "function", "name": "unknown", "text_snippet": "contour_surface() const"}, {"node_id": 392, "universal_type": "function", "name": "unknown", "text_snippet": "contour_surface(bool contour_surface)"}, {"node_id": 401, "universal_type": "function", "name": "unknown", "text_snippet": "contour_levels() const"}, {"node_id": 405, "universal_type": "function", "name": "unknown", "text_snippet": "contour_levels(size_t contour_levels)"}, {"node_id": 418, "universal_type": "function", "name": "unknown", "text_snippet": "contour_values() const"}, {"node_id": 422, "universal_type": "function", "name": "unknown", "text_snippet": "contour_values(const std::vector<double> &contour_values)"}, {"node_id": 436, "universal_type": "function", "name": "unknown", "text_snippet": "contour_text() const"}, {"node_id": 440, "universal_type": "function", "name": "unknown", "text_snippet": "contour_text(bool contour_text)"}, {"node_id": 449, "universal_type": "function", "name": "unknown", "text_snippet": "font_size() const"}, {"node_id": 453, "universal_type": "function", "name": "unknown", "text_snippet": "font_size(const float &font_size)"}, {"node_id": 463, "universal_type": "function", "name": "unknown", "text_snippet": "font() const"}, {"node_id": 467, "universal_type": "function", "name": "unknown", "text_snippet": "font(const std::string &font)"}, {"node_id": 479, "universal_type": "function", "name": "unknown", "text_snippet": "font_weight() const"}, {"node_id": 483, "universal_type": "function", "name": "unknown", "text_snippet": "font_weight(const std::string &font_weight)"}, {"node_id": 494, "universal_type": "function", "name": "unknown", "text_snippet": "font_color() const"}, {"node_id": 498, "universal_type": "function", "name": "unknown", "text_snippet": "font_color(const color_array &font_color)"}, {"node_id": 507, "universal_type": "function", "name": "unknown", "text_snippet": "font_color(const std::string &font_color)"}, {"node_id": 518, "universal_type": "function", "name": "unknown", "text_snippet": "depthorder() const"}, {"node_id": 522, "universal_type": "function", "name": "unknown", "text_snippet": "depthorder(bool depthorder)"}, {"node_id": 531, "universal_type": "function", "name": "unknown", "text_snippet": "face_alpha() const"}, {"node_id": 535, "universal_type": "function", "name": "unknown", "text_snippet": "face_alpha(float face_alpha)"}, {"node_id": 544, "universal_type": "function", "name": "unknown", "text_snippet": "lighting() const"}, {"node_id": 548, "universal_type": "function", "name": "unknown", "text_snippet": "lighting(bool lighting)"}, {"node_id": 557, "universal_type": "function", "name": "unknown", "text_snippet": "primary() const"}, {"node_id": 561, "universal_type": "function", "name": "unknown", "text_snippet": "primary(float amount)"}, {"node_id": 570, "universal_type": "function", "name": "unknown", "text_snippet": "specular() const"}, {"node_id": 574, "universal_type": "function", "name": "unknown", "text_snippet": "specular(float amount)"}, {"node_id": 583, "universal_type": "function", "name": "unknown", "text_snippet": "contour_line_spec() const"}, {"node_id": 587, "universal_type": "function", "name": "unknown", "text_snippet": "contour_line_spec()"}, {"node_id": 593, "universal_type": "function", "name": "line_spec", "text_snippet": "contour_line_spec(const class line_spec &contour_line_spec)"}, {"node_id": 603, "universal_type": "function", "name": "unknown", "text_snippet": "curtain() const"}, {"node_id": 607, "universal_type": "function", "name": "unknown", "text_snippet": "curtain(bool curtain)"}, {"node_id": 616, "universal_type": "function", "name": "unknown", "text_snippet": "waterfall() const"}, {"node_id": 620, "universal_type": "function", "name": "unknown", "text_snippet": "waterfall(bool waterfall)"}, {"node_id": 629, "universal_type": "function", "name": "unknown", "text_snippet": "fences() const"}, {"node_id": 633, "universal_type": "function", "name": "unknown", "text_snippet": "fences(bool fences)"}, {"node_id": 642, "universal_type": "function", "name": "unknown", "text_snippet": "ribbons() const"}, {"node_id": 646, "universal_type": "function", "name": "unknown", "text_snippet": "ribbons(bool ribbons)"}, {"node_id": 655, "universal_type": "function", "name": "unknown", "text_snippet": "ribbon_width() const"}, {"node_id": 659, "universal_type": "function", "name": "unknown", "text_snippet": "ribbon_width(double ribbon_width)"}, {"node_id": 668, "universal_type": "function", "name": "unknown", "text_snippet": "visible() const"}, {"node_id": 672, "universal_type": "function", "name": "unknown", "text_snippet": "visible(bool visible)"}, {"node_id": 681, "universal_type": "function", "name": "unknown", "text_snippet": "line_width() const"}, {"node_id": 685, "universal_type": "function", "name": "unknown", "text_snippet": "line_width(float line_width)"}, {"node_id": 700, "universal_type": "function", "name": "unknown", "text_snippet": "edge_color() const"}, {"node_id": 708, "universal_type": "function", "name": "unknown", "text_snippet": "edge_color(T c)"}, {"node_id": 714, "universal_type": "function", "name": "unknown", "text_snippet": "line_spec().color(c)"}, {"node_id": 721, "universal_type": "function", "name": "unknown", "text_snippet": "touch()"}, {"node_id": 733, "universal_type": "function", "name": "unknown", "text_snippet": "edge_color(std::initializer_list<float> c)"}, {"node_id": 761, "universal_type": "function", "name": "unknown", "text_snippet": "zmin()"}, {"node_id": 768, "universal_type": "function", "name": "unknown", "text_snippet": "zmax() override"}, {"node_id": 775, "universal_type": "function", "name": "unknown", "text_snippet": "maybe_update_line_spec()"}, {"node_id": 782, "universal_type": "function", "name": "unknown", "text_snippet": "grid_data_string()"}, {"node_id": 789, "universal_type": "function", "name": "unknown", "text_snippet": "ribbon_data_string()"}, {"node_id": 794, "universal_type": "function", "name": "unknown", "text_snippet": "create_line_index()"}, {"node_id": 801, "universal_type": "function", "name": "unknown", "text_snippet": "vector_2d Y_data_{}"}, {"node_id": 804, "universal_type": "function", "name": "unknown", "text_snippet": "vector_2d Z_data_{}"}, {"node_id": 807, "universal_type": "function", "name": "unknown", "text_snippet": "vector_2d C_data_{}"}, {"node_id": 884, "universal_type": "function", "name": "unknown", "text_snippet": "size_t contour_levels_{9}"}, {"node_id": 933, "universal_type": "function", "name": "visible_{true};", "text_snippet": "color_array font_color_{0, 0, 0, 0};\n\n /// True if visible\n bool visible_{true};\n }"}, {"node_id": 943, "universal_type": "function", "name": "visible_{true};", "text_snippet": "bool visible_{true};\n }"}], "class_declarations": [{"node_id": 729, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 6, "text": "#include <array>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <matplot/core/figure.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <matplot/util/concepts.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <matplot/util/handle_types.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <optional>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <matplot/core/axes_object.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <matplot/core/line_spec.h>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <matplot/util/common.h>\n"}, {"node_id": 28, "text": "#include"}]}, "original_source_code": "//\n// Created by <NAME> on 2020-07-04.\n//\n\n#ifndef MATPLOTPLUSPLUS_SURFACE_H\n#define MATPLOTPLUSPLUS_SURFACE_H\n\n#include <array>\n#include <matplot/core/figure.h>\n#include <matplot/util/concepts.h>\n#include <matplot/util/handle_types.h>\n#include <optional>\n\n#include <matplot/core/axes_object.h>\n#include <matplot/core/line_spec.h>\n#include <matplot/util/common.h>\n\nnamespace matplot {\n class axes;\n\n /// Surfaces might include data for contours but, if you only want contours,\n /// it's best to use the contour, contourf, fcontour functions to plot it in\n /// 2d\n class surface : public axes_object {\n public:\n explicit surface(class axes *parent);\n\n /// Grid surface\n surface(class axes *parent, const vector_2d &X, const vector_2d &Y,\n const vector_2d &Z, const vector_2d &C,\n const std::string &line_spec = \"\");\n\n /// Parametric surface\n // surface(class xlim* parent, const vector_1d& x, const\n // vector_1d& y, const vector_1d& z, const vector_1d& c, const\n // std::string& line_spec = \"\");\n\n /// If we receive an axes_handle, we can convert it to a raw\n /// pointer because there is no ownership involved here\n template <class... Args>\n surface(const axes_handle &parent, Args... args)\n : surface(parent.get(), args...) {}\n\n public /* mandatory virtual functions */:\n std::string set_variables_string() override;\n std::string plot_string() override;\n std::string legend_string(const std::string &title) override;\n std::string data_string() override;\n double xmax() override;\n double xmin() override;\n double ymax() override;\n double ymin() override;\n enum axes_object::axes_category axes_category() override;\n\n public /* getters and setters */:\n class surface &line_style(const std::string &line_spec);\n\n const matplot::line_spec &line_spec() const;\n matplot::line_spec &line_spec();\n class surface &line_spec(const class line_spec &line_spec);\n\n const vector_2d &Y_data() const;\n class surface &Y_data(const vector_2d &Y_data);\n\n const vector_2d &X_data() const;\n class surface &X_data(const vector_2d &X_data);\n\n const vector_2d &Z_data() const;\n class surface &Z_data(const vector_2d &Z_data);\n\n size_t norm() const;\n class surface &norm(size_t norm);\n\n const vector_2d &x_data() const;\n class surface &x_data(const vector_2d &x_data);\n\n const vector_2d &y_data() const;\n class surface &y_data(const vector_2d &y_data);\n\n const vector_2d &z_data() const;\n class surface &z_data(const vector_2d &z_data);\n\n bool hidden_3d() const;\n class surface &hidden_3d(bool hidden_3_d);\n\n bool surface_visible() const;\n class surface &surface_visible(bool surface_visible);\n\n bool surface_in_2d() const;\n class surface &surface_in_2d(bool surface_in_2d);\n\n bool palette_map_at_bottom() const;\n class surface &palette_map_at_bottom(bool palette_map_at_bottom);\n\n bool palette_map_at_surface() const;\n class surface &palette_map_at_surface(bool palette_map_at_surface);\n\n bool palette_map_at_top() const;\n class surface &palette_map_at_top(bool palette_map_at_top);\n\n bool contour_base() const;\n class surface &contour_base(bool contour_base);\n\n bool contour_surface() const;\n class surface &contour_surface(bool contour_surface);\n\n size_t contour_levels() const;\n class surface &contour_levels(size_t contour_levels);\n\n const std::vector<double> &contour_values() const;\n class surface &\n contour_values(const std::vector<double> &contour_values);\n\n bool contour_text() const;\n class surface &contour_text(bool contour_text);\n\n const float font_size() const;\n class surface &font_size(const float &font_size);\n\n const std::string font() const;\n class surface &font(const std::string &font);\n\n const std::string &font_weight() const;\n class surface &font_weight(const std::string &font_weight);\n\n const color_array &font_color() const;\n class surface &font_color(const color_array &font_color);\n class surface &font_color(const std::string &font_color);\n\n bool depthorder() const;\n\n class surface &depthorder(bool depthorder);\n\n float face_alpha() const;\n class surface &face_alpha(float face_alpha);\n\n bool lighting() const;\n class surface &lighting(bool lighting);\n\n float primary() const;\n class surface &primary(float amount);\n\n float specular() const;\n class surface &specular(float amount);\n\n const class line_spec &contour_line_spec() const;\n class line_spec &contour_line_spec();\n class surface &\n contour_line_spec(const class line_spec &contour_line_spec);\n\n bool curtain() const;\n class surface &curtain(bool curtain);\n\n bool waterfall() const;\n class surface &waterfall(bool waterfall);\n\n bool fences() const;\n class surface &fences(bool fences);\n\n bool ribbons() const;\n class surface &ribbons(bool ribbons);\n\n double ribbon_width() const;\n class surface &ribbon_width(double ribbon_width);\n\n bool visible() const;\n class surface &visible(bool visible);\n\n public /* getters and setters bypassing the line_spec */:\n float line_width() const;\n class surface &line_width(float line_width);\n\n const std::array<float, 4> &edge_color() const;\n\n template <class T> class surface &edge_color(T c) {\n line_spec().color(c);\n touch();\n return *this;\n }\n\n inline class surface &edge_color(std::initializer_list<float> c) {\n line_spec().color(c);\n touch();\n return *this;\n }\n\n double zmin() override;\n double zmax() override;\n\n protected:\n void maybe_update_line_spec();\n std::string grid_data_string();\n std::string ribbon_data_string();\n size_t create_line_index();\n\n protected:\n /// Data in the xlim\n vector_2d X_data_{};\n vector_2d Y_data_{};\n vector_2d Z_data_{};\n vector_2d C_data_{};\n\n /// Interpret data as a flat array of parametrics values\n /// If false, data needs to represent a grid\n /// If true, data represents a free form\n bool is_parametric_{false};\n\n /// Preprocess zmin / zmax\n double zmin_{NaN};\n double zmax_{NaN};\n\n /// Style\n size_t norm_{2};\n bool hidden3d_{false};\n bool depthorder_{false};\n float face_alpha_{.95};\n class line_spec line_spec_;\n bool lighting_{false};\n float primary_{-1.};\n float specular_{-1.};\n bool curtain_{false};\n bool waterfall_{false};\n bool fences_{false};\n bool ribbons_{false};\n double ribbon_width_{0.75};\n\n // Line surface\n bool surface_visible_{true};\n bool surface_in_2d_{false};\n\n // Solid surface\n bool palette_map_at_bottom_{false};\n bool palette_map_at_surface_{true};\n bool palette_map_at_top_{false};\n\n class line_spec contour_line_spec_;\n bool contour_base_{false};\n bool contour_surface_{false};\n size_t contour_levels_{9};\n std::vector<double> contour_values_{};\n\n bool contour_text_{false};\n std::optional<float> font_size_{std::nullopt};\n std::optional<std::string> font_{std::nullopt};\n std::string font_weight_{\"normal\"};\n color_array font_color_{0, 0, 0, 0};\n\n /// True if visible\n bool visible_{true};\n };\n} // namespace matplot\n\n#endif // MATPLOTPLUSPLUS_SURFACE_H\n"}
341
c
// // UIView+MCShorthand.h // Pods // // Created by <NAME> on 4/5/14. // // #import <UIKit/UIKit.h> #import "MCShorthand.h" @interface UIView (MCShorthand) @property (assign, nonatomic) CGFloat pop_scaleX; @property (assign, nonatomic) CGFloat pop_scaleY; @property (assign, nonatomic) CGPoint pop_scaleXY; @end #ifdef MCANIMATE_SHORTHAND @interface UIView (MCShorthand_DropPrefix) @property (assign, nonatomic) CGFloat scaleX; @property (assign, nonatomic) CGFloat scaleY; @property (assign, nonatomic) CGPoint scaleXY; @end @implementation UIView (MCShorthand_DropPrefix) MCSHORTHAND_PROPERTY(scaleX, ScaleX, CGFloat) MCSHORTHAND_PROPERTY(scaleY, ScaleY, CGFloat) MCSHORTHAND_PROPERTY(scaleXY, ScaleXY, CGPoint) @end #endif
27.04
26
(translation_unit) "//\n// UIView+MCShorthand.h\n// Pods\n//\n// Created by <NAME> on 4/5/14.\n//\n//\n\n#import <UIKit/UIKit.h>\n#import "MCShorthand.h"\n\n@interface UIView (MCShorthand)\n\n@property (assign, nonatomic) CGFloat pop_scaleX;\n@property (assign, nonatomic) CGFloat pop_scaleY;\n@property (assign, nonatomic) CGPoint pop_scaleXY;\n\n@end\n\n#ifdef MCANIMATE_SHORTHAND\n\n@interface UIView (MCShorthand_DropPrefix)\n\n@property (assign, nonatomic) CGFloat scaleX;\n@property (assign, nonatomic) CGFloat scaleY;\n@property (assign, nonatomic) CGPoint scaleXY;\n\n@end\n\n@implementation UIView (MCShorthand_DropPrefix)\n\nMCSHORTHAND_PROPERTY(scaleX, ScaleX, CGFloat)\nMCSHORTHAND_PROPERTY(scaleY, ScaleY, CGFloat)\nMCSHORTHAND_PROPERTY(scaleXY, ScaleXY, CGPoint)\n\n@end\n\n#endif\n" (comment) "//" (comment) "// UIView+MCShorthand.h" (comment) "// Pods" (comment) "//" (comment) "// Created by <NAME> on 4/5/14." (comment) "//" (comment) "//" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (preproc_call) "#import "MCShorthand.h"\n" (preproc_directive) "#import" (preproc_arg) ""MCShorthand.h"" (ERROR) "@interface UIView (MCShorthand)\n\n@property (assign, nonatomic) CGFloat pop_scaleX;\n@property (assign, nonatomic) CGFloat pop_scaleY;\n@property (assign, nonatomic) CGPoint pop_scaleXY;\n\n@end\n\n#ifdef MCANIMATE_SHORTHAND\n\n@interface UIView (MCShorthand_DropPrefix)\n\n@property (assign, nonatomic) CGFloat scaleX;\n@property (assign, nonatomic) CGFloat scaleY;\n@property (assign, nonatomic) CGPoint scaleXY;\n\n@end\n\n@implementation UIView (MCShorthand_DropPrefix)\n\nMCSHORTHAND_PROPERTY(scaleX, ScaleX, CGFloat)\nMCSHORTHAND_PROPERTY(scaleY, ScaleY, CGFloat)\nMCSHORTHAND_PROPERTY(scaleXY, ScaleXY, CGPoint)\n\n@end\n\n#endif" (ERROR) "@" (type_identifier) "interface" (function_declarator) "UIView (MCShorthand)" (identifier) "UIView" (parameter_list) "(MCShorthand)" (() "(" (identifier) "MCShorthand" ()) ")" (ERROR) "@" (ERROR) "@" (declaration) "property (assign, nonatomic) CGFloat pop_scaleX;" (macro_type_specifier) "property (assign, nonatomic)" (identifier) "property" (() "(" (ERROR) "assign," (type_descriptor) "assign" (type_identifier) "assign" (,) "," (type_descriptor) "nonatomic" (type_identifier) "nonatomic" ()) ")" (ERROR) "CGFloat" (identifier) "CGFloat" (identifier) "pop_scaleX" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "property (assign, nonatomic) CGFloat pop_scaleY;" (macro_type_specifier) "property (assign, nonatomic)" (identifier) "property" (() "(" (ERROR) "assign," (type_descriptor) "assign" (type_identifier) "assign" (,) "," (type_descriptor) "nonatomic" (type_identifier) "nonatomic" ()) ")" (ERROR) "CGFloat" (identifier) "CGFloat" (identifier) "pop_scaleY" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "property (assign, nonatomic) CGPoint pop_scaleXY;" (macro_type_specifier) "property (assign, nonatomic)" (identifier) "property" (() "(" (ERROR) "assign," (type_descriptor) "assign" (type_identifier) "assign" (,) "," (type_descriptor) "nonatomic" (type_identifier) "nonatomic" ()) ")" (ERROR) "CGPoint" (identifier) "CGPoint" (identifier) "pop_scaleXY" (;) ";" (ERROR) "@" (ERROR) "@" (type_identifier) "end" (ERROR) "#ifdef MCANIMATE_SHORTHAND\n\n@interface UIView (MCShorthand_DropPrefix)\n\n@property (assign, nonatomic) CGFloat scaleX;\n@property (assign, nonatomic) CGFloat scaleY;\n@property (assign, nonatomic) CGPoint scaleXY;\n\n@end\n\n@implementation" (#ifdef) "#ifdef" (identifier) "MCANIMATE_SHORTHAND" (ERROR) "@" (identifier) "interface" (function_declarator) "UIView (MCShorthand_DropPrefix)\n\n@property (assign, nonatomic) CGFloat scaleX" (identifier) "UIView" (parameter_list) "(MCShorthand_DropPrefix)" (() "(" (parameter_declaration) "MCShorthand_DropPrefix" (type_identifier) "MCShorthand_DropPrefix" ()) ")" (ERROR) "@" (ERROR) "@" (call_expression) "property (assign, nonatomic)" (identifier) "property" (argument_list) "(assign, nonatomic)" (() "(" (identifier) "assign" (,) "," (identifier) "nonatomic" ()) ")" (identifier) "CGFloat" (identifier) "scaleX" (;) ";" (ERROR) "@" (function_declarator) "property (assign, nonatomic) CGFloat scaleY" (identifier) "property" (parameter_list) "(assign, nonatomic)" (() "(" (parameter_declaration) "assign" (type_identifier) "assign" (,) "," (parameter_declaration) "nonatomic" (type_identifier) "nonatomic" ()) ")" (identifier) "CGFloat" (identifier) "scaleY" (;) ";" (ERROR) "@" (function_declarator) "property (assign, nonatomic) CGPoint scaleXY" (identifier) "property" (parameter_list) "(assign, nonatomic)" (() "(" (parameter_declaration) "assign" (type_identifier) "assign" (,) "," (parameter_declaration) "nonatomic" (type_identifier) "nonatomic" ()) ")" (identifier) "CGPoint" (identifier) "scaleXY" (;) ";" (ERROR) "@" (identifier) "end" (ERROR) "@" (identifier) "implementation" (function_declarator) "UIView (MCShorthand_DropPrefix)\n\nMCSHORTHAND_PROPERTY(scaleX, ScaleX, CGFloat)\nMCSHORTHAND_PROPERTY(scaleY, ScaleY, CGFloat)\nMCSHORTHAND_PROPERTY(scaleXY, ScaleXY, CGPoint)\n\n@end" (identifier) "UIView" (parameter_list) "(MCShorthand_DropPrefix)" (() "(" (parameter_declaration) "MCShorthand_DropPrefix" (type_identifier) "MCShorthand_DropPrefix" ()) ")" (call_expression) "MCSHORTHAND_PROPERTY(scaleX, ScaleX, CGFloat)" (identifier) "MCSHORTHAND_PROPERTY" (argument_list) "(scaleX, ScaleX, CGFloat)" (() "(" (identifier) "scaleX" (,) "," (identifier) "ScaleX" (,) "," (identifier) "CGFloat" ()) ")" (call_expression) "MCSHORTHAND_PROPERTY(scaleY, ScaleY, CGFloat)" (identifier) "MCSHORTHAND_PROPERTY" (argument_list) "(scaleY, ScaleY, CGFloat)" (() "(" (identifier) "scaleY" (,) "," (identifier) "ScaleY" (,) "," (identifier) "CGFloat" ()) ")" (call_expression) "MCSHORTHAND_PROPERTY(scaleXY, ScaleXY, CGPoint)" (identifier) "MCSHORTHAND_PROPERTY" (argument_list) "(scaleXY, ScaleXY, CGPoint)" (() "(" (identifier) "scaleXY" (,) "," (identifier) "ScaleXY" (,) "," (identifier) "CGPoint" ()) ")" (ERROR) "@" (ERROR) "@" (identifier) "end" (#endif) "#endif"
175
26
{"language": "c", "success": true, "metadata": {"lines": 26, "avg_line_length": 27.04, "nodes": 122, "errors": 0, "source_hash": "dc58cb754661ce8238a958d89669d857c0a0a6c6c6711de5ae300f23f9f5bd4f", "categorized_nodes": 77}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <UIKit/UIKit.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "<UIKit/UIKit.h>", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "preproc_call", "text": "#import \"MCShorthand.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": "\"MCShorthand.h\"", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 23}}, {"id": 6, "type": "ERROR", "text": "@interface UIView (MCShorthand)\n\n@property (assign, nonatomic) CGFloat pop_scaleX;\n@property (assign, nonatomic) CGFloat pop_scaleY;\n@property (assign, nonatomic) CGPoint pop_scaleXY;\n\n@end\n\n#ifdef MCANIMATE_SHORTHAND\n\n@interface UIView (MCShorthand_DropPrefix)\n\n@property (assign, nonatomic) CGFloat scaleX;\n@property (assign, nonatomic) CGFloat scaleY;\n@property (assign, nonatomic) CGPoint scaleXY;\n\n@end\n\n@implementation UIView (MCShorthand_DropPrefix)\n\nMCSHORTHAND_PROPERTY(scaleX, ScaleX, CGFloat)\nMCSHORTHAND_PROPERTY(scaleY, ScaleY, CGFloat)\nMCSHORTHAND_PROPERTY(scaleXY, ScaleXY, CGPoint)\n\n@end\n\n#endif", "parent": null, "children": [7, 8, 9, 13, 15, 26, 28, 39, 41, 52, 54, 96, 121], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 37, "column": 6}}, {"id": 7, "type": "ERROR", "text": "@", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 8, "type": "type_identifier", "text": "interface", "parent": 6, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 9, "type": "function_declarator", "text": "UIView (MCShorthand)", "parent": 6, "children": [10, 11], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 31}}, {"id": 10, "type": "identifier", "text": "UIView", "parent": 9, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 17}}, {"id": 11, "type": "parameter_list", "text": "(MCShorthand)", "parent": 9, "children": [12], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 31}}, {"id": 12, "type": "identifier", "text": "MCShorthand", "parent": 11, "children": [], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 30}}, {"id": 13, "type": "ERROR", "text": "@", "parent": 6, "children": [14], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 14, "type": "ERROR", "text": "@", "parent": 13, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 15, "type": "declaration", "text": "property (assign, nonatomic) CGFloat pop_scaleX;", "parent": 6, "children": [16, 23, 25], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 49}}, {"id": 16, "type": "macro_type_specifier", "text": "property (assign, nonatomic)", "parent": 15, "children": [17, 18, 21], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 29}}, {"id": 17, "type": "identifier", "text": "property", "parent": 16, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 18, "type": "ERROR", "text": "assign,", "parent": 16, "children": [19], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 18}}, {"id": 19, "type": "type_descriptor", "text": "assign", "parent": 18, "children": [20], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 17}}, {"id": 20, "type": "type_identifier", "text": "assign", "parent": 19, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 17}}, {"id": 21, "type": "type_descriptor", "text": "nonatomic", "parent": 16, "children": [22], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 28}}, {"id": 22, "type": "type_identifier", "text": "nonatomic", "parent": 21, "children": [], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 28}}, {"id": 23, "type": "ERROR", "text": "CGFloat", "parent": 15, "children": [24], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 37}}, {"id": 24, "type": "identifier", "text": "CGFloat", "parent": 23, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 37}}, {"id": 25, "type": "identifier", "text": "pop_scaleX", "parent": 15, "children": [], "start_point": {"row": 13, "column": 38}, "end_point": {"row": 13, "column": 48}}, {"id": 26, "type": "ERROR", "text": "@", "parent": 6, "children": [27], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 27, "type": "ERROR", "text": "@", "parent": 26, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 28, "type": "declaration", "text": "property (assign, nonatomic) CGFloat pop_scaleY;", "parent": 6, "children": [29, 36, 38], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 49}}, {"id": 29, "type": "macro_type_specifier", "text": "property (assign, nonatomic)", "parent": 28, "children": [30, 31, 34], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 29}}, {"id": 30, "type": "identifier", "text": "property", "parent": 29, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 31, "type": "ERROR", "text": "assign,", "parent": 29, "children": [32], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 18}}, {"id": 32, "type": "type_descriptor", "text": "assign", "parent": 31, "children": [33], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 17}}, {"id": 33, "type": "type_identifier", "text": "assign", "parent": 32, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 17}}, {"id": 34, "type": "type_descriptor", "text": "nonatomic", "parent": 29, "children": [35], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 28}}, {"id": 35, "type": "type_identifier", "text": "nonatomic", "parent": 34, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 28}}, {"id": 36, "type": "ERROR", "text": "CGFloat", "parent": 28, "children": [37], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 37}}, {"id": 37, "type": "identifier", "text": "CGFloat", "parent": 36, "children": [], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 37}}, {"id": 38, "type": "identifier", "text": "pop_scaleY", "parent": 28, "children": [], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 48}}, {"id": 39, "type": "ERROR", "text": "@", "parent": 6, "children": [40], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 40, "type": "ERROR", "text": "@", "parent": 39, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 41, "type": "declaration", "text": "property (assign, nonatomic) CGPoint pop_scaleXY;", "parent": 6, "children": [42, 49, 51], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 50}}, {"id": 42, "type": "macro_type_specifier", "text": "property (assign, nonatomic)", "parent": 41, "children": [43, 44, 47], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 29}}, {"id": 43, "type": "identifier", "text": "property", "parent": 42, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 44, "type": "ERROR", "text": "assign,", "parent": 42, "children": [45], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 18}}, {"id": 45, "type": "type_descriptor", "text": "assign", "parent": 44, "children": [46], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 17}}, {"id": 46, "type": "type_identifier", "text": "assign", "parent": 45, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 17}}, {"id": 47, "type": "type_descriptor", "text": "nonatomic", "parent": 42, "children": [48], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 28}}, {"id": 48, "type": "type_identifier", "text": "nonatomic", "parent": 47, "children": [], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 28}}, {"id": 49, "type": "ERROR", "text": "CGPoint", "parent": 41, "children": [50], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 37}}, {"id": 50, "type": "identifier", "text": "CGPoint", "parent": 49, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 37}}, {"id": 51, "type": "identifier", "text": "pop_scaleXY", "parent": 41, "children": [], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 49}}, {"id": 52, "type": "ERROR", "text": "@", "parent": 6, "children": [53], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 53, "type": "ERROR", "text": "@", "parent": 52, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 54, "type": "ERROR", "text": "#ifdef MCANIMATE_SHORTHAND\n\n@interface UIView (MCShorthand_DropPrefix)\n\n@property (assign, nonatomic) CGFloat scaleX;\n@property (assign, nonatomic) CGFloat scaleY;\n@property (assign, nonatomic) CGPoint scaleXY;\n\n@end\n\n@implementation", "parent": 6, "children": [55, 56, 57, 58, 59, 73, 74, 83, 84, 93, 94, 95], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 29, "column": 15}}, {"id": 55, "type": "#ifdef", "text": "#ifdef", "parent": 54, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 56, "type": "identifier", "text": "MCANIMATE_SHORTHAND", "parent": 54, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 26}}, {"id": 57, "type": "ERROR", "text": "@", "parent": 54, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 58, "type": "identifier", "text": "interface", "parent": 54, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 10}}, {"id": 59, "type": "function_declarator", "text": "UIView (MCShorthand_DropPrefix)\n\n@property (assign, nonatomic) CGFloat scaleX", "parent": 54, "children": [60, 61, 64, 66, 71, 72], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 23, "column": 44}}, {"id": 60, "type": "identifier", "text": "UIView", "parent": 59, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 17}}, {"id": 61, "type": "parameter_list", "text": "(MCShorthand_DropPrefix)", "parent": 59, "children": [62], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 42}}, {"id": 62, "type": "parameter_declaration", "text": "MCShorthand_DropPrefix", "parent": 61, "children": [63], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 41}}, {"id": 63, "type": "type_identifier", "text": "MCShorthand_DropPrefix", "parent": 62, "children": [], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 41}}, {"id": 64, "type": "ERROR", "text": "@", "parent": 59, "children": [65], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 65, "type": "ERROR", "text": "@", "parent": 64, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 66, "type": "call_expression", "text": "property (assign, nonatomic)", "parent": 59, "children": [67, 68], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 29}}, {"id": 67, "type": "identifier", "text": "property", "parent": 66, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 68, "type": "argument_list", "text": "(assign, nonatomic)", "parent": 66, "children": [69, 70], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 29}}, {"id": 69, "type": "identifier", "text": "assign", "parent": 68, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 17}}, {"id": 70, "type": "identifier", "text": "nonatomic", "parent": 68, "children": [], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 28}}, {"id": 71, "type": "identifier", "text": "CGFloat", "parent": 59, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 37}}, {"id": 72, "type": "identifier", "text": "scaleX", "parent": 59, "children": [], "start_point": {"row": 23, "column": 38}, "end_point": {"row": 23, "column": 44}}, {"id": 73, "type": "ERROR", "text": "@", "parent": 54, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 74, "type": "function_declarator", "text": "property (assign, nonatomic) CGFloat scaleY", "parent": 54, "children": [75, 76, 81, 82], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 44}}, {"id": 75, "type": "identifier", "text": "property", "parent": 74, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 9}}, {"id": 76, "type": "parameter_list", "text": "(assign, nonatomic)", "parent": 74, "children": [77, 79], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 29}}, {"id": 77, "type": "parameter_declaration", "text": "assign", "parent": 76, "children": [78], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 17}}, {"id": 78, "type": "type_identifier", "text": "assign", "parent": 77, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 17}}, {"id": 79, "type": "parameter_declaration", "text": "nonatomic", "parent": 76, "children": [80], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 28}}, {"id": 80, "type": "type_identifier", "text": "nonatomic", "parent": 79, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 28}}, {"id": 81, "type": "identifier", "text": "CGFloat", "parent": 74, "children": [], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 37}}, {"id": 82, "type": "identifier", "text": "scaleY", "parent": 74, "children": [], "start_point": {"row": 24, "column": 38}, "end_point": {"row": 24, "column": 44}}, {"id": 83, "type": "ERROR", "text": "@", "parent": 54, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 84, "type": "function_declarator", "text": "property (assign, nonatomic) CGPoint scaleXY", "parent": 54, "children": [85, 86, 91, 92], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 45}}, {"id": 85, "type": "identifier", "text": "property", "parent": 84, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 9}}, {"id": 86, "type": "parameter_list", "text": "(assign, nonatomic)", "parent": 84, "children": [87, 89], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 29}}, {"id": 87, "type": "parameter_declaration", "text": "assign", "parent": 86, "children": [88], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 17}}, {"id": 88, "type": "type_identifier", "text": "assign", "parent": 87, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 17}}, {"id": 89, "type": "parameter_declaration", "text": "nonatomic", "parent": 86, "children": [90], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 28}}, {"id": 90, "type": "type_identifier", "text": "nonatomic", "parent": 89, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 28}}, {"id": 91, "type": "identifier", "text": "CGPoint", "parent": 84, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 37}}, {"id": 92, "type": "identifier", "text": "scaleXY", "parent": 84, "children": [], "start_point": {"row": 25, "column": 38}, "end_point": {"row": 25, "column": 45}}, {"id": 93, "type": "ERROR", "text": "@", "parent": 54, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 94, "type": "ERROR", "text": "@", "parent": 54, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 95, "type": "identifier", "text": "implementation", "parent": 54, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 15}}, {"id": 96, "type": "function_declarator", "text": "UIView (MCShorthand_DropPrefix)\n\nMCSHORTHAND_PROPERTY(scaleX, ScaleX, CGFloat)\nMCSHORTHAND_PROPERTY(scaleY, ScaleY, CGFloat)\nMCSHORTHAND_PROPERTY(scaleXY, ScaleXY, CGPoint)\n\n@end", "parent": 6, "children": [97, 98, 101, 107, 113, 119], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 35, "column": 4}}, {"id": 97, "type": "identifier", "text": "UIView", "parent": 96, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 22}}, {"id": 98, "type": "parameter_list", "text": "(MCShorthand_DropPrefix)", "parent": 96, "children": [99], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 47}}, {"id": 99, "type": "parameter_declaration", "text": "MCShorthand_DropPrefix", "parent": 98, "children": [100], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 46}}, {"id": 100, "type": "type_identifier", "text": "MCShorthand_DropPrefix", "parent": 99, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 46}}, {"id": 101, "type": "call_expression", "text": "MCSHORTHAND_PROPERTY(scaleX, ScaleX, CGFloat)", "parent": 96, "children": [102, 103], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 45}}, {"id": 102, "type": "identifier", "text": "MCSHORTHAND_PROPERTY", "parent": 101, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 20}}, {"id": 103, "type": "argument_list", "text": "(scaleX, ScaleX, CGFloat)", "parent": 101, "children": [104, 105, 106], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 45}}, {"id": 104, "type": "identifier", "text": "scaleX", "parent": 103, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 27}}, {"id": 105, "type": "identifier", "text": "ScaleX", "parent": 103, "children": [], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 35}}, {"id": 106, "type": "identifier", "text": "CGFloat", "parent": 103, "children": [], "start_point": {"row": 31, "column": 37}, "end_point": {"row": 31, "column": 44}}, {"id": 107, "type": "call_expression", "text": "MCSHORTHAND_PROPERTY(scaleY, ScaleY, CGFloat)", "parent": 96, "children": [108, 109], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 45}}, {"id": 108, "type": "identifier", "text": "MCSHORTHAND_PROPERTY", "parent": 107, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 20}}, {"id": 109, "type": "argument_list", "text": "(scaleY, ScaleY, CGFloat)", "parent": 107, "children": [110, 111, 112], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 45}}, {"id": 110, "type": "identifier", "text": "scaleY", "parent": 109, "children": [], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 27}}, {"id": 111, "type": "identifier", "text": "ScaleY", "parent": 109, "children": [], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 35}}, {"id": 112, "type": "identifier", "text": "CGFloat", "parent": 109, "children": [], "start_point": {"row": 32, "column": 37}, "end_point": {"row": 32, "column": 44}}, {"id": 113, "type": "call_expression", "text": "MCSHORTHAND_PROPERTY(scaleXY, ScaleXY, CGPoint)", "parent": 96, "children": [114, 115], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 47}}, {"id": 114, "type": "identifier", "text": "MCSHORTHAND_PROPERTY", "parent": 113, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 20}}, {"id": 115, "type": "argument_list", "text": "(scaleXY, ScaleXY, CGPoint)", "parent": 113, "children": [116, 117, 118], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 47}}, {"id": 116, "type": "identifier", "text": "scaleXY", "parent": 115, "children": [], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 28}}, {"id": 117, "type": "identifier", "text": "ScaleXY", "parent": 115, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 37}}, {"id": 118, "type": "identifier", "text": "CGPoint", "parent": 115, "children": [], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 46}}, {"id": 119, "type": "ERROR", "text": "@", "parent": 96, "children": [120], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 120, "type": "ERROR", "text": "@", "parent": 119, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 121, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9, 59, 74, 84, 96], "variables": [15, 28, 41, 62, 77, 79, 87, 89, 99], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [66, 101, 107, 113], "assignments": [], "loops": [], "conditionals": [8, 10, 12, 16, 17, 20, 22, 24, 25, 29, 30, 33, 35, 37, 38, 42, 43, 46, 48, 50, 51, 55, 56, 58, 60, 63, 67, 69, 70, 71, 72, 75, 78, 80, 81, 82, 85, 88, 90, 91, 92, 95, 97, 100, 102, 104, 105, 106, 108, 110, 111, 112, 114, 116, 117, 118, 121], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 3], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "unknown", "text_snippet": "UIView (MCShorthand)"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "UIView (MCShorthand_DropPrefix)\n\n@property (assign, nonatomic) CGFloat scaleX"}, {"node_id": 74, "universal_type": "function", "name": "unknown", "text_snippet": "property (assign, nonatomic) CGFloat scaleY"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "property (assign, nonatomic) CGPoint scaleXY"}, {"node_id": 96, "universal_type": "function", "name": "unknown", "text_snippet": "UIView (MCShorthand_DropPrefix)\n\nMCSHORTHAND_PROPERTY(scaleX, ScaleX, CGFloat)\nMCSHORTHAND_PROPERTY("}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// UIView+MCShorthand.h\n// Pods\n//\n// Created by <NAME> on 4/5/14.\n//\n//\n\n#import <UIKit/UIKit.h>\n#import \"MCShorthand.h\"\n\n@interface UIView (MCShorthand)\n\n@property (assign, nonatomic) CGFloat pop_scaleX;\n@property (assign, nonatomic) CGFloat pop_scaleY;\n@property (assign, nonatomic) CGPoint pop_scaleXY;\n\n@end\n\n#ifdef MCANIMATE_SHORTHAND\n\n@interface UIView (MCShorthand_DropPrefix)\n\n@property (assign, nonatomic) CGFloat scaleX;\n@property (assign, nonatomic) CGFloat scaleY;\n@property (assign, nonatomic) CGPoint scaleXY;\n\n@end\n\n@implementation UIView (MCShorthand_DropPrefix)\n\nMCSHORTHAND_PROPERTY(scaleX, ScaleX, CGFloat)\nMCSHORTHAND_PROPERTY(scaleY, ScaleY, CGFloat)\nMCSHORTHAND_PROPERTY(scaleXY, ScaleXY, CGPoint)\n\n@end\n\n#endif\n"}
342
c
/* * Copyright 2013-2019 Automatak, LLC * * Licensed to Green Energy Corp (www.greenenergycorp.com) and Automatak * LLC (www.automatak.com) under one or more contributor license agreements. * See the NOTICE file distributed with this work for additional information * regarding copyright ownership. Green Energy Corp and Automatak LLC license * 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. */ #ifndef OPENPAL_CONFIGURE_H #define OPENPAL_CONFIGURE_H #include <cstdint> // Default configurations for the static erasure size. // They are liberally set by default for x64 // but can be reduced for embedded systems. #ifndef OPENPAL_ERASURE_MULTIPLE #define OPENPAL_ERASURE_MULTIPLE 12 #endif namespace openpal { namespace sizes { static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*); } } // namespace openpal #ifdef AVR #include <stddef.h> #include <stdlib.h> inline void* operator new(size_t, void* p) { return p; } inline void* operator new(size_t size) { return malloc(size); } inline void operator delete(void* ptr) { free(ptr); } inline void* operator new[](size_t size) { return malloc(size); } inline void operator delete[](void* ptr) { free(ptr); } extern "C" void abort(); #else #include <new> #endif #endif
27.35
63
(translation_unit) "/*\n * Copyright 2013-2019 Automatak, LLC\n *\n * Licensed to Green Energy Corp (www.greenenergycorp.com) and Automatak\n * LLC (www.automatak.com) under one or more contributor license agreements.\n * See the NOTICE file distributed with this work for additional information\n * regarding copyright ownership. Green Energy Corp and Automatak LLC license\n * this file to you under the Apache License, Version 2.0 (the "License"); you\n * may not use this file except in compliance with the License. You may obtain\n * 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 OPENPAL_CONFIGURE_H\n#define OPENPAL_CONFIGURE_H\n\n#include <cstdint>\n\n// Default configurations for the static erasure size.\n// They are liberally set by default for x64\n// but can be reduced for embedded systems.\n\n#ifndef OPENPAL_ERASURE_MULTIPLE\n#define OPENPAL_ERASURE_MULTIPLE 12\n#endif\n\nnamespace openpal\n{\nnamespace sizes\n{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);\n}\n} // namespace openpal\n\n#ifdef AVR\n\n#include <stddef.h>\n#include <stdlib.h>\n\ninline void* operator new(size_t, void* p)\n{\n return p;\n}\n\ninline void* operator new(size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete(void* ptr)\n{\n free(ptr);\n}\n\ninline void* operator new[](size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete[](void* ptr)\n{\n free(ptr);\n}\n\nextern "C" void abort();\n\n#else\n\n#include <new>\n\n#endif\n\n#endif\n" (comment) "/*\n * Copyright 2013-2019 Automatak, LLC\n *\n * Licensed to Green Energy Corp (www.greenenergycorp.com) and Automatak\n * LLC (www.automatak.com) under one or more contributor license agreements.\n * See the NOTICE file distributed with this work for additional information\n * regarding copyright ownership. Green Energy Corp and Automatak LLC license\n * this file to you under the Apache License, Version 2.0 (the "License"); you\n * may not use this file except in compliance with the License. You may obtain\n * a copy of the License at:\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */" (preproc_ifdef) "#ifndef OPENPAL_CONFIGURE_H\n#define OPENPAL_CONFIGURE_H\n\n#include <cstdint>\n\n// Default configurations for the static erasure size.\n// They are liberally set by default for x64\n// but can be reduced for embedded systems.\n\n#ifndef OPENPAL_ERASURE_MULTIPLE\n#define OPENPAL_ERASURE_MULTIPLE 12\n#endif\n\nnamespace openpal\n{\nnamespace sizes\n{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);\n}\n} // namespace openpal\n\n#ifdef AVR\n\n#include <stddef.h>\n#include <stdlib.h>\n\ninline void* operator new(size_t, void* p)\n{\n return p;\n}\n\ninline void* operator new(size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete(void* ptr)\n{\n free(ptr);\n}\n\ninline void* operator new[](size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete[](void* ptr)\n{\n free(ptr);\n}\n\nextern "C" void abort();\n\n#else\n\n#include <new>\n\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "OPENPAL_CONFIGURE_H" (preproc_def) "#define OPENPAL_CONFIGURE_H\n" (#define) "#define" (identifier) "OPENPAL_CONFIGURE_H" (preproc_include) "#include <cstdint>\n" (#include) "#include" (system_lib_string) "<cstdint>" (comment) "// Default configurations for the static erasure size." (comment) "// They are liberally set by default for x64" (comment) "// but can be reduced for embedded systems." (preproc_ifdef) "#ifndef OPENPAL_ERASURE_MULTIPLE\n#define OPENPAL_ERASURE_MULTIPLE 12\n#endif" (#ifndef) "#ifndef" (identifier) "OPENPAL_ERASURE_MULTIPLE" (preproc_def) "#define OPENPAL_ERASURE_MULTIPLE 12\n" (#define) "#define" (identifier) "OPENPAL_ERASURE_MULTIPLE" (preproc_arg) "12" (#endif) "#endif" (function_definition) "namespace openpal\n{\nnamespace sizes\n{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);\n}\n}" (type_identifier) "namespace" (identifier) "openpal" (compound_statement) "{\nnamespace sizes\n{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);\n}\n}" ({) "{" (function_definition) "namespace sizes\n{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);\n}" (type_identifier) "namespace" (identifier) "sizes" (compound_statement) "{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);\n}" ({) "{" (declaration) "static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "uint16_t" (init_declarator) "MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*)" (identifier) "MAX_ERASURE_SIZE" (=) "=" (binary_expression) "OPENPAL_ERASURE_MULTIPLE * sizeof(void*)" (identifier) "OPENPAL_ERASURE_MULTIPLE" (*) "*" (sizeof_expression) "sizeof(void*)" (sizeof) "sizeof" (() "(" (type_descriptor) "void*" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (}) "}" (}) "}" (comment) "// namespace openpal" (preproc_ifdef) "#ifdef AVR\n\n#include <stddef.h>\n#include <stdlib.h>\n\ninline void* operator new(size_t, void* p)\n{\n return p;\n}\n\ninline void* operator new(size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete(void* ptr)\n{\n free(ptr);\n}\n\ninline void* operator new[](size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete[](void* ptr)\n{\n free(ptr);\n}\n\nextern "C" void abort();\n\n#else\n\n#include <new>\n\n#endif" (#ifdef) "#ifdef" (identifier) "AVR" (preproc_include) "#include <stddef.h>\n" (#include) "#include" (system_lib_string) "<stddef.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (function_definition) "inline void* operator new(size_t, void* p)\n{\n return p;\n}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (pointer_declarator) "* operator new(size_t, void* p)" (*) "*" (ERROR) "operator" (identifier) "operator" (function_declarator) "new(size_t, void* p)" (identifier) "new" (parameter_list) "(size_t, void* p)" (() "(" (parameter_declaration) "size_t" (primitive_type) "size_t" (,) "," (parameter_declaration) "void* p" (primitive_type) "void" (pointer_declarator) "* p" (*) "*" (identifier) "p" ()) ")" (compound_statement) "{\n return p;\n}" ({) "{" (return_statement) "return p;" (return) "return" (identifier) "p" (;) ";" (}) "}" (function_definition) "inline void* operator new(size_t size)\n{\n return malloc(size);\n}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (pointer_declarator) "* operator new(size_t size)" (*) "*" (ERROR) "operator" (identifier) "operator" (function_declarator) "new(size_t size)" (identifier) "new" (parameter_list) "(size_t size)" (() "(" (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" ()) ")" (compound_statement) "{\n return malloc(size);\n}" ({) "{" (return_statement) "return malloc(size);" (return) "return" (call_expression) "malloc(size)" (identifier) "malloc" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" (;) ";" (}) "}" (function_definition) "inline void operator delete(void* ptr)\n{\n free(ptr);\n}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "operator" (identifier) "operator" (function_declarator) "delete(void* ptr)" (identifier) "delete" (parameter_list) "(void* ptr)" (() "(" (parameter_declaration) "void* ptr" (primitive_type) "void" (pointer_declarator) "* ptr" (*) "*" (identifier) "ptr" ()) ")" (compound_statement) "{\n free(ptr);\n}" ({) "{" (expression_statement) "free(ptr);" (call_expression) "free(ptr)" (identifier) "free" (argument_list) "(ptr)" (() "(" (identifier) "ptr" ()) ")" (;) ";" (}) "}" (function_definition) "inline void* operator new[](size_t size)\n{\n return malloc(size);\n}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (pointer_declarator) "* operator new[](size_t size)" (*) "*" (function_declarator) "operator new[](size_t size)" (array_declarator) "operator new[]" (identifier) "operator" (ERROR) "new" (identifier) "new" ([) "[" (]) "]" (parameter_list) "(size_t size)" (() "(" (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" ()) ")" (compound_statement) "{\n return malloc(size);\n}" ({) "{" (return_statement) "return malloc(size);" (return) "return" (call_expression) "malloc(size)" (identifier) "malloc" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" (;) ";" (}) "}" (function_definition) "inline void operator delete[](void* ptr)\n{\n free(ptr);\n}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "operator delete[](void* ptr)" (array_declarator) "operator delete[]" (identifier) "operator" (ERROR) "delete" (identifier) "delete" ([) "[" (]) "]" (parameter_list) "(void* ptr)" (() "(" (parameter_declaration) "void* ptr" (primitive_type) "void" (pointer_declarator) "* ptr" (*) "*" (identifier) "ptr" ()) ")" (compound_statement) "{\n free(ptr);\n}" ({) "{" (expression_statement) "free(ptr);" (call_expression) "free(ptr)" (identifier) "free" (argument_list) "(ptr)" (() "(" (identifier) "ptr" ()) ")" (;) ";" (}) "}" (linkage_specification) "extern "C" void abort();" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ (declaration) "void abort();" (primitive_type) "void" (function_declarator) "abort()" (identifier) "abort" (parameter_list) "()" (() "(" ()) ")" (;) ";" (preproc_else) "#else\n\n#include <new>\n" (#else) "#else" (preproc_include) "#include <new>\n" (#include) "#include" (system_lib_string) "<new>" (#endif) "#endif" (#endif) "#endif"
230
5
{"language": "c", "success": true, "metadata": {"lines": 63, "avg_line_length": 27.35, "nodes": 149, "errors": 0, "source_hash": "a9eb30fad424cc86141e090c9d5a80a0d7e193534fae2b9f3abf2894f3257fae", "categorized_nodes": 89}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef OPENPAL_CONFIGURE_H\n#define OPENPAL_CONFIGURE_H\n\n#include <cstdint>\n\n// Default configurations for the static erasure size.\n// They are liberally set by default for x64\n// but can be reduced for embedded systems.\n\n#ifndef OPENPAL_ERASURE_MULTIPLE\n#define OPENPAL_ERASURE_MULTIPLE 12\n#endif\n\nnamespace openpal\n{\nnamespace sizes\n{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);\n}\n} // namespace openpal\n\n#ifdef AVR\n\n#include <stddef.h>\n#include <stdlib.h>\n\ninline void* operator new(size_t, void* p)\n{\n return p;\n}\n\ninline void* operator new(size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete(void* ptr)\n{\n free(ptr);\n}\n\ninline void* operator new[](size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete[](void* ptr)\n{\n free(ptr);\n}\n\nextern \"C\" void abort();\n\n#else\n\n#include <new>\n\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 17, 36, 148], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 79, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 2, "type": "identifier", "text": "OPENPAL_CONFIGURE_H", "parent": 0, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 27}}, {"id": 3, "type": "preproc_def", "text": "#define OPENPAL_CONFIGURE_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 5, "type": "identifier", "text": "OPENPAL_CONFIGURE_H", "parent": 3, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 27}}, {"id": 6, "type": "preproc_include", "text": "#include <cstdint>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<cstdint>", "parent": 6, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 18}}, {"id": 9, "type": "preproc_ifdef", "text": "#ifndef OPENPAL_ERASURE_MULTIPLE\n#define OPENPAL_ERASURE_MULTIPLE 12\n#endif", "parent": 0, "children": [10, 11, 12, 16], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 10, "type": "#ifndef", "text": "#ifndef", "parent": 9, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 11, "type": "identifier", "text": "OPENPAL_ERASURE_MULTIPLE", "parent": 9, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 32}}, {"id": 12, "type": "preproc_def", "text": "#define OPENPAL_ERASURE_MULTIPLE 12\n", "parent": 9, "children": [13, 14, 15], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 14, "type": "identifier", "text": "OPENPAL_ERASURE_MULTIPLE", "parent": 12, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 32}}, {"id": 15, "type": "preproc_arg", "text": "12", "parent": 12, "children": [], "start_point": {"row": 29, "column": 33}, "end_point": {"row": 29, "column": 35}}, {"id": 16, "type": "#endif", "text": "#endif", "parent": 9, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 17, "type": "function_definition", "text": "namespace openpal\n{\nnamespace sizes\n{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);\n}\n}", "parent": 0, "children": [18, 19], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 18, "type": "type_identifier", "text": "namespace", "parent": 17, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 9}}, {"id": 19, "type": "identifier", "text": "openpal", "parent": 17, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 17}}, {"id": 20, "type": "function_definition", "text": "namespace sizes\n{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);\n}", "parent": 17, "children": [21, 22], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 21, "type": "type_identifier", "text": "namespace", "parent": 20, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 9}}, {"id": 22, "type": "identifier", "text": "sizes", "parent": 20, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 15}}, {"id": 23, "type": "declaration", "text": "static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);", "parent": 20, "children": [24, 25], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 86}}, {"id": 24, "type": "primitive_type", "text": "uint16_t", "parent": 23, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 25}}, {"id": 25, "type": "init_declarator", "text": "MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*)", "parent": 23, "children": [26, 27, 28], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 85}}, {"id": 26, "type": "identifier", "text": "MAX_ERASURE_SIZE", "parent": 25, "children": [], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 42}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 37, "column": 43}, "end_point": {"row": 37, "column": 44}}, {"id": 28, "type": "binary_expression", "text": "OPENPAL_ERASURE_MULTIPLE * sizeof(void*)", "parent": 25, "children": [29, 30, 31], "start_point": {"row": 37, "column": 45}, "end_point": {"row": 37, "column": 85}}, {"id": 29, "type": "identifier", "text": "OPENPAL_ERASURE_MULTIPLE", "parent": 28, "children": [], "start_point": {"row": 37, "column": 45}, "end_point": {"row": 37, "column": 69}}, {"id": 30, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 37, "column": 70}, "end_point": {"row": 37, "column": 71}}, {"id": 31, "type": "sizeof_expression", "text": "sizeof(void*)", "parent": 28, "children": [32], "start_point": {"row": 37, "column": 72}, "end_point": {"row": 37, "column": 85}}, {"id": 32, "type": "type_descriptor", "text": "void*", "parent": 31, "children": [33, 34], "start_point": {"row": 37, "column": 79}, "end_point": {"row": 37, "column": 84}}, {"id": 33, "type": "primitive_type", "text": "void", "parent": 32, "children": [], "start_point": {"row": 37, "column": 79}, "end_point": {"row": 37, "column": 83}}, {"id": 34, "type": "abstract_pointer_declarator", "text": "*", "parent": 32, "children": [35], "start_point": {"row": 37, "column": 83}, "end_point": {"row": 37, "column": 84}}, {"id": 35, "type": "*", "text": "*", "parent": 34, "children": [], "start_point": {"row": 37, "column": 83}, "end_point": {"row": 37, "column": 84}}, {"id": 36, "type": "preproc_ifdef", "text": "#ifdef AVR\n\n#include <stddef.h>\n#include <stdlib.h>\n\ninline void* operator new(size_t, void* p)\n{\n return p;\n}\n\ninline void* operator new(size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete(void* ptr)\n{\n free(ptr);\n}\n\ninline void* operator new[](size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete[](void* ptr)\n{\n free(ptr);\n}\n\nextern \"C\" void abort();\n\n#else\n\n#include <new>\n\n#endif", "parent": 0, "children": [37, 38, 39, 42, 45, 64, 82, 99, 117, 134, 142, 147], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 77, "column": 6}}, {"id": 37, "type": "#ifdef", "text": "#ifdef", "parent": 36, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 38, "type": "identifier", "text": "AVR", "parent": 36, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 10}}, {"id": 39, "type": "preproc_include", "text": "#include <stddef.h>\n", "parent": 36, "children": [40, 41], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 8}}, {"id": 41, "type": "system_lib_string", "text": "<stddef.h>", "parent": 39, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 19}}, {"id": 42, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": 36, "children": [43, 44], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 8}}, {"id": 44, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 42, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 19}}, {"id": 45, "type": "function_definition", "text": "inline void* operator new(size_t, void* p)\n{\n return p;\n}", "parent": 36, "children": [46, 48, 49], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 46, "type": "storage_class_specifier", "text": "inline", "parent": 45, "children": [47], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 47, "type": "inline", "text": "inline", "parent": 46, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 48, "type": "primitive_type", "text": "void", "parent": 45, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 11}}, {"id": 49, "type": "pointer_declarator", "text": "* operator new(size_t, void* p)", "parent": 45, "children": [50, 51, 53], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 42}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 12}}, {"id": 51, "type": "ERROR", "text": "operator", "parent": 49, "children": [52], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 21}}, {"id": 52, "type": "identifier", "text": "operator", "parent": 51, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 21}}, {"id": 53, "type": "function_declarator", "text": "new(size_t, void* p)", "parent": 49, "children": [54], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 42}}, {"id": 54, "type": "parameter_list", "text": "(size_t, void* p)", "parent": 53, "children": [55, 57], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 42}}, {"id": 55, "type": "parameter_declaration", "text": "size_t", "parent": 54, "children": [56], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 32}}, {"id": 56, "type": "primitive_type", "text": "size_t", "parent": 55, "children": [], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 32}}, {"id": 57, "type": "parameter_declaration", "text": "void* p", "parent": 54, "children": [58, 59], "start_point": {"row": 46, "column": 34}, "end_point": {"row": 46, "column": 41}}, {"id": 58, "type": "primitive_type", "text": "void", "parent": 57, "children": [], "start_point": {"row": 46, "column": 34}, "end_point": {"row": 46, "column": 38}}, {"id": 59, "type": "pointer_declarator", "text": "* p", "parent": 57, "children": [60, 61], "start_point": {"row": 46, "column": 38}, "end_point": {"row": 46, "column": 41}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 46, "column": 38}, "end_point": {"row": 46, "column": 39}}, {"id": 61, "type": "identifier", "text": "p", "parent": 59, "children": [], "start_point": {"row": 46, "column": 40}, "end_point": {"row": 46, "column": 41}}, {"id": 62, "type": "return_statement", "text": "return p;", "parent": 45, "children": [63], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 13}}, {"id": 63, "type": "identifier", "text": "p", "parent": 62, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 12}}, {"id": 64, "type": "function_definition", "text": "inline void* operator new(size_t size)\n{\n return malloc(size);\n}", "parent": 36, "children": [65, 67, 68], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 54, "column": 1}}, {"id": 65, "type": "storage_class_specifier", "text": "inline", "parent": 64, "children": [66], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 66, "type": "inline", "text": "inline", "parent": 65, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 67, "type": "primitive_type", "text": "void", "parent": 64, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 11}}, {"id": 68, "type": "pointer_declarator", "text": "* operator new(size_t size)", "parent": 64, "children": [69, 70, 72], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 38}}, {"id": 69, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 12}}, {"id": 70, "type": "ERROR", "text": "operator", "parent": 68, "children": [71], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 21}}, {"id": 71, "type": "identifier", "text": "operator", "parent": 70, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 21}}, {"id": 72, "type": "function_declarator", "text": "new(size_t size)", "parent": 68, "children": [73], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 38}}, {"id": 73, "type": "parameter_list", "text": "(size_t size)", "parent": 72, "children": [74], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 38}}, {"id": 74, "type": "parameter_declaration", "text": "size_t size", "parent": 73, "children": [75, 76], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 37}}, {"id": 75, "type": "primitive_type", "text": "size_t", "parent": 74, "children": [], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 32}}, {"id": 76, "type": "identifier", "text": "size", "parent": 74, "children": [], "start_point": {"row": 51, "column": 33}, "end_point": {"row": 51, "column": 37}}, {"id": 77, "type": "return_statement", "text": "return malloc(size);", "parent": 64, "children": [78], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 24}}, {"id": 78, "type": "call_expression", "text": "malloc(size)", "parent": 77, "children": [79, 80], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 23}}, {"id": 79, "type": "identifier", "text": "malloc", "parent": 78, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 17}}, {"id": 80, "type": "argument_list", "text": "(size)", "parent": 78, "children": [81], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 23}}, {"id": 81, "type": "identifier", "text": "size", "parent": 80, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 22}}, {"id": 82, "type": "function_definition", "text": "inline void operator delete(void* ptr)\n{\n free(ptr);\n}", "parent": 36, "children": [83, 85, 86, 88], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 83, "type": "storage_class_specifier", "text": "inline", "parent": 82, "children": [84], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 6}}, {"id": 84, "type": "inline", "text": "inline", "parent": 83, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 6}}, {"id": 85, "type": "primitive_type", "text": "void", "parent": 82, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 11}}, {"id": 86, "type": "ERROR", "text": "operator", "parent": 82, "children": [87], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 20}}, {"id": 87, "type": "identifier", "text": "operator", "parent": 86, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 20}}, {"id": 88, "type": "function_declarator", "text": "delete(void* ptr)", "parent": 82, "children": [89], "start_point": {"row": 56, "column": 21}, "end_point": {"row": 56, "column": 38}}, {"id": 89, "type": "parameter_list", "text": "(void* ptr)", "parent": 88, "children": [90], "start_point": {"row": 56, "column": 27}, "end_point": {"row": 56, "column": 38}}, {"id": 90, "type": "parameter_declaration", "text": "void* ptr", "parent": 89, "children": [91, 92], "start_point": {"row": 56, "column": 28}, "end_point": {"row": 56, "column": 37}}, {"id": 91, "type": "primitive_type", "text": "void", "parent": 90, "children": [], "start_point": {"row": 56, "column": 28}, "end_point": {"row": 56, "column": 32}}, {"id": 92, "type": "pointer_declarator", "text": "* ptr", "parent": 90, "children": [93, 94], "start_point": {"row": 56, "column": 32}, "end_point": {"row": 56, "column": 37}}, {"id": 93, "type": "*", "text": "*", "parent": 92, "children": [], "start_point": {"row": 56, "column": 32}, "end_point": {"row": 56, "column": 33}}, {"id": 94, "type": "identifier", "text": "ptr", "parent": 92, "children": [], "start_point": {"row": 56, "column": 34}, "end_point": {"row": 56, "column": 37}}, {"id": 95, "type": "call_expression", "text": "free(ptr)", "parent": 82, "children": [96, 97], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 13}}, {"id": 96, "type": "identifier", "text": "free", "parent": 95, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 8}}, {"id": 97, "type": "argument_list", "text": "(ptr)", "parent": 95, "children": [98], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 13}}, {"id": 98, "type": "identifier", "text": "ptr", "parent": 97, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 12}}, {"id": 99, "type": "function_definition", "text": "inline void* operator new[](size_t size)\n{\n return malloc(size);\n}", "parent": 36, "children": [100, 102, 103], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 100, "type": "storage_class_specifier", "text": "inline", "parent": 99, "children": [101], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 6}}, {"id": 101, "type": "inline", "text": "inline", "parent": 100, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 6}}, {"id": 102, "type": "primitive_type", "text": "void", "parent": 99, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 11}}, {"id": 103, "type": "pointer_declarator", "text": "* operator new[](size_t size)", "parent": 99, "children": [104, 105], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 40}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 12}}, {"id": 105, "type": "function_declarator", "text": "operator new[](size_t size)", "parent": 103, "children": [106, 108], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 40}}, {"id": 106, "type": "array_declarator", "text": "operator new[]", "parent": 105, "children": [107], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 27}}, {"id": 107, "type": "identifier", "text": "operator", "parent": 106, "children": [], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 21}}, {"id": 108, "type": "parameter_list", "text": "(size_t size)", "parent": 105, "children": [109], "start_point": {"row": 61, "column": 27}, "end_point": {"row": 61, "column": 40}}, {"id": 109, "type": "parameter_declaration", "text": "size_t size", "parent": 108, "children": [110, 111], "start_point": {"row": 61, "column": 28}, "end_point": {"row": 61, "column": 39}}, {"id": 110, "type": "primitive_type", "text": "size_t", "parent": 109, "children": [], "start_point": {"row": 61, "column": 28}, "end_point": {"row": 61, "column": 34}}, {"id": 111, "type": "identifier", "text": "size", "parent": 109, "children": [], "start_point": {"row": 61, "column": 35}, "end_point": {"row": 61, "column": 39}}, {"id": 112, "type": "return_statement", "text": "return malloc(size);", "parent": 99, "children": [113], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 24}}, {"id": 113, "type": "call_expression", "text": "malloc(size)", "parent": 112, "children": [114, 115], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 23}}, {"id": 114, "type": "identifier", "text": "malloc", "parent": 113, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 17}}, {"id": 115, "type": "argument_list", "text": "(size)", "parent": 113, "children": [116], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 23}}, {"id": 116, "type": "identifier", "text": "size", "parent": 115, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 22}}, {"id": 117, "type": "function_definition", "text": "inline void operator delete[](void* ptr)\n{\n free(ptr);\n}", "parent": 36, "children": [118, 120, 121], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 69, "column": 1}}, {"id": 118, "type": "storage_class_specifier", "text": "inline", "parent": 117, "children": [119], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 119, "type": "inline", "text": "inline", "parent": 118, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 120, "type": "primitive_type", "text": "void", "parent": 117, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 11}}, {"id": 121, "type": "function_declarator", "text": "operator delete[](void* ptr)", "parent": 117, "children": [122, 124], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 40}}, {"id": 122, "type": "array_declarator", "text": "operator delete[]", "parent": 121, "children": [123], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 29}}, {"id": 123, "type": "identifier", "text": "operator", "parent": 122, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 20}}, {"id": 124, "type": "parameter_list", "text": "(void* ptr)", "parent": 121, "children": [125], "start_point": {"row": 66, "column": 29}, "end_point": {"row": 66, "column": 40}}, {"id": 125, "type": "parameter_declaration", "text": "void* ptr", "parent": 124, "children": [126, 127], "start_point": {"row": 66, "column": 30}, "end_point": {"row": 66, "column": 39}}, {"id": 126, "type": "primitive_type", "text": "void", "parent": 125, "children": [], "start_point": {"row": 66, "column": 30}, "end_point": {"row": 66, "column": 34}}, {"id": 127, "type": "pointer_declarator", "text": "* ptr", "parent": 125, "children": [128, 129], "start_point": {"row": 66, "column": 34}, "end_point": {"row": 66, "column": 39}}, {"id": 128, "type": "*", "text": "*", "parent": 127, "children": [], "start_point": {"row": 66, "column": 34}, "end_point": {"row": 66, "column": 35}}, {"id": 129, "type": "identifier", "text": "ptr", "parent": 127, "children": [], "start_point": {"row": 66, "column": 36}, "end_point": {"row": 66, "column": 39}}, {"id": 130, "type": "call_expression", "text": "free(ptr)", "parent": 117, "children": [131, 132], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 13}}, {"id": 131, "type": "identifier", "text": "free", "parent": 130, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 8}}, {"id": 132, "type": "argument_list", "text": "(ptr)", "parent": 130, "children": [133], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 13}}, {"id": 133, "type": "identifier", "text": "ptr", "parent": 132, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 12}}, {"id": 134, "type": "linkage_specification", "text": "extern \"C\" void abort();", "parent": 36, "children": [135, 136, 137], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 24}}, {"id": 135, "type": "extern", "text": "extern", "parent": 134, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 6}}, {"id": 136, "type": "string_literal", "text": "\"C\"", "parent": 134, "children": [], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 10}}, {"id": 137, "type": "declaration", "text": "void abort();", "parent": 134, "children": [138, 139], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 24}}, {"id": 138, "type": "primitive_type", "text": "void", "parent": 137, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 15}}, {"id": 139, "type": "function_declarator", "text": "abort()", "parent": 137, "children": [140, 141], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 23}}, {"id": 140, "type": "identifier", "text": "abort", "parent": 139, "children": [], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 21}}, {"id": 141, "type": "parameter_list", "text": "()", "parent": 139, "children": [], "start_point": {"row": 71, "column": 21}, "end_point": {"row": 71, "column": 23}}, {"id": 142, "type": "preproc_else", "text": "#else\n\n#include <new>\n", "parent": 36, "children": [143, 144], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 76, "column": 0}}, {"id": 143, "type": "#else", "text": "#else", "parent": 142, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 5}}, {"id": 144, "type": "preproc_include", "text": "#include <new>\n", "parent": 142, "children": [145, 146], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 76, "column": 0}}, {"id": 145, "type": "#include", "text": "#include", "parent": 144, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 8}}, {"id": 146, "type": "system_lib_string", "text": "<new>", "parent": 144, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 14}}, {"id": 147, "type": "#endif", "text": "#endif", "parent": 36, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 6}}, {"id": 148, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 6}}]}, "node_categories": {"declarations": {"functions": [17, 20, 45, 53, 64, 72, 82, 88, 99, 105, 117, 121, 139], "variables": [23, 55, 57, 74, 90, 109, 125, 137], "classes": [46, 65, 83, 100, 118], "imports": [6, 7, 39, 40, 42, 43, 144, 145], "modules": [], "enums": []}, "statements": {"expressions": [28, 31, 78, 95, 113, 130], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9, 10, 11, 14, 16, 18, 19, 21, 22, 26, 29, 36, 37, 38, 52, 61, 63, 71, 76, 79, 81, 87, 94, 96, 98, 107, 111, 114, 116, 123, 129, 131, 133, 134, 140, 147, 148], "returns": [62, 77, 112], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 41, 44, 136, 146], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 17, "universal_type": "function", "name": "unknown", "text_snippet": "namespace openpal\n{\nnamespace sizes\n{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "namespace sizes\n{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(vo"}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "inline void* operator new(size_t, void* p)\n{\n return p;\n}"}, {"node_id": 53, "universal_type": "function", "name": "unknown", "text_snippet": "new(size_t, void* p)"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "inline void* operator new(size_t size)\n{\n return malloc(size);\n}"}, {"node_id": 72, "universal_type": "function", "name": "unknown", "text_snippet": "new(size_t size)"}, {"node_id": 82, "universal_type": "function", "name": "operator", "text_snippet": "inline void operator delete(void* ptr)\n{\n free(ptr);\n}"}, {"node_id": 88, "universal_type": "function", "name": "unknown", "text_snippet": "delete(void* ptr)"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "inline void* operator new[](size_t size)\n{\n return malloc(size);\n}"}, {"node_id": 105, "universal_type": "function", "name": "unknown", "text_snippet": "operator new[](size_t size)"}, {"node_id": 117, "universal_type": "function", "name": "operator", "text_snippet": "inline void operator delete[](void* ptr)\n{\n free(ptr);\n}"}, {"node_id": 121, "universal_type": "function", "name": "unknown", "text_snippet": "operator delete[](void* ptr)"}, {"node_id": 139, "universal_type": "function", "name": "unknown", "text_snippet": "abort()"}], "class_declarations": [{"node_id": 46, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 65, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 83, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 100, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 118, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 6, "text": "#include <cstdint>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 39, "text": "#include <stddef.h>\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 42, "text": "#include <stdlib.h>\n"}, {"node_id": 43, "text": "#include"}, {"node_id": 144, "text": "#include <new>\n"}, {"node_id": 145, "text": "#include"}]}, "original_source_code": "/*\n * Copyright 2013-2019 Automatak, LLC\n *\n * Licensed to Green Energy Corp (www.greenenergycorp.com) and Automatak\n * LLC (www.automatak.com) under one or more contributor license agreements.\n * See the NOTICE file distributed with this work for additional information\n * regarding copyright ownership. Green Energy Corp and Automatak LLC license\n * this file to you under the Apache License, Version 2.0 (the \"License\"); you\n * may not use this file except in compliance with the License. You may obtain\n * 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 OPENPAL_CONFIGURE_H\n#define OPENPAL_CONFIGURE_H\n\n#include <cstdint>\n\n// Default configurations for the static erasure size.\n// They are liberally set by default for x64\n// but can be reduced for embedded systems.\n\n#ifndef OPENPAL_ERASURE_MULTIPLE\n#define OPENPAL_ERASURE_MULTIPLE 12\n#endif\n\nnamespace openpal\n{\nnamespace sizes\n{\n\n static const uint16_t MAX_ERASURE_SIZE = OPENPAL_ERASURE_MULTIPLE * sizeof(void*);\n}\n} // namespace openpal\n\n#ifdef AVR\n\n#include <stddef.h>\n#include <stdlib.h>\n\ninline void* operator new(size_t, void* p)\n{\n return p;\n}\n\ninline void* operator new(size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete(void* ptr)\n{\n free(ptr);\n}\n\ninline void* operator new[](size_t size)\n{\n return malloc(size);\n}\n\ninline void operator delete[](void* ptr)\n{\n free(ptr);\n}\n\nextern \"C\" void abort();\n\n#else\n\n#include <new>\n\n#endif\n\n#endif\n"}
343
c
#ifndef PROGRESS_H #define PROGRESS_H #include "time.h" using namespace std; const int BAR_BUF_SIZE = 28; const char SYMBOL = '*'; class ProgressBar { char _bar_buf[BAR_BUF_SIZE]; string _process; long double _num_complete; long double _tot_num; int _num_updates; int _num_remaining; public: ProgressBar() {} ProgressBar(string process, double tot_num) { _tot_num = tot_num; _process = process; _num_complete = -1.0; _num_remaining = -1.0; _num_updates = 0; for(int i=0; i < BAR_BUF_SIZE; ++i) _bar_buf[i] = ' '; _bar_buf[0] = '['; _bar_buf[BAR_BUF_SIZE-2] = ']'; _bar_buf[BAR_BUF_SIZE-1] = '\0'; time_t rawtime; struct tm * timeinfo; char time_buf [80]; time ( &rawtime ); timeinfo = localtime ( &rawtime ); strftime (time_buf,80,"%H:%M:%S",timeinfo); fprintf(stderr, "[%s] %s\n", time_buf, _process.c_str()); } void update(const char* bundle_label_buf, double inc_amt) { _num_complete += inc_amt; _num_updates ++; if (cuff_verbose||cuff_quiet||_tot_num==0) return; char bundle_buf[28]; bundle_buf[27] = '\0'; strncpy(bundle_buf, bundle_label_buf, 27); int percent = (_num_complete * 100)/_tot_num; percent = min(percent, 99); int last_bar = percent/(100/(BAR_BUF_SIZE-3)); for (int i=1; i <= last_bar; ++i) _bar_buf[i] = SYMBOL; char line_buf[82]; snprintf(line_buf, 82, "\r> Processing Locus %-27s %s %3d%%", bundle_buf, _bar_buf, percent); fprintf(stderr,"%s",line_buf); } void remaining(int num_remaining) { if (cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining) return; _num_remaining = num_remaining; int percent = (_num_complete * 100)/_tot_num; percent = min(percent, 99); char msg_buff[45]; sprintf(msg_buff, "Waiting for %d threads to complete.", num_remaining); int last_bar = percent/(100/(BAR_BUF_SIZE-3)); for (int i=1; i <= last_bar; ++i) _bar_buf[i] = SYMBOL; char line_buf[82]; snprintf(line_buf, 81, "\r> %-44s %s %3d%%", msg_buff, _bar_buf, percent); fprintf(stderr,"%s",line_buf); } void complete() { for (int i=1; i < BAR_BUF_SIZE-2; ++i) _bar_buf[i] = SYMBOL; char complete_buf[45]; snprintf(complete_buf, 44, "Processed %d loci.", _num_updates); if (cuff_verbose||cuff_quiet) fprintf(stderr, "%-44s\n", complete_buf); else fprintf(stderr, "\r> %-44s %s %3d%%\n", complete_buf, _bar_buf, 100); } }; #endif
23.17
101
(translation_unit) "#ifndef PROGRESS_H\n#define PROGRESS_H\n\n#include "time.h"\n\nusing namespace std;\n\nconst int BAR_BUF_SIZE = 28;\nconst char SYMBOL = '*';\n\nclass ProgressBar\n{\n char _bar_buf[BAR_BUF_SIZE];\n string _process;\n long double _num_complete;\n long double _tot_num;\n int _num_updates;\n int _num_remaining;\n \npublic:\n ProgressBar() {}\n \n ProgressBar(string process, double tot_num) \n { \n _tot_num = tot_num;\n _process = process;\n _num_complete = -1.0;\n _num_remaining = -1.0;\n _num_updates = 0;\n \n for(int i=0; i < BAR_BUF_SIZE; ++i) _bar_buf[i] = ' ';\n _bar_buf[0] = '[';\n _bar_buf[BAR_BUF_SIZE-2] = ']';\n _bar_buf[BAR_BUF_SIZE-1] = '\0';\n \n \n time_t rawtime;\n struct tm * timeinfo;\n char time_buf [80];\n\n time ( &rawtime );\n timeinfo = localtime ( &rawtime );\n \n strftime (time_buf,80,"%H:%M:%S",timeinfo);\n\n fprintf(stderr, "[%s] %s\n", time_buf, _process.c_str());\n }\n \n void update(const char* bundle_label_buf, double inc_amt)\n {\n \n _num_complete += inc_amt;\n _num_updates ++;\n \n if (cuff_verbose||cuff_quiet||_tot_num==0) return;\n\n char bundle_buf[28];\n bundle_buf[27] = '\0';\n strncpy(bundle_buf, bundle_label_buf, 27);\n \n int percent = (_num_complete * 100)/_tot_num;\n\n percent = min(percent, 99);\n \n int last_bar = percent/(100/(BAR_BUF_SIZE-3));\n for (int i=1; i <= last_bar; ++i)\n _bar_buf[i] = SYMBOL;\n \n char line_buf[82];\n snprintf(line_buf, 82, "\r> Processing Locus %-27s %s %3d%%", bundle_buf, _bar_buf, percent);\n \n fprintf(stderr,"%s",line_buf);\n }\n \n void remaining(int num_remaining)\n {\n if (cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining) return;\n \n _num_remaining = num_remaining;\n \n int percent = (_num_complete * 100)/_tot_num;\n percent = min(percent, 99);\n \n char msg_buff[45];\n sprintf(msg_buff, "Waiting for %d threads to complete.", num_remaining);\n \n int last_bar = percent/(100/(BAR_BUF_SIZE-3));\n for (int i=1; i <= last_bar; ++i)\n _bar_buf[i] = SYMBOL;\n \n char line_buf[82];\n snprintf(line_buf, 81, "\r> %-44s %s %3d%%", msg_buff, _bar_buf, percent);\n \n fprintf(stderr,"%s",line_buf);\n }\n \n void complete()\n {\n for (int i=1; i < BAR_BUF_SIZE-2; ++i)\n _bar_buf[i] = SYMBOL;\n char complete_buf[45];\n snprintf(complete_buf, 44, "Processed %d loci.", _num_updates); \n if (cuff_verbose||cuff_quiet)\n fprintf(stderr, "%-44s\n", complete_buf);\n else\n fprintf(stderr, "\r> %-44s %s %3d%%\n", complete_buf, _bar_buf, 100);\n }\n};\n\n#endif\n" (preproc_ifdef) "#ifndef PROGRESS_H\n#define PROGRESS_H\n\n#include "time.h"\n\nusing namespace std;\n\nconst int BAR_BUF_SIZE = 28;\nconst char SYMBOL = '*';\n\nclass ProgressBar\n{\n char _bar_buf[BAR_BUF_SIZE];\n string _process;\n long double _num_complete;\n long double _tot_num;\n int _num_updates;\n int _num_remaining;\n \npublic:\n ProgressBar() {}\n \n ProgressBar(string process, double tot_num) \n { \n _tot_num = tot_num;\n _process = process;\n _num_complete = -1.0;\n _num_remaining = -1.0;\n _num_updates = 0;\n \n for(int i=0; i < BAR_BUF_SIZE; ++i) _bar_buf[i] = ' ';\n _bar_buf[0] = '[';\n _bar_buf[BAR_BUF_SIZE-2] = ']';\n _bar_buf[BAR_BUF_SIZE-1] = '\0';\n \n \n time_t rawtime;\n struct tm * timeinfo;\n char time_buf [80];\n\n time ( &rawtime );\n timeinfo = localtime ( &rawtime );\n \n strftime (time_buf,80,"%H:%M:%S",timeinfo);\n\n fprintf(stderr, "[%s] %s\n", time_buf, _process.c_str());\n }\n \n void update(const char* bundle_label_buf, double inc_amt)\n {\n \n _num_complete += inc_amt;\n _num_updates ++;\n \n if (cuff_verbose||cuff_quiet||_tot_num==0) return;\n\n char bundle_buf[28];\n bundle_buf[27] = '\0';\n strncpy(bundle_buf, bundle_label_buf, 27);\n \n int percent = (_num_complete * 100)/_tot_num;\n\n percent = min(percent, 99);\n \n int last_bar = percent/(100/(BAR_BUF_SIZE-3));\n for (int i=1; i <= last_bar; ++i)\n _bar_buf[i] = SYMBOL;\n \n char line_buf[82];\n snprintf(line_buf, 82, "\r> Processing Locus %-27s %s %3d%%", bundle_buf, _bar_buf, percent);\n \n fprintf(stderr,"%s",line_buf);\n }\n \n void remaining(int num_remaining)\n {\n if (cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining) return;\n \n _num_remaining = num_remaining;\n \n int percent = (_num_complete * 100)/_tot_num;\n percent = min(percent, 99);\n \n char msg_buff[45];\n sprintf(msg_buff, "Waiting for %d threads to complete.", num_remaining);\n \n int last_bar = percent/(100/(BAR_BUF_SIZE-3));\n for (int i=1; i <= last_bar; ++i)\n _bar_buf[i] = SYMBOL;\n \n char line_buf[82];\n snprintf(line_buf, 81, "\r> %-44s %s %3d%%", msg_buff, _bar_buf, percent);\n \n fprintf(stderr,"%s",line_buf);\n }\n \n void complete()\n {\n for (int i=1; i < BAR_BUF_SIZE-2; ++i)\n _bar_buf[i] = SYMBOL;\n char complete_buf[45];\n snprintf(complete_buf, 44, "Processed %d loci.", _num_updates); \n if (cuff_verbose||cuff_quiet)\n fprintf(stderr, "%-44s\n", complete_buf);\n else\n fprintf(stderr, "\r> %-44s %s %3d%%\n", complete_buf, _bar_buf, 100);\n }\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "PROGRESS_H" (preproc_def) "#define PROGRESS_H\n" (#define) "#define" (identifier) "PROGRESS_H" (preproc_include) "#include "time.h"\n" (#include) "#include" (string_literal) ""time.h"" (") """ (string_content) "time.h" (") """ (declaration) "using namespace std;" (type_identifier) "using" (identifier) "namespace" (ERROR) "std" (identifier) "std" (;) ";" (declaration) "const int BAR_BUF_SIZE = 28;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "BAR_BUF_SIZE = 28" (identifier) "BAR_BUF_SIZE" (=) "=" (number_literal) "28" (;) ";" (declaration) "const char SYMBOL = '*';" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "SYMBOL = '*'" (identifier) "SYMBOL" (=) "=" (char_literal) "'*'" (') "'" (character) "*" (') "'" (;) ";" (function_definition) "class ProgressBar\n{\n char _bar_buf[BAR_BUF_SIZE];\n string _process;\n long double _num_complete;\n long double _tot_num;\n int _num_updates;\n int _num_remaining;\n \npublic:\n ProgressBar() {}\n \n ProgressBar(string process, double tot_num) \n { \n _tot_num = tot_num;\n _process = process;\n _num_complete = -1.0;\n _num_remaining = -1.0;\n _num_updates = 0;\n \n for(int i=0; i < BAR_BUF_SIZE; ++i) _bar_buf[i] = ' ';\n _bar_buf[0] = '[';\n _bar_buf[BAR_BUF_SIZE-2] = ']';\n _bar_buf[BAR_BUF_SIZE-1] = '\0';\n \n \n time_t rawtime;\n struct tm * timeinfo;\n char time_buf [80];\n\n time ( &rawtime );\n timeinfo = localtime ( &rawtime );\n \n strftime (time_buf,80,"%H:%M:%S",timeinfo);\n\n fprintf(stderr, "[%s] %s\n", time_buf, _process.c_str());\n }" (type_identifier) "class" (identifier) "ProgressBar" (compound_statement) "{\n char _bar_buf[BAR_BUF_SIZE];\n string _process;\n long double _num_complete;\n long double _tot_num;\n int _num_updates;\n int _num_remaining;\n \npublic:\n ProgressBar() {}\n \n ProgressBar(string process, double tot_num) \n { \n _tot_num = tot_num;\n _process = process;\n _num_complete = -1.0;\n _num_remaining = -1.0;\n _num_updates = 0;\n \n for(int i=0; i < BAR_BUF_SIZE; ++i) _bar_buf[i] = ' ';\n _bar_buf[0] = '[';\n _bar_buf[BAR_BUF_SIZE-2] = ']';\n _bar_buf[BAR_BUF_SIZE-1] = '\0';\n \n \n time_t rawtime;\n struct tm * timeinfo;\n char time_buf [80];\n\n time ( &rawtime );\n timeinfo = localtime ( &rawtime );\n \n strftime (time_buf,80,"%H:%M:%S",timeinfo);\n\n fprintf(stderr, "[%s] %s\n", time_buf, _process.c_str());\n }" ({) "{" (declaration) "char _bar_buf[BAR_BUF_SIZE];" (primitive_type) "char" (array_declarator) "_bar_buf[BAR_BUF_SIZE]" (identifier) "_bar_buf" ([) "[" (identifier) "BAR_BUF_SIZE" (]) "]" (;) ";" (declaration) "string _process;" (type_identifier) "string" (identifier) "_process" (;) ";" (declaration) "long double _num_complete;" (sized_type_specifier) "long double" (long) "long" (primitive_type) "double" (identifier) "_num_complete" (;) ";" (declaration) "long double _tot_num;" (sized_type_specifier) "long double" (long) "long" (primitive_type) "double" (identifier) "_tot_num" (;) ";" (declaration) "int _num_updates;" (primitive_type) "int" (identifier) "_num_updates" (;) ";" (declaration) "int _num_remaining;" (primitive_type) "int" (identifier) "_num_remaining" (;) ";" (labeled_statement) "public:\n ProgressBar()" (statement_identifier) "public" (:) ":" (expression_statement) "ProgressBar()" (call_expression) "ProgressBar()" (identifier) "ProgressBar" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{}" ({) "{" (}) "}" (declaration) "ProgressBar(string process, double tot_num) \n { \n _tot_num = tot_num;" (macro_type_specifier) "ProgressBar(string" (identifier) "ProgressBar" (() "(" (type_descriptor) "string" (type_identifier) "string" ()) "" (identifier) "process" (,) "," (ERROR) "double tot_num) \n {" (identifier) "double" (identifier) "tot_num" ()) ")" ({) "{" (init_declarator) "_tot_num = tot_num" (identifier) "_tot_num" (=) "=" (identifier) "tot_num" (;) ";" (expression_statement) "_process = process;" (assignment_expression) "_process = process" (identifier) "_process" (=) "=" (identifier) "process" (;) ";" (expression_statement) "_num_complete = -1.0;" (assignment_expression) "_num_complete = -1.0" (identifier) "_num_complete" (=) "=" (number_literal) "-1.0" (;) ";" (expression_statement) "_num_remaining = -1.0;" (assignment_expression) "_num_remaining = -1.0" (identifier) "_num_remaining" (=) "=" (number_literal) "-1.0" (;) ";" (expression_statement) "_num_updates = 0;" (assignment_expression) "_num_updates = 0" (identifier) "_num_updates" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for(int i=0; i < BAR_BUF_SIZE; ++i) _bar_buf[i] = ' ';" (for) "for" (() "(" (declaration) "int i=0;" (primitive_type) "int" (init_declarator) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < BAR_BUF_SIZE" (identifier) "i" (<) "<" (identifier) "BAR_BUF_SIZE" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (expression_statement) "_bar_buf[i] = ' ';" (assignment_expression) "_bar_buf[i] = ' '" (subscript_expression) "_bar_buf[i]" (identifier) "_bar_buf" ([) "[" (identifier) "i" (]) "]" (=) "=" (char_literal) "' '" (') "'" (character) " " (') "'" (;) ";" (expression_statement) "_bar_buf[0] = '[';" (assignment_expression) "_bar_buf[0] = '['" (subscript_expression) "_bar_buf[0]" (identifier) "_bar_buf" ([) "[" (number_literal) "0" (]) "]" (=) "=" (char_literal) "'['" (') "'" (character) "[" (') "'" (;) ";" (expression_statement) "_bar_buf[BAR_BUF_SIZE-2] = ']';" (assignment_expression) "_bar_buf[BAR_BUF_SIZE-2] = ']'" (subscript_expression) "_bar_buf[BAR_BUF_SIZE-2]" (identifier) "_bar_buf" ([) "[" (binary_expression) "BAR_BUF_SIZE-2" (identifier) "BAR_BUF_SIZE" (-) "-" (number_literal) "2" (]) "]" (=) "=" (char_literal) "']'" (') "'" (character) "]" (') "'" (;) ";" (expression_statement) "_bar_buf[BAR_BUF_SIZE-1] = '\0';" (assignment_expression) "_bar_buf[BAR_BUF_SIZE-1] = '\0'" (subscript_expression) "_bar_buf[BAR_BUF_SIZE-1]" (identifier) "_bar_buf" ([) "[" (binary_expression) "BAR_BUF_SIZE-1" (identifier) "BAR_BUF_SIZE" (-) "-" (number_literal) "1" (]) "]" (=) "=" (char_literal) "'\0'" (') "'" (escape_sequence) "\0" (') "'" (;) ";" (declaration) "time_t rawtime;" (type_identifier) "time_t" (identifier) "rawtime" (;) ";" (declaration) "struct tm * timeinfo;" (struct_specifier) "struct tm" (struct) "struct" (type_identifier) "tm" (pointer_declarator) "* timeinfo" (*) "*" (identifier) "timeinfo" (;) ";" (declaration) "char time_buf [80];" (primitive_type) "char" (array_declarator) "time_buf [80]" (identifier) "time_buf" ([) "[" (number_literal) "80" (]) "]" (;) ";" (expression_statement) "time ( &rawtime );" (call_expression) "time ( &rawtime )" (identifier) "time" (argument_list) "( &rawtime )" (() "(" (pointer_expression) "&rawtime" (&) "&" (identifier) "rawtime" ()) ")" (;) ";" (expression_statement) "timeinfo = localtime ( &rawtime );" (assignment_expression) "timeinfo = localtime ( &rawtime )" (identifier) "timeinfo" (=) "=" (call_expression) "localtime ( &rawtime )" (identifier) "localtime" (argument_list) "( &rawtime )" (() "(" (pointer_expression) "&rawtime" (&) "&" (identifier) "rawtime" ()) ")" (;) ";" (expression_statement) "strftime (time_buf,80,"%H:%M:%S",timeinfo);" (call_expression) "strftime (time_buf,80,"%H:%M:%S",timeinfo)" (identifier) "strftime" (argument_list) "(time_buf,80,"%H:%M:%S",timeinfo)" (() "(" (identifier) "time_buf" (,) "," (number_literal) "80" (,) "," (string_literal) ""%H:%M:%S"" (") """ (string_content) "%H:%M:%S" (") """ (,) "," (identifier) "timeinfo" ()) ")" (;) ";" (expression_statement) "fprintf(stderr, "[%s] %s\n", time_buf, _process.c_str());" (call_expression) "fprintf(stderr, "[%s] %s\n", time_buf, _process.c_str())" (identifier) "fprintf" (argument_list) "(stderr, "[%s] %s\n", time_buf, _process.c_str())" (() "(" (identifier) "stderr" (,) "," (string_literal) ""[%s] %s\n"" (") """ (string_content) "[%s] %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "time_buf" (,) "," (call_expression) "_process.c_str()" (field_expression) "_process.c_str" (identifier) "_process" (.) "." (field_identifier) "c_str" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "void update(const char* bundle_label_buf, double inc_amt)\n {\n \n _num_complete += inc_amt;\n _num_updates ++;\n \n if (cuff_verbose||cuff_quiet||_tot_num==0) return;\n\n char bundle_buf[28];\n bundle_buf[27] = '\0';\n strncpy(bundle_buf, bundle_label_buf, 27);\n \n int percent = (_num_complete * 100)/_tot_num;\n\n percent = min(percent, 99);\n \n int last_bar = percent/(100/(BAR_BUF_SIZE-3));\n for (int i=1; i <= last_bar; ++i)\n _bar_buf[i] = SYMBOL;\n \n char line_buf[82];\n snprintf(line_buf, 82, "\r> Processing Locus %-27s %s %3d%%", bundle_buf, _bar_buf, percent);\n \n fprintf(stderr,"%s",line_buf);\n }" (primitive_type) "void" (function_declarator) "update(const char* bundle_label_buf, double inc_amt)" (identifier) "update" (parameter_list) "(const char* bundle_label_buf, double inc_amt)" (() "(" (parameter_declaration) "const char* bundle_label_buf" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* bundle_label_buf" (*) "*" (identifier) "bundle_label_buf" (,) "," (parameter_declaration) "double inc_amt" (primitive_type) "double" (identifier) "inc_amt" ()) ")" (compound_statement) "{\n \n _num_complete += inc_amt;\n _num_updates ++;\n \n if (cuff_verbose||cuff_quiet||_tot_num==0) return;\n\n char bundle_buf[28];\n bundle_buf[27] = '\0';\n strncpy(bundle_buf, bundle_label_buf, 27);\n \n int percent = (_num_complete * 100)/_tot_num;\n\n percent = min(percent, 99);\n \n int last_bar = percent/(100/(BAR_BUF_SIZE-3));\n for (int i=1; i <= last_bar; ++i)\n _bar_buf[i] = SYMBOL;\n \n char line_buf[82];\n snprintf(line_buf, 82, "\r> Processing Locus %-27s %s %3d%%", bundle_buf, _bar_buf, percent);\n \n fprintf(stderr,"%s",line_buf);\n }" ({) "{" (expression_statement) "_num_complete += inc_amt;" (assignment_expression) "_num_complete += inc_amt" (identifier) "_num_complete" (+=) "+=" (identifier) "inc_amt" (;) ";" (expression_statement) "_num_updates ++;" (update_expression) "_num_updates ++" (identifier) "_num_updates" (++) "++" (;) ";" (if_statement) "if (cuff_verbose||cuff_quiet||_tot_num==0) return;" (if) "if" (parenthesized_expression) "(cuff_verbose||cuff_quiet||_tot_num==0)" (() "(" (binary_expression) "cuff_verbose||cuff_quiet||_tot_num==0" (binary_expression) "cuff_verbose||cuff_quiet" (identifier) "cuff_verbose" (||) "||" (identifier) "cuff_quiet" (||) "||" (binary_expression) "_tot_num==0" (identifier) "_tot_num" (==) "==" (number_literal) "0" ()) ")" (return_statement) "return;" (return) "return" (;) ";" (declaration) "char bundle_buf[28];" (primitive_type) "char" (array_declarator) "bundle_buf[28]" (identifier) "bundle_buf" ([) "[" (number_literal) "28" (]) "]" (;) ";" (expression_statement) "bundle_buf[27] = '\0';" (assignment_expression) "bundle_buf[27] = '\0'" (subscript_expression) "bundle_buf[27]" (identifier) "bundle_buf" ([) "[" (number_literal) "27" (]) "]" (=) "=" (char_literal) "'\0'" (') "'" (escape_sequence) "\0" (') "'" (;) ";" (expression_statement) "strncpy(bundle_buf, bundle_label_buf, 27);" (call_expression) "strncpy(bundle_buf, bundle_label_buf, 27)" (identifier) "strncpy" (argument_list) "(bundle_buf, bundle_label_buf, 27)" (() "(" (identifier) "bundle_buf" (,) "," (identifier) "bundle_label_buf" (,) "," (number_literal) "27" ()) ")" (;) ";" (declaration) "int percent = (_num_complete * 100)/_tot_num;" (primitive_type) "int" (init_declarator) "percent = (_num_complete * 100)/_tot_num" (identifier) "percent" (=) "=" (binary_expression) "(_num_complete * 100)/_tot_num" (parenthesized_expression) "(_num_complete * 100)" (() "(" (binary_expression) "_num_complete * 100" (identifier) "_num_complete" (*) "*" (number_literal) "100" ()) ")" (/) "/" (identifier) "_tot_num" (;) ";" (expression_statement) "percent = min(percent, 99);" (assignment_expression) "percent = min(percent, 99)" (identifier) "percent" (=) "=" (call_expression) "min(percent, 99)" (identifier) "min" (argument_list) "(percent, 99)" (() "(" (identifier) "percent" (,) "," (number_literal) "99" ()) ")" (;) ";" (declaration) "int last_bar = percent/(100/(BAR_BUF_SIZE-3));" (primitive_type) "int" (init_declarator) "last_bar = percent/(100/(BAR_BUF_SIZE-3))" (identifier) "last_bar" (=) "=" (binary_expression) "percent/(100/(BAR_BUF_SIZE-3))" (identifier) "percent" (/) "/" (parenthesized_expression) "(100/(BAR_BUF_SIZE-3))" (() "(" (binary_expression) "100/(BAR_BUF_SIZE-3)" (number_literal) "100" (/) "/" (parenthesized_expression) "(BAR_BUF_SIZE-3)" (() "(" (binary_expression) "BAR_BUF_SIZE-3" (identifier) "BAR_BUF_SIZE" (-) "-" (number_literal) "3" ()) ")" ()) ")" (;) ";" (for_statement) "for (int i=1; i <= last_bar; ++i)\n _bar_buf[i] = SYMBOL;" (for) "for" (() "(" (declaration) "int i=1;" (primitive_type) "int" (init_declarator) "i=1" (identifier) "i" (=) "=" (number_literal) "1" (;) ";" (binary_expression) "i <= last_bar" (identifier) "i" (<=) "<=" (identifier) "last_bar" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (expression_statement) "_bar_buf[i] = SYMBOL;" (assignment_expression) "_bar_buf[i] = SYMBOL" (subscript_expression) "_bar_buf[i]" (identifier) "_bar_buf" ([) "[" (identifier) "i" (]) "]" (=) "=" (identifier) "SYMBOL" (;) ";" (declaration) "char line_buf[82];" (primitive_type) "char" (array_declarator) "line_buf[82]" (identifier) "line_buf" ([) "[" (number_literal) "82" (]) "]" (;) ";" (expression_statement) "snprintf(line_buf, 82, "\r> Processing Locus %-27s %s %3d%%", bundle_buf, _bar_buf, percent);" (call_expression) "snprintf(line_buf, 82, "\r> Processing Locus %-27s %s %3d%%", bundle_buf, _bar_buf, percent)" (identifier) "snprintf" (argument_list) "(line_buf, 82, "\r> Processing Locus %-27s %s %3d%%", bundle_buf, _bar_buf, percent)" (() "(" (identifier) "line_buf" (,) "," (number_literal) "82" (,) "," (string_literal) ""\r> Processing Locus %-27s %s %3d%%"" (") """ (escape_sequence) "\r" (string_content) "> Processing Locus %-27s %s %3d%%" (") """ (,) "," (identifier) "bundle_buf" (,) "," (identifier) "_bar_buf" (,) "," (identifier) "percent" ()) ")" (;) ";" (expression_statement) "fprintf(stderr,"%s",line_buf);" (call_expression) "fprintf(stderr,"%s",line_buf)" (identifier) "fprintf" (argument_list) "(stderr,"%s",line_buf)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""%s"" (") """ (string_content) "%s" (") """ (,) "," (identifier) "line_buf" ()) ")" (;) ";" (}) "}" (function_definition) "void remaining(int num_remaining)\n {\n if (cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining) return;\n \n _num_remaining = num_remaining;\n \n int percent = (_num_complete * 100)/_tot_num;\n percent = min(percent, 99);\n \n char msg_buff[45];\n sprintf(msg_buff, "Waiting for %d threads to complete.", num_remaining);\n \n int last_bar = percent/(100/(BAR_BUF_SIZE-3));\n for (int i=1; i <= last_bar; ++i)\n _bar_buf[i] = SYMBOL;\n \n char line_buf[82];\n snprintf(line_buf, 81, "\r> %-44s %s %3d%%", msg_buff, _bar_buf, percent);\n \n fprintf(stderr,"%s",line_buf);\n }" (primitive_type) "void" (function_declarator) "remaining(int num_remaining)" (identifier) "remaining" (parameter_list) "(int num_remaining)" (() "(" (parameter_declaration) "int num_remaining" (primitive_type) "int" (identifier) "num_remaining" ()) ")" (compound_statement) "{\n if (cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining) return;\n \n _num_remaining = num_remaining;\n \n int percent = (_num_complete * 100)/_tot_num;\n percent = min(percent, 99);\n \n char msg_buff[45];\n sprintf(msg_buff, "Waiting for %d threads to complete.", num_remaining);\n \n int last_bar = percent/(100/(BAR_BUF_SIZE-3));\n for (int i=1; i <= last_bar; ++i)\n _bar_buf[i] = SYMBOL;\n \n char line_buf[82];\n snprintf(line_buf, 81, "\r> %-44s %s %3d%%", msg_buff, _bar_buf, percent);\n \n fprintf(stderr,"%s",line_buf);\n }" ({) "{" (if_statement) "if (cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining) return;" (if) "if" (parenthesized_expression) "(cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining)" (() "(" (binary_expression) "cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining" (binary_expression) "cuff_verbose||cuff_quiet||_tot_num==0" (binary_expression) "cuff_verbose||cuff_quiet" (identifier) "cuff_verbose" (||) "||" (identifier) "cuff_quiet" (||) "||" (binary_expression) "_tot_num==0" (identifier) "_tot_num" (==) "==" (number_literal) "0" (||) "||" (binary_expression) "num_remaining==_num_remaining" (identifier) "num_remaining" (==) "==" (identifier) "_num_remaining" ()) ")" (return_statement) "return;" (return) "return" (;) ";" (expression_statement) "_num_remaining = num_remaining;" (assignment_expression) "_num_remaining = num_remaining" (identifier) "_num_remaining" (=) "=" (identifier) "num_remaining" (;) ";" (declaration) "int percent = (_num_complete * 100)/_tot_num;" (primitive_type) "int" (init_declarator) "percent = (_num_complete * 100)/_tot_num" (identifier) "percent" (=) "=" (binary_expression) "(_num_complete * 100)/_tot_num" (parenthesized_expression) "(_num_complete * 100)" (() "(" (binary_expression) "_num_complete * 100" (identifier) "_num_complete" (*) "*" (number_literal) "100" ()) ")" (/) "/" (identifier) "_tot_num" (;) ";" (expression_statement) "percent = min(percent, 99);" (assignment_expression) "percent = min(percent, 99)" (identifier) "percent" (=) "=" (call_expression) "min(percent, 99)" (identifier) "min" (argument_list) "(percent, 99)" (() "(" (identifier) "percent" (,) "," (number_literal) "99" ()) ")" (;) ";" (declaration) "char msg_buff[45];" (primitive_type) "char" (array_declarator) "msg_buff[45]" (identifier) "msg_buff" ([) "[" (number_literal) "45" (]) "]" (;) ";" (expression_statement) "sprintf(msg_buff, "Waiting for %d threads to complete.", num_remaining);" (call_expression) "sprintf(msg_buff, "Waiting for %d threads to complete.", num_remaining)" (identifier) "sprintf" (argument_list) "(msg_buff, "Waiting for %d threads to complete.", num_remaining)" (() "(" (identifier) "msg_buff" (,) "," (string_literal) ""Waiting for %d threads to complete."" (") """ (string_content) "Waiting for %d threads to complete." (") """ (,) "," (identifier) "num_remaining" ()) ")" (;) ";" (declaration) "int last_bar = percent/(100/(BAR_BUF_SIZE-3));" (primitive_type) "int" (init_declarator) "last_bar = percent/(100/(BAR_BUF_SIZE-3))" (identifier) "last_bar" (=) "=" (binary_expression) "percent/(100/(BAR_BUF_SIZE-3))" (identifier) "percent" (/) "/" (parenthesized_expression) "(100/(BAR_BUF_SIZE-3))" (() "(" (binary_expression) "100/(BAR_BUF_SIZE-3)" (number_literal) "100" (/) "/" (parenthesized_expression) "(BAR_BUF_SIZE-3)" (() "(" (binary_expression) "BAR_BUF_SIZE-3" (identifier) "BAR_BUF_SIZE" (-) "-" (number_literal) "3" ()) ")" ()) ")" (;) ";" (for_statement) "for (int i=1; i <= last_bar; ++i)\n _bar_buf[i] = SYMBOL;" (for) "for" (() "(" (declaration) "int i=1;" (primitive_type) "int" (init_declarator) "i=1" (identifier) "i" (=) "=" (number_literal) "1" (;) ";" (binary_expression) "i <= last_bar" (identifier) "i" (<=) "<=" (identifier) "last_bar" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (expression_statement) "_bar_buf[i] = SYMBOL;" (assignment_expression) "_bar_buf[i] = SYMBOL" (subscript_expression) "_bar_buf[i]" (identifier) "_bar_buf" ([) "[" (identifier) "i" (]) "]" (=) "=" (identifier) "SYMBOL" (;) ";" (declaration) "char line_buf[82];" (primitive_type) "char" (array_declarator) "line_buf[82]" (identifier) "line_buf" ([) "[" (number_literal) "82" (]) "]" (;) ";" (expression_statement) "snprintf(line_buf, 81, "\r> %-44s %s %3d%%", msg_buff, _bar_buf, percent);" (call_expression) "snprintf(line_buf, 81, "\r> %-44s %s %3d%%", msg_buff, _bar_buf, percent)" (identifier) "snprintf" (argument_list) "(line_buf, 81, "\r> %-44s %s %3d%%", msg_buff, _bar_buf, percent)" (() "(" (identifier) "line_buf" (,) "," (number_literal) "81" (,) "," (string_literal) ""\r> %-44s %s %3d%%"" (") """ (escape_sequence) "\r" (string_content) "> %-44s %s %3d%%" (") """ (,) "," (identifier) "msg_buff" (,) "," (identifier) "_bar_buf" (,) "," (identifier) "percent" ()) ")" (;) ";" (expression_statement) "fprintf(stderr,"%s",line_buf);" (call_expression) "fprintf(stderr,"%s",line_buf)" (identifier) "fprintf" (argument_list) "(stderr,"%s",line_buf)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""%s"" (") """ (string_content) "%s" (") """ (,) "," (identifier) "line_buf" ()) ")" (;) ";" (}) "}" (function_definition) "void complete()\n {\n for (int i=1; i < BAR_BUF_SIZE-2; ++i)\n _bar_buf[i] = SYMBOL;\n char complete_buf[45];\n snprintf(complete_buf, 44, "Processed %d loci.", _num_updates); \n if (cuff_verbose||cuff_quiet)\n fprintf(stderr, "%-44s\n", complete_buf);\n else\n fprintf(stderr, "\r> %-44s %s %3d%%\n", complete_buf, _bar_buf, 100);\n }" (primitive_type) "void" (function_declarator) "complete()" (identifier) "complete" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n for (int i=1; i < BAR_BUF_SIZE-2; ++i)\n _bar_buf[i] = SYMBOL;\n char complete_buf[45];\n snprintf(complete_buf, 44, "Processed %d loci.", _num_updates); \n if (cuff_verbose||cuff_quiet)\n fprintf(stderr, "%-44s\n", complete_buf);\n else\n fprintf(stderr, "\r> %-44s %s %3d%%\n", complete_buf, _bar_buf, 100);\n }" ({) "{" (for_statement) "for (int i=1; i < BAR_BUF_SIZE-2; ++i)\n _bar_buf[i] = SYMBOL;" (for) "for" (() "(" (declaration) "int i=1;" (primitive_type) "int" (init_declarator) "i=1" (identifier) "i" (=) "=" (number_literal) "1" (;) ";" (binary_expression) "i < BAR_BUF_SIZE-2" (identifier) "i" (<) "<" (binary_expression) "BAR_BUF_SIZE-2" (identifier) "BAR_BUF_SIZE" (-) "-" (number_literal) "2" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (expression_statement) "_bar_buf[i] = SYMBOL;" (assignment_expression) "_bar_buf[i] = SYMBOL" (subscript_expression) "_bar_buf[i]" (identifier) "_bar_buf" ([) "[" (identifier) "i" (]) "]" (=) "=" (identifier) "SYMBOL" (;) ";" (declaration) "char complete_buf[45];" (primitive_type) "char" (array_declarator) "complete_buf[45]" (identifier) "complete_buf" ([) "[" (number_literal) "45" (]) "]" (;) ";" (expression_statement) "snprintf(complete_buf, 44, "Processed %d loci.", _num_updates);" (call_expression) "snprintf(complete_buf, 44, "Processed %d loci.", _num_updates)" (identifier) "snprintf" (argument_list) "(complete_buf, 44, "Processed %d loci.", _num_updates)" (() "(" (identifier) "complete_buf" (,) "," (number_literal) "44" (,) "," (string_literal) ""Processed %d loci."" (") """ (string_content) "Processed %d loci." (") """ (,) "," (identifier) "_num_updates" ()) ")" (;) ";" (if_statement) "if (cuff_verbose||cuff_quiet)\n fprintf(stderr, "%-44s\n", complete_buf);\n else\n fprintf(stderr, "\r> %-44s %s %3d%%\n", complete_buf, _bar_buf, 100);" (if) "if" (parenthesized_expression) "(cuff_verbose||cuff_quiet)" (() "(" (binary_expression) "cuff_verbose||cuff_quiet" (identifier) "cuff_verbose" (||) "||" (identifier) "cuff_quiet" ()) ")" (expression_statement) "fprintf(stderr, "%-44s\n", complete_buf);" (call_expression) "fprintf(stderr, "%-44s\n", complete_buf)" (identifier) "fprintf" (argument_list) "(stderr, "%-44s\n", complete_buf)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""%-44s\n"" (") """ (string_content) "%-44s" (escape_sequence) "\n" (") """ (,) "," (identifier) "complete_buf" ()) ")" (;) ";" (else_clause) "else\n fprintf(stderr, "\r> %-44s %s %3d%%\n", complete_buf, _bar_buf, 100);" (else) "else" (expression_statement) "fprintf(stderr, "\r> %-44s %s %3d%%\n", complete_buf, _bar_buf, 100);" (call_expression) "fprintf(stderr, "\r> %-44s %s %3d%%\n", complete_buf, _bar_buf, 100)" (identifier) "fprintf" (argument_list) "(stderr, "\r> %-44s %s %3d%%\n", complete_buf, _bar_buf, 100)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""\r> %-44s %s %3d%%\n"" (") """ (escape_sequence) "\r" (string_content) "> %-44s %s %3d%%" (escape_sequence) "\n" (") """ (,) "," (identifier) "complete_buf" (,) "," (identifier) "_bar_buf" (,) "," (number_literal) "100" ()) ")" (;) ";" (}) "}" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif"
815
3
{"language": "c", "success": true, "metadata": {"lines": 101, "avg_line_length": 23.17, "nodes": 507, "errors": 0, "source_hash": "9f87884567880cb519878f6d8ed7ac70a5d13587f72efd47a546bbd649fdc752", "categorized_nodes": 348}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef PROGRESS_H\n#define PROGRESS_H\n\n#include \"time.h\"\n\nusing namespace std;\n\nconst int BAR_BUF_SIZE = 28;\nconst char SYMBOL = '*';\n\nclass ProgressBar\n{\n\tchar _bar_buf[BAR_BUF_SIZE];\n\tstring _process;\n\tlong double _num_complete;\n\tlong double _tot_num;\n\tint _num_updates;\n\tint _num_remaining;\n\t\npublic:\n\tProgressBar() {}\n\t\n\tProgressBar(string process, double tot_num) \n\t{ \n\t\t_tot_num = tot_num;\n\t\t_process = process;\n\t\t_num_complete = -1.0;\n\t\t_num_remaining = -1.0;\n\t\t_num_updates = 0;\n\t\t\n\t\tfor(int i=0; i < BAR_BUF_SIZE; ++i) _bar_buf[i] = ' ';\n\t\t_bar_buf[0] = '[';\n\t\t_bar_buf[BAR_BUF_SIZE-2] = ']';\n\t\t_bar_buf[BAR_BUF_SIZE-1] = '\\0';\n\t\t\n\t\t\n\t\ttime_t rawtime;\n \t\tstruct tm * timeinfo;\n \t\tchar time_buf [80];\n\n \t\ttime ( &rawtime );\n \t\ttimeinfo = localtime ( &rawtime );\n\t\t\n\t\tstrftime (time_buf,80,\"%H:%M:%S\",timeinfo);\n\n\t\tfprintf(stderr, \"[%s] %s\\n\", time_buf, _process.c_str());\n\t}\n\t\n\tvoid update(const char* bundle_label_buf, double inc_amt)\n\t{\n\t\t\n\t\t_num_complete += inc_amt;\n\t\t_num_updates ++;\n\t\t\n\t\tif (cuff_verbose||cuff_quiet||_tot_num==0) return;\n\n\t\tchar bundle_buf[28];\n\t\tbundle_buf[27] = '\\0';\n\t\tstrncpy(bundle_buf, bundle_label_buf, 27);\n\t\t\n\t\tint percent = (_num_complete * 100)/_tot_num;\n\n\t\tpercent = min(percent, 99);\n\t\t\n\t\tint last_bar = percent/(100/(BAR_BUF_SIZE-3));\n\t\tfor (int i=1; i <= last_bar; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;\n\t\t\n\t\tchar line_buf[82];\n\t\tsnprintf(line_buf, 82, \"\\r> Processing Locus %-27s %s %3d%%\", bundle_buf, _bar_buf, percent);\n\t\t\n\t\tfprintf(stderr,\"%s\",line_buf);\n\t}\n\t\n\tvoid remaining(int num_remaining)\n\t{\n\t\tif (cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining) return;\n\t\t\n\t\t_num_remaining = num_remaining;\n\t\t\n\t\tint percent = (_num_complete * 100)/_tot_num;\n\t\tpercent = min(percent, 99);\n\t\t\n\t\tchar msg_buff[45];\n\t\tsprintf(msg_buff, \"Waiting for %d threads to complete.\", num_remaining);\n\t\t\n\t\tint last_bar = percent/(100/(BAR_BUF_SIZE-3));\n\t\tfor (int i=1; i <= last_bar; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;\n\t\t\n\t\tchar line_buf[82];\n\t\tsnprintf(line_buf, 81, \"\\r> %-44s %s %3d%%\", msg_buff, _bar_buf, percent);\n\t\t\n\t\tfprintf(stderr,\"%s\",line_buf);\n\t}\n\t\n\tvoid complete()\n\t{\n\t\tfor (int i=1; i < BAR_BUF_SIZE-2; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;\n\t\tchar complete_buf[45];\n\t\tsnprintf(complete_buf, 44, \"Processed %d loci.\", _num_updates); \n\t\tif (cuff_verbose||cuff_quiet)\n\t\t\tfprintf(stderr, \"%-44s\\n\", complete_buf);\n\t\telse\n\t\t\tfprintf(stderr, \"\\r> %-44s %s %3d%%\\n\", complete_buf, _bar_buf, 100);\n\t}\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 14, 20, 29, 189, 321, 442, 506], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 109, "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": "PROGRESS_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_def", "text": "#define PROGRESS_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": "PROGRESS_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include \"time.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": "\"time.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 17}}, {"id": 9, "type": "declaration", "text": "using namespace std;", "parent": 0, "children": [10, 11, 12], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 20}}, {"id": 10, "type": "type_identifier", "text": "using", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 5}}, {"id": 11, "type": "identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 15}}, {"id": 12, "type": "ERROR", "text": "std", "parent": 9, "children": [13], "start_point": {"row": 5, "column": 16}, "end_point": {"row": 5, "column": 19}}, {"id": 13, "type": "identifier", "text": "std", "parent": 12, "children": [], "start_point": {"row": 5, "column": 16}, "end_point": {"row": 5, "column": 19}}, {"id": 14, "type": "declaration", "text": "const int BAR_BUF_SIZE = 28;", "parent": 0, "children": [15, 16], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 28}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 9}}, {"id": 16, "type": "init_declarator", "text": "BAR_BUF_SIZE = 28", "parent": 14, "children": [17, 18, 19], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 27}}, {"id": 17, "type": "identifier", "text": "BAR_BUF_SIZE", "parent": 16, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 22}}, {"id": 18, "type": "=", "text": "=", "parent": 16, "children": [], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 24}}, {"id": 19, "type": "number_literal", "text": "28", "parent": 16, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 27}}, {"id": 20, "type": "declaration", "text": "const char SYMBOL = '*';", "parent": 0, "children": [21, 22], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 24}}, {"id": 21, "type": "primitive_type", "text": "char", "parent": 20, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 10}}, {"id": 22, "type": "init_declarator", "text": "SYMBOL = '*'", "parent": 20, "children": [23, 24, 25], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 23}}, {"id": 23, "type": "identifier", "text": "SYMBOL", "parent": 22, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 17}}, {"id": 24, "type": "=", "text": "=", "parent": 22, "children": [], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 19}}, {"id": 25, "type": "char_literal", "text": "'*'", "parent": 22, "children": [26, 27, 28], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 23}}, {"id": 26, "type": "'", "text": "'", "parent": 25, "children": [], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 21}}, {"id": 27, "type": "character", "text": "*", "parent": 25, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 22}}, {"id": 28, "type": "'", "text": "'", "parent": 25, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 23}}, {"id": 29, "type": "function_definition", "text": "class ProgressBar\n{\n\tchar _bar_buf[BAR_BUF_SIZE];\n\tstring _process;\n\tlong double _num_complete;\n\tlong double _tot_num;\n\tint _num_updates;\n\tint _num_remaining;\n\t\npublic:\n\tProgressBar() {}\n\t\n\tProgressBar(string process, double tot_num) \n\t{ \n\t\t_tot_num = tot_num;\n\t\t_process = process;\n\t\t_num_complete = -1.0;\n\t\t_num_remaining = -1.0;\n\t\t_num_updates = 0;\n\t\t\n\t\tfor(int i=0; i < BAR_BUF_SIZE; ++i) _bar_buf[i] = ' ';\n\t\t_bar_buf[0] = '[';\n\t\t_bar_buf[BAR_BUF_SIZE-2] = ']';\n\t\t_bar_buf[BAR_BUF_SIZE-1] = '\\0';\n\t\t\n\t\t\n\t\ttime_t rawtime;\n \t\tstruct tm * timeinfo;\n \t\tchar time_buf [80];\n\n \t\ttime ( &rawtime );\n \t\ttimeinfo = localtime ( &rawtime );\n\t\t\n\t\tstrftime (time_buf,80,\"%H:%M:%S\",timeinfo);\n\n\t\tfprintf(stderr, \"[%s] %s\\n\", time_buf, _process.c_str());\n\t}", "parent": 0, "children": [30], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 46, "column": 2}}, {"id": 30, "type": "identifier", "text": "ProgressBar", "parent": 29, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 17}}, {"id": 31, "type": "declaration", "text": "char _bar_buf[BAR_BUF_SIZE];", "parent": 29, "children": [32, 33], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 29}}, {"id": 32, "type": "primitive_type", "text": "char", "parent": 31, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 5}}, {"id": 33, "type": "array_declarator", "text": "_bar_buf[BAR_BUF_SIZE]", "parent": 31, "children": [34, 35], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 28}}, {"id": 34, "type": "identifier", "text": "_bar_buf", "parent": 33, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 14}}, {"id": 35, "type": "identifier", "text": "BAR_BUF_SIZE", "parent": 33, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 27}}, {"id": 36, "type": "declaration", "text": "string _process;", "parent": 29, "children": [37, 38], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 17}}, {"id": 37, "type": "type_identifier", "text": "string", "parent": 36, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 7}}, {"id": 38, "type": "identifier", "text": "_process", "parent": 36, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 16}}, {"id": 39, "type": "declaration", "text": "long double _num_complete;", "parent": 29, "children": [40, 43], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 27}}, {"id": 40, "type": "sized_type_specifier", "text": "long double", "parent": 39, "children": [41, 42], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 12}}, {"id": 41, "type": "long", "text": "long", "parent": 40, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 5}}, {"id": 42, "type": "primitive_type", "text": "double", "parent": 40, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 12}}, {"id": 43, "type": "identifier", "text": "_num_complete", "parent": 39, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 26}}, {"id": 44, "type": "declaration", "text": "long double _tot_num;", "parent": 29, "children": [45, 48], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 22}}, {"id": 45, "type": "sized_type_specifier", "text": "long double", "parent": 44, "children": [46, 47], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 12}}, {"id": 46, "type": "long", "text": "long", "parent": 45, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 5}}, {"id": 47, "type": "primitive_type", "text": "double", "parent": 45, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 12}}, {"id": 48, "type": "identifier", "text": "_tot_num", "parent": 44, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 21}}, {"id": 49, "type": "declaration", "text": "int _num_updates;", "parent": 29, "children": [50, 51], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 18}}, {"id": 50, "type": "primitive_type", "text": "int", "parent": 49, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 4}}, {"id": 51, "type": "identifier", "text": "_num_updates", "parent": 49, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 17}}, {"id": 52, "type": "declaration", "text": "int _num_remaining;", "parent": 29, "children": [53, 54], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 20}}, {"id": 53, "type": "primitive_type", "text": "int", "parent": 52, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 4}}, {"id": 54, "type": "identifier", "text": "_num_remaining", "parent": 52, "children": [], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 19}}, {"id": 55, "type": "labeled_statement", "text": "public:\n\tProgressBar()", "parent": 29, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 14}}, {"id": 56, "type": "call_expression", "text": "ProgressBar()", "parent": 55, "children": [57, 58], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 14}}, {"id": 57, "type": "identifier", "text": "ProgressBar", "parent": 56, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 12}}, {"id": 58, "type": "argument_list", "text": "()", "parent": 56, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 14}}, {"id": 59, "type": "declaration", "text": "ProgressBar(string process, double tot_num) \n\t{ \n\t\t_tot_num = tot_num;", "parent": 29, "children": [60, 64, 65, 68], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 24, "column": 21}}, {"id": 60, "type": "macro_type_specifier", "text": "ProgressBar(string", "parent": 59, "children": [61, 62], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 19}}, {"id": 61, "type": "identifier", "text": "ProgressBar", "parent": 60, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 12}}, {"id": 62, "type": "type_descriptor", "text": "string", "parent": 60, "children": [63], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 19}}, {"id": 63, "type": "type_identifier", "text": "string", "parent": 62, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 19}}, {"id": 64, "type": "identifier", "text": "process", "parent": 59, "children": [], "start_point": {"row": 22, "column": 20}, "end_point": {"row": 22, "column": 27}}, {"id": 65, "type": "ERROR", "text": "double tot_num) \n\t{", "parent": 59, "children": [66, 67], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 23, "column": 2}}, {"id": 66, "type": "identifier", "text": "double", "parent": 65, "children": [], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 35}}, {"id": 67, "type": "identifier", "text": "tot_num", "parent": 65, "children": [], "start_point": {"row": 22, "column": 36}, "end_point": {"row": 22, "column": 43}}, {"id": 68, "type": "init_declarator", "text": "_tot_num = tot_num", "parent": 59, "children": [69, 70, 71], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 20}}, {"id": 69, "type": "identifier", "text": "_tot_num", "parent": 68, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 10}}, {"id": 70, "type": "=", "text": "=", "parent": 68, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 12}}, {"id": 71, "type": "identifier", "text": "tot_num", "parent": 68, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 20}}, {"id": 72, "type": "assignment_expression", "text": "_process = process", "parent": 29, "children": [73, 74, 75], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 20}}, {"id": 73, "type": "identifier", "text": "_process", "parent": 72, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 10}}, {"id": 74, "type": "=", "text": "=", "parent": 72, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 12}}, {"id": 75, "type": "identifier", "text": "process", "parent": 72, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 20}}, {"id": 76, "type": "assignment_expression", "text": "_num_complete = -1.0", "parent": 29, "children": [77, 78, 79], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 22}}, {"id": 77, "type": "identifier", "text": "_num_complete", "parent": 76, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 15}}, {"id": 78, "type": "=", "text": "=", "parent": 76, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 17}}, {"id": 79, "type": "number_literal", "text": "-1.0", "parent": 76, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 22}}, {"id": 80, "type": "assignment_expression", "text": "_num_remaining = -1.0", "parent": 29, "children": [81, 82, 83], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 23}}, {"id": 81, "type": "identifier", "text": "_num_remaining", "parent": 80, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 16}}, {"id": 82, "type": "=", "text": "=", "parent": 80, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 18}}, {"id": 83, "type": "number_literal", "text": "-1.0", "parent": 80, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 23}}, {"id": 84, "type": "assignment_expression", "text": "_num_updates = 0", "parent": 29, "children": [85, 86, 87], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 18}}, {"id": 85, "type": "identifier", "text": "_num_updates", "parent": 84, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 14}}, {"id": 86, "type": "=", "text": "=", "parent": 84, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 16}}, {"id": 87, "type": "number_literal", "text": "0", "parent": 84, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 18}}, {"id": 88, "type": "for_statement", "text": "for(int i=0; i < BAR_BUF_SIZE; ++i) _bar_buf[i] = ' ';", "parent": 29, "children": [89, 95, 99], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 56}}, {"id": 89, "type": "declaration", "text": "int i=0;", "parent": 88, "children": [90, 91], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 14}}, {"id": 90, "type": "primitive_type", "text": "int", "parent": 89, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 9}}, {"id": 91, "type": "init_declarator", "text": "i=0", "parent": 89, "children": [92, 93, 94], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 13}}, {"id": 92, "type": "identifier", "text": "i", "parent": 91, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 11}}, {"id": 93, "type": "=", "text": "=", "parent": 91, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 12}}, {"id": 94, "type": "number_literal", "text": "0", "parent": 91, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 13}}, {"id": 95, "type": "binary_expression", "text": "i < BAR_BUF_SIZE", "parent": 88, "children": [96, 97, 98], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 31}}, {"id": 96, "type": "identifier", "text": "i", "parent": 95, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 16}}, {"id": 97, "type": "<", "text": "<", "parent": 95, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 18}}, {"id": 98, "type": "identifier", "text": "BAR_BUF_SIZE", "parent": 95, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 31}}, {"id": 99, "type": "update_expression", "text": "++i", "parent": 88, "children": [100, 101], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 36}}, {"id": 100, "type": "++", "text": "++", "parent": 99, "children": [], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 35}}, {"id": 101, "type": "identifier", "text": "i", "parent": 99, "children": [], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 36}}, {"id": 102, "type": "assignment_expression", "text": "_bar_buf[i] = ' '", "parent": 88, "children": [103, 106, 107], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 30, "column": 55}}, {"id": 103, "type": "subscript_expression", "text": "_bar_buf[i]", "parent": 102, "children": [104, 105], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 30, "column": 49}}, {"id": 104, "type": "identifier", "text": "_bar_buf", "parent": 103, "children": [], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 30, "column": 46}}, {"id": 105, "type": "identifier", "text": "i", "parent": 103, "children": [], "start_point": {"row": 30, "column": 47}, "end_point": {"row": 30, "column": 48}}, {"id": 106, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 30, "column": 50}, "end_point": {"row": 30, "column": 51}}, {"id": 107, "type": "char_literal", "text": "' '", "parent": 102, "children": [108, 109, 110], "start_point": {"row": 30, "column": 52}, "end_point": {"row": 30, "column": 55}}, {"id": 108, "type": "'", "text": "'", "parent": 107, "children": [], "start_point": {"row": 30, "column": 52}, "end_point": {"row": 30, "column": 53}}, {"id": 109, "type": "character", "text": " ", "parent": 107, "children": [], "start_point": {"row": 30, "column": 53}, "end_point": {"row": 30, "column": 54}}, {"id": 110, "type": "'", "text": "'", "parent": 107, "children": [], "start_point": {"row": 30, "column": 54}, "end_point": {"row": 30, "column": 55}}, {"id": 111, "type": "assignment_expression", "text": "_bar_buf[0] = '['", "parent": 29, "children": [112, 115, 116], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 19}}, {"id": 112, "type": "subscript_expression", "text": "_bar_buf[0]", "parent": 111, "children": [113, 114], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 13}}, {"id": 113, "type": "identifier", "text": "_bar_buf", "parent": 112, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 10}}, {"id": 114, "type": "number_literal", "text": "0", "parent": 112, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 12}}, {"id": 115, "type": "=", "text": "=", "parent": 111, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 15}}, {"id": 116, "type": "char_literal", "text": "'['", "parent": 111, "children": [117, 118], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 19}}, {"id": 117, "type": "'", "text": "'", "parent": 116, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 17}}, {"id": 118, "type": "'", "text": "'", "parent": 116, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 19}}, {"id": 119, "type": "assignment_expression", "text": "_bar_buf[BAR_BUF_SIZE-2] = ']'", "parent": 29, "children": [120, 126, 127], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 32}}, {"id": 120, "type": "subscript_expression", "text": "_bar_buf[BAR_BUF_SIZE-2]", "parent": 119, "children": [121, 122], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 26}}, {"id": 121, "type": "identifier", "text": "_bar_buf", "parent": 120, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 10}}, {"id": 122, "type": "binary_expression", "text": "BAR_BUF_SIZE-2", "parent": 120, "children": [123, 124, 125], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 25}}, {"id": 123, "type": "identifier", "text": "BAR_BUF_SIZE", "parent": 122, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 23}}, {"id": 124, "type": "-", "text": "-", "parent": 122, "children": [], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 24}}, {"id": 125, "type": "number_literal", "text": "2", "parent": 122, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 25}}, {"id": 126, "type": "=", "text": "=", "parent": 119, "children": [], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 28}}, {"id": 127, "type": "char_literal", "text": "']'", "parent": 119, "children": [128, 129], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 32}}, {"id": 128, "type": "'", "text": "'", "parent": 127, "children": [], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 30}}, {"id": 129, "type": "'", "text": "'", "parent": 127, "children": [], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 32}}, {"id": 130, "type": "assignment_expression", "text": "_bar_buf[BAR_BUF_SIZE-1] = '\\0'", "parent": 29, "children": [131, 137, 138], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 33}}, {"id": 131, "type": "subscript_expression", "text": "_bar_buf[BAR_BUF_SIZE-1]", "parent": 130, "children": [132, 133], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 26}}, {"id": 132, "type": "identifier", "text": "_bar_buf", "parent": 131, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 10}}, {"id": 133, "type": "binary_expression", "text": "BAR_BUF_SIZE-1", "parent": 131, "children": [134, 135, 136], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 25}}, {"id": 134, "type": "identifier", "text": "BAR_BUF_SIZE", "parent": 133, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 23}}, {"id": 135, "type": "-", "text": "-", "parent": 133, "children": [], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 24}}, {"id": 136, "type": "number_literal", "text": "1", "parent": 133, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 25}}, {"id": 137, "type": "=", "text": "=", "parent": 130, "children": [], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 28}}, {"id": 138, "type": "char_literal", "text": "'\\0'", "parent": 130, "children": [139, 140, 141], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 33}}, {"id": 139, "type": "'", "text": "'", "parent": 138, "children": [], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 30}}, {"id": 140, "type": "escape_sequence", "text": "\\0", "parent": 138, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 32}}, {"id": 141, "type": "'", "text": "'", "parent": 138, "children": [], "start_point": {"row": 33, "column": 32}, "end_point": {"row": 33, "column": 33}}, {"id": 142, "type": "declaration", "text": "time_t rawtime;", "parent": 29, "children": [143, 144], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 17}}, {"id": 143, "type": "type_identifier", "text": "time_t", "parent": 142, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 8}}, {"id": 144, "type": "identifier", "text": "rawtime", "parent": 142, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 16}}, {"id": 145, "type": "declaration", "text": "struct tm * timeinfo;", "parent": 29, "children": [146, 149], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 25}}, {"id": 146, "type": "struct_specifier", "text": "struct tm", "parent": 145, "children": [147, 148], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 13}}, {"id": 147, "type": "struct", "text": "struct", "parent": 146, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 10}}, {"id": 148, "type": "type_identifier", "text": "tm", "parent": 146, "children": [], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 13}}, {"id": 149, "type": "pointer_declarator", "text": "* timeinfo", "parent": 145, "children": [150, 151], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 24}}, {"id": 150, "type": "*", "text": "*", "parent": 149, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 15}}, {"id": 151, "type": "identifier", "text": "timeinfo", "parent": 149, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 24}}, {"id": 152, "type": "declaration", "text": "char time_buf [80];", "parent": 29, "children": [153, 154], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 23}}, {"id": 153, "type": "primitive_type", "text": "char", "parent": 152, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 8}}, {"id": 154, "type": "array_declarator", "text": "time_buf [80]", "parent": 152, "children": [155, 156], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 22}}, {"id": 155, "type": "identifier", "text": "time_buf", "parent": 154, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 17}}, {"id": 156, "type": "number_literal", "text": "80", "parent": 154, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 21}}, {"id": 157, "type": "call_expression", "text": "time ( &rawtime )", "parent": 29, "children": [158, 159], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 21}}, {"id": 158, "type": "identifier", "text": "time", "parent": 157, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 8}}, {"id": 159, "type": "argument_list", "text": "( &rawtime )", "parent": 157, "children": [160], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 21}}, {"id": 160, "type": "pointer_expression", "text": "&rawtime", "parent": 159, "children": [161], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 19}}, {"id": 161, "type": "identifier", "text": "rawtime", "parent": 160, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 19}}, {"id": 162, "type": "assignment_expression", "text": "timeinfo = localtime ( &rawtime )", "parent": 29, "children": [163, 164, 165], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 37}}, {"id": 163, "type": "identifier", "text": "timeinfo", "parent": 162, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 12}}, {"id": 164, "type": "=", "text": "=", "parent": 162, "children": [], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 14}}, {"id": 165, "type": "call_expression", "text": "localtime ( &rawtime )", "parent": 162, "children": [166, 167], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 37}}, {"id": 166, "type": "identifier", "text": "localtime", "parent": 165, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 24}}, {"id": 167, "type": "argument_list", "text": "( &rawtime )", "parent": 165, "children": [168], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 37}}, {"id": 168, "type": "pointer_expression", "text": "&rawtime", "parent": 167, "children": [169], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 35}}, {"id": 169, "type": "identifier", "text": "rawtime", "parent": 168, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 35}}, {"id": 170, "type": "call_expression", "text": "strftime (time_buf,80,\"%H:%M:%S\",timeinfo)", "parent": 29, "children": [171, 172], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 44}}, {"id": 171, "type": "identifier", "text": "strftime", "parent": 170, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 10}}, {"id": 172, "type": "argument_list", "text": "(time_buf,80,\"%H:%M:%S\",timeinfo)", "parent": 170, "children": [173, 174, 175, 176], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 44}}, {"id": 173, "type": "identifier", "text": "time_buf", "parent": 172, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 20}}, {"id": 174, "type": "number_literal", "text": "80", "parent": 172, "children": [], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 23}}, {"id": 175, "type": "string_literal", "text": "\"%H:%M:%S\"", "parent": 172, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 34}}, {"id": 176, "type": "identifier", "text": "timeinfo", "parent": 172, "children": [], "start_point": {"row": 43, "column": 35}, "end_point": {"row": 43, "column": 43}}, {"id": 177, "type": "call_expression", "text": "fprintf(stderr, \"[%s] %s\\n\", time_buf, _process.c_str())", "parent": 29, "children": [178, 179], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 58}}, {"id": 178, "type": "identifier", "text": "fprintf", "parent": 177, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 9}}, {"id": 179, "type": "argument_list", "text": "(stderr, \"[%s] %s\\n\", time_buf, _process.c_str())", "parent": 177, "children": [180, 181, 183, 184], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 58}}, {"id": 180, "type": "identifier", "text": "stderr", "parent": 179, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 16}}, {"id": 181, "type": "string_literal", "text": "\"[%s] %s\\n\"", "parent": 179, "children": [182], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 29}}, {"id": 182, "type": "escape_sequence", "text": "\\n", "parent": 181, "children": [], "start_point": {"row": 45, "column": 26}, "end_point": {"row": 45, "column": 28}}, {"id": 183, "type": "identifier", "text": "time_buf", "parent": 179, "children": [], "start_point": {"row": 45, "column": 31}, "end_point": {"row": 45, "column": 39}}, {"id": 184, "type": "call_expression", "text": "_process.c_str()", "parent": 179, "children": [185, 188], "start_point": {"row": 45, "column": 41}, "end_point": {"row": 45, "column": 57}}, {"id": 185, "type": "field_expression", "text": "_process.c_str", "parent": 184, "children": [186, 187], "start_point": {"row": 45, "column": 41}, "end_point": {"row": 45, "column": 55}}, {"id": 186, "type": "identifier", "text": "_process", "parent": 185, "children": [], "start_point": {"row": 45, "column": 41}, "end_point": {"row": 45, "column": 49}}, {"id": 187, "type": "field_identifier", "text": "c_str", "parent": 185, "children": [], "start_point": {"row": 45, "column": 50}, "end_point": {"row": 45, "column": 55}}, {"id": 188, "type": "argument_list", "text": "()", "parent": 184, "children": [], "start_point": {"row": 45, "column": 55}, "end_point": {"row": 45, "column": 57}}, {"id": 189, "type": "function_definition", "text": "void update(const char* bundle_label_buf, double inc_amt)\n\t{\n\t\t\n\t\t_num_complete += inc_amt;\n\t\t_num_updates ++;\n\t\t\n\t\tif (cuff_verbose||cuff_quiet||_tot_num==0) return;\n\n\t\tchar bundle_buf[28];\n\t\tbundle_buf[27] = '\\0';\n\t\tstrncpy(bundle_buf, bundle_label_buf, 27);\n\t\t\n\t\tint percent = (_num_complete * 100)/_tot_num;\n\n\t\tpercent = min(percent, 99);\n\t\t\n\t\tint last_bar = percent/(100/(BAR_BUF_SIZE-3));\n\t\tfor (int i=1; i <= last_bar; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;\n\t\t\n\t\tchar line_buf[82];\n\t\tsnprintf(line_buf, 82, \"\\r> Processing Locus %-27s %s %3d%%\", bundle_buf, _bar_buf, percent);\n\t\t\n\t\tfprintf(stderr,\"%s\",line_buf);\n\t}", "parent": 0, "children": [190, 191], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 72, "column": 2}}, {"id": 190, "type": "primitive_type", "text": "void", "parent": 189, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 5}}, {"id": 191, "type": "function_declarator", "text": "update(const char* bundle_label_buf, double inc_amt)", "parent": 189, "children": [192, 193], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 58}}, {"id": 192, "type": "identifier", "text": "update", "parent": 191, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 12}}, {"id": 193, "type": "parameter_list", "text": "(const char* bundle_label_buf, double inc_amt)", "parent": 191, "children": [194, 199], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 58}}, {"id": 194, "type": "parameter_declaration", "text": "const char* bundle_label_buf", "parent": 193, "children": [195, 196], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 41}}, {"id": 195, "type": "primitive_type", "text": "char", "parent": 194, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 23}}, {"id": 196, "type": "pointer_declarator", "text": "* bundle_label_buf", "parent": 194, "children": [197, 198], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 41}}, {"id": 197, "type": "*", "text": "*", "parent": 196, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 24}}, {"id": 198, "type": "identifier", "text": "bundle_label_buf", "parent": 196, "children": [], "start_point": {"row": 48, "column": 25}, "end_point": {"row": 48, "column": 41}}, {"id": 199, "type": "parameter_declaration", "text": "double inc_amt", "parent": 193, "children": [200, 201], "start_point": {"row": 48, "column": 43}, "end_point": {"row": 48, "column": 57}}, {"id": 200, "type": "primitive_type", "text": "double", "parent": 199, "children": [], "start_point": {"row": 48, "column": 43}, "end_point": {"row": 48, "column": 49}}, {"id": 201, "type": "identifier", "text": "inc_amt", "parent": 199, "children": [], "start_point": {"row": 48, "column": 50}, "end_point": {"row": 48, "column": 57}}, {"id": 202, "type": "assignment_expression", "text": "_num_complete += inc_amt", "parent": 189, "children": [203, 204, 205], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 26}}, {"id": 203, "type": "identifier", "text": "_num_complete", "parent": 202, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 15}}, {"id": 204, "type": "+=", "text": "+=", "parent": 202, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 18}}, {"id": 205, "type": "identifier", "text": "inc_amt", "parent": 202, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 26}}, {"id": 206, "type": "update_expression", "text": "_num_updates ++", "parent": 189, "children": [207, 208], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 17}}, {"id": 207, "type": "identifier", "text": "_num_updates", "parent": 206, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 14}}, {"id": 208, "type": "++", "text": "++", "parent": 206, "children": [], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 17}}, {"id": 209, "type": "if_statement", "text": "if (cuff_verbose||cuff_quiet||_tot_num==0) return;", "parent": 189, "children": [210, 221], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 52}}, {"id": 210, "type": "parenthesized_expression", "text": "(cuff_verbose||cuff_quiet||_tot_num==0)", "parent": 209, "children": [211], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 44}}, {"id": 211, "type": "binary_expression", "text": "cuff_verbose||cuff_quiet||_tot_num==0", "parent": 210, "children": [212, 216, 217], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 43}}, {"id": 212, "type": "binary_expression", "text": "cuff_verbose||cuff_quiet", "parent": 211, "children": [213, 214, 215], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 30}}, {"id": 213, "type": "identifier", "text": "cuff_verbose", "parent": 212, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 18}}, {"id": 214, "type": "||", "text": "||", "parent": 212, "children": [], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 20}}, {"id": 215, "type": "identifier", "text": "cuff_quiet", "parent": 212, "children": [], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 30}}, {"id": 216, "type": "||", "text": "||", "parent": 211, "children": [], "start_point": {"row": 54, "column": 30}, "end_point": {"row": 54, "column": 32}}, {"id": 217, "type": "binary_expression", "text": "_tot_num==0", "parent": 211, "children": [218, 219, 220], "start_point": {"row": 54, "column": 32}, "end_point": {"row": 54, "column": 43}}, {"id": 218, "type": "identifier", "text": "_tot_num", "parent": 217, "children": [], "start_point": {"row": 54, "column": 32}, "end_point": {"row": 54, "column": 40}}, {"id": 219, "type": "==", "text": "==", "parent": 217, "children": [], "start_point": {"row": 54, "column": 40}, "end_point": {"row": 54, "column": 42}}, {"id": 220, "type": "number_literal", "text": "0", "parent": 217, "children": [], "start_point": {"row": 54, "column": 42}, "end_point": {"row": 54, "column": 43}}, {"id": 221, "type": "return_statement", "text": "return;", "parent": 209, "children": [], "start_point": {"row": 54, "column": 45}, "end_point": {"row": 54, "column": 52}}, {"id": 222, "type": "declaration", "text": "char bundle_buf[28];", "parent": 189, "children": [223, 224], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 22}}, {"id": 223, "type": "primitive_type", "text": "char", "parent": 222, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 6}}, {"id": 224, "type": "array_declarator", "text": "bundle_buf[28]", "parent": 222, "children": [225, 226], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 21}}, {"id": 225, "type": "identifier", "text": "bundle_buf", "parent": 224, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 17}}, {"id": 226, "type": "number_literal", "text": "28", "parent": 224, "children": [], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 20}}, {"id": 227, "type": "assignment_expression", "text": "bundle_buf[27] = '\\0'", "parent": 189, "children": [228, 231, 232], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 23}}, {"id": 228, "type": "subscript_expression", "text": "bundle_buf[27]", "parent": 227, "children": [229, 230], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 16}}, {"id": 229, "type": "identifier", "text": "bundle_buf", "parent": 228, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 12}}, {"id": 230, "type": "number_literal", "text": "27", "parent": 228, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 15}}, {"id": 231, "type": "=", "text": "=", "parent": 227, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 18}}, {"id": 232, "type": "char_literal", "text": "'\\0'", "parent": 227, "children": [233, 234, 235], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 23}}, {"id": 233, "type": "'", "text": "'", "parent": 232, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 20}}, {"id": 234, "type": "escape_sequence", "text": "\\0", "parent": 232, "children": [], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 22}}, {"id": 235, "type": "'", "text": "'", "parent": 232, "children": [], "start_point": {"row": 57, "column": 22}, "end_point": {"row": 57, "column": 23}}, {"id": 236, "type": "call_expression", "text": "strncpy(bundle_buf, bundle_label_buf, 27)", "parent": 189, "children": [237, 238], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 43}}, {"id": 237, "type": "identifier", "text": "strncpy", "parent": 236, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 9}}, {"id": 238, "type": "argument_list", "text": "(bundle_buf, bundle_label_buf, 27)", "parent": 236, "children": [239, 240, 241], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 43}}, {"id": 239, "type": "identifier", "text": "bundle_buf", "parent": 238, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 20}}, {"id": 240, "type": "identifier", "text": "bundle_label_buf", "parent": 238, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 38}}, {"id": 241, "type": "number_literal", "text": "27", "parent": 238, "children": [], "start_point": {"row": 58, "column": 40}, "end_point": {"row": 58, "column": 42}}, {"id": 242, "type": "declaration", "text": "int percent = (_num_complete * 100)/_tot_num;", "parent": 189, "children": [243, 244], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 47}}, {"id": 243, "type": "primitive_type", "text": "int", "parent": 242, "children": [], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 5}}, {"id": 244, "type": "init_declarator", "text": "percent = (_num_complete * 100)/_tot_num", "parent": 242, "children": [245, 246, 247], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 46}}, {"id": 245, "type": "identifier", "text": "percent", "parent": 244, "children": [], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 13}}, {"id": 246, "type": "=", "text": "=", "parent": 244, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 15}}, {"id": 247, "type": "binary_expression", "text": "(_num_complete * 100)/_tot_num", "parent": 244, "children": [248, 253, 254], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 46}}, {"id": 248, "type": "parenthesized_expression", "text": "(_num_complete * 100)", "parent": 247, "children": [249], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 37}}, {"id": 249, "type": "binary_expression", "text": "_num_complete * 100", "parent": 248, "children": [250, 251, 252], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 36}}, {"id": 250, "type": "identifier", "text": "_num_complete", "parent": 249, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 30}}, {"id": 251, "type": "*", "text": "*", "parent": 249, "children": [], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 32}}, {"id": 252, "type": "number_literal", "text": "100", "parent": 249, "children": [], "start_point": {"row": 60, "column": 33}, "end_point": {"row": 60, "column": 36}}, {"id": 253, "type": "/", "text": "/", "parent": 247, "children": [], "start_point": {"row": 60, "column": 37}, "end_point": {"row": 60, "column": 38}}, {"id": 254, "type": "identifier", "text": "_tot_num", "parent": 247, "children": [], "start_point": {"row": 60, "column": 38}, "end_point": {"row": 60, "column": 46}}, {"id": 255, "type": "assignment_expression", "text": "percent = min(percent, 99)", "parent": 189, "children": [256, 257, 258], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 28}}, {"id": 256, "type": "identifier", "text": "percent", "parent": 255, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 9}}, {"id": 257, "type": "=", "text": "=", "parent": 255, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 11}}, {"id": 258, "type": "call_expression", "text": "min(percent, 99)", "parent": 255, "children": [259, 260], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 28}}, {"id": 259, "type": "identifier", "text": "min", "parent": 258, "children": [], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 15}}, {"id": 260, "type": "argument_list", "text": "(percent, 99)", "parent": 258, "children": [261, 262], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 28}}, {"id": 261, "type": "identifier", "text": "percent", "parent": 260, "children": [], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 23}}, {"id": 262, "type": "number_literal", "text": "99", "parent": 260, "children": [], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 27}}, {"id": 263, "type": "declaration", "text": "int last_bar = percent/(100/(BAR_BUF_SIZE-3));", "parent": 189, "children": [264, 265], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 48}}, {"id": 264, "type": "primitive_type", "text": "int", "parent": 263, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 5}}, {"id": 265, "type": "init_declarator", "text": "last_bar = percent/(100/(BAR_BUF_SIZE-3))", "parent": 263, "children": [266, 267, 268], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 47}}, {"id": 266, "type": "identifier", "text": "last_bar", "parent": 265, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 14}}, {"id": 267, "type": "=", "text": "=", "parent": 265, "children": [], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 16}}, {"id": 268, "type": "binary_expression", "text": "percent/(100/(BAR_BUF_SIZE-3))", "parent": 265, "children": [269, 270, 271], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 47}}, {"id": 269, "type": "identifier", "text": "percent", "parent": 268, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 24}}, {"id": 270, "type": "/", "text": "/", "parent": 268, "children": [], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 25}}, {"id": 271, "type": "parenthesized_expression", "text": "(100/(BAR_BUF_SIZE-3))", "parent": 268, "children": [272], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 47}}, {"id": 272, "type": "binary_expression", "text": "100/(BAR_BUF_SIZE-3)", "parent": 271, "children": [273, 274, 275], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 46}}, {"id": 273, "type": "number_literal", "text": "100", "parent": 272, "children": [], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 29}}, {"id": 274, "type": "/", "text": "/", "parent": 272, "children": [], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 30}}, {"id": 275, "type": "parenthesized_expression", "text": "(BAR_BUF_SIZE-3)", "parent": 272, "children": [276], "start_point": {"row": 64, "column": 30}, "end_point": {"row": 64, "column": 46}}, {"id": 276, "type": "binary_expression", "text": "BAR_BUF_SIZE-3", "parent": 275, "children": [277, 278, 279], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 45}}, {"id": 277, "type": "identifier", "text": "BAR_BUF_SIZE", "parent": 276, "children": [], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 43}}, {"id": 278, "type": "-", "text": "-", "parent": 276, "children": [], "start_point": {"row": 64, "column": 43}, "end_point": {"row": 64, "column": 44}}, {"id": 279, "type": "number_literal", "text": "3", "parent": 276, "children": [], "start_point": {"row": 64, "column": 44}, "end_point": {"row": 64, "column": 45}}, {"id": 280, "type": "for_statement", "text": "for (int i=1; i <= last_bar; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;", "parent": 189, "children": [281, 287, 291], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 66, "column": 24}}, {"id": 281, "type": "declaration", "text": "int i=1;", "parent": 280, "children": [282, 283], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 15}}, {"id": 282, "type": "primitive_type", "text": "int", "parent": 281, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 10}}, {"id": 283, "type": "init_declarator", "text": "i=1", "parent": 281, "children": [284, 285, 286], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 14}}, {"id": 284, "type": "identifier", "text": "i", "parent": 283, "children": [], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 12}}, {"id": 285, "type": "=", "text": "=", "parent": 283, "children": [], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 13}}, {"id": 286, "type": "number_literal", "text": "1", "parent": 283, "children": [], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 14}}, {"id": 287, "type": "binary_expression", "text": "i <= last_bar", "parent": 280, "children": [288, 289, 290], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 29}}, {"id": 288, "type": "identifier", "text": "i", "parent": 287, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 17}}, {"id": 289, "type": "<=", "text": "<=", "parent": 287, "children": [], "start_point": {"row": 65, "column": 18}, "end_point": {"row": 65, "column": 20}}, {"id": 290, "type": "identifier", "text": "last_bar", "parent": 287, "children": [], "start_point": {"row": 65, "column": 21}, "end_point": {"row": 65, "column": 29}}, {"id": 291, "type": "update_expression", "text": "++i", "parent": 280, "children": [292, 293], "start_point": {"row": 65, "column": 31}, "end_point": {"row": 65, "column": 34}}, {"id": 292, "type": "++", "text": "++", "parent": 291, "children": [], "start_point": {"row": 65, "column": 31}, "end_point": {"row": 65, "column": 33}}, {"id": 293, "type": "identifier", "text": "i", "parent": 291, "children": [], "start_point": {"row": 65, "column": 33}, "end_point": {"row": 65, "column": 34}}, {"id": 294, "type": "assignment_expression", "text": "_bar_buf[i] = SYMBOL", "parent": 280, "children": [295, 298, 299], "start_point": {"row": 66, "column": 3}, "end_point": {"row": 66, "column": 23}}, {"id": 295, "type": "subscript_expression", "text": "_bar_buf[i]", "parent": 294, "children": [296, 297], "start_point": {"row": 66, "column": 3}, "end_point": {"row": 66, "column": 14}}, {"id": 296, "type": "identifier", "text": "_bar_buf", "parent": 295, "children": [], "start_point": {"row": 66, "column": 3}, "end_point": {"row": 66, "column": 11}}, {"id": 297, "type": "identifier", "text": "i", "parent": 295, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 13}}, {"id": 298, "type": "=", "text": "=", "parent": 294, "children": [], "start_point": {"row": 66, "column": 15}, "end_point": {"row": 66, "column": 16}}, {"id": 299, "type": "identifier", "text": "SYMBOL", "parent": 294, "children": [], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 23}}, {"id": 300, "type": "declaration", "text": "char line_buf[82];", "parent": 189, "children": [301, 302], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 20}}, {"id": 301, "type": "primitive_type", "text": "char", "parent": 300, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 6}}, {"id": 302, "type": "array_declarator", "text": "line_buf[82]", "parent": 300, "children": [303, 304], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 19}}, {"id": 303, "type": "identifier", "text": "line_buf", "parent": 302, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 15}}, {"id": 304, "type": "number_literal", "text": "82", "parent": 302, "children": [], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 18}}, {"id": 305, "type": "call_expression", "text": "snprintf(line_buf, 82, \"\\r> Processing Locus %-27s %s %3d%%\", bundle_buf, _bar_buf, percent)", "parent": 189, "children": [306, 307], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 94}}, {"id": 306, "type": "identifier", "text": "snprintf", "parent": 305, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 10}}, {"id": 307, "type": "argument_list", "text": "(line_buf, 82, \"\\r> Processing Locus %-27s %s %3d%%\", bundle_buf, _bar_buf, percent)", "parent": 305, "children": [308, 309, 310, 312, 313, 314], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 94}}, {"id": 308, "type": "identifier", "text": "line_buf", "parent": 307, "children": [], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 19}}, {"id": 309, "type": "number_literal", "text": "82", "parent": 307, "children": [], "start_point": {"row": 69, "column": 21}, "end_point": {"row": 69, "column": 23}}, {"id": 310, "type": "string_literal", "text": "\"\\r> Processing Locus %-27s %s %3d%%\"", "parent": 307, "children": [311], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 62}}, {"id": 311, "type": "escape_sequence", "text": "\\r", "parent": 310, "children": [], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 69, "column": 28}}, {"id": 312, "type": "identifier", "text": "bundle_buf", "parent": 307, "children": [], "start_point": {"row": 69, "column": 64}, "end_point": {"row": 69, "column": 74}}, {"id": 313, "type": "identifier", "text": "_bar_buf", "parent": 307, "children": [], "start_point": {"row": 69, "column": 76}, "end_point": {"row": 69, "column": 84}}, {"id": 314, "type": "identifier", "text": "percent", "parent": 307, "children": [], "start_point": {"row": 69, "column": 86}, "end_point": {"row": 69, "column": 93}}, {"id": 315, "type": "call_expression", "text": "fprintf(stderr,\"%s\",line_buf)", "parent": 189, "children": [316, 317], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 31}}, {"id": 316, "type": "identifier", "text": "fprintf", "parent": 315, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 9}}, {"id": 317, "type": "argument_list", "text": "(stderr,\"%s\",line_buf)", "parent": 315, "children": [318, 319, 320], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 31}}, {"id": 318, "type": "identifier", "text": "stderr", "parent": 317, "children": [], "start_point": {"row": 71, "column": 10}, "end_point": {"row": 71, "column": 16}}, {"id": 319, "type": "string_literal", "text": "\"%s\"", "parent": 317, "children": [], "start_point": {"row": 71, "column": 17}, "end_point": {"row": 71, "column": 21}}, {"id": 320, "type": "identifier", "text": "line_buf", "parent": 317, "children": [], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 30}}, {"id": 321, "type": "function_definition", "text": "void remaining(int num_remaining)\n\t{\n\t\tif (cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining) return;\n\t\t\n\t\t_num_remaining = num_remaining;\n\t\t\n\t\tint percent = (_num_complete * 100)/_tot_num;\n\t\tpercent = min(percent, 99);\n\t\t\n\t\tchar msg_buff[45];\n\t\tsprintf(msg_buff, \"Waiting for %d threads to complete.\", num_remaining);\n\t\t\n\t\tint last_bar = percent/(100/(BAR_BUF_SIZE-3));\n\t\tfor (int i=1; i <= last_bar; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;\n\t\t\n\t\tchar line_buf[82];\n\t\tsnprintf(line_buf, 81, \"\\r> %-44s %s %3d%%\", msg_buff, _bar_buf, percent);\n\t\t\n\t\tfprintf(stderr,\"%s\",line_buf);\n\t}", "parent": 0, "children": [322, 323], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 94, "column": 2}}, {"id": 322, "type": "primitive_type", "text": "void", "parent": 321, "children": [], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 5}}, {"id": 323, "type": "function_declarator", "text": "remaining(int num_remaining)", "parent": 321, "children": [324, 325], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 34}}, {"id": 324, "type": "identifier", "text": "remaining", "parent": 323, "children": [], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 15}}, {"id": 325, "type": "parameter_list", "text": "(int num_remaining)", "parent": 323, "children": [326], "start_point": {"row": 74, "column": 15}, "end_point": {"row": 74, "column": 34}}, {"id": 326, "type": "parameter_declaration", "text": "int num_remaining", "parent": 325, "children": [327, 328], "start_point": {"row": 74, "column": 16}, "end_point": {"row": 74, "column": 33}}, {"id": 327, "type": "primitive_type", "text": "int", "parent": 326, "children": [], "start_point": {"row": 74, "column": 16}, "end_point": {"row": 74, "column": 19}}, {"id": 328, "type": "identifier", "text": "num_remaining", "parent": 326, "children": [], "start_point": {"row": 74, "column": 20}, "end_point": {"row": 74, "column": 33}}, {"id": 329, "type": "if_statement", "text": "if (cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining) return;", "parent": 321, "children": [330, 347], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 83}}, {"id": 330, "type": "parenthesized_expression", "text": "(cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining)", "parent": 329, "children": [331], "start_point": {"row": 76, "column": 5}, "end_point": {"row": 76, "column": 75}}, {"id": 331, "type": "binary_expression", "text": "cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining", "parent": 330, "children": [332, 342, 343], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 74}}, {"id": 332, "type": "binary_expression", "text": "cuff_verbose||cuff_quiet||_tot_num==0", "parent": 331, "children": [333, 337, 338], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 43}}, {"id": 333, "type": "binary_expression", "text": "cuff_verbose||cuff_quiet", "parent": 332, "children": [334, 335, 336], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 30}}, {"id": 334, "type": "identifier", "text": "cuff_verbose", "parent": 333, "children": [], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 18}}, {"id": 335, "type": "||", "text": "||", "parent": 333, "children": [], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 20}}, {"id": 336, "type": "identifier", "text": "cuff_quiet", "parent": 333, "children": [], "start_point": {"row": 76, "column": 20}, "end_point": {"row": 76, "column": 30}}, {"id": 337, "type": "||", "text": "||", "parent": 332, "children": [], "start_point": {"row": 76, "column": 30}, "end_point": {"row": 76, "column": 32}}, {"id": 338, "type": "binary_expression", "text": "_tot_num==0", "parent": 332, "children": [339, 340, 341], "start_point": {"row": 76, "column": 32}, "end_point": {"row": 76, "column": 43}}, {"id": 339, "type": "identifier", "text": "_tot_num", "parent": 338, "children": [], "start_point": {"row": 76, "column": 32}, "end_point": {"row": 76, "column": 40}}, {"id": 340, "type": "==", "text": "==", "parent": 338, "children": [], "start_point": {"row": 76, "column": 40}, "end_point": {"row": 76, "column": 42}}, {"id": 341, "type": "number_literal", "text": "0", "parent": 338, "children": [], "start_point": {"row": 76, "column": 42}, "end_point": {"row": 76, "column": 43}}, {"id": 342, "type": "||", "text": "||", "parent": 331, "children": [], "start_point": {"row": 76, "column": 43}, "end_point": {"row": 76, "column": 45}}, {"id": 343, "type": "binary_expression", "text": "num_remaining==_num_remaining", "parent": 331, "children": [344, 345, 346], "start_point": {"row": 76, "column": 45}, "end_point": {"row": 76, "column": 74}}, {"id": 344, "type": "identifier", "text": "num_remaining", "parent": 343, "children": [], "start_point": {"row": 76, "column": 45}, "end_point": {"row": 76, "column": 58}}, {"id": 345, "type": "==", "text": "==", "parent": 343, "children": [], "start_point": {"row": 76, "column": 58}, "end_point": {"row": 76, "column": 60}}, {"id": 346, "type": "identifier", "text": "_num_remaining", "parent": 343, "children": [], "start_point": {"row": 76, "column": 60}, "end_point": {"row": 76, "column": 74}}, {"id": 347, "type": "return_statement", "text": "return;", "parent": 329, "children": [], "start_point": {"row": 76, "column": 76}, "end_point": {"row": 76, "column": 83}}, {"id": 348, "type": "assignment_expression", "text": "_num_remaining = num_remaining", "parent": 321, "children": [349, 350, 351], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 32}}, {"id": 349, "type": "identifier", "text": "_num_remaining", "parent": 348, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 16}}, {"id": 350, "type": "=", "text": "=", "parent": 348, "children": [], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 18}}, {"id": 351, "type": "identifier", "text": "num_remaining", "parent": 348, "children": [], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 32}}, {"id": 352, "type": "declaration", "text": "int percent = (_num_complete * 100)/_tot_num;", "parent": 321, "children": [353, 354], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 47}}, {"id": 353, "type": "primitive_type", "text": "int", "parent": 352, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 5}}, {"id": 354, "type": "init_declarator", "text": "percent = (_num_complete * 100)/_tot_num", "parent": 352, "children": [355, 356, 357], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 46}}, {"id": 355, "type": "identifier", "text": "percent", "parent": 354, "children": [], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 13}}, {"id": 356, "type": "=", "text": "=", "parent": 354, "children": [], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 15}}, {"id": 357, "type": "binary_expression", "text": "(_num_complete * 100)/_tot_num", "parent": 354, "children": [358, 363, 364], "start_point": {"row": 80, "column": 16}, "end_point": {"row": 80, "column": 46}}, {"id": 358, "type": "parenthesized_expression", "text": "(_num_complete * 100)", "parent": 357, "children": [359], "start_point": {"row": 80, "column": 16}, "end_point": {"row": 80, "column": 37}}, {"id": 359, "type": "binary_expression", "text": "_num_complete * 100", "parent": 358, "children": [360, 361, 362], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 36}}, {"id": 360, "type": "identifier", "text": "_num_complete", "parent": 359, "children": [], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 30}}, {"id": 361, "type": "*", "text": "*", "parent": 359, "children": [], "start_point": {"row": 80, "column": 31}, "end_point": {"row": 80, "column": 32}}, {"id": 362, "type": "number_literal", "text": "100", "parent": 359, "children": [], "start_point": {"row": 80, "column": 33}, "end_point": {"row": 80, "column": 36}}, {"id": 363, "type": "/", "text": "/", "parent": 357, "children": [], "start_point": {"row": 80, "column": 37}, "end_point": {"row": 80, "column": 38}}, {"id": 364, "type": "identifier", "text": "_tot_num", "parent": 357, "children": [], "start_point": {"row": 80, "column": 38}, "end_point": {"row": 80, "column": 46}}, {"id": 365, "type": "assignment_expression", "text": "percent = min(percent, 99)", "parent": 321, "children": [366, 367, 368], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 28}}, {"id": 366, "type": "identifier", "text": "percent", "parent": 365, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 9}}, {"id": 367, "type": "=", "text": "=", "parent": 365, "children": [], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 11}}, {"id": 368, "type": "call_expression", "text": "min(percent, 99)", "parent": 365, "children": [369, 370], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 28}}, {"id": 369, "type": "identifier", "text": "min", "parent": 368, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 15}}, {"id": 370, "type": "argument_list", "text": "(percent, 99)", "parent": 368, "children": [371, 372], "start_point": {"row": 81, "column": 15}, "end_point": {"row": 81, "column": 28}}, {"id": 371, "type": "identifier", "text": "percent", "parent": 370, "children": [], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 23}}, {"id": 372, "type": "number_literal", "text": "99", "parent": 370, "children": [], "start_point": {"row": 81, "column": 25}, "end_point": {"row": 81, "column": 27}}, {"id": 373, "type": "declaration", "text": "char msg_buff[45];", "parent": 321, "children": [374, 375], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 20}}, {"id": 374, "type": "primitive_type", "text": "char", "parent": 373, "children": [], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 6}}, {"id": 375, "type": "array_declarator", "text": "msg_buff[45]", "parent": 373, "children": [376, 377], "start_point": {"row": 83, "column": 7}, "end_point": {"row": 83, "column": 19}}, {"id": 376, "type": "identifier", "text": "msg_buff", "parent": 375, "children": [], "start_point": {"row": 83, "column": 7}, "end_point": {"row": 83, "column": 15}}, {"id": 377, "type": "number_literal", "text": "45", "parent": 375, "children": [], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 18}}, {"id": 378, "type": "call_expression", "text": "sprintf(msg_buff, \"Waiting for %d threads to complete.\", num_remaining)", "parent": 321, "children": [379, 380], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 73}}, {"id": 379, "type": "identifier", "text": "sprintf", "parent": 378, "children": [], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 9}}, {"id": 380, "type": "argument_list", "text": "(msg_buff, \"Waiting for %d threads to complete.\", num_remaining)", "parent": 378, "children": [381, 382, 383], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 73}}, {"id": 381, "type": "identifier", "text": "msg_buff", "parent": 380, "children": [], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 18}}, {"id": 382, "type": "string_literal", "text": "\"Waiting for %d threads to complete.\"", "parent": 380, "children": [], "start_point": {"row": 84, "column": 20}, "end_point": {"row": 84, "column": 57}}, {"id": 383, "type": "identifier", "text": "num_remaining", "parent": 380, "children": [], "start_point": {"row": 84, "column": 59}, "end_point": {"row": 84, "column": 72}}, {"id": 384, "type": "declaration", "text": "int last_bar = percent/(100/(BAR_BUF_SIZE-3));", "parent": 321, "children": [385, 386], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 48}}, {"id": 385, "type": "primitive_type", "text": "int", "parent": 384, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 5}}, {"id": 386, "type": "init_declarator", "text": "last_bar = percent/(100/(BAR_BUF_SIZE-3))", "parent": 384, "children": [387, 388, 389], "start_point": {"row": 86, "column": 6}, "end_point": {"row": 86, "column": 47}}, {"id": 387, "type": "identifier", "text": "last_bar", "parent": 386, "children": [], "start_point": {"row": 86, "column": 6}, "end_point": {"row": 86, "column": 14}}, {"id": 388, "type": "=", "text": "=", "parent": 386, "children": [], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 86, "column": 16}}, {"id": 389, "type": "binary_expression", "text": "percent/(100/(BAR_BUF_SIZE-3))", "parent": 386, "children": [390, 391, 392], "start_point": {"row": 86, "column": 17}, "end_point": {"row": 86, "column": 47}}, {"id": 390, "type": "identifier", "text": "percent", "parent": 389, "children": [], "start_point": {"row": 86, "column": 17}, "end_point": {"row": 86, "column": 24}}, {"id": 391, "type": "/", "text": "/", "parent": 389, "children": [], "start_point": {"row": 86, "column": 24}, "end_point": {"row": 86, "column": 25}}, {"id": 392, "type": "parenthesized_expression", "text": "(100/(BAR_BUF_SIZE-3))", "parent": 389, "children": [393], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 47}}, {"id": 393, "type": "binary_expression", "text": "100/(BAR_BUF_SIZE-3)", "parent": 392, "children": [394, 395, 396], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 46}}, {"id": 394, "type": "number_literal", "text": "100", "parent": 393, "children": [], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 29}}, {"id": 395, "type": "/", "text": "/", "parent": 393, "children": [], "start_point": {"row": 86, "column": 29}, "end_point": {"row": 86, "column": 30}}, {"id": 396, "type": "parenthesized_expression", "text": "(BAR_BUF_SIZE-3)", "parent": 393, "children": [397], "start_point": {"row": 86, "column": 30}, "end_point": {"row": 86, "column": 46}}, {"id": 397, "type": "binary_expression", "text": "BAR_BUF_SIZE-3", "parent": 396, "children": [398, 399, 400], "start_point": {"row": 86, "column": 31}, "end_point": {"row": 86, "column": 45}}, {"id": 398, "type": "identifier", "text": "BAR_BUF_SIZE", "parent": 397, "children": [], "start_point": {"row": 86, "column": 31}, "end_point": {"row": 86, "column": 43}}, {"id": 399, "type": "-", "text": "-", "parent": 397, "children": [], "start_point": {"row": 86, "column": 43}, "end_point": {"row": 86, "column": 44}}, {"id": 400, "type": "number_literal", "text": "3", "parent": 397, "children": [], "start_point": {"row": 86, "column": 44}, "end_point": {"row": 86, "column": 45}}, {"id": 401, "type": "for_statement", "text": "for (int i=1; i <= last_bar; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;", "parent": 321, "children": [402, 408, 412], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 88, "column": 24}}, {"id": 402, "type": "declaration", "text": "int i=1;", "parent": 401, "children": [403, 404], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 15}}, {"id": 403, "type": "primitive_type", "text": "int", "parent": 402, "children": [], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 10}}, {"id": 404, "type": "init_declarator", "text": "i=1", "parent": 402, "children": [405, 406, 407], "start_point": {"row": 87, "column": 11}, "end_point": {"row": 87, "column": 14}}, {"id": 405, "type": "identifier", "text": "i", "parent": 404, "children": [], "start_point": {"row": 87, "column": 11}, "end_point": {"row": 87, "column": 12}}, {"id": 406, "type": "=", "text": "=", "parent": 404, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 13}}, {"id": 407, "type": "number_literal", "text": "1", "parent": 404, "children": [], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 14}}, {"id": 408, "type": "binary_expression", "text": "i <= last_bar", "parent": 401, "children": [409, 410, 411], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 29}}, {"id": 409, "type": "identifier", "text": "i", "parent": 408, "children": [], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 17}}, {"id": 410, "type": "<=", "text": "<=", "parent": 408, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 20}}, {"id": 411, "type": "identifier", "text": "last_bar", "parent": 408, "children": [], "start_point": {"row": 87, "column": 21}, "end_point": {"row": 87, "column": 29}}, {"id": 412, "type": "update_expression", "text": "++i", "parent": 401, "children": [413, 414], "start_point": {"row": 87, "column": 31}, "end_point": {"row": 87, "column": 34}}, {"id": 413, "type": "++", "text": "++", "parent": 412, "children": [], "start_point": {"row": 87, "column": 31}, "end_point": {"row": 87, "column": 33}}, {"id": 414, "type": "identifier", "text": "i", "parent": 412, "children": [], "start_point": {"row": 87, "column": 33}, "end_point": {"row": 87, "column": 34}}, {"id": 415, "type": "assignment_expression", "text": "_bar_buf[i] = SYMBOL", "parent": 401, "children": [416, 419, 420], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 88, "column": 23}}, {"id": 416, "type": "subscript_expression", "text": "_bar_buf[i]", "parent": 415, "children": [417, 418], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 88, "column": 14}}, {"id": 417, "type": "identifier", "text": "_bar_buf", "parent": 416, "children": [], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 88, "column": 11}}, {"id": 418, "type": "identifier", "text": "i", "parent": 416, "children": [], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 13}}, {"id": 419, "type": "=", "text": "=", "parent": 415, "children": [], "start_point": {"row": 88, "column": 15}, "end_point": {"row": 88, "column": 16}}, {"id": 420, "type": "identifier", "text": "SYMBOL", "parent": 415, "children": [], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 23}}, {"id": 421, "type": "declaration", "text": "char line_buf[82];", "parent": 321, "children": [422, 423], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 20}}, {"id": 422, "type": "primitive_type", "text": "char", "parent": 421, "children": [], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 6}}, {"id": 423, "type": "array_declarator", "text": "line_buf[82]", "parent": 421, "children": [424, 425], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 19}}, {"id": 424, "type": "identifier", "text": "line_buf", "parent": 423, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 15}}, {"id": 425, "type": "number_literal", "text": "82", "parent": 423, "children": [], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 18}}, {"id": 426, "type": "call_expression", "text": "snprintf(line_buf, 81, \"\\r> %-44s %s %3d%%\", msg_buff, _bar_buf, percent)", "parent": 321, "children": [427, 428], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 75}}, {"id": 427, "type": "identifier", "text": "snprintf", "parent": 426, "children": [], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 10}}, {"id": 428, "type": "argument_list", "text": "(line_buf, 81, \"\\r> %-44s %s %3d%%\", msg_buff, _bar_buf, percent)", "parent": 426, "children": [429, 430, 431, 433, 434, 435], "start_point": {"row": 91, "column": 10}, "end_point": {"row": 91, "column": 75}}, {"id": 429, "type": "identifier", "text": "line_buf", "parent": 428, "children": [], "start_point": {"row": 91, "column": 11}, "end_point": {"row": 91, "column": 19}}, {"id": 430, "type": "number_literal", "text": "81", "parent": 428, "children": [], "start_point": {"row": 91, "column": 21}, "end_point": {"row": 91, "column": 23}}, {"id": 431, "type": "string_literal", "text": "\"\\r> %-44s %s %3d%%\"", "parent": 428, "children": [432], "start_point": {"row": 91, "column": 25}, "end_point": {"row": 91, "column": 45}}, {"id": 432, "type": "escape_sequence", "text": "\\r", "parent": 431, "children": [], "start_point": {"row": 91, "column": 26}, "end_point": {"row": 91, "column": 28}}, {"id": 433, "type": "identifier", "text": "msg_buff", "parent": 428, "children": [], "start_point": {"row": 91, "column": 47}, "end_point": {"row": 91, "column": 55}}, {"id": 434, "type": "identifier", "text": "_bar_buf", "parent": 428, "children": [], "start_point": {"row": 91, "column": 57}, "end_point": {"row": 91, "column": 65}}, {"id": 435, "type": "identifier", "text": "percent", "parent": 428, "children": [], "start_point": {"row": 91, "column": 67}, "end_point": {"row": 91, "column": 74}}, {"id": 436, "type": "call_expression", "text": "fprintf(stderr,\"%s\",line_buf)", "parent": 321, "children": [437, 438], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 31}}, {"id": 437, "type": "identifier", "text": "fprintf", "parent": 436, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 9}}, {"id": 438, "type": "argument_list", "text": "(stderr,\"%s\",line_buf)", "parent": 436, "children": [439, 440, 441], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 31}}, {"id": 439, "type": "identifier", "text": "stderr", "parent": 438, "children": [], "start_point": {"row": 93, "column": 10}, "end_point": {"row": 93, "column": 16}}, {"id": 440, "type": "string_literal", "text": "\"%s\"", "parent": 438, "children": [], "start_point": {"row": 93, "column": 17}, "end_point": {"row": 93, "column": 21}}, {"id": 441, "type": "identifier", "text": "line_buf", "parent": 438, "children": [], "start_point": {"row": 93, "column": 22}, "end_point": {"row": 93, "column": 30}}, {"id": 442, "type": "function_definition", "text": "void complete()\n\t{\n\t\tfor (int i=1; i < BAR_BUF_SIZE-2; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;\n\t\tchar complete_buf[45];\n\t\tsnprintf(complete_buf, 44, \"Processed %d loci.\", _num_updates); \n\t\tif (cuff_verbose||cuff_quiet)\n\t\t\tfprintf(stderr, \"%-44s\\n\", complete_buf);\n\t\telse\n\t\t\tfprintf(stderr, \"\\r> %-44s %s %3d%%\\n\", complete_buf, _bar_buf, 100);\n\t}", "parent": 0, "children": [443, 444], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 106, "column": 2}}, {"id": 443, "type": "primitive_type", "text": "void", "parent": 442, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 5}}, {"id": 444, "type": "function_declarator", "text": "complete()", "parent": 442, "children": [445, 446], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 16}}, {"id": 445, "type": "identifier", "text": "complete", "parent": 444, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 14}}, {"id": 446, "type": "parameter_list", "text": "()", "parent": 444, "children": [], "start_point": {"row": 96, "column": 14}, "end_point": {"row": 96, "column": 16}}, {"id": 447, "type": "for_statement", "text": "for (int i=1; i < BAR_BUF_SIZE-2; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;", "parent": 442, "children": [448, 454, 461], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 99, "column": 24}}, {"id": 448, "type": "declaration", "text": "int i=1;", "parent": 447, "children": [449, 450], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 15}}, {"id": 449, "type": "primitive_type", "text": "int", "parent": 448, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 10}}, {"id": 450, "type": "init_declarator", "text": "i=1", "parent": 448, "children": [451, 452, 453], "start_point": {"row": 98, "column": 11}, "end_point": {"row": 98, "column": 14}}, {"id": 451, "type": "identifier", "text": "i", "parent": 450, "children": [], "start_point": {"row": 98, "column": 11}, "end_point": {"row": 98, "column": 12}}, {"id": 452, "type": "=", "text": "=", "parent": 450, "children": [], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 13}}, {"id": 453, "type": "number_literal", "text": "1", "parent": 450, "children": [], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 14}}, {"id": 454, "type": "binary_expression", "text": "i < BAR_BUF_SIZE-2", "parent": 447, "children": [455, 456, 457], "start_point": {"row": 98, "column": 16}, "end_point": {"row": 98, "column": 34}}, {"id": 455, "type": "identifier", "text": "i", "parent": 454, "children": [], "start_point": {"row": 98, "column": 16}, "end_point": {"row": 98, "column": 17}}, {"id": 456, "type": "<", "text": "<", "parent": 454, "children": [], "start_point": {"row": 98, "column": 18}, "end_point": {"row": 98, "column": 19}}, {"id": 457, "type": "binary_expression", "text": "BAR_BUF_SIZE-2", "parent": 454, "children": [458, 459, 460], "start_point": {"row": 98, "column": 20}, "end_point": {"row": 98, "column": 34}}, {"id": 458, "type": "identifier", "text": "BAR_BUF_SIZE", "parent": 457, "children": [], "start_point": {"row": 98, "column": 20}, "end_point": {"row": 98, "column": 32}}, {"id": 459, "type": "-", "text": "-", "parent": 457, "children": [], "start_point": {"row": 98, "column": 32}, "end_point": {"row": 98, "column": 33}}, {"id": 460, "type": "number_literal", "text": "2", "parent": 457, "children": [], "start_point": {"row": 98, "column": 33}, "end_point": {"row": 98, "column": 34}}, {"id": 461, "type": "update_expression", "text": "++i", "parent": 447, "children": [462, 463], "start_point": {"row": 98, "column": 36}, "end_point": {"row": 98, "column": 39}}, {"id": 462, "type": "++", "text": "++", "parent": 461, "children": [], "start_point": {"row": 98, "column": 36}, "end_point": {"row": 98, "column": 38}}, {"id": 463, "type": "identifier", "text": "i", "parent": 461, "children": [], "start_point": {"row": 98, "column": 38}, "end_point": {"row": 98, "column": 39}}, {"id": 464, "type": "assignment_expression", "text": "_bar_buf[i] = SYMBOL", "parent": 447, "children": [465, 468, 469], "start_point": {"row": 99, "column": 3}, "end_point": {"row": 99, "column": 23}}, {"id": 465, "type": "subscript_expression", "text": "_bar_buf[i]", "parent": 464, "children": [466, 467], "start_point": {"row": 99, "column": 3}, "end_point": {"row": 99, "column": 14}}, {"id": 466, "type": "identifier", "text": "_bar_buf", "parent": 465, "children": [], "start_point": {"row": 99, "column": 3}, "end_point": {"row": 99, "column": 11}}, {"id": 467, "type": "identifier", "text": "i", "parent": 465, "children": [], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 13}}, {"id": 468, "type": "=", "text": "=", "parent": 464, "children": [], "start_point": {"row": 99, "column": 15}, "end_point": {"row": 99, "column": 16}}, {"id": 469, "type": "identifier", "text": "SYMBOL", "parent": 464, "children": [], "start_point": {"row": 99, "column": 17}, "end_point": {"row": 99, "column": 23}}, {"id": 470, "type": "declaration", "text": "char complete_buf[45];", "parent": 442, "children": [471, 472], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 24}}, {"id": 471, "type": "primitive_type", "text": "char", "parent": 470, "children": [], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 6}}, {"id": 472, "type": "array_declarator", "text": "complete_buf[45]", "parent": 470, "children": [473, 474], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 23}}, {"id": 473, "type": "identifier", "text": "complete_buf", "parent": 472, "children": [], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 19}}, {"id": 474, "type": "number_literal", "text": "45", "parent": 472, "children": [], "start_point": {"row": 100, "column": 20}, "end_point": {"row": 100, "column": 22}}, {"id": 475, "type": "call_expression", "text": "snprintf(complete_buf, 44, \"Processed %d loci.\", _num_updates)", "parent": 442, "children": [476, 477], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 64}}, {"id": 476, "type": "identifier", "text": "snprintf", "parent": 475, "children": [], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 10}}, {"id": 477, "type": "argument_list", "text": "(complete_buf, 44, \"Processed %d loci.\", _num_updates)", "parent": 475, "children": [478, 479, 480, 481], "start_point": {"row": 101, "column": 10}, "end_point": {"row": 101, "column": 64}}, {"id": 478, "type": "identifier", "text": "complete_buf", "parent": 477, "children": [], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 23}}, {"id": 479, "type": "number_literal", "text": "44", "parent": 477, "children": [], "start_point": {"row": 101, "column": 25}, "end_point": {"row": 101, "column": 27}}, {"id": 480, "type": "string_literal", "text": "\"Processed %d loci.\"", "parent": 477, "children": [], "start_point": {"row": 101, "column": 29}, "end_point": {"row": 101, "column": 49}}, {"id": 481, "type": "identifier", "text": "_num_updates", "parent": 477, "children": [], "start_point": {"row": 101, "column": 51}, "end_point": {"row": 101, "column": 63}}, {"id": 482, "type": "if_statement", "text": "if (cuff_verbose||cuff_quiet)\n\t\t\tfprintf(stderr, \"%-44s\\n\", complete_buf);\n\t\telse\n\t\t\tfprintf(stderr, \"\\r> %-44s %s %3d%%\\n\", complete_buf, _bar_buf, 100);", "parent": 442, "children": [483, 495], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 105, "column": 72}}, {"id": 483, "type": "parenthesized_expression", "text": "(cuff_verbose||cuff_quiet)", "parent": 482, "children": [484], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 31}}, {"id": 484, "type": "binary_expression", "text": "cuff_verbose||cuff_quiet", "parent": 483, "children": [485, 486, 487], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 30}}, {"id": 485, "type": "identifier", "text": "cuff_verbose", "parent": 484, "children": [], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 18}}, {"id": 486, "type": "||", "text": "||", "parent": 484, "children": [], "start_point": {"row": 102, "column": 18}, "end_point": {"row": 102, "column": 20}}, {"id": 487, "type": "identifier", "text": "cuff_quiet", "parent": 484, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 30}}, {"id": 488, "type": "call_expression", "text": "fprintf(stderr, \"%-44s\\n\", complete_buf)", "parent": 482, "children": [489, 490], "start_point": {"row": 103, "column": 3}, "end_point": {"row": 103, "column": 43}}, {"id": 489, "type": "identifier", "text": "fprintf", "parent": 488, "children": [], "start_point": {"row": 103, "column": 3}, "end_point": {"row": 103, "column": 10}}, {"id": 490, "type": "argument_list", "text": "(stderr, \"%-44s\\n\", complete_buf)", "parent": 488, "children": [491, 492, 494], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 43}}, {"id": 491, "type": "identifier", "text": "stderr", "parent": 490, "children": [], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 17}}, {"id": 492, "type": "string_literal", "text": "\"%-44s\\n\"", "parent": 490, "children": [493], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 28}}, {"id": 493, "type": "escape_sequence", "text": "\\n", "parent": 492, "children": [], "start_point": {"row": 103, "column": 25}, "end_point": {"row": 103, "column": 27}}, {"id": 494, "type": "identifier", "text": "complete_buf", "parent": 490, "children": [], "start_point": {"row": 103, "column": 30}, "end_point": {"row": 103, "column": 42}}, {"id": 495, "type": "else_clause", "text": "else\n\t\t\tfprintf(stderr, \"\\r> %-44s %s %3d%%\\n\", complete_buf, _bar_buf, 100);", "parent": 482, "children": [], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 105, "column": 72}}, {"id": 496, "type": "call_expression", "text": "fprintf(stderr, \"\\r> %-44s %s %3d%%\\n\", complete_buf, _bar_buf, 100)", "parent": 495, "children": [497, 498], "start_point": {"row": 105, "column": 3}, "end_point": {"row": 105, "column": 71}}, {"id": 497, "type": "identifier", "text": "fprintf", "parent": 496, "children": [], "start_point": {"row": 105, "column": 3}, "end_point": {"row": 105, "column": 10}}, {"id": 498, "type": "argument_list", "text": "(stderr, \"\\r> %-44s %s %3d%%\\n\", complete_buf, _bar_buf, 100)", "parent": 496, "children": [499, 500, 503, 504, 505], "start_point": {"row": 105, "column": 10}, "end_point": {"row": 105, "column": 71}}, {"id": 499, "type": "identifier", "text": "stderr", "parent": 498, "children": [], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 17}}, {"id": 500, "type": "string_literal", "text": "\"\\r> %-44s %s %3d%%\\n\"", "parent": 498, "children": [501, 502], "start_point": {"row": 105, "column": 19}, "end_point": {"row": 105, "column": 41}}, {"id": 501, "type": "escape_sequence", "text": "\\r", "parent": 500, "children": [], "start_point": {"row": 105, "column": 20}, "end_point": {"row": 105, "column": 22}}, {"id": 502, "type": "escape_sequence", "text": "\\n", "parent": 500, "children": [], "start_point": {"row": 105, "column": 38}, "end_point": {"row": 105, "column": 40}}, {"id": 503, "type": "identifier", "text": "complete_buf", "parent": 498, "children": [], "start_point": {"row": 105, "column": 43}, "end_point": {"row": 105, "column": 55}}, {"id": 504, "type": "identifier", "text": "_bar_buf", "parent": 498, "children": [], "start_point": {"row": 105, "column": 57}, "end_point": {"row": 105, "column": 65}}, {"id": 505, "type": "number_literal", "text": "100", "parent": 498, "children": [], "start_point": {"row": 105, "column": 67}, "end_point": {"row": 105, "column": 70}}, {"id": 506, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 6}}]}, "node_categories": {"declarations": {"functions": [29, 189, 191, 321, 323, 442, 444], "variables": [9, 14, 20, 31, 36, 39, 44, 49, 52, 59, 89, 142, 145, 152, 194, 199, 222, 242, 263, 281, 300, 326, 352, 373, 384, 402, 421, 448, 470], "classes": [146, 147], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [56, 95, 99, 103, 112, 120, 122, 131, 133, 157, 160, 165, 168, 170, 177, 184, 185, 206, 210, 211, 212, 217, 228, 236, 247, 248, 249, 258, 268, 271, 272, 275, 276, 287, 291, 295, 305, 315, 330, 331, 332, 333, 338, 343, 357, 358, 359, 368, 378, 389, 392, 393, 396, 397, 408, 412, 416, 426, 436, 454, 457, 461, 465, 475, 483, 484, 488, 496], "assignments": [72, 76, 80, 84, 102, 111, 119, 130, 162, 202, 227, 255, 294, 348, 365, 415, 464], "loops": [88, 280, 401, 447], "conditionals": [0, 1, 2, 5, 10, 11, 13, 17, 23, 30, 34, 35, 37, 38, 40, 43, 45, 48, 51, 54, 57, 60, 61, 63, 64, 66, 67, 69, 71, 73, 75, 77, 81, 85, 92, 96, 98, 101, 104, 105, 113, 121, 123, 132, 134, 143, 144, 148, 151, 155, 158, 161, 163, 166, 169, 171, 173, 176, 178, 180, 183, 186, 187, 192, 198, 201, 203, 205, 207, 209, 213, 215, 218, 225, 229, 237, 239, 240, 245, 250, 254, 256, 259, 261, 266, 269, 277, 284, 288, 290, 293, 296, 297, 299, 303, 306, 308, 312, 313, 314, 316, 318, 320, 324, 328, 329, 334, 336, 339, 344, 346, 349, 351, 355, 360, 364, 366, 369, 371, 376, 379, 381, 383, 387, 390, 398, 405, 409, 411, 414, 417, 418, 420, 424, 427, 429, 433, 434, 435, 437, 439, 441, 445, 451, 455, 458, 463, 466, 467, 469, 473, 476, 478, 481, 482, 485, 487, 489, 491, 494, 497, 499, 503, 504, 506], "returns": [221, 347], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 19, 25, 79, 83, 87, 94, 107, 114, 116, 125, 127, 136, 138, 156, 174, 175, 181, 220, 226, 230, 232, 241, 252, 262, 273, 279, 286, 304, 309, 310, 319, 341, 362, 372, 377, 382, 394, 400, 407, 425, 430, 431, 440, 453, 460, 474, 479, 480, 492, 500, 505], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 29, "universal_type": "function", "name": "ProgressBar", "text_snippet": "class ProgressBar\n{\n\tchar _bar_buf[BAR_BUF_SIZE];\n\tstring _process;\n\tlong double _num_complete;\n\tlon"}, {"node_id": 189, "universal_type": "function", "name": "update", "text_snippet": "void update(const char* bundle_label_buf, double inc_amt)\n\t{\n\t\t\n\t\t_num_complete += inc_amt;\n\t\t_num_u"}, {"node_id": 191, "universal_type": "function", "name": "unknown", "text_snippet": "update(const char* bundle_label_buf, double inc_amt)"}, {"node_id": 321, "universal_type": "function", "name": "remaining", "text_snippet": "void remaining(int num_remaining)\n\t{\n\t\tif (cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_nu"}, {"node_id": 323, "universal_type": "function", "name": "unknown", "text_snippet": "remaining(int num_remaining)"}, {"node_id": 442, "universal_type": "function", "name": "complete", "text_snippet": "void complete()\n\t{\n\t\tfor (int i=1; i < BAR_BUF_SIZE-2; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;\n\t\tchar complete"}, {"node_id": 444, "universal_type": "function", "name": "unknown", "text_snippet": "complete()"}], "class_declarations": [{"node_id": 146, "universal_type": "class", "name": "tm", "text_snippet": "struct tm"}, {"node_id": 147, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include \"time.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef PROGRESS_H\n#define PROGRESS_H\n\n#include \"time.h\"\n\nusing namespace std;\n\nconst int BAR_BUF_SIZE = 28;\nconst char SYMBOL = '*';\n\nclass ProgressBar\n{\n\tchar _bar_buf[BAR_BUF_SIZE];\n\tstring _process;\n\tlong double _num_complete;\n\tlong double _tot_num;\n\tint _num_updates;\n\tint _num_remaining;\n\t\npublic:\n\tProgressBar() {}\n\t\n\tProgressBar(string process, double tot_num) \n\t{ \n\t\t_tot_num = tot_num;\n\t\t_process = process;\n\t\t_num_complete = -1.0;\n\t\t_num_remaining = -1.0;\n\t\t_num_updates = 0;\n\t\t\n\t\tfor(int i=0; i < BAR_BUF_SIZE; ++i) _bar_buf[i] = ' ';\n\t\t_bar_buf[0] = '[';\n\t\t_bar_buf[BAR_BUF_SIZE-2] = ']';\n\t\t_bar_buf[BAR_BUF_SIZE-1] = '\\0';\n\t\t\n\t\t\n\t\ttime_t rawtime;\n \t\tstruct tm * timeinfo;\n \t\tchar time_buf [80];\n\n \t\ttime ( &rawtime );\n \t\ttimeinfo = localtime ( &rawtime );\n\t\t\n\t\tstrftime (time_buf,80,\"%H:%M:%S\",timeinfo);\n\n\t\tfprintf(stderr, \"[%s] %s\\n\", time_buf, _process.c_str());\n\t}\n\t\n\tvoid update(const char* bundle_label_buf, double inc_amt)\n\t{\n\t\t\n\t\t_num_complete += inc_amt;\n\t\t_num_updates ++;\n\t\t\n\t\tif (cuff_verbose||cuff_quiet||_tot_num==0) return;\n\n\t\tchar bundle_buf[28];\n\t\tbundle_buf[27] = '\\0';\n\t\tstrncpy(bundle_buf, bundle_label_buf, 27);\n\t\t\n\t\tint percent = (_num_complete * 100)/_tot_num;\n\n\t\tpercent = min(percent, 99);\n\t\t\n\t\tint last_bar = percent/(100/(BAR_BUF_SIZE-3));\n\t\tfor (int i=1; i <= last_bar; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;\n\t\t\n\t\tchar line_buf[82];\n\t\tsnprintf(line_buf, 82, \"\\r> Processing Locus %-27s %s %3d%%\", bundle_buf, _bar_buf, percent);\n\t\t\n\t\tfprintf(stderr,\"%s\",line_buf);\n\t}\n\t\n\tvoid remaining(int num_remaining)\n\t{\n\t\tif (cuff_verbose||cuff_quiet||_tot_num==0||num_remaining==_num_remaining) return;\n\t\t\n\t\t_num_remaining = num_remaining;\n\t\t\n\t\tint percent = (_num_complete * 100)/_tot_num;\n\t\tpercent = min(percent, 99);\n\t\t\n\t\tchar msg_buff[45];\n\t\tsprintf(msg_buff, \"Waiting for %d threads to complete.\", num_remaining);\n\t\t\n\t\tint last_bar = percent/(100/(BAR_BUF_SIZE-3));\n\t\tfor (int i=1; i <= last_bar; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;\n\t\t\n\t\tchar line_buf[82];\n\t\tsnprintf(line_buf, 81, \"\\r> %-44s %s %3d%%\", msg_buff, _bar_buf, percent);\n\t\t\n\t\tfprintf(stderr,\"%s\",line_buf);\n\t}\n\t\n\tvoid complete()\n\t{\n\t\tfor (int i=1; i < BAR_BUF_SIZE-2; ++i)\n\t\t\t_bar_buf[i] = SYMBOL;\n\t\tchar complete_buf[45];\n\t\tsnprintf(complete_buf, 44, \"Processed %d loci.\", _num_updates); \n\t\tif (cuff_verbose||cuff_quiet)\n\t\t\tfprintf(stderr, \"%-44s\\n\", complete_buf);\n\t\telse\n\t\t\tfprintf(stderr, \"\\r> %-44s %s %3d%%\\n\", complete_buf, _bar_buf, 100);\n\t}\n};\n\n#endif\n"}
344
c
// // Licensed to Green Energy Corp (www.greenenergycorp.com) under one or // more contributor license agreements. See the NOTICE file distributed // with this work for additional information regarding copyright ownership. // Green Energy Corp 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. // // This file was forked on 01/01/2013 by Automatak, LLC and modifications // have been made to this file. Automatak, LLC licenses these modifications to // you under the GNU Affero General Public License Version 3.0 // (the "Additional License"). You may not use these modifications except in // compliance with the additional license. You may obtain a copy of the Additional // License at // // http://www.gnu.org/licenses/agpl.html // // Contact Automatak, LLC for a commercial license to these modifications // #ifndef __SLAVE_H_ #define __SLAVE_H_ #include <opendnp3/ICommandHandler.h> #include <opendnp3/Logger.h> #include <opendnp3/SlaveConfig.h> #include <opendnp3/Visibility.h> #include "StackBase.h" #include "ChangeBuffer.h" #include "Loggable.h" #include "TimeSource.h" #include "LoggableMacros.h" #include "ITimer.h" #include "APDU.h" #include "AppInterfaces.h" #include "EventBuffers.h" #include "ObjectReadIterator.h" #include "ResponseContext.h" #include "SlaveEventBuffer.h" #include "SlaveResponseTypes.h" #include "VtoReader.h" #include "VtoWriter.h" #include "OutstationSBOHandler.h" namespace opendnp3 { class IExecutor; class AS_Base; /** * @section desc DNP3 outstation. * * Manages a state machine that handles events from the user layer and the * application layer to provide DNP outstation services. * * ResponseContext and SlaveEventBuffer objects manage data/event responses to * master requests, and the IDNPCommandMaster implementation verifies * control/setpoint behavior and passes valid commands to the user code. * * SlaveConfig structure represents the slave behavioral configuration, the * Database is in charge of the data model itself. * * Global IIN state is maintained and combined with request-specific * information to form response IINs. * * The Slave is responsible for building all aspects of APDU packet responses * except for the application sequence number. */ class DLL_LOCAL Slave : public Loggable, public IAppUser, public StackBase { friend class AS_Base; //make the state base class a friend friend class AS_OpenBase; friend class AS_Closed; friend class AS_Idle; friend class AS_WaitForRspSuccess; friend class AS_WaitForUnsolSuccess; friend class AS_WaitForSolUnsolSuccess; public: Slave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst()); ~Slave(); //////////////////////// // External events //////////////////////// /* Implement IAppUser - callbacks from the app layer */ void OnLowerLayerUp(); void OnLowerLayerDown(); void OnUnsolSendSuccess(); void OnSolSendSuccess(); void OnUnsolFailure(); void OnSolFailure(); // Only have to override OnRequest since we're a slave void OnRequest(const APDU&, SequenceInfo); void OnUnknownObject(); /** * Implements IAppUser::IsMaster(). * * @return 'false' since this is a Slave (outstation) * implementation */ bool IsMaster() { return false; } /** * Returns the buffer that is used for data updates by the user * application. Writing new entries to this buffer will result in the * Slave doing things. * * @return a pointer to the buffer */ IDataObserver* GetDataObserver() { return &mChangeBuffer; } /** * Returns a pointer to the VTO reader object. This should only be * used by internal subsystems in the library. External user * applications should associate IVtoCallbacks objects using the * AsyncStackManager. * * @return a pointer to the VtoReader instance for this stack */ VtoReader* GetVtoReader() { return &mVtoReader; } /** * Returns a pointer to the VtoWriter instance for this stack. * External user applications should use this hook to write new data * to the Master via the Slave (outstation). * * @return a pointer to the VtoWriter instance for this stack */ IVtoWriter* GetVtoWriter() { return &mVtoWriter; } private: ChangeBuffer mChangeBuffer; // how client code gives us updates IAppLayer* mpAppLayer; // lower application layer Database* mpDatabase; // holds static data ICommandHandler* mpCmdHandler; // how commands are selected/operated on application code int mSequence; // control sequence AS_Base* mpState; // current state for the state pattern SlaveConfig mConfig; // houses the configurable paramters of the outstation SlaveResponseTypes mRspTypes; // converts the group/var in the config to dnp singletons ITimer* mpUnsolTimer; // timer for sending unsol responsess INotifier* mpVtoNotifier; IINField mIIN; // IIN bits that persist between requests (i.e. NeedsTime/Restart/Etc) IINField mRspIIN; // Transient IIN bits that get merged before a response is issued APDU mResponse; // APDU used to form responses APDU mRequest; // APDU used to save Deferred requests SequenceInfo mSeqInfo; APDU mUnsol; // APDY used to form unsol respones ResponseContext mRspContext; // Used to track and construct response fragments OutstationSBOHandler mSBOHandler; // Tracks SBO requests, forwarding valid sequences to the application bool mHaveLastRequest; APDU mLastRequest; // APDU used to form responses ITimeManager* mpTime; // Flags that tell us that some action has been Deferred // until the slave is in a state capable of handling it. bool mDeferredUpdate; // Indicates that a data update has been Deferred bool mDeferredRequest; // Indicates that a request has been Deferred bool mDeferredUnsol; // Indicates that the unsol timer expired, but the event was Deferred bool mDeferredUnknown; bool mStartupNullUnsol; // Tracks whether the device has completed the NULL unsol startup message StackState mState; StackState GetState() { return mState; } void UpdateState(StackState aState); void OnVtoUpdate(); // internal event dispatched when user code commits an update to mVtoWriter void OnDataUpdate(); // internal event dispatched when user code commits an update to mChangeBuffer void OnUnsolTimerExpiration(); // internal event dispatched when the unsolicted pack/retry timer expires void ConfigureAndSendSimpleResponse(); void Send(APDU&); void Send(APDU& arAPDU, const IINField& arIIN); // overload with additional IIN data void SendUnsolicited(APDU& arAPDU); void HandleWrite(const APDU& arRequest); void HandleVtoTransfer(const APDU& arRequest); void HandleWriteIIN(HeaderReadIterator& arHdr); void HandleWriteTimeDate(HeaderReadIterator& arHWI); void HandleWriteVto(HeaderReadIterator& arHdr); void HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo); void HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo); void HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo); void HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable); void HandleUnknown(); void ConfigureDelayMeasurement(const APDU& arRequest); void CreateResponseContext(const APDU& arRequest); // Helpers size_t FlushVtoUpdates(); size_t FlushUpdates(); void FlushDeferredEvents(); void StartUnsolTimer(millis_t aTimeout); // Task handlers void ResetTimeIIN(); ITimer* mpTimeTimer; /** * The VtoReader instance for this stack which will direct received * VTO data to the user application. The user application should * register an IVtoCallbacks instance for the desired virtual channel * id(s) using AsyncStackManager::AddVtoChannel(). */ VtoReader mVtoReader; /** * The VtoWriter instance for this stack which will buffer new data * from the user application to the DNP3 stream. This handler is * thread-safe. */ VtoWriter mVtoWriter; /** * A structure to provide the C++ equivalent of templated typedefs. */ template <class T> struct CommandFunc { typedef std::function<CommandStatus (T&, size_t)> Type; }; /** * Forms a response message to a list of command objects. * Slave::mResponse is used as a destination buffer. * * @param apObj DNP3 object capable of reading/writing its own * type from/to a byte stream * @param arIter an ObjectReadIterator that provides access to the * DNP3 objects * @param aFunc Function for issuing/selecting */ template <class T> void RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler); }; template<class T> void Slave::RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler) { IndexedWriteIterator i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier()); size_t count = 1; while (!arIter.IsEnd()) { T val = apObj->Read(*arIter); size_t index = arIter->Index(); if (count > mConfig.mMaxControls) { val.mStatus = CS_TOO_MANY_OPS; } else { val.mStatus = CommandHandler(val, index); if(val.mStatus == CS_NOT_SUPPORTED) { this->mRspIIN.SetParameterError(true); } } i.SetIndex(index); apObj->Write(*i, val); ++i; ++arIter; ++count; } } } /* vim: set ts=4 sw=4: */ #endif
37.32
259
(translation_unit) "//\n// Licensed to Green Energy Corp (www.greenenergycorp.com) under one or\n// more contributor license agreements. See the NOTICE file distributed\n// with this work for additional information regarding copyright ownership.\n// Green Energy Corp licenses this file to you under the Apache License,\n// Version 2.0 (the "License"); you may not use this file except in\n// compliance 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, 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// This file was forked on 01/01/2013 by Automatak, LLC and modifications\n// have been made to this file. Automatak, LLC licenses these modifications to\n// you under the GNU Affero General Public License Version 3.0\n// (the "Additional License"). You may not use these modifications except in\n// compliance with the additional license. You may obtain a copy of the Additional\n// License at\n//\n// http://www.gnu.org/licenses/agpl.html\n//\n// Contact Automatak, LLC for a commercial license to these modifications\n//\n#ifndef __SLAVE_H_\n#define __SLAVE_H_\n\n#include <opendnp3/ICommandHandler.h>\n#include <opendnp3/Logger.h>\n#include <opendnp3/SlaveConfig.h>\n#include <opendnp3/Visibility.h>\n\n#include "StackBase.h"\n#include "ChangeBuffer.h"\n#include "Loggable.h"\n#include "TimeSource.h"\n#include "LoggableMacros.h"\n#include "ITimer.h"\n#include "APDU.h"\n#include "AppInterfaces.h"\n#include "EventBuffers.h"\n#include "ObjectReadIterator.h"\n#include "ResponseContext.h"\n#include "SlaveEventBuffer.h"\n#include "SlaveResponseTypes.h"\n#include "VtoReader.h"\n#include "VtoWriter.h"\n#include "OutstationSBOHandler.h"\n\n\nnamespace opendnp3\n{\n\nclass IExecutor;\nclass AS_Base;\n\n/**\n * @section desc DNP3 outstation.\n *\n * Manages a state machine that handles events from the user layer and the\n * application layer to provide DNP outstation services.\n *\n * ResponseContext and SlaveEventBuffer objects manage data/event responses to\n * master requests, and the IDNPCommandMaster implementation verifies\n * control/setpoint behavior and passes valid commands to the user code.\n *\n * SlaveConfig structure represents the slave behavioral configuration, the\n * Database is in charge of the data model itself.\n *\n * Global IIN state is maintained and combined with request-specific\n * information to form response IINs.\n *\n * The Slave is responsible for building all aspects of APDU packet responses\n * except for the application sequence number.\n */\nclass DLL_LOCAL Slave : public Loggable, public IAppUser, public StackBase\n{\n\n friend class AS_Base; //make the state base class a friend\n friend class AS_OpenBase;\n friend class AS_Closed;\n friend class AS_Idle;\n friend class AS_WaitForRspSuccess;\n friend class AS_WaitForUnsolSuccess;\n friend class AS_WaitForSolUnsolSuccess;\n\npublic:\n\n Slave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst());\n ~Slave();\n\n ////////////////////////\n // External events\n ////////////////////////\n\n /* Implement IAppUser - callbacks from the app layer */\n void OnLowerLayerUp();\n void OnLowerLayerDown();\n\n void OnUnsolSendSuccess();\n void OnSolSendSuccess();\n\n void OnUnsolFailure();\n void OnSolFailure();\n\n // Only have to override OnRequest since we're a slave\n void OnRequest(const APDU&, SequenceInfo);\n void OnUnknownObject();\n\n /**\n * Implements IAppUser::IsMaster().\n *\n * @return 'false' since this is a Slave (outstation)\n * implementation\n */\n bool IsMaster() {\n return false;\n }\n\n /**\n * Returns the buffer that is used for data updates by the user\n * application. Writing new entries to this buffer will result in the\n * Slave doing things.\n *\n * @return a pointer to the buffer\n */\n IDataObserver* GetDataObserver() {\n return &mChangeBuffer;\n }\n\n /**\n * Returns a pointer to the VTO reader object. This should only be\n * used by internal subsystems in the library. External user\n * applications should associate IVtoCallbacks objects using the\n * AsyncStackManager.\n *\n * @return a pointer to the VtoReader instance for this stack\n */\n VtoReader* GetVtoReader() {\n return &mVtoReader;\n }\n\n /**\n * Returns a pointer to the VtoWriter instance for this stack.\n * External user applications should use this hook to write new data\n * to the Master via the Slave (outstation).\n *\n * @return a pointer to the VtoWriter instance for this stack\n */\n IVtoWriter* GetVtoWriter() {\n return &mVtoWriter;\n }\n\nprivate:\n\n ChangeBuffer mChangeBuffer; // how client code gives us updates\n IAppLayer* mpAppLayer; // lower application layer\n Database* mpDatabase; // holds static data\n ICommandHandler* mpCmdHandler; // how commands are selected/operated on application code\n int mSequence; // control sequence\n AS_Base* mpState; // current state for the state pattern\n SlaveConfig mConfig; // houses the configurable paramters of the outstation\n SlaveResponseTypes mRspTypes; // converts the group/var in the config to dnp singletons\n\n ITimer* mpUnsolTimer; // timer for sending unsol responsess\n\n INotifier* mpVtoNotifier;\n\n IINField mIIN; // IIN bits that persist between requests (i.e. NeedsTime/Restart/Etc)\n IINField mRspIIN; // Transient IIN bits that get merged before a response is issued\n APDU mResponse; // APDU used to form responses\n APDU mRequest; // APDU used to save Deferred requests\n SequenceInfo mSeqInfo;\n APDU mUnsol; // APDY used to form unsol respones\n ResponseContext mRspContext; // Used to track and construct response fragments\n OutstationSBOHandler mSBOHandler; // Tracks SBO requests, forwarding valid sequences to the application\n\n bool mHaveLastRequest;\n APDU mLastRequest; // APDU used to form responses\n\n ITimeManager* mpTime;\n\n // Flags that tell us that some action has been Deferred\n // until the slave is in a state capable of handling it.\n\n bool mDeferredUpdate; // Indicates that a data update has been Deferred\n bool mDeferredRequest; // Indicates that a request has been Deferred\n bool mDeferredUnsol; // Indicates that the unsol timer expired, but the event was Deferred\n bool mDeferredUnknown;\n\n bool mStartupNullUnsol; // Tracks whether the device has completed the NULL unsol startup message\n\n StackState mState;\n\n StackState GetState() {\n return mState;\n }\n\n void UpdateState(StackState aState);\n\n void OnVtoUpdate(); // internal event dispatched when user code commits an update to mVtoWriter\n void OnDataUpdate(); // internal event dispatched when user code commits an update to mChangeBuffer\n void OnUnsolTimerExpiration(); // internal event dispatched when the unsolicted pack/retry timer expires\n\n void ConfigureAndSendSimpleResponse();\n void Send(APDU&);\n void Send(APDU& arAPDU, const IINField& arIIN); // overload with additional IIN data\n void SendUnsolicited(APDU& arAPDU);\n\n void HandleWrite(const APDU& arRequest);\n void HandleVtoTransfer(const APDU& arRequest);\n void HandleWriteIIN(HeaderReadIterator& arHdr);\n void HandleWriteTimeDate(HeaderReadIterator& arHWI);\n void HandleWriteVto(HeaderReadIterator& arHdr);\n void HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable);\n void HandleUnknown();\n\n void ConfigureDelayMeasurement(const APDU& arRequest);\n void CreateResponseContext(const APDU& arRequest);\n\n // Helpers\n\n size_t FlushVtoUpdates();\n size_t FlushUpdates();\n void FlushDeferredEvents();\n void StartUnsolTimer(millis_t aTimeout);\n\n // Task handlers\n\n void ResetTimeIIN();\n ITimer* mpTimeTimer;\n\n /**\n * The VtoReader instance for this stack which will direct received\n * VTO data to the user application. The user application should\n * register an IVtoCallbacks instance for the desired virtual channel\n * id(s) using AsyncStackManager::AddVtoChannel().\n */\n VtoReader mVtoReader;\n\n /**\n * The VtoWriter instance for this stack which will buffer new data\n * from the user application to the DNP3 stream. This handler is\n * thread-safe.\n */\n VtoWriter mVtoWriter;\n\n /**\n * A structure to provide the C++ equivalent of templated typedefs.\n */\n template <class T>\n struct CommandFunc {\n typedef std::function<CommandStatus (T&, size_t)> Type;\n };\n\n /**\n * Forms a response message to a list of command objects.\n * Slave::mResponse is used as a destination buffer.\n *\n * @param apObj DNP3 object capable of reading/writing its own\n * type from/to a byte stream\n * @param arIter an ObjectReadIterator that provides access to the\n * DNP3 objects\n * @param aFunc Function for issuing/selecting\n */\n template <class T>\n void RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler);\n};\n\ntemplate<class T>\nvoid Slave::RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler)\n{\n IndexedWriteIterator i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier());\n size_t count = 1;\n while (!arIter.IsEnd()) {\n T val = apObj->Read(*arIter);\n size_t index = arIter->Index();\n if (count > mConfig.mMaxControls) {\n val.mStatus = CS_TOO_MANY_OPS;\n }\n else {\n val.mStatus = CommandHandler(val, index);\n if(val.mStatus == CS_NOT_SUPPORTED) {\n this->mRspIIN.SetParameterError(true);\n }\n }\n i.SetIndex(index);\n apObj->Write(*i, val);\n ++i;\n ++arIter;\n ++count;\n }\n}\n\n}\n\n/* vim: set ts=4 sw=4: */\n\n#endif\n\n" (comment) "//" (comment) "// Licensed to Green Energy Corp (www.greenenergycorp.com) under one or" (comment) "// more contributor license agreements. See the NOTICE file distributed" (comment) "// with this work for additional information regarding copyright ownership." (comment) "// Green Energy Corp licenses this file to you under the Apache License," (comment) "// Version 2.0 (the "License"); you may not use this file except in" (comment) "// compliance with the License. You may obtain a copy of the License at" (comment) "//" (comment) "// http://www.apache.org/licenses/LICENSE-2.0" (comment) "//" (comment) "// Unless required by applicable law or agreed to in writing, software" (comment) "// distributed under the License is distributed on an "AS IS" BASIS," (comment) "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied." (comment) "// See the License for the specific language governing permissions and" (comment) "// limitations under the License." (comment) "//" (comment) "// This file was forked on 01/01/2013 by Automatak, LLC and modifications" (comment) "// have been made to this file. Automatak, LLC licenses these modifications to" (comment) "// you under the GNU Affero General Public License Version 3.0" (comment) "// (the "Additional License"). You may not use these modifications except in" (comment) "// compliance with the additional license. You may obtain a copy of the Additional" (comment) "// License at" (comment) "//" (comment) "// http://www.gnu.org/licenses/agpl.html" (comment) "//" (comment) "// Contact Automatak, LLC for a commercial license to these modifications" (comment) "//" (preproc_ifdef) "#ifndef __SLAVE_H_\n#define __SLAVE_H_\n\n#include <opendnp3/ICommandHandler.h>\n#include <opendnp3/Logger.h>\n#include <opendnp3/SlaveConfig.h>\n#include <opendnp3/Visibility.h>\n\n#include "StackBase.h"\n#include "ChangeBuffer.h"\n#include "Loggable.h"\n#include "TimeSource.h"\n#include "LoggableMacros.h"\n#include "ITimer.h"\n#include "APDU.h"\n#include "AppInterfaces.h"\n#include "EventBuffers.h"\n#include "ObjectReadIterator.h"\n#include "ResponseContext.h"\n#include "SlaveEventBuffer.h"\n#include "SlaveResponseTypes.h"\n#include "VtoReader.h"\n#include "VtoWriter.h"\n#include "OutstationSBOHandler.h"\n\n\nnamespace opendnp3\n{\n\nclass IExecutor;\nclass AS_Base;\n\n/**\n * @section desc DNP3 outstation.\n *\n * Manages a state machine that handles events from the user layer and the\n * application layer to provide DNP outstation services.\n *\n * ResponseContext and SlaveEventBuffer objects manage data/event responses to\n * master requests, and the IDNPCommandMaster implementation verifies\n * control/setpoint behavior and passes valid commands to the user code.\n *\n * SlaveConfig structure represents the slave behavioral configuration, the\n * Database is in charge of the data model itself.\n *\n * Global IIN state is maintained and combined with request-specific\n * information to form response IINs.\n *\n * The Slave is responsible for building all aspects of APDU packet responses\n * except for the application sequence number.\n */\nclass DLL_LOCAL Slave : public Loggable, public IAppUser, public StackBase\n{\n\n friend class AS_Base; //make the state base class a friend\n friend class AS_OpenBase;\n friend class AS_Closed;\n friend class AS_Idle;\n friend class AS_WaitForRspSuccess;\n friend class AS_WaitForUnsolSuccess;\n friend class AS_WaitForSolUnsolSuccess;\n\npublic:\n\n Slave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst());\n ~Slave();\n\n ////////////////////////\n // External events\n ////////////////////////\n\n /* Implement IAppUser - callbacks from the app layer */\n void OnLowerLayerUp();\n void OnLowerLayerDown();\n\n void OnUnsolSendSuccess();\n void OnSolSendSuccess();\n\n void OnUnsolFailure();\n void OnSolFailure();\n\n // Only have to override OnRequest since we're a slave\n void OnRequest(const APDU&, SequenceInfo);\n void OnUnknownObject();\n\n /**\n * Implements IAppUser::IsMaster().\n *\n * @return 'false' since this is a Slave (outstation)\n * implementation\n */\n bool IsMaster() {\n return false;\n }\n\n /**\n * Returns the buffer that is used for data updates by the user\n * application. Writing new entries to this buffer will result in the\n * Slave doing things.\n *\n * @return a pointer to the buffer\n */\n IDataObserver* GetDataObserver() {\n return &mChangeBuffer;\n }\n\n /**\n * Returns a pointer to the VTO reader object. This should only be\n * used by internal subsystems in the library. External user\n * applications should associate IVtoCallbacks objects using the\n * AsyncStackManager.\n *\n * @return a pointer to the VtoReader instance for this stack\n */\n VtoReader* GetVtoReader() {\n return &mVtoReader;\n }\n\n /**\n * Returns a pointer to the VtoWriter instance for this stack.\n * External user applications should use this hook to write new data\n * to the Master via the Slave (outstation).\n *\n * @return a pointer to the VtoWriter instance for this stack\n */\n IVtoWriter* GetVtoWriter() {\n return &mVtoWriter;\n }\n\nprivate:\n\n ChangeBuffer mChangeBuffer; // how client code gives us updates\n IAppLayer* mpAppLayer; // lower application layer\n Database* mpDatabase; // holds static data\n ICommandHandler* mpCmdHandler; // how commands are selected/operated on application code\n int mSequence; // control sequence\n AS_Base* mpState; // current state for the state pattern\n SlaveConfig mConfig; // houses the configurable paramters of the outstation\n SlaveResponseTypes mRspTypes; // converts the group/var in the config to dnp singletons\n\n ITimer* mpUnsolTimer; // timer for sending unsol responsess\n\n INotifier* mpVtoNotifier;\n\n IINField mIIN; // IIN bits that persist between requests (i.e. NeedsTime/Restart/Etc)\n IINField mRspIIN; // Transient IIN bits that get merged before a response is issued\n APDU mResponse; // APDU used to form responses\n APDU mRequest; // APDU used to save Deferred requests\n SequenceInfo mSeqInfo;\n APDU mUnsol; // APDY used to form unsol respones\n ResponseContext mRspContext; // Used to track and construct response fragments\n OutstationSBOHandler mSBOHandler; // Tracks SBO requests, forwarding valid sequences to the application\n\n bool mHaveLastRequest;\n APDU mLastRequest; // APDU used to form responses\n\n ITimeManager* mpTime;\n\n // Flags that tell us that some action has been Deferred\n // until the slave is in a state capable of handling it.\n\n bool mDeferredUpdate; // Indicates that a data update has been Deferred\n bool mDeferredRequest; // Indicates that a request has been Deferred\n bool mDeferredUnsol; // Indicates that the unsol timer expired, but the event was Deferred\n bool mDeferredUnknown;\n\n bool mStartupNullUnsol; // Tracks whether the device has completed the NULL unsol startup message\n\n StackState mState;\n\n StackState GetState() {\n return mState;\n }\n\n void UpdateState(StackState aState);\n\n void OnVtoUpdate(); // internal event dispatched when user code commits an update to mVtoWriter\n void OnDataUpdate(); // internal event dispatched when user code commits an update to mChangeBuffer\n void OnUnsolTimerExpiration(); // internal event dispatched when the unsolicted pack/retry timer expires\n\n void ConfigureAndSendSimpleResponse();\n void Send(APDU&);\n void Send(APDU& arAPDU, const IINField& arIIN); // overload with additional IIN data\n void SendUnsolicited(APDU& arAPDU);\n\n void HandleWrite(const APDU& arRequest);\n void HandleVtoTransfer(const APDU& arRequest);\n void HandleWriteIIN(HeaderReadIterator& arHdr);\n void HandleWriteTimeDate(HeaderReadIterator& arHWI);\n void HandleWriteVto(HeaderReadIterator& arHdr);\n void HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable);\n void HandleUnknown();\n\n void ConfigureDelayMeasurement(const APDU& arRequest);\n void CreateResponseContext(const APDU& arRequest);\n\n // Helpers\n\n size_t FlushVtoUpdates();\n size_t FlushUpdates();\n void FlushDeferredEvents();\n void StartUnsolTimer(millis_t aTimeout);\n\n // Task handlers\n\n void ResetTimeIIN();\n ITimer* mpTimeTimer;\n\n /**\n * The VtoReader instance for this stack which will direct received\n * VTO data to the user application. The user application should\n * register an IVtoCallbacks instance for the desired virtual channel\n * id(s) using AsyncStackManager::AddVtoChannel().\n */\n VtoReader mVtoReader;\n\n /**\n * The VtoWriter instance for this stack which will buffer new data\n * from the user application to the DNP3 stream. This handler is\n * thread-safe.\n */\n VtoWriter mVtoWriter;\n\n /**\n * A structure to provide the C++ equivalent of templated typedefs.\n */\n template <class T>\n struct CommandFunc {\n typedef std::function<CommandStatus (T&, size_t)> Type;\n };\n\n /**\n * Forms a response message to a list of command objects.\n * Slave::mResponse is used as a destination buffer.\n *\n * @param apObj DNP3 object capable of reading/writing its own\n * type from/to a byte stream\n * @param arIter an ObjectReadIterator that provides access to the\n * DNP3 objects\n * @param aFunc Function for issuing/selecting\n */\n template <class T>\n void RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler);\n};\n\ntemplate<class T>\nvoid Slave::RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler)\n{\n IndexedWriteIterator i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier());\n size_t count = 1;\n while (!arIter.IsEnd()) {\n T val = apObj->Read(*arIter);\n size_t index = arIter->Index();\n if (count > mConfig.mMaxControls) {\n val.mStatus = CS_TOO_MANY_OPS;\n }\n else {\n val.mStatus = CommandHandler(val, index);\n if(val.mStatus == CS_NOT_SUPPORTED) {\n this->mRspIIN.SetParameterError(true);\n }\n }\n i.SetIndex(index);\n apObj->Write(*i, val);\n ++i;\n ++arIter;\n ++count;\n }\n}\n\n}\n\n/* vim: set ts=4 sw=4: */\n\n#endif" (#ifndef) "#ifndef" (identifier) "__SLAVE_H_" (preproc_def) "#define __SLAVE_H_\n" (#define) "#define" (identifier) "__SLAVE_H_" (preproc_include) "#include <opendnp3/ICommandHandler.h>\n" (#include) "#include" (system_lib_string) "<opendnp3/ICommandHandler.h>" (preproc_include) "#include <opendnp3/Logger.h>\n" (#include) "#include" (system_lib_string) "<opendnp3/Logger.h>" (preproc_include) "#include <opendnp3/SlaveConfig.h>\n" (#include) "#include" (system_lib_string) "<opendnp3/SlaveConfig.h>" (preproc_include) "#include <opendnp3/Visibility.h>\n" (#include) "#include" (system_lib_string) "<opendnp3/Visibility.h>" (preproc_include) "#include "StackBase.h"\n" (#include) "#include" (string_literal) ""StackBase.h"" (") """ (string_content) "StackBase.h" (") """ (preproc_include) "#include "ChangeBuffer.h"\n" (#include) "#include" (string_literal) ""ChangeBuffer.h"" (") """ (string_content) "ChangeBuffer.h" (") """ (preproc_include) "#include "Loggable.h"\n" (#include) "#include" (string_literal) ""Loggable.h"" (") """ (string_content) "Loggable.h" (") """ (preproc_include) "#include "TimeSource.h"\n" (#include) "#include" (string_literal) ""TimeSource.h"" (") """ (string_content) "TimeSource.h" (") """ (preproc_include) "#include "LoggableMacros.h"\n" (#include) "#include" (string_literal) ""LoggableMacros.h"" (") """ (string_content) "LoggableMacros.h" (") """ (preproc_include) "#include "ITimer.h"\n" (#include) "#include" (string_literal) ""ITimer.h"" (") """ (string_content) "ITimer.h" (") """ (preproc_include) "#include "APDU.h"\n" (#include) "#include" (string_literal) ""APDU.h"" (") """ (string_content) "APDU.h" (") """ (preproc_include) "#include "AppInterfaces.h"\n" (#include) "#include" (string_literal) ""AppInterfaces.h"" (") """ (string_content) "AppInterfaces.h" (") """ (preproc_include) "#include "EventBuffers.h"\n" (#include) "#include" (string_literal) ""EventBuffers.h"" (") """ (string_content) "EventBuffers.h" (") """ (preproc_include) "#include "ObjectReadIterator.h"\n" (#include) "#include" (string_literal) ""ObjectReadIterator.h"" (") """ (string_content) "ObjectReadIterator.h" (") """ (preproc_include) "#include "ResponseContext.h"\n" (#include) "#include" (string_literal) ""ResponseContext.h"" (") """ (string_content) "ResponseContext.h" (") """ (preproc_include) "#include "SlaveEventBuffer.h"\n" (#include) "#include" (string_literal) ""SlaveEventBuffer.h"" (") """ (string_content) "SlaveEventBuffer.h" (") """ (preproc_include) "#include "SlaveResponseTypes.h"\n" (#include) "#include" (string_literal) ""SlaveResponseTypes.h"" (") """ (string_content) "SlaveResponseTypes.h" (") """ (preproc_include) "#include "VtoReader.h"\n" (#include) "#include" (string_literal) ""VtoReader.h"" (") """ (string_content) "VtoReader.h" (") """ (preproc_include) "#include "VtoWriter.h"\n" (#include) "#include" (string_literal) ""VtoWriter.h"" (") """ (string_content) "VtoWriter.h" (") """ (preproc_include) "#include "OutstationSBOHandler.h"\n" (#include) "#include" (string_literal) ""OutstationSBOHandler.h"" (") """ (string_content) "OutstationSBOHandler.h" (") """ (function_definition) "namespace opendnp3\n{\n\nclass IExecutor;\nclass AS_Base;\n\n/**\n * @section desc DNP3 outstation.\n *\n * Manages a state machine that handles events from the user layer and the\n * application layer to provide DNP outstation services.\n *\n * ResponseContext and SlaveEventBuffer objects manage data/event responses to\n * master requests, and the IDNPCommandMaster implementation verifies\n * control/setpoint behavior and passes valid commands to the user code.\n *\n * SlaveConfig structure represents the slave behavioral configuration, the\n * Database is in charge of the data model itself.\n *\n * Global IIN state is maintained and combined with request-specific\n * information to form response IINs.\n *\n * The Slave is responsible for building all aspects of APDU packet responses\n * except for the application sequence number.\n */\nclass DLL_LOCAL Slave : public Loggable, public IAppUser, public StackBase\n{\n\n friend class AS_Base; //make the state base class a friend\n friend class AS_OpenBase;\n friend class AS_Closed;\n friend class AS_Idle;\n friend class AS_WaitForRspSuccess;\n friend class AS_WaitForUnsolSuccess;\n friend class AS_WaitForSolUnsolSuccess;\n\npublic:\n\n Slave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst());\n ~Slave();\n\n ////////////////////////\n // External events\n ////////////////////////\n\n /* Implement IAppUser - callbacks from the app layer */\n void OnLowerLayerUp();\n void OnLowerLayerDown();\n\n void OnUnsolSendSuccess();\n void OnSolSendSuccess();\n\n void OnUnsolFailure();\n void OnSolFailure();\n\n // Only have to override OnRequest since we're a slave\n void OnRequest(const APDU&, SequenceInfo);\n void OnUnknownObject();\n\n /**\n * Implements IAppUser::IsMaster().\n *\n * @return 'false' since this is a Slave (outstation)\n * implementation\n */\n bool IsMaster() {\n return false;\n }\n\n /**\n * Returns the buffer that is used for data updates by the user\n * application. Writing new entries to this buffer will result in the\n * Slave doing things.\n *\n * @return a pointer to the buffer\n */\n IDataObserver* GetDataObserver() {\n return &mChangeBuffer;\n }\n\n /**\n * Returns a pointer to the VTO reader object. This should only be\n * used by internal subsystems in the library. External user\n * applications should associate IVtoCallbacks objects using the\n * AsyncStackManager.\n *\n * @return a pointer to the VtoReader instance for this stack\n */\n VtoReader* GetVtoReader() {\n return &mVtoReader;\n }\n\n /**\n * Returns a pointer to the VtoWriter instance for this stack.\n * External user applications should use this hook to write new data\n * to the Master via the Slave (outstation).\n *\n * @return a pointer to the VtoWriter instance for this stack\n */\n IVtoWriter* GetVtoWriter() {\n return &mVtoWriter;\n }\n\nprivate:\n\n ChangeBuffer mChangeBuffer; // how client code gives us updates\n IAppLayer* mpAppLayer; // lower application layer\n Database* mpDatabase; // holds static data\n ICommandHandler* mpCmdHandler; // how commands are selected/operated on application code\n int mSequence; // control sequence\n AS_Base* mpState; // current state for the state pattern\n SlaveConfig mConfig; // houses the configurable paramters of the outstation\n SlaveResponseTypes mRspTypes; // converts the group/var in the config to dnp singletons\n\n ITimer* mpUnsolTimer; // timer for sending unsol responsess\n\n INotifier* mpVtoNotifier;\n\n IINField mIIN; // IIN bits that persist between requests (i.e. NeedsTime/Restart/Etc)\n IINField mRspIIN; // Transient IIN bits that get merged before a response is issued\n APDU mResponse; // APDU used to form responses\n APDU mRequest; // APDU used to save Deferred requests\n SequenceInfo mSeqInfo;\n APDU mUnsol; // APDY used to form unsol respones\n ResponseContext mRspContext; // Used to track and construct response fragments\n OutstationSBOHandler mSBOHandler; // Tracks SBO requests, forwarding valid sequences to the application\n\n bool mHaveLastRequest;\n APDU mLastRequest; // APDU used to form responses\n\n ITimeManager* mpTime;\n\n // Flags that tell us that some action has been Deferred\n // until the slave is in a state capable of handling it.\n\n bool mDeferredUpdate; // Indicates that a data update has been Deferred\n bool mDeferredRequest; // Indicates that a request has been Deferred\n bool mDeferredUnsol; // Indicates that the unsol timer expired, but the event was Deferred\n bool mDeferredUnknown;\n\n bool mStartupNullUnsol; // Tracks whether the device has completed the NULL unsol startup message\n\n StackState mState;\n\n StackState GetState() {\n return mState;\n }\n\n void UpdateState(StackState aState);\n\n void OnVtoUpdate(); // internal event dispatched when user code commits an update to mVtoWriter\n void OnDataUpdate(); // internal event dispatched when user code commits an update to mChangeBuffer\n void OnUnsolTimerExpiration(); // internal event dispatched when the unsolicted pack/retry timer expires\n\n void ConfigureAndSendSimpleResponse();\n void Send(APDU&);\n void Send(APDU& arAPDU, const IINField& arIIN); // overload with additional IIN data\n void SendUnsolicited(APDU& arAPDU);\n\n void HandleWrite(const APDU& arRequest);\n void HandleVtoTransfer(const APDU& arRequest);\n void HandleWriteIIN(HeaderReadIterator& arHdr);\n void HandleWriteTimeDate(HeaderReadIterator& arHWI);\n void HandleWriteVto(HeaderReadIterator& arHdr);\n void HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable);\n void HandleUnknown();\n\n void ConfigureDelayMeasurement(const APDU& arRequest);\n void CreateResponseContext(const APDU& arRequest);\n\n // Helpers\n\n size_t FlushVtoUpdates();\n size_t FlushUpdates();\n void FlushDeferredEvents();\n void StartUnsolTimer(millis_t aTimeout);\n\n // Task handlers\n\n void ResetTimeIIN();\n ITimer* mpTimeTimer;\n\n /**\n * The VtoReader instance for this stack which will direct received\n * VTO data to the user application. The user application should\n * register an IVtoCallbacks instance for the desired virtual channel\n * id(s) using AsyncStackManager::AddVtoChannel().\n */\n VtoReader mVtoReader;\n\n /**\n * The VtoWriter instance for this stack which will buffer new data\n * from the user application to the DNP3 stream. This handler is\n * thread-safe.\n */\n VtoWriter mVtoWriter;\n\n /**\n * A structure to provide the C++ equivalent of templated typedefs.\n */\n template <class T>\n struct CommandFunc {\n typedef std::function<CommandStatus (T&, size_t)> Type;\n };\n\n /**\n * Forms a response message to a list of command objects.\n * Slave::mResponse is used as a destination buffer.\n *\n * @param apObj DNP3 object capable of reading/writing its own\n * type from/to a byte stream\n * @param arIter an ObjectReadIterator that provides access to the\n * DNP3 objects\n * @param aFunc Function for issuing/selecting\n */\n template <class T>\n void RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler);\n}" (type_identifier) "namespace" (identifier) "opendnp3" (compound_statement) "{\n\nclass IExecutor;\nclass AS_Base;\n\n/**\n * @section desc DNP3 outstation.\n *\n * Manages a state machine that handles events from the user layer and the\n * application layer to provide DNP outstation services.\n *\n * ResponseContext and SlaveEventBuffer objects manage data/event responses to\n * master requests, and the IDNPCommandMaster implementation verifies\n * control/setpoint behavior and passes valid commands to the user code.\n *\n * SlaveConfig structure represents the slave behavioral configuration, the\n * Database is in charge of the data model itself.\n *\n * Global IIN state is maintained and combined with request-specific\n * information to form response IINs.\n *\n * The Slave is responsible for building all aspects of APDU packet responses\n * except for the application sequence number.\n */\nclass DLL_LOCAL Slave : public Loggable, public IAppUser, public StackBase\n{\n\n friend class AS_Base; //make the state base class a friend\n friend class AS_OpenBase;\n friend class AS_Closed;\n friend class AS_Idle;\n friend class AS_WaitForRspSuccess;\n friend class AS_WaitForUnsolSuccess;\n friend class AS_WaitForSolUnsolSuccess;\n\npublic:\n\n Slave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst());\n ~Slave();\n\n ////////////////////////\n // External events\n ////////////////////////\n\n /* Implement IAppUser - callbacks from the app layer */\n void OnLowerLayerUp();\n void OnLowerLayerDown();\n\n void OnUnsolSendSuccess();\n void OnSolSendSuccess();\n\n void OnUnsolFailure();\n void OnSolFailure();\n\n // Only have to override OnRequest since we're a slave\n void OnRequest(const APDU&, SequenceInfo);\n void OnUnknownObject();\n\n /**\n * Implements IAppUser::IsMaster().\n *\n * @return 'false' since this is a Slave (outstation)\n * implementation\n */\n bool IsMaster() {\n return false;\n }\n\n /**\n * Returns the buffer that is used for data updates by the user\n * application. Writing new entries to this buffer will result in the\n * Slave doing things.\n *\n * @return a pointer to the buffer\n */\n IDataObserver* GetDataObserver() {\n return &mChangeBuffer;\n }\n\n /**\n * Returns a pointer to the VTO reader object. This should only be\n * used by internal subsystems in the library. External user\n * applications should associate IVtoCallbacks objects using the\n * AsyncStackManager.\n *\n * @return a pointer to the VtoReader instance for this stack\n */\n VtoReader* GetVtoReader() {\n return &mVtoReader;\n }\n\n /**\n * Returns a pointer to the VtoWriter instance for this stack.\n * External user applications should use this hook to write new data\n * to the Master via the Slave (outstation).\n *\n * @return a pointer to the VtoWriter instance for this stack\n */\n IVtoWriter* GetVtoWriter() {\n return &mVtoWriter;\n }\n\nprivate:\n\n ChangeBuffer mChangeBuffer; // how client code gives us updates\n IAppLayer* mpAppLayer; // lower application layer\n Database* mpDatabase; // holds static data\n ICommandHandler* mpCmdHandler; // how commands are selected/operated on application code\n int mSequence; // control sequence\n AS_Base* mpState; // current state for the state pattern\n SlaveConfig mConfig; // houses the configurable paramters of the outstation\n SlaveResponseTypes mRspTypes; // converts the group/var in the config to dnp singletons\n\n ITimer* mpUnsolTimer; // timer for sending unsol responsess\n\n INotifier* mpVtoNotifier;\n\n IINField mIIN; // IIN bits that persist between requests (i.e. NeedsTime/Restart/Etc)\n IINField mRspIIN; // Transient IIN bits that get merged before a response is issued\n APDU mResponse; // APDU used to form responses\n APDU mRequest; // APDU used to save Deferred requests\n SequenceInfo mSeqInfo;\n APDU mUnsol; // APDY used to form unsol respones\n ResponseContext mRspContext; // Used to track and construct response fragments\n OutstationSBOHandler mSBOHandler; // Tracks SBO requests, forwarding valid sequences to the application\n\n bool mHaveLastRequest;\n APDU mLastRequest; // APDU used to form responses\n\n ITimeManager* mpTime;\n\n // Flags that tell us that some action has been Deferred\n // until the slave is in a state capable of handling it.\n\n bool mDeferredUpdate; // Indicates that a data update has been Deferred\n bool mDeferredRequest; // Indicates that a request has been Deferred\n bool mDeferredUnsol; // Indicates that the unsol timer expired, but the event was Deferred\n bool mDeferredUnknown;\n\n bool mStartupNullUnsol; // Tracks whether the device has completed the NULL unsol startup message\n\n StackState mState;\n\n StackState GetState() {\n return mState;\n }\n\n void UpdateState(StackState aState);\n\n void OnVtoUpdate(); // internal event dispatched when user code commits an update to mVtoWriter\n void OnDataUpdate(); // internal event dispatched when user code commits an update to mChangeBuffer\n void OnUnsolTimerExpiration(); // internal event dispatched when the unsolicted pack/retry timer expires\n\n void ConfigureAndSendSimpleResponse();\n void Send(APDU&);\n void Send(APDU& arAPDU, const IINField& arIIN); // overload with additional IIN data\n void SendUnsolicited(APDU& arAPDU);\n\n void HandleWrite(const APDU& arRequest);\n void HandleVtoTransfer(const APDU& arRequest);\n void HandleWriteIIN(HeaderReadIterator& arHdr);\n void HandleWriteTimeDate(HeaderReadIterator& arHWI);\n void HandleWriteVto(HeaderReadIterator& arHdr);\n void HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n void HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable);\n void HandleUnknown();\n\n void ConfigureDelayMeasurement(const APDU& arRequest);\n void CreateResponseContext(const APDU& arRequest);\n\n // Helpers\n\n size_t FlushVtoUpdates();\n size_t FlushUpdates();\n void FlushDeferredEvents();\n void StartUnsolTimer(millis_t aTimeout);\n\n // Task handlers\n\n void ResetTimeIIN();\n ITimer* mpTimeTimer;\n\n /**\n * The VtoReader instance for this stack which will direct received\n * VTO data to the user application. The user application should\n * register an IVtoCallbacks instance for the desired virtual channel\n * id(s) using AsyncStackManager::AddVtoChannel().\n */\n VtoReader mVtoReader;\n\n /**\n * The VtoWriter instance for this stack which will buffer new data\n * from the user application to the DNP3 stream. This handler is\n * thread-safe.\n */\n VtoWriter mVtoWriter;\n\n /**\n * A structure to provide the C++ equivalent of templated typedefs.\n */\n template <class T>\n struct CommandFunc {\n typedef std::function<CommandStatus (T&, size_t)> Type;\n };\n\n /**\n * Forms a response message to a list of command objects.\n * Slave::mResponse is used as a destination buffer.\n *\n * @param apObj DNP3 object capable of reading/writing its own\n * type from/to a byte stream\n * @param arIter an ObjectReadIterator that provides access to the\n * DNP3 objects\n * @param aFunc Function for issuing/selecting\n */\n template <class T>\n void RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler);\n}" ({) "{" (declaration) "class IExecutor;" (type_identifier) "class" (identifier) "IExecutor" (;) ";" (declaration) "class AS_Base;" (type_identifier) "class" (identifier) "AS_Base" (;) ";" (comment) "/**\n * @section desc DNP3 outstation.\n *\n * Manages a state machine that handles events from the user layer and the\n * application layer to provide DNP outstation services.\n *\n * ResponseContext and SlaveEventBuffer objects manage data/event responses to\n * master requests, and the IDNPCommandMaster implementation verifies\n * control/setpoint behavior and passes valid commands to the user code.\n *\n * SlaveConfig structure represents the slave behavioral configuration, the\n * Database is in charge of the data model itself.\n *\n * Global IIN state is maintained and combined with request-specific\n * information to form response IINs.\n *\n * The Slave is responsible for building all aspects of APDU packet responses\n * except for the application sequence number.\n */" (declaration) "class DLL_LOCAL" (type_identifier) "class" (identifier) "DLL_LOCAL" (;) "" (labeled_statement) "Slave : public Loggable, public IAppUser, public StackBase\n{\n\n friend class AS_Base;" (statement_identifier) "Slave" (:) ":" (declaration) "public Loggable, public IAppUser, public StackBase\n{\n\n friend class AS_Base;" (type_identifier) "public" (identifier) "Loggable" (,) "," (ERROR) "public" (identifier) "public" (identifier) "IAppUser" (,) "," (ERROR) "public StackBase\n{\n\n friend class" (identifier) "public" (identifier) "StackBase" ({) "{" (identifier) "friend" (identifier) "class" (identifier) "AS_Base" (;) ";" (comment) "//make the state base class a friend" (declaration) "friend class AS_OpenBase;" (type_identifier) "friend" (ERROR) "class" (identifier) "class" (identifier) "AS_OpenBase" (;) ";" (declaration) "friend class AS_Closed;" (type_identifier) "friend" (ERROR) "class" (identifier) "class" (identifier) "AS_Closed" (;) ";" (declaration) "friend class AS_Idle;" (type_identifier) "friend" (ERROR) "class" (identifier) "class" (identifier) "AS_Idle" (;) ";" (declaration) "friend class AS_WaitForRspSuccess;" (type_identifier) "friend" (ERROR) "class" (identifier) "class" (identifier) "AS_WaitForRspSuccess" (;) ";" (declaration) "friend class AS_WaitForUnsolSuccess;" (type_identifier) "friend" (ERROR) "class" (identifier) "class" (identifier) "AS_WaitForUnsolSuccess" (;) ";" (declaration) "friend class AS_WaitForSolUnsolSuccess;" (type_identifier) "friend" (ERROR) "class" (identifier) "class" (identifier) "AS_WaitForSolUnsolSuccess" (;) ";" (labeled_statement) "public:\n\n Slave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst());" (statement_identifier) "public" (:) ":" (declaration) "Slave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst());" (macro_type_specifier) "Slave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource*" (identifier) "Slave" (() "(" (ERROR) "Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*," (type_descriptor) "Logger*" (type_identifier) "Logger" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "IAppLayer*" (type_identifier) "IAppLayer" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "IExecutor*" (type_identifier) "IExecutor" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "ITimeManager*" (type_identifier) "ITimeManager" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "Database*" (type_identifier) "Database" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "ICommandHandler*" (type_identifier) "ICommandHandler" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "const SlaveConfig&, ITimeSource*" (type_qualifier) "const" (const) "const" (type_identifier) "SlaveConfig" (ERROR) "&, ITimeSource" (&) "&" (,) "," (identifier) "ITimeSource" (abstract_pointer_declarator) "*" (*) "*" ()) "" (init_declarator) "apTimeSource = TimeSource::Inst()" (identifier) "apTimeSource" (=) "=" (ERROR) "TimeSource::" (identifier) "TimeSource" (:) ":" (:) ":" (call_expression) "Inst()" (identifier) "Inst" (argument_list) "()" (() "(" ()) ")" (ERROR) ")" ()) ")" (;) ";" (expression_statement) "~Slave();" (unary_expression) "~Slave()" (~) "~" (call_expression) "Slave()" (identifier) "Slave" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "////////////////////////" (comment) "// External events" (comment) "////////////////////////" (comment) "/* Implement IAppUser - callbacks from the app layer */" (declaration) "void OnLowerLayerUp();" (primitive_type) "void" (function_declarator) "OnLowerLayerUp()" (identifier) "OnLowerLayerUp" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void OnLowerLayerDown();" (primitive_type) "void" (function_declarator) "OnLowerLayerDown()" (identifier) "OnLowerLayerDown" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void OnUnsolSendSuccess();" (primitive_type) "void" (function_declarator) "OnUnsolSendSuccess()" (identifier) "OnUnsolSendSuccess" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void OnSolSendSuccess();" (primitive_type) "void" (function_declarator) "OnSolSendSuccess()" (identifier) "OnSolSendSuccess" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void OnUnsolFailure();" (primitive_type) "void" (function_declarator) "OnUnsolFailure()" (identifier) "OnUnsolFailure" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void OnSolFailure();" (primitive_type) "void" (function_declarator) "OnSolFailure()" (identifier) "OnSolFailure" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Only have to override OnRequest since we're a slave" (declaration) "void OnRequest(const APDU&, SequenceInfo);" (primitive_type) "void" (function_declarator) "OnRequest(const APDU&, SequenceInfo)" (identifier) "OnRequest" (parameter_list) "(const APDU&, SequenceInfo)" (() "(" (parameter_declaration) "const APDU" (type_qualifier) "const" (const) "const" (type_identifier) "APDU" (ERROR) "&" (&) "&" (,) "," (parameter_declaration) "SequenceInfo" (type_identifier) "SequenceInfo" ()) ")" (;) ";" (declaration) "void OnUnknownObject();" (primitive_type) "void" (function_declarator) "OnUnknownObject()" (identifier) "OnUnknownObject" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n * Implements IAppUser::IsMaster().\n *\n * @return 'false' since this is a Slave (outstation)\n * implementation\n */" (function_definition) "bool IsMaster() {\n return false;\n }" (primitive_type) "bool" (function_declarator) "IsMaster()" (identifier) "IsMaster" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return false;\n }" ({) "{" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (comment) "/**\n * Returns the buffer that is used for data updates by the user\n * application. Writing new entries to this buffer will result in the\n * Slave doing things.\n *\n * @return a pointer to the buffer\n */" (function_definition) "IDataObserver* GetDataObserver() {\n return &mChangeBuffer;\n }" (type_identifier) "IDataObserver" (pointer_declarator) "* GetDataObserver()" (*) "*" (function_declarator) "GetDataObserver()" (identifier) "GetDataObserver" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return &mChangeBuffer;\n }" ({) "{" (return_statement) "return &mChangeBuffer;" (return) "return" (pointer_expression) "&mChangeBuffer" (&) "&" (identifier) "mChangeBuffer" (;) ";" (}) "}" (comment) "/**\n * Returns a pointer to the VTO reader object. This should only be\n * used by internal subsystems in the library. External user\n * applications should associate IVtoCallbacks objects using the\n * AsyncStackManager.\n *\n * @return a pointer to the VtoReader instance for this stack\n */" (function_definition) "VtoReader* GetVtoReader() {\n return &mVtoReader;\n }" (type_identifier) "VtoReader" (pointer_declarator) "* GetVtoReader()" (*) "*" (function_declarator) "GetVtoReader()" (identifier) "GetVtoReader" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return &mVtoReader;\n }" ({) "{" (return_statement) "return &mVtoReader;" (return) "return" (pointer_expression) "&mVtoReader" (&) "&" (identifier) "mVtoReader" (;) ";" (}) "}" (comment) "/**\n * Returns a pointer to the VtoWriter instance for this stack.\n * External user applications should use this hook to write new data\n * to the Master via the Slave (outstation).\n *\n * @return a pointer to the VtoWriter instance for this stack\n */" (function_definition) "IVtoWriter* GetVtoWriter() {\n return &mVtoWriter;\n }" (type_identifier) "IVtoWriter" (pointer_declarator) "* GetVtoWriter()" (*) "*" (function_declarator) "GetVtoWriter()" (identifier) "GetVtoWriter" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return &mVtoWriter;\n }" ({) "{" (return_statement) "return &mVtoWriter;" (return) "return" (pointer_expression) "&mVtoWriter" (&) "&" (identifier) "mVtoWriter" (;) ";" (}) "}" (labeled_statement) "private:\n\n ChangeBuffer mChangeBuffer;" (statement_identifier) "private" (:) ":" (declaration) "ChangeBuffer mChangeBuffer;" (type_identifier) "ChangeBuffer" (identifier) "mChangeBuffer" (;) ";" (comment) "// how client code gives us updates" (declaration) "IAppLayer* mpAppLayer;" (type_identifier) "IAppLayer" (pointer_declarator) "* mpAppLayer" (*) "*" (identifier) "mpAppLayer" (;) ";" (comment) "// lower application layer" (declaration) "Database* mpDatabase;" (type_identifier) "Database" (pointer_declarator) "* mpDatabase" (*) "*" (identifier) "mpDatabase" (;) ";" (comment) "// holds static data" (declaration) "ICommandHandler* mpCmdHandler;" (type_identifier) "ICommandHandler" (pointer_declarator) "* mpCmdHandler" (*) "*" (identifier) "mpCmdHandler" (;) ";" (comment) "// how commands are selected/operated on application code" (declaration) "int mSequence;" (primitive_type) "int" (identifier) "mSequence" (;) ";" (comment) "// control sequence" (declaration) "AS_Base* mpState;" (type_identifier) "AS_Base" (pointer_declarator) "* mpState" (*) "*" (identifier) "mpState" (;) ";" (comment) "// current state for the state pattern" (declaration) "SlaveConfig mConfig;" (type_identifier) "SlaveConfig" (identifier) "mConfig" (;) ";" (comment) "// houses the configurable paramters of the outstation" (declaration) "SlaveResponseTypes mRspTypes;" (type_identifier) "SlaveResponseTypes" (identifier) "mRspTypes" (;) ";" (comment) "// converts the group/var in the config to dnp singletons" (declaration) "ITimer* mpUnsolTimer;" (type_identifier) "ITimer" (pointer_declarator) "* mpUnsolTimer" (*) "*" (identifier) "mpUnsolTimer" (;) ";" (comment) "// timer for sending unsol responsess" (declaration) "INotifier* mpVtoNotifier;" (type_identifier) "INotifier" (pointer_declarator) "* mpVtoNotifier" (*) "*" (identifier) "mpVtoNotifier" (;) ";" (declaration) "IINField mIIN;" (type_identifier) "IINField" (identifier) "mIIN" (;) ";" (comment) "// IIN bits that persist between requests (i.e. NeedsTime/Restart/Etc)" (declaration) "IINField mRspIIN;" (type_identifier) "IINField" (identifier) "mRspIIN" (;) ";" (comment) "// Transient IIN bits that get merged before a response is issued" (declaration) "APDU mResponse;" (type_identifier) "APDU" (identifier) "mResponse" (;) ";" (comment) "// APDU used to form responses" (declaration) "APDU mRequest;" (type_identifier) "APDU" (identifier) "mRequest" (;) ";" (comment) "// APDU used to save Deferred requests" (declaration) "SequenceInfo mSeqInfo;" (type_identifier) "SequenceInfo" (identifier) "mSeqInfo" (;) ";" (declaration) "APDU mUnsol;" (type_identifier) "APDU" (identifier) "mUnsol" (;) ";" (comment) "// APDY used to form unsol respones" (declaration) "ResponseContext mRspContext;" (type_identifier) "ResponseContext" (identifier) "mRspContext" (;) ";" (comment) "// Used to track and construct response fragments" (declaration) "OutstationSBOHandler mSBOHandler;" (type_identifier) "OutstationSBOHandler" (identifier) "mSBOHandler" (;) ";" (comment) "// Tracks SBO requests, forwarding valid sequences to the application" (declaration) "bool mHaveLastRequest;" (primitive_type) "bool" (identifier) "mHaveLastRequest" (;) ";" (declaration) "APDU mLastRequest;" (type_identifier) "APDU" (identifier) "mLastRequest" (;) ";" (comment) "// APDU used to form responses" (declaration) "ITimeManager* mpTime;" (type_identifier) "ITimeManager" (pointer_declarator) "* mpTime" (*) "*" (identifier) "mpTime" (;) ";" (comment) "// Flags that tell us that some action has been Deferred" (comment) "// until the slave is in a state capable of handling it." (declaration) "bool mDeferredUpdate;" (primitive_type) "bool" (identifier) "mDeferredUpdate" (;) ";" (comment) "// Indicates that a data update has been Deferred" (declaration) "bool mDeferredRequest;" (primitive_type) "bool" (identifier) "mDeferredRequest" (;) ";" (comment) "// Indicates that a request has been Deferred" (declaration) "bool mDeferredUnsol;" (primitive_type) "bool" (identifier) "mDeferredUnsol" (;) ";" (comment) "// Indicates that the unsol timer expired, but the event was Deferred" (declaration) "bool mDeferredUnknown;" (primitive_type) "bool" (identifier) "mDeferredUnknown" (;) ";" (declaration) "bool mStartupNullUnsol;" (primitive_type) "bool" (identifier) "mStartupNullUnsol" (;) ";" (comment) "// Tracks whether the device has completed the NULL unsol startup message" (declaration) "StackState mState;" (type_identifier) "StackState" (identifier) "mState" (;) ";" (function_definition) "StackState GetState() {\n return mState;\n }" (type_identifier) "StackState" (function_declarator) "GetState()" (identifier) "GetState" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return mState;\n }" ({) "{" (return_statement) "return mState;" (return) "return" (identifier) "mState" (;) ";" (}) "}" (declaration) "void UpdateState(StackState aState);" (primitive_type) "void" (function_declarator) "UpdateState(StackState aState)" (identifier) "UpdateState" (parameter_list) "(StackState aState)" (() "(" (parameter_declaration) "StackState aState" (type_identifier) "StackState" (identifier) "aState" ()) ")" (;) ";" (declaration) "void OnVtoUpdate();" (primitive_type) "void" (function_declarator) "OnVtoUpdate()" (identifier) "OnVtoUpdate" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// internal event dispatched when user code commits an update to mVtoWriter" (declaration) "void OnDataUpdate();" (primitive_type) "void" (function_declarator) "OnDataUpdate()" (identifier) "OnDataUpdate" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// internal event dispatched when user code commits an update to mChangeBuffer" (declaration) "void OnUnsolTimerExpiration();" (primitive_type) "void" (function_declarator) "OnUnsolTimerExpiration()" (identifier) "OnUnsolTimerExpiration" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// internal event dispatched when the unsolicted pack/retry timer expires" (declaration) "void ConfigureAndSendSimpleResponse();" (primitive_type) "void" (function_declarator) "ConfigureAndSendSimpleResponse()" (identifier) "ConfigureAndSendSimpleResponse" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void Send(APDU&);" (primitive_type) "void" (function_declarator) "Send(APDU&)" (identifier) "Send" (parameter_list) "(APDU&)" (() "(" (parameter_declaration) "APDU" (type_identifier) "APDU" (ERROR) "&" (&) "&" ()) ")" (;) ";" (declaration) "void Send(APDU& arAPDU, const IINField& arIIN);" (primitive_type) "void" (function_declarator) "Send(APDU& arAPDU, const IINField& arIIN)" (identifier) "Send" (parameter_list) "(APDU& arAPDU, const IINField& arIIN)" (() "(" (parameter_declaration) "APDU& arAPDU" (type_identifier) "APDU" (ERROR) "&" (&) "&" (identifier) "arAPDU" (,) "," (parameter_declaration) "const IINField& arIIN" (type_qualifier) "const" (const) "const" (type_identifier) "IINField" (ERROR) "&" (&) "&" (identifier) "arIIN" ()) ")" (;) ";" (comment) "// overload with additional IIN data" (declaration) "void SendUnsolicited(APDU& arAPDU);" (primitive_type) "void" (function_declarator) "SendUnsolicited(APDU& arAPDU)" (identifier) "SendUnsolicited" (parameter_list) "(APDU& arAPDU)" (() "(" (parameter_declaration) "APDU& arAPDU" (type_identifier) "APDU" (ERROR) "&" (&) "&" (identifier) "arAPDU" ()) ")" (;) ";" (declaration) "void HandleWrite(const APDU& arRequest);" (primitive_type) "void" (function_declarator) "HandleWrite(const APDU& arRequest)" (identifier) "HandleWrite" (parameter_list) "(const APDU& arRequest)" (() "(" (parameter_declaration) "const APDU& arRequest" (type_qualifier) "const" (const) "const" (type_identifier) "APDU" (ERROR) "&" (&) "&" (identifier) "arRequest" ()) ")" (;) ";" (declaration) "void HandleVtoTransfer(const APDU& arRequest);" (primitive_type) "void" (function_declarator) "HandleVtoTransfer(const APDU& arRequest)" (identifier) "HandleVtoTransfer" (parameter_list) "(const APDU& arRequest)" (() "(" (parameter_declaration) "const APDU& arRequest" (type_qualifier) "const" (const) "const" (type_identifier) "APDU" (ERROR) "&" (&) "&" (identifier) "arRequest" ()) ")" (;) ";" (declaration) "void HandleWriteIIN(HeaderReadIterator& arHdr);" (primitive_type) "void" (function_declarator) "HandleWriteIIN(HeaderReadIterator& arHdr)" (identifier) "HandleWriteIIN" (parameter_list) "(HeaderReadIterator& arHdr)" (() "(" (parameter_declaration) "HeaderReadIterator& arHdr" (type_identifier) "HeaderReadIterator" (ERROR) "&" (&) "&" (identifier) "arHdr" ()) ")" (;) ";" (declaration) "void HandleWriteTimeDate(HeaderReadIterator& arHWI);" (primitive_type) "void" (function_declarator) "HandleWriteTimeDate(HeaderReadIterator& arHWI)" (identifier) "HandleWriteTimeDate" (parameter_list) "(HeaderReadIterator& arHWI)" (() "(" (parameter_declaration) "HeaderReadIterator& arHWI" (type_identifier) "HeaderReadIterator" (ERROR) "&" (&) "&" (identifier) "arHWI" ()) ")" (;) ";" (declaration) "void HandleWriteVto(HeaderReadIterator& arHdr);" (primitive_type) "void" (function_declarator) "HandleWriteVto(HeaderReadIterator& arHdr)" (identifier) "HandleWriteVto" (parameter_list) "(HeaderReadIterator& arHdr)" (() "(" (parameter_declaration) "HeaderReadIterator& arHdr" (type_identifier) "HeaderReadIterator" (ERROR) "&" (&) "&" (identifier) "arHdr" ()) ")" (;) ";" (declaration) "void HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo);" (primitive_type) "void" (function_declarator) "HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo)" (identifier) "HandleSelect" (parameter_list) "(const APDU& arRequest, SequenceInfo aSeqInfo)" (() "(" (parameter_declaration) "const APDU& arRequest" (type_qualifier) "const" (const) "const" (type_identifier) "APDU" (ERROR) "&" (&) "&" (identifier) "arRequest" (,) "," (parameter_declaration) "SequenceInfo aSeqInfo" (type_identifier) "SequenceInfo" (identifier) "aSeqInfo" ()) ")" (;) ";" (declaration) "void HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo);" (primitive_type) "void" (function_declarator) "HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo)" (identifier) "HandleOperate" (parameter_list) "(const APDU& arRequest, SequenceInfo aSeqInfo)" (() "(" (parameter_declaration) "const APDU& arRequest" (type_qualifier) "const" (const) "const" (type_identifier) "APDU" (ERROR) "&" (&) "&" (identifier) "arRequest" (,) "," (parameter_declaration) "SequenceInfo aSeqInfo" (type_identifier) "SequenceInfo" (identifier) "aSeqInfo" ()) ")" (;) ";" (declaration) "void HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo);" (primitive_type) "void" (function_declarator) "HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo)" (identifier) "HandleDirectOperate" (parameter_list) "(const APDU& arRequest, SequenceInfo aSeqInfo)" (() "(" (parameter_declaration) "const APDU& arRequest" (type_qualifier) "const" (const) "const" (type_identifier) "APDU" (ERROR) "&" (&) "&" (identifier) "arRequest" (,) "," (parameter_declaration) "SequenceInfo aSeqInfo" (type_identifier) "SequenceInfo" (identifier) "aSeqInfo" ()) ")" (;) ";" (declaration) "void HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable);" (primitive_type) "void" (function_declarator) "HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable)" (identifier) "HandleEnableUnsolicited" (parameter_list) "(const APDU& arRequest, bool aIsEnable)" (() "(" (parameter_declaration) "const APDU& arRequest" (type_qualifier) "const" (const) "const" (type_identifier) "APDU" (ERROR) "&" (&) "&" (identifier) "arRequest" (,) "," (parameter_declaration) "bool aIsEnable" (primitive_type) "bool" (identifier) "aIsEnable" ()) ")" (;) ";" (declaration) "void HandleUnknown();" (primitive_type) "void" (function_declarator) "HandleUnknown()" (identifier) "HandleUnknown" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void ConfigureDelayMeasurement(const APDU& arRequest);" (primitive_type) "void" (function_declarator) "ConfigureDelayMeasurement(const APDU& arRequest)" (identifier) "ConfigureDelayMeasurement" (parameter_list) "(const APDU& arRequest)" (() "(" (parameter_declaration) "const APDU& arRequest" (type_qualifier) "const" (const) "const" (type_identifier) "APDU" (ERROR) "&" (&) "&" (identifier) "arRequest" ()) ")" (;) ";" (declaration) "void CreateResponseContext(const APDU& arRequest);" (primitive_type) "void" (function_declarator) "CreateResponseContext(const APDU& arRequest)" (identifier) "CreateResponseContext" (parameter_list) "(const APDU& arRequest)" (() "(" (parameter_declaration) "const APDU& arRequest" (type_qualifier) "const" (const) "const" (type_identifier) "APDU" (ERROR) "&" (&) "&" (identifier) "arRequest" ()) ")" (;) ";" (comment) "// Helpers" (declaration) "size_t FlushVtoUpdates();" (primitive_type) "size_t" (function_declarator) "FlushVtoUpdates()" (identifier) "FlushVtoUpdates" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "size_t FlushUpdates();" (primitive_type) "size_t" (function_declarator) "FlushUpdates()" (identifier) "FlushUpdates" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void FlushDeferredEvents();" (primitive_type) "void" (function_declarator) "FlushDeferredEvents()" (identifier) "FlushDeferredEvents" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void StartUnsolTimer(millis_t aTimeout);" (primitive_type) "void" (function_declarator) "StartUnsolTimer(millis_t aTimeout)" (identifier) "StartUnsolTimer" (parameter_list) "(millis_t aTimeout)" (() "(" (parameter_declaration) "millis_t aTimeout" (type_identifier) "millis_t" (identifier) "aTimeout" ()) ")" (;) ";" (comment) "// Task handlers" (declaration) "void ResetTimeIIN();" (primitive_type) "void" (function_declarator) "ResetTimeIIN()" (identifier) "ResetTimeIIN" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "ITimer* mpTimeTimer;" (type_identifier) "ITimer" (pointer_declarator) "* mpTimeTimer" (*) "*" (identifier) "mpTimeTimer" (;) ";" (comment) "/**\n * The VtoReader instance for this stack which will direct received\n * VTO data to the user application. The user application should\n * register an IVtoCallbacks instance for the desired virtual channel\n * id(s) using AsyncStackManager::AddVtoChannel().\n */" (declaration) "VtoReader mVtoReader;" (type_identifier) "VtoReader" (identifier) "mVtoReader" (;) ";" (comment) "/**\n * The VtoWriter instance for this stack which will buffer new data\n * from the user application to the DNP3 stream. This handler is\n * thread-safe.\n */" (declaration) "VtoWriter mVtoWriter;" (type_identifier) "VtoWriter" (identifier) "mVtoWriter" (;) ";" (comment) "/**\n * A structure to provide the C++ equivalent of templated typedefs.\n */" (ERROR) "template <class T>\n struct CommandFunc" (binary_expression) "template <class T>\n struct" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "struct" (identifier) "CommandFunc" (compound_statement) "{\n typedef std::function<CommandStatus (T&, size_t)> Type;\n }" ({) "{" (type_definition) "typedef std::function<CommandStatus (T&, size_t)> Type;" (typedef) "typedef" (type_identifier) "std" (ERROR) "::function<CommandStatus (T&, size_t)>" (:) ":" (:) ":" (type_identifier) "function" (<) "<" (function_declarator) "CommandStatus (T&, size_t)" (type_identifier) "CommandStatus" (parameter_list) "(T&, size_t)" (() "(" (parameter_declaration) "T" (type_identifier) "T" (ERROR) "&" (&) "&" (,) "," (parameter_declaration) "size_t" (primitive_type) "size_t" ()) ")" (>) ">" (type_identifier) "Type" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "/**\n * Forms a response message to a list of command objects.\n * Slave::mResponse is used as a destination buffer.\n *\n * @param apObj DNP3 object capable of reading/writing its own\n * type from/to a byte stream\n * @param arIter an ObjectReadIterator that provides access to the\n * DNP3 objects\n * @param aFunc Function for issuing/selecting\n */" (expression_statement) "template <class T>\n void" (binary_expression) "template <class T>\n void" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "void" (;) "" (ERROR) "RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::" (comma_expression) "RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std" (binary_expression) "RespondToCommands(const StreamObject<T>* apObj" (binary_expression) "RespondToCommands(const StreamObject<T" (identifier) "RespondToCommands" (ERROR) "(const StreamObject" (() "(" (type_descriptor) "const StreamObject" (type_qualifier) "const" (const) "const" (type_identifier) "StreamObject" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "* apObj" (*) "*" (identifier) "apObj" (,) "," (comma_expression) "ObjectReadIterator& arIter, std" (binary_expression) "ObjectReadIterator& arIter" (identifier) "ObjectReadIterator" (&) "&" (identifier) "arIter" (,) "," (identifier) "std" (:) ":" (:) ":" (expression_statement) "function<CommandStatus (T, size_t)> CommandHandler);" (binary_expression) "function<CommandStatus (T, size_t)> CommandHandler" (binary_expression) "function<CommandStatus (T, size_t)" (identifier) "function" (<) "<" (call_expression) "CommandStatus (T, size_t)" (identifier) "CommandStatus" (argument_list) "(T, size_t)" (() "(" (identifier) "T" (,) "," (identifier) "size_t" ()) ")" (>) ">" (identifier) "CommandHandler" (ERROR) ")" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (expression_statement) "template<class T>\nvoid" (binary_expression) "template<class T>\nvoid" (binary_expression) "template<class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "void" (;) "" (labeled_statement) "Slave::RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler)\n{\n IndexedWriteIterator i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier());\n size_t count = 1;\n while (!arIter.IsEnd()) {\n T val = apObj->Read(*arIter);\n size_t index = arIter->Index();\n if (count > mConfig.mMaxControls) {\n val.mStatus = CS_TOO_MANY_OPS;\n }\n else {\n val.mStatus = CommandHandler(val, index);\n if(val.mStatus == CS_NOT_SUPPORTED) {\n this->mRspIIN.SetParameterError(true);\n }\n }\n i.SetIndex(index);\n apObj->Write(*i, val);\n ++i;\n ++arIter;\n ++count;\n }\n}" (statement_identifier) "Slave" (ERROR) "::RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std:" (:) ":" (:) ":" (comma_expression) "RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std" (binary_expression) "RespondToCommands(const StreamObject<T>* apObj" (binary_expression) "RespondToCommands(const StreamObject<T" (identifier) "RespondToCommands" (ERROR) "(const StreamObject" (() "(" (type_descriptor) "const StreamObject" (type_qualifier) "const" (const) "const" (type_identifier) "StreamObject" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "* apObj" (*) "*" (identifier) "apObj" (,) "," (comma_expression) "ObjectReadIterator& arIter, std" (binary_expression) "ObjectReadIterator& arIter" (identifier) "ObjectReadIterator" (&) "&" (identifier) "arIter" (,) "," (identifier) "std" (:) ":" (:) ":" (ERROR) "function<CommandStatus (T, size_t)> CommandHandler)" (binary_expression) "function<CommandStatus (T, size_t)> CommandHandler" (binary_expression) "function<CommandStatus (T, size_t)" (identifier) "function" (<) "<" (call_expression) "CommandStatus (T, size_t)" (identifier) "CommandStatus" (argument_list) "(T, size_t)" (() "(" (identifier) "T" (,) "," (identifier) "size_t" ()) ")" (>) ">" (identifier) "CommandHandler" ()) ")" (compound_statement) "{\n IndexedWriteIterator i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier());\n size_t count = 1;\n while (!arIter.IsEnd()) {\n T val = apObj->Read(*arIter);\n size_t index = arIter->Index();\n if (count > mConfig.mMaxControls) {\n val.mStatus = CS_TOO_MANY_OPS;\n }\n else {\n val.mStatus = CommandHandler(val, index);\n if(val.mStatus == CS_NOT_SUPPORTED) {\n this->mRspIIN.SetParameterError(true);\n }\n }\n i.SetIndex(index);\n apObj->Write(*i, val);\n ++i;\n ++arIter;\n ++count;\n }\n}" ({) "{" (declaration) "IndexedWriteIterator i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier());" (type_identifier) "IndexedWriteIterator" (init_declarator) "i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier())" (identifier) "i" (=) "=" (call_expression) "mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier())" (field_expression) "mResponse.WriteIndexed" (identifier) "mResponse" (.) "." (field_identifier) "WriteIndexed" (argument_list) "(apObj, arIter.Count(), arIter.Header().GetQualifier())" (() "(" (identifier) "apObj" (,) "," (call_expression) "arIter.Count()" (field_expression) "arIter.Count" (identifier) "arIter" (.) "." (field_identifier) "Count" (argument_list) "()" (() "(" ()) ")" (,) "," (call_expression) "arIter.Header().GetQualifier()" (field_expression) "arIter.Header().GetQualifier" (call_expression) "arIter.Header()" (field_expression) "arIter.Header" (identifier) "arIter" (.) "." (field_identifier) "Header" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "GetQualifier" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (declaration) "size_t count = 1;" (primitive_type) "size_t" (init_declarator) "count = 1" (identifier) "count" (=) "=" (number_literal) "1" (;) ";" (while_statement) "while (!arIter.IsEnd()) {\n T val = apObj->Read(*arIter);\n size_t index = arIter->Index();\n if (count > mConfig.mMaxControls) {\n val.mStatus = CS_TOO_MANY_OPS;\n }\n else {\n val.mStatus = CommandHandler(val, index);\n if(val.mStatus == CS_NOT_SUPPORTED) {\n this->mRspIIN.SetParameterError(true);\n }\n }\n i.SetIndex(index);\n apObj->Write(*i, val);\n ++i;\n ++arIter;\n ++count;\n }" (while) "while" (parenthesized_expression) "(!arIter.IsEnd())" (() "(" (unary_expression) "!arIter.IsEnd()" (!) "!" (call_expression) "arIter.IsEnd()" (field_expression) "arIter.IsEnd" (identifier) "arIter" (.) "." (field_identifier) "IsEnd" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n T val = apObj->Read(*arIter);\n size_t index = arIter->Index();\n if (count > mConfig.mMaxControls) {\n val.mStatus = CS_TOO_MANY_OPS;\n }\n else {\n val.mStatus = CommandHandler(val, index);\n if(val.mStatus == CS_NOT_SUPPORTED) {\n this->mRspIIN.SetParameterError(true);\n }\n }\n i.SetIndex(index);\n apObj->Write(*i, val);\n ++i;\n ++arIter;\n ++count;\n }" ({) "{" (declaration) "T val = apObj->Read(*arIter);" (type_identifier) "T" (init_declarator) "val = apObj->Read(*arIter)" (identifier) "val" (=) "=" (call_expression) "apObj->Read(*arIter)" (field_expression) "apObj->Read" (identifier) "apObj" (->) "->" (field_identifier) "Read" (argument_list) "(*arIter)" (() "(" (pointer_expression) "*arIter" (*) "*" (identifier) "arIter" ()) ")" (;) ";" (declaration) "size_t index = arIter->Index();" (primitive_type) "size_t" (init_declarator) "index = arIter->Index()" (identifier) "index" (=) "=" (call_expression) "arIter->Index()" (field_expression) "arIter->Index" (identifier) "arIter" (->) "->" (field_identifier) "Index" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (count > mConfig.mMaxControls) {\n val.mStatus = CS_TOO_MANY_OPS;\n }\n else {\n val.mStatus = CommandHandler(val, index);\n if(val.mStatus == CS_NOT_SUPPORTED) {\n this->mRspIIN.SetParameterError(true);\n }\n }" (if) "if" (parenthesized_expression) "(count > mConfig.mMaxControls)" (() "(" (binary_expression) "count > mConfig.mMaxControls" (identifier) "count" (>) ">" (field_expression) "mConfig.mMaxControls" (identifier) "mConfig" (.) "." (field_identifier) "mMaxControls" ()) ")" (compound_statement) "{\n val.mStatus = CS_TOO_MANY_OPS;\n }" ({) "{" (expression_statement) "val.mStatus = CS_TOO_MANY_OPS;" (assignment_expression) "val.mStatus = CS_TOO_MANY_OPS" (field_expression) "val.mStatus" (identifier) "val" (.) "." (field_identifier) "mStatus" (=) "=" (identifier) "CS_TOO_MANY_OPS" (;) ";" (}) "}" (else_clause) "else {\n val.mStatus = CommandHandler(val, index);\n if(val.mStatus == CS_NOT_SUPPORTED) {\n this->mRspIIN.SetParameterError(true);\n }\n }" (else) "else" (compound_statement) "{\n val.mStatus = CommandHandler(val, index);\n if(val.mStatus == CS_NOT_SUPPORTED) {\n this->mRspIIN.SetParameterError(true);\n }\n }" ({) "{" (expression_statement) "val.mStatus = CommandHandler(val, index);" (assignment_expression) "val.mStatus = CommandHandler(val, index)" (field_expression) "val.mStatus" (identifier) "val" (.) "." (field_identifier) "mStatus" (=) "=" (call_expression) "CommandHandler(val, index)" (identifier) "CommandHandler" (argument_list) "(val, index)" (() "(" (identifier) "val" (,) "," (identifier) "index" ()) ")" (;) ";" (if_statement) "if(val.mStatus == CS_NOT_SUPPORTED) {\n this->mRspIIN.SetParameterError(true);\n }" (if) "if" (parenthesized_expression) "(val.mStatus == CS_NOT_SUPPORTED)" (() "(" (binary_expression) "val.mStatus == CS_NOT_SUPPORTED" (field_expression) "val.mStatus" (identifier) "val" (.) "." (field_identifier) "mStatus" (==) "==" (identifier) "CS_NOT_SUPPORTED" ()) ")" (compound_statement) "{\n this->mRspIIN.SetParameterError(true);\n }" ({) "{" (expression_statement) "this->mRspIIN.SetParameterError(true);" (call_expression) "this->mRspIIN.SetParameterError(true)" (field_expression) "this->mRspIIN.SetParameterError" (field_expression) "this->mRspIIN" (identifier) "this" (->) "->" (field_identifier) "mRspIIN" (.) "." (field_identifier) "SetParameterError" (argument_list) "(true)" (() "(" (true) "true" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) "i.SetIndex(index);" (call_expression) "i.SetIndex(index)" (field_expression) "i.SetIndex" (identifier) "i" (.) "." (field_identifier) "SetIndex" (argument_list) "(index)" (() "(" (identifier) "index" ()) ")" (;) ";" (expression_statement) "apObj->Write(*i, val);" (call_expression) "apObj->Write(*i, val)" (field_expression) "apObj->Write" (identifier) "apObj" (->) "->" (field_identifier) "Write" (argument_list) "(*i, val)" (() "(" (pointer_expression) "*i" (*) "*" (identifier) "i" (,) "," (identifier) "val" ()) ")" (;) ";" (expression_statement) "++i;" (update_expression) "++i" (++) "++" (identifier) "i" (;) ";" (expression_statement) "++arIter;" (update_expression) "++arIter" (++) "++" (identifier) "arIter" (;) ";" (expression_statement) "++count;" (update_expression) "++count" (++) "++" (identifier) "count" (;) ";" (}) "}" (}) "}" (ERROR) "}" (}) "}" (comment) "/* vim: set ts=4 sw=4: */" (#endif) "#endif"
1,314
41
{"language": "c", "success": true, "metadata": {"lines": 259, "avg_line_length": 37.32, "nodes": 762, "errors": 0, "source_hash": "3f0cca24f667cbbbc809afc45868025f3e6d58a8123c0ee8d7a93afb47dd2ebf", "categorized_nodes": 555}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __SLAVE_H_\n#define __SLAVE_H_\n\n#include <opendnp3/ICommandHandler.h>\n#include <opendnp3/Logger.h>\n#include <opendnp3/SlaveConfig.h>\n#include <opendnp3/Visibility.h>\n\n#include \"StackBase.h\"\n#include \"ChangeBuffer.h\"\n#include \"Loggable.h\"\n#include \"TimeSource.h\"\n#include \"LoggableMacros.h\"\n#include \"ITimer.h\"\n#include \"APDU.h\"\n#include \"AppInterfaces.h\"\n#include \"EventBuffers.h\"\n#include \"ObjectReadIterator.h\"\n#include \"ResponseContext.h\"\n#include \"SlaveEventBuffer.h\"\n#include \"SlaveResponseTypes.h\"\n#include \"VtoReader.h\"\n#include \"VtoWriter.h\"\n#include \"OutstationSBOHandler.h\"\n\n\nnamespace opendnp3\n{\n\nclass IExecutor;\nclass AS_Base;\n\n/**\n * @section desc DNP3 outstation.\n *\n * Manages a state machine that handles events from the user layer and the\n * application layer to provide DNP outstation services.\n *\n * ResponseContext and SlaveEventBuffer objects manage data/event responses to\n * master requests, and the IDNPCommandMaster implementation verifies\n * control/setpoint behavior and passes valid commands to the user code.\n *\n * SlaveConfig structure represents the slave behavioral configuration, the\n * Database is in charge of the data model itself.\n *\n * Global IIN state is maintained and combined with request-specific\n * information to form response IINs.\n *\n * The Slave is responsible for building all aspects of APDU packet responses\n * except for the application sequence number.\n */\nclass DLL_LOCAL Slave : public Loggable, public IAppUser, public StackBase\n{\n\n\tfriend class AS_Base; //make the state base class a friend\n\tfriend class AS_OpenBase;\n\tfriend class AS_Closed;\n\tfriend class AS_Idle;\n\tfriend class AS_WaitForRspSuccess;\n\tfriend class AS_WaitForUnsolSuccess;\n\tfriend class AS_WaitForSolUnsolSuccess;\n\npublic:\n\n\tSlave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst());\n\t~Slave();\n\n\t////////////////////////\n\t// External events\n\t////////////////////////\n\n\t/* Implement IAppUser - callbacks from the app layer */\n\tvoid OnLowerLayerUp();\n\tvoid OnLowerLayerDown();\n\n\tvoid OnUnsolSendSuccess();\n\tvoid OnSolSendSuccess();\n\n\tvoid OnUnsolFailure();\n\tvoid OnSolFailure();\n\n\t// Only have to override OnRequest since we're a slave\n\tvoid OnRequest(const APDU&, SequenceInfo);\n\tvoid OnUnknownObject();\n\n\t/**\n\t * Implements IAppUser::IsMaster().\n\t *\n\t * @return\t\t\t'false' since this is a Slave (outstation)\n\t *\t\t\t\t\timplementation\n\t */\n\tbool IsMaster() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Returns the buffer that is used for data updates by the user\n\t * application. Writing new entries to this buffer will result in the\n\t * Slave doing things.\n\t *\n\t * @return\t\t\ta pointer to the buffer\n\t */\n\tIDataObserver* GetDataObserver() {\n\t\treturn &mChangeBuffer;\n\t}\n\n\t/**\n\t * Returns a pointer to the VTO reader object. This should only be\n\t * used by internal subsystems in the library. External user\n\t * applications should associate IVtoCallbacks objects using the\n\t * AsyncStackManager.\n\t *\n\t * @return\t\t\ta pointer to the VtoReader instance for this stack\n\t */\n\tVtoReader* GetVtoReader() {\n\t\treturn &mVtoReader;\n\t}\n\n\t/**\n\t * Returns a pointer to the VtoWriter instance for this stack.\n\t * External user applications should use this hook to write new data\n\t * to the Master via the Slave (outstation).\n\t *\n\t * @return\t\t\ta pointer to the VtoWriter instance for this stack\n\t */\n\tIVtoWriter* GetVtoWriter() {\n\t\treturn &mVtoWriter;\n\t}\n\nprivate:\n\n\tChangeBuffer mChangeBuffer;\t\t\t\t// how client code gives us updates\n\tIAppLayer* mpAppLayer;\t\t\t\t\t// lower application layer\n\tDatabase* mpDatabase;\t\t\t\t\t// holds static data\n\tICommandHandler* mpCmdHandler;\t\t\t// how commands are selected/operated on application code\n\tint mSequence;\t\t\t\t\t\t\t// control sequence\n\tAS_Base* mpState;\t\t\t\t\t\t// current state for the state pattern\n\tSlaveConfig mConfig;\t\t\t\t\t// houses the configurable paramters of the outstation\n\tSlaveResponseTypes mRspTypes;\t\t\t// converts the group/var in the config to dnp singletons\n\n\tITimer* mpUnsolTimer;\t\t\t\t\t// timer for sending unsol responsess\n\n\tINotifier* mpVtoNotifier;\n\n\tIINField mIIN;\t\t\t\t\t\t\t// IIN bits that persist between requests (i.e. NeedsTime/Restart/Etc)\n\tIINField mRspIIN;\t\t\t\t\t\t// Transient IIN bits that get merged before a response is issued\n\tAPDU mResponse;\t\t\t\t\t\t\t// APDU used to form responses\n\tAPDU mRequest;\t\t\t\t\t\t\t// APDU used to save Deferred requests\n\tSequenceInfo mSeqInfo;\n\tAPDU mUnsol;\t\t\t\t\t\t\t// APDY used to form unsol respones\n\tResponseContext mRspContext;\t\t\t// Used to track and construct response fragments\n\tOutstationSBOHandler mSBOHandler; // Tracks SBO requests, forwarding valid sequences to the application\n\n\tbool mHaveLastRequest;\n\tAPDU mLastRequest;\t\t\t\t\t\t// APDU used to form responses\n\n\tITimeManager* mpTime;\n\n\t// Flags that tell us that some action has been Deferred\n\t// until the slave is in a state capable of handling it.\n\n\tbool mDeferredUpdate;\t\t\t\t\t// Indicates that a data update has been Deferred\n\tbool mDeferredRequest;\t\t\t\t\t// Indicates that a request has been Deferred\n\tbool mDeferredUnsol;\t\t\t\t\t// Indicates that the unsol timer expired, but the event was Deferred\n\tbool mDeferredUnknown;\n\n\tbool mStartupNullUnsol;\t\t\t\t\t// Tracks whether the device has completed the NULL unsol startup message\n\n\tStackState mState;\n\n\tStackState GetState() {\n\t\treturn mState;\n\t}\n\n\tvoid UpdateState(StackState aState);\n\n\tvoid OnVtoUpdate();\t\t\t\t\t\t// internal event dispatched when user code commits an update to mVtoWriter\n\tvoid OnDataUpdate();\t\t\t\t\t// internal event dispatched when user code commits an update to mChangeBuffer\n\tvoid OnUnsolTimerExpiration();\t\t\t// internal event dispatched when the unsolicted pack/retry timer expires\n\n\tvoid ConfigureAndSendSimpleResponse();\n\tvoid Send(APDU&);\n\tvoid Send(APDU& arAPDU, const IINField& arIIN); // overload with additional IIN data\n\tvoid SendUnsolicited(APDU& arAPDU);\n\n\tvoid HandleWrite(const APDU& arRequest);\n\tvoid HandleVtoTransfer(const APDU& arRequest);\n\tvoid HandleWriteIIN(HeaderReadIterator& arHdr);\n\tvoid HandleWriteTimeDate(HeaderReadIterator& arHWI);\n\tvoid HandleWriteVto(HeaderReadIterator& arHdr);\n\tvoid HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo);\n\tvoid HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n\tvoid HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n\tvoid HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable);\n\tvoid HandleUnknown();\n\n\tvoid ConfigureDelayMeasurement(const APDU& arRequest);\n\tvoid CreateResponseContext(const APDU& arRequest);\n\n\t// Helpers\n\n\tsize_t FlushVtoUpdates();\n\tsize_t FlushUpdates();\n\tvoid FlushDeferredEvents();\n\tvoid StartUnsolTimer(millis_t aTimeout);\n\n\t// Task handlers\n\n\tvoid ResetTimeIIN();\n\tITimer* mpTimeTimer;\n\n\t/**\n\t * The VtoReader instance for this stack which will direct received\n\t * VTO data to the user application. The user application should\n\t * register an IVtoCallbacks instance for the desired virtual channel\n\t * id(s) using AsyncStackManager::AddVtoChannel().\n\t */\n\tVtoReader mVtoReader;\n\n\t/**\n\t * The VtoWriter instance for this stack which will buffer new data\n\t * from the user application to the DNP3 stream. This handler is\n\t * thread-safe.\n\t */\n\tVtoWriter mVtoWriter;\n\n\t/**\n\t * A structure to provide the C++ equivalent of templated typedefs.\n\t */\n\ttemplate <class T>\n\tstruct CommandFunc {\n\t\ttypedef std::function<CommandStatus (T&, size_t)> Type;\n\t};\n\n\t/**\n\t * Forms a response message to a list of command objects.\n\t * Slave::mResponse is used as a destination buffer.\n\t *\n\t * @param apObj\t\t\tDNP3 object capable of reading/writing its own\n\t * \t\t\t\t\t\ttype from/to a byte stream\n\t * @param arIter\t\tan ObjectReadIterator that provides access to the\n\t * \t\t\t\t\t\tDNP3 objects\n\t * @param aFunc\t\t\tFunction for issuing/selecting\n\t */\n\ttemplate <class T>\n\tvoid RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler);\n};\n\ntemplate<class T>\nvoid Slave::RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler)\n{\n\tIndexedWriteIterator i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier());\n\tsize_t count = 1;\n\twhile (!arIter.IsEnd()) {\n\t\tT val = apObj->Read(*arIter);\n\t\tsize_t index = arIter->Index();\n\t\tif (count > mConfig.mMaxControls) {\n\t\t\tval.mStatus = CS_TOO_MANY_OPS;\n\t\t}\n\t\telse {\n\t\t\tval.mStatus = CommandHandler(val, index);\n\t\t\tif(val.mStatus == CS_NOT_SUPPORTED) {\n\t\t\t\tthis->mRspIIN.SetParameterError(true);\n\t\t\t}\n\t\t}\n\t\ti.SetIndex(index);\n\t\tapObj->Write(*i, val);\n\t\t++i;\n\t\t++arIter;\n\t\t++count;\n\t}\n}\n\n}\n\n/* vim: set ts=4 sw=4: */\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 601, 761], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 305, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 2, "type": "identifier", "text": "__SLAVE_H_", "parent": 0, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 18}}, {"id": 3, "type": "preproc_def", "text": "#define __SLAVE_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 5, "type": "identifier", "text": "__SLAVE_H_", "parent": 3, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <opendnp3/ICommandHandler.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<opendnp3/ICommandHandler.h>", "parent": 6, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 37}}, {"id": 9, "type": "preproc_include", "text": "#include <opendnp3/Logger.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<opendnp3/Logger.h>", "parent": 9, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 28}}, {"id": 12, "type": "preproc_include", "text": "#include <opendnp3/SlaveConfig.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<opendnp3/SlaveConfig.h>", "parent": 12, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 33}}, {"id": 15, "type": "preproc_include", "text": "#include <opendnp3/Visibility.h>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<opendnp3/Visibility.h>", "parent": 15, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 32}}, {"id": 18, "type": "preproc_include", "text": "#include \"StackBase.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"StackBase.h\"", "parent": 18, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 22}}, {"id": 21, "type": "preproc_include", "text": "#include \"ChangeBuffer.h\"\n", "parent": 0, "children": [22, 23], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"ChangeBuffer.h\"", "parent": 21, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 25}}, {"id": 24, "type": "preproc_include", "text": "#include \"Loggable.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"Loggable.h\"", "parent": 24, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 21}}, {"id": 27, "type": "preproc_include", "text": "#include \"TimeSource.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"TimeSource.h\"", "parent": 27, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 23}}, {"id": 30, "type": "preproc_include", "text": "#include \"LoggableMacros.h\"\n", "parent": 0, "children": [31, 32], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"LoggableMacros.h\"", "parent": 30, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 27}}, {"id": 33, "type": "preproc_include", "text": "#include \"ITimer.h\"\n", "parent": 0, "children": [34, 35], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"ITimer.h\"", "parent": 33, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 19}}, {"id": 36, "type": "preproc_include", "text": "#include \"APDU.h\"\n", "parent": 0, "children": [37, 38], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"APDU.h\"", "parent": 36, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 17}}, {"id": 39, "type": "preproc_include", "text": "#include \"AppInterfaces.h\"\n", "parent": 0, "children": [40, 41], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 8}}, {"id": 41, "type": "string_literal", "text": "\"AppInterfaces.h\"", "parent": 39, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 26}}, {"id": 42, "type": "preproc_include", "text": "#include \"EventBuffers.h\"\n", "parent": 0, "children": [43, 44], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 8}}, {"id": 44, "type": "string_literal", "text": "\"EventBuffers.h\"", "parent": 42, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 25}}, {"id": 45, "type": "preproc_include", "text": "#include \"ObjectReadIterator.h\"\n", "parent": 0, "children": [46, 47], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 46, "column": 0}}, {"id": 46, "type": "#include", "text": "#include", "parent": 45, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 8}}, {"id": 47, "type": "string_literal", "text": "\"ObjectReadIterator.h\"", "parent": 45, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 31}}, {"id": 48, "type": "preproc_include", "text": "#include \"ResponseContext.h\"\n", "parent": 0, "children": [49, 50], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 0}}, {"id": 49, "type": "#include", "text": "#include", "parent": 48, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 8}}, {"id": 50, "type": "string_literal", "text": "\"ResponseContext.h\"", "parent": 48, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 28}}, {"id": 51, "type": "preproc_include", "text": "#include \"SlaveEventBuffer.h\"\n", "parent": 0, "children": [52, 53], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 48, "column": 0}}, {"id": 52, "type": "#include", "text": "#include", "parent": 51, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 8}}, {"id": 53, "type": "string_literal", "text": "\"SlaveEventBuffer.h\"", "parent": 51, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 29}}, {"id": 54, "type": "preproc_include", "text": "#include \"SlaveResponseTypes.h\"\n", "parent": 0, "children": [55, 56], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 0}}, {"id": 55, "type": "#include", "text": "#include", "parent": 54, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 8}}, {"id": 56, "type": "string_literal", "text": "\"SlaveResponseTypes.h\"", "parent": 54, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 31}}, {"id": 57, "type": "preproc_include", "text": "#include \"VtoReader.h\"\n", "parent": 0, "children": [58, 59], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 50, "column": 0}}, {"id": 58, "type": "#include", "text": "#include", "parent": 57, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 8}}, {"id": 59, "type": "string_literal", "text": "\"VtoReader.h\"", "parent": 57, "children": [], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 22}}, {"id": 60, "type": "preproc_include", "text": "#include \"VtoWriter.h\"\n", "parent": 0, "children": [61, 62], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 0}}, {"id": 61, "type": "#include", "text": "#include", "parent": 60, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 8}}, {"id": 62, "type": "string_literal", "text": "\"VtoWriter.h\"", "parent": 60, "children": [], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 22}}, {"id": 63, "type": "preproc_include", "text": "#include \"OutstationSBOHandler.h\"\n", "parent": 0, "children": [64, 65], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 52, "column": 0}}, {"id": 64, "type": "#include", "text": "#include", "parent": 63, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 8}}, {"id": 65, "type": "string_literal", "text": "\"OutstationSBOHandler.h\"", "parent": 63, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 33}}, {"id": 66, "type": "function_definition", "text": "namespace opendnp3\n{\n\nclass IExecutor;\nclass AS_Base;\n\n/**\n * @section desc DNP3 outstation.\n *\n * Manages a state machine that handles events from the user layer and the\n * application layer to provide DNP outstation services.\n *\n * ResponseContext and SlaveEventBuffer objects manage data/event responses to\n * master requests, and the IDNPCommandMaster implementation verifies\n * control/setpoint behavior and passes valid commands to the user code.\n *\n * SlaveConfig structure represents the slave behavioral configuration, the\n * Database is in charge of the data model itself.\n *\n * Global IIN state is maintained and combined with request-specific\n * information to form response IINs.\n *\n * The Slave is responsible for building all aspects of APDU packet responses\n * except for the application sequence number.\n */\nclass DLL_LOCAL Slave : public Loggable, public IAppUser, public StackBase\n{\n\n\tfriend class AS_Base; //make the state base class a friend\n\tfriend class AS_OpenBase;\n\tfriend class AS_Closed;\n\tfriend class AS_Idle;\n\tfriend class AS_WaitForRspSuccess;\n\tfriend class AS_WaitForUnsolSuccess;\n\tfriend class AS_WaitForSolUnsolSuccess;\n\npublic:\n\n\tSlave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst());\n\t~Slave();\n\n\t////////////////////////\n\t// External events\n\t////////////////////////\n\n\t/* Implement IAppUser - callbacks from the app layer */\n\tvoid OnLowerLayerUp();\n\tvoid OnLowerLayerDown();\n\n\tvoid OnUnsolSendSuccess();\n\tvoid OnSolSendSuccess();\n\n\tvoid OnUnsolFailure();\n\tvoid OnSolFailure();\n\n\t// Only have to override OnRequest since we're a slave\n\tvoid OnRequest(const APDU&, SequenceInfo);\n\tvoid OnUnknownObject();\n\n\t/**\n\t * Implements IAppUser::IsMaster().\n\t *\n\t * @return\t\t\t'false' since this is a Slave (outstation)\n\t *\t\t\t\t\timplementation\n\t */\n\tbool IsMaster() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Returns the buffer that is used for data updates by the user\n\t * application. Writing new entries to this buffer will result in the\n\t * Slave doing things.\n\t *\n\t * @return\t\t\ta pointer to the buffer\n\t */\n\tIDataObserver* GetDataObserver() {\n\t\treturn &mChangeBuffer;\n\t}\n\n\t/**\n\t * Returns a pointer to the VTO reader object. This should only be\n\t * used by internal subsystems in the library. External user\n\t * applications should associate IVtoCallbacks objects using the\n\t * AsyncStackManager.\n\t *\n\t * @return\t\t\ta pointer to the VtoReader instance for this stack\n\t */\n\tVtoReader* GetVtoReader() {\n\t\treturn &mVtoReader;\n\t}\n\n\t/**\n\t * Returns a pointer to the VtoWriter instance for this stack.\n\t * External user applications should use this hook to write new data\n\t * to the Master via the Slave (outstation).\n\t *\n\t * @return\t\t\ta pointer to the VtoWriter instance for this stack\n\t */\n\tIVtoWriter* GetVtoWriter() {\n\t\treturn &mVtoWriter;\n\t}\n\nprivate:\n\n\tChangeBuffer mChangeBuffer;\t\t\t\t// how client code gives us updates\n\tIAppLayer* mpAppLayer;\t\t\t\t\t// lower application layer\n\tDatabase* mpDatabase;\t\t\t\t\t// holds static data\n\tICommandHandler* mpCmdHandler;\t\t\t// how commands are selected/operated on application code\n\tint mSequence;\t\t\t\t\t\t\t// control sequence\n\tAS_Base* mpState;\t\t\t\t\t\t// current state for the state pattern\n\tSlaveConfig mConfig;\t\t\t\t\t// houses the configurable paramters of the outstation\n\tSlaveResponseTypes mRspTypes;\t\t\t// converts the group/var in the config to dnp singletons\n\n\tITimer* mpUnsolTimer;\t\t\t\t\t// timer for sending unsol responsess\n\n\tINotifier* mpVtoNotifier;\n\n\tIINField mIIN;\t\t\t\t\t\t\t// IIN bits that persist between requests (i.e. NeedsTime/Restart/Etc)\n\tIINField mRspIIN;\t\t\t\t\t\t// Transient IIN bits that get merged before a response is issued\n\tAPDU mResponse;\t\t\t\t\t\t\t// APDU used to form responses\n\tAPDU mRequest;\t\t\t\t\t\t\t// APDU used to save Deferred requests\n\tSequenceInfo mSeqInfo;\n\tAPDU mUnsol;\t\t\t\t\t\t\t// APDY used to form unsol respones\n\tResponseContext mRspContext;\t\t\t// Used to track and construct response fragments\n\tOutstationSBOHandler mSBOHandler; // Tracks SBO requests, forwarding valid sequences to the application\n\n\tbool mHaveLastRequest;\n\tAPDU mLastRequest;\t\t\t\t\t\t// APDU used to form responses\n\n\tITimeManager* mpTime;\n\n\t// Flags that tell us that some action has been Deferred\n\t// until the slave is in a state capable of handling it.\n\n\tbool mDeferredUpdate;\t\t\t\t\t// Indicates that a data update has been Deferred\n\tbool mDeferredRequest;\t\t\t\t\t// Indicates that a request has been Deferred\n\tbool mDeferredUnsol;\t\t\t\t\t// Indicates that the unsol timer expired, but the event was Deferred\n\tbool mDeferredUnknown;\n\n\tbool mStartupNullUnsol;\t\t\t\t\t// Tracks whether the device has completed the NULL unsol startup message\n\n\tStackState mState;\n\n\tStackState GetState() {\n\t\treturn mState;\n\t}\n\n\tvoid UpdateState(StackState aState);\n\n\tvoid OnVtoUpdate();\t\t\t\t\t\t// internal event dispatched when user code commits an update to mVtoWriter\n\tvoid OnDataUpdate();\t\t\t\t\t// internal event dispatched when user code commits an update to mChangeBuffer\n\tvoid OnUnsolTimerExpiration();\t\t\t// internal event dispatched when the unsolicted pack/retry timer expires\n\n\tvoid ConfigureAndSendSimpleResponse();\n\tvoid Send(APDU&);\n\tvoid Send(APDU& arAPDU, const IINField& arIIN); // overload with additional IIN data\n\tvoid SendUnsolicited(APDU& arAPDU);\n\n\tvoid HandleWrite(const APDU& arRequest);\n\tvoid HandleVtoTransfer(const APDU& arRequest);\n\tvoid HandleWriteIIN(HeaderReadIterator& arHdr);\n\tvoid HandleWriteTimeDate(HeaderReadIterator& arHWI);\n\tvoid HandleWriteVto(HeaderReadIterator& arHdr);\n\tvoid HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo);\n\tvoid HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n\tvoid HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n\tvoid HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable);\n\tvoid HandleUnknown();\n\n\tvoid ConfigureDelayMeasurement(const APDU& arRequest);\n\tvoid CreateResponseContext(const APDU& arRequest);\n\n\t// Helpers\n\n\tsize_t FlushVtoUpdates();\n\tsize_t FlushUpdates();\n\tvoid FlushDeferredEvents();\n\tvoid StartUnsolTimer(millis_t aTimeout);\n\n\t// Task handlers\n\n\tvoid ResetTimeIIN();\n\tITimer* mpTimeTimer;\n\n\t/**\n\t * The VtoReader instance for this stack which will direct received\n\t * VTO data to the user application. The user application should\n\t * register an IVtoCallbacks instance for the desired virtual channel\n\t * id(s) using AsyncStackManager::AddVtoChannel().\n\t */\n\tVtoReader mVtoReader;\n\n\t/**\n\t * The VtoWriter instance for this stack which will buffer new data\n\t * from the user application to the DNP3 stream. This handler is\n\t * thread-safe.\n\t */\n\tVtoWriter mVtoWriter;\n\n\t/**\n\t * A structure to provide the C++ equivalent of templated typedefs.\n\t */\n\ttemplate <class T>\n\tstruct CommandFunc {\n\t\ttypedef std::function<CommandStatus (T&, size_t)> Type;\n\t};\n\n\t/**\n\t * Forms a response message to a list of command objects.\n\t * Slave::mResponse is used as a destination buffer.\n\t *\n\t * @param apObj\t\t\tDNP3 object capable of reading/writing its own\n\t * \t\t\t\t\t\ttype from/to a byte stream\n\t * @param arIter\t\tan ObjectReadIterator that provides access to the\n\t * \t\t\t\t\t\tDNP3 objects\n\t * @param aFunc\t\t\tFunction for issuing/selecting\n\t */\n\ttemplate <class T>\n\tvoid RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler);\n}", "parent": 0, "children": [67, 68], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 274, "column": 1}}, {"id": 67, "type": "type_identifier", "text": "namespace", "parent": 66, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 9}}, {"id": 68, "type": "identifier", "text": "opendnp3", "parent": 66, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 18}}, {"id": 69, "type": "declaration", "text": "class IExecutor;", "parent": 66, "children": [70], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 16}}, {"id": 70, "type": "identifier", "text": "IExecutor", "parent": 69, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 15}}, {"id": 71, "type": "declaration", "text": "class AS_Base;", "parent": 66, "children": [72], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 14}}, {"id": 72, "type": "identifier", "text": "AS_Base", "parent": 71, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 13}}, {"id": 73, "type": "declaration", "text": "class DLL_LOCAL", "parent": 66, "children": [74], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 15}}, {"id": 74, "type": "identifier", "text": "DLL_LOCAL", "parent": 73, "children": [], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 79, "column": 15}}, {"id": 75, "type": "labeled_statement", "text": "Slave : public Loggable, public IAppUser, public StackBase\n{\n\n\tfriend class AS_Base;", "parent": 66, "children": [76, 77], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 82, "column": 22}}, {"id": 76, "type": "statement_identifier", "text": "Slave", "parent": 75, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 21}}, {"id": 77, "type": "declaration", "text": "public Loggable, public IAppUser, public StackBase\n{\n\n\tfriend class AS_Base;", "parent": 75, "children": [78, 79, 80, 83], "start_point": {"row": 79, "column": 24}, "end_point": {"row": 82, "column": 22}}, {"id": 78, "type": "identifier", "text": "Loggable", "parent": 77, "children": [], "start_point": {"row": 79, "column": 31}, "end_point": {"row": 79, "column": 39}}, {"id": 79, "type": "identifier", "text": "IAppUser", "parent": 77, "children": [], "start_point": {"row": 79, "column": 48}, "end_point": {"row": 79, "column": 56}}, {"id": 80, "type": "ERROR", "text": "public StackBase\n{\n\n\tfriend class", "parent": 77, "children": [81, 82], "start_point": {"row": 79, "column": 58}, "end_point": {"row": 82, "column": 13}}, {"id": 81, "type": "identifier", "text": "StackBase", "parent": 80, "children": [], "start_point": {"row": 79, "column": 65}, "end_point": {"row": 79, "column": 74}}, {"id": 82, "type": "identifier", "text": "friend", "parent": 80, "children": [], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 7}}, {"id": 83, "type": "identifier", "text": "AS_Base", "parent": 77, "children": [], "start_point": {"row": 82, "column": 14}, "end_point": {"row": 82, "column": 21}}, {"id": 84, "type": "declaration", "text": "friend class AS_OpenBase;", "parent": 66, "children": [85, 86], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 26}}, {"id": 85, "type": "type_identifier", "text": "friend", "parent": 84, "children": [], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 7}}, {"id": 86, "type": "identifier", "text": "AS_OpenBase", "parent": 84, "children": [], "start_point": {"row": 83, "column": 14}, "end_point": {"row": 83, "column": 25}}, {"id": 87, "type": "declaration", "text": "friend class AS_Closed;", "parent": 66, "children": [88, 89], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 24}}, {"id": 88, "type": "type_identifier", "text": "friend", "parent": 87, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 7}}, {"id": 89, "type": "identifier", "text": "AS_Closed", "parent": 87, "children": [], "start_point": {"row": 84, "column": 14}, "end_point": {"row": 84, "column": 23}}, {"id": 90, "type": "declaration", "text": "friend class AS_Idle;", "parent": 66, "children": [91, 92], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 22}}, {"id": 91, "type": "type_identifier", "text": "friend", "parent": 90, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 7}}, {"id": 92, "type": "identifier", "text": "AS_Idle", "parent": 90, "children": [], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 21}}, {"id": 93, "type": "declaration", "text": "friend class AS_WaitForRspSuccess;", "parent": 66, "children": [94, 95], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 35}}, {"id": 94, "type": "type_identifier", "text": "friend", "parent": 93, "children": [], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 7}}, {"id": 95, "type": "identifier", "text": "AS_WaitForRspSuccess", "parent": 93, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 34}}, {"id": 96, "type": "declaration", "text": "friend class AS_WaitForUnsolSuccess;", "parent": 66, "children": [97, 98], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 37}}, {"id": 97, "type": "type_identifier", "text": "friend", "parent": 96, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 7}}, {"id": 98, "type": "identifier", "text": "AS_WaitForUnsolSuccess", "parent": 96, "children": [], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 36}}, {"id": 99, "type": "declaration", "text": "friend class AS_WaitForSolUnsolSuccess;", "parent": 66, "children": [100, 101], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 40}}, {"id": 100, "type": "type_identifier", "text": "friend", "parent": 99, "children": [], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 7}}, {"id": 101, "type": "identifier", "text": "AS_WaitForSolUnsolSuccess", "parent": 99, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 39}}, {"id": 102, "type": "labeled_statement", "text": "public:\n\n\tSlave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst());", "parent": 66, "children": [103], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 92, "column": 152}}, {"id": 103, "type": "declaration", "text": "Slave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst());", "parent": 102, "children": [104, 137], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 152}}, {"id": 104, "type": "macro_type_specifier", "text": "Slave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource*", "parent": 103, "children": [105, 106, 131], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 116}}, {"id": 105, "type": "identifier", "text": "Slave", "parent": 104, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 6}}, {"id": 106, "type": "ERROR", "text": "Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*,", "parent": 104, "children": [107, 111, 115, 119, 123, 127], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 83}}, {"id": 107, "type": "type_descriptor", "text": "Logger*", "parent": 106, "children": [108, 109], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 14}}, {"id": 108, "type": "type_identifier", "text": "Logger", "parent": 107, "children": [], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 13}}, {"id": 109, "type": "abstract_pointer_declarator", "text": "*", "parent": 107, "children": [110], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 14}}, {"id": 110, "type": "*", "text": "*", "parent": 109, "children": [], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 14}}, {"id": 111, "type": "type_descriptor", "text": "IAppLayer*", "parent": 106, "children": [112, 113], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 26}}, {"id": 112, "type": "type_identifier", "text": "IAppLayer", "parent": 111, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 25}}, {"id": 113, "type": "abstract_pointer_declarator", "text": "*", "parent": 111, "children": [114], "start_point": {"row": 92, "column": 25}, "end_point": {"row": 92, "column": 26}}, {"id": 114, "type": "*", "text": "*", "parent": 113, "children": [], "start_point": {"row": 92, "column": 25}, "end_point": {"row": 92, "column": 26}}, {"id": 115, "type": "type_descriptor", "text": "IExecutor*", "parent": 106, "children": [116, 117], "start_point": {"row": 92, "column": 28}, "end_point": {"row": 92, "column": 38}}, {"id": 116, "type": "type_identifier", "text": "IExecutor", "parent": 115, "children": [], "start_point": {"row": 92, "column": 28}, "end_point": {"row": 92, "column": 37}}, {"id": 117, "type": "abstract_pointer_declarator", "text": "*", "parent": 115, "children": [118], "start_point": {"row": 92, "column": 37}, "end_point": {"row": 92, "column": 38}}, {"id": 118, "type": "*", "text": "*", "parent": 117, "children": [], "start_point": {"row": 92, "column": 37}, "end_point": {"row": 92, "column": 38}}, {"id": 119, "type": "type_descriptor", "text": "ITimeManager*", "parent": 106, "children": [120, 121], "start_point": {"row": 92, "column": 40}, "end_point": {"row": 92, "column": 53}}, {"id": 120, "type": "type_identifier", "text": "ITimeManager", "parent": 119, "children": [], "start_point": {"row": 92, "column": 40}, "end_point": {"row": 92, "column": 52}}, {"id": 121, "type": "abstract_pointer_declarator", "text": "*", "parent": 119, "children": [122], "start_point": {"row": 92, "column": 52}, "end_point": {"row": 92, "column": 53}}, {"id": 122, "type": "*", "text": "*", "parent": 121, "children": [], "start_point": {"row": 92, "column": 52}, "end_point": {"row": 92, "column": 53}}, {"id": 123, "type": "type_descriptor", "text": "Database*", "parent": 106, "children": [124, 125], "start_point": {"row": 92, "column": 55}, "end_point": {"row": 92, "column": 64}}, {"id": 124, "type": "type_identifier", "text": "Database", "parent": 123, "children": [], "start_point": {"row": 92, "column": 55}, "end_point": {"row": 92, "column": 63}}, {"id": 125, "type": "abstract_pointer_declarator", "text": "*", "parent": 123, "children": [126], "start_point": {"row": 92, "column": 63}, "end_point": {"row": 92, "column": 64}}, {"id": 126, "type": "*", "text": "*", "parent": 125, "children": [], "start_point": {"row": 92, "column": 63}, "end_point": {"row": 92, "column": 64}}, {"id": 127, "type": "type_descriptor", "text": "ICommandHandler*", "parent": 106, "children": [128, 129], "start_point": {"row": 92, "column": 66}, "end_point": {"row": 92, "column": 82}}, {"id": 128, "type": "type_identifier", "text": "ICommandHandler", "parent": 127, "children": [], "start_point": {"row": 92, "column": 66}, "end_point": {"row": 92, "column": 81}}, {"id": 129, "type": "abstract_pointer_declarator", "text": "*", "parent": 127, "children": [130], "start_point": {"row": 92, "column": 81}, "end_point": {"row": 92, "column": 82}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 92, "column": 81}, "end_point": {"row": 92, "column": 82}}, {"id": 131, "type": "type_descriptor", "text": "const SlaveConfig&, ITimeSource*", "parent": 104, "children": [132, 133, 135], "start_point": {"row": 92, "column": 84}, "end_point": {"row": 92, "column": 116}}, {"id": 132, "type": "type_identifier", "text": "SlaveConfig", "parent": 131, "children": [], "start_point": {"row": 92, "column": 90}, "end_point": {"row": 92, "column": 101}}, {"id": 133, "type": "ERROR", "text": "&, ITimeSource", "parent": 131, "children": [134], "start_point": {"row": 92, "column": 101}, "end_point": {"row": 92, "column": 115}}, {"id": 134, "type": "identifier", "text": "ITimeSource", "parent": 133, "children": [], "start_point": {"row": 92, "column": 104}, "end_point": {"row": 92, "column": 115}}, {"id": 135, "type": "abstract_pointer_declarator", "text": "*", "parent": 131, "children": [136], "start_point": {"row": 92, "column": 115}, "end_point": {"row": 92, "column": 116}}, {"id": 136, "type": "*", "text": "*", "parent": 135, "children": [], "start_point": {"row": 92, "column": 115}, "end_point": {"row": 92, "column": 116}}, {"id": 137, "type": "init_declarator", "text": "apTimeSource = TimeSource::Inst()", "parent": 103, "children": [138, 139, 140, 142], "start_point": {"row": 92, "column": 117}, "end_point": {"row": 92, "column": 150}}, {"id": 138, "type": "identifier", "text": "apTimeSource", "parent": 137, "children": [], "start_point": {"row": 92, "column": 117}, "end_point": {"row": 92, "column": 129}}, {"id": 139, "type": "=", "text": "=", "parent": 137, "children": [], "start_point": {"row": 92, "column": 130}, "end_point": {"row": 92, "column": 131}}, {"id": 140, "type": "ERROR", "text": "TimeSource::", "parent": 137, "children": [141], "start_point": {"row": 92, "column": 132}, "end_point": {"row": 92, "column": 144}}, {"id": 141, "type": "identifier", "text": "TimeSource", "parent": 140, "children": [], "start_point": {"row": 92, "column": 132}, "end_point": {"row": 92, "column": 142}}, {"id": 142, "type": "call_expression", "text": "Inst()", "parent": 137, "children": [143, 144], "start_point": {"row": 92, "column": 144}, "end_point": {"row": 92, "column": 150}}, {"id": 143, "type": "identifier", "text": "Inst", "parent": 142, "children": [], "start_point": {"row": 92, "column": 144}, "end_point": {"row": 92, "column": 148}}, {"id": 144, "type": "argument_list", "text": "()", "parent": 142, "children": [], "start_point": {"row": 92, "column": 148}, "end_point": {"row": 92, "column": 150}}, {"id": 145, "type": "unary_expression", "text": "~Slave()", "parent": 66, "children": [146, 147], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 9}}, {"id": 146, "type": "~", "text": "~", "parent": 145, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 2}}, {"id": 147, "type": "call_expression", "text": "Slave()", "parent": 145, "children": [148, 149], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 9}}, {"id": 148, "type": "identifier", "text": "Slave", "parent": 147, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 7}}, {"id": 149, "type": "argument_list", "text": "()", "parent": 147, "children": [], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 9}}, {"id": 150, "type": "declaration", "text": "void OnLowerLayerUp();", "parent": 66, "children": [151, 152], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 23}}, {"id": 151, "type": "primitive_type", "text": "void", "parent": 150, "children": [], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 5}}, {"id": 152, "type": "function_declarator", "text": "OnLowerLayerUp()", "parent": 150, "children": [153, 154], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 22}}, {"id": 153, "type": "identifier", "text": "OnLowerLayerUp", "parent": 152, "children": [], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 20}}, {"id": 154, "type": "parameter_list", "text": "()", "parent": 152, "children": [], "start_point": {"row": 100, "column": 20}, "end_point": {"row": 100, "column": 22}}, {"id": 155, "type": "declaration", "text": "void OnLowerLayerDown();", "parent": 66, "children": [156, 157], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 25}}, {"id": 156, "type": "primitive_type", "text": "void", "parent": 155, "children": [], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 5}}, {"id": 157, "type": "function_declarator", "text": "OnLowerLayerDown()", "parent": 155, "children": [158, 159], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 24}}, {"id": 158, "type": "identifier", "text": "OnLowerLayerDown", "parent": 157, "children": [], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 22}}, {"id": 159, "type": "parameter_list", "text": "()", "parent": 157, "children": [], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 24}}, {"id": 160, "type": "declaration", "text": "void OnUnsolSendSuccess();", "parent": 66, "children": [161, 162], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 27}}, {"id": 161, "type": "primitive_type", "text": "void", "parent": 160, "children": [], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 5}}, {"id": 162, "type": "function_declarator", "text": "OnUnsolSendSuccess()", "parent": 160, "children": [163, 164], "start_point": {"row": 103, "column": 6}, "end_point": {"row": 103, "column": 26}}, {"id": 163, "type": "identifier", "text": "OnUnsolSendSuccess", "parent": 162, "children": [], "start_point": {"row": 103, "column": 6}, "end_point": {"row": 103, "column": 24}}, {"id": 164, "type": "parameter_list", "text": "()", "parent": 162, "children": [], "start_point": {"row": 103, "column": 24}, "end_point": {"row": 103, "column": 26}}, {"id": 165, "type": "declaration", "text": "void OnSolSendSuccess();", "parent": 66, "children": [166, 167], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 104, "column": 25}}, {"id": 166, "type": "primitive_type", "text": "void", "parent": 165, "children": [], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 104, "column": 5}}, {"id": 167, "type": "function_declarator", "text": "OnSolSendSuccess()", "parent": 165, "children": [168, 169], "start_point": {"row": 104, "column": 6}, "end_point": {"row": 104, "column": 24}}, {"id": 168, "type": "identifier", "text": "OnSolSendSuccess", "parent": 167, "children": [], "start_point": {"row": 104, "column": 6}, "end_point": {"row": 104, "column": 22}}, {"id": 169, "type": "parameter_list", "text": "()", "parent": 167, "children": [], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 24}}, {"id": 170, "type": "declaration", "text": "void OnUnsolFailure();", "parent": 66, "children": [171, 172], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 23}}, {"id": 171, "type": "primitive_type", "text": "void", "parent": 170, "children": [], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 5}}, {"id": 172, "type": "function_declarator", "text": "OnUnsolFailure()", "parent": 170, "children": [173, 174], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 22}}, {"id": 173, "type": "identifier", "text": "OnUnsolFailure", "parent": 172, "children": [], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 20}}, {"id": 174, "type": "parameter_list", "text": "()", "parent": 172, "children": [], "start_point": {"row": 106, "column": 20}, "end_point": {"row": 106, "column": 22}}, {"id": 175, "type": "declaration", "text": "void OnSolFailure();", "parent": 66, "children": [176, 177], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 21}}, {"id": 176, "type": "primitive_type", "text": "void", "parent": 175, "children": [], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 5}}, {"id": 177, "type": "function_declarator", "text": "OnSolFailure()", "parent": 175, "children": [178, 179], "start_point": {"row": 107, "column": 6}, "end_point": {"row": 107, "column": 20}}, {"id": 178, "type": "identifier", "text": "OnSolFailure", "parent": 177, "children": [], "start_point": {"row": 107, "column": 6}, "end_point": {"row": 107, "column": 18}}, {"id": 179, "type": "parameter_list", "text": "()", "parent": 177, "children": [], "start_point": {"row": 107, "column": 18}, "end_point": {"row": 107, "column": 20}}, {"id": 180, "type": "declaration", "text": "void OnRequest(const APDU&, SequenceInfo);", "parent": 66, "children": [181, 182], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 43}}, {"id": 181, "type": "primitive_type", "text": "void", "parent": 180, "children": [], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 5}}, {"id": 182, "type": "function_declarator", "text": "OnRequest(const APDU&, SequenceInfo)", "parent": 180, "children": [183, 184], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 42}}, {"id": 183, "type": "identifier", "text": "OnRequest", "parent": 182, "children": [], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 15}}, {"id": 184, "type": "parameter_list", "text": "(const APDU&, SequenceInfo)", "parent": 182, "children": [185, 187], "start_point": {"row": 110, "column": 15}, "end_point": {"row": 110, "column": 42}}, {"id": 185, "type": "parameter_declaration", "text": "const APDU", "parent": 184, "children": [186], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 26}}, {"id": 186, "type": "type_identifier", "text": "APDU", "parent": 185, "children": [], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 26}}, {"id": 187, "type": "parameter_declaration", "text": "SequenceInfo", "parent": 184, "children": [188], "start_point": {"row": 110, "column": 29}, "end_point": {"row": 110, "column": 41}}, {"id": 188, "type": "type_identifier", "text": "SequenceInfo", "parent": 187, "children": [], "start_point": {"row": 110, "column": 29}, "end_point": {"row": 110, "column": 41}}, {"id": 189, "type": "declaration", "text": "void OnUnknownObject();", "parent": 66, "children": [190, 191], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 24}}, {"id": 190, "type": "primitive_type", "text": "void", "parent": 189, "children": [], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 5}}, {"id": 191, "type": "function_declarator", "text": "OnUnknownObject()", "parent": 189, "children": [192, 193], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 23}}, {"id": 192, "type": "identifier", "text": "OnUnknownObject", "parent": 191, "children": [], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 21}}, {"id": 193, "type": "parameter_list", "text": "()", "parent": 191, "children": [], "start_point": {"row": 111, "column": 21}, "end_point": {"row": 111, "column": 23}}, {"id": 194, "type": "function_definition", "text": "bool IsMaster() {\n\t\treturn false;\n\t}", "parent": 66, "children": [195, 196], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 121, "column": 2}}, {"id": 195, "type": "primitive_type", "text": "bool", "parent": 194, "children": [], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 5}}, {"id": 196, "type": "function_declarator", "text": "IsMaster()", "parent": 194, "children": [197, 198], "start_point": {"row": 119, "column": 6}, "end_point": {"row": 119, "column": 16}}, {"id": 197, "type": "identifier", "text": "IsMaster", "parent": 196, "children": [], "start_point": {"row": 119, "column": 6}, "end_point": {"row": 119, "column": 14}}, {"id": 198, "type": "parameter_list", "text": "()", "parent": 196, "children": [], "start_point": {"row": 119, "column": 14}, "end_point": {"row": 119, "column": 16}}, {"id": 199, "type": "return_statement", "text": "return false;", "parent": 194, "children": [200], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 120, "column": 15}}, {"id": 200, "type": "false", "text": "false", "parent": 199, "children": [], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 14}}, {"id": 201, "type": "function_definition", "text": "IDataObserver* GetDataObserver() {\n\t\treturn &mChangeBuffer;\n\t}", "parent": 66, "children": [202, 203], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 132, "column": 2}}, {"id": 202, "type": "type_identifier", "text": "IDataObserver", "parent": 201, "children": [], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 130, "column": 14}}, {"id": 203, "type": "pointer_declarator", "text": "* GetDataObserver()", "parent": 201, "children": [204, 205], "start_point": {"row": 130, "column": 14}, "end_point": {"row": 130, "column": 33}}, {"id": 204, "type": "*", "text": "*", "parent": 203, "children": [], "start_point": {"row": 130, "column": 14}, "end_point": {"row": 130, "column": 15}}, {"id": 205, "type": "function_declarator", "text": "GetDataObserver()", "parent": 203, "children": [206, 207], "start_point": {"row": 130, "column": 16}, "end_point": {"row": 130, "column": 33}}, {"id": 206, "type": "identifier", "text": "GetDataObserver", "parent": 205, "children": [], "start_point": {"row": 130, "column": 16}, "end_point": {"row": 130, "column": 31}}, {"id": 207, "type": "parameter_list", "text": "()", "parent": 205, "children": [], "start_point": {"row": 130, "column": 31}, "end_point": {"row": 130, "column": 33}}, {"id": 208, "type": "return_statement", "text": "return &mChangeBuffer;", "parent": 201, "children": [209], "start_point": {"row": 131, "column": 2}, "end_point": {"row": 131, "column": 24}}, {"id": 209, "type": "pointer_expression", "text": "&mChangeBuffer", "parent": 208, "children": [210], "start_point": {"row": 131, "column": 9}, "end_point": {"row": 131, "column": 23}}, {"id": 210, "type": "identifier", "text": "mChangeBuffer", "parent": 209, "children": [], "start_point": {"row": 131, "column": 10}, "end_point": {"row": 131, "column": 23}}, {"id": 211, "type": "function_definition", "text": "VtoReader* GetVtoReader() {\n\t\treturn &mVtoReader;\n\t}", "parent": 66, "children": [212, 213], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 144, "column": 2}}, {"id": 212, "type": "type_identifier", "text": "VtoReader", "parent": 211, "children": [], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 10}}, {"id": 213, "type": "pointer_declarator", "text": "* GetVtoReader()", "parent": 211, "children": [214, 215], "start_point": {"row": 142, "column": 10}, "end_point": {"row": 142, "column": 26}}, {"id": 214, "type": "*", "text": "*", "parent": 213, "children": [], "start_point": {"row": 142, "column": 10}, "end_point": {"row": 142, "column": 11}}, {"id": 215, "type": "function_declarator", "text": "GetVtoReader()", "parent": 213, "children": [216, 217], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 26}}, {"id": 216, "type": "identifier", "text": "GetVtoReader", "parent": 215, "children": [], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 24}}, {"id": 217, "type": "parameter_list", "text": "()", "parent": 215, "children": [], "start_point": {"row": 142, "column": 24}, "end_point": {"row": 142, "column": 26}}, {"id": 218, "type": "return_statement", "text": "return &mVtoReader;", "parent": 211, "children": [219], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 21}}, {"id": 219, "type": "pointer_expression", "text": "&mVtoReader", "parent": 218, "children": [220], "start_point": {"row": 143, "column": 9}, "end_point": {"row": 143, "column": 20}}, {"id": 220, "type": "identifier", "text": "mVtoReader", "parent": 219, "children": [], "start_point": {"row": 143, "column": 10}, "end_point": {"row": 143, "column": 20}}, {"id": 221, "type": "function_definition", "text": "IVtoWriter* GetVtoWriter() {\n\t\treturn &mVtoWriter;\n\t}", "parent": 66, "children": [222, 223], "start_point": {"row": 153, "column": 1}, "end_point": {"row": 155, "column": 2}}, {"id": 222, "type": "type_identifier", "text": "IVtoWriter", "parent": 221, "children": [], "start_point": {"row": 153, "column": 1}, "end_point": {"row": 153, "column": 11}}, {"id": 223, "type": "pointer_declarator", "text": "* GetVtoWriter()", "parent": 221, "children": [224, 225], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 27}}, {"id": 224, "type": "*", "text": "*", "parent": 223, "children": [], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 12}}, {"id": 225, "type": "function_declarator", "text": "GetVtoWriter()", "parent": 223, "children": [226, 227], "start_point": {"row": 153, "column": 13}, "end_point": {"row": 153, "column": 27}}, {"id": 226, "type": "identifier", "text": "GetVtoWriter", "parent": 225, "children": [], "start_point": {"row": 153, "column": 13}, "end_point": {"row": 153, "column": 25}}, {"id": 227, "type": "parameter_list", "text": "()", "parent": 225, "children": [], "start_point": {"row": 153, "column": 25}, "end_point": {"row": 153, "column": 27}}, {"id": 228, "type": "return_statement", "text": "return &mVtoWriter;", "parent": 221, "children": [229], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 154, "column": 21}}, {"id": 229, "type": "pointer_expression", "text": "&mVtoWriter", "parent": 228, "children": [230], "start_point": {"row": 154, "column": 9}, "end_point": {"row": 154, "column": 20}}, {"id": 230, "type": "identifier", "text": "mVtoWriter", "parent": 229, "children": [], "start_point": {"row": 154, "column": 10}, "end_point": {"row": 154, "column": 20}}, {"id": 231, "type": "labeled_statement", "text": "private:\n\n\tChangeBuffer mChangeBuffer;", "parent": 66, "children": [232], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 159, "column": 28}}, {"id": 232, "type": "declaration", "text": "ChangeBuffer mChangeBuffer;", "parent": 231, "children": [233, 234], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 28}}, {"id": 233, "type": "type_identifier", "text": "ChangeBuffer", "parent": 232, "children": [], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 13}}, {"id": 234, "type": "identifier", "text": "mChangeBuffer", "parent": 232, "children": [], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 27}}, {"id": 235, "type": "declaration", "text": "IAppLayer* mpAppLayer;", "parent": 66, "children": [236, 237], "start_point": {"row": 160, "column": 1}, "end_point": {"row": 160, "column": 23}}, {"id": 236, "type": "type_identifier", "text": "IAppLayer", "parent": 235, "children": [], "start_point": {"row": 160, "column": 1}, "end_point": {"row": 160, "column": 10}}, {"id": 237, "type": "pointer_declarator", "text": "* mpAppLayer", "parent": 235, "children": [238, 239], "start_point": {"row": 160, "column": 10}, "end_point": {"row": 160, "column": 22}}, {"id": 238, "type": "*", "text": "*", "parent": 237, "children": [], "start_point": {"row": 160, "column": 10}, "end_point": {"row": 160, "column": 11}}, {"id": 239, "type": "identifier", "text": "mpAppLayer", "parent": 237, "children": [], "start_point": {"row": 160, "column": 12}, "end_point": {"row": 160, "column": 22}}, {"id": 240, "type": "declaration", "text": "Database* mpDatabase;", "parent": 66, "children": [241, 242], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 22}}, {"id": 241, "type": "type_identifier", "text": "Database", "parent": 240, "children": [], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 9}}, {"id": 242, "type": "pointer_declarator", "text": "* mpDatabase", "parent": 240, "children": [243, 244], "start_point": {"row": 161, "column": 9}, "end_point": {"row": 161, "column": 21}}, {"id": 243, "type": "*", "text": "*", "parent": 242, "children": [], "start_point": {"row": 161, "column": 9}, "end_point": {"row": 161, "column": 10}}, {"id": 244, "type": "identifier", "text": "mpDatabase", "parent": 242, "children": [], "start_point": {"row": 161, "column": 11}, "end_point": {"row": 161, "column": 21}}, {"id": 245, "type": "declaration", "text": "ICommandHandler* mpCmdHandler;", "parent": 66, "children": [246, 247], "start_point": {"row": 162, "column": 1}, "end_point": {"row": 162, "column": 31}}, {"id": 246, "type": "type_identifier", "text": "ICommandHandler", "parent": 245, "children": [], "start_point": {"row": 162, "column": 1}, "end_point": {"row": 162, "column": 16}}, {"id": 247, "type": "pointer_declarator", "text": "* mpCmdHandler", "parent": 245, "children": [248, 249], "start_point": {"row": 162, "column": 16}, "end_point": {"row": 162, "column": 30}}, {"id": 248, "type": "*", "text": "*", "parent": 247, "children": [], "start_point": {"row": 162, "column": 16}, "end_point": {"row": 162, "column": 17}}, {"id": 249, "type": "identifier", "text": "mpCmdHandler", "parent": 247, "children": [], "start_point": {"row": 162, "column": 18}, "end_point": {"row": 162, "column": 30}}, {"id": 250, "type": "declaration", "text": "int mSequence;", "parent": 66, "children": [251, 252], "start_point": {"row": 163, "column": 1}, "end_point": {"row": 163, "column": 15}}, {"id": 251, "type": "primitive_type", "text": "int", "parent": 250, "children": [], "start_point": {"row": 163, "column": 1}, "end_point": {"row": 163, "column": 4}}, {"id": 252, "type": "identifier", "text": "mSequence", "parent": 250, "children": [], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 14}}, {"id": 253, "type": "declaration", "text": "AS_Base* mpState;", "parent": 66, "children": [254, 255], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 18}}, {"id": 254, "type": "type_identifier", "text": "AS_Base", "parent": 253, "children": [], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 8}}, {"id": 255, "type": "pointer_declarator", "text": "* mpState", "parent": 253, "children": [256, 257], "start_point": {"row": 164, "column": 8}, "end_point": {"row": 164, "column": 17}}, {"id": 256, "type": "*", "text": "*", "parent": 255, "children": [], "start_point": {"row": 164, "column": 8}, "end_point": {"row": 164, "column": 9}}, {"id": 257, "type": "identifier", "text": "mpState", "parent": 255, "children": [], "start_point": {"row": 164, "column": 10}, "end_point": {"row": 164, "column": 17}}, {"id": 258, "type": "declaration", "text": "SlaveConfig mConfig;", "parent": 66, "children": [259, 260], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 21}}, {"id": 259, "type": "type_identifier", "text": "SlaveConfig", "parent": 258, "children": [], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 12}}, {"id": 260, "type": "identifier", "text": "mConfig", "parent": 258, "children": [], "start_point": {"row": 165, "column": 13}, "end_point": {"row": 165, "column": 20}}, {"id": 261, "type": "declaration", "text": "SlaveResponseTypes mRspTypes;", "parent": 66, "children": [262, 263], "start_point": {"row": 166, "column": 1}, "end_point": {"row": 166, "column": 30}}, {"id": 262, "type": "type_identifier", "text": "SlaveResponseTypes", "parent": 261, "children": [], "start_point": {"row": 166, "column": 1}, "end_point": {"row": 166, "column": 19}}, {"id": 263, "type": "identifier", "text": "mRspTypes", "parent": 261, "children": [], "start_point": {"row": 166, "column": 20}, "end_point": {"row": 166, "column": 29}}, {"id": 264, "type": "declaration", "text": "ITimer* mpUnsolTimer;", "parent": 66, "children": [265, 266], "start_point": {"row": 168, "column": 1}, "end_point": {"row": 168, "column": 22}}, {"id": 265, "type": "type_identifier", "text": "ITimer", "parent": 264, "children": [], "start_point": {"row": 168, "column": 1}, "end_point": {"row": 168, "column": 7}}, {"id": 266, "type": "pointer_declarator", "text": "* mpUnsolTimer", "parent": 264, "children": [267, 268], "start_point": {"row": 168, "column": 7}, "end_point": {"row": 168, "column": 21}}, {"id": 267, "type": "*", "text": "*", "parent": 266, "children": [], "start_point": {"row": 168, "column": 7}, "end_point": {"row": 168, "column": 8}}, {"id": 268, "type": "identifier", "text": "mpUnsolTimer", "parent": 266, "children": [], "start_point": {"row": 168, "column": 9}, "end_point": {"row": 168, "column": 21}}, {"id": 269, "type": "declaration", "text": "INotifier* mpVtoNotifier;", "parent": 66, "children": [270, 271], "start_point": {"row": 170, "column": 1}, "end_point": {"row": 170, "column": 26}}, {"id": 270, "type": "type_identifier", "text": "INotifier", "parent": 269, "children": [], "start_point": {"row": 170, "column": 1}, "end_point": {"row": 170, "column": 10}}, {"id": 271, "type": "pointer_declarator", "text": "* mpVtoNotifier", "parent": 269, "children": [272, 273], "start_point": {"row": 170, "column": 10}, "end_point": {"row": 170, "column": 25}}, {"id": 272, "type": "*", "text": "*", "parent": 271, "children": [], "start_point": {"row": 170, "column": 10}, "end_point": {"row": 170, "column": 11}}, {"id": 273, "type": "identifier", "text": "mpVtoNotifier", "parent": 271, "children": [], "start_point": {"row": 170, "column": 12}, "end_point": {"row": 170, "column": 25}}, {"id": 274, "type": "declaration", "text": "IINField mIIN;", "parent": 66, "children": [275, 276], "start_point": {"row": 172, "column": 1}, "end_point": {"row": 172, "column": 15}}, {"id": 275, "type": "type_identifier", "text": "IINField", "parent": 274, "children": [], "start_point": {"row": 172, "column": 1}, "end_point": {"row": 172, "column": 9}}, {"id": 276, "type": "identifier", "text": "mIIN", "parent": 274, "children": [], "start_point": {"row": 172, "column": 10}, "end_point": {"row": 172, "column": 14}}, {"id": 277, "type": "declaration", "text": "IINField mRspIIN;", "parent": 66, "children": [278, 279], "start_point": {"row": 173, "column": 1}, "end_point": {"row": 173, "column": 18}}, {"id": 278, "type": "type_identifier", "text": "IINField", "parent": 277, "children": [], "start_point": {"row": 173, "column": 1}, "end_point": {"row": 173, "column": 9}}, {"id": 279, "type": "identifier", "text": "mRspIIN", "parent": 277, "children": [], "start_point": {"row": 173, "column": 10}, "end_point": {"row": 173, "column": 17}}, {"id": 280, "type": "declaration", "text": "APDU mResponse;", "parent": 66, "children": [281, 282], "start_point": {"row": 174, "column": 1}, "end_point": {"row": 174, "column": 16}}, {"id": 281, "type": "type_identifier", "text": "APDU", "parent": 280, "children": [], "start_point": {"row": 174, "column": 1}, "end_point": {"row": 174, "column": 5}}, {"id": 282, "type": "identifier", "text": "mResponse", "parent": 280, "children": [], "start_point": {"row": 174, "column": 6}, "end_point": {"row": 174, "column": 15}}, {"id": 283, "type": "declaration", "text": "APDU mRequest;", "parent": 66, "children": [284, 285], "start_point": {"row": 175, "column": 1}, "end_point": {"row": 175, "column": 15}}, {"id": 284, "type": "type_identifier", "text": "APDU", "parent": 283, "children": [], "start_point": {"row": 175, "column": 1}, "end_point": {"row": 175, "column": 5}}, {"id": 285, "type": "identifier", "text": "mRequest", "parent": 283, "children": [], "start_point": {"row": 175, "column": 6}, "end_point": {"row": 175, "column": 14}}, {"id": 286, "type": "declaration", "text": "SequenceInfo mSeqInfo;", "parent": 66, "children": [287, 288], "start_point": {"row": 176, "column": 1}, "end_point": {"row": 176, "column": 23}}, {"id": 287, "type": "type_identifier", "text": "SequenceInfo", "parent": 286, "children": [], "start_point": {"row": 176, "column": 1}, "end_point": {"row": 176, "column": 13}}, {"id": 288, "type": "identifier", "text": "mSeqInfo", "parent": 286, "children": [], "start_point": {"row": 176, "column": 14}, "end_point": {"row": 176, "column": 22}}, {"id": 289, "type": "declaration", "text": "APDU mUnsol;", "parent": 66, "children": [290, 291], "start_point": {"row": 177, "column": 1}, "end_point": {"row": 177, "column": 13}}, {"id": 290, "type": "type_identifier", "text": "APDU", "parent": 289, "children": [], "start_point": {"row": 177, "column": 1}, "end_point": {"row": 177, "column": 5}}, {"id": 291, "type": "identifier", "text": "mUnsol", "parent": 289, "children": [], "start_point": {"row": 177, "column": 6}, "end_point": {"row": 177, "column": 12}}, {"id": 292, "type": "declaration", "text": "ResponseContext mRspContext;", "parent": 66, "children": [293, 294], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 29}}, {"id": 293, "type": "type_identifier", "text": "ResponseContext", "parent": 292, "children": [], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 16}}, {"id": 294, "type": "identifier", "text": "mRspContext", "parent": 292, "children": [], "start_point": {"row": 178, "column": 17}, "end_point": {"row": 178, "column": 28}}, {"id": 295, "type": "declaration", "text": "OutstationSBOHandler mSBOHandler;", "parent": 66, "children": [296, 297], "start_point": {"row": 179, "column": 1}, "end_point": {"row": 179, "column": 34}}, {"id": 296, "type": "type_identifier", "text": "OutstationSBOHandler", "parent": 295, "children": [], "start_point": {"row": 179, "column": 1}, "end_point": {"row": 179, "column": 21}}, {"id": 297, "type": "identifier", "text": "mSBOHandler", "parent": 295, "children": [], "start_point": {"row": 179, "column": 22}, "end_point": {"row": 179, "column": 33}}, {"id": 298, "type": "declaration", "text": "bool mHaveLastRequest;", "parent": 66, "children": [299, 300], "start_point": {"row": 181, "column": 1}, "end_point": {"row": 181, "column": 23}}, {"id": 299, "type": "primitive_type", "text": "bool", "parent": 298, "children": [], "start_point": {"row": 181, "column": 1}, "end_point": {"row": 181, "column": 5}}, {"id": 300, "type": "identifier", "text": "mHaveLastRequest", "parent": 298, "children": [], "start_point": {"row": 181, "column": 6}, "end_point": {"row": 181, "column": 22}}, {"id": 301, "type": "declaration", "text": "APDU mLastRequest;", "parent": 66, "children": [302, 303], "start_point": {"row": 182, "column": 1}, "end_point": {"row": 182, "column": 19}}, {"id": 302, "type": "type_identifier", "text": "APDU", "parent": 301, "children": [], "start_point": {"row": 182, "column": 1}, "end_point": {"row": 182, "column": 5}}, {"id": 303, "type": "identifier", "text": "mLastRequest", "parent": 301, "children": [], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 18}}, {"id": 304, "type": "declaration", "text": "ITimeManager* mpTime;", "parent": 66, "children": [305, 306], "start_point": {"row": 184, "column": 1}, "end_point": {"row": 184, "column": 22}}, {"id": 305, "type": "type_identifier", "text": "ITimeManager", "parent": 304, "children": [], "start_point": {"row": 184, "column": 1}, "end_point": {"row": 184, "column": 13}}, {"id": 306, "type": "pointer_declarator", "text": "* mpTime", "parent": 304, "children": [307, 308], "start_point": {"row": 184, "column": 13}, "end_point": {"row": 184, "column": 21}}, {"id": 307, "type": "*", "text": "*", "parent": 306, "children": [], "start_point": {"row": 184, "column": 13}, "end_point": {"row": 184, "column": 14}}, {"id": 308, "type": "identifier", "text": "mpTime", "parent": 306, "children": [], "start_point": {"row": 184, "column": 15}, "end_point": {"row": 184, "column": 21}}, {"id": 309, "type": "declaration", "text": "bool mDeferredUpdate;", "parent": 66, "children": [310, 311], "start_point": {"row": 189, "column": 1}, "end_point": {"row": 189, "column": 22}}, {"id": 310, "type": "primitive_type", "text": "bool", "parent": 309, "children": [], "start_point": {"row": 189, "column": 1}, "end_point": {"row": 189, "column": 5}}, {"id": 311, "type": "identifier", "text": "mDeferredUpdate", "parent": 309, "children": [], "start_point": {"row": 189, "column": 6}, "end_point": {"row": 189, "column": 21}}, {"id": 312, "type": "declaration", "text": "bool mDeferredRequest;", "parent": 66, "children": [313, 314], "start_point": {"row": 190, "column": 1}, "end_point": {"row": 190, "column": 23}}, {"id": 313, "type": "primitive_type", "text": "bool", "parent": 312, "children": [], "start_point": {"row": 190, "column": 1}, "end_point": {"row": 190, "column": 5}}, {"id": 314, "type": "identifier", "text": "mDeferredRequest", "parent": 312, "children": [], "start_point": {"row": 190, "column": 6}, "end_point": {"row": 190, "column": 22}}, {"id": 315, "type": "declaration", "text": "bool mDeferredUnsol;", "parent": 66, "children": [316, 317], "start_point": {"row": 191, "column": 1}, "end_point": {"row": 191, "column": 21}}, {"id": 316, "type": "primitive_type", "text": "bool", "parent": 315, "children": [], "start_point": {"row": 191, "column": 1}, "end_point": {"row": 191, "column": 5}}, {"id": 317, "type": "identifier", "text": "mDeferredUnsol", "parent": 315, "children": [], "start_point": {"row": 191, "column": 6}, "end_point": {"row": 191, "column": 20}}, {"id": 318, "type": "declaration", "text": "bool mDeferredUnknown;", "parent": 66, "children": [319, 320], "start_point": {"row": 192, "column": 1}, "end_point": {"row": 192, "column": 23}}, {"id": 319, "type": "primitive_type", "text": "bool", "parent": 318, "children": [], "start_point": {"row": 192, "column": 1}, "end_point": {"row": 192, "column": 5}}, {"id": 320, "type": "identifier", "text": "mDeferredUnknown", "parent": 318, "children": [], "start_point": {"row": 192, "column": 6}, "end_point": {"row": 192, "column": 22}}, {"id": 321, "type": "declaration", "text": "bool mStartupNullUnsol;", "parent": 66, "children": [322, 323], "start_point": {"row": 194, "column": 1}, "end_point": {"row": 194, "column": 24}}, {"id": 322, "type": "primitive_type", "text": "bool", "parent": 321, "children": [], "start_point": {"row": 194, "column": 1}, "end_point": {"row": 194, "column": 5}}, {"id": 323, "type": "identifier", "text": "mStartupNullUnsol", "parent": 321, "children": [], "start_point": {"row": 194, "column": 6}, "end_point": {"row": 194, "column": 23}}, {"id": 324, "type": "declaration", "text": "StackState mState;", "parent": 66, "children": [325, 326], "start_point": {"row": 196, "column": 1}, "end_point": {"row": 196, "column": 19}}, {"id": 325, "type": "type_identifier", "text": "StackState", "parent": 324, "children": [], "start_point": {"row": 196, "column": 1}, "end_point": {"row": 196, "column": 11}}, {"id": 326, "type": "identifier", "text": "mState", "parent": 324, "children": [], "start_point": {"row": 196, "column": 12}, "end_point": {"row": 196, "column": 18}}, {"id": 327, "type": "function_definition", "text": "StackState GetState() {\n\t\treturn mState;\n\t}", "parent": 66, "children": [328, 329], "start_point": {"row": 198, "column": 1}, "end_point": {"row": 200, "column": 2}}, {"id": 328, "type": "type_identifier", "text": "StackState", "parent": 327, "children": [], "start_point": {"row": 198, "column": 1}, "end_point": {"row": 198, "column": 11}}, {"id": 329, "type": "function_declarator", "text": "GetState()", "parent": 327, "children": [330, 331], "start_point": {"row": 198, "column": 12}, "end_point": {"row": 198, "column": 22}}, {"id": 330, "type": "identifier", "text": "GetState", "parent": 329, "children": [], "start_point": {"row": 198, "column": 12}, "end_point": {"row": 198, "column": 20}}, {"id": 331, "type": "parameter_list", "text": "()", "parent": 329, "children": [], "start_point": {"row": 198, "column": 20}, "end_point": {"row": 198, "column": 22}}, {"id": 332, "type": "return_statement", "text": "return mState;", "parent": 327, "children": [333], "start_point": {"row": 199, "column": 2}, "end_point": {"row": 199, "column": 16}}, {"id": 333, "type": "identifier", "text": "mState", "parent": 332, "children": [], "start_point": {"row": 199, "column": 9}, "end_point": {"row": 199, "column": 15}}, {"id": 334, "type": "declaration", "text": "void UpdateState(StackState aState);", "parent": 66, "children": [335, 336], "start_point": {"row": 202, "column": 1}, "end_point": {"row": 202, "column": 37}}, {"id": 335, "type": "primitive_type", "text": "void", "parent": 334, "children": [], "start_point": {"row": 202, "column": 1}, "end_point": {"row": 202, "column": 5}}, {"id": 336, "type": "function_declarator", "text": "UpdateState(StackState aState)", "parent": 334, "children": [337, 338], "start_point": {"row": 202, "column": 6}, "end_point": {"row": 202, "column": 36}}, {"id": 337, "type": "identifier", "text": "UpdateState", "parent": 336, "children": [], "start_point": {"row": 202, "column": 6}, "end_point": {"row": 202, "column": 17}}, {"id": 338, "type": "parameter_list", "text": "(StackState aState)", "parent": 336, "children": [339], "start_point": {"row": 202, "column": 17}, "end_point": {"row": 202, "column": 36}}, {"id": 339, "type": "parameter_declaration", "text": "StackState aState", "parent": 338, "children": [340, 341], "start_point": {"row": 202, "column": 18}, "end_point": {"row": 202, "column": 35}}, {"id": 340, "type": "type_identifier", "text": "StackState", "parent": 339, "children": [], "start_point": {"row": 202, "column": 18}, "end_point": {"row": 202, "column": 28}}, {"id": 341, "type": "identifier", "text": "aState", "parent": 339, "children": [], "start_point": {"row": 202, "column": 29}, "end_point": {"row": 202, "column": 35}}, {"id": 342, "type": "declaration", "text": "void OnVtoUpdate();", "parent": 66, "children": [343, 344], "start_point": {"row": 204, "column": 1}, "end_point": {"row": 204, "column": 20}}, {"id": 343, "type": "primitive_type", "text": "void", "parent": 342, "children": [], "start_point": {"row": 204, "column": 1}, "end_point": {"row": 204, "column": 5}}, {"id": 344, "type": "function_declarator", "text": "OnVtoUpdate()", "parent": 342, "children": [345, 346], "start_point": {"row": 204, "column": 6}, "end_point": {"row": 204, "column": 19}}, {"id": 345, "type": "identifier", "text": "OnVtoUpdate", "parent": 344, "children": [], "start_point": {"row": 204, "column": 6}, "end_point": {"row": 204, "column": 17}}, {"id": 346, "type": "parameter_list", "text": "()", "parent": 344, "children": [], "start_point": {"row": 204, "column": 17}, "end_point": {"row": 204, "column": 19}}, {"id": 347, "type": "declaration", "text": "void OnDataUpdate();", "parent": 66, "children": [348, 349], "start_point": {"row": 205, "column": 1}, "end_point": {"row": 205, "column": 21}}, {"id": 348, "type": "primitive_type", "text": "void", "parent": 347, "children": [], "start_point": {"row": 205, "column": 1}, "end_point": {"row": 205, "column": 5}}, {"id": 349, "type": "function_declarator", "text": "OnDataUpdate()", "parent": 347, "children": [350, 351], "start_point": {"row": 205, "column": 6}, "end_point": {"row": 205, "column": 20}}, {"id": 350, "type": "identifier", "text": "OnDataUpdate", "parent": 349, "children": [], "start_point": {"row": 205, "column": 6}, "end_point": {"row": 205, "column": 18}}, {"id": 351, "type": "parameter_list", "text": "()", "parent": 349, "children": [], "start_point": {"row": 205, "column": 18}, "end_point": {"row": 205, "column": 20}}, {"id": 352, "type": "declaration", "text": "void OnUnsolTimerExpiration();", "parent": 66, "children": [353, 354], "start_point": {"row": 206, "column": 1}, "end_point": {"row": 206, "column": 31}}, {"id": 353, "type": "primitive_type", "text": "void", "parent": 352, "children": [], "start_point": {"row": 206, "column": 1}, "end_point": {"row": 206, "column": 5}}, {"id": 354, "type": "function_declarator", "text": "OnUnsolTimerExpiration()", "parent": 352, "children": [355, 356], "start_point": {"row": 206, "column": 6}, "end_point": {"row": 206, "column": 30}}, {"id": 355, "type": "identifier", "text": "OnUnsolTimerExpiration", "parent": 354, "children": [], "start_point": {"row": 206, "column": 6}, "end_point": {"row": 206, "column": 28}}, {"id": 356, "type": "parameter_list", "text": "()", "parent": 354, "children": [], "start_point": {"row": 206, "column": 28}, "end_point": {"row": 206, "column": 30}}, {"id": 357, "type": "declaration", "text": "void ConfigureAndSendSimpleResponse();", "parent": 66, "children": [358, 359], "start_point": {"row": 208, "column": 1}, "end_point": {"row": 208, "column": 39}}, {"id": 358, "type": "primitive_type", "text": "void", "parent": 357, "children": [], "start_point": {"row": 208, "column": 1}, "end_point": {"row": 208, "column": 5}}, {"id": 359, "type": "function_declarator", "text": "ConfigureAndSendSimpleResponse()", "parent": 357, "children": [360, 361], "start_point": {"row": 208, "column": 6}, "end_point": {"row": 208, "column": 38}}, {"id": 360, "type": "identifier", "text": "ConfigureAndSendSimpleResponse", "parent": 359, "children": [], "start_point": {"row": 208, "column": 6}, "end_point": {"row": 208, "column": 36}}, {"id": 361, "type": "parameter_list", "text": "()", "parent": 359, "children": [], "start_point": {"row": 208, "column": 36}, "end_point": {"row": 208, "column": 38}}, {"id": 362, "type": "declaration", "text": "void Send(APDU&);", "parent": 66, "children": [363, 364], "start_point": {"row": 209, "column": 1}, "end_point": {"row": 209, "column": 18}}, {"id": 363, "type": "primitive_type", "text": "void", "parent": 362, "children": [], "start_point": {"row": 209, "column": 1}, "end_point": {"row": 209, "column": 5}}, {"id": 364, "type": "function_declarator", "text": "Send(APDU&)", "parent": 362, "children": [365, 366], "start_point": {"row": 209, "column": 6}, "end_point": {"row": 209, "column": 17}}, {"id": 365, "type": "identifier", "text": "Send", "parent": 364, "children": [], "start_point": {"row": 209, "column": 6}, "end_point": {"row": 209, "column": 10}}, {"id": 366, "type": "parameter_list", "text": "(APDU&)", "parent": 364, "children": [367], "start_point": {"row": 209, "column": 10}, "end_point": {"row": 209, "column": 17}}, {"id": 367, "type": "parameter_declaration", "text": "APDU", "parent": 366, "children": [368], "start_point": {"row": 209, "column": 11}, "end_point": {"row": 209, "column": 15}}, {"id": 368, "type": "type_identifier", "text": "APDU", "parent": 367, "children": [], "start_point": {"row": 209, "column": 11}, "end_point": {"row": 209, "column": 15}}, {"id": 369, "type": "declaration", "text": "void Send(APDU& arAPDU, const IINField& arIIN);", "parent": 66, "children": [370, 371], "start_point": {"row": 210, "column": 1}, "end_point": {"row": 210, "column": 48}}, {"id": 370, "type": "primitive_type", "text": "void", "parent": 369, "children": [], "start_point": {"row": 210, "column": 1}, "end_point": {"row": 210, "column": 5}}, {"id": 371, "type": "function_declarator", "text": "Send(APDU& arAPDU, const IINField& arIIN)", "parent": 369, "children": [372, 373], "start_point": {"row": 210, "column": 6}, "end_point": {"row": 210, "column": 47}}, {"id": 372, "type": "identifier", "text": "Send", "parent": 371, "children": [], "start_point": {"row": 210, "column": 6}, "end_point": {"row": 210, "column": 10}}, {"id": 373, "type": "parameter_list", "text": "(APDU& arAPDU, const IINField& arIIN)", "parent": 371, "children": [374, 377], "start_point": {"row": 210, "column": 10}, "end_point": {"row": 210, "column": 47}}, {"id": 374, "type": "parameter_declaration", "text": "APDU& arAPDU", "parent": 373, "children": [375, 376], "start_point": {"row": 210, "column": 11}, "end_point": {"row": 210, "column": 23}}, {"id": 375, "type": "type_identifier", "text": "APDU", "parent": 374, "children": [], "start_point": {"row": 210, "column": 11}, "end_point": {"row": 210, "column": 15}}, {"id": 376, "type": "identifier", "text": "arAPDU", "parent": 374, "children": [], "start_point": {"row": 210, "column": 17}, "end_point": {"row": 210, "column": 23}}, {"id": 377, "type": "parameter_declaration", "text": "const IINField& arIIN", "parent": 373, "children": [378, 379], "start_point": {"row": 210, "column": 25}, "end_point": {"row": 210, "column": 46}}, {"id": 378, "type": "type_identifier", "text": "IINField", "parent": 377, "children": [], "start_point": {"row": 210, "column": 31}, "end_point": {"row": 210, "column": 39}}, {"id": 379, "type": "identifier", "text": "arIIN", "parent": 377, "children": [], "start_point": {"row": 210, "column": 41}, "end_point": {"row": 210, "column": 46}}, {"id": 380, "type": "declaration", "text": "void SendUnsolicited(APDU& arAPDU);", "parent": 66, "children": [381, 382], "start_point": {"row": 211, "column": 1}, "end_point": {"row": 211, "column": 36}}, {"id": 381, "type": "primitive_type", "text": "void", "parent": 380, "children": [], "start_point": {"row": 211, "column": 1}, "end_point": {"row": 211, "column": 5}}, {"id": 382, "type": "function_declarator", "text": "SendUnsolicited(APDU& arAPDU)", "parent": 380, "children": [383, 384], "start_point": {"row": 211, "column": 6}, "end_point": {"row": 211, "column": 35}}, {"id": 383, "type": "identifier", "text": "SendUnsolicited", "parent": 382, "children": [], "start_point": {"row": 211, "column": 6}, "end_point": {"row": 211, "column": 21}}, {"id": 384, "type": "parameter_list", "text": "(APDU& arAPDU)", "parent": 382, "children": [385], "start_point": {"row": 211, "column": 21}, "end_point": {"row": 211, "column": 35}}, {"id": 385, "type": "parameter_declaration", "text": "APDU& arAPDU", "parent": 384, "children": [386, 387], "start_point": {"row": 211, "column": 22}, "end_point": {"row": 211, "column": 34}}, {"id": 386, "type": "type_identifier", "text": "APDU", "parent": 385, "children": [], "start_point": {"row": 211, "column": 22}, "end_point": {"row": 211, "column": 26}}, {"id": 387, "type": "identifier", "text": "arAPDU", "parent": 385, "children": [], "start_point": {"row": 211, "column": 28}, "end_point": {"row": 211, "column": 34}}, {"id": 388, "type": "declaration", "text": "void HandleWrite(const APDU& arRequest);", "parent": 66, "children": [389, 390], "start_point": {"row": 213, "column": 1}, "end_point": {"row": 213, "column": 41}}, {"id": 389, "type": "primitive_type", "text": "void", "parent": 388, "children": [], "start_point": {"row": 213, "column": 1}, "end_point": {"row": 213, "column": 5}}, {"id": 390, "type": "function_declarator", "text": "HandleWrite(const APDU& arRequest)", "parent": 388, "children": [391, 392], "start_point": {"row": 213, "column": 6}, "end_point": {"row": 213, "column": 40}}, {"id": 391, "type": "identifier", "text": "HandleWrite", "parent": 390, "children": [], "start_point": {"row": 213, "column": 6}, "end_point": {"row": 213, "column": 17}}, {"id": 392, "type": "parameter_list", "text": "(const APDU& arRequest)", "parent": 390, "children": [393], "start_point": {"row": 213, "column": 17}, "end_point": {"row": 213, "column": 40}}, {"id": 393, "type": "parameter_declaration", "text": "const APDU& arRequest", "parent": 392, "children": [394, 395], "start_point": {"row": 213, "column": 18}, "end_point": {"row": 213, "column": 39}}, {"id": 394, "type": "type_identifier", "text": "APDU", "parent": 393, "children": [], "start_point": {"row": 213, "column": 24}, "end_point": {"row": 213, "column": 28}}, {"id": 395, "type": "identifier", "text": "arRequest", "parent": 393, "children": [], "start_point": {"row": 213, "column": 30}, "end_point": {"row": 213, "column": 39}}, {"id": 396, "type": "declaration", "text": "void HandleVtoTransfer(const APDU& arRequest);", "parent": 66, "children": [397, 398], "start_point": {"row": 214, "column": 1}, "end_point": {"row": 214, "column": 47}}, {"id": 397, "type": "primitive_type", "text": "void", "parent": 396, "children": [], "start_point": {"row": 214, "column": 1}, "end_point": {"row": 214, "column": 5}}, {"id": 398, "type": "function_declarator", "text": "HandleVtoTransfer(const APDU& arRequest)", "parent": 396, "children": [399, 400], "start_point": {"row": 214, "column": 6}, "end_point": {"row": 214, "column": 46}}, {"id": 399, "type": "identifier", "text": "HandleVtoTransfer", "parent": 398, "children": [], "start_point": {"row": 214, "column": 6}, "end_point": {"row": 214, "column": 23}}, {"id": 400, "type": "parameter_list", "text": "(const APDU& arRequest)", "parent": 398, "children": [401], "start_point": {"row": 214, "column": 23}, "end_point": {"row": 214, "column": 46}}, {"id": 401, "type": "parameter_declaration", "text": "const APDU& arRequest", "parent": 400, "children": [402, 403], "start_point": {"row": 214, "column": 24}, "end_point": {"row": 214, "column": 45}}, {"id": 402, "type": "type_identifier", "text": "APDU", "parent": 401, "children": [], "start_point": {"row": 214, "column": 30}, "end_point": {"row": 214, "column": 34}}, {"id": 403, "type": "identifier", "text": "arRequest", "parent": 401, "children": [], "start_point": {"row": 214, "column": 36}, "end_point": {"row": 214, "column": 45}}, {"id": 404, "type": "declaration", "text": "void HandleWriteIIN(HeaderReadIterator& arHdr);", "parent": 66, "children": [405, 406], "start_point": {"row": 215, "column": 1}, "end_point": {"row": 215, "column": 48}}, {"id": 405, "type": "primitive_type", "text": "void", "parent": 404, "children": [], "start_point": {"row": 215, "column": 1}, "end_point": {"row": 215, "column": 5}}, {"id": 406, "type": "function_declarator", "text": "HandleWriteIIN(HeaderReadIterator& arHdr)", "parent": 404, "children": [407, 408], "start_point": {"row": 215, "column": 6}, "end_point": {"row": 215, "column": 47}}, {"id": 407, "type": "identifier", "text": "HandleWriteIIN", "parent": 406, "children": [], "start_point": {"row": 215, "column": 6}, "end_point": {"row": 215, "column": 20}}, {"id": 408, "type": "parameter_list", "text": "(HeaderReadIterator& arHdr)", "parent": 406, "children": [409], "start_point": {"row": 215, "column": 20}, "end_point": {"row": 215, "column": 47}}, {"id": 409, "type": "parameter_declaration", "text": "HeaderReadIterator& arHdr", "parent": 408, "children": [410, 411], "start_point": {"row": 215, "column": 21}, "end_point": {"row": 215, "column": 46}}, {"id": 410, "type": "type_identifier", "text": "HeaderReadIterator", "parent": 409, "children": [], "start_point": {"row": 215, "column": 21}, "end_point": {"row": 215, "column": 39}}, {"id": 411, "type": "identifier", "text": "arHdr", "parent": 409, "children": [], "start_point": {"row": 215, "column": 41}, "end_point": {"row": 215, "column": 46}}, {"id": 412, "type": "declaration", "text": "void HandleWriteTimeDate(HeaderReadIterator& arHWI);", "parent": 66, "children": [413, 414], "start_point": {"row": 216, "column": 1}, "end_point": {"row": 216, "column": 53}}, {"id": 413, "type": "primitive_type", "text": "void", "parent": 412, "children": [], "start_point": {"row": 216, "column": 1}, "end_point": {"row": 216, "column": 5}}, {"id": 414, "type": "function_declarator", "text": "HandleWriteTimeDate(HeaderReadIterator& arHWI)", "parent": 412, "children": [415, 416], "start_point": {"row": 216, "column": 6}, "end_point": {"row": 216, "column": 52}}, {"id": 415, "type": "identifier", "text": "HandleWriteTimeDate", "parent": 414, "children": [], "start_point": {"row": 216, "column": 6}, "end_point": {"row": 216, "column": 25}}, {"id": 416, "type": "parameter_list", "text": "(HeaderReadIterator& arHWI)", "parent": 414, "children": [417], "start_point": {"row": 216, "column": 25}, "end_point": {"row": 216, "column": 52}}, {"id": 417, "type": "parameter_declaration", "text": "HeaderReadIterator& arHWI", "parent": 416, "children": [418, 419], "start_point": {"row": 216, "column": 26}, "end_point": {"row": 216, "column": 51}}, {"id": 418, "type": "type_identifier", "text": "HeaderReadIterator", "parent": 417, "children": [], "start_point": {"row": 216, "column": 26}, "end_point": {"row": 216, "column": 44}}, {"id": 419, "type": "identifier", "text": "arHWI", "parent": 417, "children": [], "start_point": {"row": 216, "column": 46}, "end_point": {"row": 216, "column": 51}}, {"id": 420, "type": "declaration", "text": "void HandleWriteVto(HeaderReadIterator& arHdr);", "parent": 66, "children": [421, 422], "start_point": {"row": 217, "column": 1}, "end_point": {"row": 217, "column": 48}}, {"id": 421, "type": "primitive_type", "text": "void", "parent": 420, "children": [], "start_point": {"row": 217, "column": 1}, "end_point": {"row": 217, "column": 5}}, {"id": 422, "type": "function_declarator", "text": "HandleWriteVto(HeaderReadIterator& arHdr)", "parent": 420, "children": [423, 424], "start_point": {"row": 217, "column": 6}, "end_point": {"row": 217, "column": 47}}, {"id": 423, "type": "identifier", "text": "HandleWriteVto", "parent": 422, "children": [], "start_point": {"row": 217, "column": 6}, "end_point": {"row": 217, "column": 20}}, {"id": 424, "type": "parameter_list", "text": "(HeaderReadIterator& arHdr)", "parent": 422, "children": [425], "start_point": {"row": 217, "column": 20}, "end_point": {"row": 217, "column": 47}}, {"id": 425, "type": "parameter_declaration", "text": "HeaderReadIterator& arHdr", "parent": 424, "children": [426, 427], "start_point": {"row": 217, "column": 21}, "end_point": {"row": 217, "column": 46}}, {"id": 426, "type": "type_identifier", "text": "HeaderReadIterator", "parent": 425, "children": [], "start_point": {"row": 217, "column": 21}, "end_point": {"row": 217, "column": 39}}, {"id": 427, "type": "identifier", "text": "arHdr", "parent": 425, "children": [], "start_point": {"row": 217, "column": 41}, "end_point": {"row": 217, "column": 46}}, {"id": 428, "type": "declaration", "text": "void HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo);", "parent": 66, "children": [429, 430], "start_point": {"row": 218, "column": 1}, "end_point": {"row": 218, "column": 65}}, {"id": 429, "type": "primitive_type", "text": "void", "parent": 428, "children": [], "start_point": {"row": 218, "column": 1}, "end_point": {"row": 218, "column": 5}}, {"id": 430, "type": "function_declarator", "text": "HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo)", "parent": 428, "children": [431, 432], "start_point": {"row": 218, "column": 6}, "end_point": {"row": 218, "column": 64}}, {"id": 431, "type": "identifier", "text": "HandleSelect", "parent": 430, "children": [], "start_point": {"row": 218, "column": 6}, "end_point": {"row": 218, "column": 18}}, {"id": 432, "type": "parameter_list", "text": "(const APDU& arRequest, SequenceInfo aSeqInfo)", "parent": 430, "children": [433, 436], "start_point": {"row": 218, "column": 18}, "end_point": {"row": 218, "column": 64}}, {"id": 433, "type": "parameter_declaration", "text": "const APDU& arRequest", "parent": 432, "children": [434, 435], "start_point": {"row": 218, "column": 19}, "end_point": {"row": 218, "column": 40}}, {"id": 434, "type": "type_identifier", "text": "APDU", "parent": 433, "children": [], "start_point": {"row": 218, "column": 25}, "end_point": {"row": 218, "column": 29}}, {"id": 435, "type": "identifier", "text": "arRequest", "parent": 433, "children": [], "start_point": {"row": 218, "column": 31}, "end_point": {"row": 218, "column": 40}}, {"id": 436, "type": "parameter_declaration", "text": "SequenceInfo aSeqInfo", "parent": 432, "children": [437, 438], "start_point": {"row": 218, "column": 42}, "end_point": {"row": 218, "column": 63}}, {"id": 437, "type": "type_identifier", "text": "SequenceInfo", "parent": 436, "children": [], "start_point": {"row": 218, "column": 42}, "end_point": {"row": 218, "column": 54}}, {"id": 438, "type": "identifier", "text": "aSeqInfo", "parent": 436, "children": [], "start_point": {"row": 218, "column": 55}, "end_point": {"row": 218, "column": 63}}, {"id": 439, "type": "declaration", "text": "void HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo);", "parent": 66, "children": [440, 441], "start_point": {"row": 219, "column": 1}, "end_point": {"row": 219, "column": 66}}, {"id": 440, "type": "primitive_type", "text": "void", "parent": 439, "children": [], "start_point": {"row": 219, "column": 1}, "end_point": {"row": 219, "column": 5}}, {"id": 441, "type": "function_declarator", "text": "HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo)", "parent": 439, "children": [442, 443], "start_point": {"row": 219, "column": 6}, "end_point": {"row": 219, "column": 65}}, {"id": 442, "type": "identifier", "text": "HandleOperate", "parent": 441, "children": [], "start_point": {"row": 219, "column": 6}, "end_point": {"row": 219, "column": 19}}, {"id": 443, "type": "parameter_list", "text": "(const APDU& arRequest, SequenceInfo aSeqInfo)", "parent": 441, "children": [444, 447], "start_point": {"row": 219, "column": 19}, "end_point": {"row": 219, "column": 65}}, {"id": 444, "type": "parameter_declaration", "text": "const APDU& arRequest", "parent": 443, "children": [445, 446], "start_point": {"row": 219, "column": 20}, "end_point": {"row": 219, "column": 41}}, {"id": 445, "type": "type_identifier", "text": "APDU", "parent": 444, "children": [], "start_point": {"row": 219, "column": 26}, "end_point": {"row": 219, "column": 30}}, {"id": 446, "type": "identifier", "text": "arRequest", "parent": 444, "children": [], "start_point": {"row": 219, "column": 32}, "end_point": {"row": 219, "column": 41}}, {"id": 447, "type": "parameter_declaration", "text": "SequenceInfo aSeqInfo", "parent": 443, "children": [448, 449], "start_point": {"row": 219, "column": 43}, "end_point": {"row": 219, "column": 64}}, {"id": 448, "type": "type_identifier", "text": "SequenceInfo", "parent": 447, "children": [], "start_point": {"row": 219, "column": 43}, "end_point": {"row": 219, "column": 55}}, {"id": 449, "type": "identifier", "text": "aSeqInfo", "parent": 447, "children": [], "start_point": {"row": 219, "column": 56}, "end_point": {"row": 219, "column": 64}}, {"id": 450, "type": "declaration", "text": "void HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo);", "parent": 66, "children": [451, 452], "start_point": {"row": 220, "column": 1}, "end_point": {"row": 220, "column": 72}}, {"id": 451, "type": "primitive_type", "text": "void", "parent": 450, "children": [], "start_point": {"row": 220, "column": 1}, "end_point": {"row": 220, "column": 5}}, {"id": 452, "type": "function_declarator", "text": "HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo)", "parent": 450, "children": [453, 454], "start_point": {"row": 220, "column": 6}, "end_point": {"row": 220, "column": 71}}, {"id": 453, "type": "identifier", "text": "HandleDirectOperate", "parent": 452, "children": [], "start_point": {"row": 220, "column": 6}, "end_point": {"row": 220, "column": 25}}, {"id": 454, "type": "parameter_list", "text": "(const APDU& arRequest, SequenceInfo aSeqInfo)", "parent": 452, "children": [455, 458], "start_point": {"row": 220, "column": 25}, "end_point": {"row": 220, "column": 71}}, {"id": 455, "type": "parameter_declaration", "text": "const APDU& arRequest", "parent": 454, "children": [456, 457], "start_point": {"row": 220, "column": 26}, "end_point": {"row": 220, "column": 47}}, {"id": 456, "type": "type_identifier", "text": "APDU", "parent": 455, "children": [], "start_point": {"row": 220, "column": 32}, "end_point": {"row": 220, "column": 36}}, {"id": 457, "type": "identifier", "text": "arRequest", "parent": 455, "children": [], "start_point": {"row": 220, "column": 38}, "end_point": {"row": 220, "column": 47}}, {"id": 458, "type": "parameter_declaration", "text": "SequenceInfo aSeqInfo", "parent": 454, "children": [459, 460], "start_point": {"row": 220, "column": 49}, "end_point": {"row": 220, "column": 70}}, {"id": 459, "type": "type_identifier", "text": "SequenceInfo", "parent": 458, "children": [], "start_point": {"row": 220, "column": 49}, "end_point": {"row": 220, "column": 61}}, {"id": 460, "type": "identifier", "text": "aSeqInfo", "parent": 458, "children": [], "start_point": {"row": 220, "column": 62}, "end_point": {"row": 220, "column": 70}}, {"id": 461, "type": "declaration", "text": "void HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable);", "parent": 66, "children": [462, 463], "start_point": {"row": 221, "column": 1}, "end_point": {"row": 221, "column": 69}}, {"id": 462, "type": "primitive_type", "text": "void", "parent": 461, "children": [], "start_point": {"row": 221, "column": 1}, "end_point": {"row": 221, "column": 5}}, {"id": 463, "type": "function_declarator", "text": "HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable)", "parent": 461, "children": [464, 465], "start_point": {"row": 221, "column": 6}, "end_point": {"row": 221, "column": 68}}, {"id": 464, "type": "identifier", "text": "HandleEnableUnsolicited", "parent": 463, "children": [], "start_point": {"row": 221, "column": 6}, "end_point": {"row": 221, "column": 29}}, {"id": 465, "type": "parameter_list", "text": "(const APDU& arRequest, bool aIsEnable)", "parent": 463, "children": [466, 469], "start_point": {"row": 221, "column": 29}, "end_point": {"row": 221, "column": 68}}, {"id": 466, "type": "parameter_declaration", "text": "const APDU& arRequest", "parent": 465, "children": [467, 468], "start_point": {"row": 221, "column": 30}, "end_point": {"row": 221, "column": 51}}, {"id": 467, "type": "type_identifier", "text": "APDU", "parent": 466, "children": [], "start_point": {"row": 221, "column": 36}, "end_point": {"row": 221, "column": 40}}, {"id": 468, "type": "identifier", "text": "arRequest", "parent": 466, "children": [], "start_point": {"row": 221, "column": 42}, "end_point": {"row": 221, "column": 51}}, {"id": 469, "type": "parameter_declaration", "text": "bool aIsEnable", "parent": 465, "children": [470, 471], "start_point": {"row": 221, "column": 53}, "end_point": {"row": 221, "column": 67}}, {"id": 470, "type": "primitive_type", "text": "bool", "parent": 469, "children": [], "start_point": {"row": 221, "column": 53}, "end_point": {"row": 221, "column": 57}}, {"id": 471, "type": "identifier", "text": "aIsEnable", "parent": 469, "children": [], "start_point": {"row": 221, "column": 58}, "end_point": {"row": 221, "column": 67}}, {"id": 472, "type": "declaration", "text": "void HandleUnknown();", "parent": 66, "children": [473, 474], "start_point": {"row": 222, "column": 1}, "end_point": {"row": 222, "column": 22}}, {"id": 473, "type": "primitive_type", "text": "void", "parent": 472, "children": [], "start_point": {"row": 222, "column": 1}, "end_point": {"row": 222, "column": 5}}, {"id": 474, "type": "function_declarator", "text": "HandleUnknown()", "parent": 472, "children": [475, 476], "start_point": {"row": 222, "column": 6}, "end_point": {"row": 222, "column": 21}}, {"id": 475, "type": "identifier", "text": "HandleUnknown", "parent": 474, "children": [], "start_point": {"row": 222, "column": 6}, "end_point": {"row": 222, "column": 19}}, {"id": 476, "type": "parameter_list", "text": "()", "parent": 474, "children": [], "start_point": {"row": 222, "column": 19}, "end_point": {"row": 222, "column": 21}}, {"id": 477, "type": "declaration", "text": "void ConfigureDelayMeasurement(const APDU& arRequest);", "parent": 66, "children": [478, 479], "start_point": {"row": 224, "column": 1}, "end_point": {"row": 224, "column": 55}}, {"id": 478, "type": "primitive_type", "text": "void", "parent": 477, "children": [], "start_point": {"row": 224, "column": 1}, "end_point": {"row": 224, "column": 5}}, {"id": 479, "type": "function_declarator", "text": "ConfigureDelayMeasurement(const APDU& arRequest)", "parent": 477, "children": [480, 481], "start_point": {"row": 224, "column": 6}, "end_point": {"row": 224, "column": 54}}, {"id": 480, "type": "identifier", "text": "ConfigureDelayMeasurement", "parent": 479, "children": [], "start_point": {"row": 224, "column": 6}, "end_point": {"row": 224, "column": 31}}, {"id": 481, "type": "parameter_list", "text": "(const APDU& arRequest)", "parent": 479, "children": [482], "start_point": {"row": 224, "column": 31}, "end_point": {"row": 224, "column": 54}}, {"id": 482, "type": "parameter_declaration", "text": "const APDU& arRequest", "parent": 481, "children": [483, 484], "start_point": {"row": 224, "column": 32}, "end_point": {"row": 224, "column": 53}}, {"id": 483, "type": "type_identifier", "text": "APDU", "parent": 482, "children": [], "start_point": {"row": 224, "column": 38}, "end_point": {"row": 224, "column": 42}}, {"id": 484, "type": "identifier", "text": "arRequest", "parent": 482, "children": [], "start_point": {"row": 224, "column": 44}, "end_point": {"row": 224, "column": 53}}, {"id": 485, "type": "declaration", "text": "void CreateResponseContext(const APDU& arRequest);", "parent": 66, "children": [486, 487], "start_point": {"row": 225, "column": 1}, "end_point": {"row": 225, "column": 51}}, {"id": 486, "type": "primitive_type", "text": "void", "parent": 485, "children": [], "start_point": {"row": 225, "column": 1}, "end_point": {"row": 225, "column": 5}}, {"id": 487, "type": "function_declarator", "text": "CreateResponseContext(const APDU& arRequest)", "parent": 485, "children": [488, 489], "start_point": {"row": 225, "column": 6}, "end_point": {"row": 225, "column": 50}}, {"id": 488, "type": "identifier", "text": "CreateResponseContext", "parent": 487, "children": [], "start_point": {"row": 225, "column": 6}, "end_point": {"row": 225, "column": 27}}, {"id": 489, "type": "parameter_list", "text": "(const APDU& arRequest)", "parent": 487, "children": [490], "start_point": {"row": 225, "column": 27}, "end_point": {"row": 225, "column": 50}}, {"id": 490, "type": "parameter_declaration", "text": "const APDU& arRequest", "parent": 489, "children": [491, 492], "start_point": {"row": 225, "column": 28}, "end_point": {"row": 225, "column": 49}}, {"id": 491, "type": "type_identifier", "text": "APDU", "parent": 490, "children": [], "start_point": {"row": 225, "column": 34}, "end_point": {"row": 225, "column": 38}}, {"id": 492, "type": "identifier", "text": "arRequest", "parent": 490, "children": [], "start_point": {"row": 225, "column": 40}, "end_point": {"row": 225, "column": 49}}, {"id": 493, "type": "declaration", "text": "size_t FlushVtoUpdates();", "parent": 66, "children": [494, 495], "start_point": {"row": 229, "column": 1}, "end_point": {"row": 229, "column": 26}}, {"id": 494, "type": "primitive_type", "text": "size_t", "parent": 493, "children": [], "start_point": {"row": 229, "column": 1}, "end_point": {"row": 229, "column": 7}}, {"id": 495, "type": "function_declarator", "text": "FlushVtoUpdates()", "parent": 493, "children": [496, 497], "start_point": {"row": 229, "column": 8}, "end_point": {"row": 229, "column": 25}}, {"id": 496, "type": "identifier", "text": "FlushVtoUpdates", "parent": 495, "children": [], "start_point": {"row": 229, "column": 8}, "end_point": {"row": 229, "column": 23}}, {"id": 497, "type": "parameter_list", "text": "()", "parent": 495, "children": [], "start_point": {"row": 229, "column": 23}, "end_point": {"row": 229, "column": 25}}, {"id": 498, "type": "declaration", "text": "size_t FlushUpdates();", "parent": 66, "children": [499, 500], "start_point": {"row": 230, "column": 1}, "end_point": {"row": 230, "column": 23}}, {"id": 499, "type": "primitive_type", "text": "size_t", "parent": 498, "children": [], "start_point": {"row": 230, "column": 1}, "end_point": {"row": 230, "column": 7}}, {"id": 500, "type": "function_declarator", "text": "FlushUpdates()", "parent": 498, "children": [501, 502], "start_point": {"row": 230, "column": 8}, "end_point": {"row": 230, "column": 22}}, {"id": 501, "type": "identifier", "text": "FlushUpdates", "parent": 500, "children": [], "start_point": {"row": 230, "column": 8}, "end_point": {"row": 230, "column": 20}}, {"id": 502, "type": "parameter_list", "text": "()", "parent": 500, "children": [], "start_point": {"row": 230, "column": 20}, "end_point": {"row": 230, "column": 22}}, {"id": 503, "type": "declaration", "text": "void FlushDeferredEvents();", "parent": 66, "children": [504, 505], "start_point": {"row": 231, "column": 1}, "end_point": {"row": 231, "column": 28}}, {"id": 504, "type": "primitive_type", "text": "void", "parent": 503, "children": [], "start_point": {"row": 231, "column": 1}, "end_point": {"row": 231, "column": 5}}, {"id": 505, "type": "function_declarator", "text": "FlushDeferredEvents()", "parent": 503, "children": [506, 507], "start_point": {"row": 231, "column": 6}, "end_point": {"row": 231, "column": 27}}, {"id": 506, "type": "identifier", "text": "FlushDeferredEvents", "parent": 505, "children": [], "start_point": {"row": 231, "column": 6}, "end_point": {"row": 231, "column": 25}}, {"id": 507, "type": "parameter_list", "text": "()", "parent": 505, "children": [], "start_point": {"row": 231, "column": 25}, "end_point": {"row": 231, "column": 27}}, {"id": 508, "type": "declaration", "text": "void StartUnsolTimer(millis_t aTimeout);", "parent": 66, "children": [509, 510], "start_point": {"row": 232, "column": 1}, "end_point": {"row": 232, "column": 41}}, {"id": 509, "type": "primitive_type", "text": "void", "parent": 508, "children": [], "start_point": {"row": 232, "column": 1}, "end_point": {"row": 232, "column": 5}}, {"id": 510, "type": "function_declarator", "text": "StartUnsolTimer(millis_t aTimeout)", "parent": 508, "children": [511, 512], "start_point": {"row": 232, "column": 6}, "end_point": {"row": 232, "column": 40}}, {"id": 511, "type": "identifier", "text": "StartUnsolTimer", "parent": 510, "children": [], "start_point": {"row": 232, "column": 6}, "end_point": {"row": 232, "column": 21}}, {"id": 512, "type": "parameter_list", "text": "(millis_t aTimeout)", "parent": 510, "children": [513], "start_point": {"row": 232, "column": 21}, "end_point": {"row": 232, "column": 40}}, {"id": 513, "type": "parameter_declaration", "text": "millis_t aTimeout", "parent": 512, "children": [514, 515], "start_point": {"row": 232, "column": 22}, "end_point": {"row": 232, "column": 39}}, {"id": 514, "type": "type_identifier", "text": "millis_t", "parent": 513, "children": [], "start_point": {"row": 232, "column": 22}, "end_point": {"row": 232, "column": 30}}, {"id": 515, "type": "identifier", "text": "aTimeout", "parent": 513, "children": [], "start_point": {"row": 232, "column": 31}, "end_point": {"row": 232, "column": 39}}, {"id": 516, "type": "declaration", "text": "void ResetTimeIIN();", "parent": 66, "children": [517, 518], "start_point": {"row": 236, "column": 1}, "end_point": {"row": 236, "column": 21}}, {"id": 517, "type": "primitive_type", "text": "void", "parent": 516, "children": [], "start_point": {"row": 236, "column": 1}, "end_point": {"row": 236, "column": 5}}, {"id": 518, "type": "function_declarator", "text": "ResetTimeIIN()", "parent": 516, "children": [519, 520], "start_point": {"row": 236, "column": 6}, "end_point": {"row": 236, "column": 20}}, {"id": 519, "type": "identifier", "text": "ResetTimeIIN", "parent": 518, "children": [], "start_point": {"row": 236, "column": 6}, "end_point": {"row": 236, "column": 18}}, {"id": 520, "type": "parameter_list", "text": "()", "parent": 518, "children": [], "start_point": {"row": 236, "column": 18}, "end_point": {"row": 236, "column": 20}}, {"id": 521, "type": "declaration", "text": "ITimer* mpTimeTimer;", "parent": 66, "children": [522, 523], "start_point": {"row": 237, "column": 1}, "end_point": {"row": 237, "column": 21}}, {"id": 522, "type": "type_identifier", "text": "ITimer", "parent": 521, "children": [], "start_point": {"row": 237, "column": 1}, "end_point": {"row": 237, "column": 7}}, {"id": 523, "type": "pointer_declarator", "text": "* mpTimeTimer", "parent": 521, "children": [524, 525], "start_point": {"row": 237, "column": 7}, "end_point": {"row": 237, "column": 20}}, {"id": 524, "type": "*", "text": "*", "parent": 523, "children": [], "start_point": {"row": 237, "column": 7}, "end_point": {"row": 237, "column": 8}}, {"id": 525, "type": "identifier", "text": "mpTimeTimer", "parent": 523, "children": [], "start_point": {"row": 237, "column": 9}, "end_point": {"row": 237, "column": 20}}, {"id": 526, "type": "declaration", "text": "VtoReader mVtoReader;", "parent": 66, "children": [527, 528], "start_point": {"row": 245, "column": 1}, "end_point": {"row": 245, "column": 22}}, {"id": 527, "type": "type_identifier", "text": "VtoReader", "parent": 526, "children": [], "start_point": {"row": 245, "column": 1}, "end_point": {"row": 245, "column": 10}}, {"id": 528, "type": "identifier", "text": "mVtoReader", "parent": 526, "children": [], "start_point": {"row": 245, "column": 11}, "end_point": {"row": 245, "column": 21}}, {"id": 529, "type": "declaration", "text": "VtoWriter mVtoWriter;", "parent": 66, "children": [530, 531], "start_point": {"row": 252, "column": 1}, "end_point": {"row": 252, "column": 22}}, {"id": 530, "type": "type_identifier", "text": "VtoWriter", "parent": 529, "children": [], "start_point": {"row": 252, "column": 1}, "end_point": {"row": 252, "column": 10}}, {"id": 531, "type": "identifier", "text": "mVtoWriter", "parent": 529, "children": [], "start_point": {"row": 252, "column": 11}, "end_point": {"row": 252, "column": 21}}, {"id": 532, "type": "ERROR", "text": "template <class T>\n\tstruct CommandFunc", "parent": 66, "children": [533, 541], "start_point": {"row": 257, "column": 1}, "end_point": {"row": 258, "column": 19}}, {"id": 533, "type": "binary_expression", "text": "template <class T>\n\tstruct", "parent": 532, "children": [534, 537, 539, 540], "start_point": {"row": 257, "column": 1}, "end_point": {"row": 258, "column": 7}}, {"id": 534, "type": "binary_expression", "text": "template <class", "parent": 533, "children": [535, 536], "start_point": {"row": 257, "column": 1}, "end_point": {"row": 257, "column": 16}}, {"id": 535, "type": "identifier", "text": "template", "parent": 534, "children": [], "start_point": {"row": 257, "column": 1}, "end_point": {"row": 257, "column": 9}}, {"id": 536, "type": "<", "text": "<", "parent": 534, "children": [], "start_point": {"row": 257, "column": 10}, "end_point": {"row": 257, "column": 11}}, {"id": 537, "type": "ERROR", "text": "T", "parent": 533, "children": [538], "start_point": {"row": 257, "column": 17}, "end_point": {"row": 257, "column": 18}}, {"id": 538, "type": "identifier", "text": "T", "parent": 537, "children": [], "start_point": {"row": 257, "column": 17}, "end_point": {"row": 257, "column": 18}}, {"id": 539, "type": ">", "text": ">", "parent": 533, "children": [], "start_point": {"row": 257, "column": 18}, "end_point": {"row": 257, "column": 19}}, {"id": 540, "type": "identifier", "text": "struct", "parent": 533, "children": [], "start_point": {"row": 258, "column": 1}, "end_point": {"row": 258, "column": 7}}, {"id": 541, "type": "identifier", "text": "CommandFunc", "parent": 532, "children": [], "start_point": {"row": 258, "column": 8}, "end_point": {"row": 258, "column": 19}}, {"id": 542, "type": "type_definition", "text": "typedef std::function<CommandStatus (T&, size_t)> Type;", "parent": 66, "children": [543, 544, 545, 555], "start_point": {"row": 259, "column": 2}, "end_point": {"row": 259, "column": 57}}, {"id": 543, "type": "typedef", "text": "typedef", "parent": 542, "children": [], "start_point": {"row": 259, "column": 2}, "end_point": {"row": 259, "column": 9}}, {"id": 544, "type": "type_identifier", "text": "std", "parent": 542, "children": [], "start_point": {"row": 259, "column": 10}, "end_point": {"row": 259, "column": 13}}, {"id": 545, "type": "ERROR", "text": "::function<CommandStatus (T&, size_t)>", "parent": 542, "children": [546, 547, 554], "start_point": {"row": 259, "column": 13}, "end_point": {"row": 259, "column": 51}}, {"id": 546, "type": "<", "text": "<", "parent": 545, "children": [], "start_point": {"row": 259, "column": 23}, "end_point": {"row": 259, "column": 24}}, {"id": 547, "type": "function_declarator", "text": "CommandStatus (T&, size_t)", "parent": 545, "children": [548, 549], "start_point": {"row": 259, "column": 24}, "end_point": {"row": 259, "column": 50}}, {"id": 548, "type": "type_identifier", "text": "CommandStatus", "parent": 547, "children": [], "start_point": {"row": 259, "column": 24}, "end_point": {"row": 259, "column": 37}}, {"id": 549, "type": "parameter_list", "text": "(T&, size_t)", "parent": 547, "children": [550, 552], "start_point": {"row": 259, "column": 38}, "end_point": {"row": 259, "column": 50}}, {"id": 550, "type": "parameter_declaration", "text": "T", "parent": 549, "children": [551], "start_point": {"row": 259, "column": 39}, "end_point": {"row": 259, "column": 40}}, {"id": 551, "type": "type_identifier", "text": "T", "parent": 550, "children": [], "start_point": {"row": 259, "column": 39}, "end_point": {"row": 259, "column": 40}}, {"id": 552, "type": "parameter_declaration", "text": "size_t", "parent": 549, "children": [553], "start_point": {"row": 259, "column": 43}, "end_point": {"row": 259, "column": 49}}, {"id": 553, "type": "primitive_type", "text": "size_t", "parent": 552, "children": [], "start_point": {"row": 259, "column": 43}, "end_point": {"row": 259, "column": 49}}, {"id": 554, "type": ">", "text": ">", "parent": 545, "children": [], "start_point": {"row": 259, "column": 50}, "end_point": {"row": 259, "column": 51}}, {"id": 555, "type": "type_identifier", "text": "Type", "parent": 542, "children": [], "start_point": {"row": 259, "column": 52}, "end_point": {"row": 259, "column": 56}}, {"id": 556, "type": "binary_expression", "text": "template <class T>\n\tvoid", "parent": 66, "children": [557, 560, 562, 563], "start_point": {"row": 272, "column": 1}, "end_point": {"row": 273, "column": 5}}, {"id": 557, "type": "binary_expression", "text": "template <class", "parent": 556, "children": [558, 559], "start_point": {"row": 272, "column": 1}, "end_point": {"row": 272, "column": 16}}, {"id": 558, "type": "identifier", "text": "template", "parent": 557, "children": [], "start_point": {"row": 272, "column": 1}, "end_point": {"row": 272, "column": 9}}, {"id": 559, "type": "<", "text": "<", "parent": 557, "children": [], "start_point": {"row": 272, "column": 10}, "end_point": {"row": 272, "column": 11}}, {"id": 560, "type": "ERROR", "text": "T", "parent": 556, "children": [561], "start_point": {"row": 272, "column": 17}, "end_point": {"row": 272, "column": 18}}, {"id": 561, "type": "identifier", "text": "T", "parent": 560, "children": [], "start_point": {"row": 272, "column": 17}, "end_point": {"row": 272, "column": 18}}, {"id": 562, "type": ">", "text": ">", "parent": 556, "children": [], "start_point": {"row": 272, "column": 18}, "end_point": {"row": 272, "column": 19}}, {"id": 563, "type": "identifier", "text": "void", "parent": 556, "children": [], "start_point": {"row": 273, "column": 1}, "end_point": {"row": 273, "column": 5}}, {"id": 564, "type": "ERROR", "text": "RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::", "parent": 66, "children": [565], "start_point": {"row": 273, "column": 6}, "end_point": {"row": 273, "column": 87}}, {"id": 565, "type": "comma_expression", "text": "RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std", "parent": 564, "children": [566, 578], "start_point": {"row": 273, "column": 6}, "end_point": {"row": 273, "column": 85}}, {"id": 566, "type": "binary_expression", "text": "RespondToCommands(const StreamObject<T>* apObj", "parent": 565, "children": [567, 574, 575], "start_point": {"row": 273, "column": 6}, "end_point": {"row": 273, "column": 52}}, {"id": 567, "type": "binary_expression", "text": "RespondToCommands(const StreamObject<T", "parent": 566, "children": [568, 569, 572, 573], "start_point": {"row": 273, "column": 6}, "end_point": {"row": 273, "column": 44}}, {"id": 568, "type": "identifier", "text": "RespondToCommands", "parent": 567, "children": [], "start_point": {"row": 273, "column": 6}, "end_point": {"row": 273, "column": 23}}, {"id": 569, "type": "ERROR", "text": "(const StreamObject", "parent": 567, "children": [570], "start_point": {"row": 273, "column": 23}, "end_point": {"row": 273, "column": 42}}, {"id": 570, "type": "type_descriptor", "text": "const StreamObject", "parent": 569, "children": [571], "start_point": {"row": 273, "column": 24}, "end_point": {"row": 273, "column": 42}}, {"id": 571, "type": "type_identifier", "text": "StreamObject", "parent": 570, "children": [], "start_point": {"row": 273, "column": 30}, "end_point": {"row": 273, "column": 42}}, {"id": 572, "type": "<", "text": "<", "parent": 567, "children": [], "start_point": {"row": 273, "column": 42}, "end_point": {"row": 273, "column": 43}}, {"id": 573, "type": "identifier", "text": "T", "parent": 567, "children": [], "start_point": {"row": 273, "column": 43}, "end_point": {"row": 273, "column": 44}}, {"id": 574, "type": ">", "text": ">", "parent": 566, "children": [], "start_point": {"row": 273, "column": 44}, "end_point": {"row": 273, "column": 45}}, {"id": 575, "type": "pointer_expression", "text": "* apObj", "parent": 566, "children": [576, 577], "start_point": {"row": 273, "column": 45}, "end_point": {"row": 273, "column": 52}}, {"id": 576, "type": "*", "text": "*", "parent": 575, "children": [], "start_point": {"row": 273, "column": 45}, "end_point": {"row": 273, "column": 46}}, {"id": 577, "type": "identifier", "text": "apObj", "parent": 575, "children": [], "start_point": {"row": 273, "column": 47}, "end_point": {"row": 273, "column": 52}}, {"id": 578, "type": "comma_expression", "text": "ObjectReadIterator& arIter, std", "parent": 565, "children": [579, 582], "start_point": {"row": 273, "column": 54}, "end_point": {"row": 273, "column": 85}}, {"id": 579, "type": "binary_expression", "text": "ObjectReadIterator& arIter", "parent": 578, "children": [580, 581], "start_point": {"row": 273, "column": 54}, "end_point": {"row": 273, "column": 80}}, {"id": 580, "type": "identifier", "text": "ObjectReadIterator", "parent": 579, "children": [], "start_point": {"row": 273, "column": 54}, "end_point": {"row": 273, "column": 72}}, {"id": 581, "type": "identifier", "text": "arIter", "parent": 579, "children": [], "start_point": {"row": 273, "column": 74}, "end_point": {"row": 273, "column": 80}}, {"id": 582, "type": "identifier", "text": "std", "parent": 578, "children": [], "start_point": {"row": 273, "column": 82}, "end_point": {"row": 273, "column": 85}}, {"id": 583, "type": "binary_expression", "text": "function<CommandStatus (T, size_t)> CommandHandler", "parent": 66, "children": [584, 591, 592], "start_point": {"row": 273, "column": 87}, "end_point": {"row": 273, "column": 137}}, {"id": 584, "type": "binary_expression", "text": "function<CommandStatus (T, size_t)", "parent": 583, "children": [585, 586], "start_point": {"row": 273, "column": 87}, "end_point": {"row": 273, "column": 121}}, {"id": 585, "type": "<", "text": "<", "parent": 584, "children": [], "start_point": {"row": 273, "column": 95}, "end_point": {"row": 273, "column": 96}}, {"id": 586, "type": "call_expression", "text": "CommandStatus (T, size_t)", "parent": 584, "children": [587, 588], "start_point": {"row": 273, "column": 96}, "end_point": {"row": 273, "column": 121}}, {"id": 587, "type": "identifier", "text": "CommandStatus", "parent": 586, "children": [], "start_point": {"row": 273, "column": 96}, "end_point": {"row": 273, "column": 109}}, {"id": 588, "type": "argument_list", "text": "(T, size_t)", "parent": 586, "children": [589, 590], "start_point": {"row": 273, "column": 110}, "end_point": {"row": 273, "column": 121}}, {"id": 589, "type": "identifier", "text": "T", "parent": 588, "children": [], "start_point": {"row": 273, "column": 111}, "end_point": {"row": 273, "column": 112}}, {"id": 590, "type": "identifier", "text": "size_t", "parent": 588, "children": [], "start_point": {"row": 273, "column": 114}, "end_point": {"row": 273, "column": 120}}, {"id": 591, "type": ">", "text": ">", "parent": 583, "children": [], "start_point": {"row": 273, "column": 121}, "end_point": {"row": 273, "column": 122}}, {"id": 592, "type": "identifier", "text": "CommandHandler", "parent": 583, "children": [], "start_point": {"row": 273, "column": 123}, "end_point": {"row": 273, "column": 137}}, {"id": 593, "type": "binary_expression", "text": "template<class T>\nvoid", "parent": 0, "children": [594, 597, 599, 600], "start_point": {"row": 276, "column": 0}, "end_point": {"row": 277, "column": 4}}, {"id": 594, "type": "binary_expression", "text": "template<class", "parent": 593, "children": [595, 596], "start_point": {"row": 276, "column": 0}, "end_point": {"row": 276, "column": 14}}, {"id": 595, "type": "identifier", "text": "template", "parent": 594, "children": [], "start_point": {"row": 276, "column": 0}, "end_point": {"row": 276, "column": 8}}, {"id": 596, "type": "<", "text": "<", "parent": 594, "children": [], "start_point": {"row": 276, "column": 8}, "end_point": {"row": 276, "column": 9}}, {"id": 597, "type": "ERROR", "text": "T", "parent": 593, "children": [598], "start_point": {"row": 276, "column": 15}, "end_point": {"row": 276, "column": 16}}, {"id": 598, "type": "identifier", "text": "T", "parent": 597, "children": [], "start_point": {"row": 276, "column": 15}, "end_point": {"row": 276, "column": 16}}, {"id": 599, "type": ">", "text": ">", "parent": 593, "children": [], "start_point": {"row": 276, "column": 16}, "end_point": {"row": 276, "column": 17}}, {"id": 600, "type": "identifier", "text": "void", "parent": 593, "children": [], "start_point": {"row": 277, "column": 0}, "end_point": {"row": 277, "column": 4}}, {"id": 601, "type": "labeled_statement", "text": "Slave::RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler)\n{\n\tIndexedWriteIterator i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier());\n\tsize_t count = 1;\n\twhile (!arIter.IsEnd()) {\n\t\tT val = apObj->Read(*arIter);\n\t\tsize_t index = arIter->Index();\n\t\tif (count > mConfig.mMaxControls) {\n\t\t\tval.mStatus = CS_TOO_MANY_OPS;\n\t\t}\n\t\telse {\n\t\t\tval.mStatus = CommandHandler(val, index);\n\t\t\tif(val.mStatus == CS_NOT_SUPPORTED) {\n\t\t\t\tthis->mRspIIN.SetParameterError(true);\n\t\t\t}\n\t\t}\n\t\ti.SetIndex(index);\n\t\tapObj->Write(*i, val);\n\t\t++i;\n\t\t++arIter;\n\t\t++count;\n\t}\n}", "parent": 0, "children": [602, 603, 622], "start_point": {"row": 277, "column": 5}, "end_point": {"row": 299, "column": 1}}, {"id": 602, "type": "statement_identifier", "text": "Slave", "parent": 601, "children": [], "start_point": {"row": 277, "column": 5}, "end_point": {"row": 277, "column": 10}}, {"id": 603, "type": "ERROR", "text": "::RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std:", "parent": 601, "children": [604], "start_point": {"row": 277, "column": 10}, "end_point": {"row": 277, "column": 92}}, {"id": 604, "type": "comma_expression", "text": "RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std", "parent": 603, "children": [605, 617], "start_point": {"row": 277, "column": 12}, "end_point": {"row": 277, "column": 91}}, {"id": 605, "type": "binary_expression", "text": "RespondToCommands(const StreamObject<T>* apObj", "parent": 604, "children": [606, 613, 614], "start_point": {"row": 277, "column": 12}, "end_point": {"row": 277, "column": 58}}, {"id": 606, "type": "binary_expression", "text": "RespondToCommands(const StreamObject<T", "parent": 605, "children": [607, 608, 611, 612], "start_point": {"row": 277, "column": 12}, "end_point": {"row": 277, "column": 50}}, {"id": 607, "type": "identifier", "text": "RespondToCommands", "parent": 606, "children": [], "start_point": {"row": 277, "column": 12}, "end_point": {"row": 277, "column": 29}}, {"id": 608, "type": "ERROR", "text": "(const StreamObject", "parent": 606, "children": [609], "start_point": {"row": 277, "column": 29}, "end_point": {"row": 277, "column": 48}}, {"id": 609, "type": "type_descriptor", "text": "const StreamObject", "parent": 608, "children": [610], "start_point": {"row": 277, "column": 30}, "end_point": {"row": 277, "column": 48}}, {"id": 610, "type": "type_identifier", "text": "StreamObject", "parent": 609, "children": [], "start_point": {"row": 277, "column": 36}, "end_point": {"row": 277, "column": 48}}, {"id": 611, "type": "<", "text": "<", "parent": 606, "children": [], "start_point": {"row": 277, "column": 48}, "end_point": {"row": 277, "column": 49}}, {"id": 612, "type": "identifier", "text": "T", "parent": 606, "children": [], "start_point": {"row": 277, "column": 49}, "end_point": {"row": 277, "column": 50}}, {"id": 613, "type": ">", "text": ">", "parent": 605, "children": [], "start_point": {"row": 277, "column": 50}, "end_point": {"row": 277, "column": 51}}, {"id": 614, "type": "pointer_expression", "text": "* apObj", "parent": 605, "children": [615, 616], "start_point": {"row": 277, "column": 51}, "end_point": {"row": 277, "column": 58}}, {"id": 615, "type": "*", "text": "*", "parent": 614, "children": [], "start_point": {"row": 277, "column": 51}, "end_point": {"row": 277, "column": 52}}, {"id": 616, "type": "identifier", "text": "apObj", "parent": 614, "children": [], "start_point": {"row": 277, "column": 53}, "end_point": {"row": 277, "column": 58}}, {"id": 617, "type": "comma_expression", "text": "ObjectReadIterator& arIter, std", "parent": 604, "children": [618, 621], "start_point": {"row": 277, "column": 60}, "end_point": {"row": 277, "column": 91}}, {"id": 618, "type": "binary_expression", "text": "ObjectReadIterator& arIter", "parent": 617, "children": [619, 620], "start_point": {"row": 277, "column": 60}, "end_point": {"row": 277, "column": 86}}, {"id": 619, "type": "identifier", "text": "ObjectReadIterator", "parent": 618, "children": [], "start_point": {"row": 277, "column": 60}, "end_point": {"row": 277, "column": 78}}, {"id": 620, "type": "identifier", "text": "arIter", "parent": 618, "children": [], "start_point": {"row": 277, "column": 80}, "end_point": {"row": 277, "column": 86}}, {"id": 621, "type": "identifier", "text": "std", "parent": 617, "children": [], "start_point": {"row": 277, "column": 88}, "end_point": {"row": 277, "column": 91}}, {"id": 622, "type": "ERROR", "text": "function<CommandStatus (T, size_t)> CommandHandler)", "parent": 601, "children": [623], "start_point": {"row": 277, "column": 93}, "end_point": {"row": 277, "column": 144}}, {"id": 623, "type": "binary_expression", "text": "function<CommandStatus (T, size_t)> CommandHandler", "parent": 622, "children": [624, 631, 632], "start_point": {"row": 277, "column": 93}, "end_point": {"row": 277, "column": 143}}, {"id": 624, "type": "binary_expression", "text": "function<CommandStatus (T, size_t)", "parent": 623, "children": [625, 626], "start_point": {"row": 277, "column": 93}, "end_point": {"row": 277, "column": 127}}, {"id": 625, "type": "<", "text": "<", "parent": 624, "children": [], "start_point": {"row": 277, "column": 101}, "end_point": {"row": 277, "column": 102}}, {"id": 626, "type": "call_expression", "text": "CommandStatus (T, size_t)", "parent": 624, "children": [627, 628], "start_point": {"row": 277, "column": 102}, "end_point": {"row": 277, "column": 127}}, {"id": 627, "type": "identifier", "text": "CommandStatus", "parent": 626, "children": [], "start_point": {"row": 277, "column": 102}, "end_point": {"row": 277, "column": 115}}, {"id": 628, "type": "argument_list", "text": "(T, size_t)", "parent": 626, "children": [629, 630], "start_point": {"row": 277, "column": 116}, "end_point": {"row": 277, "column": 127}}, {"id": 629, "type": "identifier", "text": "T", "parent": 628, "children": [], "start_point": {"row": 277, "column": 117}, "end_point": {"row": 277, "column": 118}}, {"id": 630, "type": "identifier", "text": "size_t", "parent": 628, "children": [], "start_point": {"row": 277, "column": 120}, "end_point": {"row": 277, "column": 126}}, {"id": 631, "type": ">", "text": ">", "parent": 623, "children": [], "start_point": {"row": 277, "column": 127}, "end_point": {"row": 277, "column": 128}}, {"id": 632, "type": "identifier", "text": "CommandHandler", "parent": 623, "children": [], "start_point": {"row": 277, "column": 129}, "end_point": {"row": 277, "column": 143}}, {"id": 633, "type": "declaration", "text": "IndexedWriteIterator i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier());", "parent": 601, "children": [634, 635], "start_point": {"row": 279, "column": 1}, "end_point": {"row": 279, "column": 104}}, {"id": 634, "type": "type_identifier", "text": "IndexedWriteIterator", "parent": 633, "children": [], "start_point": {"row": 279, "column": 1}, "end_point": {"row": 279, "column": 21}}, {"id": 635, "type": "init_declarator", "text": "i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier())", "parent": 633, "children": [636, 637, 638], "start_point": {"row": 279, "column": 22}, "end_point": {"row": 279, "column": 103}}, {"id": 636, "type": "identifier", "text": "i", "parent": 635, "children": [], "start_point": {"row": 279, "column": 22}, "end_point": {"row": 279, "column": 23}}, {"id": 637, "type": "=", "text": "=", "parent": 635, "children": [], "start_point": {"row": 279, "column": 24}, "end_point": {"row": 279, "column": 25}}, {"id": 638, "type": "call_expression", "text": "mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier())", "parent": 635, "children": [639, 642], "start_point": {"row": 279, "column": 26}, "end_point": {"row": 279, "column": 103}}, {"id": 639, "type": "field_expression", "text": "mResponse.WriteIndexed", "parent": 638, "children": [640, 641], "start_point": {"row": 279, "column": 26}, "end_point": {"row": 279, "column": 48}}, {"id": 640, "type": "identifier", "text": "mResponse", "parent": 639, "children": [], "start_point": {"row": 279, "column": 26}, "end_point": {"row": 279, "column": 35}}, {"id": 641, "type": "field_identifier", "text": "WriteIndexed", "parent": 639, "children": [], "start_point": {"row": 279, "column": 36}, "end_point": {"row": 279, "column": 48}}, {"id": 642, "type": "argument_list", "text": "(apObj, arIter.Count(), arIter.Header().GetQualifier())", "parent": 638, "children": [643, 644, 649], "start_point": {"row": 279, "column": 48}, "end_point": {"row": 279, "column": 103}}, {"id": 643, "type": "identifier", "text": "apObj", "parent": 642, "children": [], "start_point": {"row": 279, "column": 49}, "end_point": {"row": 279, "column": 54}}, {"id": 644, "type": "call_expression", "text": "arIter.Count()", "parent": 642, "children": [645, 648], "start_point": {"row": 279, "column": 56}, "end_point": {"row": 279, "column": 70}}, {"id": 645, "type": "field_expression", "text": "arIter.Count", "parent": 644, "children": [646, 647], "start_point": {"row": 279, "column": 56}, "end_point": {"row": 279, "column": 68}}, {"id": 646, "type": "identifier", "text": "arIter", "parent": 645, "children": [], "start_point": {"row": 279, "column": 56}, "end_point": {"row": 279, "column": 62}}, {"id": 647, "type": "field_identifier", "text": "Count", "parent": 645, "children": [], "start_point": {"row": 279, "column": 63}, "end_point": {"row": 279, "column": 68}}, {"id": 648, "type": "argument_list", "text": "()", "parent": 644, "children": [], "start_point": {"row": 279, "column": 68}, "end_point": {"row": 279, "column": 70}}, {"id": 649, "type": "call_expression", "text": "arIter.Header().GetQualifier()", "parent": 642, "children": [650, 657], "start_point": {"row": 279, "column": 72}, "end_point": {"row": 279, "column": 102}}, {"id": 650, "type": "field_expression", "text": "arIter.Header().GetQualifier", "parent": 649, "children": [651, 656], "start_point": {"row": 279, "column": 72}, "end_point": {"row": 279, "column": 100}}, {"id": 651, "type": "call_expression", "text": "arIter.Header()", "parent": 650, "children": [652, 655], "start_point": {"row": 279, "column": 72}, "end_point": {"row": 279, "column": 87}}, {"id": 652, "type": "field_expression", "text": "arIter.Header", "parent": 651, "children": [653, 654], "start_point": {"row": 279, "column": 72}, "end_point": {"row": 279, "column": 85}}, {"id": 653, "type": "identifier", "text": "arIter", "parent": 652, "children": [], "start_point": {"row": 279, "column": 72}, "end_point": {"row": 279, "column": 78}}, {"id": 654, "type": "field_identifier", "text": "Header", "parent": 652, "children": [], "start_point": {"row": 279, "column": 79}, "end_point": {"row": 279, "column": 85}}, {"id": 655, "type": "argument_list", "text": "()", "parent": 651, "children": [], "start_point": {"row": 279, "column": 85}, "end_point": {"row": 279, "column": 87}}, {"id": 656, "type": "field_identifier", "text": "GetQualifier", "parent": 650, "children": [], "start_point": {"row": 279, "column": 88}, "end_point": {"row": 279, "column": 100}}, {"id": 657, "type": "argument_list", "text": "()", "parent": 649, "children": [], "start_point": {"row": 279, "column": 100}, "end_point": {"row": 279, "column": 102}}, {"id": 658, "type": "declaration", "text": "size_t count = 1;", "parent": 601, "children": [659, 660], "start_point": {"row": 280, "column": 1}, "end_point": {"row": 280, "column": 18}}, {"id": 659, "type": "primitive_type", "text": "size_t", "parent": 658, "children": [], "start_point": {"row": 280, "column": 1}, "end_point": {"row": 280, "column": 7}}, {"id": 660, "type": "init_declarator", "text": "count = 1", "parent": 658, "children": [661, 662, 663], "start_point": {"row": 280, "column": 8}, "end_point": {"row": 280, "column": 17}}, {"id": 661, "type": "identifier", "text": "count", "parent": 660, "children": [], "start_point": {"row": 280, "column": 8}, "end_point": {"row": 280, "column": 13}}, {"id": 662, "type": "=", "text": "=", "parent": 660, "children": [], "start_point": {"row": 280, "column": 14}, "end_point": {"row": 280, "column": 15}}, {"id": 663, "type": "number_literal", "text": "1", "parent": 660, "children": [], "start_point": {"row": 280, "column": 16}, "end_point": {"row": 280, "column": 17}}, {"id": 664, "type": "while_statement", "text": "while (!arIter.IsEnd()) {\n\t\tT val = apObj->Read(*arIter);\n\t\tsize_t index = arIter->Index();\n\t\tif (count > mConfig.mMaxControls) {\n\t\t\tval.mStatus = CS_TOO_MANY_OPS;\n\t\t}\n\t\telse {\n\t\t\tval.mStatus = CommandHandler(val, index);\n\t\t\tif(val.mStatus == CS_NOT_SUPPORTED) {\n\t\t\t\tthis->mRspIIN.SetParameterError(true);\n\t\t\t}\n\t\t}\n\t\ti.SetIndex(index);\n\t\tapObj->Write(*i, val);\n\t\t++i;\n\t\t++arIter;\n\t\t++count;\n\t}", "parent": 601, "children": [665], "start_point": {"row": 281, "column": 1}, "end_point": {"row": 298, "column": 2}}, {"id": 665, "type": "parenthesized_expression", "text": "(!arIter.IsEnd())", "parent": 664, "children": [666], "start_point": {"row": 281, "column": 7}, "end_point": {"row": 281, "column": 24}}, {"id": 666, "type": "unary_expression", "text": "!arIter.IsEnd()", "parent": 665, "children": [667, 668], "start_point": {"row": 281, "column": 8}, "end_point": {"row": 281, "column": 23}}, {"id": 667, "type": "!", "text": "!", "parent": 666, "children": [], "start_point": {"row": 281, "column": 8}, "end_point": {"row": 281, "column": 9}}, {"id": 668, "type": "call_expression", "text": "arIter.IsEnd()", "parent": 666, "children": [669, 672], "start_point": {"row": 281, "column": 9}, "end_point": {"row": 281, "column": 23}}, {"id": 669, "type": "field_expression", "text": "arIter.IsEnd", "parent": 668, "children": [670, 671], "start_point": {"row": 281, "column": 9}, "end_point": {"row": 281, "column": 21}}, {"id": 670, "type": "identifier", "text": "arIter", "parent": 669, "children": [], "start_point": {"row": 281, "column": 9}, "end_point": {"row": 281, "column": 15}}, {"id": 671, "type": "field_identifier", "text": "IsEnd", "parent": 669, "children": [], "start_point": {"row": 281, "column": 16}, "end_point": {"row": 281, "column": 21}}, {"id": 672, "type": "argument_list", "text": "()", "parent": 668, "children": [], "start_point": {"row": 281, "column": 21}, "end_point": {"row": 281, "column": 23}}, {"id": 673, "type": "declaration", "text": "T val = apObj->Read(*arIter);", "parent": 664, "children": [674, 675], "start_point": {"row": 282, "column": 2}, "end_point": {"row": 282, "column": 31}}, {"id": 674, "type": "type_identifier", "text": "T", "parent": 673, "children": [], "start_point": {"row": 282, "column": 2}, "end_point": {"row": 282, "column": 3}}, {"id": 675, "type": "init_declarator", "text": "val = apObj->Read(*arIter)", "parent": 673, "children": [676, 677, 678], "start_point": {"row": 282, "column": 4}, "end_point": {"row": 282, "column": 30}}, {"id": 676, "type": "identifier", "text": "val", "parent": 675, "children": [], "start_point": {"row": 282, "column": 4}, "end_point": {"row": 282, "column": 7}}, {"id": 677, "type": "=", "text": "=", "parent": 675, "children": [], "start_point": {"row": 282, "column": 8}, "end_point": {"row": 282, "column": 9}}, {"id": 678, "type": "call_expression", "text": "apObj->Read(*arIter)", "parent": 675, "children": [679, 682], "start_point": {"row": 282, "column": 10}, "end_point": {"row": 282, "column": 30}}, {"id": 679, "type": "field_expression", "text": "apObj->Read", "parent": 678, "children": [680, 681], "start_point": {"row": 282, "column": 10}, "end_point": {"row": 282, "column": 21}}, {"id": 680, "type": "identifier", "text": "apObj", "parent": 679, "children": [], "start_point": {"row": 282, "column": 10}, "end_point": {"row": 282, "column": 15}}, {"id": 681, "type": "field_identifier", "text": "Read", "parent": 679, "children": [], "start_point": {"row": 282, "column": 17}, "end_point": {"row": 282, "column": 21}}, {"id": 682, "type": "argument_list", "text": "(*arIter)", "parent": 678, "children": [683], "start_point": {"row": 282, "column": 21}, "end_point": {"row": 282, "column": 30}}, {"id": 683, "type": "pointer_expression", "text": "*arIter", "parent": 682, "children": [684, 685], "start_point": {"row": 282, "column": 22}, "end_point": {"row": 282, "column": 29}}, {"id": 684, "type": "*", "text": "*", "parent": 683, "children": [], "start_point": {"row": 282, "column": 22}, "end_point": {"row": 282, "column": 23}}, {"id": 685, "type": "identifier", "text": "arIter", "parent": 683, "children": [], "start_point": {"row": 282, "column": 23}, "end_point": {"row": 282, "column": 29}}, {"id": 686, "type": "declaration", "text": "size_t index = arIter->Index();", "parent": 664, "children": [687, 688], "start_point": {"row": 283, "column": 2}, "end_point": {"row": 283, "column": 33}}, {"id": 687, "type": "primitive_type", "text": "size_t", "parent": 686, "children": [], "start_point": {"row": 283, "column": 2}, "end_point": {"row": 283, "column": 8}}, {"id": 688, "type": "init_declarator", "text": "index = arIter->Index()", "parent": 686, "children": [689, 690, 691], "start_point": {"row": 283, "column": 9}, "end_point": {"row": 283, "column": 32}}, {"id": 689, "type": "identifier", "text": "index", "parent": 688, "children": [], "start_point": {"row": 283, "column": 9}, "end_point": {"row": 283, "column": 14}}, {"id": 690, "type": "=", "text": "=", "parent": 688, "children": [], "start_point": {"row": 283, "column": 15}, "end_point": {"row": 283, "column": 16}}, {"id": 691, "type": "call_expression", "text": "arIter->Index()", "parent": 688, "children": [692, 695], "start_point": {"row": 283, "column": 17}, "end_point": {"row": 283, "column": 32}}, {"id": 692, "type": "field_expression", "text": "arIter->Index", "parent": 691, "children": [693, 694], "start_point": {"row": 283, "column": 17}, "end_point": {"row": 283, "column": 30}}, {"id": 693, "type": "identifier", "text": "arIter", "parent": 692, "children": [], "start_point": {"row": 283, "column": 17}, "end_point": {"row": 283, "column": 23}}, {"id": 694, "type": "field_identifier", "text": "Index", "parent": 692, "children": [], "start_point": {"row": 283, "column": 25}, "end_point": {"row": 283, "column": 30}}, {"id": 695, "type": "argument_list", "text": "()", "parent": 691, "children": [], "start_point": {"row": 283, "column": 30}, "end_point": {"row": 283, "column": 32}}, {"id": 696, "type": "if_statement", "text": "if (count > mConfig.mMaxControls) {\n\t\t\tval.mStatus = CS_TOO_MANY_OPS;\n\t\t}\n\t\telse {\n\t\t\tval.mStatus = CommandHandler(val, index);\n\t\t\tif(val.mStatus == CS_NOT_SUPPORTED) {\n\t\t\t\tthis->mRspIIN.SetParameterError(true);\n\t\t\t}\n\t\t}", "parent": 664, "children": [697, 710], "start_point": {"row": 284, "column": 2}, "end_point": {"row": 292, "column": 3}}, {"id": 697, "type": "parenthesized_expression", "text": "(count > mConfig.mMaxControls)", "parent": 696, "children": [698], "start_point": {"row": 284, "column": 5}, "end_point": {"row": 284, "column": 35}}, {"id": 698, "type": "binary_expression", "text": "count > mConfig.mMaxControls", "parent": 697, "children": [699, 700, 701], "start_point": {"row": 284, "column": 6}, "end_point": {"row": 284, "column": 34}}, {"id": 699, "type": "identifier", "text": "count", "parent": 698, "children": [], "start_point": {"row": 284, "column": 6}, "end_point": {"row": 284, "column": 11}}, {"id": 700, "type": ">", "text": ">", "parent": 698, "children": [], "start_point": {"row": 284, "column": 12}, "end_point": {"row": 284, "column": 13}}, {"id": 701, "type": "field_expression", "text": "mConfig.mMaxControls", "parent": 698, "children": [702, 703], "start_point": {"row": 284, "column": 14}, "end_point": {"row": 284, "column": 34}}, {"id": 702, "type": "identifier", "text": "mConfig", "parent": 701, "children": [], "start_point": {"row": 284, "column": 14}, "end_point": {"row": 284, "column": 21}}, {"id": 703, "type": "field_identifier", "text": "mMaxControls", "parent": 701, "children": [], "start_point": {"row": 284, "column": 22}, "end_point": {"row": 284, "column": 34}}, {"id": 704, "type": "assignment_expression", "text": "val.mStatus = CS_TOO_MANY_OPS", "parent": 696, "children": [705, 708, 709], "start_point": {"row": 285, "column": 3}, "end_point": {"row": 285, "column": 32}}, {"id": 705, "type": "field_expression", "text": "val.mStatus", "parent": 704, "children": [706, 707], "start_point": {"row": 285, "column": 3}, "end_point": {"row": 285, "column": 14}}, {"id": 706, "type": "identifier", "text": "val", "parent": 705, "children": [], "start_point": {"row": 285, "column": 3}, "end_point": {"row": 285, "column": 6}}, {"id": 707, "type": "field_identifier", "text": "mStatus", "parent": 705, "children": [], "start_point": {"row": 285, "column": 7}, "end_point": {"row": 285, "column": 14}}, {"id": 708, "type": "=", "text": "=", "parent": 704, "children": [], "start_point": {"row": 285, "column": 15}, "end_point": {"row": 285, "column": 16}}, {"id": 709, "type": "identifier", "text": "CS_TOO_MANY_OPS", "parent": 704, "children": [], "start_point": {"row": 285, "column": 17}, "end_point": {"row": 285, "column": 32}}, {"id": 710, "type": "else_clause", "text": "else {\n\t\t\tval.mStatus = CommandHandler(val, index);\n\t\t\tif(val.mStatus == CS_NOT_SUPPORTED) {\n\t\t\t\tthis->mRspIIN.SetParameterError(true);\n\t\t\t}\n\t\t}", "parent": 696, "children": [], "start_point": {"row": 287, "column": 2}, "end_point": {"row": 292, "column": 3}}, {"id": 711, "type": "assignment_expression", "text": "val.mStatus = CommandHandler(val, index)", "parent": 710, "children": [712, 715, 716], "start_point": {"row": 288, "column": 3}, "end_point": {"row": 288, "column": 43}}, {"id": 712, "type": "field_expression", "text": "val.mStatus", "parent": 711, "children": [713, 714], "start_point": {"row": 288, "column": 3}, "end_point": {"row": 288, "column": 14}}, {"id": 713, "type": "identifier", "text": "val", "parent": 712, "children": [], "start_point": {"row": 288, "column": 3}, "end_point": {"row": 288, "column": 6}}, {"id": 714, "type": "field_identifier", "text": "mStatus", "parent": 712, "children": [], "start_point": {"row": 288, "column": 7}, "end_point": {"row": 288, "column": 14}}, {"id": 715, "type": "=", "text": "=", "parent": 711, "children": [], "start_point": {"row": 288, "column": 15}, "end_point": {"row": 288, "column": 16}}, {"id": 716, "type": "call_expression", "text": "CommandHandler(val, index)", "parent": 711, "children": [717, 718], "start_point": {"row": 288, "column": 17}, "end_point": {"row": 288, "column": 43}}, {"id": 717, "type": "identifier", "text": "CommandHandler", "parent": 716, "children": [], "start_point": {"row": 288, "column": 17}, "end_point": {"row": 288, "column": 31}}, {"id": 718, "type": "argument_list", "text": "(val, index)", "parent": 716, "children": [719, 720], "start_point": {"row": 288, "column": 31}, "end_point": {"row": 288, "column": 43}}, {"id": 719, "type": "identifier", "text": "val", "parent": 718, "children": [], "start_point": {"row": 288, "column": 32}, "end_point": {"row": 288, "column": 35}}, {"id": 720, "type": "identifier", "text": "index", "parent": 718, "children": [], "start_point": {"row": 288, "column": 37}, "end_point": {"row": 288, "column": 42}}, {"id": 721, "type": "if_statement", "text": "if(val.mStatus == CS_NOT_SUPPORTED) {\n\t\t\t\tthis->mRspIIN.SetParameterError(true);\n\t\t\t}", "parent": 710, "children": [722], "start_point": {"row": 289, "column": 3}, "end_point": {"row": 291, "column": 4}}, {"id": 722, "type": "parenthesized_expression", "text": "(val.mStatus == CS_NOT_SUPPORTED)", "parent": 721, "children": [723], "start_point": {"row": 289, "column": 5}, "end_point": {"row": 289, "column": 38}}, {"id": 723, "type": "binary_expression", "text": "val.mStatus == CS_NOT_SUPPORTED", "parent": 722, "children": [724, 727, 728], "start_point": {"row": 289, "column": 6}, "end_point": {"row": 289, "column": 37}}, {"id": 724, "type": "field_expression", "text": "val.mStatus", "parent": 723, "children": [725, 726], "start_point": {"row": 289, "column": 6}, "end_point": {"row": 289, "column": 17}}, {"id": 725, "type": "identifier", "text": "val", "parent": 724, "children": [], "start_point": {"row": 289, "column": 6}, "end_point": {"row": 289, "column": 9}}, {"id": 726, "type": "field_identifier", "text": "mStatus", "parent": 724, "children": [], "start_point": {"row": 289, "column": 10}, "end_point": {"row": 289, "column": 17}}, {"id": 727, "type": "==", "text": "==", "parent": 723, "children": [], "start_point": {"row": 289, "column": 18}, "end_point": {"row": 289, "column": 20}}, {"id": 728, "type": "identifier", "text": "CS_NOT_SUPPORTED", "parent": 723, "children": [], "start_point": {"row": 289, "column": 21}, "end_point": {"row": 289, "column": 37}}, {"id": 729, "type": "call_expression", "text": "this->mRspIIN.SetParameterError(true)", "parent": 721, "children": [730, 735], "start_point": {"row": 290, "column": 4}, "end_point": {"row": 290, "column": 41}}, {"id": 730, "type": "field_expression", "text": "this->mRspIIN.SetParameterError", "parent": 729, "children": [731, 734], "start_point": {"row": 290, "column": 4}, "end_point": {"row": 290, "column": 35}}, {"id": 731, "type": "field_expression", "text": "this->mRspIIN", "parent": 730, "children": [732, 733], "start_point": {"row": 290, "column": 4}, "end_point": {"row": 290, "column": 17}}, {"id": 732, "type": "identifier", "text": "this", "parent": 731, "children": [], "start_point": {"row": 290, "column": 4}, "end_point": {"row": 290, "column": 8}}, {"id": 733, "type": "field_identifier", "text": "mRspIIN", "parent": 731, "children": [], "start_point": {"row": 290, "column": 10}, "end_point": {"row": 290, "column": 17}}, {"id": 734, "type": "field_identifier", "text": "SetParameterError", "parent": 730, "children": [], "start_point": {"row": 290, "column": 18}, "end_point": {"row": 290, "column": 35}}, {"id": 735, "type": "argument_list", "text": "(true)", "parent": 729, "children": [736], "start_point": {"row": 290, "column": 35}, "end_point": {"row": 290, "column": 41}}, {"id": 736, "type": "true", "text": "true", "parent": 735, "children": [], "start_point": {"row": 290, "column": 36}, "end_point": {"row": 290, "column": 40}}, {"id": 737, "type": "call_expression", "text": "i.SetIndex(index)", "parent": 664, "children": [738, 741], "start_point": {"row": 293, "column": 2}, "end_point": {"row": 293, "column": 19}}, {"id": 738, "type": "field_expression", "text": "i.SetIndex", "parent": 737, "children": [739, 740], "start_point": {"row": 293, "column": 2}, "end_point": {"row": 293, "column": 12}}, {"id": 739, "type": "identifier", "text": "i", "parent": 738, "children": [], "start_point": {"row": 293, "column": 2}, "end_point": {"row": 293, "column": 3}}, {"id": 740, "type": "field_identifier", "text": "SetIndex", "parent": 738, "children": [], "start_point": {"row": 293, "column": 4}, "end_point": {"row": 293, "column": 12}}, {"id": 741, "type": "argument_list", "text": "(index)", "parent": 737, "children": [742], "start_point": {"row": 293, "column": 12}, "end_point": {"row": 293, "column": 19}}, {"id": 742, "type": "identifier", "text": "index", "parent": 741, "children": [], "start_point": {"row": 293, "column": 13}, "end_point": {"row": 293, "column": 18}}, {"id": 743, "type": "call_expression", "text": "apObj->Write(*i, val)", "parent": 664, "children": [744, 747], "start_point": {"row": 294, "column": 2}, "end_point": {"row": 294, "column": 23}}, {"id": 744, "type": "field_expression", "text": "apObj->Write", "parent": 743, "children": [745, 746], "start_point": {"row": 294, "column": 2}, "end_point": {"row": 294, "column": 14}}, {"id": 745, "type": "identifier", "text": "apObj", "parent": 744, "children": [], "start_point": {"row": 294, "column": 2}, "end_point": {"row": 294, "column": 7}}, {"id": 746, "type": "field_identifier", "text": "Write", "parent": 744, "children": [], "start_point": {"row": 294, "column": 9}, "end_point": {"row": 294, "column": 14}}, {"id": 747, "type": "argument_list", "text": "(*i, val)", "parent": 743, "children": [748, 751], "start_point": {"row": 294, "column": 14}, "end_point": {"row": 294, "column": 23}}, {"id": 748, "type": "pointer_expression", "text": "*i", "parent": 747, "children": [749, 750], "start_point": {"row": 294, "column": 15}, "end_point": {"row": 294, "column": 17}}, {"id": 749, "type": "*", "text": "*", "parent": 748, "children": [], "start_point": {"row": 294, "column": 15}, "end_point": {"row": 294, "column": 16}}, {"id": 750, "type": "identifier", "text": "i", "parent": 748, "children": [], "start_point": {"row": 294, "column": 16}, "end_point": {"row": 294, "column": 17}}, {"id": 751, "type": "identifier", "text": "val", "parent": 747, "children": [], "start_point": {"row": 294, "column": 19}, "end_point": {"row": 294, "column": 22}}, {"id": 752, "type": "update_expression", "text": "++i", "parent": 664, "children": [753, 754], "start_point": {"row": 295, "column": 2}, "end_point": {"row": 295, "column": 5}}, {"id": 753, "type": "++", "text": "++", "parent": 752, "children": [], "start_point": {"row": 295, "column": 2}, "end_point": {"row": 295, "column": 4}}, {"id": 754, "type": "identifier", "text": "i", "parent": 752, "children": [], "start_point": {"row": 295, "column": 4}, "end_point": {"row": 295, "column": 5}}, {"id": 755, "type": "update_expression", "text": "++arIter", "parent": 664, "children": [756, 757], "start_point": {"row": 296, "column": 2}, "end_point": {"row": 296, "column": 10}}, {"id": 756, "type": "++", "text": "++", "parent": 755, "children": [], "start_point": {"row": 296, "column": 2}, "end_point": {"row": 296, "column": 4}}, {"id": 757, "type": "identifier", "text": "arIter", "parent": 755, "children": [], "start_point": {"row": 296, "column": 4}, "end_point": {"row": 296, "column": 10}}, {"id": 758, "type": "update_expression", "text": "++count", "parent": 664, "children": [759, 760], "start_point": {"row": 297, "column": 2}, "end_point": {"row": 297, "column": 9}}, {"id": 759, "type": "++", "text": "++", "parent": 758, "children": [], "start_point": {"row": 297, "column": 2}, "end_point": {"row": 297, "column": 4}}, {"id": 760, "type": "identifier", "text": "count", "parent": 758, "children": [], "start_point": {"row": 297, "column": 4}, "end_point": {"row": 297, "column": 9}}, {"id": 761, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 305, "column": 0}, "end_point": {"row": 305, "column": 6}}]}, "node_categories": {"declarations": {"functions": [66, 152, 157, 162, 167, 172, 177, 182, 191, 194, 196, 201, 205, 211, 215, 221, 225, 327, 329, 336, 344, 349, 354, 359, 364, 371, 382, 390, 398, 406, 414, 422, 430, 441, 452, 463, 474, 479, 487, 495, 500, 505, 510, 518, 547], "variables": [69, 71, 73, 77, 84, 87, 90, 93, 96, 99, 103, 150, 155, 160, 165, 170, 175, 180, 185, 187, 189, 232, 235, 240, 245, 250, 253, 258, 261, 264, 269, 274, 277, 280, 283, 286, 289, 292, 295, 298, 301, 304, 309, 312, 315, 318, 321, 324, 334, 339, 342, 347, 352, 357, 362, 367, 369, 374, 377, 380, 385, 388, 393, 396, 401, 404, 409, 412, 417, 420, 425, 428, 433, 436, 439, 444, 447, 450, 455, 458, 461, 466, 469, 472, 477, 482, 485, 490, 493, 498, 503, 508, 513, 516, 521, 526, 529, 542, 550, 552, 633, 658, 673, 686], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 64], "modules": [], "enums": []}, "statements": {"expressions": [142, 145, 147, 209, 219, 229, 533, 534, 556, 557, 565, 566, 567, 575, 578, 579, 583, 584, 586, 593, 594, 604, 605, 606, 614, 617, 618, 623, 624, 626, 638, 639, 644, 645, 649, 650, 651, 652, 665, 666, 668, 669, 678, 679, 683, 691, 692, 697, 698, 701, 705, 712, 716, 722, 723, 724, 729, 730, 731, 737, 738, 743, 744, 748, 752, 755, 758], "assignments": [704, 711], "loops": [664], "conditionals": [0, 1, 2, 5, 67, 68, 70, 72, 74, 76, 78, 79, 81, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95, 97, 98, 100, 101, 104, 105, 108, 112, 116, 120, 124, 128, 132, 134, 138, 141, 143, 148, 153, 158, 163, 168, 173, 178, 183, 186, 188, 192, 197, 202, 206, 210, 212, 216, 220, 222, 226, 230, 233, 234, 236, 239, 241, 244, 246, 249, 252, 254, 257, 259, 260, 262, 263, 265, 268, 270, 273, 275, 276, 278, 279, 281, 282, 284, 285, 287, 288, 290, 291, 293, 294, 296, 297, 300, 302, 303, 305, 308, 311, 314, 317, 320, 323, 325, 326, 328, 330, 333, 337, 340, 341, 345, 350, 355, 360, 365, 368, 372, 375, 376, 378, 379, 383, 386, 387, 391, 394, 395, 399, 402, 403, 407, 410, 411, 415, 418, 419, 423, 426, 427, 431, 434, 435, 437, 438, 442, 445, 446, 448, 449, 453, 456, 457, 459, 460, 464, 467, 468, 471, 475, 480, 483, 484, 488, 491, 492, 496, 501, 506, 511, 514, 515, 519, 522, 525, 527, 528, 530, 531, 535, 538, 540, 541, 544, 548, 551, 555, 558, 561, 563, 568, 571, 573, 577, 580, 581, 582, 587, 589, 590, 592, 595, 598, 600, 602, 607, 610, 612, 616, 619, 620, 621, 627, 629, 630, 632, 634, 636, 640, 641, 643, 646, 647, 653, 654, 656, 661, 670, 671, 674, 676, 680, 681, 685, 689, 693, 694, 696, 699, 702, 703, 706, 707, 709, 713, 714, 717, 719, 720, 721, 725, 726, 728, 732, 733, 734, 739, 740, 742, 745, 746, 750, 751, 754, 757, 760, 761], "returns": [199, 208, 218, 228, 332], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 663], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 66, "universal_type": "function", "name": "IExecutor;", "text_snippet": "namespace opendnp3\n{\n\nclass IExecutor;\nclass AS_Base;\n\n/**\n * @section desc DNP3 outstation.\n *\n * M"}, {"node_id": 152, "universal_type": "function", "name": "unknown", "text_snippet": "OnLowerLayerUp()"}, {"node_id": 157, "universal_type": "function", "name": "unknown", "text_snippet": "OnLowerLayerDown()"}, {"node_id": 162, "universal_type": "function", "name": "unknown", "text_snippet": "OnUnsolSendSuccess()"}, {"node_id": 167, "universal_type": "function", "name": "unknown", "text_snippet": "OnSolSendSuccess()"}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "OnUnsolFailure()"}, {"node_id": 177, "universal_type": "function", "name": "unknown", "text_snippet": "OnSolFailure()"}, {"node_id": 182, "universal_type": "function", "name": "unknown", "text_snippet": "OnRequest(const APDU&, SequenceInfo)"}, {"node_id": 191, "universal_type": "function", "name": "unknown", "text_snippet": "OnUnknownObject()"}, {"node_id": 194, "universal_type": "function", "name": "IsMaster", "text_snippet": "bool IsMaster() {\n\t\treturn false;\n\t}"}, {"node_id": 196, "universal_type": "function", "name": "unknown", "text_snippet": "IsMaster()"}, {"node_id": 201, "universal_type": "function", "name": "unknown", "text_snippet": "IDataObserver* GetDataObserver() {\n\t\treturn &mChangeBuffer;\n\t}"}, {"node_id": 205, "universal_type": "function", "name": "unknown", "text_snippet": "GetDataObserver()"}, {"node_id": 211, "universal_type": "function", "name": "unknown", "text_snippet": "VtoReader* GetVtoReader() {\n\t\treturn &mVtoReader;\n\t}"}, {"node_id": 215, "universal_type": "function", "name": "unknown", "text_snippet": "GetVtoReader()"}, {"node_id": 221, "universal_type": "function", "name": "unknown", "text_snippet": "IVtoWriter* GetVtoWriter() {\n\t\treturn &mVtoWriter;\n\t}"}, {"node_id": 225, "universal_type": "function", "name": "unknown", "text_snippet": "GetVtoWriter()"}, {"node_id": 327, "universal_type": "function", "name": "unknown", "text_snippet": "StackState GetState() {\n\t\treturn mState;\n\t}"}, {"node_id": 329, "universal_type": "function", "name": "unknown", "text_snippet": "GetState()"}, {"node_id": 336, "universal_type": "function", "name": "unknown", "text_snippet": "UpdateState(StackState aState)"}, {"node_id": 344, "universal_type": "function", "name": "unknown", "text_snippet": "OnVtoUpdate()"}, {"node_id": 349, "universal_type": "function", "name": "unknown", "text_snippet": "OnDataUpdate()"}, {"node_id": 354, "universal_type": "function", "name": "unknown", "text_snippet": "OnUnsolTimerExpiration()"}, {"node_id": 359, "universal_type": "function", "name": "unknown", "text_snippet": "ConfigureAndSendSimpleResponse()"}, {"node_id": 364, "universal_type": "function", "name": "unknown", "text_snippet": "Send(APDU&)"}, {"node_id": 371, "universal_type": "function", "name": "unknown", "text_snippet": "Send(APDU& arAPDU, const IINField& arIIN)"}, {"node_id": 382, "universal_type": "function", "name": "unknown", "text_snippet": "SendUnsolicited(APDU& arAPDU)"}, {"node_id": 390, "universal_type": "function", "name": "unknown", "text_snippet": "HandleWrite(const APDU& arRequest)"}, {"node_id": 398, "universal_type": "function", "name": "unknown", "text_snippet": "HandleVtoTransfer(const APDU& arRequest)"}, {"node_id": 406, "universal_type": "function", "name": "unknown", "text_snippet": "HandleWriteIIN(HeaderReadIterator& arHdr)"}, {"node_id": 414, "universal_type": "function", "name": "unknown", "text_snippet": "HandleWriteTimeDate(HeaderReadIterator& arHWI)"}, {"node_id": 422, "universal_type": "function", "name": "unknown", "text_snippet": "HandleWriteVto(HeaderReadIterator& arHdr)"}, {"node_id": 430, "universal_type": "function", "name": "unknown", "text_snippet": "HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo)"}, {"node_id": 441, "universal_type": "function", "name": "unknown", "text_snippet": "HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo)"}, {"node_id": 452, "universal_type": "function", "name": "unknown", "text_snippet": "HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo)"}, {"node_id": 463, "universal_type": "function", "name": "aIsEnable)", "text_snippet": "HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable)"}, {"node_id": 474, "universal_type": "function", "name": "unknown", "text_snippet": "HandleUnknown()"}, {"node_id": 479, "universal_type": "function", "name": "unknown", "text_snippet": "ConfigureDelayMeasurement(const APDU& arRequest)"}, {"node_id": 487, "universal_type": "function", "name": "unknown", "text_snippet": "CreateResponseContext(const APDU& arRequest)"}, {"node_id": 495, "universal_type": "function", "name": "unknown", "text_snippet": "FlushVtoUpdates()"}, {"node_id": 500, "universal_type": "function", "name": "unknown", "text_snippet": "FlushUpdates()"}, {"node_id": 505, "universal_type": "function", "name": "unknown", "text_snippet": "FlushDeferredEvents()"}, {"node_id": 510, "universal_type": "function", "name": "unknown", "text_snippet": "StartUnsolTimer(millis_t aTimeout)"}, {"node_id": 518, "universal_type": "function", "name": "unknown", "text_snippet": "ResetTimeIIN()"}, {"node_id": 547, "universal_type": "function", "name": "unknown", "text_snippet": "CommandStatus (T&, size_t)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <opendnp3/ICommandHandler.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <opendnp3/Logger.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <opendnp3/SlaveConfig.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <opendnp3/Visibility.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"StackBase.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"ChangeBuffer.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"Loggable.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"TimeSource.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"LoggableMacros.h\"\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"ITimer.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include \"APDU.h\"\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include \"AppInterfaces.h\"\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 42, "text": "#include \"EventBuffers.h\"\n"}, {"node_id": 43, "text": "#include"}, {"node_id": 45, "text": "#include \"ObjectReadIterator.h\"\n"}, {"node_id": 46, "text": "#include"}, {"node_id": 48, "text": "#include \"ResponseContext.h\"\n"}, {"node_id": 49, "text": "#include"}, {"node_id": 51, "text": "#include \"SlaveEventBuffer.h\"\n"}, {"node_id": 52, "text": "#include"}, {"node_id": 54, "text": "#include \"SlaveResponseTypes.h\"\n"}, {"node_id": 55, "text": "#include"}, {"node_id": 57, "text": "#include \"VtoReader.h\"\n"}, {"node_id": 58, "text": "#include"}, {"node_id": 60, "text": "#include \"VtoWriter.h\"\n"}, {"node_id": 61, "text": "#include"}, {"node_id": 63, "text": "#include \"OutstationSBOHandler.h\"\n"}, {"node_id": 64, "text": "#include"}]}, "original_source_code": "\n//\n// Licensed to Green Energy Corp (www.greenenergycorp.com) under one or\n// more contributor license agreements. See the NOTICE file distributed\n// with this work for additional information regarding copyright ownership.\n// Green Energy Corp licenses this file to you under the Apache License,\n// Version 2.0 (the \"License\"); you may not use this file except in\n// compliance 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, 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// This file was forked on 01/01/2013 by Automatak, LLC and modifications\n// have been made to this file. Automatak, LLC licenses these modifications to\n// you under the GNU Affero General Public License Version 3.0\n// (the \"Additional License\"). You may not use these modifications except in\n// compliance with the additional license. You may obtain a copy of the Additional\n// License at\n//\n// http://www.gnu.org/licenses/agpl.html\n//\n// Contact Automatak, LLC for a commercial license to these modifications\n//\n#ifndef __SLAVE_H_\n#define __SLAVE_H_\n\n#include <opendnp3/ICommandHandler.h>\n#include <opendnp3/Logger.h>\n#include <opendnp3/SlaveConfig.h>\n#include <opendnp3/Visibility.h>\n\n#include \"StackBase.h\"\n#include \"ChangeBuffer.h\"\n#include \"Loggable.h\"\n#include \"TimeSource.h\"\n#include \"LoggableMacros.h\"\n#include \"ITimer.h\"\n#include \"APDU.h\"\n#include \"AppInterfaces.h\"\n#include \"EventBuffers.h\"\n#include \"ObjectReadIterator.h\"\n#include \"ResponseContext.h\"\n#include \"SlaveEventBuffer.h\"\n#include \"SlaveResponseTypes.h\"\n#include \"VtoReader.h\"\n#include \"VtoWriter.h\"\n#include \"OutstationSBOHandler.h\"\n\n\nnamespace opendnp3\n{\n\nclass IExecutor;\nclass AS_Base;\n\n/**\n * @section desc DNP3 outstation.\n *\n * Manages a state machine that handles events from the user layer and the\n * application layer to provide DNP outstation services.\n *\n * ResponseContext and SlaveEventBuffer objects manage data/event responses to\n * master requests, and the IDNPCommandMaster implementation verifies\n * control/setpoint behavior and passes valid commands to the user code.\n *\n * SlaveConfig structure represents the slave behavioral configuration, the\n * Database is in charge of the data model itself.\n *\n * Global IIN state is maintained and combined with request-specific\n * information to form response IINs.\n *\n * The Slave is responsible for building all aspects of APDU packet responses\n * except for the application sequence number.\n */\nclass DLL_LOCAL Slave : public Loggable, public IAppUser, public StackBase\n{\n\n\tfriend class AS_Base; //make the state base class a friend\n\tfriend class AS_OpenBase;\n\tfriend class AS_Closed;\n\tfriend class AS_Idle;\n\tfriend class AS_WaitForRspSuccess;\n\tfriend class AS_WaitForUnsolSuccess;\n\tfriend class AS_WaitForSolUnsolSuccess;\n\npublic:\n\n\tSlave(Logger*, IAppLayer*, IExecutor*, ITimeManager*, Database*, ICommandHandler*, const SlaveConfig&, ITimeSource* apTimeSource = TimeSource::Inst());\n\t~Slave();\n\n\t////////////////////////\n\t// External events\n\t////////////////////////\n\n\t/* Implement IAppUser - callbacks from the app layer */\n\tvoid OnLowerLayerUp();\n\tvoid OnLowerLayerDown();\n\n\tvoid OnUnsolSendSuccess();\n\tvoid OnSolSendSuccess();\n\n\tvoid OnUnsolFailure();\n\tvoid OnSolFailure();\n\n\t// Only have to override OnRequest since we're a slave\n\tvoid OnRequest(const APDU&, SequenceInfo);\n\tvoid OnUnknownObject();\n\n\t/**\n\t * Implements IAppUser::IsMaster().\n\t *\n\t * @return\t\t\t'false' since this is a Slave (outstation)\n\t *\t\t\t\t\timplementation\n\t */\n\tbool IsMaster() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Returns the buffer that is used for data updates by the user\n\t * application. Writing new entries to this buffer will result in the\n\t * Slave doing things.\n\t *\n\t * @return\t\t\ta pointer to the buffer\n\t */\n\tIDataObserver* GetDataObserver() {\n\t\treturn &mChangeBuffer;\n\t}\n\n\t/**\n\t * Returns a pointer to the VTO reader object. This should only be\n\t * used by internal subsystems in the library. External user\n\t * applications should associate IVtoCallbacks objects using the\n\t * AsyncStackManager.\n\t *\n\t * @return\t\t\ta pointer to the VtoReader instance for this stack\n\t */\n\tVtoReader* GetVtoReader() {\n\t\treturn &mVtoReader;\n\t}\n\n\t/**\n\t * Returns a pointer to the VtoWriter instance for this stack.\n\t * External user applications should use this hook to write new data\n\t * to the Master via the Slave (outstation).\n\t *\n\t * @return\t\t\ta pointer to the VtoWriter instance for this stack\n\t */\n\tIVtoWriter* GetVtoWriter() {\n\t\treturn &mVtoWriter;\n\t}\n\nprivate:\n\n\tChangeBuffer mChangeBuffer;\t\t\t\t// how client code gives us updates\n\tIAppLayer* mpAppLayer;\t\t\t\t\t// lower application layer\n\tDatabase* mpDatabase;\t\t\t\t\t// holds static data\n\tICommandHandler* mpCmdHandler;\t\t\t// how commands are selected/operated on application code\n\tint mSequence;\t\t\t\t\t\t\t// control sequence\n\tAS_Base* mpState;\t\t\t\t\t\t// current state for the state pattern\n\tSlaveConfig mConfig;\t\t\t\t\t// houses the configurable paramters of the outstation\n\tSlaveResponseTypes mRspTypes;\t\t\t// converts the group/var in the config to dnp singletons\n\n\tITimer* mpUnsolTimer;\t\t\t\t\t// timer for sending unsol responsess\n\n\tINotifier* mpVtoNotifier;\n\n\tIINField mIIN;\t\t\t\t\t\t\t// IIN bits that persist between requests (i.e. NeedsTime/Restart/Etc)\n\tIINField mRspIIN;\t\t\t\t\t\t// Transient IIN bits that get merged before a response is issued\n\tAPDU mResponse;\t\t\t\t\t\t\t// APDU used to form responses\n\tAPDU mRequest;\t\t\t\t\t\t\t// APDU used to save Deferred requests\n\tSequenceInfo mSeqInfo;\n\tAPDU mUnsol;\t\t\t\t\t\t\t// APDY used to form unsol respones\n\tResponseContext mRspContext;\t\t\t// Used to track and construct response fragments\n\tOutstationSBOHandler mSBOHandler; // Tracks SBO requests, forwarding valid sequences to the application\n\n\tbool mHaveLastRequest;\n\tAPDU mLastRequest;\t\t\t\t\t\t// APDU used to form responses\n\n\tITimeManager* mpTime;\n\n\t// Flags that tell us that some action has been Deferred\n\t// until the slave is in a state capable of handling it.\n\n\tbool mDeferredUpdate;\t\t\t\t\t// Indicates that a data update has been Deferred\n\tbool mDeferredRequest;\t\t\t\t\t// Indicates that a request has been Deferred\n\tbool mDeferredUnsol;\t\t\t\t\t// Indicates that the unsol timer expired, but the event was Deferred\n\tbool mDeferredUnknown;\n\n\tbool mStartupNullUnsol;\t\t\t\t\t// Tracks whether the device has completed the NULL unsol startup message\n\n\tStackState mState;\n\n\tStackState GetState() {\n\t\treturn mState;\n\t}\n\n\tvoid UpdateState(StackState aState);\n\n\tvoid OnVtoUpdate();\t\t\t\t\t\t// internal event dispatched when user code commits an update to mVtoWriter\n\tvoid OnDataUpdate();\t\t\t\t\t// internal event dispatched when user code commits an update to mChangeBuffer\n\tvoid OnUnsolTimerExpiration();\t\t\t// internal event dispatched when the unsolicted pack/retry timer expires\n\n\tvoid ConfigureAndSendSimpleResponse();\n\tvoid Send(APDU&);\n\tvoid Send(APDU& arAPDU, const IINField& arIIN); // overload with additional IIN data\n\tvoid SendUnsolicited(APDU& arAPDU);\n\n\tvoid HandleWrite(const APDU& arRequest);\n\tvoid HandleVtoTransfer(const APDU& arRequest);\n\tvoid HandleWriteIIN(HeaderReadIterator& arHdr);\n\tvoid HandleWriteTimeDate(HeaderReadIterator& arHWI);\n\tvoid HandleWriteVto(HeaderReadIterator& arHdr);\n\tvoid HandleSelect(const APDU& arRequest, SequenceInfo aSeqInfo);\n\tvoid HandleOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n\tvoid HandleDirectOperate(const APDU& arRequest, SequenceInfo aSeqInfo);\n\tvoid HandleEnableUnsolicited(const APDU& arRequest, bool aIsEnable);\n\tvoid HandleUnknown();\n\n\tvoid ConfigureDelayMeasurement(const APDU& arRequest);\n\tvoid CreateResponseContext(const APDU& arRequest);\n\n\t// Helpers\n\n\tsize_t FlushVtoUpdates();\n\tsize_t FlushUpdates();\n\tvoid FlushDeferredEvents();\n\tvoid StartUnsolTimer(millis_t aTimeout);\n\n\t// Task handlers\n\n\tvoid ResetTimeIIN();\n\tITimer* mpTimeTimer;\n\n\t/**\n\t * The VtoReader instance for this stack which will direct received\n\t * VTO data to the user application. The user application should\n\t * register an IVtoCallbacks instance for the desired virtual channel\n\t * id(s) using AsyncStackManager::AddVtoChannel().\n\t */\n\tVtoReader mVtoReader;\n\n\t/**\n\t * The VtoWriter instance for this stack which will buffer new data\n\t * from the user application to the DNP3 stream. This handler is\n\t * thread-safe.\n\t */\n\tVtoWriter mVtoWriter;\n\n\t/**\n\t * A structure to provide the C++ equivalent of templated typedefs.\n\t */\n\ttemplate <class T>\n\tstruct CommandFunc {\n\t\ttypedef std::function<CommandStatus (T&, size_t)> Type;\n\t};\n\n\t/**\n\t * Forms a response message to a list of command objects.\n\t * Slave::mResponse is used as a destination buffer.\n\t *\n\t * @param apObj\t\t\tDNP3 object capable of reading/writing its own\n\t * \t\t\t\t\t\ttype from/to a byte stream\n\t * @param arIter\t\tan ObjectReadIterator that provides access to the\n\t * \t\t\t\t\t\tDNP3 objects\n\t * @param aFunc\t\t\tFunction for issuing/selecting\n\t */\n\ttemplate <class T>\n\tvoid RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler);\n};\n\ntemplate<class T>\nvoid Slave::RespondToCommands(const StreamObject<T>* apObj, ObjectReadIterator& arIter, std::function<CommandStatus (T, size_t)> CommandHandler)\n{\n\tIndexedWriteIterator i = mResponse.WriteIndexed(apObj, arIter.Count(), arIter.Header().GetQualifier());\n\tsize_t count = 1;\n\twhile (!arIter.IsEnd()) {\n\t\tT val = apObj->Read(*arIter);\n\t\tsize_t index = arIter->Index();\n\t\tif (count > mConfig.mMaxControls) {\n\t\t\tval.mStatus = CS_TOO_MANY_OPS;\n\t\t}\n\t\telse {\n\t\t\tval.mStatus = CommandHandler(val, index);\n\t\t\tif(val.mStatus == CS_NOT_SUPPORTED) {\n\t\t\t\tthis->mRspIIN.SetParameterError(true);\n\t\t\t}\n\t\t}\n\t\ti.SetIndex(index);\n\t\tapObj->Write(*i, val);\n\t\t++i;\n\t\t++arIter;\n\t\t++count;\n\t}\n}\n\n}\n\n/* vim: set ts=4 sw=4: */\n\n#endif\n\n"}
345
c
/******************************** * * Copyright © 2016-2018 <NAME> * * MIT Licence - Full licence details can be found in the file 'LICENSE' or in the Pods-{yourProjectName}-acknowledgements.markdown * * This file is included with CDSCoreDataSolutions * ************************************/ #import <CDSCoreDataSolutions/CDSCoreDataStack.h> #import "CDSErrors.h" @interface CDSCoreDataStack () @property (strong,nonatomic,readwrite) NSManagedObjectModel *managedObjectModel; @property (strong,nonatomic,readwrite) NSPersistentStoreCoordinator *persistentStoreCoordinator; @property (strong,nonatomic,readwrite) NSManagedObjectContext *mainQueueContext; @property (strong,nonatomic) NSManagedObjectContext *persistenceContext; @end
36.15
20
(translation_unit) "/********************************\n *\n * Copyright © 2016-2018 <NAME>\n *\n * MIT Licence - Full licence details can be found in the file 'LICENSE' or in the Pods-{yourProjectName}-acknowledgements.markdown\n *\n * This file is included with CDSCoreDataSolutions\n *\n ************************************/\n\n\n\n#import <CDSCoreDataSolutions/CDSCoreDataStack.h>\n#import "CDSErrors.h"\n\n\n\n\n@interface CDSCoreDataStack ()\n\n@property (strong,nonatomic,readwrite) NSManagedObjectModel *managedObjectModel;\n@property (strong,nonatomic,readwrite) NSPersistentStoreCoordinator *persistentStoreCoordinator;\n@property (strong,nonatomic,readwrite) NSManagedObjectContext *mainQueueContext;\n@property (strong,nonatomic) NSManagedObjectContext *persistenceContext;\n\n@end\n" (comment) "/********************************\n *\n * Copyright © 2016-2018 <NAME>\n *\n * MIT Licence - Full licence details can be found in the file 'LICENSE' or in the Pods-{yourProjectName}-acknowledgements.markdown\n *\n * This file is included with CDSCoreDataSolutions\n *\n ************************************/\n" (preproc_call) "import <CDSCoreDataSolutions/CDSCoreDataStack.h>\n#" (preproc_directive) "import " (preproc_arg) "CDSCoreDataSolutions/CDSCoreDataStack.h>\n" (preproc_call) "import "CDSErrors.h"\n\n" (preproc_directive) "import " (preproc_arg) "CDSErrors.h"\n" (ERROR) "interface CDSCoreDataStack ()\n\n@property (strong,nonatomic,readwrite) NSManagedObjectModel *managedObjectModel;\n@property (strong,nonatomic,readwrite) NSPersistentStoreCoordinator *persistentStoreCoordinator;\n@property (strong,nonatomic,readwrite) NSManagedObjectContext *mainQueueContext;\n@property (strong,nonatomic) NSManagedObjectContext *persistenceContext;\n\n@end\n" (ERROR) "i" (type_identifier) "nterface " (function_declarator) "DSCoreDataStack ()\n" (identifier) "DSCoreDataStack " (parameter_list) ")\n" (() ")" ()) "\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty (strong,nonatomic,readwrite) NSManagedObjectModel *managedObjectModel;\n" (macro_type_specifier) "roperty (strong,nonatomic,readwrite) " (identifier) "roperty " (() "s" (ERROR) "trong,nonatomic,r" (type_descriptor) "trong," (type_identifier) "trong," (,) "n" (type_descriptor) "onatomic," (type_identifier) "onatomic," (,) "r" (type_descriptor) "eadwrite)" (type_identifier) "eadwrite)" ()) " " (ERROR) "SManagedObjectModel " (identifier) "SManagedObjectModel " (pointer_declarator) "managedObjectModel;" (*) "m" (identifier) "anagedObjectModel;" (;) "\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty (strong,nonatomic,readwrite) NSPersistentStoreCoordinator *persistentStoreCoordinator;\n" (macro_type_specifier) "roperty (strong,nonatomic,readwrite) " (identifier) "roperty " (() "s" (ERROR) "trong,nonatomic,r" (type_descriptor) "trong," (type_identifier) "trong," (,) "n" (type_descriptor) "onatomic," (type_identifier) "onatomic," (,) "r" (type_descriptor) "eadwrite)" (type_identifier) "eadwrite)" ()) " " (ERROR) "SPersistentStoreCoordinator " (identifier) "SPersistentStoreCoordinator " (pointer_declarator) "persistentStoreCoordinator;" (*) "p" (identifier) "ersistentStoreCoordinator;" (;) "\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty (strong,nonatomic,readwrite) NSManagedObjectContext *mainQueueContext;\n" (macro_type_specifier) "roperty (strong,nonatomic,readwrite) " (identifier) "roperty " (() "s" (ERROR) "trong,nonatomic,r" (type_descriptor) "trong," (type_identifier) "trong," (,) "n" (type_descriptor) "onatomic," (type_identifier) "onatomic," (,) "r" (type_descriptor) "eadwrite)" (type_identifier) "eadwrite)" ()) " " (ERROR) "SManagedObjectContext " (identifier) "SManagedObjectContext " (pointer_declarator) "mainQueueContext;" (*) "m" (identifier) "ainQueueContext;" (;) "\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty (strong,nonatomic) NSManagedObjectContext *persistenceContext;\n" (macro_type_specifier) "roperty (strong,nonatomic) " (identifier) "roperty " (() "s" (ERROR) "trong,n" (type_descriptor) "trong," (type_identifier) "trong," (,) "n" (type_descriptor) "onatomic)" (type_identifier) "onatomic)" ()) " " (ERROR) "SManagedObjectContext " (identifier) "SManagedObjectContext " (pointer_declarator) "persistenceContext;" (*) "p" (identifier) "ersistenceContext;" (;) "\n" (ERROR) "e" (ERROR) "e" (identifier) "nd\n"
104
20
{"language": "c", "success": true, "metadata": {"lines": 20, "avg_line_length": 36.15, "nodes": 78, "errors": 0, "source_hash": "87736389ae589499fe539c382afc18abb2d0ddfbfad39dd0bb136c10d6d839f5", "categorized_nodes": 37}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "import <CDSCoreDataSolutions/CDSCoreDataStack.h>\n#", "parent": null, "children": [1], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 1, "type": "preproc_arg", "text": "CDSCoreDataSolutions/CDSCoreDataStack.h>\n", "parent": 0, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 49}}, {"id": 2, "type": "preproc_call", "text": "import \"CDSErrors.h\"\n\n", "parent": null, "children": [3], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 3, "type": "preproc_arg", "text": "CDSErrors.h\"\n", "parent": 2, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 21}}, {"id": 4, "type": "ERROR", "text": "interface CDSCoreDataStack ()\n\n@property (strong,nonatomic,readwrite) NSManagedObjectModel *managedObjectModel;\n@property (strong,nonatomic,readwrite) NSPersistentStoreCoordinator *persistentStoreCoordinator;\n@property (strong,nonatomic,readwrite) NSManagedObjectContext *mainQueueContext;\n@property (strong,nonatomic) NSManagedObjectContext *persistenceContext;\n\n@end\n", "parent": null, "children": [5, 6, 7, 9, 11, 26, 28, 43, 45, 60, 62, 75, 77], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 25, "column": 4}}, {"id": 5, "type": "ERROR", "text": "i", "parent": 4, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 6, "type": "type_identifier", "text": "nterface ", "parent": 4, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 10}}, {"id": 7, "type": "function_declarator", "text": "DSCoreDataStack ()\n", "parent": 4, "children": [8], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 30}}, {"id": 8, "type": "identifier", "text": "DSCoreDataStack ", "parent": 7, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 27}}, {"id": 9, "type": "ERROR", "text": "p", "parent": 4, "children": [10], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 10, "type": "ERROR", "text": "p", "parent": 9, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 11, "type": "declaration", "text": "roperty (strong,nonatomic,readwrite) NSManagedObjectModel *managedObjectModel;\n", "parent": 4, "children": [12, 21, 23], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 80}}, {"id": 12, "type": "macro_type_specifier", "text": "roperty (strong,nonatomic,readwrite) ", "parent": 11, "children": [13, 14, 19], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 38}}, {"id": 13, "type": "identifier", "text": "roperty ", "parent": 12, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 14, "type": "ERROR", "text": "trong,nonatomic,r", "parent": 12, "children": [15, 17], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 28}}, {"id": 15, "type": "type_descriptor", "text": "trong,", "parent": 14, "children": [16], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 17}}, {"id": 16, "type": "type_identifier", "text": "trong,", "parent": 15, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 17}}, {"id": 17, "type": "type_descriptor", "text": "onatomic,", "parent": 14, "children": [18], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 27}}, {"id": 18, "type": "type_identifier", "text": "onatomic,", "parent": 17, "children": [], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 27}}, {"id": 19, "type": "type_descriptor", "text": "eadwrite)", "parent": 12, "children": [20], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 37}}, {"id": 20, "type": "type_identifier", "text": "eadwrite)", "parent": 19, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 37}}, {"id": 21, "type": "ERROR", "text": "SManagedObjectModel ", "parent": 11, "children": [22], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 59}}, {"id": 22, "type": "identifier", "text": "SManagedObjectModel ", "parent": 21, "children": [], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 59}}, {"id": 23, "type": "pointer_declarator", "text": "managedObjectModel;", "parent": 11, "children": [24, 25], "start_point": {"row": 20, "column": 60}, "end_point": {"row": 20, "column": 79}}, {"id": 24, "type": "*", "text": "m", "parent": 23, "children": [], "start_point": {"row": 20, "column": 60}, "end_point": {"row": 20, "column": 61}}, {"id": 25, "type": "identifier", "text": "anagedObjectModel;", "parent": 23, "children": [], "start_point": {"row": 20, "column": 61}, "end_point": {"row": 20, "column": 79}}, {"id": 26, "type": "ERROR", "text": "p", "parent": 4, "children": [27], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 27, "type": "ERROR", "text": "p", "parent": 26, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 28, "type": "declaration", "text": "roperty (strong,nonatomic,readwrite) NSPersistentStoreCoordinator *persistentStoreCoordinator;\n", "parent": 4, "children": [29, 38, 40], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 96}}, {"id": 29, "type": "macro_type_specifier", "text": "roperty (strong,nonatomic,readwrite) ", "parent": 28, "children": [30, 31, 36], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 38}}, {"id": 30, "type": "identifier", "text": "roperty ", "parent": 29, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 9}}, {"id": 31, "type": "ERROR", "text": "trong,nonatomic,r", "parent": 29, "children": [32, 34], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 28}}, {"id": 32, "type": "type_descriptor", "text": "trong,", "parent": 31, "children": [33], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 17}}, {"id": 33, "type": "type_identifier", "text": "trong,", "parent": 32, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 17}}, {"id": 34, "type": "type_descriptor", "text": "onatomic,", "parent": 31, "children": [35], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 27}}, {"id": 35, "type": "type_identifier", "text": "onatomic,", "parent": 34, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 27}}, {"id": 36, "type": "type_descriptor", "text": "eadwrite)", "parent": 29, "children": [37], "start_point": {"row": 21, "column": 28}, "end_point": {"row": 21, "column": 37}}, {"id": 37, "type": "type_identifier", "text": "eadwrite)", "parent": 36, "children": [], "start_point": {"row": 21, "column": 28}, "end_point": {"row": 21, "column": 37}}, {"id": 38, "type": "ERROR", "text": "SPersistentStoreCoordinator ", "parent": 28, "children": [39], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 67}}, {"id": 39, "type": "identifier", "text": "SPersistentStoreCoordinator ", "parent": 38, "children": [], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 67}}, {"id": 40, "type": "pointer_declarator", "text": "persistentStoreCoordinator;", "parent": 28, "children": [41, 42], "start_point": {"row": 21, "column": 68}, "end_point": {"row": 21, "column": 95}}, {"id": 41, "type": "*", "text": "p", "parent": 40, "children": [], "start_point": {"row": 21, "column": 68}, "end_point": {"row": 21, "column": 69}}, {"id": 42, "type": "identifier", "text": "ersistentStoreCoordinator;", "parent": 40, "children": [], "start_point": {"row": 21, "column": 69}, "end_point": {"row": 21, "column": 95}}, {"id": 43, "type": "ERROR", "text": "p", "parent": 4, "children": [44], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 44, "type": "ERROR", "text": "p", "parent": 43, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 45, "type": "declaration", "text": "roperty (strong,nonatomic,readwrite) NSManagedObjectContext *mainQueueContext;\n", "parent": 4, "children": [46, 55, 57], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 80}}, {"id": 46, "type": "macro_type_specifier", "text": "roperty (strong,nonatomic,readwrite) ", "parent": 45, "children": [47, 48, 53], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 38}}, {"id": 47, "type": "identifier", "text": "roperty ", "parent": 46, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 9}}, {"id": 48, "type": "ERROR", "text": "trong,nonatomic,r", "parent": 46, "children": [49, 51], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 28}}, {"id": 49, "type": "type_descriptor", "text": "trong,", "parent": 48, "children": [50], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 17}}, {"id": 50, "type": "type_identifier", "text": "trong,", "parent": 49, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 17}}, {"id": 51, "type": "type_descriptor", "text": "onatomic,", "parent": 48, "children": [52], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 27}}, {"id": 52, "type": "type_identifier", "text": "onatomic,", "parent": 51, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 27}}, {"id": 53, "type": "type_descriptor", "text": "eadwrite)", "parent": 46, "children": [54], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 37}}, {"id": 54, "type": "type_identifier", "text": "eadwrite)", "parent": 53, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 37}}, {"id": 55, "type": "ERROR", "text": "SManagedObjectContext ", "parent": 45, "children": [56], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 61}}, {"id": 56, "type": "identifier", "text": "SManagedObjectContext ", "parent": 55, "children": [], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 61}}, {"id": 57, "type": "pointer_declarator", "text": "mainQueueContext;", "parent": 45, "children": [58, 59], "start_point": {"row": 22, "column": 62}, "end_point": {"row": 22, "column": 79}}, {"id": 58, "type": "*", "text": "m", "parent": 57, "children": [], "start_point": {"row": 22, "column": 62}, "end_point": {"row": 22, "column": 63}}, {"id": 59, "type": "identifier", "text": "ainQueueContext;", "parent": 57, "children": [], "start_point": {"row": 22, "column": 63}, "end_point": {"row": 22, "column": 79}}, {"id": 60, "type": "ERROR", "text": "p", "parent": 4, "children": [61], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 61, "type": "ERROR", "text": "p", "parent": 60, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 62, "type": "declaration", "text": "roperty (strong,nonatomic) NSManagedObjectContext *persistenceContext;\n", "parent": 4, "children": [63, 70, 72], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 72}}, {"id": 63, "type": "macro_type_specifier", "text": "roperty (strong,nonatomic) ", "parent": 62, "children": [64, 65, 68], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 28}}, {"id": 64, "type": "identifier", "text": "roperty ", "parent": 63, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 65, "type": "ERROR", "text": "trong,n", "parent": 63, "children": [66], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 18}}, {"id": 66, "type": "type_descriptor", "text": "trong,", "parent": 65, "children": [67], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 17}}, {"id": 67, "type": "type_identifier", "text": "trong,", "parent": 66, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 17}}, {"id": 68, "type": "type_descriptor", "text": "onatomic)", "parent": 63, "children": [69], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 27}}, {"id": 69, "type": "type_identifier", "text": "onatomic)", "parent": 68, "children": [], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 27}}, {"id": 70, "type": "ERROR", "text": "SManagedObjectContext ", "parent": 62, "children": [71], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 51}}, {"id": 71, "type": "identifier", "text": "SManagedObjectContext ", "parent": 70, "children": [], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 51}}, {"id": 72, "type": "pointer_declarator", "text": "persistenceContext;", "parent": 62, "children": [73, 74], "start_point": {"row": 23, "column": 52}, "end_point": {"row": 23, "column": 71}}, {"id": 73, "type": "*", "text": "p", "parent": 72, "children": [], "start_point": {"row": 23, "column": 52}, "end_point": {"row": 23, "column": 53}}, {"id": 74, "type": "identifier", "text": "ersistenceContext;", "parent": 72, "children": [], "start_point": {"row": 23, "column": 53}, "end_point": {"row": 23, "column": 71}}, {"id": 75, "type": "ERROR", "text": "e", "parent": 4, "children": [76], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 76, "type": "ERROR", "text": "e", "parent": 75, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 77, "type": "identifier", "text": "nd\n", "parent": 4, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 4}}]}, "node_categories": {"declarations": {"functions": [7], "variables": [11, 28, 45, 62], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [6, 8, 12, 13, 16, 18, 20, 22, 25, 29, 30, 33, 35, 37, 39, 42, 46, 47, 50, 52, 54, 56, 59, 63, 64, 67, 69, 71, 74, 77], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 2], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 7, "universal_type": "function", "name": "unknown", "text_snippet": "DSCoreDataStack ()\n"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/********************************\n *\n * Copyright \u00a9 2016-2018 <NAME>\n *\n * MIT Licence - Full licence details can be found in the file 'LICENSE' or in the Pods-{yourProjectName}-acknowledgements.markdown\n *\n * This file is included with CDSCoreDataSolutions\n *\n ************************************/\n\n\n\n#import <CDSCoreDataSolutions/CDSCoreDataStack.h>\n#import \"CDSErrors.h\"\n\n\n\n\n@interface CDSCoreDataStack ()\n\n@property (strong,nonatomic,readwrite) NSManagedObjectModel *managedObjectModel;\n@property (strong,nonatomic,readwrite) NSPersistentStoreCoordinator *persistentStoreCoordinator;\n@property (strong,nonatomic,readwrite) NSManagedObjectContext *mainQueueContext;\n@property (strong,nonatomic) NSManagedObjectContext *persistenceContext;\n\n@end\n"}
346
c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_putstr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: pgritsen <<EMAIL>> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/10/26 15:59:25 by pgritsen #+# #+# */ /* Updated: 2017/12/08 14:15:21 by pgritsen ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" void ft_putstr(char const *s) { if (!s) return (ft_putstr("(null)")); s = (char const *)write(1, s, ft_strlen(s)); } void ft_putustr(t_wint const *s) { if (!s) return (ft_putstr("(null)")); while (*s) ft_putchar(*s++); } void ft_putnstr(char const *s, size_t len) { size_t tmp; if (!s) return (ft_putstr("(null)")); tmp = ft_strlen(s); len > tmp ? len = tmp : 0; tmp = write(1, s, len); } void ft_putunstr(t_wint const *s, size_t len) { intmax_t tmp; if (!s) return (ft_putstr("(null)")); tmp = ft_strulen(s); (intmax_t)len < tmp ? tmp = len : 0; while (*s && (tmp -= ft_ucharlen(*s)) >= 0) ft_putchar(*s++); }
33.82
44
(translation_unit) "/* ************************************************************************** */\n/* */\n/* ::: :::::::: */\n/* ft_putstr.c :+: :+: :+: */\n/* +:+ +:+ +:+ */\n/* By: pgritsen <<EMAIL>> +#+ +:+ +#+ */\n/* +#+#+#+#+#+ +#+ */\n/* Created: 2017/10/26 15:59:25 by pgritsen #+# #+# */\n/* Updated: 2017/12/08 14:15:21 by pgritsen ### ########.fr */\n/* */\n/* ************************************************************************** */\n\n#include "libft.h"\n\nvoid ft_putstr(char const *s)\n{\n if (!s)\n return (ft_putstr("(null)"));\n s = (char const *)write(1, s, ft_strlen(s));\n}\n\nvoid ft_putustr(t_wint const *s)\n{\n if (!s)\n return (ft_putstr("(null)"));\n while (*s)\n ft_putchar(*s++);\n}\n\nvoid ft_putnstr(char const *s, size_t len)\n{\n size_t tmp;\n\n if (!s)\n return (ft_putstr("(null)"));\n tmp = ft_strlen(s);\n len > tmp ? len = tmp : 0;\n tmp = write(1, s, len);\n}\n\nvoid ft_putunstr(t_wint const *s, size_t len)\n{\n intmax_t tmp;\n\n if (!s)\n return (ft_putstr("(null)"));\n tmp = ft_strulen(s);\n (intmax_t)len < tmp ? tmp = len : 0;\n while (*s && (tmp -= ft_ucharlen(*s)) >= 0)\n ft_putchar(*s++);\n}\n" (comment) "/* ************************************************************************** */" (comment) "/* */" (comment) "/* ::: :::::::: */" (comment) "/* ft_putstr.c :+: :+: :+: */" (comment) "/* +:+ +:+ +:+ */" (comment) "/* By: pgritsen <<EMAIL>> +#+ +:+ +#+ */" (comment) "/* +#+#+#+#+#+ +#+ */" (comment) "/* Created: 2017/10/26 15:59:25 by pgritsen #+# #+# */" (comment) "/* Updated: 2017/12/08 14:15:21 by pgritsen ### ########.fr */" (comment) "/* */" (comment) "/* ************************************************************************** */" (preproc_include) "#include "libft.h"\n" (#include) "#include" (string_literal) ""libft.h"" (") """ (string_content) "libft.h" (") """ (function_definition) "void ft_putstr(char const *s)\n{\n if (!s)\n return (ft_putstr("(null)"));\n s = (char const *)write(1, s, ft_strlen(s));\n}" (primitive_type) "void" (function_declarator) "ft_putstr(char const *s)" (identifier) "ft_putstr" (parameter_list) "(char const *s)" (() "(" (parameter_declaration) "char const *s" (primitive_type) "char" (type_qualifier) "const" (const) "const" (pointer_declarator) "*s" (*) "*" (identifier) "s" ()) ")" (compound_statement) "{\n if (!s)\n return (ft_putstr("(null)"));\n s = (char const *)write(1, s, ft_strlen(s));\n}" ({) "{" (if_statement) "if (!s)\n return (ft_putstr("(null)"));" (if) "if" (parenthesized_expression) "(!s)" (() "(" (unary_expression) "!s" (!) "!" (identifier) "s" ()) ")" (return_statement) "return (ft_putstr("(null)"));" (return) "return" (parenthesized_expression) "(ft_putstr("(null)"))" (() "(" (call_expression) "ft_putstr("(null)")" (identifier) "ft_putstr" (argument_list) "("(null)")" (() "(" (string_literal) ""(null)"" (") """ (string_content) "(null)" (") """ ()) ")" ()) ")" (;) ";" (expression_statement) "s = (char const *)write(1, s, ft_strlen(s));" (assignment_expression) "s = (char const *)write(1, s, ft_strlen(s))" (identifier) "s" (=) "=" (cast_expression) "(char const *)write(1, s, ft_strlen(s))" (() "(" (type_descriptor) "char const *" (primitive_type) "char" (type_qualifier) "const" (const) "const" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "write(1, s, ft_strlen(s))" (identifier) "write" (argument_list) "(1, s, ft_strlen(s))" (() "(" (number_literal) "1" (,) "," (identifier) "s" (,) "," (call_expression) "ft_strlen(s)" (identifier) "ft_strlen" (argument_list) "(s)" (() "(" (identifier) "s" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "void ft_putustr(t_wint const *s)\n{\n if (!s)\n return (ft_putstr("(null)"));\n while (*s)\n ft_putchar(*s++);\n}" (primitive_type) "void" (function_declarator) "ft_putustr(t_wint const *s)" (identifier) "ft_putustr" (parameter_list) "(t_wint const *s)" (() "(" (parameter_declaration) "t_wint const *s" (type_identifier) "t_wint" (type_qualifier) "const" (const) "const" (pointer_declarator) "*s" (*) "*" (identifier) "s" ()) ")" (compound_statement) "{\n if (!s)\n return (ft_putstr("(null)"));\n while (*s)\n ft_putchar(*s++);\n}" ({) "{" (if_statement) "if (!s)\n return (ft_putstr("(null)"));" (if) "if" (parenthesized_expression) "(!s)" (() "(" (unary_expression) "!s" (!) "!" (identifier) "s" ()) ")" (return_statement) "return (ft_putstr("(null)"));" (return) "return" (parenthesized_expression) "(ft_putstr("(null)"))" (() "(" (call_expression) "ft_putstr("(null)")" (identifier) "ft_putstr" (argument_list) "("(null)")" (() "(" (string_literal) ""(null)"" (") """ (string_content) "(null)" (") """ ()) ")" ()) ")" (;) ";" (while_statement) "while (*s)\n ft_putchar(*s++);" (while) "while" (parenthesized_expression) "(*s)" (() "(" (pointer_expression) "*s" (*) "*" (identifier) "s" ()) ")" (expression_statement) "ft_putchar(*s++);" (call_expression) "ft_putchar(*s++)" (identifier) "ft_putchar" (argument_list) "(*s++)" (() "(" (pointer_expression) "*s++" (*) "*" (update_expression) "s++" (identifier) "s" (++) "++" ()) ")" (;) ";" (}) "}" (function_definition) "void ft_putnstr(char const *s, size_t len)\n{\n size_t tmp;\n\n if (!s)\n return (ft_putstr("(null)"));\n tmp = ft_strlen(s);\n len > tmp ? len = tmp : 0;\n tmp = write(1, s, len);\n}" (primitive_type) "void" (function_declarator) "ft_putnstr(char const *s, size_t len)" (identifier) "ft_putnstr" (parameter_list) "(char const *s, size_t len)" (() "(" (parameter_declaration) "char const *s" (primitive_type) "char" (type_qualifier) "const" (const) "const" (pointer_declarator) "*s" (*) "*" (identifier) "s" (,) "," (parameter_declaration) "size_t len" (primitive_type) "size_t" (identifier) "len" ()) ")" (compound_statement) "{\n size_t tmp;\n\n if (!s)\n return (ft_putstr("(null)"));\n tmp = ft_strlen(s);\n len > tmp ? len = tmp : 0;\n tmp = write(1, s, len);\n}" ({) "{" (declaration) "size_t tmp;" (primitive_type) "size_t" (identifier) "tmp" (;) ";" (if_statement) "if (!s)\n return (ft_putstr("(null)"));" (if) "if" (parenthesized_expression) "(!s)" (() "(" (unary_expression) "!s" (!) "!" (identifier) "s" ()) ")" (return_statement) "return (ft_putstr("(null)"));" (return) "return" (parenthesized_expression) "(ft_putstr("(null)"))" (() "(" (call_expression) "ft_putstr("(null)")" (identifier) "ft_putstr" (argument_list) "("(null)")" (() "(" (string_literal) ""(null)"" (") """ (string_content) "(null)" (") """ ()) ")" ()) ")" (;) ";" (expression_statement) "tmp = ft_strlen(s);" (assignment_expression) "tmp = ft_strlen(s)" (identifier) "tmp" (=) "=" (call_expression) "ft_strlen(s)" (identifier) "ft_strlen" (argument_list) "(s)" (() "(" (identifier) "s" ()) ")" (;) ";" (expression_statement) "len > tmp ? len = tmp : 0;" (conditional_expression) "len > tmp ? len = tmp : 0" (binary_expression) "len > tmp" (identifier) "len" (>) ">" (identifier) "tmp" (?) "?" (assignment_expression) "len = tmp" (identifier) "len" (=) "=" (identifier) "tmp" (:) ":" (number_literal) "0" (;) ";" (expression_statement) "tmp = write(1, s, len);" (assignment_expression) "tmp = write(1, s, len)" (identifier) "tmp" (=) "=" (call_expression) "write(1, s, len)" (identifier) "write" (argument_list) "(1, s, len)" (() "(" (number_literal) "1" (,) "," (identifier) "s" (,) "," (identifier) "len" ()) ")" (;) ";" (}) "}" (function_definition) "void ft_putunstr(t_wint const *s, size_t len)\n{\n intmax_t tmp;\n\n if (!s)\n return (ft_putstr("(null)"));\n tmp = ft_strulen(s);\n (intmax_t)len < tmp ? tmp = len : 0;\n while (*s && (tmp -= ft_ucharlen(*s)) >= 0)\n ft_putchar(*s++);\n}" (primitive_type) "void" (function_declarator) "ft_putunstr(t_wint const *s, size_t len)" (identifier) "ft_putunstr" (parameter_list) "(t_wint const *s, size_t len)" (() "(" (parameter_declaration) "t_wint const *s" (type_identifier) "t_wint" (type_qualifier) "const" (const) "const" (pointer_declarator) "*s" (*) "*" (identifier) "s" (,) "," (parameter_declaration) "size_t len" (primitive_type) "size_t" (identifier) "len" ()) ")" (compound_statement) "{\n intmax_t tmp;\n\n if (!s)\n return (ft_putstr("(null)"));\n tmp = ft_strulen(s);\n (intmax_t)len < tmp ? tmp = len : 0;\n while (*s && (tmp -= ft_ucharlen(*s)) >= 0)\n ft_putchar(*s++);\n}" ({) "{" (declaration) "intmax_t tmp;" (type_identifier) "intmax_t" (identifier) "tmp" (;) ";" (if_statement) "if (!s)\n return (ft_putstr("(null)"));" (if) "if" (parenthesized_expression) "(!s)" (() "(" (unary_expression) "!s" (!) "!" (identifier) "s" ()) ")" (return_statement) "return (ft_putstr("(null)"));" (return) "return" (parenthesized_expression) "(ft_putstr("(null)"))" (() "(" (call_expression) "ft_putstr("(null)")" (identifier) "ft_putstr" (argument_list) "("(null)")" (() "(" (string_literal) ""(null)"" (") """ (string_content) "(null)" (") """ ()) ")" ()) ")" (;) ";" (expression_statement) "tmp = ft_strulen(s);" (assignment_expression) "tmp = ft_strulen(s)" (identifier) "tmp" (=) "=" (call_expression) "ft_strulen(s)" (identifier) "ft_strulen" (argument_list) "(s)" (() "(" (identifier) "s" ()) ")" (;) ";" (expression_statement) "(intmax_t)len < tmp ? tmp = len : 0;" (conditional_expression) "(intmax_t)len < tmp ? tmp = len : 0" (binary_expression) "(intmax_t)len < tmp" (cast_expression) "(intmax_t)len" (() "(" (type_descriptor) "intmax_t" (type_identifier) "intmax_t" ()) ")" (identifier) "len" (<) "<" (identifier) "tmp" (?) "?" (assignment_expression) "tmp = len" (identifier) "tmp" (=) "=" (identifier) "len" (:) ":" (number_literal) "0" (;) ";" (while_statement) "while (*s && (tmp -= ft_ucharlen(*s)) >= 0)\n ft_putchar(*s++);" (while) "while" (parenthesized_expression) "(*s && (tmp -= ft_ucharlen(*s)) >= 0)" (() "(" (binary_expression) "*s && (tmp -= ft_ucharlen(*s)) >= 0" (pointer_expression) "*s" (*) "*" (identifier) "s" (&&) "&&" (binary_expression) "(tmp -= ft_ucharlen(*s)) >= 0" (parenthesized_expression) "(tmp -= ft_ucharlen(*s))" (() "(" (assignment_expression) "tmp -= ft_ucharlen(*s)" (identifier) "tmp" (-=) "-=" (call_expression) "ft_ucharlen(*s)" (identifier) "ft_ucharlen" (argument_list) "(*s)" (() "(" (pointer_expression) "*s" (*) "*" (identifier) "s" ()) ")" ()) ")" (>=) ">=" (number_literal) "0" ()) ")" (expression_statement) "ft_putchar(*s++);" (call_expression) "ft_putchar(*s++)" (identifier) "ft_putchar" (argument_list) "(*s++)" (() "(" (pointer_expression) "*s++" (*) "*" (update_expression) "s++" (identifier) "s" (++) "++" ()) ")" (;) ";" (}) "}"
352
0
{"language": "c", "success": true, "metadata": {"lines": 44, "avg_line_length": 33.82, "nodes": 205, "errors": 0, "source_hash": "200efd231f7f4f2cbfd6e5d5bedf8ef887c93dacc52625676d8db90e50b9ae4d", "categorized_nodes": 143}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"libft.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": "\"libft.h\"", "parent": 0, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 18}}, {"id": 3, "type": "function_definition", "text": "void\tft_putstr(char const *s)\n{\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)\"));\n\ts = (char const *)write(1, s, ft_strlen(s));\n}", "parent": null, "children": [4, 5], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "void", "parent": 3, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 4}}, {"id": 5, "type": "function_declarator", "text": "ft_putstr(char const *s)", "parent": 3, "children": [6, 7], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 29}}, {"id": 6, "type": "identifier", "text": "ft_putstr", "parent": 5, "children": [], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 14}}, {"id": 7, "type": "parameter_list", "text": "(char const *s)", "parent": 5, "children": [8], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 29}}, {"id": 8, "type": "parameter_declaration", "text": "char const *s", "parent": 7, "children": [9, 10], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 28}}, {"id": 9, "type": "primitive_type", "text": "char", "parent": 8, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 19}}, {"id": 10, "type": "pointer_declarator", "text": "*s", "parent": 8, "children": [11, 12], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 28}}, {"id": 11, "type": "*", "text": "*", "parent": 10, "children": [], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 27}}, {"id": 12, "type": "identifier", "text": "s", "parent": 10, "children": [], "start_point": {"row": 14, "column": 27}, "end_point": {"row": 14, "column": 28}}, {"id": 13, "type": "if_statement", "text": "if (!s)\n\t\treturn (ft_putstr(\"(null)\"));", "parent": 3, "children": [14, 18], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 17, "column": 31}}, {"id": 14, "type": "parenthesized_expression", "text": "(!s)", "parent": 13, "children": [15], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 8}}, {"id": 15, "type": "unary_expression", "text": "!s", "parent": 14, "children": [16, 17], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 7}}, {"id": 16, "type": "!", "text": "!", "parent": 15, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 6}}, {"id": 17, "type": "identifier", "text": "s", "parent": 15, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 7}}, {"id": 18, "type": "return_statement", "text": "return (ft_putstr(\"(null)\"));", "parent": 13, "children": [19], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 31}}, {"id": 19, "type": "parenthesized_expression", "text": "(ft_putstr(\"(null)\"))", "parent": 18, "children": [20], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 30}}, {"id": 20, "type": "call_expression", "text": "ft_putstr(\"(null)\")", "parent": 19, "children": [21, 22], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 29}}, {"id": 21, "type": "identifier", "text": "ft_putstr", "parent": 20, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 19}}, {"id": 22, "type": "argument_list", "text": "(\"(null)\")", "parent": 20, "children": [23], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 29}}, {"id": 23, "type": "string_literal", "text": "\"(null)\"", "parent": 22, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 28}}, {"id": 24, "type": "assignment_expression", "text": "s = (char const *)write(1, s, ft_strlen(s))", "parent": 3, "children": [25, 26, 27], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 44}}, {"id": 25, "type": "identifier", "text": "s", "parent": 24, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 2}}, {"id": 26, "type": "=", "text": "=", "parent": 24, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 4}}, {"id": 27, "type": "cast_expression", "text": "(char const *)write(1, s, ft_strlen(s))", "parent": 24, "children": [28, 32], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 44}}, {"id": 28, "type": "type_descriptor", "text": "char const *", "parent": 27, "children": [29, 30], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 18}}, {"id": 29, "type": "primitive_type", "text": "char", "parent": 28, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 10}}, {"id": 30, "type": "abstract_pointer_declarator", "text": "*", "parent": 28, "children": [31], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 18}}, {"id": 31, "type": "*", "text": "*", "parent": 30, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 18}}, {"id": 32, "type": "call_expression", "text": "write(1, s, ft_strlen(s))", "parent": 27, "children": [33, 34], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 44}}, {"id": 33, "type": "identifier", "text": "write", "parent": 32, "children": [], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 24}}, {"id": 34, "type": "argument_list", "text": "(1, s, ft_strlen(s))", "parent": 32, "children": [35, 36, 37], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 44}}, {"id": 35, "type": "number_literal", "text": "1", "parent": 34, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 26}}, {"id": 36, "type": "identifier", "text": "s", "parent": 34, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 29}}, {"id": 37, "type": "call_expression", "text": "ft_strlen(s)", "parent": 34, "children": [38, 39], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 43}}, {"id": 38, "type": "identifier", "text": "ft_strlen", "parent": 37, "children": [], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 40}}, {"id": 39, "type": "argument_list", "text": "(s)", "parent": 37, "children": [40], "start_point": {"row": 18, "column": 40}, "end_point": {"row": 18, "column": 43}}, {"id": 40, "type": "identifier", "text": "s", "parent": 39, "children": [], "start_point": {"row": 18, "column": 41}, "end_point": {"row": 18, "column": 42}}, {"id": 41, "type": "function_definition", "text": "void\tft_putustr(t_wint const *s)\n{\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)\"));\n\twhile (*s)\n\t\tft_putchar(*s++);\n}", "parent": null, "children": [42, 43], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 42, "type": "primitive_type", "text": "void", "parent": 41, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 4}}, {"id": 43, "type": "function_declarator", "text": "ft_putustr(t_wint const *s)", "parent": 41, "children": [44, 45], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 32}}, {"id": 44, "type": "identifier", "text": "ft_putustr", "parent": 43, "children": [], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 15}}, {"id": 45, "type": "parameter_list", "text": "(t_wint const *s)", "parent": 43, "children": [46], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 32}}, {"id": 46, "type": "parameter_declaration", "text": "t_wint const *s", "parent": 45, "children": [47, 48], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 31}}, {"id": 47, "type": "type_identifier", "text": "t_wint", "parent": 46, "children": [], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 22}}, {"id": 48, "type": "pointer_declarator", "text": "*s", "parent": 46, "children": [49, 50], "start_point": {"row": 21, "column": 29}, "end_point": {"row": 21, "column": 31}}, {"id": 49, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 21, "column": 29}, "end_point": {"row": 21, "column": 30}}, {"id": 50, "type": "identifier", "text": "s", "parent": 48, "children": [], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 31}}, {"id": 51, "type": "if_statement", "text": "if (!s)\n\t\treturn (ft_putstr(\"(null)\"));", "parent": 41, "children": [52, 56], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 24, "column": 31}}, {"id": 52, "type": "parenthesized_expression", "text": "(!s)", "parent": 51, "children": [53], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 8}}, {"id": 53, "type": "unary_expression", "text": "!s", "parent": 52, "children": [54, 55], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 7}}, {"id": 54, "type": "!", "text": "!", "parent": 53, "children": [], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 6}}, {"id": 55, "type": "identifier", "text": "s", "parent": 53, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 7}}, {"id": 56, "type": "return_statement", "text": "return (ft_putstr(\"(null)\"));", "parent": 51, "children": [57], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 31}}, {"id": 57, "type": "parenthesized_expression", "text": "(ft_putstr(\"(null)\"))", "parent": 56, "children": [58], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 30}}, {"id": 58, "type": "call_expression", "text": "ft_putstr(\"(null)\")", "parent": 57, "children": [59, 60], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 29}}, {"id": 59, "type": "identifier", "text": "ft_putstr", "parent": 58, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 19}}, {"id": 60, "type": "argument_list", "text": "(\"(null)\")", "parent": 58, "children": [61], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 29}}, {"id": 61, "type": "string_literal", "text": "\"(null)\"", "parent": 60, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 28}}, {"id": 62, "type": "while_statement", "text": "while (*s)\n\t\tft_putchar(*s++);", "parent": 41, "children": [63], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 26, "column": 19}}, {"id": 63, "type": "parenthesized_expression", "text": "(*s)", "parent": 62, "children": [64], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 11}}, {"id": 64, "type": "pointer_expression", "text": "*s", "parent": 63, "children": [65, 66], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 10}}, {"id": 65, "type": "*", "text": "*", "parent": 64, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 9}}, {"id": 66, "type": "identifier", "text": "s", "parent": 64, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 10}}, {"id": 67, "type": "call_expression", "text": "ft_putchar(*s++)", "parent": 62, "children": [68, 69], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 18}}, {"id": 68, "type": "identifier", "text": "ft_putchar", "parent": 67, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 12}}, {"id": 69, "type": "argument_list", "text": "(*s++)", "parent": 67, "children": [70], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 18}}, {"id": 70, "type": "pointer_expression", "text": "*s++", "parent": 69, "children": [71, 72], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 17}}, {"id": 71, "type": "*", "text": "*", "parent": 70, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 14}}, {"id": 72, "type": "update_expression", "text": "s++", "parent": 70, "children": [73, 74], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 17}}, {"id": 73, "type": "identifier", "text": "s", "parent": 72, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 15}}, {"id": 74, "type": "++", "text": "++", "parent": 72, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 17}}, {"id": 75, "type": "function_definition", "text": "void\tft_putnstr(char const *s, size_t len)\n{\n\tsize_t\ttmp;\n\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)\"));\n\ttmp = ft_strlen(s);\n\tlen > tmp ? len = tmp : 0;\n\ttmp = write(1, s, len);\n}", "parent": null, "children": [76, 77], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 76, "type": "primitive_type", "text": "void", "parent": 75, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 4}}, {"id": 77, "type": "function_declarator", "text": "ft_putnstr(char const *s, size_t len)", "parent": 75, "children": [78, 79], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 42}}, {"id": 78, "type": "identifier", "text": "ft_putnstr", "parent": 77, "children": [], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 15}}, {"id": 79, "type": "parameter_list", "text": "(char const *s, size_t len)", "parent": 77, "children": [80, 85], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 42}}, {"id": 80, "type": "parameter_declaration", "text": "char const *s", "parent": 79, "children": [81, 82], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 29}}, {"id": 81, "type": "primitive_type", "text": "char", "parent": 80, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 20}}, {"id": 82, "type": "pointer_declarator", "text": "*s", "parent": 80, "children": [83, 84], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 29}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 28}}, {"id": 84, "type": "identifier", "text": "s", "parent": 82, "children": [], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 29}}, {"id": 85, "type": "parameter_declaration", "text": "size_t len", "parent": 79, "children": [86, 87], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 41}}, {"id": 86, "type": "primitive_type", "text": "size_t", "parent": 85, "children": [], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 37}}, {"id": 87, "type": "identifier", "text": "len", "parent": 85, "children": [], "start_point": {"row": 29, "column": 38}, "end_point": {"row": 29, "column": 41}}, {"id": 88, "type": "declaration", "text": "size_t\ttmp;", "parent": 75, "children": [89, 90], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 12}}, {"id": 89, "type": "primitive_type", "text": "size_t", "parent": 88, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 7}}, {"id": 90, "type": "identifier", "text": "tmp", "parent": 88, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 11}}, {"id": 91, "type": "if_statement", "text": "if (!s)\n\t\treturn (ft_putstr(\"(null)\"));", "parent": 75, "children": [92, 96], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 34, "column": 31}}, {"id": 92, "type": "parenthesized_expression", "text": "(!s)", "parent": 91, "children": [93], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 8}}, {"id": 93, "type": "unary_expression", "text": "!s", "parent": 92, "children": [94, 95], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 7}}, {"id": 94, "type": "!", "text": "!", "parent": 93, "children": [], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 6}}, {"id": 95, "type": "identifier", "text": "s", "parent": 93, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 7}}, {"id": 96, "type": "return_statement", "text": "return (ft_putstr(\"(null)\"));", "parent": 91, "children": [97], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 31}}, {"id": 97, "type": "parenthesized_expression", "text": "(ft_putstr(\"(null)\"))", "parent": 96, "children": [98], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 30}}, {"id": 98, "type": "call_expression", "text": "ft_putstr(\"(null)\")", "parent": 97, "children": [99, 100], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 29}}, {"id": 99, "type": "identifier", "text": "ft_putstr", "parent": 98, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 19}}, {"id": 100, "type": "argument_list", "text": "(\"(null)\")", "parent": 98, "children": [101], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 29}}, {"id": 101, "type": "string_literal", "text": "\"(null)\"", "parent": 100, "children": [], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 28}}, {"id": 102, "type": "assignment_expression", "text": "tmp = ft_strlen(s)", "parent": 75, "children": [103, 104, 105], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 19}}, {"id": 103, "type": "identifier", "text": "tmp", "parent": 102, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 4}}, {"id": 104, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 6}}, {"id": 105, "type": "call_expression", "text": "ft_strlen(s)", "parent": 102, "children": [106, 107], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 19}}, {"id": 106, "type": "identifier", "text": "ft_strlen", "parent": 105, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 16}}, {"id": 107, "type": "argument_list", "text": "(s)", "parent": 105, "children": [108], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 19}}, {"id": 108, "type": "identifier", "text": "s", "parent": 107, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 18}}, {"id": 109, "type": "conditional_expression", "text": "len > tmp ? len = tmp : 0", "parent": 75, "children": [110, 114, 115, 119], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 26}}, {"id": 110, "type": "binary_expression", "text": "len > tmp", "parent": 109, "children": [111, 112, 113], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 10}}, {"id": 111, "type": "identifier", "text": "len", "parent": 110, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 4}}, {"id": 112, "type": ">", "text": ">", "parent": 110, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 6}}, {"id": 113, "type": "identifier", "text": "tmp", "parent": 110, "children": [], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 10}}, {"id": 114, "type": "?", "text": "?", "parent": 109, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 12}}, {"id": 115, "type": "assignment_expression", "text": "len = tmp", "parent": 109, "children": [116, 117, 118], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 22}}, {"id": 116, "type": "identifier", "text": "len", "parent": 115, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 16}}, {"id": 117, "type": "=", "text": "=", "parent": 115, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 118, "type": "identifier", "text": "tmp", "parent": 115, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 22}}, {"id": 119, "type": "number_literal", "text": "0", "parent": 109, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 26}}, {"id": 120, "type": "assignment_expression", "text": "tmp = write(1, s, len)", "parent": 75, "children": [121, 122, 123], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 23}}, {"id": 121, "type": "identifier", "text": "tmp", "parent": 120, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 4}}, {"id": 122, "type": "=", "text": "=", "parent": 120, "children": [], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 6}}, {"id": 123, "type": "call_expression", "text": "write(1, s, len)", "parent": 120, "children": [124, 125], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 23}}, {"id": 124, "type": "identifier", "text": "write", "parent": 123, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 12}}, {"id": 125, "type": "argument_list", "text": "(1, s, len)", "parent": 123, "children": [126, 127, 128], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 23}}, {"id": 126, "type": "number_literal", "text": "1", "parent": 125, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 14}}, {"id": 127, "type": "identifier", "text": "s", "parent": 125, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 17}}, {"id": 128, "type": "identifier", "text": "len", "parent": 125, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 22}}, {"id": 129, "type": "function_definition", "text": "void\tft_putunstr(t_wint const *s, size_t len)\n{\n\tintmax_t\ttmp;\n\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)\"));\n\ttmp = ft_strulen(s);\n\t(intmax_t)len < tmp ? tmp = len : 0;\n\twhile (*s && (tmp -= ft_ucharlen(*s)) >= 0)\n\t\tft_putchar(*s++);\n}", "parent": null, "children": [130, 131], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 130, "type": "primitive_type", "text": "void", "parent": 129, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 4}}, {"id": 131, "type": "function_declarator", "text": "ft_putunstr(t_wint const *s, size_t len)", "parent": 129, "children": [132, 133], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 45}}, {"id": 132, "type": "identifier", "text": "ft_putunstr", "parent": 131, "children": [], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 16}}, {"id": 133, "type": "parameter_list", "text": "(t_wint const *s, size_t len)", "parent": 131, "children": [134, 139], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 45}}, {"id": 134, "type": "parameter_declaration", "text": "t_wint const *s", "parent": 133, "children": [135, 136], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 32}}, {"id": 135, "type": "type_identifier", "text": "t_wint", "parent": 134, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 23}}, {"id": 136, "type": "pointer_declarator", "text": "*s", "parent": 134, "children": [137, 138], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 32}}, {"id": 137, "type": "*", "text": "*", "parent": 136, "children": [], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 31}}, {"id": 138, "type": "identifier", "text": "s", "parent": 136, "children": [], "start_point": {"row": 40, "column": 31}, "end_point": {"row": 40, "column": 32}}, {"id": 139, "type": "parameter_declaration", "text": "size_t len", "parent": 133, "children": [140, 141], "start_point": {"row": 40, "column": 34}, "end_point": {"row": 40, "column": 44}}, {"id": 140, "type": "primitive_type", "text": "size_t", "parent": 139, "children": [], "start_point": {"row": 40, "column": 34}, "end_point": {"row": 40, "column": 40}}, {"id": 141, "type": "identifier", "text": "len", "parent": 139, "children": [], "start_point": {"row": 40, "column": 41}, "end_point": {"row": 40, "column": 44}}, {"id": 142, "type": "declaration", "text": "intmax_t\ttmp;", "parent": 129, "children": [143, 144], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 14}}, {"id": 143, "type": "type_identifier", "text": "intmax_t", "parent": 142, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 9}}, {"id": 144, "type": "identifier", "text": "tmp", "parent": 142, "children": [], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 13}}, {"id": 145, "type": "if_statement", "text": "if (!s)\n\t\treturn (ft_putstr(\"(null)\"));", "parent": 129, "children": [146, 150], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 45, "column": 31}}, {"id": 146, "type": "parenthesized_expression", "text": "(!s)", "parent": 145, "children": [147], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 8}}, {"id": 147, "type": "unary_expression", "text": "!s", "parent": 146, "children": [148, 149], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 7}}, {"id": 148, "type": "!", "text": "!", "parent": 147, "children": [], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 6}}, {"id": 149, "type": "identifier", "text": "s", "parent": 147, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 7}}, {"id": 150, "type": "return_statement", "text": "return (ft_putstr(\"(null)\"));", "parent": 145, "children": [151], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 31}}, {"id": 151, "type": "parenthesized_expression", "text": "(ft_putstr(\"(null)\"))", "parent": 150, "children": [152], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 30}}, {"id": 152, "type": "call_expression", "text": "ft_putstr(\"(null)\")", "parent": 151, "children": [153, 154], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 29}}, {"id": 153, "type": "identifier", "text": "ft_putstr", "parent": 152, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 19}}, {"id": 154, "type": "argument_list", "text": "(\"(null)\")", "parent": 152, "children": [155], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 29}}, {"id": 155, "type": "string_literal", "text": "\"(null)\"", "parent": 154, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 28}}, {"id": 156, "type": "assignment_expression", "text": "tmp = ft_strulen(s)", "parent": 129, "children": [157, 158, 159], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 20}}, {"id": 157, "type": "identifier", "text": "tmp", "parent": 156, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 4}}, {"id": 158, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 6}}, {"id": 159, "type": "call_expression", "text": "ft_strulen(s)", "parent": 156, "children": [160, 161], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 20}}, {"id": 160, "type": "identifier", "text": "ft_strulen", "parent": 159, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 17}}, {"id": 161, "type": "argument_list", "text": "(s)", "parent": 159, "children": [162], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 20}}, {"id": 162, "type": "identifier", "text": "s", "parent": 161, "children": [], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 19}}, {"id": 163, "type": "conditional_expression", "text": "(intmax_t)len < tmp ? tmp = len : 0", "parent": 129, "children": [164, 171, 172, 176], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 36}}, {"id": 164, "type": "binary_expression", "text": "(intmax_t)len < tmp", "parent": 163, "children": [165, 169, 170], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 20}}, {"id": 165, "type": "cast_expression", "text": "(intmax_t)len", "parent": 164, "children": [166, 168], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 14}}, {"id": 166, "type": "type_descriptor", "text": "intmax_t", "parent": 165, "children": [167], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 10}}, {"id": 167, "type": "type_identifier", "text": "intmax_t", "parent": 166, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 10}}, {"id": 168, "type": "identifier", "text": "len", "parent": 165, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 14}}, {"id": 169, "type": "<", "text": "<", "parent": 164, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 16}}, {"id": 170, "type": "identifier", "text": "tmp", "parent": 164, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 20}}, {"id": 171, "type": "?", "text": "?", "parent": 163, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 22}}, {"id": 172, "type": "assignment_expression", "text": "tmp = len", "parent": 163, "children": [173, 174, 175], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 32}}, {"id": 173, "type": "identifier", "text": "tmp", "parent": 172, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 26}}, {"id": 174, "type": "=", "text": "=", "parent": 172, "children": [], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 28}}, {"id": 175, "type": "identifier", "text": "len", "parent": 172, "children": [], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 47, "column": 32}}, {"id": 176, "type": "number_literal", "text": "0", "parent": 163, "children": [], "start_point": {"row": 47, "column": 35}, "end_point": {"row": 47, "column": 36}}, {"id": 177, "type": "while_statement", "text": "while (*s && (tmp -= ft_ucharlen(*s)) >= 0)\n\t\tft_putchar(*s++);", "parent": 129, "children": [178], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 49, "column": 19}}, {"id": 178, "type": "parenthesized_expression", "text": "(*s && (tmp -= ft_ucharlen(*s)) >= 0)", "parent": 177, "children": [179], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 44}}, {"id": 179, "type": "binary_expression", "text": "*s && (tmp -= ft_ucharlen(*s)) >= 0", "parent": 178, "children": [180, 183, 184], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 43}}, {"id": 180, "type": "pointer_expression", "text": "*s", "parent": 179, "children": [181, 182], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 10}}, {"id": 181, "type": "*", "text": "*", "parent": 180, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 9}}, {"id": 182, "type": "identifier", "text": "s", "parent": 180, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 10}}, {"id": 183, "type": "&&", "text": "&&", "parent": 179, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 13}}, {"id": 184, "type": "binary_expression", "text": "(tmp -= ft_ucharlen(*s)) >= 0", "parent": 179, "children": [185, 195, 196], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 43}}, {"id": 185, "type": "parenthesized_expression", "text": "(tmp -= ft_ucharlen(*s))", "parent": 184, "children": [186], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 38}}, {"id": 186, "type": "assignment_expression", "text": "tmp -= ft_ucharlen(*s)", "parent": 185, "children": [187, 188, 189], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 37}}, {"id": 187, "type": "identifier", "text": "tmp", "parent": 186, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 18}}, {"id": 188, "type": "-=", "text": "-=", "parent": 186, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 21}}, {"id": 189, "type": "call_expression", "text": "ft_ucharlen(*s)", "parent": 186, "children": [190, 191], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 37}}, {"id": 190, "type": "identifier", "text": "ft_ucharlen", "parent": 189, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 33}}, {"id": 191, "type": "argument_list", "text": "(*s)", "parent": 189, "children": [192], "start_point": {"row": 48, "column": 33}, "end_point": {"row": 48, "column": 37}}, {"id": 192, "type": "pointer_expression", "text": "*s", "parent": 191, "children": [193, 194], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 36}}, {"id": 193, "type": "*", "text": "*", "parent": 192, "children": [], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 35}}, {"id": 194, "type": "identifier", "text": "s", "parent": 192, "children": [], "start_point": {"row": 48, "column": 35}, "end_point": {"row": 48, "column": 36}}, {"id": 195, "type": ">=", "text": ">=", "parent": 184, "children": [], "start_point": {"row": 48, "column": 39}, "end_point": {"row": 48, "column": 41}}, {"id": 196, "type": "number_literal", "text": "0", "parent": 184, "children": [], "start_point": {"row": 48, "column": 42}, "end_point": {"row": 48, "column": 43}}, {"id": 197, "type": "call_expression", "text": "ft_putchar(*s++)", "parent": 177, "children": [198, 199], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 18}}, {"id": 198, "type": "identifier", "text": "ft_putchar", "parent": 197, "children": [], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 12}}, {"id": 199, "type": "argument_list", "text": "(*s++)", "parent": 197, "children": [200], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 18}}, {"id": 200, "type": "pointer_expression", "text": "*s++", "parent": 199, "children": [201, 202], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 17}}, {"id": 201, "type": "*", "text": "*", "parent": 200, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 14}}, {"id": 202, "type": "update_expression", "text": "s++", "parent": 200, "children": [203, 204], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 17}}, {"id": 203, "type": "identifier", "text": "s", "parent": 202, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 15}}, {"id": 204, "type": "++", "text": "++", "parent": 202, "children": [], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 17}}]}, "node_categories": {"declarations": {"functions": [3, 5, 41, 43, 75, 77, 129, 131], "variables": [8, 46, 80, 85, 88, 134, 139, 142], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [14, 15, 19, 20, 27, 32, 37, 52, 53, 57, 58, 63, 64, 67, 70, 72, 92, 93, 97, 98, 105, 110, 123, 146, 147, 151, 152, 159, 164, 165, 178, 179, 180, 184, 185, 189, 192, 197, 200, 202], "assignments": [24, 102, 115, 120, 156, 172, 186], "loops": [62, 177], "conditionals": [6, 12, 13, 17, 21, 25, 33, 36, 38, 40, 44, 47, 50, 51, 55, 59, 66, 68, 73, 78, 84, 87, 90, 91, 95, 99, 103, 106, 108, 109, 111, 113, 116, 118, 121, 124, 127, 128, 132, 135, 138, 141, 143, 144, 145, 149, 153, 157, 160, 162, 163, 167, 168, 170, 173, 175, 182, 187, 190, 194, 198, 203], "returns": [18, 56, 96, 150], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 23, 35, 61, 101, 119, 126, 155, 176, 196], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "ft_putstr", "text_snippet": "void\tft_putstr(char const *s)\n{\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)\"));\n\ts = (char const *)write(1,"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "ft_putstr(char const *s)"}, {"node_id": 41, "universal_type": "function", "name": "ft_putustr", "text_snippet": "void\tft_putustr(t_wint const *s)\n{\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)\"));\n\twhile (*s)\n\t\tft_putchar"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "ft_putustr(t_wint const *s)"}, {"node_id": 75, "universal_type": "function", "name": "ft_putnstr", "text_snippet": "void\tft_putnstr(char const *s, size_t len)\n{\n\tsize_t\ttmp;\n\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)\"));\n"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "ft_putnstr(char const *s, size_t len)"}, {"node_id": 129, "universal_type": "function", "name": "ft_putunstr", "text_snippet": "void\tft_putunstr(t_wint const *s, size_t len)\n{\n\tintmax_t\ttmp;\n\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)"}, {"node_id": 131, "universal_type": "function", "name": "unknown", "text_snippet": "ft_putunstr(t_wint const *s, size_t len)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"libft.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/* ************************************************************************** */\n/* */\n/* ::: :::::::: */\n/* ft_putstr.c :+: :+: :+: */\n/* +:+ +:+ +:+ */\n/* By: pgritsen <<EMAIL>> +#+ +:+ +#+ */\n/* +#+#+#+#+#+ +#+ */\n/* Created: 2017/10/26 15:59:25 by pgritsen #+# #+# */\n/* Updated: 2017/12/08 14:15:21 by pgritsen ### ########.fr */\n/* */\n/* ************************************************************************** */\n\n#include \"libft.h\"\n\nvoid\tft_putstr(char const *s)\n{\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)\"));\n\ts = (char const *)write(1, s, ft_strlen(s));\n}\n\nvoid\tft_putustr(t_wint const *s)\n{\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)\"));\n\twhile (*s)\n\t\tft_putchar(*s++);\n}\n\nvoid\tft_putnstr(char const *s, size_t len)\n{\n\tsize_t\ttmp;\n\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)\"));\n\ttmp = ft_strlen(s);\n\tlen > tmp ? len = tmp : 0;\n\ttmp = write(1, s, len);\n}\n\nvoid\tft_putunstr(t_wint const *s, size_t len)\n{\n\tintmax_t\ttmp;\n\n\tif (!s)\n\t\treturn (ft_putstr(\"(null)\"));\n\ttmp = ft_strulen(s);\n\t(intmax_t)len < tmp ? tmp = len : 0;\n\twhile (*s && (tmp -= ft_ucharlen(*s)) >= 0)\n\t\tft_putchar(*s++);\n}\n"}
347
c
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_ #define CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_ #include <string> namespace extensions { class UpdateObserver { public: // Invoked when an app update is available. virtual void OnAppUpdateAvailable(const std::string& app_id) = 0; // Invoked when Chrome update is available. virtual void OnChromeUpdateAvailable() = 0; protected: virtual ~UpdateObserver() {} }; } // namespace extensions #endif // CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_
36.72
18
(translation_unit) "// Copyright 2013 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_\n#define CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_\n\n#include <string>\n\nnamespace extensions {\n\nclass UpdateObserver {\n public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;\n\n // Invoked when Chrome update is available.\n virtual void OnChromeUpdateAvailable() = 0;\n\n protected:\n virtual ~UpdateObserver() {}\n};\n\n} // namespace extensions\n\n#endif // CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_\n" (comment) "// Copyright 2013 The Chromium Authors. All rights reserved." (comment) "// Use of this source code is governed by a BSD-style license that can be" (comment) "// found in the LICENSE file." (preproc_ifdef) "#ifndef CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_\n#define CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_\n\n#include <string>\n\nnamespace extensions {\n\nclass UpdateObserver {\n public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;\n\n // Invoked when Chrome update is available.\n virtual void OnChromeUpdateAvailable() = 0;\n\n protected:\n virtual ~UpdateObserver() {}\n};\n\n} // namespace extensions\n\n#endif" (#ifndef) "#ifndef" (identifier) "CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_" (preproc_def) "#define CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_\n" (#define) "#define" (identifier) "CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (function_definition) "namespace extensions {\n\nclass UpdateObserver {\n public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;\n\n // Invoked when Chrome update is available.\n virtual void OnChromeUpdateAvailable() = 0;\n\n protected:\n virtual ~UpdateObserver() {}\n};\n\n}" (type_identifier) "namespace" (identifier) "extensions" (compound_statement) "{\n\nclass UpdateObserver {\n public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;\n\n // Invoked when Chrome update is available.\n virtual void OnChromeUpdateAvailable() = 0;\n\n protected:\n virtual ~UpdateObserver() {}\n};\n\n}" ({) "{" (function_definition) "class UpdateObserver {\n public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;\n\n // Invoked when Chrome update is available.\n virtual void OnChromeUpdateAvailable() = 0;\n\n protected:\n virtual ~UpdateObserver() {}\n}" (type_identifier) "class" (identifier) "UpdateObserver" (compound_statement) "{\n public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;\n\n // Invoked when Chrome update is available.\n virtual void OnChromeUpdateAvailable() = 0;\n\n protected:\n virtual ~UpdateObserver() {}\n}" ({) "{" (labeled_statement) "public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;" (statement_identifier) "public" (:) ":" (comment) "// Invoked when an app update is available." (declaration) "virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "OnAppUpdateAvailable(const std::string& app_id) = 0" (function_declarator) "OnAppUpdateAvailable(const std::string& app_id)" (identifier) "OnAppUpdateAvailable" (parameter_list) "(const std::string& app_id)" (() "(" (parameter_declaration) "const std::string& app_id" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "app_id" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "// Invoked when Chrome update is available." (declaration) "virtual void OnChromeUpdateAvailable() = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "OnChromeUpdateAvailable() = 0" (function_declarator) "OnChromeUpdateAvailable()" (identifier) "OnChromeUpdateAvailable" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (labeled_statement) "protected:\n virtual ~UpdateObserver() {}" (statement_identifier) "protected" (:) ":" (ERROR) "virtual ~UpdateObserver()" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "UpdateObserver()" (identifier) "UpdateObserver" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace extensions" (#endif) "#endif" (comment) "// CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_"
86
5
{"language": "c", "success": true, "metadata": {"lines": 18, "avg_line_length": 36.72, "nodes": 49, "errors": 0, "source_hash": "f77e797306646a6c7a24a9841963e6dbfb932fa21cc36e46a649800aefab756d", "categorized_nodes": 32}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_\n#define CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_\n\n#include <string>\n\nnamespace extensions {\n\nclass UpdateObserver {\n public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;\n\n // Invoked when Chrome update is available.\n virtual void OnChromeUpdateAvailable() = 0;\n\n protected:\n virtual ~UpdateObserver() {}\n};\n\n} // namespace extensions\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 48], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 52}}, {"id": 3, "type": "preproc_def", "text": "#define CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_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": "CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 52}}, {"id": 6, "type": "preproc_include", "text": "#include <string>\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": "<string>", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 17}}, {"id": 9, "type": "function_definition", "text": "namespace extensions {\n\nclass UpdateObserver {\n public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;\n\n // Invoked when Chrome update is available.\n virtual void OnChromeUpdateAvailable() = 0;\n\n protected:\n virtual ~UpdateObserver() {}\n};\n\n}", "parent": 0, "children": [10, 11], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 9}}, {"id": 11, "type": "identifier", "text": "extensions", "parent": 9, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 20}}, {"id": 12, "type": "function_definition", "text": "class UpdateObserver {\n public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;\n\n // Invoked when Chrome update is available.\n virtual void OnChromeUpdateAvailable() = 0;\n\n protected:\n virtual ~UpdateObserver() {}\n}", "parent": 9, "children": [13], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 13, "type": "identifier", "text": "UpdateObserver", "parent": 12, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 20}}, {"id": 14, "type": "labeled_statement", "text": "public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;", "parent": 12, "children": [15], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 14, "column": 67}}, {"id": 15, "type": "declaration", "text": "virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;", "parent": 14, "children": [16, 17, 19], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 67}}, {"id": 16, "type": "type_identifier", "text": "virtual", "parent": 15, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 9}}, {"id": 17, "type": "ERROR", "text": "void", "parent": 15, "children": [18], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 14}}, {"id": 18, "type": "identifier", "text": "void", "parent": 17, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 14}}, {"id": 19, "type": "init_declarator", "text": "OnAppUpdateAvailable(const std::string& app_id) = 0", "parent": 15, "children": [20, 28, 29], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 66}}, {"id": 20, "type": "function_declarator", "text": "OnAppUpdateAvailable(const std::string& app_id)", "parent": 19, "children": [21, 22], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 62}}, {"id": 21, "type": "identifier", "text": "OnAppUpdateAvailable", "parent": 20, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 35}}, {"id": 22, "type": "parameter_list", "text": "(const std::string& app_id)", "parent": 20, "children": [23], "start_point": {"row": 14, "column": 35}, "end_point": {"row": 14, "column": 62}}, {"id": 23, "type": "parameter_declaration", "text": "const std::string& app_id", "parent": 22, "children": [24, 25, 27], "start_point": {"row": 14, "column": 36}, "end_point": {"row": 14, "column": 61}}, {"id": 24, "type": "type_identifier", "text": "std", "parent": 23, "children": [], "start_point": {"row": 14, "column": 42}, "end_point": {"row": 14, "column": 45}}, {"id": 25, "type": "ERROR", "text": "::string&", "parent": 23, "children": [26], "start_point": {"row": 14, "column": 45}, "end_point": {"row": 14, "column": 54}}, {"id": 26, "type": "identifier", "text": "string", "parent": 25, "children": [], "start_point": {"row": 14, "column": 47}, "end_point": {"row": 14, "column": 53}}, {"id": 27, "type": "identifier", "text": "app_id", "parent": 23, "children": [], "start_point": {"row": 14, "column": 55}, "end_point": {"row": 14, "column": 61}}, {"id": 28, "type": "=", "text": "=", "parent": 19, "children": [], "start_point": {"row": 14, "column": 63}, "end_point": {"row": 14, "column": 64}}, {"id": 29, "type": "number_literal", "text": "0", "parent": 19, "children": [], "start_point": {"row": 14, "column": 65}, "end_point": {"row": 14, "column": 66}}, {"id": 30, "type": "declaration", "text": "virtual void OnChromeUpdateAvailable() = 0;", "parent": 12, "children": [31, 32, 34], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 45}}, {"id": 31, "type": "type_identifier", "text": "virtual", "parent": 30, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 9}}, {"id": 32, "type": "ERROR", "text": "void", "parent": 30, "children": [33], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 14}}, {"id": 33, "type": "identifier", "text": "void", "parent": 32, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 14}}, {"id": 34, "type": "init_declarator", "text": "OnChromeUpdateAvailable() = 0", "parent": 30, "children": [35, 38, 39], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 44}}, {"id": 35, "type": "function_declarator", "text": "OnChromeUpdateAvailable()", "parent": 34, "children": [36, 37], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 40}}, {"id": 36, "type": "identifier", "text": "OnChromeUpdateAvailable", "parent": 35, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 38}}, {"id": 37, "type": "parameter_list", "text": "()", "parent": 35, "children": [], "start_point": {"row": 17, "column": 38}, "end_point": {"row": 17, "column": 40}}, {"id": 38, "type": "=", "text": "=", "parent": 34, "children": [], "start_point": {"row": 17, "column": 41}, "end_point": {"row": 17, "column": 42}}, {"id": 39, "type": "number_literal", "text": "0", "parent": 34, "children": [], "start_point": {"row": 17, "column": 43}, "end_point": {"row": 17, "column": 44}}, {"id": 40, "type": "labeled_statement", "text": "protected:\n virtual ~UpdateObserver() {}", "parent": 12, "children": [41], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 20, "column": 30}}, {"id": 41, "type": "ERROR", "text": "virtual ~UpdateObserver()", "parent": 40, "children": [42, 43, 45], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 27}}, {"id": 42, "type": "type_identifier", "text": "virtual", "parent": 41, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 9}}, {"id": 43, "type": "ERROR", "text": "~", "parent": 41, "children": [44], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 11}}, {"id": 44, "type": "~", "text": "~", "parent": 43, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 11}}, {"id": 45, "type": "function_declarator", "text": "UpdateObserver()", "parent": 41, "children": [46, 47], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 27}}, {"id": 46, "type": "identifier", "text": "UpdateObserver", "parent": 45, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 25}}, {"id": 47, "type": "parameter_list", "text": "()", "parent": 45, "children": [], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 27}}, {"id": 48, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9, 12, 20, 35, 45], "variables": [15, 23, 30], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 11, 13, 16, 18, 21, 24, 26, 27, 31, 33, 36, 42, 46, 48], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 29, 39], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "UpdateObserver", "text_snippet": "namespace extensions {\n\nclass UpdateObserver {\n public:\n // Invoked when an app update is available"}, {"node_id": 12, "universal_type": "function", "name": "UpdateObserver", "text_snippet": "class UpdateObserver {\n public:\n // Invoked when an app update is available.\n virtual void OnAppUp"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "OnAppUpdateAvailable(const std::string& app_id)"}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "OnChromeUpdateAvailable()"}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "UpdateObserver()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <string>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "// Copyright 2013 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_\n#define CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_\n\n#include <string>\n\nnamespace extensions {\n\nclass UpdateObserver {\n public:\n // Invoked when an app update is available.\n virtual void OnAppUpdateAvailable(const std::string& app_id) = 0;\n\n // Invoked when Chrome update is available.\n virtual void OnChromeUpdateAvailable() = 0;\n\n protected:\n virtual ~UpdateObserver() {}\n};\n\n} // namespace extensions\n\n#endif // CHROME_BROWSER_EXTENSIONS_UPDATE_OBSERVER_H_\n"}
348
c
//===-- CodeGen/MachineJumpTableInfo.h - Abstract Jump Tables --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // The MachineJumpTableInfo class keeps track of jump tables referenced by // lowered switch instructions in the MachineFunction. // // Instructions reference the address of these jump tables through the use of // MO_JumpTableIndex values. When emitting assembly or machine code, these // virtual address references are converted to refer to the address of the // function jump tables. // //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H #define LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H #include <vector> #include <iosfwd> #include <cassert> namespace llvm { class MachineBasicBlock; class TargetData; /// MachineJumpTableEntry - One jump table in the jump table info. /// struct MachineJumpTableEntry { /// MBBs - The vector of basic blocks from which to create the jump table. std::vector<MachineBasicBlock*> MBBs; explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M) : MBBs(M) {} }; class MachineJumpTableInfo { unsigned EntrySize; unsigned Alignment; std::vector<MachineJumpTableEntry> JumpTables; public: MachineJumpTableInfo(unsigned Size, unsigned Align) : EntrySize(Size), Alignment(Align) {} /// getJumpTableIndex - Create a new jump table or return an existing one. /// unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs); /// isEmpty - Return true if there are no jump tables. /// bool isEmpty() const { return JumpTables.empty(); } const std::vector<MachineJumpTableEntry> &getJumpTables() const { return JumpTables; } /// RemoveJumpTable - Mark the specific index as being dead. This will cause /// it to not be emitted. void RemoveJumpTable(unsigned Idx) { JumpTables[Idx].MBBs.clear(); } /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update /// the jump tables to branch to New instead. bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) { assert(Old != New && "Not making a change?"); bool MadeChange = false; for (size_t i = 0, e = JumpTables.size(); i != e; ++i) { MachineJumpTableEntry &JTE = JumpTables[i]; for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j) if (JTE.MBBs[j] == Old) { JTE.MBBs[j] = New; MadeChange = true; } } return MadeChange; } /// getEntrySize - Returns the size of an individual field in a jump table. /// unsigned getEntrySize() const { return EntrySize; } /// getAlignment - returns the target's preferred alignment for jump tables unsigned getAlignment() const { return Alignment; } /// print - Used by the MachineFunction printer to print information about /// jump tables. Implemented in MachineFunction.cpp /// void print(std::ostream &OS) const; void print(std::ostream *OS) const { if (OS) print(*OS); } /// dump - Call print(std::cerr) to be called from the debugger. /// void dump() const; }; } // End llvm namespace #endif
34.49
95
(translation_unit) "//===-- CodeGen/MachineJumpTableInfo.h - Abstract Jump Tables --*- C++ -*-===//\n//\n// The LLVM Compiler Infrastructure\n//\n// This file is distributed under the University of Illinois Open Source\n// License. See LICENSE.TXT for details.\n//\n//===----------------------------------------------------------------------===//\n//\n// The MachineJumpTableInfo class keeps track of jump tables referenced by\n// lowered switch instructions in the MachineFunction.\n//\n// Instructions reference the address of these jump tables through the use of \n// MO_JumpTableIndex values. When emitting assembly or machine code, these \n// virtual address references are converted to refer to the address of the \n// function jump tables.\n//\n//===----------------------------------------------------------------------===//\n\n#ifndef LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H\n#define LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H\n\n#include <vector>\n#include <iosfwd>\n#include <cassert>\n\nnamespace llvm {\n\nclass MachineBasicBlock;\nclass TargetData;\n\n/// MachineJumpTableEntry - One jump table in the jump table info.\n///\nstruct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }\n\n const std::vector<MachineJumpTableEntry> &getJumpTables() const {\n return JumpTables;\n }\n \n /// RemoveJumpTable - Mark the specific index as being dead. This will cause\n /// it to not be emitted.\n void RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.clear();\n }\n \n /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update\n /// the jump tables to branch to New instead.\n bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {\n assert(Old != New && "Not making a change?");\n bool MadeChange = false;\n for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }\n return MadeChange;\n }\n \n /// getEntrySize - Returns the size of an individual field in a jump table. \n ///\n unsigned getEntrySize() const { return EntrySize; }\n \n /// getAlignment - returns the target's preferred alignment for jump tables\n unsigned getAlignment() const { return Alignment; }\n \n /// print - Used by the MachineFunction printer to print information about\n /// jump tables. Implemented in MachineFunction.cpp\n ///\n void print(std::ostream &OS) const;\n void print(std::ostream *OS) const { if (OS) print(*OS); }\n\n /// dump - Call print(std::cerr) to be called from the debugger.\n ///\n void dump() const;\n};\n\n} // End llvm namespace\n\n#endif\n" (comment) "//===-- CodeGen/MachineJumpTableInfo.h - Abstract Jump Tables --*- C++ -*-===//" (comment) "//" (comment) "// The LLVM Compiler Infrastructure" (comment) "//" (comment) "// This file is distributed under the University of Illinois Open Source" (comment) "// License. See LICENSE.TXT for details." (comment) "//" (comment) "//===----------------------------------------------------------------------===//" (comment) "//" (comment) "// The MachineJumpTableInfo class keeps track of jump tables referenced by" (comment) "// lowered switch instructions in the MachineFunction." (comment) "//" (comment) "// Instructions reference the address of these jump tables through the use of " (comment) "// MO_JumpTableIndex values. When emitting assembly or machine code, these " (comment) "// virtual address references are converted to refer to the address of the " (comment) "// function jump tables." (comment) "//" (comment) "//===----------------------------------------------------------------------===//" (preproc_ifdef) "#ifndef LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H\n#define LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H\n\n#include <vector>\n#include <iosfwd>\n#include <cassert>\n\nnamespace llvm {\n\nclass MachineBasicBlock;\nclass TargetData;\n\n/// MachineJumpTableEntry - One jump table in the jump table info.\n///\nstruct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }\n\n const std::vector<MachineJumpTableEntry> &getJumpTables() const {\n return JumpTables;\n }\n \n /// RemoveJumpTable - Mark the specific index as being dead. This will cause\n /// it to not be emitted.\n void RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.clear();\n }\n \n /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update\n /// the jump tables to branch to New instead.\n bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {\n assert(Old != New && "Not making a change?");\n bool MadeChange = false;\n for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }\n return MadeChange;\n }\n \n /// getEntrySize - Returns the size of an individual field in a jump table. \n ///\n unsigned getEntrySize() const { return EntrySize; }\n \n /// getAlignment - returns the target's preferred alignment for jump tables\n unsigned getAlignment() const { return Alignment; }\n \n /// print - Used by the MachineFunction printer to print information about\n /// jump tables. Implemented in MachineFunction.cpp\n ///\n void print(std::ostream &OS) const;\n void print(std::ostream *OS) const { if (OS) print(*OS); }\n\n /// dump - Call print(std::cerr) to be called from the debugger.\n ///\n void dump() const;\n};\n\n} // End llvm namespace\n\n#endif" (#ifndef) "#ifndef" (identifier) "LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H" (preproc_def) "#define LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H\n" (#define) "#define" (identifier) "LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (preproc_include) "#include <iosfwd>\n" (#include) "#include" (system_lib_string) "<iosfwd>" (preproc_include) "#include <cassert>\n" (#include) "#include" (system_lib_string) "<cassert>" (function_definition) "namespace llvm {\n\nclass MachineBasicBlock;\nclass TargetData;\n\n/// MachineJumpTableEntry - One jump table in the jump table info.\n///\nstruct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }\n\n const std::vector<MachineJumpTableEntry> &getJumpTables() const {\n return JumpTables;\n }\n \n /// RemoveJumpTable - Mark the specific index as being dead. This will cause\n /// it to not be emitted.\n void RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.clear();\n }\n \n /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update\n /// the jump tables to branch to New instead.\n bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {\n assert(Old != New && "Not making a change?");\n bool MadeChange = false;\n for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }\n return MadeChange;\n }\n \n /// getEntrySize - Returns the size of an individual field in a jump table. \n ///\n unsigned getEntrySize() const { return EntrySize; }\n \n /// getAlignment - returns the target's preferred alignment for jump tables\n unsigned getAlignment() const { return Alignment; }\n \n /// print - Used by the MachineFunction printer to print information about\n /// jump tables. Implemented in MachineFunction.cpp\n ///\n void print(std::ostream &OS) const;\n void print(std::ostream *OS) const { if (OS) print(*OS); }\n\n /// dump - Call print(std::cerr) to be called from the debugger.\n ///\n void dump() const;\n}" (type_identifier) "namespace" (identifier) "llvm" (compound_statement) "{\n\nclass MachineBasicBlock;\nclass TargetData;\n\n/// MachineJumpTableEntry - One jump table in the jump table info.\n///\nstruct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }\n\n const std::vector<MachineJumpTableEntry> &getJumpTables() const {\n return JumpTables;\n }\n \n /// RemoveJumpTable - Mark the specific index as being dead. This will cause\n /// it to not be emitted.\n void RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.clear();\n }\n \n /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update\n /// the jump tables to branch to New instead.\n bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {\n assert(Old != New && "Not making a change?");\n bool MadeChange = false;\n for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }\n return MadeChange;\n }\n \n /// getEntrySize - Returns the size of an individual field in a jump table. \n ///\n unsigned getEntrySize() const { return EntrySize; }\n \n /// getAlignment - returns the target's preferred alignment for jump tables\n unsigned getAlignment() const { return Alignment; }\n \n /// print - Used by the MachineFunction printer to print information about\n /// jump tables. Implemented in MachineFunction.cpp\n ///\n void print(std::ostream &OS) const;\n void print(std::ostream *OS) const { if (OS) print(*OS); }\n\n /// dump - Call print(std::cerr) to be called from the debugger.\n ///\n void dump() const;\n}" ({) "{" (declaration) "class MachineBasicBlock;" (type_identifier) "class" (identifier) "MachineBasicBlock" (;) ";" (declaration) "class TargetData;" (type_identifier) "class" (identifier) "TargetData" (;) ";" (comment) "/// MachineJumpTableEntry - One jump table in the jump table info." (comment) "///" (function_definition) "struct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }\n\n const std::vector<MachineJumpTableEntry> &getJumpTables() const {\n return JumpTables;\n }\n \n /// RemoveJumpTable - Mark the specific index as being dead. This will cause\n /// it to not be emitted.\n void RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.clear();\n }\n \n /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update\n /// the jump tables to branch to New instead.\n bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {\n assert(Old != New && "Not making a change?");\n bool MadeChange = false;\n for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }\n return MadeChange;\n }" (struct_specifier) "struct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }" (struct) "struct" (type_identifier) "MachineJumpTableEntry" (field_declaration_list) "{\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }" ({) "{" (comment) "/// MBBs - The vector of basic blocks from which to create the jump table." (field_declaration) "std::vector<MachineBasicBlock*> MBBs;" (type_identifier) "std" (ERROR) "::vector<MachineBasicBlock*>" (:) ":" (:) ":" (field_identifier) "vector" (<) "<" (field_identifier) "MachineBasicBlock" (*) "*" (>) ">" (field_identifier) "MBBs" (;) ";" (field_declaration) "explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};" (type_identifier) "explicit" (field_identifier) "MachineJumpTableEntry" (ERROR) "(const std::vector<MachineBasicBlock*> &M)" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "std" (:) ":" (bitfield_clause) ":vector<MachineBasicBlock*> &M" (:) ":" (binary_expression) "vector<MachineBasicBlock*> &M" (binary_expression) "vector<MachineBasicBlock" (identifier) "vector" (<) "<" (identifier) "MachineBasicBlock" (ERROR) "*" (*) "*" (>) ">" (pointer_expression) "&M" (&) "&" (identifier) "M" ()) ")" (bitfield_clause) ": MBBs(M)" (:) ":" (call_expression) "MBBs(M)" (identifier) "MBBs" (argument_list) "(M)" (() "(" (identifier) "M" ()) ")" (ERROR) "{}\n}" ({) "{" (}) "}" (}) "}" (;) ";" (ERROR) "class MachineJumpTableInfo {" (type_identifier) "class" (field_identifier) "MachineJumpTableInfo" ({) "{" (field_declaration) "unsigned EntrySize;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (field_identifier) "EntrySize" (;) ";" (field_declaration) "unsigned Alignment;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (field_identifier) "Alignment" (;) ";" (field_declaration) "std::vector<MachineJumpTableEntry> JumpTables;" (type_identifier) "std" (ERROR) "::vector<MachineJumpTableEntry>" (:) ":" (:) ":" (field_identifier) "vector" (<) "<" (field_identifier) "MachineJumpTableEntry" (>) ">" (field_identifier) "JumpTables" (;) ";" (field_declaration) "public:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);" (type_identifier) "public" (ERROR) ":" (:) ":" (function_declarator) "MachineJumpTableInfo(unsigned Size, unsigned Align)" (field_identifier) "MachineJumpTableInfo" (parameter_list) "(unsigned Size, unsigned Align)" (() "(" (parameter_declaration) "unsigned Size" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "Size" (,) "," (parameter_declaration) "unsigned Align" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "Align" ()) ")" (bitfield_clause) ": EntrySize(Size)" (:) ":" (call_expression) "EntrySize(Size)" (identifier) "EntrySize" (argument_list) "(Size)" (() "(" (identifier) "Size" ()) ")" (,) "," (ERROR) "Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned" (function_declarator) "Alignment(Align)" (field_identifier) "Alignment" (parameter_list) "(Align)" (() "(" (parameter_declaration) "Align" (type_identifier) "Align" ()) ")" ({) "{" (}) "}" (comment) "/// getJumpTableIndex - Create a new jump table or return an existing one." (comment) "///" (unsigned) "unsigned" (field_identifier) "getJumpTableIndex" (ERROR) "(const std:" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "std" (:) ":" (bitfield_clause) ":vector<MachineBasicBlock*> &DestBBs" (:) ":" (binary_expression) "vector<MachineBasicBlock*> &DestBBs" (binary_expression) "vector<MachineBasicBlock" (identifier) "vector" (<) "<" (identifier) "MachineBasicBlock" (ERROR) "*" (*) "*" (>) ">" (pointer_expression) "&DestBBs" (&) "&" (identifier) "DestBBs" (ERROR) ")" ()) ")" (;) ";" (comment) "/// isEmpty - Return true if there are no jump tables." (comment) "///" (field_declaration) "bool isEmpty() const { return JumpTables.empty();" (primitive_type) "bool" (ERROR) "isEmpty() const { return JumpTables." (function_declarator) "isEmpty()" (field_identifier) "isEmpty" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" ({) "{" (return) "return" (field_identifier) "JumpTables" (.) "." (function_declarator) "empty()" (field_identifier) "empty" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (type_qualifier) "const" (const) "const" (ERROR) "std::vector<MachineJumpTableEntry> &" (identifier) "std" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "MachineJumpTableEntry" (>) ">" (&) "&" (function_declarator) "getJumpTables()" (identifier) "getJumpTables" (parameter_list) "()" (() "(" ()) ")" (ERROR) "const {\n return JumpTables;\n }" (type_qualifier) "const" (const) "const" (ERROR) "{\n return" ({) "{" (return) "return" (type_identifier) "JumpTables" (;) ";" (}) "}" (comment) "/// RemoveJumpTable - Mark the specific index as being dead. This will cause" (comment) "/// it to not be emitted." (declaration) "void RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.clear();" (primitive_type) "void" (ERROR) "RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs." (function_declarator) "RemoveJumpTable(unsigned Idx)" (identifier) "RemoveJumpTable" (parameter_list) "(unsigned Idx)" (() "(" (parameter_declaration) "unsigned Idx" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "Idx" ()) ")" ({) "{" (array_declarator) "JumpTables[Idx]" (identifier) "JumpTables" ([) "[" (identifier) "Idx" (]) "]" (.) "." (identifier) "MBBs" (.) "." (function_declarator) "clear()" (identifier) "clear" (parameter_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "}" (}) "}" (comment) "/// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update" (comment) "/// the jump tables to branch to New instead." (ERROR) "bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New)" (primitive_type) "bool" (function_declarator) "ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New)" (identifier) "ReplaceMBBInJumpTables" (parameter_list) "(MachineBasicBlock *Old, MachineBasicBlock *New)" (() "(" (parameter_declaration) "MachineBasicBlock *Old" (type_identifier) "MachineBasicBlock" (pointer_declarator) "*Old" (*) "*" (identifier) "Old" (,) "," (parameter_declaration) "MachineBasicBlock *New" (type_identifier) "MachineBasicBlock" (pointer_declarator) "*New" (*) "*" (identifier) "New" ()) ")" (compound_statement) "{\n assert(Old != New && "Not making a change?");\n bool MadeChange = false;\n for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }\n return MadeChange;\n }" ({) "{" (expression_statement) "assert(Old != New && "Not making a change?");" (call_expression) "assert(Old != New && "Not making a change?")" (identifier) "assert" (argument_list) "(Old != New && "Not making a change?")" (() "(" (binary_expression) "Old != New && "Not making a change?"" (binary_expression) "Old != New" (identifier) "Old" (!=) "!=" (identifier) "New" (&&) "&&" (string_literal) ""Not making a change?"" (") """ (string_content) "Not making a change?" (") """ ()) ")" (;) ";" (declaration) "bool MadeChange = false;" (primitive_type) "bool" (init_declarator) "MadeChange = false" (identifier) "MadeChange" (=) "=" (false) "false" (;) ";" (for_statement) "for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }" (for) "for" (() "(" (declaration) "size_t i = 0, e = JumpTables.size();" (primitive_type) "size_t" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (,) "," (init_declarator) "e = JumpTables.size()" (identifier) "e" (=) "=" (call_expression) "JumpTables.size()" (field_expression) "JumpTables.size" (identifier) "JumpTables" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (binary_expression) "i != e" (identifier) "i" (!=) "!=" (identifier) "e" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }" ({) "{" (expression_statement) "MachineJumpTableEntry &JTE = JumpTables[i];" (binary_expression) "MachineJumpTableEntry &JTE = JumpTables[i]" (identifier) "MachineJumpTableEntry" (&) "&" (assignment_expression) "JTE = JumpTables[i]" (identifier) "JTE" (=) "=" (subscript_expression) "JumpTables[i]" (identifier) "JumpTables" ([) "[" (identifier) "i" (]) "]" (;) ";" (for_statement) "for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }" (for) "for" (() "(" (declaration) "size_t j = 0, e = JTE.MBBs.size();" (primitive_type) "size_t" (init_declarator) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (,) "," (init_declarator) "e = JTE.MBBs.size()" (identifier) "e" (=) "=" (call_expression) "JTE.MBBs.size()" (field_expression) "JTE.MBBs.size" (field_expression) "JTE.MBBs" (identifier) "JTE" (.) "." (field_identifier) "MBBs" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (binary_expression) "j != e" (identifier) "j" (!=) "!=" (identifier) "e" (;) ";" (update_expression) "++j" (++) "++" (identifier) "j" ()) ")" (if_statement) "if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }" (if) "if" (parenthesized_expression) "(JTE.MBBs[j] == Old)" (() "(" (binary_expression) "JTE.MBBs[j] == Old" (subscript_expression) "JTE.MBBs[j]" (field_expression) "JTE.MBBs" (identifier) "JTE" (.) "." (field_identifier) "MBBs" ([) "[" (identifier) "j" (]) "]" (==) "==" (identifier) "Old" ()) ")" (compound_statement) "{\n JTE.MBBs[j] = New;\n MadeChange = true;\n }" ({) "{" (expression_statement) "JTE.MBBs[j] = New;" (assignment_expression) "JTE.MBBs[j] = New" (subscript_expression) "JTE.MBBs[j]" (field_expression) "JTE.MBBs" (identifier) "JTE" (.) "." (field_identifier) "MBBs" ([) "[" (identifier) "j" (]) "]" (=) "=" (identifier) "New" (;) ";" (expression_statement) "MadeChange = true;" (assignment_expression) "MadeChange = true" (identifier) "MadeChange" (=) "=" (true) "true" (;) ";" (}) "}" (}) "}" (return_statement) "return MadeChange;" (return) "return" (identifier) "MadeChange" (;) ";" (}) "}" (comment) "/// getEntrySize - Returns the size of an individual field in a jump table. " (comment) "///" (ERROR) "unsigned getEntrySize() const" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "getEntrySize()" (identifier) "getEntrySize" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return EntrySize; }" ({) "{" (return_statement) "return EntrySize;" (return) "return" (identifier) "EntrySize" (;) ";" (}) "}" (comment) "/// getAlignment - returns the target's preferred alignment for jump tables" (ERROR) "unsigned getAlignment() const" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "getAlignment()" (identifier) "getAlignment" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return Alignment; }" ({) "{" (return_statement) "return Alignment;" (return) "return" (identifier) "Alignment" (;) ";" (}) "}" (comment) "/// print - Used by the MachineFunction printer to print information about" (comment) "/// jump tables. Implemented in MachineFunction.cpp" (comment) "///" (ERROR) "void print(std::ostream &OS) const" (primitive_type) "void" (function_declarator) "print(std::ostream &OS) const" (identifier) "print" (parameter_list) "(std::ostream &OS)" (() "(" (parameter_declaration) "std::ostream &OS" (type_identifier) "std" (ERROR) "::ostream &" (:) ":" (:) ":" (identifier) "ostream" (&) "&" (identifier) "OS" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (function_definition) "void print(std::ostream *OS) const { if (OS) print(*OS); }" (primitive_type) "void" (function_declarator) "print(std::ostream *OS) const" (identifier) "print" (parameter_list) "(std::ostream *OS)" (() "(" (parameter_declaration) "std::ostream *OS" (type_identifier) "std" (ERROR) "::ostream" (:) ":" (:) ":" (identifier) "ostream" (pointer_declarator) "*OS" (*) "*" (identifier) "OS" ()) ")" (identifier) "const" (compound_statement) "{ if (OS) print(*OS); }" ({) "{" (if_statement) "if (OS) print(*OS);" (if) "if" (parenthesized_expression) "(OS)" (() "(" (identifier) "OS" ()) ")" (expression_statement) "print(*OS);" (call_expression) "print(*OS)" (identifier) "print" (argument_list) "(*OS)" (() "(" (pointer_expression) "*OS" (*) "*" (identifier) "OS" ()) ")" (;) ";" (}) "}" (comment) "/// dump - Call print(std::cerr) to be called from the debugger." (comment) "///" (ERROR) "void dump() const" (primitive_type) "void" (function_declarator) "dump()" (identifier) "dump" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (expression_statement) ";" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (ERROR) "}" (}) "}" (comment) "// End llvm namespace" (#endif) "#endif"
554
25
{"language": "c", "success": true, "metadata": {"lines": 95, "avg_line_length": 34.49, "nodes": 314, "errors": 0, "source_hash": "2cbf89bf00bb302d2a2b8c52338abd05abe83490dc4ed193c838da602b6aa0b4", "categorized_nodes": 212}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H\n#define LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H\n\n#include <vector>\n#include <iosfwd>\n#include <cassert>\n\nnamespace llvm {\n\nclass MachineBasicBlock;\nclass TargetData;\n\n/// MachineJumpTableEntry - One jump table in the jump table info.\n///\nstruct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }\n\n const std::vector<MachineJumpTableEntry> &getJumpTables() const {\n return JumpTables;\n }\n \n /// RemoveJumpTable - Mark the specific index as being dead. This will cause\n /// it to not be emitted.\n void RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.clear();\n }\n \n /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update\n /// the jump tables to branch to New instead.\n bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {\n assert(Old != New && \"Not making a change?\");\n bool MadeChange = false;\n for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }\n return MadeChange;\n }\n \n /// getEntrySize - Returns the size of an individual field in a jump table. \n ///\n unsigned getEntrySize() const { return EntrySize; }\n \n /// getAlignment - returns the target's preferred alignment for jump tables\n unsigned getAlignment() const { return Alignment; }\n \n /// print - Used by the MachineFunction printer to print information about\n /// jump tables. Implemented in MachineFunction.cpp\n ///\n void print(std::ostream &OS) const;\n void print(std::ostream *OS) const { if (OS) print(*OS); }\n\n /// dump - Call print(std::cerr) to be called from the debugger.\n ///\n void dump() const;\n};\n\n} // End llvm namespace\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 313], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 103, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 2, "type": "identifier", "text": "LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H", "parent": 0, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 43}}, {"id": 3, "type": "preproc_def", "text": "#define LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 5, "type": "identifier", "text": "LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H", "parent": 3, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 43}}, {"id": 6, "type": "preproc_include", "text": "#include <vector>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<vector>", "parent": 6, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <iosfwd>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<iosfwd>", "parent": 9, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include <cassert>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<cassert>", "parent": 12, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 18}}, {"id": 15, "type": "function_definition", "text": "namespace llvm {\n\nclass MachineBasicBlock;\nclass TargetData;\n\n/// MachineJumpTableEntry - One jump table in the jump table info.\n///\nstruct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }\n\n const std::vector<MachineJumpTableEntry> &getJumpTables() const {\n return JumpTables;\n }\n \n /// RemoveJumpTable - Mark the specific index as being dead. This will cause\n /// it to not be emitted.\n void RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.clear();\n }\n \n /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update\n /// the jump tables to branch to New instead.\n bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {\n assert(Old != New && \"Not making a change?\");\n bool MadeChange = false;\n for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }\n return MadeChange;\n }\n \n /// getEntrySize - Returns the size of an individual field in a jump table. \n ///\n unsigned getEntrySize() const { return EntrySize; }\n \n /// getAlignment - returns the target's preferred alignment for jump tables\n unsigned getAlignment() const { return Alignment; }\n \n /// print - Used by the MachineFunction printer to print information about\n /// jump tables. Implemented in MachineFunction.cpp\n ///\n void print(std::ostream &OS) const;\n void print(std::ostream *OS) const { if (OS) print(*OS); }\n\n /// dump - Call print(std::cerr) to be called from the debugger.\n ///\n void dump() const;\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 99, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 9}}, {"id": 17, "type": "identifier", "text": "llvm", "parent": 15, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 14}}, {"id": 18, "type": "declaration", "text": "class MachineBasicBlock;", "parent": 15, "children": [19], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 24}}, {"id": 19, "type": "identifier", "text": "MachineBasicBlock", "parent": 18, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 23}}, {"id": 20, "type": "declaration", "text": "class TargetData;", "parent": 15, "children": [21], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 17}}, {"id": 21, "type": "identifier", "text": "TargetData", "parent": 20, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 16}}, {"id": 22, "type": "function_definition", "text": "struct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }\n\n const std::vector<MachineJumpTableEntry> &getJumpTables() const {\n return JumpTables;\n }\n \n /// RemoveJumpTable - Mark the specific index as being dead. This will cause\n /// it to not be emitted.\n void RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.clear();\n }\n \n /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update\n /// the jump tables to branch to New instead.\n bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {\n assert(Old != New && \"Not making a change?\");\n bool MadeChange = false;\n for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }\n return MadeChange;\n }", "parent": 15, "children": [23, 123, 129, 132, 135, 152], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 81, "column": 3}}, {"id": 23, "type": "struct_specifier", "text": "struct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }", "parent": 22, "children": [24, 25], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 55, "column": 53}}, {"id": 24, "type": "struct", "text": "struct", "parent": 23, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 25, "type": "type_identifier", "text": "MachineJumpTableEntry", "parent": 23, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 28}}, {"id": 26, "type": "field_declaration", "text": "std::vector<MachineBasicBlock*> MBBs;", "parent": 23, "children": [27, 28, 34], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 39}}, {"id": 27, "type": "type_identifier", "text": "std", "parent": 26, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 5}}, {"id": 28, "type": "ERROR", "text": "::vector<MachineBasicBlock*>", "parent": 26, "children": [29, 30, 31, 32, 33], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 33}}, {"id": 29, "type": "field_identifier", "text": "vector", "parent": 28, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 13}}, {"id": 30, "type": "<", "text": "<", "parent": 28, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 14}}, {"id": 31, "type": "field_identifier", "text": "MachineBasicBlock", "parent": 28, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 31}}, {"id": 32, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 32}}, {"id": 33, "type": ">", "text": ">", "parent": 28, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 33}}, {"id": 34, "type": "field_identifier", "text": "MBBs", "parent": 26, "children": [], "start_point": {"row": 35, "column": 34}, "end_point": {"row": 35, "column": 38}}, {"id": 35, "type": "field_declaration", "text": "explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};", "parent": 23, "children": [36, 37, 38, 51, 56], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 39, "column": 2}}, {"id": 36, "type": "type_identifier", "text": "explicit", "parent": 35, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 10}}, {"id": 37, "type": "field_identifier", "text": "MachineJumpTableEntry", "parent": 35, "children": [], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 32}}, {"id": 38, "type": "ERROR", "text": "(const std::vector<MachineBasicBlock*> &M)", "parent": 35, "children": [39, 40], "start_point": {"row": 37, "column": 32}, "end_point": {"row": 37, "column": 74}}, {"id": 39, "type": "type_identifier", "text": "std", "parent": 38, "children": [], "start_point": {"row": 37, "column": 39}, "end_point": {"row": 37, "column": 42}}, {"id": 40, "type": "bitfield_clause", "text": ":vector<MachineBasicBlock*> &M", "parent": 38, "children": [41], "start_point": {"row": 37, "column": 43}, "end_point": {"row": 37, "column": 73}}, {"id": 41, "type": "binary_expression", "text": "vector<MachineBasicBlock*> &M", "parent": 40, "children": [42, 46, 48, 49], "start_point": {"row": 37, "column": 44}, "end_point": {"row": 37, "column": 73}}, {"id": 42, "type": "binary_expression", "text": "vector<MachineBasicBlock", "parent": 41, "children": [43, 44, 45], "start_point": {"row": 37, "column": 44}, "end_point": {"row": 37, "column": 68}}, {"id": 43, "type": "identifier", "text": "vector", "parent": 42, "children": [], "start_point": {"row": 37, "column": 44}, "end_point": {"row": 37, "column": 50}}, {"id": 44, "type": "<", "text": "<", "parent": 42, "children": [], "start_point": {"row": 37, "column": 50}, "end_point": {"row": 37, "column": 51}}, {"id": 45, "type": "identifier", "text": "MachineBasicBlock", "parent": 42, "children": [], "start_point": {"row": 37, "column": 51}, "end_point": {"row": 37, "column": 68}}, {"id": 46, "type": "ERROR", "text": "*", "parent": 41, "children": [47], "start_point": {"row": 37, "column": 68}, "end_point": {"row": 37, "column": 69}}, {"id": 47, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 37, "column": 68}, "end_point": {"row": 37, "column": 69}}, {"id": 48, "type": ">", "text": ">", "parent": 41, "children": [], "start_point": {"row": 37, "column": 69}, "end_point": {"row": 37, "column": 70}}, {"id": 49, "type": "pointer_expression", "text": "&M", "parent": 41, "children": [50], "start_point": {"row": 37, "column": 71}, "end_point": {"row": 37, "column": 73}}, {"id": 50, "type": "identifier", "text": "M", "parent": 49, "children": [], "start_point": {"row": 37, "column": 72}, "end_point": {"row": 37, "column": 73}}, {"id": 51, "type": "bitfield_clause", "text": ": MBBs(M)", "parent": 35, "children": [52], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 11}}, {"id": 52, "type": "call_expression", "text": "MBBs(M)", "parent": 51, "children": [53, 54], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 11}}, {"id": 53, "type": "identifier", "text": "MBBs", "parent": 52, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 8}}, {"id": 54, "type": "argument_list", "text": "(M)", "parent": 52, "children": [55], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 11}}, {"id": 55, "type": "identifier", "text": "M", "parent": 54, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 10}}, {"id": 56, "type": "ERROR", "text": "{}\n}", "parent": 35, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 39, "column": 1}}, {"id": 57, "type": "ERROR", "text": "class MachineJumpTableInfo {", "parent": 23, "children": [58], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 28}}, {"id": 58, "type": "field_identifier", "text": "MachineJumpTableInfo", "parent": 57, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 26}}, {"id": 59, "type": "field_declaration", "text": "unsigned EntrySize;", "parent": 23, "children": [60, 62], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 21}}, {"id": 60, "type": "sized_type_specifier", "text": "unsigned", "parent": 59, "children": [61], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 10}}, {"id": 61, "type": "unsigned", "text": "unsigned", "parent": 60, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 10}}, {"id": 62, "type": "field_identifier", "text": "EntrySize", "parent": 59, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 20}}, {"id": 63, "type": "field_declaration", "text": "unsigned Alignment;", "parent": 23, "children": [64, 66], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 21}}, {"id": 64, "type": "sized_type_specifier", "text": "unsigned", "parent": 63, "children": [65], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 10}}, {"id": 65, "type": "unsigned", "text": "unsigned", "parent": 64, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 10}}, {"id": 66, "type": "field_identifier", "text": "Alignment", "parent": 63, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 20}}, {"id": 67, "type": "field_declaration", "text": "std::vector<MachineJumpTableEntry> JumpTables;", "parent": 23, "children": [68, 69, 74], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 48}}, {"id": 68, "type": "type_identifier", "text": "std", "parent": 67, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 5}}, {"id": 69, "type": "ERROR", "text": "::vector<MachineJumpTableEntry>", "parent": 67, "children": [70, 71, 72, 73], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 36}}, {"id": 70, "type": "field_identifier", "text": "vector", "parent": 69, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 13}}, {"id": 71, "type": "<", "text": "<", "parent": 69, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 14}}, {"id": 72, "type": "field_identifier", "text": "MachineJumpTableEntry", "parent": 69, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 35}}, {"id": 73, "type": ">", "text": ">", "parent": 69, "children": [], "start_point": {"row": 44, "column": 35}, "end_point": {"row": 44, "column": 36}}, {"id": 74, "type": "field_identifier", "text": "JumpTables", "parent": 67, "children": [], "start_point": {"row": 44, "column": 37}, "end_point": {"row": 44, "column": 47}}, {"id": 75, "type": "field_declaration", "text": "public:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);", "parent": 23, "children": [76, 87, 92, 99, 100, 102], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 51, "column": 77}}, {"id": 76, "type": "function_declarator", "text": "MachineJumpTableInfo(unsigned Size, unsigned Align)", "parent": 75, "children": [77, 78], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 53}}, {"id": 77, "type": "field_identifier", "text": "MachineJumpTableInfo", "parent": 76, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 22}}, {"id": 78, "type": "parameter_list", "text": "(unsigned Size, unsigned Align)", "parent": 76, "children": [79, 83], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 53}}, {"id": 79, "type": "parameter_declaration", "text": "unsigned Size", "parent": 78, "children": [80, 82], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 36}}, {"id": 80, "type": "sized_type_specifier", "text": "unsigned", "parent": 79, "children": [81], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 31}}, {"id": 81, "type": "unsigned", "text": "unsigned", "parent": 80, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 31}}, {"id": 82, "type": "identifier", "text": "Size", "parent": 79, "children": [], "start_point": {"row": 46, "column": 32}, "end_point": {"row": 46, "column": 36}}, {"id": 83, "type": "parameter_declaration", "text": "unsigned Align", "parent": 78, "children": [84, 86], "start_point": {"row": 46, "column": 38}, "end_point": {"row": 46, "column": 52}}, {"id": 84, "type": "sized_type_specifier", "text": "unsigned", "parent": 83, "children": [85], "start_point": {"row": 46, "column": 38}, "end_point": {"row": 46, "column": 46}}, {"id": 85, "type": "unsigned", "text": "unsigned", "parent": 84, "children": [], "start_point": {"row": 46, "column": 38}, "end_point": {"row": 46, "column": 46}}, {"id": 86, "type": "identifier", "text": "Align", "parent": 83, "children": [], "start_point": {"row": 46, "column": 47}, "end_point": {"row": 46, "column": 52}}, {"id": 87, "type": "bitfield_clause", "text": ": EntrySize(Size)", "parent": 75, "children": [88], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 19}}, {"id": 88, "type": "call_expression", "text": "EntrySize(Size)", "parent": 87, "children": [89, 90], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 19}}, {"id": 89, "type": "identifier", "text": "EntrySize", "parent": 88, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 13}}, {"id": 90, "type": "argument_list", "text": "(Size)", "parent": 88, "children": [91], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 19}}, {"id": 91, "type": "identifier", "text": "Size", "parent": 90, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 18}}, {"id": 92, "type": "ERROR", "text": "Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned", "parent": 75, "children": [93, 98], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 51, "column": 10}}, {"id": 93, "type": "function_declarator", "text": "Alignment(Align)", "parent": 92, "children": [94, 95], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 37}}, {"id": 94, "type": "field_identifier", "text": "Alignment", "parent": 93, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 30}}, {"id": 95, "type": "parameter_list", "text": "(Align)", "parent": 93, "children": [96], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 37}}, {"id": 96, "type": "parameter_declaration", "text": "Align", "parent": 95, "children": [97], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 36}}, {"id": 97, "type": "type_identifier", "text": "Align", "parent": 96, "children": [], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 36}}, {"id": 98, "type": "unsigned", "text": "unsigned", "parent": 92, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 10}}, {"id": 99, "type": "field_identifier", "text": "getJumpTableIndex", "parent": 75, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 28}}, {"id": 100, "type": "ERROR", "text": "(const std:", "parent": 75, "children": [101], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 39}}, {"id": 101, "type": "type_identifier", "text": "std", "parent": 100, "children": [], "start_point": {"row": 51, "column": 35}, "end_point": {"row": 51, "column": 38}}, {"id": 102, "type": "bitfield_clause", "text": ":vector<MachineBasicBlock*> &DestBBs", "parent": 75, "children": [103], "start_point": {"row": 51, "column": 39}, "end_point": {"row": 51, "column": 75}}, {"id": 103, "type": "binary_expression", "text": "vector<MachineBasicBlock*> &DestBBs", "parent": 102, "children": [104, 108, 110, 111], "start_point": {"row": 51, "column": 40}, "end_point": {"row": 51, "column": 75}}, {"id": 104, "type": "binary_expression", "text": "vector<MachineBasicBlock", "parent": 103, "children": [105, 106, 107], "start_point": {"row": 51, "column": 40}, "end_point": {"row": 51, "column": 64}}, {"id": 105, "type": "identifier", "text": "vector", "parent": 104, "children": [], "start_point": {"row": 51, "column": 40}, "end_point": {"row": 51, "column": 46}}, {"id": 106, "type": "<", "text": "<", "parent": 104, "children": [], "start_point": {"row": 51, "column": 46}, "end_point": {"row": 51, "column": 47}}, {"id": 107, "type": "identifier", "text": "MachineBasicBlock", "parent": 104, "children": [], "start_point": {"row": 51, "column": 47}, "end_point": {"row": 51, "column": 64}}, {"id": 108, "type": "ERROR", "text": "*", "parent": 103, "children": [109], "start_point": {"row": 51, "column": 64}, "end_point": {"row": 51, "column": 65}}, {"id": 109, "type": "*", "text": "*", "parent": 108, "children": [], "start_point": {"row": 51, "column": 64}, "end_point": {"row": 51, "column": 65}}, {"id": 110, "type": ">", "text": ">", "parent": 103, "children": [], "start_point": {"row": 51, "column": 65}, "end_point": {"row": 51, "column": 66}}, {"id": 111, "type": "pointer_expression", "text": "&DestBBs", "parent": 103, "children": [112], "start_point": {"row": 51, "column": 67}, "end_point": {"row": 51, "column": 75}}, {"id": 112, "type": "identifier", "text": "DestBBs", "parent": 111, "children": [], "start_point": {"row": 51, "column": 68}, "end_point": {"row": 51, "column": 75}}, {"id": 113, "type": "field_declaration", "text": "bool isEmpty() const { return JumpTables.empty();", "parent": 23, "children": [114, 115, 120], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 51}}, {"id": 114, "type": "primitive_type", "text": "bool", "parent": 113, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 6}}, {"id": 115, "type": "ERROR", "text": "isEmpty() const { return JumpTables.", "parent": 113, "children": [116, 119], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 43}}, {"id": 116, "type": "function_declarator", "text": "isEmpty()", "parent": 115, "children": [117, 118], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 16}}, {"id": 117, "type": "field_identifier", "text": "isEmpty", "parent": 116, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 14}}, {"id": 118, "type": "parameter_list", "text": "()", "parent": 116, "children": [], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 16}}, {"id": 119, "type": "field_identifier", "text": "JumpTables", "parent": 115, "children": [], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 42}}, {"id": 120, "type": "function_declarator", "text": "empty()", "parent": 113, "children": [121, 122], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 50}}, {"id": 121, "type": "field_identifier", "text": "empty", "parent": 120, "children": [], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 48}}, {"id": 122, "type": "parameter_list", "text": "()", "parent": 120, "children": [], "start_point": {"row": 55, "column": 48}, "end_point": {"row": 55, "column": 50}}, {"id": 123, "type": "ERROR", "text": "std::vector<MachineJumpTableEntry> &", "parent": 22, "children": [124, 125, 126, 127, 128], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 44}}, {"id": 124, "type": "identifier", "text": "std", "parent": 123, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 11}}, {"id": 125, "type": "identifier", "text": "vector", "parent": 123, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 19}}, {"id": 126, "type": "<", "text": "<", "parent": 123, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 20}}, {"id": 127, "type": "identifier", "text": "MachineJumpTableEntry", "parent": 123, "children": [], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 41}}, {"id": 128, "type": ">", "text": ">", "parent": 123, "children": [], "start_point": {"row": 57, "column": 41}, "end_point": {"row": 57, "column": 42}}, {"id": 129, "type": "function_declarator", "text": "getJumpTables()", "parent": 22, "children": [130, 131], "start_point": {"row": 57, "column": 44}, "end_point": {"row": 57, "column": 59}}, {"id": 130, "type": "identifier", "text": "getJumpTables", "parent": 129, "children": [], "start_point": {"row": 57, "column": 44}, "end_point": {"row": 57, "column": 57}}, {"id": 131, "type": "parameter_list", "text": "()", "parent": 129, "children": [], "start_point": {"row": 57, "column": 57}, "end_point": {"row": 57, "column": 59}}, {"id": 132, "type": "ERROR", "text": "const {\n return JumpTables;\n }", "parent": 22, "children": [133, 134], "start_point": {"row": 57, "column": 60}, "end_point": {"row": 59, "column": 3}}, {"id": 133, "type": "ERROR", "text": "{\n return", "parent": 132, "children": [], "start_point": {"row": 57, "column": 66}, "end_point": {"row": 58, "column": 10}}, {"id": 134, "type": "type_identifier", "text": "JumpTables", "parent": 132, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 21}}, {"id": 135, "type": "declaration", "text": "void RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.clear();", "parent": 22, "children": [136, 137, 149], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 64, "column": 33}}, {"id": 136, "type": "primitive_type", "text": "void", "parent": 135, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 6}}, {"id": 137, "type": "ERROR", "text": "RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.", "parent": 135, "children": [138, 145, 148], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 64, "column": 25}}, {"id": 138, "type": "function_declarator", "text": "RemoveJumpTable(unsigned Idx)", "parent": 137, "children": [139, 140], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 36}}, {"id": 139, "type": "identifier", "text": "RemoveJumpTable", "parent": 138, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 22}}, {"id": 140, "type": "parameter_list", "text": "(unsigned Idx)", "parent": 138, "children": [141], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 36}}, {"id": 141, "type": "parameter_declaration", "text": "unsigned Idx", "parent": 140, "children": [142, 144], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 35}}, {"id": 142, "type": "sized_type_specifier", "text": "unsigned", "parent": 141, "children": [143], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 31}}, {"id": 143, "type": "unsigned", "text": "unsigned", "parent": 142, "children": [], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 31}}, {"id": 144, "type": "identifier", "text": "Idx", "parent": 141, "children": [], "start_point": {"row": 63, "column": 32}, "end_point": {"row": 63, "column": 35}}, {"id": 145, "type": "array_declarator", "text": "JumpTables[Idx]", "parent": 137, "children": [146, 147], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 19}}, {"id": 146, "type": "identifier", "text": "JumpTables", "parent": 145, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 14}}, {"id": 147, "type": "identifier", "text": "Idx", "parent": 145, "children": [], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 18}}, {"id": 148, "type": "identifier", "text": "MBBs", "parent": 137, "children": [], "start_point": {"row": 64, "column": 20}, "end_point": {"row": 64, "column": 24}}, {"id": 149, "type": "function_declarator", "text": "clear()", "parent": 135, "children": [150, 151], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 32}}, {"id": 150, "type": "identifier", "text": "clear", "parent": 149, "children": [], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 30}}, {"id": 151, "type": "parameter_list", "text": "()", "parent": 149, "children": [], "start_point": {"row": 64, "column": 30}, "end_point": {"row": 64, "column": 32}}, {"id": 152, "type": "ERROR", "text": "bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New)", "parent": 22, "children": [153, 154], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 77}}, {"id": 153, "type": "primitive_type", "text": "bool", "parent": 152, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 6}}, {"id": 154, "type": "function_declarator", "text": "ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New)", "parent": 152, "children": [155, 156], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 77}}, {"id": 155, "type": "identifier", "text": "ReplaceMBBInJumpTables", "parent": 154, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 29}}, {"id": 156, "type": "parameter_list", "text": "(MachineBasicBlock *Old, MachineBasicBlock *New)", "parent": 154, "children": [157, 162], "start_point": {"row": 69, "column": 29}, "end_point": {"row": 69, "column": 77}}, {"id": 157, "type": "parameter_declaration", "text": "MachineBasicBlock *Old", "parent": 156, "children": [158, 159], "start_point": {"row": 69, "column": 30}, "end_point": {"row": 69, "column": 52}}, {"id": 158, "type": "type_identifier", "text": "MachineBasicBlock", "parent": 157, "children": [], "start_point": {"row": 69, "column": 30}, "end_point": {"row": 69, "column": 47}}, {"id": 159, "type": "pointer_declarator", "text": "*Old", "parent": 157, "children": [160, 161], "start_point": {"row": 69, "column": 48}, "end_point": {"row": 69, "column": 52}}, {"id": 160, "type": "*", "text": "*", "parent": 159, "children": [], "start_point": {"row": 69, "column": 48}, "end_point": {"row": 69, "column": 49}}, {"id": 161, "type": "identifier", "text": "Old", "parent": 159, "children": [], "start_point": {"row": 69, "column": 49}, "end_point": {"row": 69, "column": 52}}, {"id": 162, "type": "parameter_declaration", "text": "MachineBasicBlock *New", "parent": 156, "children": [163, 164], "start_point": {"row": 69, "column": 54}, "end_point": {"row": 69, "column": 76}}, {"id": 163, "type": "type_identifier", "text": "MachineBasicBlock", "parent": 162, "children": [], "start_point": {"row": 69, "column": 54}, "end_point": {"row": 69, "column": 71}}, {"id": 164, "type": "pointer_declarator", "text": "*New", "parent": 162, "children": [165, 166], "start_point": {"row": 69, "column": 72}, "end_point": {"row": 69, "column": 76}}, {"id": 165, "type": "*", "text": "*", "parent": 164, "children": [], "start_point": {"row": 69, "column": 72}, "end_point": {"row": 69, "column": 73}}, {"id": 166, "type": "identifier", "text": "New", "parent": 164, "children": [], "start_point": {"row": 69, "column": 73}, "end_point": {"row": 69, "column": 76}}, {"id": 167, "type": "call_expression", "text": "assert(Old != New && \"Not making a change?\")", "parent": 22, "children": [168, 169], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 48}}, {"id": 168, "type": "identifier", "text": "assert", "parent": 167, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 10}}, {"id": 169, "type": "argument_list", "text": "(Old != New && \"Not making a change?\")", "parent": 167, "children": [170], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 48}}, {"id": 170, "type": "binary_expression", "text": "Old != New && \"Not making a change?\"", "parent": 169, "children": [171, 175, 176], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 47}}, {"id": 171, "type": "binary_expression", "text": "Old != New", "parent": 170, "children": [172, 173, 174], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 21}}, {"id": 172, "type": "identifier", "text": "Old", "parent": 171, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 14}}, {"id": 173, "type": "!=", "text": "!=", "parent": 171, "children": [], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 17}}, {"id": 174, "type": "identifier", "text": "New", "parent": 171, "children": [], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 21}}, {"id": 175, "type": "&&", "text": "&&", "parent": 170, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 24}}, {"id": 176, "type": "string_literal", "text": "\"Not making a change?\"", "parent": 170, "children": [], "start_point": {"row": 70, "column": 25}, "end_point": {"row": 70, "column": 47}}, {"id": 177, "type": "declaration", "text": "bool MadeChange = false;", "parent": 22, "children": [178, 179], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 28}}, {"id": 178, "type": "primitive_type", "text": "bool", "parent": 177, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 8}}, {"id": 179, "type": "init_declarator", "text": "MadeChange = false", "parent": 177, "children": [180, 181, 182], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 27}}, {"id": 180, "type": "identifier", "text": "MadeChange", "parent": 179, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 19}}, {"id": 181, "type": "=", "text": "=", "parent": 179, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 21}}, {"id": 182, "type": "false", "text": "false", "parent": 179, "children": [], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 27}}, {"id": 183, "type": "for_statement", "text": "for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }", "parent": 22, "children": [184, 198, 202], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 79, "column": 5}}, {"id": 184, "type": "declaration", "text": "size_t i = 0, e = JumpTables.size();", "parent": 183, "children": [185, 186, 190], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 45}}, {"id": 185, "type": "primitive_type", "text": "size_t", "parent": 184, "children": [], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 15}}, {"id": 186, "type": "init_declarator", "text": "i = 0", "parent": 184, "children": [187, 188, 189], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 21}}, {"id": 187, "type": "identifier", "text": "i", "parent": 186, "children": [], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 17}}, {"id": 188, "type": "=", "text": "=", "parent": 186, "children": [], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 19}}, {"id": 189, "type": "number_literal", "text": "0", "parent": 186, "children": [], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 21}}, {"id": 190, "type": "init_declarator", "text": "e = JumpTables.size()", "parent": 184, "children": [191, 192, 193], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 44}}, {"id": 191, "type": "identifier", "text": "e", "parent": 190, "children": [], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 24}}, {"id": 192, "type": "=", "text": "=", "parent": 190, "children": [], "start_point": {"row": 72, "column": 25}, "end_point": {"row": 72, "column": 26}}, {"id": 193, "type": "call_expression", "text": "JumpTables.size()", "parent": 190, "children": [194, 197], "start_point": {"row": 72, "column": 27}, "end_point": {"row": 72, "column": 44}}, {"id": 194, "type": "field_expression", "text": "JumpTables.size", "parent": 193, "children": [195, 196], "start_point": {"row": 72, "column": 27}, "end_point": {"row": 72, "column": 42}}, {"id": 195, "type": "identifier", "text": "JumpTables", "parent": 194, "children": [], "start_point": {"row": 72, "column": 27}, "end_point": {"row": 72, "column": 37}}, {"id": 196, "type": "field_identifier", "text": "size", "parent": 194, "children": [], "start_point": {"row": 72, "column": 38}, "end_point": {"row": 72, "column": 42}}, {"id": 197, "type": "argument_list", "text": "()", "parent": 193, "children": [], "start_point": {"row": 72, "column": 42}, "end_point": {"row": 72, "column": 44}}, {"id": 198, "type": "binary_expression", "text": "i != e", "parent": 183, "children": [199, 200, 201], "start_point": {"row": 72, "column": 46}, "end_point": {"row": 72, "column": 52}}, {"id": 199, "type": "identifier", "text": "i", "parent": 198, "children": [], "start_point": {"row": 72, "column": 46}, "end_point": {"row": 72, "column": 47}}, {"id": 200, "type": "!=", "text": "!=", "parent": 198, "children": [], "start_point": {"row": 72, "column": 48}, "end_point": {"row": 72, "column": 50}}, {"id": 201, "type": "identifier", "text": "e", "parent": 198, "children": [], "start_point": {"row": 72, "column": 51}, "end_point": {"row": 72, "column": 52}}, {"id": 202, "type": "update_expression", "text": "++i", "parent": 183, "children": [203, 204], "start_point": {"row": 72, "column": 54}, "end_point": {"row": 72, "column": 57}}, {"id": 203, "type": "++", "text": "++", "parent": 202, "children": [], "start_point": {"row": 72, "column": 54}, "end_point": {"row": 72, "column": 56}}, {"id": 204, "type": "identifier", "text": "i", "parent": 202, "children": [], "start_point": {"row": 72, "column": 56}, "end_point": {"row": 72, "column": 57}}, {"id": 205, "type": "binary_expression", "text": "MachineJumpTableEntry &JTE = JumpTables[i]", "parent": 183, "children": [206, 207], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 48}}, {"id": 206, "type": "identifier", "text": "MachineJumpTableEntry", "parent": 205, "children": [], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 27}}, {"id": 207, "type": "assignment_expression", "text": "JTE = JumpTables[i]", "parent": 205, "children": [208, 209, 210], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 48}}, {"id": 208, "type": "identifier", "text": "JTE", "parent": 207, "children": [], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 32}}, {"id": 209, "type": "=", "text": "=", "parent": 207, "children": [], "start_point": {"row": 73, "column": 33}, "end_point": {"row": 73, "column": 34}}, {"id": 210, "type": "subscript_expression", "text": "JumpTables[i]", "parent": 207, "children": [211, 212], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 48}}, {"id": 211, "type": "identifier", "text": "JumpTables", "parent": 210, "children": [], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 45}}, {"id": 212, "type": "identifier", "text": "i", "parent": 210, "children": [], "start_point": {"row": 73, "column": 46}, "end_point": {"row": 73, "column": 47}}, {"id": 213, "type": "for_statement", "text": "for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }", "parent": 183, "children": [214, 230, 234, 237], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 78, "column": 9}}, {"id": 214, "type": "declaration", "text": "size_t j = 0, e = JTE.MBBs.size();", "parent": 213, "children": [215, 216, 220], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 45}}, {"id": 215, "type": "primitive_type", "text": "size_t", "parent": 214, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 17}}, {"id": 216, "type": "init_declarator", "text": "j = 0", "parent": 214, "children": [217, 218, 219], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 23}}, {"id": 217, "type": "identifier", "text": "j", "parent": 216, "children": [], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 19}}, {"id": 218, "type": "=", "text": "=", "parent": 216, "children": [], "start_point": {"row": 74, "column": 20}, "end_point": {"row": 74, "column": 21}}, {"id": 219, "type": "number_literal", "text": "0", "parent": 216, "children": [], "start_point": {"row": 74, "column": 22}, "end_point": {"row": 74, "column": 23}}, {"id": 220, "type": "init_declarator", "text": "e = JTE.MBBs.size()", "parent": 214, "children": [221, 222, 223], "start_point": {"row": 74, "column": 25}, "end_point": {"row": 74, "column": 44}}, {"id": 221, "type": "identifier", "text": "e", "parent": 220, "children": [], "start_point": {"row": 74, "column": 25}, "end_point": {"row": 74, "column": 26}}, {"id": 222, "type": "=", "text": "=", "parent": 220, "children": [], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 28}}, {"id": 223, "type": "call_expression", "text": "JTE.MBBs.size()", "parent": 220, "children": [224, 229], "start_point": {"row": 74, "column": 29}, "end_point": {"row": 74, "column": 44}}, {"id": 224, "type": "field_expression", "text": "JTE.MBBs.size", "parent": 223, "children": [225, 228], "start_point": {"row": 74, "column": 29}, "end_point": {"row": 74, "column": 42}}, {"id": 225, "type": "field_expression", "text": "JTE.MBBs", "parent": 224, "children": [226, 227], "start_point": {"row": 74, "column": 29}, "end_point": {"row": 74, "column": 37}}, {"id": 226, "type": "identifier", "text": "JTE", "parent": 225, "children": [], "start_point": {"row": 74, "column": 29}, "end_point": {"row": 74, "column": 32}}, {"id": 227, "type": "field_identifier", "text": "MBBs", "parent": 225, "children": [], "start_point": {"row": 74, "column": 33}, "end_point": {"row": 74, "column": 37}}, {"id": 228, "type": "field_identifier", "text": "size", "parent": 224, "children": [], "start_point": {"row": 74, "column": 38}, "end_point": {"row": 74, "column": 42}}, {"id": 229, "type": "argument_list", "text": "()", "parent": 223, "children": [], "start_point": {"row": 74, "column": 42}, "end_point": {"row": 74, "column": 44}}, {"id": 230, "type": "binary_expression", "text": "j != e", "parent": 213, "children": [231, 232, 233], "start_point": {"row": 74, "column": 46}, "end_point": {"row": 74, "column": 52}}, {"id": 231, "type": "identifier", "text": "j", "parent": 230, "children": [], "start_point": {"row": 74, "column": 46}, "end_point": {"row": 74, "column": 47}}, {"id": 232, "type": "!=", "text": "!=", "parent": 230, "children": [], "start_point": {"row": 74, "column": 48}, "end_point": {"row": 74, "column": 50}}, {"id": 233, "type": "identifier", "text": "e", "parent": 230, "children": [], "start_point": {"row": 74, "column": 51}, "end_point": {"row": 74, "column": 52}}, {"id": 234, "type": "update_expression", "text": "++j", "parent": 213, "children": [235, 236], "start_point": {"row": 74, "column": 54}, "end_point": {"row": 74, "column": 57}}, {"id": 235, "type": "++", "text": "++", "parent": 234, "children": [], "start_point": {"row": 74, "column": 54}, "end_point": {"row": 74, "column": 56}}, {"id": 236, "type": "identifier", "text": "j", "parent": 234, "children": [], "start_point": {"row": 74, "column": 56}, "end_point": {"row": 74, "column": 57}}, {"id": 237, "type": "if_statement", "text": "if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }", "parent": 213, "children": [238], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 78, "column": 9}}, {"id": 238, "type": "parenthesized_expression", "text": "(JTE.MBBs[j] == Old)", "parent": 237, "children": [239], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 31}}, {"id": 239, "type": "binary_expression", "text": "JTE.MBBs[j] == Old", "parent": 238, "children": [240, 245, 246], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 30}}, {"id": 240, "type": "subscript_expression", "text": "JTE.MBBs[j]", "parent": 239, "children": [241, 244], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 23}}, {"id": 241, "type": "field_expression", "text": "JTE.MBBs", "parent": 240, "children": [242, 243], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 20}}, {"id": 242, "type": "identifier", "text": "JTE", "parent": 241, "children": [], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 15}}, {"id": 243, "type": "field_identifier", "text": "MBBs", "parent": 241, "children": [], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 20}}, {"id": 244, "type": "identifier", "text": "j", "parent": 240, "children": [], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 22}}, {"id": 245, "type": "==", "text": "==", "parent": 239, "children": [], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 26}}, {"id": 246, "type": "identifier", "text": "Old", "parent": 239, "children": [], "start_point": {"row": 75, "column": 27}, "end_point": {"row": 75, "column": 30}}, {"id": 247, "type": "assignment_expression", "text": "JTE.MBBs[j] = New", "parent": 237, "children": [248, 253, 254], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 27}}, {"id": 248, "type": "subscript_expression", "text": "JTE.MBBs[j]", "parent": 247, "children": [249, 252], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 21}}, {"id": 249, "type": "field_expression", "text": "JTE.MBBs", "parent": 248, "children": [250, 251], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 18}}, {"id": 250, "type": "identifier", "text": "JTE", "parent": 249, "children": [], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 13}}, {"id": 251, "type": "field_identifier", "text": "MBBs", "parent": 249, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 18}}, {"id": 252, "type": "identifier", "text": "j", "parent": 248, "children": [], "start_point": {"row": 76, "column": 19}, "end_point": {"row": 76, "column": 20}}, {"id": 253, "type": "=", "text": "=", "parent": 247, "children": [], "start_point": {"row": 76, "column": 22}, "end_point": {"row": 76, "column": 23}}, {"id": 254, "type": "identifier", "text": "New", "parent": 247, "children": [], "start_point": {"row": 76, "column": 24}, "end_point": {"row": 76, "column": 27}}, {"id": 255, "type": "assignment_expression", "text": "MadeChange = true", "parent": 237, "children": [256, 257, 258], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 27}}, {"id": 256, "type": "identifier", "text": "MadeChange", "parent": 255, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 20}}, {"id": 257, "type": "=", "text": "=", "parent": 255, "children": [], "start_point": {"row": 77, "column": 21}, "end_point": {"row": 77, "column": 22}}, {"id": 258, "type": "true", "text": "true", "parent": 255, "children": [], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 27}}, {"id": 259, "type": "return_statement", "text": "return MadeChange;", "parent": 22, "children": [260], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 22}}, {"id": 260, "type": "identifier", "text": "MadeChange", "parent": 259, "children": [], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 21}}, {"id": 261, "type": "ERROR", "text": "unsigned getEntrySize() const", "parent": 15, "children": [262, 264], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 31}}, {"id": 262, "type": "sized_type_specifier", "text": "unsigned", "parent": 261, "children": [263], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 10}}, {"id": 263, "type": "unsigned", "text": "unsigned", "parent": 262, "children": [], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 10}}, {"id": 264, "type": "function_declarator", "text": "getEntrySize()", "parent": 261, "children": [265, 266], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 85, "column": 25}}, {"id": 265, "type": "identifier", "text": "getEntrySize", "parent": 264, "children": [], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 85, "column": 23}}, {"id": 266, "type": "parameter_list", "text": "()", "parent": 264, "children": [], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 25}}, {"id": 267, "type": "return_statement", "text": "return EntrySize;", "parent": 15, "children": [268], "start_point": {"row": 85, "column": 34}, "end_point": {"row": 85, "column": 51}}, {"id": 268, "type": "identifier", "text": "EntrySize", "parent": 267, "children": [], "start_point": {"row": 85, "column": 41}, "end_point": {"row": 85, "column": 50}}, {"id": 269, "type": "ERROR", "text": "unsigned getAlignment() const", "parent": 15, "children": [270, 272], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 31}}, {"id": 270, "type": "sized_type_specifier", "text": "unsigned", "parent": 269, "children": [271], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 10}}, {"id": 271, "type": "unsigned", "text": "unsigned", "parent": 270, "children": [], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 10}}, {"id": 272, "type": "function_declarator", "text": "getAlignment()", "parent": 269, "children": [273, 274], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 25}}, {"id": 273, "type": "identifier", "text": "getAlignment", "parent": 272, "children": [], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 23}}, {"id": 274, "type": "parameter_list", "text": "()", "parent": 272, "children": [], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 25}}, {"id": 275, "type": "return_statement", "text": "return Alignment;", "parent": 15, "children": [276], "start_point": {"row": 88, "column": 34}, "end_point": {"row": 88, "column": 51}}, {"id": 276, "type": "identifier", "text": "Alignment", "parent": 275, "children": [], "start_point": {"row": 88, "column": 41}, "end_point": {"row": 88, "column": 50}}, {"id": 277, "type": "ERROR", "text": "void print(std::ostream &OS) const", "parent": 15, "children": [278, 279], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 36}}, {"id": 278, "type": "primitive_type", "text": "void", "parent": 277, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 6}}, {"id": 279, "type": "function_declarator", "text": "print(std::ostream &OS) const", "parent": 277, "children": [280, 281], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 36}}, {"id": 280, "type": "identifier", "text": "print", "parent": 279, "children": [], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 12}}, {"id": 281, "type": "parameter_list", "text": "(std::ostream &OS)", "parent": 279, "children": [282], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 30}}, {"id": 282, "type": "parameter_declaration", "text": "std::ostream &OS", "parent": 281, "children": [283, 284, 286], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 29}}, {"id": 283, "type": "type_identifier", "text": "std", "parent": 282, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 16}}, {"id": 284, "type": "ERROR", "text": "::ostream &", "parent": 282, "children": [285], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 27}}, {"id": 285, "type": "identifier", "text": "ostream", "parent": 284, "children": [], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 25}}, {"id": 286, "type": "identifier", "text": "OS", "parent": 282, "children": [], "start_point": {"row": 93, "column": 27}, "end_point": {"row": 93, "column": 29}}, {"id": 287, "type": "function_definition", "text": "void print(std::ostream *OS) const { if (OS) print(*OS); }", "parent": 15, "children": [288, 289], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 60}}, {"id": 288, "type": "primitive_type", "text": "void", "parent": 287, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 6}}, {"id": 289, "type": "function_declarator", "text": "print(std::ostream *OS) const", "parent": 287, "children": [290, 291], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 36}}, {"id": 290, "type": "identifier", "text": "print", "parent": 289, "children": [], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 12}}, {"id": 291, "type": "parameter_list", "text": "(std::ostream *OS)", "parent": 289, "children": [292], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 30}}, {"id": 292, "type": "parameter_declaration", "text": "std::ostream *OS", "parent": 291, "children": [293, 294, 296], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 29}}, {"id": 293, "type": "type_identifier", "text": "std", "parent": 292, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 16}}, {"id": 294, "type": "ERROR", "text": "::ostream", "parent": 292, "children": [295], "start_point": {"row": 94, "column": 16}, "end_point": {"row": 94, "column": 25}}, {"id": 295, "type": "identifier", "text": "ostream", "parent": 294, "children": [], "start_point": {"row": 94, "column": 18}, "end_point": {"row": 94, "column": 25}}, {"id": 296, "type": "pointer_declarator", "text": "*OS", "parent": 292, "children": [297, 298], "start_point": {"row": 94, "column": 26}, "end_point": {"row": 94, "column": 29}}, {"id": 297, "type": "*", "text": "*", "parent": 296, "children": [], "start_point": {"row": 94, "column": 26}, "end_point": {"row": 94, "column": 27}}, {"id": 298, "type": "identifier", "text": "OS", "parent": 296, "children": [], "start_point": {"row": 94, "column": 27}, "end_point": {"row": 94, "column": 29}}, {"id": 299, "type": "if_statement", "text": "if (OS) print(*OS);", "parent": 287, "children": [300], "start_point": {"row": 94, "column": 39}, "end_point": {"row": 94, "column": 58}}, {"id": 300, "type": "parenthesized_expression", "text": "(OS)", "parent": 299, "children": [301], "start_point": {"row": 94, "column": 42}, "end_point": {"row": 94, "column": 46}}, {"id": 301, "type": "identifier", "text": "OS", "parent": 300, "children": [], "start_point": {"row": 94, "column": 43}, "end_point": {"row": 94, "column": 45}}, {"id": 302, "type": "call_expression", "text": "print(*OS)", "parent": 299, "children": [303, 304], "start_point": {"row": 94, "column": 47}, "end_point": {"row": 94, "column": 57}}, {"id": 303, "type": "identifier", "text": "print", "parent": 302, "children": [], "start_point": {"row": 94, "column": 47}, "end_point": {"row": 94, "column": 52}}, {"id": 304, "type": "argument_list", "text": "(*OS)", "parent": 302, "children": [305], "start_point": {"row": 94, "column": 52}, "end_point": {"row": 94, "column": 57}}, {"id": 305, "type": "pointer_expression", "text": "*OS", "parent": 304, "children": [306, 307], "start_point": {"row": 94, "column": 53}, "end_point": {"row": 94, "column": 56}}, {"id": 306, "type": "*", "text": "*", "parent": 305, "children": [], "start_point": {"row": 94, "column": 53}, "end_point": {"row": 94, "column": 54}}, {"id": 307, "type": "identifier", "text": "OS", "parent": 305, "children": [], "start_point": {"row": 94, "column": 54}, "end_point": {"row": 94, "column": 56}}, {"id": 308, "type": "ERROR", "text": "void dump() const", "parent": 15, "children": [309, 310], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 19}}, {"id": 309, "type": "primitive_type", "text": "void", "parent": 308, "children": [], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 6}}, {"id": 310, "type": "function_declarator", "text": "dump()", "parent": 308, "children": [311, 312], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 13}}, {"id": 311, "type": "identifier", "text": "dump", "parent": 310, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 11}}, {"id": 312, "type": "parameter_list", "text": "()", "parent": 310, "children": [], "start_point": {"row": 98, "column": 11}, "end_point": {"row": 98, "column": 13}}, {"id": 313, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 22, 76, 93, 116, 120, 129, 138, 149, 154, 264, 272, 279, 287, 289, 310], "variables": [18, 20, 26, 35, 59, 63, 67, 75, 79, 83, 96, 113, 135, 141, 157, 162, 177, 184, 214, 282, 292], "classes": [23, 24], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [41, 42, 49, 52, 88, 103, 104, 111, 167, 170, 171, 193, 194, 198, 202, 205, 210, 223, 224, 225, 230, 234, 238, 239, 240, 241, 248, 249, 300, 302, 305], "assignments": [207, 247, 255], "loops": [183, 213], "conditionals": [0, 1, 2, 5, 16, 17, 19, 21, 25, 27, 29, 31, 34, 36, 37, 39, 43, 45, 50, 53, 55, 58, 60, 62, 64, 66, 68, 70, 72, 74, 77, 80, 82, 84, 86, 89, 91, 94, 97, 99, 101, 105, 107, 112, 117, 119, 121, 124, 125, 127, 130, 134, 139, 142, 144, 146, 147, 148, 150, 155, 158, 161, 163, 166, 168, 172, 174, 180, 187, 191, 195, 196, 199, 201, 204, 206, 208, 211, 212, 217, 221, 226, 227, 228, 231, 233, 236, 237, 242, 243, 244, 246, 250, 251, 252, 254, 256, 260, 262, 265, 268, 270, 273, 276, 280, 283, 285, 286, 290, 293, 295, 298, 299, 301, 303, 307, 311, 313], "returns": [259, 267, 275], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 176, 189, 219], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [40, 51, 87, 102]}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "MachineBasicBlock;", "text_snippet": "namespace llvm {\n\nclass MachineBasicBlock;\nclass TargetData;\n\n/// MachineJumpTableEntry - One jump t"}, {"node_id": 22, "universal_type": "function", "name": "MachineJumpTableEntry", "text_snippet": "struct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "MachineJumpTableInfo(unsigned Size, unsigned Align)"}, {"node_id": 93, "universal_type": "function", "name": "unknown", "text_snippet": "Alignment(Align)"}, {"node_id": 116, "universal_type": "function", "name": "unknown", "text_snippet": "isEmpty()"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "empty()"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "getJumpTables()"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "RemoveJumpTable(unsigned Idx)"}, {"node_id": 149, "universal_type": "function", "name": "unknown", "text_snippet": "clear()"}, {"node_id": 154, "universal_type": "function", "name": "unknown", "text_snippet": "ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New)"}, {"node_id": 264, "universal_type": "function", "name": "unknown", "text_snippet": "getEntrySize()"}, {"node_id": 272, "universal_type": "function", "name": "unknown", "text_snippet": "getAlignment()"}, {"node_id": 279, "universal_type": "function", "name": "unknown", "text_snippet": "print(std::ostream &OS) const"}, {"node_id": 287, "universal_type": "function", "name": "print", "text_snippet": "void print(std::ostream *OS) const { if (OS) print(*OS); }"}, {"node_id": 289, "universal_type": "function", "name": "unknown", "text_snippet": "print(std::ostream *OS) const"}, {"node_id": 310, "universal_type": "function", "name": "unknown", "text_snippet": "dump()"}], "class_declarations": [{"node_id": 23, "universal_type": "class", "name": "MachineJumpTableEntry", "text_snippet": "struct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump"}, {"node_id": 24, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <vector>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <iosfwd>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <cassert>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "//===-- CodeGen/MachineJumpTableInfo.h - Abstract Jump Tables --*- C++ -*-===//\n//\n// The LLVM Compiler Infrastructure\n//\n// This file is distributed under the University of Illinois Open Source\n// License. See LICENSE.TXT for details.\n//\n//===----------------------------------------------------------------------===//\n//\n// The MachineJumpTableInfo class keeps track of jump tables referenced by\n// lowered switch instructions in the MachineFunction.\n//\n// Instructions reference the address of these jump tables through the use of \n// MO_JumpTableIndex values. When emitting assembly or machine code, these \n// virtual address references are converted to refer to the address of the \n// function jump tables.\n//\n//===----------------------------------------------------------------------===//\n\n#ifndef LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H\n#define LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H\n\n#include <vector>\n#include <iosfwd>\n#include <cassert>\n\nnamespace llvm {\n\nclass MachineBasicBlock;\nclass TargetData;\n\n/// MachineJumpTableEntry - One jump table in the jump table info.\n///\nstruct MachineJumpTableEntry {\n /// MBBs - The vector of basic blocks from which to create the jump table.\n std::vector<MachineBasicBlock*> MBBs;\n \n explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)\n : MBBs(M) {}\n};\n \nclass MachineJumpTableInfo {\n unsigned EntrySize;\n unsigned Alignment;\n std::vector<MachineJumpTableEntry> JumpTables;\npublic:\n MachineJumpTableInfo(unsigned Size, unsigned Align)\n : EntrySize(Size), Alignment(Align) {}\n \n /// getJumpTableIndex - Create a new jump table or return an existing one.\n ///\n unsigned getJumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);\n \n /// isEmpty - Return true if there are no jump tables.\n ///\n bool isEmpty() const { return JumpTables.empty(); }\n\n const std::vector<MachineJumpTableEntry> &getJumpTables() const {\n return JumpTables;\n }\n \n /// RemoveJumpTable - Mark the specific index as being dead. This will cause\n /// it to not be emitted.\n void RemoveJumpTable(unsigned Idx) {\n JumpTables[Idx].MBBs.clear();\n }\n \n /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update\n /// the jump tables to branch to New instead.\n bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) {\n assert(Old != New && \"Not making a change?\");\n bool MadeChange = false;\n for (size_t i = 0, e = JumpTables.size(); i != e; ++i) {\n MachineJumpTableEntry &JTE = JumpTables[i];\n for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j)\n if (JTE.MBBs[j] == Old) {\n JTE.MBBs[j] = New;\n MadeChange = true;\n }\n }\n return MadeChange;\n }\n \n /// getEntrySize - Returns the size of an individual field in a jump table. \n ///\n unsigned getEntrySize() const { return EntrySize; }\n \n /// getAlignment - returns the target's preferred alignment for jump tables\n unsigned getAlignment() const { return Alignment; }\n \n /// print - Used by the MachineFunction printer to print information about\n /// jump tables. Implemented in MachineFunction.cpp\n ///\n void print(std::ostream &OS) const;\n void print(std::ostream *OS) const { if (OS) print(*OS); }\n\n /// dump - Call print(std::cerr) to be called from the debugger.\n ///\n void dump() const;\n};\n\n} // End llvm namespace\n\n#endif\n"}
349
c
#include <stdio.h> #include <cs50.h> #include <string.h> int main(void) { printf("What do you want to display? "); string s = get_string(); int len = strlen(s); for (int i = 0; i < len; i++) { printf("%c\n", s[i]); } printf("\n"); }
17.27
15
(translation_unit) "#include <stdio.h>\n#include <cs50.h>\n#include <string.h>\n\nint main(void)\n{\n printf("What do you want to display? ");\n string s = get_string();\n int len = strlen(s);\n \n for (int i = 0; i < len; i++)\n {\n printf("%c\n", s[i]);\n }\n printf("\n");\n}" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <cs50.h>\n" (#include) "#include" (system_lib_string) "<cs50.h>" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (function_definition) "int main(void)\n{\n printf("What do you want to display? ");\n string s = get_string();\n int len = strlen(s);\n \n for (int i = 0; i < len; i++)\n {\n printf("%c\n", s[i]);\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 printf("What do you want to display? ");\n string s = get_string();\n int len = strlen(s);\n \n for (int i = 0; i < len; i++)\n {\n printf("%c\n", s[i]);\n }\n printf("\n");\n}" ({) "{" (expression_statement) "printf("What do you want to display? ");" (call_expression) "printf("What do you want to display? ")" (identifier) "printf" (argument_list) "("What do you want to display? ")" (() "(" (string_literal) ""What do you want to display? "" (") """ (string_content) "What do you want to display? " (") """ ()) ")" (;) ";" (declaration) "string s = get_string();" (type_identifier) "string" (init_declarator) "s = get_string()" (identifier) "s" (=) "=" (call_expression) "get_string()" (identifier) "get_string" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int len = strlen(s);" (primitive_type) "int" (init_declarator) "len = strlen(s)" (identifier) "len" (=) "=" (call_expression) "strlen(s)" (identifier) "strlen" (argument_list) "(s)" (() "(" (identifier) "s" ()) ")" (;) ";" (for_statement) "for (int i = 0; i < len; i++)\n {\n printf("%c\n", s[i]);\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < len" (identifier) "i" (<) "<" (identifier) "len" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n printf("%c\n", s[i]);\n }" ({) "{" (expression_statement) "printf("%c\n", s[i]);" (call_expression) "printf("%c\n", s[i])" (identifier) "printf" (argument_list) "("%c\n", s[i])" (() "(" (string_literal) ""%c\n"" (") """ (string_content) "%c" (escape_sequence) "\n" (") """ (,) "," (subscript_expression) "s[i]" (identifier) "s" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}"
107
0
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 17.27, "nodes": 64, "errors": 0, "source_hash": "e62d8eadb9eb5dd82d289e01f851d2c22efc783a4f708ae19bd48c12625cc249", "categorized_nodes": 44}, "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 <cs50.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": "<cs50.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "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": 9}, "end_point": {"row": 2, "column": 19}}, {"id": 9, "type": "function_definition", "text": "int main(void)\n{\n printf(\"What do you want to display? \");\n string s = get_string();\n int len = strlen(s);\n \n for (int i = 0; i < len; i++)\n {\n printf(\"%c\\n\", s[i]);\n }\n printf(\"\\n\");\n}", "parent": null, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 10, "type": "primitive_type", "text": "int", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 3}}, {"id": 11, "type": "function_declarator", "text": "main(void)", "parent": 9, "children": [12, 13], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 14}}, {"id": 12, "type": "identifier", "text": "main", "parent": 11, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 8}}, {"id": 13, "type": "parameter_list", "text": "(void)", "parent": 11, "children": [14], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 14}}, {"id": 14, "type": "parameter_declaration", "text": "void", "parent": 13, "children": [15], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 13}}, {"id": 15, "type": "primitive_type", "text": "void", "parent": 14, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 13}}, {"id": 16, "type": "call_expression", "text": "printf(\"What do you want to display? \")", "parent": 9, "children": [17, 18], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 43}}, {"id": 17, "type": "identifier", "text": "printf", "parent": 16, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 10}}, {"id": 18, "type": "argument_list", "text": "(\"What do you want to display? \")", "parent": 16, "children": [19], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 43}}, {"id": 19, "type": "string_literal", "text": "\"What do you want to display? \"", "parent": 18, "children": [], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 42}}, {"id": 20, "type": "declaration", "text": "string s = get_string();", "parent": 9, "children": [21, 22], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 28}}, {"id": 21, "type": "type_identifier", "text": "string", "parent": 20, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 10}}, {"id": 22, "type": "init_declarator", "text": "s = get_string()", "parent": 20, "children": [23, 24, 25], "start_point": {"row": 7, "column": 11}, "end_point": {"row": 7, "column": 27}}, {"id": 23, "type": "identifier", "text": "s", "parent": 22, "children": [], "start_point": {"row": 7, "column": 11}, "end_point": {"row": 7, "column": 12}}, {"id": 24, "type": "=", "text": "=", "parent": 22, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 14}}, {"id": 25, "type": "call_expression", "text": "get_string()", "parent": 22, "children": [26, 27], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 27}}, {"id": 26, "type": "identifier", "text": "get_string", "parent": 25, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 25}}, {"id": 27, "type": "argument_list", "text": "()", "parent": 25, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 27}}, {"id": 28, "type": "declaration", "text": "int len = strlen(s);", "parent": 9, "children": [29, 30], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 24}}, {"id": 29, "type": "primitive_type", "text": "int", "parent": 28, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 7}}, {"id": 30, "type": "init_declarator", "text": "len = strlen(s)", "parent": 28, "children": [31, 32, 33], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 31, "type": "identifier", "text": "len", "parent": 30, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 11}}, {"id": 32, "type": "=", "text": "=", "parent": 30, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 13}}, {"id": 33, "type": "call_expression", "text": "strlen(s)", "parent": 30, "children": [34, 35], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 23}}, {"id": 34, "type": "identifier", "text": "strlen", "parent": 33, "children": [], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 20}}, {"id": 35, "type": "argument_list", "text": "(s)", "parent": 33, "children": [36], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 23}}, {"id": 36, "type": "identifier", "text": "s", "parent": 35, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 22}}, {"id": 37, "type": "for_statement", "text": "for (int i = 0; i < len; i++)\n {\n printf(\"%c\\n\", s[i]);\n }", "parent": 9, "children": [38, 44, 48], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 13, "column": 5}}, {"id": 38, "type": "declaration", "text": "int i = 0;", "parent": 37, "children": [39, 40], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 19}}, {"id": 39, "type": "primitive_type", "text": "int", "parent": 38, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 12}}, {"id": 40, "type": "init_declarator", "text": "i = 0", "parent": 38, "children": [41, 42, 43], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 18}}, {"id": 41, "type": "identifier", "text": "i", "parent": 40, "children": [], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 14}}, {"id": 42, "type": "=", "text": "=", "parent": 40, "children": [], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 16}}, {"id": 43, "type": "number_literal", "text": "0", "parent": 40, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 18}}, {"id": 44, "type": "binary_expression", "text": "i < len", "parent": 37, "children": [45, 46, 47], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 27}}, {"id": 45, "type": "identifier", "text": "i", "parent": 44, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 21}}, {"id": 46, "type": "<", "text": "<", "parent": 44, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 23}}, {"id": 47, "type": "identifier", "text": "len", "parent": 44, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 27}}, {"id": 48, "type": "update_expression", "text": "i++", "parent": 37, "children": [49, 50], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 32}}, {"id": 49, "type": "identifier", "text": "i", "parent": 48, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 30}}, {"id": 50, "type": "++", "text": "++", "parent": 48, "children": [], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 32}}, {"id": 51, "type": "call_expression", "text": "printf(\"%c\\n\", s[i])", "parent": 37, "children": [52, 53], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 28}}, {"id": 52, "type": "identifier", "text": "printf", "parent": 51, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 14}}, {"id": 53, "type": "argument_list", "text": "(\"%c\\n\", s[i])", "parent": 51, "children": [54, 56], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 28}}, {"id": 54, "type": "string_literal", "text": "\"%c\\n\"", "parent": 53, "children": [55], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 21}}, {"id": 55, "type": "escape_sequence", "text": "\\n", "parent": 54, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 20}}, {"id": 56, "type": "subscript_expression", "text": "s[i]", "parent": 53, "children": [57, 58], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 27}}, {"id": 57, "type": "identifier", "text": "s", "parent": 56, "children": [], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 24}}, {"id": 58, "type": "identifier", "text": "i", "parent": 56, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 26}}, {"id": 59, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 9, "children": [60, 61], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 16}}, {"id": 60, "type": "identifier", "text": "printf", "parent": 59, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 10}}, {"id": 61, "type": "argument_list", "text": "(\"\\n\")", "parent": 59, "children": [62], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 16}}, {"id": 62, "type": "string_literal", "text": "\"\\n\"", "parent": 61, "children": [63], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 15}}, {"id": 63, "type": "escape_sequence", "text": "\\n", "parent": 62, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 14}}]}, "node_categories": {"declarations": {"functions": [9, 11], "variables": [14, 20, 28, 38], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [16, 25, 33, 44, 48, 51, 56, 59], "assignments": [], "loops": [37], "conditionals": [12, 17, 21, 23, 26, 31, 34, 36, 41, 45, 47, 49, 52, 57, 58, 60], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 19, 43, 54, 62], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "main", "text_snippet": "int main(void)\n{\n printf(\"What do you want to display? \");\n string s = get_string();\n int l"}, {"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "main(void)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <cs50.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <string.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include <cs50.h>\n#include <string.h>\n\nint main(void)\n{\n printf(\"What do you want to display? \");\n string s = get_string();\n int len = strlen(s);\n \n for (int i = 0; i < len; i++)\n {\n printf(\"%c\\n\", s[i]);\n }\n printf(\"\\n\");\n}"}
350
c
// // InnoConfig.h // InnoPlayer_iOS_SDK // // Created by <NAME> on 03/09/20. // Copyright © 2020 MNC Innovation Center. All rights reserved. // #import <Foundation/Foundation.h> #import "InnoPlaylistItem.h" #import "InnoAdConfig.h" #import <InnoPlayer_iOS_SDK/InnoMenusStyle.h> @class InnoPlaylistItem; /** * Configuration object used to create InnoPlayer instance. */ @interface InnoConfig : NSObject /** * Video URL to play using InnoPlayer. */ @property(nonatomic, nullable, strong) NSString *file; /** * An array of InnoSource objects representing multiple quality levels of a video. */ @property(nonatomic, nullable, strong) NSArray *sources; /** * An array of InnoPlaylistItem objects containing information about different video items to be reproduced in a sequence. */ @property(nonatomic, nullable, strong) NSArray <InnoPlaylistItem *> *playlist; /** * Title (or name) of the video * * @note Shown in the play button container in the center of the screen, before the video starts to play, in addition to the device lock screen and in the multimedia controls in the multitasking UI */ @property(nonatomic, nullable, strong) NSString *title; /** * The URL of the thumbnail image. */ @property(nonatomic, nullable, strong) NSString *image; /** * A description of your video or audio item. */ @property(nonatomic, nullable, strong) NSString *desc; /** * Unique identifier of this item. Used by advertising, analytics and discovery services */ @property(nonatomic, nullable, strong) NSString *mediaId; /** * adConfig object providing info about ad handling. */ @property(nonatomic, nullable, strong) InnoAdConfig *advertising; /** * A boolean value that determines whether player controls are shown. */ @property(nonatomic) BOOL controls; /** * A boolean value that determines whether video should repeat after it’s done playing. */ @property(nonatomic) BOOL repeat; /** * Configures if the title of a media file should be displayed. Defaults to YES. */ @property(nonatomic) BOOL displayTitle; /** * Configures if the thumbnail of a media file should be displayed. Defaults to YES. */ @property(nonatomic) BOOL displayThumbnail; /** * Configures if the description title of a media file should be displayed. Defaults to YES. */ @property(nonatomic) BOOL displayDescription; /** * A boolean value that determines whether video should start automatically after loading. */ @property(nonatomic) BOOL autostart; /** * Configuration object used to customize the menus. */ @property (nonatomic, retain, readwrite, nullable) InnoMenusStyle * menus; /** * Factory method that creates a InnoConfig object with url of video content. */ - (id _Nonnull)initWithContentURL:(NSString *_Nonnull)url; @end
31.95
83
(translation_unit) "//\n// InnoConfig.h\n// InnoPlayer_iOS_SDK\n//\n// Created by <NAME> on 03/09/20.\n// Copyright © 2020 MNC Innovation Center. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import "InnoPlaylistItem.h"\n#import "InnoAdConfig.h"\n#import <InnoPlayer_iOS_SDK/InnoMenusStyle.h>\n\n@class InnoPlaylistItem;\n\n/**\n * Configuration object used to create InnoPlayer instance.\n */\n@interface InnoConfig : NSObject\n\n/**\n * Video URL to play using InnoPlayer.\n */\n@property(nonatomic, nullable, strong) NSString *file;\n\n/**\n * An array of InnoSource objects representing multiple quality levels of a video.\n */\n@property(nonatomic, nullable, strong) NSArray *sources;\n\n/**\n * An array of InnoPlaylistItem objects containing information about different video items to be reproduced in a sequence.\n */\n@property(nonatomic, nullable, strong) NSArray <InnoPlaylistItem *> *playlist;\n\n/**\n * Title (or name) of the video\n *\n * @note Shown in the play button container in the center of the screen, before the video starts to play, in addition to the device lock screen and in the multimedia controls in the multitasking UI\n */\n@property(nonatomic, nullable, strong) NSString *title;\n\n/**\n * The URL of the thumbnail image.\n */\n@property(nonatomic, nullable, strong) NSString *image;\n\n/**\n * A description of your video or audio item.\n */\n@property(nonatomic, nullable, strong) NSString *desc;\n\n/**\n * Unique identifier of this item. Used by advertising, analytics and discovery services\n */\n@property(nonatomic, nullable, strong) NSString *mediaId;\n\n/**\n * adConfig object providing info about ad handling.\n */\n@property(nonatomic, nullable, strong) InnoAdConfig *advertising;\n\n/**\n * A boolean value that determines whether player controls are shown.\n */\n@property(nonatomic) BOOL controls;\n\n/**\n * A boolean value that determines whether video should repeat after it’s done playing.\n */\n@property(nonatomic) BOOL repeat;\n\n/**\n * Configures if the title of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayTitle;\n\n/**\n * Configures if the thumbnail of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayThumbnail;\n\n/**\n * Configures if the description title of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayDescription;\n\n/**\n * A boolean value that determines whether video should start automatically after loading.\n */\n@property(nonatomic) BOOL autostart;\n\n/**\n * Configuration object used to customize the menus.\n */\n@property (nonatomic, retain, readwrite, nullable) InnoMenusStyle * menus;\n\n/**\n * Factory method that creates a InnoConfig object with url of video content.\n */\n- (id _Nonnull)initWithContentURL:(NSString *_Nonnull)url;\n\n@end\n" (comment) "//" (comment) "// InnoConfig.h" (comment) "// InnoPlayer_iOS_SDK" (comment) "//" (comment) "// Created by <NAME> on 03/09/20." (comment) "// Copyright © 2020 MNC Innovation Center. 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 "InnoPlaylistItem.h"\n#" (preproc_directive) "import " (preproc_arg) "InnoPlaylistItem.h"\n" (preproc_call) "import "InnoAdConfig.h"\n#" (preproc_directive) "import " (preproc_arg) "InnoAdConfig.h"\n" (preproc_call) "import <InnoPlayer_iOS_SDK/InnoMenusStyle.h>\n\n" (preproc_directive) "import " (preproc_arg) "InnoPlayer_iOS_SDK/InnoMenusStyle.h>\n" (ERROR) "c" (ERROR) "c" (declaration) "lass InnoPlaylistItem;\n" (type_identifier) "lass " (identifier) "nnoPlaylistItem;" (;) "\n" (comment) "**\n * Configuration object used to create InnoPlayer instance.\n */\n" (ERROR) "interface InnoConfig : NSObject\n\n/**\n * Video URL to play using InnoPlayer.\n */\n@property(nonatomic, nullable, strong) NSString *file;\n\n/**\n * An array of InnoSource objects representing multiple quality levels of a video.\n */\n@property(nonatomic, nullable, strong) NSArray *sources;\n\n/**\n * An array of InnoPlaylistItem objects containing information about different video items to be reproduced in a sequence.\n */\n@property(nonatomic, nullable, strong) NSArray <InnoPlaylistItem *> *playlist;\n\n/**\n * Title (or name) of the video\n *\n * @note Shown in the play button container in the center of the screen, before the video starts to play, in addition to the device lock screen and in the multimedia controls in the multitasking UI\n */\n@property(nonatomic, nullable, strong) NSString *title;\n\n/**\n * The URL of the thumbnail image.\n */\n@property(nonatomic, nullable, strong) NSString *image;\n\n/**\n * A description of your video or audio item.\n */\n@property(nonatomic, nullable, strong) NSString *desc;\n\n/**\n * Unique identifier of this item. Used by advertising, analytics and discovery services\n */\n@property(nonatomic, nullable, strong) NSString *mediaId;\n\n/**\n * adConfig object providing info about ad handling.\n */\n@property(nonatomic, nullable, strong) InnoAdConfig *advertising;\n\n/**\n * A boolean value that determines whether player controls are shown.\n */\n@property(nonatomic) BOOL controls;\n\n/**\n * A boolean value that determines whether video should repeat after it’s done playing.\n */\n@property(nonatomic) BOOL repeat;\n\n/**\n * Configures if the title of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayTitle;\n\n/**\n * Configures if the thumbnail of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayThumbnail;\n\n/**\n * Configures if the description title of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayDescription;\n\n/**\n * A boolean value that determines whether video should start automatically after loading.\n */\n@property(nonatomic) BOOL autostart;\n\n/**\n * Configuration object used to customize the menus.\n */\n@property (nonatomic, retain, readwrite, nullable) InnoMenusStyle * menus;\n\n/**\n * Factory method that creates a InnoConfig object with url of video content.\n */\n- (id _Nonnull)initWithContentURL:(NSString *_Nonnull)url;\n\n@end\n" (ERROR) "i" (type_identifier) "nterface " (ERROR) "nnoConfig : NSObject\n\n/**\n * Video URL to play using InnoPlayer.\n */\n@p" (identifier) "nnoConfig " (:) " " (identifier) "SObject\n" (comment) "**\n * Video URL to play using InnoPlayer.\n */\n" (ERROR) "p" (function_declarator) "roperty(nonatomic, nullable, strong) " (identifier) "roperty(" (parameter_list) "nonatomic, nullable, strong) " (() "n" (identifier) "onatomic," (,) " " (identifier) "ullable," (,) " " (identifier) "trong)" ()) " " (declaration) "SString *file;\n" (type_identifier) "SString " (pointer_declarator) "file;" (*) "f" (identifier) "ile;" (;) "\n" (comment) "**\n * An array of InnoSource objects representing multiple quality levels of a video.\n */\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty(nonatomic, nullable, strong) NSArray *sources;\n" (macro_type_specifier) "roperty(nonatomic, nullable, strong) " (identifier) "roperty(" (() "n" (type_descriptor) "onatomic," (type_identifier) "onatomic," (ERROR) " nullable, strong)" (,) " " (identifier) "ullable," (,) " " (identifier) "trong)" ()) " " (ERROR) "SArray " (identifier) "SArray " (pointer_declarator) "sources;" (*) "s" (identifier) "ources;" (;) "\n" (comment) "**\n * An array of InnoPlaylistItem objects containing information about different video items to be reproduced in a sequence.\n */\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty(nonatomic, nullable, strong) NSArray <InnoPlaylistItem *> *playlist;\n" (macro_type_specifier) "roperty(nonatomic, nullable, strong) " (identifier) "roperty(" (() "n" (type_descriptor) "onatomic," (type_identifier) "onatomic," (ERROR) " nullable, strong)" (,) " " (identifier) "ullable," (,) " " (identifier) "trong)" ()) " " (ERROR) "SArray <InnoPlaylistItem *> " (identifier) "SArray " (<) "I" (identifier) "nnoPlaylistItem " (*) ">" (>) " " (pointer_declarator) "playlist;" (*) "p" (identifier) "laylist;" (;) "\n" (comment) "**\n * Title (or name) of the video\n *\n * @note Shown in the play button container in the center of the screen, before the video starts to play, in addition to the device lock screen and in the multimedia controls in the multitasking UI\n */\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty(nonatomic, nullable, strong) NSString *title;\n" (macro_type_specifier) "roperty(nonatomic, nullable, strong) " (identifier) "roperty(" (() "n" (type_descriptor) "onatomic," (type_identifier) "onatomic," (ERROR) " nullable, strong)" (,) " " (identifier) "ullable," (,) " " (identifier) "trong)" ()) " " (ERROR) "SString " (identifier) "SString " (pointer_declarator) "title;" (*) "t" (identifier) "itle;" (;) "\n" (comment) "**\n * The URL of the thumbnail image.\n */\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty(nonatomic, nullable, strong) NSString *image;\n" (macro_type_specifier) "roperty(nonatomic, nullable, strong) " (identifier) "roperty(" (() "n" (type_descriptor) "onatomic," (type_identifier) "onatomic," (ERROR) " nullable, strong)" (,) " " (identifier) "ullable," (,) " " (identifier) "trong)" ()) " " (ERROR) "SString " (identifier) "SString " (pointer_declarator) "image;" (*) "i" (identifier) "mage;" (;) "\n" (comment) "**\n * A description of your video or audio item.\n */\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty(nonatomic, nullable, strong) NSString *desc;\n" (macro_type_specifier) "roperty(nonatomic, nullable, strong) " (identifier) "roperty(" (() "n" (type_descriptor) "onatomic," (type_identifier) "onatomic," (ERROR) " nullable, strong)" (,) " " (identifier) "ullable," (,) " " (identifier) "trong)" ()) " " (ERROR) "SString " (identifier) "SString " (pointer_declarator) "desc;" (*) "d" (identifier) "esc;" (;) "\n" (comment) "**\n * Unique identifier of this item. Used by advertising, analytics and discovery services\n */\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty(nonatomic, nullable, strong) NSString *mediaId;\n" (macro_type_specifier) "roperty(nonatomic, nullable, strong) " (identifier) "roperty(" (() "n" (type_descriptor) "onatomic," (type_identifier) "onatomic," (ERROR) " nullable, strong)" (,) " " (identifier) "ullable," (,) " " (identifier) "trong)" ()) " " (ERROR) "SString " (identifier) "SString " (pointer_declarator) "mediaId;" (*) "m" (identifier) "ediaId;" (;) "\n" (comment) "**\n * adConfig object providing info about ad handling.\n */\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty(nonatomic, nullable, strong) InnoAdConfig *advertising;\n" (macro_type_specifier) "roperty(nonatomic, nullable, strong) " (identifier) "roperty(" (() "n" (type_descriptor) "onatomic," (type_identifier) "onatomic," (ERROR) " nullable, strong)" (,) " " (identifier) "ullable," (,) " " (identifier) "trong)" ()) " " (ERROR) "nnoAdConfig " (identifier) "nnoAdConfig " (pointer_declarator) "advertising;" (*) "a" (identifier) "dvertising;" (;) "\n" (comment) "**\n * A boolean value that determines whether player controls are shown.\n */\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty(nonatomic) BOOL controls;\n" (macro_type_specifier) "roperty(nonatomic) " (identifier) "roperty(" (() "n" (type_descriptor) "onatomic)" (type_identifier) "onatomic)" ()) " " (ERROR) "OOL " (identifier) "OOL " (identifier) "ontrols;" (;) "\n" (comment) "**\n * A boolean value that determines whether video should repeat after it’s done playing.\n */\n@p" (ERROR) "o" (ERROR) "o" (declaration) "perty(nonatomic) BOOL repeat;\n\n/" (macro_type_specifier) "perty(nonatomic) BO" (identifier) "perty(no" (() "n" (type_descriptor) "atomic) B" (type_identifier) "atomic) B" ()) "O" (ERROR) "L re" (identifier) "L re" (identifier) "eat;\n\n" (;) "/" (comment) "\n * Configures if the title of a media file should be displayed. Defaults to YES.\n */\n@p" (ERROR) "o" (ERROR) "o" (declaration) "perty(nonatomic) BOOL displayTitle;\n\n/" (macro_type_specifier) "perty(nonatomic) BO" (identifier) "perty(no" (() "n" (type_descriptor) "atomic) B" (type_identifier) "atomic) B" ()) "O" (ERROR) "L di" (identifier) "L di" (identifier) "playTitle;\n\n" (;) "/" (comment) "\n * Configures if the thumbnail of a media file should be displayed. Defaults to YES.\n */\n@p" (ERROR) "o" (ERROR) "o" (declaration) "perty(nonatomic) BOOL displayThumbnail;\n\n/" (macro_type_specifier) "perty(nonatomic) BO" (identifier) "perty(no" (() "n" (type_descriptor) "atomic) B" (type_identifier) "atomic) B" ()) "O" (ERROR) "L di" (identifier) "L di" (identifier) "playThumbnail;\n\n" (;) "/" (comment) "\n * Configures if the description title of a media file should be displayed. Defaults to YES.\n */\n@p" (ERROR) "o" (ERROR) "o" (declaration) "perty(nonatomic) BOOL displayDescription;\n\n/" (macro_type_specifier) "perty(nonatomic) BO" (identifier) "perty(no" (() "n" (type_descriptor) "atomic) B" (type_identifier) "atomic) B" ()) "O" (ERROR) "L di" (identifier) "L di" (identifier) "playDescription;\n\n" (;) "/" (comment) "\n * A boolean value that determines whether video should start automatically after loading.\n */\n@p" (ERROR) "o" (ERROR) "o" (declaration) "perty(nonatomic) BOOL autostart;\n\n/" (macro_type_specifier) "perty(nonatomic) BO" (identifier) "perty(no" (() "n" (type_descriptor) "atomic) B" (type_identifier) "atomic) B" ()) "O" (ERROR) "L au" (identifier) "L au" (identifier) "ostart;\n\n" (;) "/" (comment) "\n * Configuration object used to customize the menus.\n */\n@p" (ERROR) "o" (ERROR) "o" (declaration) "perty (nonatomic, retain, readwrite, nullable) InnoMenusStyle * menus;\n\n/" (macro_type_specifier) "perty (nonatomic, retain, readwrite, nullable) In" (identifier) "perty (n" (() "n" (ERROR) "atomic, retain, readwrite, nu" (type_descriptor) "atomic, r" (type_identifier) "atomic, r" (,) "e" (identifier) "ain, r" (,) "e" (type_descriptor) "dwrite, n" (type_identifier) "dwrite, n" (,) "u" (type_descriptor) "lable) I" (type_identifier) "lable) I" ()) "n" (ERROR) "oMenusStyle * " (identifier) "oMenusStyle * " (pointer_declarator) "enus;\n\n" (*) "e" (identifier) "us;\n\n" (;) "/" (comment) "\n * Factory method that creates a InnoConfig object with url of video content.\n */\n- " (ERROR) "id " (-) "i" (() " " (declaration) "_Nonnull)initWithContentURL:(NSString *_Nonnull)url;\n\n@" (type_identifier) "_N" (type_qualifier) "nnull)in" (_Nonnull) "nnull)in" (ERROR) "itWithContentURL:(NSString *_" ()) "i" (identifier) "tWithContentURL:(N" (:) "S" (() "S" (identifier) "tring *_" (pointer_declarator) "onnull)url;\n\n" (*) "o" (type_qualifier) "nnull)ur" (_Nonnull) "nnull)ur" (ERROR) "l" ()) "l" (identifier) ";\n\n" (;) "@" (ERROR) "d" (ERROR) "d" (identifier) "\n"
337
61
{"language": "c", "success": true, "metadata": {"lines": 83, "avg_line_length": 31.95, "nodes": 235, "errors": 0, "source_hash": "97717f312fc5bb1bb85b7438d9d014505e9afed4d1e1326364df5a5a874d0222", "categorized_nodes": 127}, "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 \"InnoPlaylistItem.h\"\n#", "parent": null, "children": [3], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 3, "type": "preproc_arg", "text": "InnoPlaylistItem.h\"\n", "parent": 2, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 28}}, {"id": 4, "type": "preproc_call", "text": "import \"InnoAdConfig.h\"\n#", "parent": null, "children": [5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 5, "type": "preproc_arg", "text": "InnoAdConfig.h\"\n", "parent": 4, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 24}}, {"id": 6, "type": "preproc_call", "text": "import <InnoPlayer_iOS_SDK/InnoMenusStyle.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": "InnoPlayer_iOS_SDK/InnoMenusStyle.h>\n", "parent": 6, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 45}}, {"id": 8, "type": "ERROR", "text": "c", "parent": null, "children": [9], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 9, "type": "ERROR", "text": "c", "parent": 8, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 10, "type": "declaration", "text": "lass InnoPlaylistItem;\n", "parent": null, "children": [11, 12], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 24}}, {"id": 11, "type": "type_identifier", "text": "lass ", "parent": 10, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 6}}, {"id": 12, "type": "identifier", "text": "nnoPlaylistItem;", "parent": 10, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 23}}, {"id": 13, "type": "ERROR", "text": "interface InnoConfig : NSObject\n\n/**\n * Video URL to play using InnoPlayer.\n */\n@property(nonatomic, nullable, strong) NSString *file;\n\n/**\n * An array of InnoSource objects representing multiple quality levels of a video.\n */\n@property(nonatomic, nullable, strong) NSArray *sources;\n\n/**\n * An array of InnoPlaylistItem objects containing information about different video items to be reproduced in a sequence.\n */\n@property(nonatomic, nullable, strong) NSArray <InnoPlaylistItem *> *playlist;\n\n/**\n * Title (or name) of the video\n *\n * @note Shown in the play button container in the center of the screen, before the video starts to play, in addition to the device lock screen and in the multimedia controls in the multitasking UI\n */\n@property(nonatomic, nullable, strong) NSString *title;\n\n/**\n * The URL of the thumbnail image.\n */\n@property(nonatomic, nullable, strong) NSString *image;\n\n/**\n * A description of your video or audio item.\n */\n@property(nonatomic, nullable, strong) NSString *desc;\n\n/**\n * Unique identifier of this item. Used by advertising, analytics and discovery services\n */\n@property(nonatomic, nullable, strong) NSString *mediaId;\n\n/**\n * adConfig object providing info about ad handling.\n */\n@property(nonatomic, nullable, strong) InnoAdConfig *advertising;\n\n/**\n * A boolean value that determines whether player controls are shown.\n */\n@property(nonatomic) BOOL controls;\n\n/**\n * A boolean value that determines whether video should repeat after it\u2019s done playing.\n */\n@property(nonatomic) BOOL repeat;\n\n/**\n * Configures if the title of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayTitle;\n\n/**\n * Configures if the thumbnail of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayThumbnail;\n\n/**\n * Configures if the description title of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayDescription;\n\n/**\n * A boolean value that determines whether video should start automatically after loading.\n */\n@property(nonatomic) BOOL autostart;\n\n/**\n * Configuration object used to customize the menus.\n */\n@property (nonatomic, retain, readwrite, nullable) InnoMenusStyle * menus;\n\n/**\n * Factory method that creates a InnoConfig object with url of video content.\n */\n- (id _Nonnull)initWithContentURL:(NSString *_Nonnull)url;\n\n@end\n", "parent": null, "children": [14, 15, 16, 20, 26, 31, 33, 46, 48, 65, 67, 80, 82, 95, 97, 110, 112, 125, 127, 140, 142, 150, 152, 160, 162, 170, 172, 180, 182, 190, 192, 200, 202, 218, 220, 232, 234], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 102, "column": 4}}, {"id": 14, "type": "ERROR", "text": "i", "parent": 13, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 15, "type": "type_identifier", "text": "nterface ", "parent": 13, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 10}}, {"id": 16, "type": "ERROR", "text": "nnoConfig : NSObject\n\n/**\n * Video URL to play using InnoPlayer.\n */\n@p", "parent": 13, "children": [17, 18, 19], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 23, "column": 1}}, {"id": 17, "type": "identifier", "text": "nnoConfig ", "parent": 16, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 21}}, {"id": 18, "type": "identifier", "text": "SObject\n", "parent": 16, "children": [], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 32}}, {"id": 19, "type": "ERROR", "text": "p", "parent": 16, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 20, "type": "function_declarator", "text": "roperty(nonatomic, nullable, strong) ", "parent": 13, "children": [21, 22], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 38}}, {"id": 21, "type": "identifier", "text": "roperty(", "parent": 20, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 22, "type": "parameter_list", "text": "nonatomic, nullable, strong) ", "parent": 20, "children": [23, 24, 25], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 38}}, {"id": 23, "type": "identifier", "text": "onatomic,", "parent": 22, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 19}}, {"id": 24, "type": "identifier", "text": "ullable,", "parent": 22, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 29}}, {"id": 25, "type": "identifier", "text": "trong)", "parent": 22, "children": [], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 37}}, {"id": 26, "type": "declaration", "text": "SString *file;\n", "parent": 13, "children": [27, 28], "start_point": {"row": 23, "column": 39}, "end_point": {"row": 23, "column": 54}}, {"id": 27, "type": "type_identifier", "text": "SString ", "parent": 26, "children": [], "start_point": {"row": 23, "column": 39}, "end_point": {"row": 23, "column": 47}}, {"id": 28, "type": "pointer_declarator", "text": "file;", "parent": 26, "children": [29, 30], "start_point": {"row": 23, "column": 48}, "end_point": {"row": 23, "column": 53}}, {"id": 29, "type": "*", "text": "f", "parent": 28, "children": [], "start_point": {"row": 23, "column": 48}, "end_point": {"row": 23, "column": 49}}, {"id": 30, "type": "identifier", "text": "ile;", "parent": 28, "children": [], "start_point": {"row": 23, "column": 49}, "end_point": {"row": 23, "column": 53}}, {"id": 31, "type": "ERROR", "text": "p", "parent": 13, "children": [32], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 32, "type": "ERROR", "text": "p", "parent": 31, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 33, "type": "declaration", "text": "roperty(nonatomic, nullable, strong) NSArray *sources;\n", "parent": 13, "children": [34, 41, 43], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 56}}, {"id": 34, "type": "macro_type_specifier", "text": "roperty(nonatomic, nullable, strong) ", "parent": 33, "children": [35, 36, 38], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 38}}, {"id": 35, "type": "identifier", "text": "roperty(", "parent": 34, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 9}}, {"id": 36, "type": "type_descriptor", "text": "onatomic,", "parent": 34, "children": [37], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 19}}, {"id": 37, "type": "type_identifier", "text": "onatomic,", "parent": 36, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 19}}, {"id": 38, "type": "ERROR", "text": " nullable, strong)", "parent": 34, "children": [39, 40], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 37}}, {"id": 39, "type": "identifier", "text": "ullable,", "parent": 38, "children": [], "start_point": {"row": 28, "column": 21}, "end_point": {"row": 28, "column": 29}}, {"id": 40, "type": "identifier", "text": "trong)", "parent": 38, "children": [], "start_point": {"row": 28, "column": 31}, "end_point": {"row": 28, "column": 37}}, {"id": 41, "type": "ERROR", "text": "SArray ", "parent": 33, "children": [42], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 46}}, {"id": 42, "type": "identifier", "text": "SArray ", "parent": 41, "children": [], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 46}}, {"id": 43, "type": "pointer_declarator", "text": "sources;", "parent": 33, "children": [44, 45], "start_point": {"row": 28, "column": 47}, "end_point": {"row": 28, "column": 55}}, {"id": 44, "type": "*", "text": "s", "parent": 43, "children": [], "start_point": {"row": 28, "column": 47}, "end_point": {"row": 28, "column": 48}}, {"id": 45, "type": "identifier", "text": "ources;", "parent": 43, "children": [], "start_point": {"row": 28, "column": 48}, "end_point": {"row": 28, "column": 55}}, {"id": 46, "type": "ERROR", "text": "p", "parent": 13, "children": [47], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 47, "type": "ERROR", "text": "p", "parent": 46, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 48, "type": "declaration", "text": "roperty(nonatomic, nullable, strong) NSArray <InnoPlaylistItem *> *playlist;\n", "parent": 13, "children": [49, 56, 62], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 78}}, {"id": 49, "type": "macro_type_specifier", "text": "roperty(nonatomic, nullable, strong) ", "parent": 48, "children": [50, 51, 53], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 38}}, {"id": 50, "type": "identifier", "text": "roperty(", "parent": 49, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 9}}, {"id": 51, "type": "type_descriptor", "text": "onatomic,", "parent": 49, "children": [52], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 19}}, {"id": 52, "type": "type_identifier", "text": "onatomic,", "parent": 51, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 19}}, {"id": 53, "type": "ERROR", "text": " nullable, strong)", "parent": 49, "children": [54, 55], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 37}}, {"id": 54, "type": "identifier", "text": "ullable,", "parent": 53, "children": [], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 29}}, {"id": 55, "type": "identifier", "text": "trong)", "parent": 53, "children": [], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 37}}, {"id": 56, "type": "ERROR", "text": "SArray <InnoPlaylistItem *> ", "parent": 48, "children": [57, 58, 59, 60, 61], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 67}}, {"id": 57, "type": "identifier", "text": "SArray ", "parent": 56, "children": [], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 46}}, {"id": 58, "type": "<", "text": "I", "parent": 56, "children": [], "start_point": {"row": 33, "column": 47}, "end_point": {"row": 33, "column": 48}}, {"id": 59, "type": "identifier", "text": "nnoPlaylistItem ", "parent": 56, "children": [], "start_point": {"row": 33, "column": 48}, "end_point": {"row": 33, "column": 64}}, {"id": 60, "type": "*", "text": ">", "parent": 56, "children": [], "start_point": {"row": 33, "column": 65}, "end_point": {"row": 33, "column": 66}}, {"id": 61, "type": ">", "text": " ", "parent": 56, "children": [], "start_point": {"row": 33, "column": 66}, "end_point": {"row": 33, "column": 67}}, {"id": 62, "type": "pointer_declarator", "text": "playlist;", "parent": 48, "children": [63, 64], "start_point": {"row": 33, "column": 68}, "end_point": {"row": 33, "column": 77}}, {"id": 63, "type": "*", "text": "p", "parent": 62, "children": [], "start_point": {"row": 33, "column": 68}, "end_point": {"row": 33, "column": 69}}, {"id": 64, "type": "identifier", "text": "laylist;", "parent": 62, "children": [], "start_point": {"row": 33, "column": 69}, "end_point": {"row": 33, "column": 77}}, {"id": 65, "type": "ERROR", "text": "p", "parent": 13, "children": [66], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 66, "type": "ERROR", "text": "p", "parent": 65, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 67, "type": "declaration", "text": "roperty(nonatomic, nullable, strong) NSString *title;\n", "parent": 13, "children": [68, 75, 77], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 55}}, {"id": 68, "type": "macro_type_specifier", "text": "roperty(nonatomic, nullable, strong) ", "parent": 67, "children": [69, 70, 72], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 38}}, {"id": 69, "type": "identifier", "text": "roperty(", "parent": 68, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 9}}, {"id": 70, "type": "type_descriptor", "text": "onatomic,", "parent": 68, "children": [71], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 19}}, {"id": 71, "type": "type_identifier", "text": "onatomic,", "parent": 70, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 19}}, {"id": 72, "type": "ERROR", "text": " nullable, strong)", "parent": 68, "children": [73, 74], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 37}}, {"id": 73, "type": "identifier", "text": "ullable,", "parent": 72, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 29}}, {"id": 74, "type": "identifier", "text": "trong)", "parent": 72, "children": [], "start_point": {"row": 40, "column": 31}, "end_point": {"row": 40, "column": 37}}, {"id": 75, "type": "ERROR", "text": "SString ", "parent": 67, "children": [76], "start_point": {"row": 40, "column": 39}, "end_point": {"row": 40, "column": 47}}, {"id": 76, "type": "identifier", "text": "SString ", "parent": 75, "children": [], "start_point": {"row": 40, "column": 39}, "end_point": {"row": 40, "column": 47}}, {"id": 77, "type": "pointer_declarator", "text": "title;", "parent": 67, "children": [78, 79], "start_point": {"row": 40, "column": 48}, "end_point": {"row": 40, "column": 54}}, {"id": 78, "type": "*", "text": "t", "parent": 77, "children": [], "start_point": {"row": 40, "column": 48}, "end_point": {"row": 40, "column": 49}}, {"id": 79, "type": "identifier", "text": "itle;", "parent": 77, "children": [], "start_point": {"row": 40, "column": 49}, "end_point": {"row": 40, "column": 54}}, {"id": 80, "type": "ERROR", "text": "p", "parent": 13, "children": [81], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 81, "type": "ERROR", "text": "p", "parent": 80, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 82, "type": "declaration", "text": "roperty(nonatomic, nullable, strong) NSString *image;\n", "parent": 13, "children": [83, 90, 92], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 55}}, {"id": 83, "type": "macro_type_specifier", "text": "roperty(nonatomic, nullable, strong) ", "parent": 82, "children": [84, 85, 87], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 38}}, {"id": 84, "type": "identifier", "text": "roperty(", "parent": 83, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 9}}, {"id": 85, "type": "type_descriptor", "text": "onatomic,", "parent": 83, "children": [86], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 19}}, {"id": 86, "type": "type_identifier", "text": "onatomic,", "parent": 85, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 19}}, {"id": 87, "type": "ERROR", "text": " nullable, strong)", "parent": 83, "children": [88, 89], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 37}}, {"id": 88, "type": "identifier", "text": "ullable,", "parent": 87, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 29}}, {"id": 89, "type": "identifier", "text": "trong)", "parent": 87, "children": [], "start_point": {"row": 45, "column": 31}, "end_point": {"row": 45, "column": 37}}, {"id": 90, "type": "ERROR", "text": "SString ", "parent": 82, "children": [91], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 47}}, {"id": 91, "type": "identifier", "text": "SString ", "parent": 90, "children": [], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 47}}, {"id": 92, "type": "pointer_declarator", "text": "image;", "parent": 82, "children": [93, 94], "start_point": {"row": 45, "column": 48}, "end_point": {"row": 45, "column": 54}}, {"id": 93, "type": "*", "text": "i", "parent": 92, "children": [], "start_point": {"row": 45, "column": 48}, "end_point": {"row": 45, "column": 49}}, {"id": 94, "type": "identifier", "text": "mage;", "parent": 92, "children": [], "start_point": {"row": 45, "column": 49}, "end_point": {"row": 45, "column": 54}}, {"id": 95, "type": "ERROR", "text": "p", "parent": 13, "children": [96], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 96, "type": "ERROR", "text": "p", "parent": 95, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 97, "type": "declaration", "text": "roperty(nonatomic, nullable, strong) NSString *desc;\n", "parent": 13, "children": [98, 105, 107], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 54}}, {"id": 98, "type": "macro_type_specifier", "text": "roperty(nonatomic, nullable, strong) ", "parent": 97, "children": [99, 100, 102], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 38}}, {"id": 99, "type": "identifier", "text": "roperty(", "parent": 98, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 9}}, {"id": 100, "type": "type_descriptor", "text": "onatomic,", "parent": 98, "children": [101], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 19}}, {"id": 101, "type": "type_identifier", "text": "onatomic,", "parent": 100, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 19}}, {"id": 102, "type": "ERROR", "text": " nullable, strong)", "parent": 98, "children": [103, 104], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 37}}, {"id": 103, "type": "identifier", "text": "ullable,", "parent": 102, "children": [], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 29}}, {"id": 104, "type": "identifier", "text": "trong)", "parent": 102, "children": [], "start_point": {"row": 50, "column": 31}, "end_point": {"row": 50, "column": 37}}, {"id": 105, "type": "ERROR", "text": "SString ", "parent": 97, "children": [106], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 47}}, {"id": 106, "type": "identifier", "text": "SString ", "parent": 105, "children": [], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 47}}, {"id": 107, "type": "pointer_declarator", "text": "desc;", "parent": 97, "children": [108, 109], "start_point": {"row": 50, "column": 48}, "end_point": {"row": 50, "column": 53}}, {"id": 108, "type": "*", "text": "d", "parent": 107, "children": [], "start_point": {"row": 50, "column": 48}, "end_point": {"row": 50, "column": 49}}, {"id": 109, "type": "identifier", "text": "esc;", "parent": 107, "children": [], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 53}}, {"id": 110, "type": "ERROR", "text": "p", "parent": 13, "children": [111], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 111, "type": "ERROR", "text": "p", "parent": 110, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 112, "type": "declaration", "text": "roperty(nonatomic, nullable, strong) NSString *mediaId;\n", "parent": 13, "children": [113, 120, 122], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 57}}, {"id": 113, "type": "macro_type_specifier", "text": "roperty(nonatomic, nullable, strong) ", "parent": 112, "children": [114, 115, 117], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 38}}, {"id": 114, "type": "identifier", "text": "roperty(", "parent": 113, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 9}}, {"id": 115, "type": "type_descriptor", "text": "onatomic,", "parent": 113, "children": [116], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 19}}, {"id": 116, "type": "type_identifier", "text": "onatomic,", "parent": 115, "children": [], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 19}}, {"id": 117, "type": "ERROR", "text": " nullable, strong)", "parent": 113, "children": [118, 119], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 37}}, {"id": 118, "type": "identifier", "text": "ullable,", "parent": 117, "children": [], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 29}}, {"id": 119, "type": "identifier", "text": "trong)", "parent": 117, "children": [], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 37}}, {"id": 120, "type": "ERROR", "text": "SString ", "parent": 112, "children": [121], "start_point": {"row": 55, "column": 39}, "end_point": {"row": 55, "column": 47}}, {"id": 121, "type": "identifier", "text": "SString ", "parent": 120, "children": [], "start_point": {"row": 55, "column": 39}, "end_point": {"row": 55, "column": 47}}, {"id": 122, "type": "pointer_declarator", "text": "mediaId;", "parent": 112, "children": [123, 124], "start_point": {"row": 55, "column": 48}, "end_point": {"row": 55, "column": 56}}, {"id": 123, "type": "*", "text": "m", "parent": 122, "children": [], "start_point": {"row": 55, "column": 48}, "end_point": {"row": 55, "column": 49}}, {"id": 124, "type": "identifier", "text": "ediaId;", "parent": 122, "children": [], "start_point": {"row": 55, "column": 49}, "end_point": {"row": 55, "column": 56}}, {"id": 125, "type": "ERROR", "text": "p", "parent": 13, "children": [126], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 126, "type": "ERROR", "text": "p", "parent": 125, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 127, "type": "declaration", "text": "roperty(nonatomic, nullable, strong) InnoAdConfig *advertising;\n", "parent": 13, "children": [128, 135, 137], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 65}}, {"id": 128, "type": "macro_type_specifier", "text": "roperty(nonatomic, nullable, strong) ", "parent": 127, "children": [129, 130, 132], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 38}}, {"id": 129, "type": "identifier", "text": "roperty(", "parent": 128, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 9}}, {"id": 130, "type": "type_descriptor", "text": "onatomic,", "parent": 128, "children": [131], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 19}}, {"id": 131, "type": "type_identifier", "text": "onatomic,", "parent": 130, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 19}}, {"id": 132, "type": "ERROR", "text": " nullable, strong)", "parent": 128, "children": [133, 134], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 37}}, {"id": 133, "type": "identifier", "text": "ullable,", "parent": 132, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 29}}, {"id": 134, "type": "identifier", "text": "trong)", "parent": 132, "children": [], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 37}}, {"id": 135, "type": "ERROR", "text": "nnoAdConfig ", "parent": 127, "children": [136], "start_point": {"row": 60, "column": 39}, "end_point": {"row": 60, "column": 51}}, {"id": 136, "type": "identifier", "text": "nnoAdConfig ", "parent": 135, "children": [], "start_point": {"row": 60, "column": 39}, "end_point": {"row": 60, "column": 51}}, {"id": 137, "type": "pointer_declarator", "text": "advertising;", "parent": 127, "children": [138, 139], "start_point": {"row": 60, "column": 52}, "end_point": {"row": 60, "column": 64}}, {"id": 138, "type": "*", "text": "a", "parent": 137, "children": [], "start_point": {"row": 60, "column": 52}, "end_point": {"row": 60, "column": 53}}, {"id": 139, "type": "identifier", "text": "dvertising;", "parent": 137, "children": [], "start_point": {"row": 60, "column": 53}, "end_point": {"row": 60, "column": 64}}, {"id": 140, "type": "ERROR", "text": "p", "parent": 13, "children": [141], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 141, "type": "ERROR", "text": "p", "parent": 140, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 142, "type": "declaration", "text": "roperty(nonatomic) BOOL controls;\n", "parent": 13, "children": [143, 147, 149], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 35}}, {"id": 143, "type": "macro_type_specifier", "text": "roperty(nonatomic) ", "parent": 142, "children": [144, 145], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 20}}, {"id": 144, "type": "identifier", "text": "roperty(", "parent": 143, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 9}}, {"id": 145, "type": "type_descriptor", "text": "onatomic)", "parent": 143, "children": [146], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 19}}, {"id": 146, "type": "type_identifier", "text": "onatomic)", "parent": 145, "children": [], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 19}}, {"id": 147, "type": "ERROR", "text": "OOL ", "parent": 142, "children": [148], "start_point": {"row": 65, "column": 21}, "end_point": {"row": 65, "column": 25}}, {"id": 148, "type": "identifier", "text": "OOL ", "parent": 147, "children": [], "start_point": {"row": 65, "column": 21}, "end_point": {"row": 65, "column": 25}}, {"id": 149, "type": "identifier", "text": "ontrols;", "parent": 142, "children": [], "start_point": {"row": 65, "column": 26}, "end_point": {"row": 65, "column": 34}}, {"id": 150, "type": "ERROR", "text": "o", "parent": 13, "children": [151], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 1}}, {"id": 151, "type": "ERROR", "text": "o", "parent": 150, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 1}}, {"id": 152, "type": "declaration", "text": "perty(nonatomic) BOOL repeat;\n\n/", "parent": 13, "children": [153, 157, 159], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 33}}, {"id": 153, "type": "macro_type_specifier", "text": "perty(nonatomic) BO", "parent": 152, "children": [154, 155], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 20}}, {"id": 154, "type": "identifier", "text": "perty(no", "parent": 153, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 9}}, {"id": 155, "type": "type_descriptor", "text": "atomic) B", "parent": 153, "children": [156], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 19}}, {"id": 156, "type": "type_identifier", "text": "atomic) B", "parent": 155, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 19}}, {"id": 157, "type": "ERROR", "text": "L re", "parent": 152, "children": [158], "start_point": {"row": 70, "column": 21}, "end_point": {"row": 70, "column": 25}}, {"id": 158, "type": "identifier", "text": "L re", "parent": 157, "children": [], "start_point": {"row": 70, "column": 21}, "end_point": {"row": 70, "column": 25}}, {"id": 159, "type": "identifier", "text": "eat;\n\n", "parent": 152, "children": [], "start_point": {"row": 70, "column": 26}, "end_point": {"row": 70, "column": 32}}, {"id": 160, "type": "ERROR", "text": "o", "parent": 13, "children": [161], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 1}}, {"id": 161, "type": "ERROR", "text": "o", "parent": 160, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 1}}, {"id": 162, "type": "declaration", "text": "perty(nonatomic) BOOL displayTitle;\n\n/", "parent": 13, "children": [163, 167, 169], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 39}}, {"id": 163, "type": "macro_type_specifier", "text": "perty(nonatomic) BO", "parent": 162, "children": [164, 165], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 20}}, {"id": 164, "type": "identifier", "text": "perty(no", "parent": 163, "children": [], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 9}}, {"id": 165, "type": "type_descriptor", "text": "atomic) B", "parent": 163, "children": [166], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 19}}, {"id": 166, "type": "type_identifier", "text": "atomic) B", "parent": 165, "children": [], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 19}}, {"id": 167, "type": "ERROR", "text": "L di", "parent": 162, "children": [168], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 25}}, {"id": 168, "type": "identifier", "text": "L di", "parent": 167, "children": [], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 25}}, {"id": 169, "type": "identifier", "text": "playTitle;\n\n", "parent": 162, "children": [], "start_point": {"row": 75, "column": 26}, "end_point": {"row": 75, "column": 38}}, {"id": 170, "type": "ERROR", "text": "o", "parent": 13, "children": [171], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 171, "type": "ERROR", "text": "o", "parent": 170, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 172, "type": "declaration", "text": "perty(nonatomic) BOOL displayThumbnail;\n\n/", "parent": 13, "children": [173, 177, 179], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 43}}, {"id": 173, "type": "macro_type_specifier", "text": "perty(nonatomic) BO", "parent": 172, "children": [174, 175], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 20}}, {"id": 174, "type": "identifier", "text": "perty(no", "parent": 173, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 9}}, {"id": 175, "type": "type_descriptor", "text": "atomic) B", "parent": 173, "children": [176], "start_point": {"row": 80, "column": 10}, "end_point": {"row": 80, "column": 19}}, {"id": 176, "type": "type_identifier", "text": "atomic) B", "parent": 175, "children": [], "start_point": {"row": 80, "column": 10}, "end_point": {"row": 80, "column": 19}}, {"id": 177, "type": "ERROR", "text": "L di", "parent": 172, "children": [178], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 25}}, {"id": 178, "type": "identifier", "text": "L di", "parent": 177, "children": [], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 25}}, {"id": 179, "type": "identifier", "text": "playThumbnail;\n\n", "parent": 172, "children": [], "start_point": {"row": 80, "column": 26}, "end_point": {"row": 80, "column": 42}}, {"id": 180, "type": "ERROR", "text": "o", "parent": 13, "children": [181], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 1}}, {"id": 181, "type": "ERROR", "text": "o", "parent": 180, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 1}}, {"id": 182, "type": "declaration", "text": "perty(nonatomic) BOOL displayDescription;\n\n/", "parent": 13, "children": [183, 187, 189], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 45}}, {"id": 183, "type": "macro_type_specifier", "text": "perty(nonatomic) BO", "parent": 182, "children": [184, 185], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 20}}, {"id": 184, "type": "identifier", "text": "perty(no", "parent": 183, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 9}}, {"id": 185, "type": "type_descriptor", "text": "atomic) B", "parent": 183, "children": [186], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 19}}, {"id": 186, "type": "type_identifier", "text": "atomic) B", "parent": 185, "children": [], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 19}}, {"id": 187, "type": "ERROR", "text": "L di", "parent": 182, "children": [188], "start_point": {"row": 85, "column": 21}, "end_point": {"row": 85, "column": 25}}, {"id": 188, "type": "identifier", "text": "L di", "parent": 187, "children": [], "start_point": {"row": 85, "column": 21}, "end_point": {"row": 85, "column": 25}}, {"id": 189, "type": "identifier", "text": "playDescription;\n\n", "parent": 182, "children": [], "start_point": {"row": 85, "column": 26}, "end_point": {"row": 85, "column": 44}}, {"id": 190, "type": "ERROR", "text": "o", "parent": 13, "children": [191], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 1}}, {"id": 191, "type": "ERROR", "text": "o", "parent": 190, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 1}}, {"id": 192, "type": "declaration", "text": "perty(nonatomic) BOOL autostart;\n\n/", "parent": 13, "children": [193, 197, 199], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 36}}, {"id": 193, "type": "macro_type_specifier", "text": "perty(nonatomic) BO", "parent": 192, "children": [194, 195], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 20}}, {"id": 194, "type": "identifier", "text": "perty(no", "parent": 193, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 9}}, {"id": 195, "type": "type_descriptor", "text": "atomic) B", "parent": 193, "children": [196], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 19}}, {"id": 196, "type": "type_identifier", "text": "atomic) B", "parent": 195, "children": [], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 19}}, {"id": 197, "type": "ERROR", "text": "L au", "parent": 192, "children": [198], "start_point": {"row": 90, "column": 21}, "end_point": {"row": 90, "column": 25}}, {"id": 198, "type": "identifier", "text": "L au", "parent": 197, "children": [], "start_point": {"row": 90, "column": 21}, "end_point": {"row": 90, "column": 25}}, {"id": 199, "type": "identifier", "text": "ostart;\n\n", "parent": 192, "children": [], "start_point": {"row": 90, "column": 26}, "end_point": {"row": 90, "column": 35}}, {"id": 200, "type": "ERROR", "text": "o", "parent": 13, "children": [201], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 1}}, {"id": 201, "type": "ERROR", "text": "o", "parent": 200, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 1}}, {"id": 202, "type": "declaration", "text": "perty (nonatomic, retain, readwrite, nullable) InnoMenusStyle * menus;\n\n/", "parent": 13, "children": [203, 213, 215], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 74}}, {"id": 203, "type": "macro_type_specifier", "text": "perty (nonatomic, retain, readwrite, nullable) In", "parent": 202, "children": [204, 205, 211], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 50}}, {"id": 204, "type": "identifier", "text": "perty (n", "parent": 203, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 9}}, {"id": 205, "type": "ERROR", "text": "atomic, retain, readwrite, nu", "parent": 203, "children": [206, 208, 209], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 40}}, {"id": 206, "type": "type_descriptor", "text": "atomic, r", "parent": 205, "children": [207], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 20}}, {"id": 207, "type": "type_identifier", "text": "atomic, r", "parent": 206, "children": [], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 20}}, {"id": 208, "type": "identifier", "text": "ain, r", "parent": 205, "children": [], "start_point": {"row": 95, "column": 22}, "end_point": {"row": 95, "column": 28}}, {"id": 209, "type": "type_descriptor", "text": "dwrite, n", "parent": 205, "children": [210], "start_point": {"row": 95, "column": 30}, "end_point": {"row": 95, "column": 39}}, {"id": 210, "type": "type_identifier", "text": "dwrite, n", "parent": 209, "children": [], "start_point": {"row": 95, "column": 30}, "end_point": {"row": 95, "column": 39}}, {"id": 211, "type": "type_descriptor", "text": "lable) I", "parent": 203, "children": [212], "start_point": {"row": 95, "column": 41}, "end_point": {"row": 95, "column": 49}}, {"id": 212, "type": "type_identifier", "text": "lable) I", "parent": 211, "children": [], "start_point": {"row": 95, "column": 41}, "end_point": {"row": 95, "column": 49}}, {"id": 213, "type": "ERROR", "text": "oMenusStyle * ", "parent": 202, "children": [214], "start_point": {"row": 95, "column": 51}, "end_point": {"row": 95, "column": 65}}, {"id": 214, "type": "identifier", "text": "oMenusStyle * ", "parent": 213, "children": [], "start_point": {"row": 95, "column": 51}, "end_point": {"row": 95, "column": 65}}, {"id": 215, "type": "pointer_declarator", "text": "enus;\n\n", "parent": 202, "children": [216, 217], "start_point": {"row": 95, "column": 66}, "end_point": {"row": 95, "column": 73}}, {"id": 216, "type": "*", "text": "e", "parent": 215, "children": [], "start_point": {"row": 95, "column": 66}, "end_point": {"row": 95, "column": 67}}, {"id": 217, "type": "identifier", "text": "us;\n\n", "parent": 215, "children": [], "start_point": {"row": 95, "column": 68}, "end_point": {"row": 95, "column": 73}}, {"id": 218, "type": "ERROR", "text": "id ", "parent": 13, "children": [219], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 3}}, {"id": 219, "type": "-", "text": "i", "parent": 218, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 1}}, {"id": 220, "type": "declaration", "text": "_Nonnull)initWithContentURL:(NSString *_Nonnull)url;\n\n@", "parent": 13, "children": [221, 222, 224, 227], "start_point": {"row": 100, "column": 3}, "end_point": {"row": 100, "column": 58}}, {"id": 221, "type": "type_identifier", "text": "_N", "parent": 220, "children": [], "start_point": {"row": 100, "column": 3}, "end_point": {"row": 100, "column": 5}}, {"id": 222, "type": "type_qualifier", "text": "nnull)in", "parent": 220, "children": [223], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 14}}, {"id": 223, "type": "_Nonnull", "text": "nnull)in", "parent": 222, "children": [], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 14}}, {"id": 224, "type": "ERROR", "text": "itWithContentURL:(NSString *_", "parent": 220, "children": [225, 226], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 43}}, {"id": 225, "type": "identifier", "text": "tWithContentURL:(N", "parent": 224, "children": [], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 33}}, {"id": 226, "type": "identifier", "text": "tring *_", "parent": 224, "children": [], "start_point": {"row": 100, "column": 35}, "end_point": {"row": 100, "column": 43}}, {"id": 227, "type": "pointer_declarator", "text": "onnull)url;\n\n", "parent": 220, "children": [228, 229, 231], "start_point": {"row": 100, "column": 44}, "end_point": {"row": 100, "column": 57}}, {"id": 228, "type": "*", "text": "o", "parent": 227, "children": [], "start_point": {"row": 100, "column": 44}, "end_point": {"row": 100, "column": 45}}, {"id": 229, "type": "type_qualifier", "text": "nnull)ur", "parent": 227, "children": [230], "start_point": {"row": 100, "column": 45}, "end_point": {"row": 100, "column": 53}}, {"id": 230, "type": "_Nonnull", "text": "nnull)ur", "parent": 229, "children": [], "start_point": {"row": 100, "column": 45}, "end_point": {"row": 100, "column": 53}}, {"id": 231, "type": "ERROR", "text": "l", "parent": 227, "children": [], "start_point": {"row": 100, "column": 53}, "end_point": {"row": 100, "column": 54}}, {"id": 232, "type": "ERROR", "text": "d", "parent": 13, "children": [233], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 1}}, {"id": 233, "type": "ERROR", "text": "d", "parent": 232, "children": [], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 1}}, {"id": 234, "type": "identifier", "text": "\n", "parent": 13, "children": [], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 4}}]}, "node_categories": {"declarations": {"functions": [20], "variables": [10, 26, 33, 48, 67, 82, 97, 112, 127, 142, 152, 162, 172, 182, 192, 202, 220], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [11, 12, 15, 17, 18, 21, 23, 24, 25, 27, 30, 34, 35, 37, 39, 40, 42, 45, 49, 50, 52, 54, 55, 57, 59, 64, 68, 69, 71, 73, 74, 76, 79, 83, 84, 86, 88, 89, 91, 94, 98, 99, 101, 103, 104, 106, 109, 113, 114, 116, 118, 119, 121, 124, 128, 129, 131, 133, 134, 136, 139, 143, 144, 146, 148, 149, 153, 154, 156, 158, 159, 163, 164, 166, 168, 169, 173, 174, 176, 178, 179, 183, 184, 186, 188, 189, 193, 194, 196, 198, 199, 203, 204, 207, 208, 210, 212, 214, 217, 221, 222, 225, 226, 229, 234], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 2, 4, 6], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "roperty(nonatomic, nullable, strong) "}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// InnoConfig.h\n// InnoPlayer_iOS_SDK\n//\n// Created by <NAME> on 03/09/20.\n// Copyright \u00a9 2020 MNC Innovation Center. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import \"InnoPlaylistItem.h\"\n#import \"InnoAdConfig.h\"\n#import <InnoPlayer_iOS_SDK/InnoMenusStyle.h>\n\n@class InnoPlaylistItem;\n\n/**\n * Configuration object used to create InnoPlayer instance.\n */\n@interface InnoConfig : NSObject\n\n/**\n * Video URL to play using InnoPlayer.\n */\n@property(nonatomic, nullable, strong) NSString *file;\n\n/**\n * An array of InnoSource objects representing multiple quality levels of a video.\n */\n@property(nonatomic, nullable, strong) NSArray *sources;\n\n/**\n * An array of InnoPlaylistItem objects containing information about different video items to be reproduced in a sequence.\n */\n@property(nonatomic, nullable, strong) NSArray <InnoPlaylistItem *> *playlist;\n\n/**\n * Title (or name) of the video\n *\n * @note Shown in the play button container in the center of the screen, before the video starts to play, in addition to the device lock screen and in the multimedia controls in the multitasking UI\n */\n@property(nonatomic, nullable, strong) NSString *title;\n\n/**\n * The URL of the thumbnail image.\n */\n@property(nonatomic, nullable, strong) NSString *image;\n\n/**\n * A description of your video or audio item.\n */\n@property(nonatomic, nullable, strong) NSString *desc;\n\n/**\n * Unique identifier of this item. Used by advertising, analytics and discovery services\n */\n@property(nonatomic, nullable, strong) NSString *mediaId;\n\n/**\n * adConfig object providing info about ad handling.\n */\n@property(nonatomic, nullable, strong) InnoAdConfig *advertising;\n\n/**\n * A boolean value that determines whether player controls are shown.\n */\n@property(nonatomic) BOOL controls;\n\n/**\n * A boolean value that determines whether video should repeat after it\u2019s done playing.\n */\n@property(nonatomic) BOOL repeat;\n\n/**\n * Configures if the title of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayTitle;\n\n/**\n * Configures if the thumbnail of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayThumbnail;\n\n/**\n * Configures if the description title of a media file should be displayed. Defaults to YES.\n */\n@property(nonatomic) BOOL displayDescription;\n\n/**\n * A boolean value that determines whether video should start automatically after loading.\n */\n@property(nonatomic) BOOL autostart;\n\n/**\n * Configuration object used to customize the menus.\n */\n@property (nonatomic, retain, readwrite, nullable) InnoMenusStyle * menus;\n\n/**\n * Factory method that creates a InnoConfig object with url of video content.\n */\n- (id _Nonnull)initWithContentURL:(NSString *_Nonnull)url;\n\n@end\n"}
351
c
/* * Copyright (C) 2019-2020 Alibaba Group Holding Limited */ /****************************************************************************** * @file reboot.c * @brief source file for the reboot * @version V1.0 * @date 04. April 2019 ******************************************************************************/ #include <sysctrl.h> #include <soc.h> #include <csi_core.h> void drv_reboot(int cmd) { uint32_t sys_ctr2; (void)cmd; __disable_irq(); silan_sysctl_reg_t *sysctl = (silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE; sysctl->SYS_LOCK = SYS_LOCK_UNLOCK_MAGIC; sysctl->WDT_TG = 5000; sys_ctr2 = sysctl->SYS_CTR2; sys_ctr2 |= SYS_CTL2_WDT_RESET_EN_Msk; sysctl->SYS_CTR2 = sys_ctr2; sysctl->SYS_LOCK = SYS_LOCK_LOCK_MAGIC; while(1); }
29.62
26
(translation_unit) "/*\n * Copyright (C) 2019-2020 Alibaba Group Holding Limited\n */\n\n/******************************************************************************\n * @file reboot.c\n * @brief source file for the reboot\n * @version V1.0\n * @date 04. April 2019\n ******************************************************************************/\n\n#include <sysctrl.h>\n#include <soc.h>\n#include <csi_core.h>\n\nvoid drv_reboot(int cmd)\n{\n uint32_t sys_ctr2;\n\n (void)cmd;\n\n __disable_irq();\n\n silan_sysctl_reg_t *sysctl = (silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE;\n\n sysctl->SYS_LOCK = SYS_LOCK_UNLOCK_MAGIC;\n sysctl->WDT_TG = 5000;\n\n sys_ctr2 = sysctl->SYS_CTR2;\n sys_ctr2 |= SYS_CTL2_WDT_RESET_EN_Msk;\n sysctl->SYS_CTR2 = sys_ctr2;\n\n sysctl->SYS_LOCK = SYS_LOCK_LOCK_MAGIC;\n\n while(1);\n}\n" (comment) "/*\n * Copyright (C) 2019-2020 Alibaba Group Holding Limited\n */" (comment) "/******************************************************************************\n * @file reboot.c\n * @brief source file for the reboot\n * @version V1.0\n * @date 04. April 2019\n ******************************************************************************/" (preproc_include) "#include <sysctrl.h>\n" (#include) "#include" (system_lib_string) "<sysctrl.h>" (preproc_include) "#include <soc.h>\n" (#include) "#include" (system_lib_string) "<soc.h>" (preproc_include) "#include <csi_core.h>\n" (#include) "#include" (system_lib_string) "<csi_core.h>" (function_definition) "void drv_reboot(int cmd)\n{\n uint32_t sys_ctr2;\n\n (void)cmd;\n\n __disable_irq();\n\n silan_sysctl_reg_t *sysctl = (silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE;\n\n sysctl->SYS_LOCK = SYS_LOCK_UNLOCK_MAGIC;\n sysctl->WDT_TG = 5000;\n\n sys_ctr2 = sysctl->SYS_CTR2;\n sys_ctr2 |= SYS_CTL2_WDT_RESET_EN_Msk;\n sysctl->SYS_CTR2 = sys_ctr2;\n\n sysctl->SYS_LOCK = SYS_LOCK_LOCK_MAGIC;\n\n while(1);\n}" (primitive_type) "void" (function_declarator) "drv_reboot(int cmd)" (identifier) "drv_reboot" (parameter_list) "(int cmd)" (() "(" (parameter_declaration) "int cmd" (primitive_type) "int" (identifier) "cmd" ()) ")" (compound_statement) "{\n uint32_t sys_ctr2;\n\n (void)cmd;\n\n __disable_irq();\n\n silan_sysctl_reg_t *sysctl = (silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE;\n\n sysctl->SYS_LOCK = SYS_LOCK_UNLOCK_MAGIC;\n sysctl->WDT_TG = 5000;\n\n sys_ctr2 = sysctl->SYS_CTR2;\n sys_ctr2 |= SYS_CTL2_WDT_RESET_EN_Msk;\n sysctl->SYS_CTR2 = sys_ctr2;\n\n sysctl->SYS_LOCK = SYS_LOCK_LOCK_MAGIC;\n\n while(1);\n}" ({) "{" (declaration) "uint32_t sys_ctr2;" (primitive_type) "uint32_t" (identifier) "sys_ctr2" (;) ";" (expression_statement) "(void)cmd;" (cast_expression) "(void)cmd" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "cmd" (;) ";" (expression_statement) "__disable_irq();" (call_expression) "__disable_irq()" (identifier) "__disable_irq" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "silan_sysctl_reg_t *sysctl = (silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE;" (type_identifier) "silan_sysctl_reg_t" (init_declarator) "*sysctl = (silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE" (pointer_declarator) "*sysctl" (*) "*" (identifier) "sysctl" (=) "=" (cast_expression) "(silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE" (() "(" (type_descriptor) "silan_sysctl_reg_t *" (type_identifier) "silan_sysctl_reg_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "SILAN_SYSCTRL_BASE" (;) ";" (expression_statement) "sysctl->SYS_LOCK = SYS_LOCK_UNLOCK_MAGIC;" (assignment_expression) "sysctl->SYS_LOCK = SYS_LOCK_UNLOCK_MAGIC" (field_expression) "sysctl->SYS_LOCK" (identifier) "sysctl" (->) "->" (field_identifier) "SYS_LOCK" (=) "=" (identifier) "SYS_LOCK_UNLOCK_MAGIC" (;) ";" (expression_statement) "sysctl->WDT_TG = 5000;" (assignment_expression) "sysctl->WDT_TG = 5000" (field_expression) "sysctl->WDT_TG" (identifier) "sysctl" (->) "->" (field_identifier) "WDT_TG" (=) "=" (number_literal) "5000" (;) ";" (expression_statement) "sys_ctr2 = sysctl->SYS_CTR2;" (assignment_expression) "sys_ctr2 = sysctl->SYS_CTR2" (identifier) "sys_ctr2" (=) "=" (field_expression) "sysctl->SYS_CTR2" (identifier) "sysctl" (->) "->" (field_identifier) "SYS_CTR2" (;) ";" (expression_statement) "sys_ctr2 |= SYS_CTL2_WDT_RESET_EN_Msk;" (assignment_expression) "sys_ctr2 |= SYS_CTL2_WDT_RESET_EN_Msk" (identifier) "sys_ctr2" (|=) "|=" (identifier) "SYS_CTL2_WDT_RESET_EN_Msk" (;) ";" (expression_statement) "sysctl->SYS_CTR2 = sys_ctr2;" (assignment_expression) "sysctl->SYS_CTR2 = sys_ctr2" (field_expression) "sysctl->SYS_CTR2" (identifier) "sysctl" (->) "->" (field_identifier) "SYS_CTR2" (=) "=" (identifier) "sys_ctr2" (;) ";" (expression_statement) "sysctl->SYS_LOCK = SYS_LOCK_LOCK_MAGIC;" (assignment_expression) "sysctl->SYS_LOCK = SYS_LOCK_LOCK_MAGIC" (field_expression) "sysctl->SYS_LOCK" (identifier) "sysctl" (->) "->" (field_identifier) "SYS_LOCK" (=) "=" (identifier) "SYS_LOCK_LOCK_MAGIC" (;) ";" (while_statement) "while(1);" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (expression_statement) ";" (;) ";" (}) "}"
119
0
{"language": "c", "success": true, "metadata": {"lines": 26, "avg_line_length": 29.62, "nodes": 77, "errors": 0, "source_hash": "ebbfa33f20ccbf9fa0e719083f517f1c27c64f909fabd729af549962ec34b38d", "categorized_nodes": 57}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <sysctrl.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<sysctrl.h>", "parent": 0, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 20}}, {"id": 3, "type": "preproc_include", "text": "#include <soc.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<soc.h>", "parent": 3, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include <csi_core.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<csi_core.h>", "parent": 6, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 21}}, {"id": 9, "type": "function_definition", "text": "void drv_reboot(int cmd)\n{\n uint32_t sys_ctr2;\n\n (void)cmd;\n\n __disable_irq();\n\n silan_sysctl_reg_t *sysctl = (silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE;\n\n sysctl->SYS_LOCK = SYS_LOCK_UNLOCK_MAGIC;\n sysctl->WDT_TG = 5000;\n\n sys_ctr2 = sysctl->SYS_CTR2;\n sys_ctr2 |= SYS_CTL2_WDT_RESET_EN_Msk;\n sysctl->SYS_CTR2 = sys_ctr2;\n\n sysctl->SYS_LOCK = SYS_LOCK_LOCK_MAGIC;\n\n while(1);\n}", "parent": null, "children": [10, 11], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 10, "type": "primitive_type", "text": "void", "parent": 9, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 4}}, {"id": 11, "type": "function_declarator", "text": "drv_reboot(int cmd)", "parent": 9, "children": [12, 13], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 24}}, {"id": 12, "type": "identifier", "text": "drv_reboot", "parent": 11, "children": [], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 15}}, {"id": 13, "type": "parameter_list", "text": "(int cmd)", "parent": 11, "children": [14], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 24}}, {"id": 14, "type": "parameter_declaration", "text": "int cmd", "parent": 13, "children": [15, 16], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 23}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 19}}, {"id": 16, "type": "identifier", "text": "cmd", "parent": 14, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 23}}, {"id": 17, "type": "declaration", "text": "uint32_t sys_ctr2;", "parent": 9, "children": [18, 19], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 22}}, {"id": 18, "type": "primitive_type", "text": "uint32_t", "parent": 17, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 12}}, {"id": 19, "type": "identifier", "text": "sys_ctr2", "parent": 17, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 21}}, {"id": 20, "type": "cast_expression", "text": "(void)cmd", "parent": 9, "children": [21, 23], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 13}}, {"id": 21, "type": "type_descriptor", "text": "void", "parent": 20, "children": [22], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 9}}, {"id": 22, "type": "primitive_type", "text": "void", "parent": 21, "children": [], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 9}}, {"id": 23, "type": "identifier", "text": "cmd", "parent": 20, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 13}}, {"id": 24, "type": "call_expression", "text": "__disable_irq()", "parent": 9, "children": [25, 26], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 19}}, {"id": 25, "type": "identifier", "text": "__disable_irq", "parent": 24, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 17}}, {"id": 26, "type": "argument_list", "text": "()", "parent": 24, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 19}}, {"id": 27, "type": "declaration", "text": "silan_sysctl_reg_t *sysctl = (silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE;", "parent": 9, "children": [28, 29], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 74}}, {"id": 28, "type": "type_identifier", "text": "silan_sysctl_reg_t", "parent": 27, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 22}}, {"id": 29, "type": "init_declarator", "text": "*sysctl = (silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE", "parent": 27, "children": [30, 33, 34], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 73}}, {"id": 30, "type": "pointer_declarator", "text": "*sysctl", "parent": 29, "children": [31, 32], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 30}}, {"id": 31, "type": "*", "text": "*", "parent": 30, "children": [], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 24}}, {"id": 32, "type": "identifier", "text": "sysctl", "parent": 30, "children": [], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 30}}, {"id": 33, "type": "=", "text": "=", "parent": 29, "children": [], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 32}}, {"id": 34, "type": "cast_expression", "text": "(silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE", "parent": 29, "children": [35, 39], "start_point": {"row": 23, "column": 33}, "end_point": {"row": 23, "column": 73}}, {"id": 35, "type": "type_descriptor", "text": "silan_sysctl_reg_t *", "parent": 34, "children": [36, 37], "start_point": {"row": 23, "column": 34}, "end_point": {"row": 23, "column": 54}}, {"id": 36, "type": "type_identifier", "text": "silan_sysctl_reg_t", "parent": 35, "children": [], "start_point": {"row": 23, "column": 34}, "end_point": {"row": 23, "column": 52}}, {"id": 37, "type": "abstract_pointer_declarator", "text": "*", "parent": 35, "children": [38], "start_point": {"row": 23, "column": 53}, "end_point": {"row": 23, "column": 54}}, {"id": 38, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 23, "column": 53}, "end_point": {"row": 23, "column": 54}}, {"id": 39, "type": "identifier", "text": "SILAN_SYSCTRL_BASE", "parent": 34, "children": [], "start_point": {"row": 23, "column": 55}, "end_point": {"row": 23, "column": 73}}, {"id": 40, "type": "assignment_expression", "text": "sysctl->SYS_LOCK = SYS_LOCK_UNLOCK_MAGIC", "parent": 9, "children": [41, 44, 45], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 44}}, {"id": 41, "type": "field_expression", "text": "sysctl->SYS_LOCK", "parent": 40, "children": [42, 43], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 20}}, {"id": 42, "type": "identifier", "text": "sysctl", "parent": 41, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 10}}, {"id": 43, "type": "field_identifier", "text": "SYS_LOCK", "parent": 41, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 20}}, {"id": 44, "type": "=", "text": "=", "parent": 40, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 22}}, {"id": 45, "type": "identifier", "text": "SYS_LOCK_UNLOCK_MAGIC", "parent": 40, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 44}}, {"id": 46, "type": "assignment_expression", "text": "sysctl->WDT_TG = 5000", "parent": 9, "children": [47, 50, 51], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 25}}, {"id": 47, "type": "field_expression", "text": "sysctl->WDT_TG", "parent": 46, "children": [48, 49], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 18}}, {"id": 48, "type": "identifier", "text": "sysctl", "parent": 47, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 10}}, {"id": 49, "type": "field_identifier", "text": "WDT_TG", "parent": 47, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 18}}, {"id": 50, "type": "=", "text": "=", "parent": 46, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 20}}, {"id": 51, "type": "number_literal", "text": "5000", "parent": 46, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 25}}, {"id": 52, "type": "assignment_expression", "text": "sys_ctr2 = sysctl->SYS_CTR2", "parent": 9, "children": [53, 54, 55], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 31}}, {"id": 53, "type": "identifier", "text": "sys_ctr2", "parent": 52, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 12}}, {"id": 54, "type": "=", "text": "=", "parent": 52, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 14}}, {"id": 55, "type": "field_expression", "text": "sysctl->SYS_CTR2", "parent": 52, "children": [56, 57], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 31}}, {"id": 56, "type": "identifier", "text": "sysctl", "parent": 55, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 21}}, {"id": 57, "type": "field_identifier", "text": "SYS_CTR2", "parent": 55, "children": [], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 31}}, {"id": 58, "type": "assignment_expression", "text": "sys_ctr2 |= SYS_CTL2_WDT_RESET_EN_Msk", "parent": 9, "children": [59, 60, 61], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 41}}, {"id": 59, "type": "identifier", "text": "sys_ctr2", "parent": 58, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 12}}, {"id": 60, "type": "|=", "text": "|=", "parent": 58, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 15}}, {"id": 61, "type": "identifier", "text": "SYS_CTL2_WDT_RESET_EN_Msk", "parent": 58, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 41}}, {"id": 62, "type": "assignment_expression", "text": "sysctl->SYS_CTR2 = sys_ctr2", "parent": 9, "children": [63, 66, 67], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 31}}, {"id": 63, "type": "field_expression", "text": "sysctl->SYS_CTR2", "parent": 62, "children": [64, 65], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 20}}, {"id": 64, "type": "identifier", "text": "sysctl", "parent": 63, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 10}}, {"id": 65, "type": "field_identifier", "text": "SYS_CTR2", "parent": 63, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 20}}, {"id": 66, "type": "=", "text": "=", "parent": 62, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 22}}, {"id": 67, "type": "identifier", "text": "sys_ctr2", "parent": 62, "children": [], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 31}}, {"id": 68, "type": "assignment_expression", "text": "sysctl->SYS_LOCK = SYS_LOCK_LOCK_MAGIC", "parent": 9, "children": [69, 72, 73], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 42}}, {"id": 69, "type": "field_expression", "text": "sysctl->SYS_LOCK", "parent": 68, "children": [70, 71], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 20}}, {"id": 70, "type": "identifier", "text": "sysctl", "parent": 69, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 10}}, {"id": 71, "type": "field_identifier", "text": "SYS_LOCK", "parent": 69, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 20}}, {"id": 72, "type": "=", "text": "=", "parent": 68, "children": [], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 22}}, {"id": 73, "type": "identifier", "text": "SYS_LOCK_LOCK_MAGIC", "parent": 68, "children": [], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 42}}, {"id": 74, "type": "while_statement", "text": "while(1);", "parent": 9, "children": [75], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 13}}, {"id": 75, "type": "parenthesized_expression", "text": "(1)", "parent": 74, "children": [76], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 12}}, {"id": 76, "type": "number_literal", "text": "1", "parent": 75, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 11}}]}, "node_categories": {"declarations": {"functions": [9, 11], "variables": [14, 17, 27], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [20, 24, 34, 41, 47, 55, 63, 69, 75], "assignments": [40, 46, 52, 58, 62, 68], "loops": [74], "conditionals": [12, 16, 19, 23, 25, 28, 32, 36, 39, 42, 43, 45, 48, 49, 53, 56, 57, 59, 61, 64, 65, 67, 70, 71, 73], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 51, 76], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "drv_reboot", "text_snippet": "void drv_reboot(int cmd)\n{\n uint32_t sys_ctr2;\n\n (void)cmd;\n\n __disable_irq();\n\n silan_s"}, {"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "drv_reboot(int cmd)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <sysctrl.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <soc.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <csi_core.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (C) 2019-2020 Alibaba Group Holding Limited\n */\n\n/******************************************************************************\n * @file reboot.c\n * @brief source file for the reboot\n * @version V1.0\n * @date 04. April 2019\n ******************************************************************************/\n\n#include <sysctrl.h>\n#include <soc.h>\n#include <csi_core.h>\n\nvoid drv_reboot(int cmd)\n{\n uint32_t sys_ctr2;\n\n (void)cmd;\n\n __disable_irq();\n\n silan_sysctl_reg_t *sysctl = (silan_sysctl_reg_t *)SILAN_SYSCTRL_BASE;\n\n sysctl->SYS_LOCK = SYS_LOCK_UNLOCK_MAGIC;\n sysctl->WDT_TG = 5000;\n\n sys_ctr2 = sysctl->SYS_CTR2;\n sys_ctr2 |= SYS_CTL2_WDT_RESET_EN_Msk;\n sysctl->SYS_CTR2 = sys_ctr2;\n\n sysctl->SYS_LOCK = SYS_LOCK_LOCK_MAGIC;\n\n while(1);\n}\n"}
352
c
// // InfoImportantNewsViewController.h // PanGu // // Created by 张琦 on 2017/7/10. // Copyright © 2017年 Security Pacific Corporation. All rights reserved. // #import "BaseViewController.h" #import "LoopScrollView.h" @interface InfoImportantNewsViewController : BaseViewController @end
23.17
12
(translation_unit) "//\n// InfoImportantNewsViewController.h\n// PanGu\n//\n// Created by 张琦 on 2017/7/10.\n// Copyright © 2017年 Security Pacific Corporation. All rights reserved.\n//\n\n#import "BaseViewController.h"\n#import "LoopScrollView.h"\n\n@interface InfoImportantNewsViewController : BaseViewController\n\n\n\n@end\n" (comment) "//" (comment) "// InfoImportantNewsViewController.h" (comment) "// PanGu" (comment) "//" (comment) "// Created by 张琦 on 2017/7/10.\n// " (comment) "Copyright © 2017年 Security Pacific Corporation. All rights reserved.\n//\n\n#i" (comment) "po" (preproc_call) " "BaseViewController.h"\n#import" (preproc_directive) " "BaseV" (preproc_arg) "ewController.h"\n#impor" (preproc_call) " "LoopScrollView.h"\n\n@inter" (preproc_directive) " "LoopS" (preproc_arg) "rollView.h"\n\n@inte" (ERROR) "ace InfoImportantNewsViewController : BaseViewController\n\n\n\n@end\n" (ERROR) "a" (type_identifier) "ce InfoIm" (identifier) "ortantNewsViewController : Base" (:) "i" (identifier) "wController\n\n\n\n@en" (ERROR) "" (identifier) ""
22
3
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 23.17, "nodes": 13, "errors": 0, "source_hash": "6262328887e1b7700ec28d510248fa218d50051986876c11afb055e7f120d553", "categorized_nodes": 6}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": " \"BaseViewController.h\"\n#import", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": " \"BaseV", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "ewController.h\"\n#impor", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 30}}, {"id": 3, "type": "preproc_call", "text": " \"LoopScrollView.h\"\n\n@inter", "parent": null, "children": [4, 5], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": " \"LoopS", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "rollView.h\"\n\n@inte", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 26}}, {"id": 6, "type": "ERROR", "text": "ace InfoImportantNewsViewController : BaseViewController\n\n\n\n@end\n", "parent": null, "children": [7, 8, 9, 10, 11, 12], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 15, "column": 4}}, {"id": 7, "type": "ERROR", "text": "a", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 8, "type": "type_identifier", "text": "ce InfoIm", "parent": 6, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 9, "type": "identifier", "text": "ortantNewsViewController : Base", "parent": 6, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 42}}, {"id": 10, "type": "identifier", "text": "wController\n\n\n\n@en", "parent": 6, "children": [], "start_point": {"row": 11, "column": 45}, "end_point": {"row": 11, "column": 63}}, {"id": 11, "type": "ERROR", "text": "", "parent": 6, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 12, "type": "identifier", "text": "", "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// InfoImportantNewsViewController.h\n// PanGu\n//\n// Created by \u5f20\u7426 on 2017/7/10.\n// Copyright \u00a9 2017\u5e74 Security Pacific Corporation. All rights reserved.\n//\n\n#import \"BaseViewController.h\"\n#import \"LoopScrollView.h\"\n\n@interface InfoImportantNewsViewController : BaseViewController\n\n\n\n@end\n"}
353
c
/** * This header is generated by class-dump-z 0.2a. * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3. * * Source: (null) */ #import "PBMessageObserverDelegate.h" #import "WebviewJSEventHandlerBase.h" #import "MMWebViewDelegate.h" @class NSString; @interface WebviewJSEventHandler_openEnterpriseContact : WebviewJSEventHandlerBase <MMWebViewDelegate, PBMessageObserverDelegate> { } @property(readonly, copy) NSString* debugDescription; @property(readonly, copy) NSString* description; @property(readonly, assign) Class superclass; @property(readonly, assign) unsigned hash; -(void)onWebViewWillClose:(id)onWebView; -(void)webViewReturn:(id)aReturn; -(void)dealloc; -(void)MessageReturn:(id)aReturn Event:(unsigned long)event; -(void)handleJSEvent:(id)event HandlerFacade:(id)facade ExtraData:(id)data; @end
36.91
22
(translation_unit) "/**\n * This header is generated by class-dump-z 0.2a.\n * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3.\n *\n * Source: (null)\n */\n\n#import "PBMessageObserverDelegate.h"\n#import "WebviewJSEventHandlerBase.h"\n#import "MMWebViewDelegate.h"\n\n@class NSString;\n\n@interface WebviewJSEventHandler_openEnterpriseContact : WebviewJSEventHandlerBase <MMWebViewDelegate, PBMessageObserverDelegate> {\n}\n@property(readonly, copy) NSString* debugDescription;\n@property(readonly, copy) NSString* description;\n@property(readonly, assign) Class superclass;\n@property(readonly, assign) unsigned hash;\n-(void)onWebViewWillClose:(id)onWebView;\n-(void)webViewReturn:(id)aReturn;\n-(void)dealloc;\n-(void)MessageReturn:(id)aReturn Event:(unsigned long)event;\n-(void)handleJSEvent:(id)event HandlerFacade:(id)facade ExtraData:(id)data;\n@end\n\n" (comment) "/**\n * This header is generated by class-dump-z 0.2a.\n * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3.\n *\n * Source: (null)\n */" (preproc_call) "#import "PBMessageObserverDelegate.h"\n" (preproc_directive) "#import" (preproc_arg) ""PBMessageObserverDelegate.h"" (preproc_call) "#import "WebviewJSEventHandlerBase.h"\n" (preproc_directive) "#import" (preproc_arg) ""WebviewJSEventHandlerBase.h"" (preproc_call) "#import "MMWebViewDelegate.h"\n" (preproc_directive) "#import" (preproc_arg) ""MMWebViewDelegate.h"" (ERROR) "@" (ERROR) "@" (declaration) "class NSString;" (type_identifier) "class" (identifier) "NSString" (;) ";" (ERROR) "@interface WebviewJSEventHandler_openEnterpriseContact : WebviewJSEventHandlerBase <MMWebViewDelegate, PBMessageObserverDelegate>" (ERROR) "@" (type_identifier) "interface" (identifier) "WebviewJSEventHandler_openEnterpriseContact" (ERROR) ": WebviewJSEventHandlerBase <MMWebViewDelegate" (:) ":" (identifier) "WebviewJSEventHandlerBase" (<) "<" (identifier) "MMWebViewDelegate" (,) "," (identifier) "PBMessageObserverDelegate" (>) ">" (compound_statement) "{\n}" ({) "{" (}) "}" (ERROR) "@" (ERROR) "@" (expression_statement) "property(readonly, copy)" (call_expression) "property(readonly, copy)" (identifier) "property" (argument_list) "(readonly, copy)" (() "(" (identifier) "readonly" (,) "," (identifier) "copy" ()) ")" (;) "" (declaration) "NSString* debugDescription;" (type_identifier) "NSString" (pointer_declarator) "* debugDescription" (*) "*" (identifier) "debugDescription" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "property(readonly, copy)" (call_expression) "property(readonly, copy)" (identifier) "property" (argument_list) "(readonly, copy)" (() "(" (identifier) "readonly" (,) "," (identifier) "copy" ()) ")" (;) "" (declaration) "NSString* description;" (type_identifier) "NSString" (pointer_declarator) "* description" (*) "*" (identifier) "description" (;) ";" (ERROR) "@property(readonly, assign) Class" (ERROR) "@" (call_expression) "property(readonly, assign)" (identifier) "property" (argument_list) "(readonly, assign)" (() "(" (identifier) "readonly" (,) "," (identifier) "assign" ()) ")" (identifier) "Class" (expression_statement) "superclass;" (identifier) "superclass" (;) ";" (ERROR) "@property(readonly, assign) unsigned" (ERROR) "@" (call_expression) "property(readonly, assign)" (identifier) "property" (argument_list) "(readonly, assign)" (() "(" (identifier) "readonly" (,) "," (identifier) "assign" ()) ")" (identifier) "unsigned" (expression_statement) "hash;" (identifier) "hash" (;) ";" (expression_statement) "-(void)onWebViewWillClose:(id)onWebView;" (unary_expression) "-(void)onWebViewWillClose" (-) "-" (cast_expression) "(void)onWebViewWillClose" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "onWebViewWillClose" (ERROR) ":(id)onWebView" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "onWebView" (;) ";" (expression_statement) "-(void)webViewReturn:(id)aReturn;" (unary_expression) "-(void)webViewReturn" (-) "-" (cast_expression) "(void)webViewReturn" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "webViewReturn" (ERROR) ":(id)aReturn" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "aReturn" (;) ";" (expression_statement) "-(void)dealloc;" (unary_expression) "-(void)dealloc" (-) "-" (cast_expression) "(void)dealloc" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "dealloc" (;) ";" (ERROR) "-(void)MessageReturn:(id)aReturn Event:(" (unary_expression) "-(void)MessageReturn" (-) "-" (cast_expression) "(void)MessageReturn" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "MessageReturn" (:) ":" (() "(" (identifier) "id" ()) ")" (type_identifier) "aReturn" (identifier) "Event" (:) ":" (() "(" (declaration) "unsigned long)event;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (ERROR) ")" ()) ")" (identifier) "event" (;) ";" (ERROR) "-(void)handleJSEvent:(id)" (unary_expression) "-(void)handleJSEvent" (-) "-" (cast_expression) "(void)handleJSEvent" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "handleJSEvent" (:) ":" (() "(" (identifier) "id" ()) ")" (declaration) "event HandlerFacade:(id)facade ExtraData:(id)data;" (type_identifier) "event" (ERROR) "HandlerFacade:(id)facade ExtraData:(id)" (identifier) "HandlerFacade" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "facade" (identifier) "ExtraData" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "data" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
197
21
{"language": "c", "success": true, "metadata": {"lines": 22, "avg_line_length": 36.91, "nodes": 123, "errors": 0, "source_hash": "0e743d8661894ab00d9983f5bf2ed423ed94ced2e7a853b7c6a775f3e5e7afde", "categorized_nodes": 70}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import \"PBMessageObserverDelegate.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "\"PBMessageObserverDelegate.h\"", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 37}}, {"id": 3, "type": "preproc_call", "text": "#import \"WebviewJSEventHandlerBase.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": "#import", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "\"WebviewJSEventHandlerBase.h\"", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 37}}, {"id": 6, "type": "preproc_call", "text": "#import \"MMWebViewDelegate.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 7, "type": "preproc_directive", "text": "#import", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 8, "type": "preproc_arg", "text": "\"MMWebViewDelegate.h\"", "parent": 6, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 29}}, {"id": 9, "type": "ERROR", "text": "@", "parent": null, "children": [10], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 10, "type": "ERROR", "text": "@", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 11, "type": "declaration", "text": "class NSString;", "parent": null, "children": [12], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 16}}, {"id": 12, "type": "identifier", "text": "NSString", "parent": 11, "children": [], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 15}}, {"id": 13, "type": "ERROR", "text": "@interface WebviewJSEventHandler_openEnterpriseContact : WebviewJSEventHandlerBase <MMWebViewDelegate, PBMessageObserverDelegate>", "parent": null, "children": [14, 15, 16, 17, 21, 22], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 129}}, {"id": 14, "type": "ERROR", "text": "@", "parent": 13, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 15, "type": "type_identifier", "text": "interface", "parent": 13, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 10}}, {"id": 16, "type": "identifier", "text": "WebviewJSEventHandler_openEnterpriseContact", "parent": 13, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 54}}, {"id": 17, "type": "ERROR", "text": ": WebviewJSEventHandlerBase <MMWebViewDelegate", "parent": 13, "children": [18, 19, 20], "start_point": {"row": 13, "column": 55}, "end_point": {"row": 13, "column": 101}}, {"id": 18, "type": "identifier", "text": "WebviewJSEventHandlerBase", "parent": 17, "children": [], "start_point": {"row": 13, "column": 57}, "end_point": {"row": 13, "column": 82}}, {"id": 19, "type": "<", "text": "<", "parent": 17, "children": [], "start_point": {"row": 13, "column": 83}, "end_point": {"row": 13, "column": 84}}, {"id": 20, "type": "identifier", "text": "MMWebViewDelegate", "parent": 17, "children": [], "start_point": {"row": 13, "column": 84}, "end_point": {"row": 13, "column": 101}}, {"id": 21, "type": "identifier", "text": "PBMessageObserverDelegate", "parent": 13, "children": [], "start_point": {"row": 13, "column": 103}, "end_point": {"row": 13, "column": 128}}, {"id": 22, "type": ">", "text": ">", "parent": 13, "children": [], "start_point": {"row": 13, "column": 128}, "end_point": {"row": 13, "column": 129}}, {"id": 23, "type": "ERROR", "text": "@", "parent": null, "children": [24], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 24, "type": "ERROR", "text": "@", "parent": 23, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 25, "type": "call_expression", "text": "property(readonly, copy)", "parent": null, "children": [26, 27], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 25}}, {"id": 26, "type": "identifier", "text": "property", "parent": 25, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 27, "type": "argument_list", "text": "(readonly, copy)", "parent": 25, "children": [28, 29], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 25}}, {"id": 28, "type": "identifier", "text": "readonly", "parent": 27, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 18}}, {"id": 29, "type": "identifier", "text": "copy", "parent": 27, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 24}}, {"id": 30, "type": "declaration", "text": "NSString* debugDescription;", "parent": null, "children": [31, 32], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 53}}, {"id": 31, "type": "type_identifier", "text": "NSString", "parent": 30, "children": [], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 34}}, {"id": 32, "type": "pointer_declarator", "text": "* debugDescription", "parent": 30, "children": [33, 34], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 52}}, {"id": 33, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 35}}, {"id": 34, "type": "identifier", "text": "debugDescription", "parent": 32, "children": [], "start_point": {"row": 15, "column": 36}, "end_point": {"row": 15, "column": 52}}, {"id": 35, "type": "ERROR", "text": "@", "parent": null, "children": [36], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 36, "type": "ERROR", "text": "@", "parent": 35, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 37, "type": "call_expression", "text": "property(readonly, copy)", "parent": null, "children": [38, 39], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 25}}, {"id": 38, "type": "identifier", "text": "property", "parent": 37, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 9}}, {"id": 39, "type": "argument_list", "text": "(readonly, copy)", "parent": 37, "children": [40, 41], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 25}}, {"id": 40, "type": "identifier", "text": "readonly", "parent": 39, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 18}}, {"id": 41, "type": "identifier", "text": "copy", "parent": 39, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 24}}, {"id": 42, "type": "declaration", "text": "NSString* description;", "parent": null, "children": [43, 44], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 48}}, {"id": 43, "type": "type_identifier", "text": "NSString", "parent": 42, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 34}}, {"id": 44, "type": "pointer_declarator", "text": "* description", "parent": 42, "children": [45, 46], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 47}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 35}}, {"id": 46, "type": "identifier", "text": "description", "parent": 44, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 47}}, {"id": 47, "type": "ERROR", "text": "@property(readonly, assign) Class", "parent": null, "children": [48, 49, 54], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 33}}, {"id": 48, "type": "ERROR", "text": "@", "parent": 47, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 49, "type": "call_expression", "text": "property(readonly, assign)", "parent": 47, "children": [50, 51], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 27}}, {"id": 50, "type": "identifier", "text": "property", "parent": 49, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 9}}, {"id": 51, "type": "argument_list", "text": "(readonly, assign)", "parent": 49, "children": [52, 53], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 27}}, {"id": 52, "type": "identifier", "text": "readonly", "parent": 51, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 18}}, {"id": 53, "type": "identifier", "text": "assign", "parent": 51, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 26}}, {"id": 54, "type": "identifier", "text": "Class", "parent": 47, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 33}}, {"id": 55, "type": "identifier", "text": "superclass", "parent": null, "children": [], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 44}}, {"id": 56, "type": "ERROR", "text": "@property(readonly, assign) unsigned", "parent": null, "children": [57, 58, 63], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 36}}, {"id": 57, "type": "ERROR", "text": "@", "parent": 56, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 58, "type": "call_expression", "text": "property(readonly, assign)", "parent": 56, "children": [59, 60], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 27}}, {"id": 59, "type": "identifier", "text": "property", "parent": 58, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 9}}, {"id": 60, "type": "argument_list", "text": "(readonly, assign)", "parent": 58, "children": [61, 62], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 27}}, {"id": 61, "type": "identifier", "text": "readonly", "parent": 60, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 18}}, {"id": 62, "type": "identifier", "text": "assign", "parent": 60, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 26}}, {"id": 63, "type": "identifier", "text": "unsigned", "parent": 56, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 36}}, {"id": 64, "type": "identifier", "text": "hash", "parent": null, "children": [], "start_point": {"row": 18, "column": 37}, "end_point": {"row": 18, "column": 41}}, {"id": 65, "type": "unary_expression", "text": "-(void)onWebViewWillClose", "parent": null, "children": [66, 67], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 25}}, {"id": 66, "type": "-", "text": "-", "parent": 65, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 67, "type": "cast_expression", "text": "(void)onWebViewWillClose", "parent": 65, "children": [68, 70], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 25}}, {"id": 68, "type": "type_descriptor", "text": "void", "parent": 67, "children": [69], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 6}}, {"id": 69, "type": "primitive_type", "text": "void", "parent": 68, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 6}}, {"id": 70, "type": "identifier", "text": "onWebViewWillClose", "parent": 67, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 25}}, {"id": 71, "type": "ERROR", "text": ":(id)onWebView", "parent": null, "children": [72, 73], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 39}}, {"id": 72, "type": "identifier", "text": "id", "parent": 71, "children": [], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 29}}, {"id": 73, "type": "identifier", "text": "onWebView", "parent": 71, "children": [], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 39}}, {"id": 74, "type": "unary_expression", "text": "-(void)webViewReturn", "parent": null, "children": [75, 76], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 20}}, {"id": 75, "type": "-", "text": "-", "parent": 74, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 76, "type": "cast_expression", "text": "(void)webViewReturn", "parent": 74, "children": [77, 79], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 20}}, {"id": 77, "type": "type_descriptor", "text": "void", "parent": 76, "children": [78], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 6}}, {"id": 78, "type": "primitive_type", "text": "void", "parent": 77, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 6}}, {"id": 79, "type": "identifier", "text": "webViewReturn", "parent": 76, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 20}}, {"id": 80, "type": "ERROR", "text": ":(id)aReturn", "parent": null, "children": [81, 82], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 32}}, {"id": 81, "type": "identifier", "text": "id", "parent": 80, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 24}}, {"id": 82, "type": "identifier", "text": "aReturn", "parent": 80, "children": [], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 32}}, {"id": 83, "type": "unary_expression", "text": "-(void)dealloc", "parent": null, "children": [84, 85], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 14}}, {"id": 84, "type": "-", "text": "-", "parent": 83, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 85, "type": "cast_expression", "text": "(void)dealloc", "parent": 83, "children": [86, 88], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 14}}, {"id": 86, "type": "type_descriptor", "text": "void", "parent": 85, "children": [87], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 6}}, {"id": 87, "type": "primitive_type", "text": "void", "parent": 86, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 6}}, {"id": 88, "type": "identifier", "text": "dealloc", "parent": 85, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 14}}, {"id": 89, "type": "ERROR", "text": "-(void)MessageReturn:(id)aReturn Event:(", "parent": null, "children": [90, 96, 97, 98], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 40}}, {"id": 90, "type": "unary_expression", "text": "-(void)MessageReturn", "parent": 89, "children": [91, 92], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 20}}, {"id": 91, "type": "-", "text": "-", "parent": 90, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 92, "type": "cast_expression", "text": "(void)MessageReturn", "parent": 90, "children": [93, 95], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 20}}, {"id": 93, "type": "type_descriptor", "text": "void", "parent": 92, "children": [94], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 6}}, {"id": 94, "type": "primitive_type", "text": "void", "parent": 93, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 6}}, {"id": 95, "type": "identifier", "text": "MessageReturn", "parent": 92, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 20}}, {"id": 96, "type": "identifier", "text": "id", "parent": 89, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 24}}, {"id": 97, "type": "type_identifier", "text": "aReturn", "parent": 89, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 32}}, {"id": 98, "type": "identifier", "text": "Event", "parent": 89, "children": [], "start_point": {"row": 22, "column": 33}, "end_point": {"row": 22, "column": 38}}, {"id": 99, "type": "declaration", "text": "unsigned long)event;", "parent": null, "children": [100, 103], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 60}}, {"id": 100, "type": "sized_type_specifier", "text": "unsigned long", "parent": 99, "children": [101, 102], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 53}}, {"id": 101, "type": "unsigned", "text": "unsigned", "parent": 100, "children": [], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 48}}, {"id": 102, "type": "long", "text": "long", "parent": 100, "children": [], "start_point": {"row": 22, "column": 49}, "end_point": {"row": 22, "column": 53}}, {"id": 103, "type": "identifier", "text": "event", "parent": 99, "children": [], "start_point": {"row": 22, "column": 54}, "end_point": {"row": 22, "column": 59}}, {"id": 104, "type": "ERROR", "text": "-(void)handleJSEvent:(id)", "parent": null, "children": [105, 111], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 25}}, {"id": 105, "type": "unary_expression", "text": "-(void)handleJSEvent", "parent": 104, "children": [106, 107], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 20}}, {"id": 106, "type": "-", "text": "-", "parent": 105, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 107, "type": "cast_expression", "text": "(void)handleJSEvent", "parent": 105, "children": [108, 110], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 20}}, {"id": 108, "type": "type_descriptor", "text": "void", "parent": 107, "children": [109], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 6}}, {"id": 109, "type": "primitive_type", "text": "void", "parent": 108, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 6}}, {"id": 110, "type": "identifier", "text": "handleJSEvent", "parent": 107, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 20}}, {"id": 111, "type": "identifier", "text": "id", "parent": 104, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 24}}, {"id": 112, "type": "declaration", "text": "event HandlerFacade:(id)facade ExtraData:(id)data;", "parent": null, "children": [113, 114, 120], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 75}}, {"id": 113, "type": "type_identifier", "text": "event", "parent": 112, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 30}}, {"id": 114, "type": "ERROR", "text": "HandlerFacade:(id)facade ExtraData:(id)", "parent": 112, "children": [115, 116, 117, 118, 119], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 70}}, {"id": 115, "type": "identifier", "text": "HandlerFacade", "parent": 114, "children": [], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 44}}, {"id": 116, "type": "identifier", "text": "id", "parent": 114, "children": [], "start_point": {"row": 23, "column": 46}, "end_point": {"row": 23, "column": 48}}, {"id": 117, "type": "identifier", "text": "facade", "parent": 114, "children": [], "start_point": {"row": 23, "column": 49}, "end_point": {"row": 23, "column": 55}}, {"id": 118, "type": "identifier", "text": "ExtraData", "parent": 114, "children": [], "start_point": {"row": 23, "column": 56}, "end_point": {"row": 23, "column": 65}}, {"id": 119, "type": "identifier", "text": "id", "parent": 114, "children": [], "start_point": {"row": 23, "column": 67}, "end_point": {"row": 23, "column": 69}}, {"id": 120, "type": "identifier", "text": "data", "parent": 112, "children": [], "start_point": {"row": 23, "column": 70}, "end_point": {"row": 23, "column": 74}}, {"id": 121, "type": "ERROR", "text": "@", "parent": null, "children": [122], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 122, "type": "ERROR", "text": "@", "parent": 121, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [11, 30, 42, 99, 112], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [25, 37, 49, 58, 65, 67, 74, 76, 83, 85, 90, 92, 105, 107], "assignments": [], "loops": [], "conditionals": [12, 15, 16, 18, 20, 21, 26, 28, 29, 31, 34, 38, 40, 41, 43, 46, 50, 52, 53, 54, 55, 59, 61, 62, 63, 64, 70, 72, 73, 79, 81, 82, 88, 95, 96, 97, 98, 100, 103, 110, 111, 113, 115, 116, 117, 118, 119, 120], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 3, 6], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "/**\n * This header is generated by class-dump-z 0.2a.\n * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3.\n *\n * Source: (null)\n */\n\n#import \"PBMessageObserverDelegate.h\"\n#import \"WebviewJSEventHandlerBase.h\"\n#import \"MMWebViewDelegate.h\"\n\n@class NSString;\n\n@interface WebviewJSEventHandler_openEnterpriseContact : WebviewJSEventHandlerBase <MMWebViewDelegate, PBMessageObserverDelegate> {\n}\n@property(readonly, copy) NSString* debugDescription;\n@property(readonly, copy) NSString* description;\n@property(readonly, assign) Class superclass;\n@property(readonly, assign) unsigned hash;\n-(void)onWebViewWillClose:(id)onWebView;\n-(void)webViewReturn:(id)aReturn;\n-(void)dealloc;\n-(void)MessageReturn:(id)aReturn Event:(unsigned long)event;\n-(void)handleJSEvent:(id)event HandlerFacade:(id)facade ExtraData:(id)data;\n@end\n\n"}
354
c
/* orderc.f -- translated by f2c (version 19980913). You must link the resulting object file with the libraries: -lf2c -lm (in that order) */ #include "f2c.h" /* $Procedure ORDERC ( Order of a character array ) */ /* Subroutine */ int orderc_(char *array, integer *ndim, integer *iorder, ftnlen array_len) { /* System generated locals */ integer i__1; /* Builtin functions */ logical l_le(char *, char *, ftnlen, ftnlen); /* Local variables */ integer i__, j; extern /* Subroutine */ int swapi_(integer *, integer *); integer jg, gap; /* $ Abstract */ /* Determine the order of elements in an array of character strings. */ /* $ Disclaimer */ /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */ /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */ /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */ /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */ /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */ /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */ /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */ /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */ /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */ /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */ /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */ /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */ /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */ /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */ /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */ /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */ /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */ /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */ /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */ /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */ /* $ Required_Reading */ /* None. */ /* $ Keywords */ /* ARRAY */ /* SORT */ /* $ Declarations */ /* $ Brief_I/O */ /* VARIABLE I/O DESCRIPTION */ /* -------- --- -------------------------------------------------- */ /* ARRAY I Input array. */ /* NDIM I Dimension of ARRAY. */ /* IORDER O Order vector for ARRAY. */ /* $ Detailed_Input */ /* ARRAY is the input array. */ /* NDIM is the number of elements in the input array. */ /* $ Detailed_Output */ /* IORDER is the order vector for the input array. */ /* IORDER(1) is the index of the smallest element */ /* of ARRAY; IORDER(2) is the index of the next */ /* smallest; and so on. Strings are ordered according */ /* to the ASCII collating sequence. */ /* $ Parameters */ /* None. */ /* $ Exceptions */ /* Error free. */ /* $ Files */ /* None. */ /* $ Particulars */ /* ORDERC finds the index of the smallest element of the input */ /* array. This becomes the first element of the order vector. */ /* The process is repeated for the rest of the elements. */ /* The order vector returned by ORDERC may be used by any of */ /* the REORD routines to sort sets of related arrays, as shown */ /* in the example below. */ /* $ Examples */ /* The numerical results shown for this example may differ across */ /* platforms. The results depend on the SPICE kernels used as */ /* input, the compiler and supporting libraries, and the machine */ /* specific arithmetic implementation. */ /* 1) Sort four related arrays (containing the names, masses, */ /* integer ID codes, and flags indicating whether they have */ /* a ring system, for a group of planets). */ /* Example code begins here. */ /* PROGRAM ORDERC_EX1 */ /* IMPLICIT NONE */ /* C */ /* C Local constants. */ /* C */ /* INTEGER NDIM */ /* PARAMETER ( NDIM = 8 ) */ /* INTEGER STRLEN */ /* PARAMETER ( STRLEN = 7 ) */ /* C */ /* C Local variables. */ /* C */ /* CHARACTER*(STRLEN) NAMES ( NDIM ) */ /* DOUBLE PRECISION MASSES ( NDIM ) */ /* INTEGER CODES ( NDIM ) */ /* INTEGER I */ /* INTEGER IORDER ( NDIM ) */ /* LOGICAL RINGS ( NDIM ) */ /* C */ /* C Set the arrays containing the names, masses (given as */ /* C ratios to of Solar GM to barycenter GM), integer ID */ /* C codes, and flags indicating whether they have a ring */ /* C system. */ /* C */ /* DATA NAMES / */ /* . 'MERCURY', 'VENUS', 'EARTH', 'MARS', */ /* . 'JUPITER', 'SATURN', 'URANUS', 'NEPTUNE' / */ /* DATA MASSES / */ /* . 22032.080D0, 324858.599D0, */ /* . 398600.436D0, 42828.314D0, */ /* . 126712767.881D0, 37940626.068D0, */ /* . 5794559.128D0, 6836534.065D0 / */ /* DATA CODES / 199, 299, 399, 499, */ /* . 599, 699, 799, 899 / */ /* DATA RINGS / */ /* . .FALSE., .FALSE., .FALSE., .FALSE., */ /* . .TRUE., .TRUE., .TRUE., .TRUE. / */ /* C */ /* C Sort the object arrays by name. */ /* C */ /* CALL ORDERC ( NAMES, NDIM, IORDER ) */ /* CALL REORDC ( IORDER, NDIM, NAMES ) */ /* CALL REORDD ( IORDER, NDIM, MASSES ) */ /* CALL REORDI ( IORDER, NDIM, CODES ) */ /* CALL REORDL ( IORDER, NDIM, RINGS ) */ /* C */ /* C Output the resulting table. */ /* C */ /* WRITE(*,'(A)') ' Planet Mass(GMS/GM) ID Code Rings?' */ /* WRITE(*,'(A)') '------- ------------- ------- ------' */ /* DO I = 1, NDIM */ /* WRITE(*,'(A,F15.3,I9,L5)') NAMES(I), MASSES(I), */ /* . CODES(I), RINGS(I) */ /* END DO */ /* END */ /* When this program was executed on a Mac/Intel/gfortran/64-bit */ /* platform, the output was: */ /* Planet Mass(GMS/GM) ID Code Rings? */ /* ------- ------------- ------- ------ */ /* EARTH 398600.436 399 F */ /* JUPITER 126712767.881 599 T */ /* MARS 42828.314 499 F */ /* MERCURY 22032.080 199 F */ /* NEPTUNE 6836534.065 899 T */ /* SATURN 37940626.068 699 T */ /* URANUS 5794559.128 799 T */ /* VENUS 324858.599 299 F */ /* $ Restrictions */ /* None. */ /* $ Literature_References */ /* None. */ /* $ Author_and_Institution */ /* <NAME> (ODC Space) */ /* <NAME> (JPL) */ /* <NAME> (JPL) */ /* $ Version */ /* - SPICELIB Version 1.1.0, 04-JUL-2021 (JDR) */ /* Added IMPLICIT NONE statement. */ /* Edited the header to comply with NAIF standard. */ /* Added complete code example. */ /* - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */ /* Comment section for permuted index source lines was added */ /* following the header. */ /* - SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) */ /* -& */ /* $ Index_Entries */ /* order of a character array */ /* -& */ /* Local variables */ /* Begin with the initial ordering. */ i__1 = *ndim; for (i__ = 1; i__ <= i__1; ++i__) { iorder[i__ - 1] = i__; } /* Find the smallest element, then the next smallest, and so on. */ /* This uses the Shell Sort algorithm, but swaps the elements of */ /* the order vector instead of the array itself. */ gap = *ndim / 2; while(gap > 0) { i__1 = *ndim; for (i__ = gap + 1; i__ <= i__1; ++i__) { j = i__ - gap; while(j > 0) { jg = j + gap; if (l_le(array + (iorder[j - 1] - 1) * array_len, array + ( iorder[jg - 1] - 1) * array_len, array_len, array_len) ) { j = 0; } else { swapi_(&iorder[j - 1], &iorder[jg - 1]); } j -= gap; } } gap /= 2; } return 0; } /* orderc_ */
41.41
207
(translation_unit) "/* orderc.f -- translated by f2c (version 19980913).\n You must link the resulting object file with the libraries:\n -lf2c -lm (in that order)\n*/\n\n#include "f2c.h"\n\n/* $Procedure ORDERC ( Order of a character array ) */\n/* Subroutine */ int orderc_(char *array, integer *ndim, integer *iorder, \n ftnlen array_len)\n{\n /* System generated locals */\n integer i__1;\n\n /* Builtin functions */\n logical l_le(char *, char *, ftnlen, ftnlen);\n\n /* Local variables */\n integer i__, j;\n extern /* Subroutine */ int swapi_(integer *, integer *);\n integer jg, gap;\n\n/* $ Abstract */\n\n/* Determine the order of elements in an array of character strings. */\n\n/* $ Disclaimer */\n\n/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */\n/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */\n/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */\n/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */\n/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */\n/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */\n/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */\n/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */\n/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */\n/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */\n\n/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */\n/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */\n/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */\n/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */\n/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */\n/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */\n\n/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */\n/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */\n/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */\n/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */\n\n/* $ Required_Reading */\n\n/* None. */\n\n/* $ Keywords */\n\n/* ARRAY */\n/* SORT */\n\n/* $ Declarations */\n/* $ Brief_I/O */\n\n/* VARIABLE I/O DESCRIPTION */\n/* -------- --- -------------------------------------------------- */\n/* ARRAY I Input array. */\n/* NDIM I Dimension of ARRAY. */\n/* IORDER O Order vector for ARRAY. */\n\n/* $ Detailed_Input */\n\n/* ARRAY is the input array. */\n\n/* NDIM is the number of elements in the input array. */\n\n/* $ Detailed_Output */\n\n/* IORDER is the order vector for the input array. */\n/* IORDER(1) is the index of the smallest element */\n/* of ARRAY; IORDER(2) is the index of the next */\n/* smallest; and so on. Strings are ordered according */\n/* to the ASCII collating sequence. */\n\n/* $ Parameters */\n\n/* None. */\n\n/* $ Exceptions */\n\n/* Error free. */\n\n/* $ Files */\n\n/* None. */\n\n/* $ Particulars */\n\n/* ORDERC finds the index of the smallest element of the input */\n/* array. This becomes the first element of the order vector. */\n/* The process is repeated for the rest of the elements. */\n\n/* The order vector returned by ORDERC may be used by any of */\n/* the REORD routines to sort sets of related arrays, as shown */\n/* in the example below. */\n\n/* $ Examples */\n\n/* The numerical results shown for this example may differ across */\n/* platforms. The results depend on the SPICE kernels used as */\n/* input, the compiler and supporting libraries, and the machine */\n/* specific arithmetic implementation. */\n\n/* 1) Sort four related arrays (containing the names, masses, */\n/* integer ID codes, and flags indicating whether they have */\n/* a ring system, for a group of planets). */\n\n\n/* Example code begins here. */\n\n\n/* PROGRAM ORDERC_EX1 */\n/* IMPLICIT NONE */\n\n/* C */\n/* C Local constants. */\n/* C */\n/* INTEGER NDIM */\n/* PARAMETER ( NDIM = 8 ) */\n\n/* INTEGER STRLEN */\n/* PARAMETER ( STRLEN = 7 ) */\n\n/* C */\n/* C Local variables. */\n/* C */\n/* CHARACTER*(STRLEN) NAMES ( NDIM ) */\n\n/* DOUBLE PRECISION MASSES ( NDIM ) */\n\n/* INTEGER CODES ( NDIM ) */\n/* INTEGER I */\n/* INTEGER IORDER ( NDIM ) */\n\n/* LOGICAL RINGS ( NDIM ) */\n\n/* C */\n/* C Set the arrays containing the names, masses (given as */\n/* C ratios to of Solar GM to barycenter GM), integer ID */\n/* C codes, and flags indicating whether they have a ring */\n/* C system. */\n/* C */\n/* DATA NAMES / */\n/* . 'MERCURY', 'VENUS', 'EARTH', 'MARS', */\n/* . 'JUPITER', 'SATURN', 'URANUS', 'NEPTUNE' / */\n\n/* DATA MASSES / */\n/* . 22032.080D0, 324858.599D0, */\n/* . 398600.436D0, 42828.314D0, */\n/* . 126712767.881D0, 37940626.068D0, */\n/* . 5794559.128D0, 6836534.065D0 / */\n\n/* DATA CODES / 199, 299, 399, 499, */\n/* . 599, 699, 799, 899 / */\n\n/* DATA RINGS / */\n/* . .FALSE., .FALSE., .FALSE., .FALSE., */\n/* . .TRUE., .TRUE., .TRUE., .TRUE. / */\n\n/* C */\n/* C Sort the object arrays by name. */\n/* C */\n/* CALL ORDERC ( NAMES, NDIM, IORDER ) */\n\n/* CALL REORDC ( IORDER, NDIM, NAMES ) */\n/* CALL REORDD ( IORDER, NDIM, MASSES ) */\n/* CALL REORDI ( IORDER, NDIM, CODES ) */\n/* CALL REORDL ( IORDER, NDIM, RINGS ) */\n\n/* C */\n/* C Output the resulting table. */\n/* C */\n/* WRITE(*,'(A)') ' Planet Mass(GMS/GM) ID Code Rings?' */\n/* WRITE(*,'(A)') '------- ------------- ------- ------' */\n\n/* DO I = 1, NDIM */\n\n/* WRITE(*,'(A,F15.3,I9,L5)') NAMES(I), MASSES(I), */\n/* . CODES(I), RINGS(I) */\n\n/* END DO */\n\n/* END */\n\n\n/* When this program was executed on a Mac/Intel/gfortran/64-bit */\n/* platform, the output was: */\n\n\n/* Planet Mass(GMS/GM) ID Code Rings? */\n/* ------- ------------- ------- ------ */\n/* EARTH 398600.436 399 F */\n/* JUPITER 126712767.881 599 T */\n/* MARS 42828.314 499 F */\n/* MERCURY 22032.080 199 F */\n/* NEPTUNE 6836534.065 899 T */\n/* SATURN 37940626.068 699 T */\n/* URANUS 5794559.128 799 T */\n/* VENUS 324858.599 299 F */\n\n\n/* $ Restrictions */\n\n/* None. */\n\n/* $ Literature_References */\n\n/* None. */\n\n/* $ Author_and_Institution */\n\n/* <NAME> (ODC Space) */\n/* <NAME> (JPL) */\n/* <NAME> (JPL) */\n\n/* $ Version */\n\n/* - SPICELIB Version 1.1.0, 04-JUL-2021 (JDR) */\n\n/* Added IMPLICIT NONE statement. */\n\n/* Edited the header to comply with NAIF standard. */\n/* Added complete code example. */\n\n/* - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */\n\n/* Comment section for permuted index source lines was added */\n/* following the header. */\n\n/* - SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) */\n\n/* -& */\n/* $ Index_Entries */\n\n/* order of a character array */\n\n/* -& */\n\n/* Local variables */\n\n\n/* Begin with the initial ordering. */\n\n i__1 = *ndim;\n for (i__ = 1; i__ <= i__1; ++i__) {\n iorder[i__ - 1] = i__;\n }\n\n/* Find the smallest element, then the next smallest, and so on. */\n/* This uses the Shell Sort algorithm, but swaps the elements of */\n/* the order vector instead of the array itself. */\n\n gap = *ndim / 2;\n while(gap > 0) {\n i__1 = *ndim;\n for (i__ = gap + 1; i__ <= i__1; ++i__) {\n j = i__ - gap;\n while(j > 0) {\n jg = j + gap;\n if (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)\n ) {\n j = 0;\n } else {\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }\n j -= gap;\n }\n }\n gap /= 2;\n }\n return 0;\n} /* orderc_ */\n\n" (comment) "/* orderc.f -- translated by f2c (version 19980913).\n You must link the resulting object file with the libraries:\n -lf2c -lm (in that order)\n*/" (preproc_include) "#include "f2c.h"\n" (#include) "#include" (string_literal) ""f2c.h"" (") """ (string_content) "f2c.h" (") """ (comment) "/* $Procedure ORDERC ( Order of a character array ) */" (comment) "/* Subroutine */" (function_definition) "int orderc_(char *array, integer *ndim, integer *iorder, \n ftnlen array_len)\n{\n /* System generated locals */\n integer i__1;\n\n /* Builtin functions */\n logical l_le(char *, char *, ftnlen, ftnlen);\n\n /* Local variables */\n integer i__, j;\n extern /* Subroutine */ int swapi_(integer *, integer *);\n integer jg, gap;\n\n/* $ Abstract */\n\n/* Determine the order of elements in an array of character strings. */\n\n/* $ Disclaimer */\n\n/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */\n/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */\n/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */\n/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */\n/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */\n/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */\n/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */\n/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */\n/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */\n/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */\n\n/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */\n/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */\n/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */\n/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */\n/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */\n/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */\n\n/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */\n/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */\n/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */\n/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */\n\n/* $ Required_Reading */\n\n/* None. */\n\n/* $ Keywords */\n\n/* ARRAY */\n/* SORT */\n\n/* $ Declarations */\n/* $ Brief_I/O */\n\n/* VARIABLE I/O DESCRIPTION */\n/* -------- --- -------------------------------------------------- */\n/* ARRAY I Input array. */\n/* NDIM I Dimension of ARRAY. */\n/* IORDER O Order vector for ARRAY. */\n\n/* $ Detailed_Input */\n\n/* ARRAY is the input array. */\n\n/* NDIM is the number of elements in the input array. */\n\n/* $ Detailed_Output */\n\n/* IORDER is the order vector for the input array. */\n/* IORDER(1) is the index of the smallest element */\n/* of ARRAY; IORDER(2) is the index of the next */\n/* smallest; and so on. Strings are ordered according */\n/* to the ASCII collating sequence. */\n\n/* $ Parameters */\n\n/* None. */\n\n/* $ Exceptions */\n\n/* Error free. */\n\n/* $ Files */\n\n/* None. */\n\n/* $ Particulars */\n\n/* ORDERC finds the index of the smallest element of the input */\n/* array. This becomes the first element of the order vector. */\n/* The process is repeated for the rest of the elements. */\n\n/* The order vector returned by ORDERC may be used by any of */\n/* the REORD routines to sort sets of related arrays, as shown */\n/* in the example below. */\n\n/* $ Examples */\n\n/* The numerical results shown for this example may differ across */\n/* platforms. The results depend on the SPICE kernels used as */\n/* input, the compiler and supporting libraries, and the machine */\n/* specific arithmetic implementation. */\n\n/* 1) Sort four related arrays (containing the names, masses, */\n/* integer ID codes, and flags indicating whether they have */\n/* a ring system, for a group of planets). */\n\n\n/* Example code begins here. */\n\n\n/* PROGRAM ORDERC_EX1 */\n/* IMPLICIT NONE */\n\n/* C */\n/* C Local constants. */\n/* C */\n/* INTEGER NDIM */\n/* PARAMETER ( NDIM = 8 ) */\n\n/* INTEGER STRLEN */\n/* PARAMETER ( STRLEN = 7 ) */\n\n/* C */\n/* C Local variables. */\n/* C */\n/* CHARACTER*(STRLEN) NAMES ( NDIM ) */\n\n/* DOUBLE PRECISION MASSES ( NDIM ) */\n\n/* INTEGER CODES ( NDIM ) */\n/* INTEGER I */\n/* INTEGER IORDER ( NDIM ) */\n\n/* LOGICAL RINGS ( NDIM ) */\n\n/* C */\n/* C Set the arrays containing the names, masses (given as */\n/* C ratios to of Solar GM to barycenter GM), integer ID */\n/* C codes, and flags indicating whether they have a ring */\n/* C system. */\n/* C */\n/* DATA NAMES / */\n/* . 'MERCURY', 'VENUS', 'EARTH', 'MARS', */\n/* . 'JUPITER', 'SATURN', 'URANUS', 'NEPTUNE' / */\n\n/* DATA MASSES / */\n/* . 22032.080D0, 324858.599D0, */\n/* . 398600.436D0, 42828.314D0, */\n/* . 126712767.881D0, 37940626.068D0, */\n/* . 5794559.128D0, 6836534.065D0 / */\n\n/* DATA CODES / 199, 299, 399, 499, */\n/* . 599, 699, 799, 899 / */\n\n/* DATA RINGS / */\n/* . .FALSE., .FALSE., .FALSE., .FALSE., */\n/* . .TRUE., .TRUE., .TRUE., .TRUE. / */\n\n/* C */\n/* C Sort the object arrays by name. */\n/* C */\n/* CALL ORDERC ( NAMES, NDIM, IORDER ) */\n\n/* CALL REORDC ( IORDER, NDIM, NAMES ) */\n/* CALL REORDD ( IORDER, NDIM, MASSES ) */\n/* CALL REORDI ( IORDER, NDIM, CODES ) */\n/* CALL REORDL ( IORDER, NDIM, RINGS ) */\n\n/* C */\n/* C Output the resulting table. */\n/* C */\n/* WRITE(*,'(A)') ' Planet Mass(GMS/GM) ID Code Rings?' */\n/* WRITE(*,'(A)') '------- ------------- ------- ------' */\n\n/* DO I = 1, NDIM */\n\n/* WRITE(*,'(A,F15.3,I9,L5)') NAMES(I), MASSES(I), */\n/* . CODES(I), RINGS(I) */\n\n/* END DO */\n\n/* END */\n\n\n/* When this program was executed on a Mac/Intel/gfortran/64-bit */\n/* platform, the output was: */\n\n\n/* Planet Mass(GMS/GM) ID Code Rings? */\n/* ------- ------------- ------- ------ */\n/* EARTH 398600.436 399 F */\n/* JUPITER 126712767.881 599 T */\n/* MARS 42828.314 499 F */\n/* MERCURY 22032.080 199 F */\n/* NEPTUNE 6836534.065 899 T */\n/* SATURN 37940626.068 699 T */\n/* URANUS 5794559.128 799 T */\n/* VENUS 324858.599 299 F */\n\n\n/* $ Restrictions */\n\n/* None. */\n\n/* $ Literature_References */\n\n/* None. */\n\n/* $ Author_and_Institution */\n\n/* <NAME> (ODC Space) */\n/* <NAME> (JPL) */\n/* <NAME> (JPL) */\n\n/* $ Version */\n\n/* - SPICELIB Version 1.1.0, 04-JUL-2021 (JDR) */\n\n/* Added IMPLICIT NONE statement. */\n\n/* Edited the header to comply with NAIF standard. */\n/* Added complete code example. */\n\n/* - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */\n\n/* Comment section for permuted index source lines was added */\n/* following the header. */\n\n/* - SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) */\n\n/* -& */\n/* $ Index_Entries */\n\n/* order of a character array */\n\n/* -& */\n\n/* Local variables */\n\n\n/* Begin with the initial ordering. */\n\n i__1 = *ndim;\n for (i__ = 1; i__ <= i__1; ++i__) {\n iorder[i__ - 1] = i__;\n }\n\n/* Find the smallest element, then the next smallest, and so on. */\n/* This uses the Shell Sort algorithm, but swaps the elements of */\n/* the order vector instead of the array itself. */\n\n gap = *ndim / 2;\n while(gap > 0) {\n i__1 = *ndim;\n for (i__ = gap + 1; i__ <= i__1; ++i__) {\n j = i__ - gap;\n while(j > 0) {\n jg = j + gap;\n if (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)\n ) {\n j = 0;\n } else {\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }\n j -= gap;\n }\n }\n gap /= 2;\n }\n return 0;\n}" (primitive_type) "int" (function_declarator) "orderc_(char *array, integer *ndim, integer *iorder, \n ftnlen array_len)" (identifier) "orderc_" (parameter_list) "(char *array, integer *ndim, integer *iorder, \n ftnlen array_len)" (() "(" (parameter_declaration) "char *array" (primitive_type) "char" (pointer_declarator) "*array" (*) "*" (identifier) "array" (,) "," (parameter_declaration) "integer *ndim" (type_identifier) "integer" (pointer_declarator) "*ndim" (*) "*" (identifier) "ndim" (,) "," (parameter_declaration) "integer *iorder" (type_identifier) "integer" (pointer_declarator) "*iorder" (*) "*" (identifier) "iorder" (,) "," (parameter_declaration) "ftnlen array_len" (type_identifier) "ftnlen" (identifier) "array_len" ()) ")" (compound_statement) "{\n /* System generated locals */\n integer i__1;\n\n /* Builtin functions */\n logical l_le(char *, char *, ftnlen, ftnlen);\n\n /* Local variables */\n integer i__, j;\n extern /* Subroutine */ int swapi_(integer *, integer *);\n integer jg, gap;\n\n/* $ Abstract */\n\n/* Determine the order of elements in an array of character strings. */\n\n/* $ Disclaimer */\n\n/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */\n/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */\n/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */\n/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */\n/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */\n/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */\n/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */\n/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */\n/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */\n/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */\n\n/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */\n/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */\n/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */\n/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */\n/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */\n/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */\n\n/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */\n/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */\n/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */\n/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */\n\n/* $ Required_Reading */\n\n/* None. */\n\n/* $ Keywords */\n\n/* ARRAY */\n/* SORT */\n\n/* $ Declarations */\n/* $ Brief_I/O */\n\n/* VARIABLE I/O DESCRIPTION */\n/* -------- --- -------------------------------------------------- */\n/* ARRAY I Input array. */\n/* NDIM I Dimension of ARRAY. */\n/* IORDER O Order vector for ARRAY. */\n\n/* $ Detailed_Input */\n\n/* ARRAY is the input array. */\n\n/* NDIM is the number of elements in the input array. */\n\n/* $ Detailed_Output */\n\n/* IORDER is the order vector for the input array. */\n/* IORDER(1) is the index of the smallest element */\n/* of ARRAY; IORDER(2) is the index of the next */\n/* smallest; and so on. Strings are ordered according */\n/* to the ASCII collating sequence. */\n\n/* $ Parameters */\n\n/* None. */\n\n/* $ Exceptions */\n\n/* Error free. */\n\n/* $ Files */\n\n/* None. */\n\n/* $ Particulars */\n\n/* ORDERC finds the index of the smallest element of the input */\n/* array. This becomes the first element of the order vector. */\n/* The process is repeated for the rest of the elements. */\n\n/* The order vector returned by ORDERC may be used by any of */\n/* the REORD routines to sort sets of related arrays, as shown */\n/* in the example below. */\n\n/* $ Examples */\n\n/* The numerical results shown for this example may differ across */\n/* platforms. The results depend on the SPICE kernels used as */\n/* input, the compiler and supporting libraries, and the machine */\n/* specific arithmetic implementation. */\n\n/* 1) Sort four related arrays (containing the names, masses, */\n/* integer ID codes, and flags indicating whether they have */\n/* a ring system, for a group of planets). */\n\n\n/* Example code begins here. */\n\n\n/* PROGRAM ORDERC_EX1 */\n/* IMPLICIT NONE */\n\n/* C */\n/* C Local constants. */\n/* C */\n/* INTEGER NDIM */\n/* PARAMETER ( NDIM = 8 ) */\n\n/* INTEGER STRLEN */\n/* PARAMETER ( STRLEN = 7 ) */\n\n/* C */\n/* C Local variables. */\n/* C */\n/* CHARACTER*(STRLEN) NAMES ( NDIM ) */\n\n/* DOUBLE PRECISION MASSES ( NDIM ) */\n\n/* INTEGER CODES ( NDIM ) */\n/* INTEGER I */\n/* INTEGER IORDER ( NDIM ) */\n\n/* LOGICAL RINGS ( NDIM ) */\n\n/* C */\n/* C Set the arrays containing the names, masses (given as */\n/* C ratios to of Solar GM to barycenter GM), integer ID */\n/* C codes, and flags indicating whether they have a ring */\n/* C system. */\n/* C */\n/* DATA NAMES / */\n/* . 'MERCURY', 'VENUS', 'EARTH', 'MARS', */\n/* . 'JUPITER', 'SATURN', 'URANUS', 'NEPTUNE' / */\n\n/* DATA MASSES / */\n/* . 22032.080D0, 324858.599D0, */\n/* . 398600.436D0, 42828.314D0, */\n/* . 126712767.881D0, 37940626.068D0, */\n/* . 5794559.128D0, 6836534.065D0 / */\n\n/* DATA CODES / 199, 299, 399, 499, */\n/* . 599, 699, 799, 899 / */\n\n/* DATA RINGS / */\n/* . .FALSE., .FALSE., .FALSE., .FALSE., */\n/* . .TRUE., .TRUE., .TRUE., .TRUE. / */\n\n/* C */\n/* C Sort the object arrays by name. */\n/* C */\n/* CALL ORDERC ( NAMES, NDIM, IORDER ) */\n\n/* CALL REORDC ( IORDER, NDIM, NAMES ) */\n/* CALL REORDD ( IORDER, NDIM, MASSES ) */\n/* CALL REORDI ( IORDER, NDIM, CODES ) */\n/* CALL REORDL ( IORDER, NDIM, RINGS ) */\n\n/* C */\n/* C Output the resulting table. */\n/* C */\n/* WRITE(*,'(A)') ' Planet Mass(GMS/GM) ID Code Rings?' */\n/* WRITE(*,'(A)') '------- ------------- ------- ------' */\n\n/* DO I = 1, NDIM */\n\n/* WRITE(*,'(A,F15.3,I9,L5)') NAMES(I), MASSES(I), */\n/* . CODES(I), RINGS(I) */\n\n/* END DO */\n\n/* END */\n\n\n/* When this program was executed on a Mac/Intel/gfortran/64-bit */\n/* platform, the output was: */\n\n\n/* Planet Mass(GMS/GM) ID Code Rings? */\n/* ------- ------------- ------- ------ */\n/* EARTH 398600.436 399 F */\n/* JUPITER 126712767.881 599 T */\n/* MARS 42828.314 499 F */\n/* MERCURY 22032.080 199 F */\n/* NEPTUNE 6836534.065 899 T */\n/* SATURN 37940626.068 699 T */\n/* URANUS 5794559.128 799 T */\n/* VENUS 324858.599 299 F */\n\n\n/* $ Restrictions */\n\n/* None. */\n\n/* $ Literature_References */\n\n/* None. */\n\n/* $ Author_and_Institution */\n\n/* <NAME> (ODC Space) */\n/* <NAME> (JPL) */\n/* <NAME> (JPL) */\n\n/* $ Version */\n\n/* - SPICELIB Version 1.1.0, 04-JUL-2021 (JDR) */\n\n/* Added IMPLICIT NONE statement. */\n\n/* Edited the header to comply with NAIF standard. */\n/* Added complete code example. */\n\n/* - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */\n\n/* Comment section for permuted index source lines was added */\n/* following the header. */\n\n/* - SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) */\n\n/* -& */\n/* $ Index_Entries */\n\n/* order of a character array */\n\n/* -& */\n\n/* Local variables */\n\n\n/* Begin with the initial ordering. */\n\n i__1 = *ndim;\n for (i__ = 1; i__ <= i__1; ++i__) {\n iorder[i__ - 1] = i__;\n }\n\n/* Find the smallest element, then the next smallest, and so on. */\n/* This uses the Shell Sort algorithm, but swaps the elements of */\n/* the order vector instead of the array itself. */\n\n gap = *ndim / 2;\n while(gap > 0) {\n i__1 = *ndim;\n for (i__ = gap + 1; i__ <= i__1; ++i__) {\n j = i__ - gap;\n while(j > 0) {\n jg = j + gap;\n if (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)\n ) {\n j = 0;\n } else {\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }\n j -= gap;\n }\n }\n gap /= 2;\n }\n return 0;\n}" ({) "{" (comment) "/* System generated locals */" (declaration) "integer i__1;" (type_identifier) "integer" (identifier) "i__1" (;) ";" (comment) "/* Builtin functions */" (declaration) "logical l_le(char *, char *, ftnlen, ftnlen);" (type_identifier) "logical" (function_declarator) "l_le(char *, char *, ftnlen, ftnlen)" (identifier) "l_le" (parameter_list) "(char *, char *, ftnlen, ftnlen)" (() "(" (parameter_declaration) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "ftnlen" (type_identifier) "ftnlen" (,) "," (parameter_declaration) "ftnlen" (type_identifier) "ftnlen" ()) ")" (;) ";" (comment) "/* Local variables */" (declaration) "integer i__, j;" (type_identifier) "integer" (identifier) "i__" (,) "," (identifier) "j" (;) ";" (declaration) "extern /* Subroutine */ int swapi_(integer *, integer *);" (storage_class_specifier) "extern" (extern) "extern" (comment) "/* Subroutine */" (primitive_type) "int" (function_declarator) "swapi_(integer *, integer *)" (identifier) "swapi_" (parameter_list) "(integer *, integer *)" (() "(" (parameter_declaration) "integer *" (type_identifier) "integer" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "integer *" (type_identifier) "integer" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (declaration) "integer jg, gap;" (type_identifier) "integer" (identifier) "jg" (,) "," (identifier) "gap" (;) ";" (comment) "/* $ Abstract */" (comment) "/* Determine the order of elements in an array of character strings. */" (comment) "/* $ Disclaimer */" (comment) "/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */" (comment) "/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */" (comment) "/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */" (comment) "/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */" (comment) "/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */" (comment) "/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */" (comment) "/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */" (comment) "/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */" (comment) "/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */" (comment) "/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */" (comment) "/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */" (comment) "/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */" (comment) "/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */" (comment) "/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */" (comment) "/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */" (comment) "/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */" (comment) "/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */" (comment) "/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */" (comment) "/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */" (comment) "/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */" (comment) "/* $ Required_Reading */" (comment) "/* None. */" (comment) "/* $ Keywords */" (comment) "/* ARRAY */" (comment) "/* SORT */" (comment) "/* $ Declarations */" (comment) "/* $ Brief_I/O */" (comment) "/* VARIABLE I/O DESCRIPTION */" (comment) "/* -------- --- -------------------------------------------------- */" (comment) "/* ARRAY I Input array. */" (comment) "/* NDIM I Dimension of ARRAY. */" (comment) "/* IORDER O Order vector for ARRAY. */" (comment) "/* $ Detailed_Input */" (comment) "/* ARRAY is the input array. */" (comment) "/* NDIM is the number of elements in the input array. */" (comment) "/* $ Detailed_Output */" (comment) "/* IORDER is the order vector for the input array. */" (comment) "/* IORDER(1) is the index of the smallest element */" (comment) "/* of ARRAY; IORDER(2) is the index of the next */" (comment) "/* smallest; and so on. Strings are ordered according */" (comment) "/* to the ASCII collating sequence. */" (comment) "/* $ Parameters */" (comment) "/* None. */" (comment) "/* $ Exceptions */" (comment) "/* Error free. */" (comment) "/* $ Files */" (comment) "/* None. */" (comment) "/* $ Particulars */" (comment) "/* ORDERC finds the index of the smallest element of the input */" (comment) "/* array. This becomes the first element of the order vector. */" (comment) "/* The process is repeated for the rest of the elements. */" (comment) "/* The order vector returned by ORDERC may be used by any of */" (comment) "/* the REORD routines to sort sets of related arrays, as shown */" (comment) "/* in the example below. */" (comment) "/* $ Examples */" (comment) "/* The numerical results shown for this example may differ across */" (comment) "/* platforms. The results depend on the SPICE kernels used as */" (comment) "/* input, the compiler and supporting libraries, and the machine */" (comment) "/* specific arithmetic implementation. */" (comment) "/* 1) Sort four related arrays (containing the names, masses, */" (comment) "/* integer ID codes, and flags indicating whether they have */" (comment) "/* a ring system, for a group of planets). */" (comment) "/* Example code begins here. */" (comment) "/* PROGRAM ORDERC_EX1 */" (comment) "/* IMPLICIT NONE */" (comment) "/* C */" (comment) "/* C Local constants. */" (comment) "/* C */" (comment) "/* INTEGER NDIM */" (comment) "/* PARAMETER ( NDIM = 8 ) */" (comment) "/* INTEGER STRLEN */" (comment) "/* PARAMETER ( STRLEN = 7 ) */" (comment) "/* C */" (comment) "/* C Local variables. */" (comment) "/* C */" (comment) "/* CHARACTER*(STRLEN) NAMES ( NDIM ) */" (comment) "/* DOUBLE PRECISION MASSES ( NDIM ) */" (comment) "/* INTEGER CODES ( NDIM ) */" (comment) "/* INTEGER I */" (comment) "/* INTEGER IORDER ( NDIM ) */" (comment) "/* LOGICAL RINGS ( NDIM ) */" (comment) "/* C */" (comment) "/* C Set the arrays containing the names, masses (given as */" (comment) "/* C ratios to of Solar GM to barycenter GM), integer ID */" (comment) "/* C codes, and flags indicating whether they have a ring */" (comment) "/* C system. */" (comment) "/* C */" (comment) "/* DATA NAMES / */" (comment) "/* . 'MERCURY', 'VENUS', 'EARTH', 'MARS', */" (comment) "/* . 'JUPITER', 'SATURN', 'URANUS', 'NEPTUNE' / */" (comment) "/* DATA MASSES / */" (comment) "/* . 22032.080D0, 324858.599D0, */" (comment) "/* . 398600.436D0, 42828.314D0, */" (comment) "/* . 126712767.881D0, 37940626.068D0, */" (comment) "/* . 5794559.128D0, 6836534.065D0 / */" (comment) "/* DATA CODES / 199, 299, 399, 499, */" (comment) "/* . 599, 699, 799, 899 / */" (comment) "/* DATA RINGS / */" (comment) "/* . .FALSE., .FALSE., .FALSE., .FALSE., */" (comment) "/* . .TRUE., .TRUE., .TRUE., .TRUE. / */" (comment) "/* C */" (comment) "/* C Sort the object arrays by name. */" (comment) "/* C */" (comment) "/* CALL ORDERC ( NAMES, NDIM, IORDER ) */" (comment) "/* CALL REORDC ( IORDER, NDIM, NAMES ) */" (comment) "/* CALL REORDD ( IORDER, NDIM, MASSES ) */" (comment) "/* CALL REORDI ( IORDER, NDIM, CODES ) */" (comment) "/* CALL REORDL ( IORDER, NDIM, RINGS ) */" (comment) "/* C */" (comment) "/* C Output the resulting table. */" (comment) "/* C */" (comment) "/* WRITE(*,'(A)') ' Planet Mass(GMS/GM) ID Code Rings?' */" (comment) "/* WRITE(*,'(A)') '------- ------------- ------- ------' */" (comment) "/* DO I = 1, NDIM */" (comment) "/* WRITE(*,'(A,F15.3,I9,L5)') NAMES(I), MASSES(I), */" (comment) "/* . CODES(I), RINGS(I) */" (comment) "/* END DO */" (comment) "/* END */" (comment) "/* When this program was executed on a Mac/Intel/gfortran/64-bit */" (comment) "/* platform, the output was: */" (comment) "/* Planet Mass(GMS/GM) ID Code Rings? */" (comment) "/* ------- ------------- ------- ------ */" (comment) "/* EARTH 398600.436 399 F */" (comment) "/* JUPITER 126712767.881 599 T */" (comment) "/* MARS 42828.314 499 F */" (comment) "/* MERCURY 22032.080 199 F */" (comment) "/* NEPTUNE 6836534.065 899 T */" (comment) "/* SATURN 37940626.068 699 T */" (comment) "/* URANUS 5794559.128 799 T */" (comment) "/* VENUS 324858.599 299 F */" (comment) "/* $ Restrictions */" (comment) "/* None. */" (comment) "/* $ Literature_References */" (comment) "/* None. */" (comment) "/* $ Author_and_Institution */" (comment) "/* <NAME> (ODC Space) */" (comment) "/* <NAME> (JPL) */" (comment) "/* <NAME> (JPL) */" (comment) "/* $ Version */" (comment) "/* - SPICELIB Version 1.1.0, 04-JUL-2021 (JDR) */" (comment) "/* Added IMPLICIT NONE statement. */" (comment) "/* Edited the header to comply with NAIF standard. */" (comment) "/* Added complete code example. */" (comment) "/* - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */" (comment) "/* Comment section for permuted index source lines was added */" (comment) "/* following the header. */" (comment) "/* - SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) */" (comment) "/* -& */" (comment) "/* $ Index_Entries */" (comment) "/* order of a character array */" (comment) "/* -& */" (comment) "/* Local variables */" (comment) "/* Begin with the initial ordering. */" (expression_statement) "i__1 = *ndim;" (assignment_expression) "i__1 = *ndim" (identifier) "i__1" (=) "=" (pointer_expression) "*ndim" (*) "*" (identifier) "ndim" (;) ";" (for_statement) "for (i__ = 1; i__ <= i__1; ++i__) {\n iorder[i__ - 1] = i__;\n }" (for) "for" (() "(" (assignment_expression) "i__ = 1" (identifier) "i__" (=) "=" (number_literal) "1" (;) ";" (binary_expression) "i__ <= i__1" (identifier) "i__" (<=) "<=" (identifier) "i__1" (;) ";" (update_expression) "++i__" (++) "++" (identifier) "i__" ()) ")" (compound_statement) "{\n iorder[i__ - 1] = i__;\n }" ({) "{" (expression_statement) "iorder[i__ - 1] = i__;" (assignment_expression) "iorder[i__ - 1] = i__" (subscript_expression) "iorder[i__ - 1]" (identifier) "iorder" ([) "[" (binary_expression) "i__ - 1" (identifier) "i__" (-) "-" (number_literal) "1" (]) "]" (=) "=" (identifier) "i__" (;) ";" (}) "}" (comment) "/* Find the smallest element, then the next smallest, and so on. */" (comment) "/* This uses the Shell Sort algorithm, but swaps the elements of */" (comment) "/* the order vector instead of the array itself. */" (expression_statement) "gap = *ndim / 2;" (assignment_expression) "gap = *ndim / 2" (identifier) "gap" (=) "=" (binary_expression) "*ndim / 2" (pointer_expression) "*ndim" (*) "*" (identifier) "ndim" (/) "/" (number_literal) "2" (;) ";" (while_statement) "while(gap > 0) {\n i__1 = *ndim;\n for (i__ = gap + 1; i__ <= i__1; ++i__) {\n j = i__ - gap;\n while(j > 0) {\n jg = j + gap;\n if (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)\n ) {\n j = 0;\n } else {\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }\n j -= gap;\n }\n }\n gap /= 2;\n }" (while) "while" (parenthesized_expression) "(gap > 0)" (() "(" (binary_expression) "gap > 0" (identifier) "gap" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n i__1 = *ndim;\n for (i__ = gap + 1; i__ <= i__1; ++i__) {\n j = i__ - gap;\n while(j > 0) {\n jg = j + gap;\n if (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)\n ) {\n j = 0;\n } else {\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }\n j -= gap;\n }\n }\n gap /= 2;\n }" ({) "{" (expression_statement) "i__1 = *ndim;" (assignment_expression) "i__1 = *ndim" (identifier) "i__1" (=) "=" (pointer_expression) "*ndim" (*) "*" (identifier) "ndim" (;) ";" (for_statement) "for (i__ = gap + 1; i__ <= i__1; ++i__) {\n j = i__ - gap;\n while(j > 0) {\n jg = j + gap;\n if (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)\n ) {\n j = 0;\n } else {\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }\n j -= gap;\n }\n }" (for) "for" (() "(" (assignment_expression) "i__ = gap + 1" (identifier) "i__" (=) "=" (binary_expression) "gap + 1" (identifier) "gap" (+) "+" (number_literal) "1" (;) ";" (binary_expression) "i__ <= i__1" (identifier) "i__" (<=) "<=" (identifier) "i__1" (;) ";" (update_expression) "++i__" (++) "++" (identifier) "i__" ()) ")" (compound_statement) "{\n j = i__ - gap;\n while(j > 0) {\n jg = j + gap;\n if (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)\n ) {\n j = 0;\n } else {\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }\n j -= gap;\n }\n }" ({) "{" (expression_statement) "j = i__ - gap;" (assignment_expression) "j = i__ - gap" (identifier) "j" (=) "=" (binary_expression) "i__ - gap" (identifier) "i__" (-) "-" (identifier) "gap" (;) ";" (while_statement) "while(j > 0) {\n jg = j + gap;\n if (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)\n ) {\n j = 0;\n } else {\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }\n j -= gap;\n }" (while) "while" (parenthesized_expression) "(j > 0)" (() "(" (binary_expression) "j > 0" (identifier) "j" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n jg = j + gap;\n if (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)\n ) {\n j = 0;\n } else {\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }\n j -= gap;\n }" ({) "{" (expression_statement) "jg = j + gap;" (assignment_expression) "jg = j + gap" (identifier) "jg" (=) "=" (binary_expression) "j + gap" (identifier) "j" (+) "+" (identifier) "gap" (;) ";" (if_statement) "if (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)\n ) {\n j = 0;\n } else {\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }" (if) "if" (parenthesized_expression) "(l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)\n )" (() "(" (call_expression) "l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)" (identifier) "l_le" (argument_list) "(array + (iorder[j - 1] - 1) * array_len, array + (\n iorder[jg - 1] - 1) * array_len, array_len, array_len)" (() "(" (binary_expression) "array + (iorder[j - 1] - 1) * array_len" (identifier) "array" (+) "+" (binary_expression) "(iorder[j - 1] - 1) * array_len" (parenthesized_expression) "(iorder[j - 1] - 1)" (() "(" (binary_expression) "iorder[j - 1] - 1" (subscript_expression) "iorder[j - 1]" (identifier) "iorder" ([) "[" (binary_expression) "j - 1" (identifier) "j" (-) "-" (number_literal) "1" (]) "]" (-) "-" (number_literal) "1" ()) ")" (*) "*" (identifier) "array_len" (,) "," (binary_expression) "array + (\n iorder[jg - 1] - 1) * array_len" (identifier) "array" (+) "+" (binary_expression) "(\n iorder[jg - 1] - 1) * array_len" (parenthesized_expression) "(\n iorder[jg - 1] - 1)" (() "(" (binary_expression) "iorder[jg - 1] - 1" (subscript_expression) "iorder[jg - 1]" (identifier) "iorder" ([) "[" (binary_expression) "jg - 1" (identifier) "jg" (-) "-" (number_literal) "1" (]) "]" (-) "-" (number_literal) "1" ()) ")" (*) "*" (identifier) "array_len" (,) "," (identifier) "array_len" (,) "," (identifier) "array_len" ()) ")" ()) ")" (compound_statement) "{\n j = 0;\n }" ({) "{" (expression_statement) "j = 0;" (assignment_expression) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (}) "}" (else_clause) "else {\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }" (else) "else" (compound_statement) "{\n swapi_(&iorder[j - 1], &iorder[jg - 1]);\n }" ({) "{" (expression_statement) "swapi_(&iorder[j - 1], &iorder[jg - 1]);" (call_expression) "swapi_(&iorder[j - 1], &iorder[jg - 1])" (identifier) "swapi_" (argument_list) "(&iorder[j - 1], &iorder[jg - 1])" (() "(" (pointer_expression) "&iorder[j - 1]" (&) "&" (subscript_expression) "iorder[j - 1]" (identifier) "iorder" ([) "[" (binary_expression) "j - 1" (identifier) "j" (-) "-" (number_literal) "1" (]) "]" (,) "," (pointer_expression) "&iorder[jg - 1]" (&) "&" (subscript_expression) "iorder[jg - 1]" (identifier) "iorder" ([) "[" (binary_expression) "jg - 1" (identifier) "jg" (-) "-" (number_literal) "1" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "j -= gap;" (assignment_expression) "j -= gap" (identifier) "j" (-=) "-=" (identifier) "gap" (;) ";" (}) "}" (}) "}" (expression_statement) "gap /= 2;" (assignment_expression) "gap /= 2" (identifier) "gap" (/=) "/=" (number_literal) "2" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (comment) "/* orderc_ */"
501
0
{"language": "c", "success": true, "metadata": {"lines": 207, "avg_line_length": 41.41, "nodes": 223, "errors": 0, "source_hash": "65da4137aeb35a99602d5b93ed25f10007d373024548b8667316b0a1b2170a84", "categorized_nodes": 162}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"f2c.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"f2c.h\"", "parent": 0, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 16}}, {"id": 3, "type": "function_definition", "text": "int orderc_(char *array, integer *ndim, integer *iorder, \n\tftnlen array_len)\n{\n /* System generated locals */\n integer i__1;\n\n /* Builtin functions */\n logical l_le(char *, char *, ftnlen, ftnlen);\n\n /* Local variables */\n integer i__, j;\n extern /* Subroutine */ int swapi_(integer *, integer *);\n integer jg, gap;\n\n/* $ Abstract */\n\n/* Determine the order of elements in an array of character strings. */\n\n/* $ Disclaimer */\n\n/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */\n/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */\n/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */\n/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */\n/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED \"AS-IS\" */\n/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */\n/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */\n/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */\n/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */\n/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */\n\n/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */\n/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */\n/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */\n/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */\n/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */\n/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */\n\n/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */\n/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */\n/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */\n/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */\n\n/* $ Required_Reading */\n\n/* None. */\n\n/* $ Keywords */\n\n/* ARRAY */\n/* SORT */\n\n/* $ Declarations */\n/* $ Brief_I/O */\n\n/* VARIABLE I/O DESCRIPTION */\n/* -------- --- -------------------------------------------------- */\n/* ARRAY I Input array. */\n/* NDIM I Dimension of ARRAY. */\n/* IORDER O Order vector for ARRAY. */\n\n/* $ Detailed_Input */\n\n/* ARRAY is the input array. */\n\n/* NDIM is the number of elements in the input array. */\n\n/* $ Detailed_Output */\n\n/* IORDER is the order vector for the input array. */\n/* IORDER(1) is the index of the smallest element */\n/* of ARRAY; IORDER(2) is the index of the next */\n/* smallest; and so on. Strings are ordered according */\n/* to the ASCII collating sequence. */\n\n/* $ Parameters */\n\n/* None. */\n\n/* $ Exceptions */\n\n/* Error free. */\n\n/* $ Files */\n\n/* None. */\n\n/* $ Particulars */\n\n/* ORDERC finds the index of the smallest element of the input */\n/* array. This becomes the first element of the order vector. */\n/* The process is repeated for the rest of the elements. */\n\n/* The order vector returned by ORDERC may be used by any of */\n/* the REORD routines to sort sets of related arrays, as shown */\n/* in the example below. */\n\n/* $ Examples */\n\n/* The numerical results shown for this example may differ across */\n/* platforms. The results depend on the SPICE kernels used as */\n/* input, the compiler and supporting libraries, and the machine */\n/* specific arithmetic implementation. */\n\n/* 1) Sort four related arrays (containing the names, masses, */\n/* integer ID codes, and flags indicating whether they have */\n/* a ring system, for a group of planets). */\n\n\n/* Example code begins here. */\n\n\n/* PROGRAM ORDERC_EX1 */\n/* IMPLICIT NONE */\n\n/* C */\n/* C Local constants. */\n/* C */\n/* INTEGER NDIM */\n/* PARAMETER ( NDIM = 8 ) */\n\n/* INTEGER STRLEN */\n/* PARAMETER ( STRLEN = 7 ) */\n\n/* C */\n/* C Local variables. */\n/* C */\n/* CHARACTER*(STRLEN) NAMES ( NDIM ) */\n\n/* DOUBLE PRECISION MASSES ( NDIM ) */\n\n/* INTEGER CODES ( NDIM ) */\n/* INTEGER I */\n/* INTEGER IORDER ( NDIM ) */\n\n/* LOGICAL RINGS ( NDIM ) */\n\n/* C */\n/* C Set the arrays containing the names, masses (given as */\n/* C ratios to of Solar GM to barycenter GM), integer ID */\n/* C codes, and flags indicating whether they have a ring */\n/* C system. */\n/* C */\n/* DATA NAMES / */\n/* . 'MERCURY', 'VENUS', 'EARTH', 'MARS', */\n/* . 'JUPITER', 'SATURN', 'URANUS', 'NEPTUNE' / */\n\n/* DATA MASSES / */\n/* . 22032.080D0, 324858.599D0, */\n/* . 398600.436D0, 42828.314D0, */\n/* . 126712767.881D0, 37940626.068D0, */\n/* . 5794559.128D0, 6836534.065D0 / */\n\n/* DATA CODES / 199, 299, 399, 499, */\n/* . 599, 699, 799, 899 / */\n\n/* DATA RINGS / */\n/* . .FALSE., .FALSE., .FALSE., .FALSE., */\n/* . .TRUE., .TRUE., .TRUE., .TRUE. / */\n\n/* C */\n/* C Sort the object arrays by name. */\n/* C */\n/* CALL ORDERC ( NAMES, NDIM, IORDER ) */\n\n/* CALL REORDC ( IORDER, NDIM, NAMES ) */\n/* CALL REORDD ( IORDER, NDIM, MASSES ) */\n/* CALL REORDI ( IORDER, NDIM, CODES ) */\n/* CALL REORDL ( IORDER, NDIM, RINGS ) */\n\n/* C */\n/* C Output the resulting table. */\n/* C */\n/* WRITE(*,'(A)') ' Planet Mass(GMS/GM) ID Code Rings?' */\n/* WRITE(*,'(A)') '------- ------------- ------- ------' */\n\n/* DO I = 1, NDIM */\n\n/* WRITE(*,'(A,F15.3,I9,L5)') NAMES(I), MASSES(I), */\n/* . CODES(I), RINGS(I) */\n\n/* END DO */\n\n/* END */\n\n\n/* When this program was executed on a Mac/Intel/gfortran/64-bit */\n/* platform, the output was: */\n\n\n/* Planet Mass(GMS/GM) ID Code Rings? */\n/* ------- ------------- ------- ------ */\n/* EARTH 398600.436 399 F */\n/* JUPITER 126712767.881 599 T */\n/* MARS 42828.314 499 F */\n/* MERCURY 22032.080 199 F */\n/* NEPTUNE 6836534.065 899 T */\n/* SATURN 37940626.068 699 T */\n/* URANUS 5794559.128 799 T */\n/* VENUS 324858.599 299 F */\n\n\n/* $ Restrictions */\n\n/* None. */\n\n/* $ Literature_References */\n\n/* None. */\n\n/* $ Author_and_Institution */\n\n/* <NAME> (ODC Space) */\n/* <NAME> (JPL) */\n/* <NAME> (JPL) */\n\n/* $ Version */\n\n/* - SPICELIB Version 1.1.0, 04-JUL-2021 (JDR) */\n\n/* Added IMPLICIT NONE statement. */\n\n/* Edited the header to comply with NAIF standard. */\n/* Added complete code example. */\n\n/* - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */\n\n/* Comment section for permuted index source lines was added */\n/* following the header. */\n\n/* - SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) */\n\n/* -& */\n/* $ Index_Entries */\n\n/* order of a character array */\n\n/* -& */\n\n/* Local variables */\n\n\n/* Begin with the initial ordering. */\n\n i__1 = *ndim;\n for (i__ = 1; i__ <= i__1; ++i__) {\n\tiorder[i__ - 1] = i__;\n }\n\n/* Find the smallest element, then the next smallest, and so on. */\n/* This uses the Shell Sort algorithm, but swaps the elements of */\n/* the order vector instead of the array itself. */\n\n gap = *ndim / 2;\n while(gap > 0) {\n\ti__1 = *ndim;\n\tfor (i__ = gap + 1; i__ <= i__1; ++i__) {\n\t j = i__ - gap;\n\t while(j > 0) {\n\t\tjg = j + gap;\n\t\tif (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n\t\t\tiorder[jg - 1] - 1) * array_len, array_len, array_len)\n\t\t\t) {\n\t\t j = 0;\n\t\t} else {\n\t\t swapi_(&iorder[j - 1], &iorder[jg - 1]);\n\t\t}\n\t\tj -= gap;\n\t }\n\t}\n\tgap /= 2;\n }\n return 0;\n}", "parent": null, "children": [4, 5], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 281, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "int", "parent": 3, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 20}}, {"id": 5, "type": "function_declarator", "text": "orderc_(char *array, integer *ndim, integer *iorder, \n\tftnlen array_len)", "parent": 3, "children": [6, 7], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 9, "column": 18}}, {"id": 6, "type": "identifier", "text": "orderc_", "parent": 5, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 28}}, {"id": 7, "type": "parameter_list", "text": "(char *array, integer *ndim, integer *iorder, \n\tftnlen array_len)", "parent": 5, "children": [8, 13, 18, 23], "start_point": {"row": 8, "column": 28}, "end_point": {"row": 9, "column": 18}}, {"id": 8, "type": "parameter_declaration", "text": "char *array", "parent": 7, "children": [9, 10], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 40}}, {"id": 9, "type": "primitive_type", "text": "char", "parent": 8, "children": [], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 33}}, {"id": 10, "type": "pointer_declarator", "text": "*array", "parent": 8, "children": [11, 12], "start_point": {"row": 8, "column": 34}, "end_point": {"row": 8, "column": 40}}, {"id": 11, "type": "*", "text": "*", "parent": 10, "children": [], "start_point": {"row": 8, "column": 34}, "end_point": {"row": 8, "column": 35}}, {"id": 12, "type": "identifier", "text": "array", "parent": 10, "children": [], "start_point": {"row": 8, "column": 35}, "end_point": {"row": 8, "column": 40}}, {"id": 13, "type": "parameter_declaration", "text": "integer *ndim", "parent": 7, "children": [14, 15], "start_point": {"row": 8, "column": 42}, "end_point": {"row": 8, "column": 55}}, {"id": 14, "type": "type_identifier", "text": "integer", "parent": 13, "children": [], "start_point": {"row": 8, "column": 42}, "end_point": {"row": 8, "column": 49}}, {"id": 15, "type": "pointer_declarator", "text": "*ndim", "parent": 13, "children": [16, 17], "start_point": {"row": 8, "column": 50}, "end_point": {"row": 8, "column": 55}}, {"id": 16, "type": "*", "text": "*", "parent": 15, "children": [], "start_point": {"row": 8, "column": 50}, "end_point": {"row": 8, "column": 51}}, {"id": 17, "type": "identifier", "text": "ndim", "parent": 15, "children": [], "start_point": {"row": 8, "column": 51}, "end_point": {"row": 8, "column": 55}}, {"id": 18, "type": "parameter_declaration", "text": "integer *iorder", "parent": 7, "children": [19, 20], "start_point": {"row": 8, "column": 57}, "end_point": {"row": 8, "column": 72}}, {"id": 19, "type": "type_identifier", "text": "integer", "parent": 18, "children": [], "start_point": {"row": 8, "column": 57}, "end_point": {"row": 8, "column": 64}}, {"id": 20, "type": "pointer_declarator", "text": "*iorder", "parent": 18, "children": [21, 22], "start_point": {"row": 8, "column": 65}, "end_point": {"row": 8, "column": 72}}, {"id": 21, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 8, "column": 65}, "end_point": {"row": 8, "column": 66}}, {"id": 22, "type": "identifier", "text": "iorder", "parent": 20, "children": [], "start_point": {"row": 8, "column": 66}, "end_point": {"row": 8, "column": 72}}, {"id": 23, "type": "parameter_declaration", "text": "ftnlen array_len", "parent": 7, "children": [24, 25], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 17}}, {"id": 24, "type": "type_identifier", "text": "ftnlen", "parent": 23, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 7}}, {"id": 25, "type": "identifier", "text": "array_len", "parent": 23, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 17}}, {"id": 26, "type": "declaration", "text": "integer i__1;", "parent": 3, "children": [27, 28], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 17}}, {"id": 27, "type": "type_identifier", "text": "integer", "parent": 26, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 11}}, {"id": 28, "type": "identifier", "text": "i__1", "parent": 26, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 16}}, {"id": 29, "type": "declaration", "text": "logical l_le(char *, char *, ftnlen, ftnlen);", "parent": 3, "children": [30, 31], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 49}}, {"id": 30, "type": "type_identifier", "text": "logical", "parent": 29, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 11}}, {"id": 31, "type": "function_declarator", "text": "l_le(char *, char *, ftnlen, ftnlen)", "parent": 29, "children": [32, 33], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 48}}, {"id": 32, "type": "identifier", "text": "l_le", "parent": 31, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 16}}, {"id": 33, "type": "parameter_list", "text": "(char *, char *, ftnlen, ftnlen)", "parent": 31, "children": [34, 38, 42, 44], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 48}}, {"id": 34, "type": "parameter_declaration", "text": "char *", "parent": 33, "children": [35, 36], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 23}}, {"id": 35, "type": "primitive_type", "text": "char", "parent": 34, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 21}}, {"id": 36, "type": "abstract_pointer_declarator", "text": "*", "parent": 34, "children": [37], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 23}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 23}}, {"id": 38, "type": "parameter_declaration", "text": "char *", "parent": 33, "children": [39, 40], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 31}}, {"id": 39, "type": "primitive_type", "text": "char", "parent": 38, "children": [], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 29}}, {"id": 40, "type": "abstract_pointer_declarator", "text": "*", "parent": 38, "children": [41], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 31}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 31}}, {"id": 42, "type": "parameter_declaration", "text": "ftnlen", "parent": 33, "children": [43], "start_point": {"row": 15, "column": 33}, "end_point": {"row": 15, "column": 39}}, {"id": 43, "type": "type_identifier", "text": "ftnlen", "parent": 42, "children": [], "start_point": {"row": 15, "column": 33}, "end_point": {"row": 15, "column": 39}}, {"id": 44, "type": "parameter_declaration", "text": "ftnlen", "parent": 33, "children": [45], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 47}}, {"id": 45, "type": "type_identifier", "text": "ftnlen", "parent": 44, "children": [], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 47}}, {"id": 46, "type": "declaration", "text": "integer i__, j;", "parent": 3, "children": [47, 48, 49], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 19}}, {"id": 47, "type": "type_identifier", "text": "integer", "parent": 46, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 11}}, {"id": 48, "type": "identifier", "text": "i__", "parent": 46, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 15}}, {"id": 49, "type": "identifier", "text": "j", "parent": 46, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 18}}, {"id": 50, "type": "declaration", "text": "extern /* Subroutine */ int swapi_(integer *, integer *);", "parent": 3, "children": [51, 53, 54], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 61}}, {"id": 51, "type": "storage_class_specifier", "text": "extern", "parent": 50, "children": [52], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 10}}, {"id": 52, "type": "extern", "text": "extern", "parent": 51, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 10}}, {"id": 53, "type": "primitive_type", "text": "int", "parent": 50, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 31}}, {"id": 54, "type": "function_declarator", "text": "swapi_(integer *, integer *)", "parent": 50, "children": [55, 56], "start_point": {"row": 19, "column": 32}, "end_point": {"row": 19, "column": 60}}, {"id": 55, "type": "identifier", "text": "swapi_", "parent": 54, "children": [], "start_point": {"row": 19, "column": 32}, "end_point": {"row": 19, "column": 38}}, {"id": 56, "type": "parameter_list", "text": "(integer *, integer *)", "parent": 54, "children": [57, 61], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 60}}, {"id": 57, "type": "parameter_declaration", "text": "integer *", "parent": 56, "children": [58, 59], "start_point": {"row": 19, "column": 39}, "end_point": {"row": 19, "column": 48}}, {"id": 58, "type": "type_identifier", "text": "integer", "parent": 57, "children": [], "start_point": {"row": 19, "column": 39}, "end_point": {"row": 19, "column": 46}}, {"id": 59, "type": "abstract_pointer_declarator", "text": "*", "parent": 57, "children": [60], "start_point": {"row": 19, "column": 47}, "end_point": {"row": 19, "column": 48}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 19, "column": 47}, "end_point": {"row": 19, "column": 48}}, {"id": 61, "type": "parameter_declaration", "text": "integer *", "parent": 56, "children": [62, 63], "start_point": {"row": 19, "column": 50}, "end_point": {"row": 19, "column": 59}}, {"id": 62, "type": "type_identifier", "text": "integer", "parent": 61, "children": [], "start_point": {"row": 19, "column": 50}, "end_point": {"row": 19, "column": 57}}, {"id": 63, "type": "abstract_pointer_declarator", "text": "*", "parent": 61, "children": [64], "start_point": {"row": 19, "column": 58}, "end_point": {"row": 19, "column": 59}}, {"id": 64, "type": "*", "text": "*", "parent": 63, "children": [], "start_point": {"row": 19, "column": 58}, "end_point": {"row": 19, "column": 59}}, {"id": 65, "type": "declaration", "text": "integer jg, gap;", "parent": 3, "children": [66, 67, 68], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 20}}, {"id": 66, "type": "type_identifier", "text": "integer", "parent": 65, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 11}}, {"id": 67, "type": "identifier", "text": "jg", "parent": 65, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 14}}, {"id": 68, "type": "identifier", "text": "gap", "parent": 65, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 19}}, {"id": 69, "type": "assignment_expression", "text": "i__1 = *ndim", "parent": 3, "children": [70, 71, 72], "start_point": {"row": 252, "column": 4}, "end_point": {"row": 252, "column": 16}}, {"id": 70, "type": "identifier", "text": "i__1", "parent": 69, "children": [], "start_point": {"row": 252, "column": 4}, "end_point": {"row": 252, "column": 8}}, {"id": 71, "type": "=", "text": "=", "parent": 69, "children": [], "start_point": {"row": 252, "column": 9}, "end_point": {"row": 252, "column": 10}}, {"id": 72, "type": "pointer_expression", "text": "*ndim", "parent": 69, "children": [73, 74], "start_point": {"row": 252, "column": 11}, "end_point": {"row": 252, "column": 16}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 252, "column": 11}, "end_point": {"row": 252, "column": 12}}, {"id": 74, "type": "identifier", "text": "ndim", "parent": 72, "children": [], "start_point": {"row": 252, "column": 12}, "end_point": {"row": 252, "column": 16}}, {"id": 75, "type": "for_statement", "text": "for (i__ = 1; i__ <= i__1; ++i__) {\n\tiorder[i__ - 1] = i__;\n }", "parent": 3, "children": [76, 80, 84], "start_point": {"row": 253, "column": 4}, "end_point": {"row": 255, "column": 5}}, {"id": 76, "type": "assignment_expression", "text": "i__ = 1", "parent": 75, "children": [77, 78, 79], "start_point": {"row": 253, "column": 9}, "end_point": {"row": 253, "column": 16}}, {"id": 77, "type": "identifier", "text": "i__", "parent": 76, "children": [], "start_point": {"row": 253, "column": 9}, "end_point": {"row": 253, "column": 12}}, {"id": 78, "type": "=", "text": "=", "parent": 76, "children": [], "start_point": {"row": 253, "column": 13}, "end_point": {"row": 253, "column": 14}}, {"id": 79, "type": "number_literal", "text": "1", "parent": 76, "children": [], "start_point": {"row": 253, "column": 15}, "end_point": {"row": 253, "column": 16}}, {"id": 80, "type": "binary_expression", "text": "i__ <= i__1", "parent": 75, "children": [81, 82, 83], "start_point": {"row": 253, "column": 18}, "end_point": {"row": 253, "column": 29}}, {"id": 81, "type": "identifier", "text": "i__", "parent": 80, "children": [], "start_point": {"row": 253, "column": 18}, "end_point": {"row": 253, "column": 21}}, {"id": 82, "type": "<=", "text": "<=", "parent": 80, "children": [], "start_point": {"row": 253, "column": 22}, "end_point": {"row": 253, "column": 24}}, {"id": 83, "type": "identifier", "text": "i__1", "parent": 80, "children": [], "start_point": {"row": 253, "column": 25}, "end_point": {"row": 253, "column": 29}}, {"id": 84, "type": "update_expression", "text": "++i__", "parent": 75, "children": [85, 86], "start_point": {"row": 253, "column": 31}, "end_point": {"row": 253, "column": 36}}, {"id": 85, "type": "++", "text": "++", "parent": 84, "children": [], "start_point": {"row": 253, "column": 31}, "end_point": {"row": 253, "column": 33}}, {"id": 86, "type": "identifier", "text": "i__", "parent": 84, "children": [], "start_point": {"row": 253, "column": 33}, "end_point": {"row": 253, "column": 36}}, {"id": 87, "type": "assignment_expression", "text": "iorder[i__ - 1] = i__", "parent": 75, "children": [88, 94, 95], "start_point": {"row": 254, "column": 1}, "end_point": {"row": 254, "column": 22}}, {"id": 88, "type": "subscript_expression", "text": "iorder[i__ - 1]", "parent": 87, "children": [89, 90], "start_point": {"row": 254, "column": 1}, "end_point": {"row": 254, "column": 16}}, {"id": 89, "type": "identifier", "text": "iorder", "parent": 88, "children": [], "start_point": {"row": 254, "column": 1}, "end_point": {"row": 254, "column": 7}}, {"id": 90, "type": "binary_expression", "text": "i__ - 1", "parent": 88, "children": [91, 92, 93], "start_point": {"row": 254, "column": 8}, "end_point": {"row": 254, "column": 15}}, {"id": 91, "type": "identifier", "text": "i__", "parent": 90, "children": [], "start_point": {"row": 254, "column": 8}, "end_point": {"row": 254, "column": 11}}, {"id": 92, "type": "-", "text": "-", "parent": 90, "children": [], "start_point": {"row": 254, "column": 12}, "end_point": {"row": 254, "column": 13}}, {"id": 93, "type": "number_literal", "text": "1", "parent": 90, "children": [], "start_point": {"row": 254, "column": 14}, "end_point": {"row": 254, "column": 15}}, {"id": 94, "type": "=", "text": "=", "parent": 87, "children": [], "start_point": {"row": 254, "column": 17}, "end_point": {"row": 254, "column": 18}}, {"id": 95, "type": "identifier", "text": "i__", "parent": 87, "children": [], "start_point": {"row": 254, "column": 19}, "end_point": {"row": 254, "column": 22}}, {"id": 96, "type": "assignment_expression", "text": "gap = *ndim / 2", "parent": 3, "children": [97, 98, 99], "start_point": {"row": 261, "column": 4}, "end_point": {"row": 261, "column": 19}}, {"id": 97, "type": "identifier", "text": "gap", "parent": 96, "children": [], "start_point": {"row": 261, "column": 4}, "end_point": {"row": 261, "column": 7}}, {"id": 98, "type": "=", "text": "=", "parent": 96, "children": [], "start_point": {"row": 261, "column": 8}, "end_point": {"row": 261, "column": 9}}, {"id": 99, "type": "binary_expression", "text": "*ndim / 2", "parent": 96, "children": [100, 103, 104], "start_point": {"row": 261, "column": 10}, "end_point": {"row": 261, "column": 19}}, {"id": 100, "type": "pointer_expression", "text": "*ndim", "parent": 99, "children": [101, 102], "start_point": {"row": 261, "column": 10}, "end_point": {"row": 261, "column": 15}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 261, "column": 10}, "end_point": {"row": 261, "column": 11}}, {"id": 102, "type": "identifier", "text": "ndim", "parent": 100, "children": [], "start_point": {"row": 261, "column": 11}, "end_point": {"row": 261, "column": 15}}, {"id": 103, "type": "/", "text": "/", "parent": 99, "children": [], "start_point": {"row": 261, "column": 16}, "end_point": {"row": 261, "column": 17}}, {"id": 104, "type": "number_literal", "text": "2", "parent": 99, "children": [], "start_point": {"row": 261, "column": 18}, "end_point": {"row": 261, "column": 19}}, {"id": 105, "type": "while_statement", "text": "while(gap > 0) {\n\ti__1 = *ndim;\n\tfor (i__ = gap + 1; i__ <= i__1; ++i__) {\n\t j = i__ - gap;\n\t while(j > 0) {\n\t\tjg = j + gap;\n\t\tif (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n\t\t\tiorder[jg - 1] - 1) * array_len, array_len, array_len)\n\t\t\t) {\n\t\t j = 0;\n\t\t} else {\n\t\t swapi_(&iorder[j - 1], &iorder[jg - 1]);\n\t\t}\n\t\tj -= gap;\n\t }\n\t}\n\tgap /= 2;\n }", "parent": 3, "children": [106], "start_point": {"row": 262, "column": 4}, "end_point": {"row": 279, "column": 5}}, {"id": 106, "type": "parenthesized_expression", "text": "(gap > 0)", "parent": 105, "children": [107], "start_point": {"row": 262, "column": 9}, "end_point": {"row": 262, "column": 18}}, {"id": 107, "type": "binary_expression", "text": "gap > 0", "parent": 106, "children": [108, 109, 110], "start_point": {"row": 262, "column": 10}, "end_point": {"row": 262, "column": 17}}, {"id": 108, "type": "identifier", "text": "gap", "parent": 107, "children": [], "start_point": {"row": 262, "column": 10}, "end_point": {"row": 262, "column": 13}}, {"id": 109, "type": ">", "text": ">", "parent": 107, "children": [], "start_point": {"row": 262, "column": 14}, "end_point": {"row": 262, "column": 15}}, {"id": 110, "type": "number_literal", "text": "0", "parent": 107, "children": [], "start_point": {"row": 262, "column": 16}, "end_point": {"row": 262, "column": 17}}, {"id": 111, "type": "assignment_expression", "text": "i__1 = *ndim", "parent": 105, "children": [112, 113, 114], "start_point": {"row": 263, "column": 1}, "end_point": {"row": 263, "column": 13}}, {"id": 112, "type": "identifier", "text": "i__1", "parent": 111, "children": [], "start_point": {"row": 263, "column": 1}, "end_point": {"row": 263, "column": 5}}, {"id": 113, "type": "=", "text": "=", "parent": 111, "children": [], "start_point": {"row": 263, "column": 6}, "end_point": {"row": 263, "column": 7}}, {"id": 114, "type": "pointer_expression", "text": "*ndim", "parent": 111, "children": [115, 116], "start_point": {"row": 263, "column": 8}, "end_point": {"row": 263, "column": 13}}, {"id": 115, "type": "*", "text": "*", "parent": 114, "children": [], "start_point": {"row": 263, "column": 8}, "end_point": {"row": 263, "column": 9}}, {"id": 116, "type": "identifier", "text": "ndim", "parent": 114, "children": [], "start_point": {"row": 263, "column": 9}, "end_point": {"row": 263, "column": 13}}, {"id": 117, "type": "for_statement", "text": "for (i__ = gap + 1; i__ <= i__1; ++i__) {\n\t j = i__ - gap;\n\t while(j > 0) {\n\t\tjg = j + gap;\n\t\tif (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n\t\t\tiorder[jg - 1] - 1) * array_len, array_len, array_len)\n\t\t\t) {\n\t\t j = 0;\n\t\t} else {\n\t\t swapi_(&iorder[j - 1], &iorder[jg - 1]);\n\t\t}\n\t\tj -= gap;\n\t }\n\t}", "parent": 105, "children": [118, 125, 129], "start_point": {"row": 264, "column": 1}, "end_point": {"row": 277, "column": 2}}, {"id": 118, "type": "assignment_expression", "text": "i__ = gap + 1", "parent": 117, "children": [119, 120, 121], "start_point": {"row": 264, "column": 6}, "end_point": {"row": 264, "column": 19}}, {"id": 119, "type": "identifier", "text": "i__", "parent": 118, "children": [], "start_point": {"row": 264, "column": 6}, "end_point": {"row": 264, "column": 9}}, {"id": 120, "type": "=", "text": "=", "parent": 118, "children": [], "start_point": {"row": 264, "column": 10}, "end_point": {"row": 264, "column": 11}}, {"id": 121, "type": "binary_expression", "text": "gap + 1", "parent": 118, "children": [122, 123, 124], "start_point": {"row": 264, "column": 12}, "end_point": {"row": 264, "column": 19}}, {"id": 122, "type": "identifier", "text": "gap", "parent": 121, "children": [], "start_point": {"row": 264, "column": 12}, "end_point": {"row": 264, "column": 15}}, {"id": 123, "type": "+", "text": "+", "parent": 121, "children": [], "start_point": {"row": 264, "column": 16}, "end_point": {"row": 264, "column": 17}}, {"id": 124, "type": "number_literal", "text": "1", "parent": 121, "children": [], "start_point": {"row": 264, "column": 18}, "end_point": {"row": 264, "column": 19}}, {"id": 125, "type": "binary_expression", "text": "i__ <= i__1", "parent": 117, "children": [126, 127, 128], "start_point": {"row": 264, "column": 21}, "end_point": {"row": 264, "column": 32}}, {"id": 126, "type": "identifier", "text": "i__", "parent": 125, "children": [], "start_point": {"row": 264, "column": 21}, "end_point": {"row": 264, "column": 24}}, {"id": 127, "type": "<=", "text": "<=", "parent": 125, "children": [], "start_point": {"row": 264, "column": 25}, "end_point": {"row": 264, "column": 27}}, {"id": 128, "type": "identifier", "text": "i__1", "parent": 125, "children": [], "start_point": {"row": 264, "column": 28}, "end_point": {"row": 264, "column": 32}}, {"id": 129, "type": "update_expression", "text": "++i__", "parent": 117, "children": [130, 131], "start_point": {"row": 264, "column": 34}, "end_point": {"row": 264, "column": 39}}, {"id": 130, "type": "++", "text": "++", "parent": 129, "children": [], "start_point": {"row": 264, "column": 34}, "end_point": {"row": 264, "column": 36}}, {"id": 131, "type": "identifier", "text": "i__", "parent": 129, "children": [], "start_point": {"row": 264, "column": 36}, "end_point": {"row": 264, "column": 39}}, {"id": 132, "type": "assignment_expression", "text": "j = i__ - gap", "parent": 117, "children": [133, 134, 135], "start_point": {"row": 265, "column": 5}, "end_point": {"row": 265, "column": 18}}, {"id": 133, "type": "identifier", "text": "j", "parent": 132, "children": [], "start_point": {"row": 265, "column": 5}, "end_point": {"row": 265, "column": 6}}, {"id": 134, "type": "=", "text": "=", "parent": 132, "children": [], "start_point": {"row": 265, "column": 7}, "end_point": {"row": 265, "column": 8}}, {"id": 135, "type": "binary_expression", "text": "i__ - gap", "parent": 132, "children": [136, 137, 138], "start_point": {"row": 265, "column": 9}, "end_point": {"row": 265, "column": 18}}, {"id": 136, "type": "identifier", "text": "i__", "parent": 135, "children": [], "start_point": {"row": 265, "column": 9}, "end_point": {"row": 265, "column": 12}}, {"id": 137, "type": "-", "text": "-", "parent": 135, "children": [], "start_point": {"row": 265, "column": 13}, "end_point": {"row": 265, "column": 14}}, {"id": 138, "type": "identifier", "text": "gap", "parent": 135, "children": [], "start_point": {"row": 265, "column": 15}, "end_point": {"row": 265, "column": 18}}, {"id": 139, "type": "while_statement", "text": "while(j > 0) {\n\t\tjg = j + gap;\n\t\tif (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n\t\t\tiorder[jg - 1] - 1) * array_len, array_len, array_len)\n\t\t\t) {\n\t\t j = 0;\n\t\t} else {\n\t\t swapi_(&iorder[j - 1], &iorder[jg - 1]);\n\t\t}\n\t\tj -= gap;\n\t }", "parent": 117, "children": [140], "start_point": {"row": 266, "column": 5}, "end_point": {"row": 276, "column": 6}}, {"id": 140, "type": "parenthesized_expression", "text": "(j > 0)", "parent": 139, "children": [141], "start_point": {"row": 266, "column": 10}, "end_point": {"row": 266, "column": 17}}, {"id": 141, "type": "binary_expression", "text": "j > 0", "parent": 140, "children": [142, 143, 144], "start_point": {"row": 266, "column": 11}, "end_point": {"row": 266, "column": 16}}, {"id": 142, "type": "identifier", "text": "j", "parent": 141, "children": [], "start_point": {"row": 266, "column": 11}, "end_point": {"row": 266, "column": 12}}, {"id": 143, "type": ">", "text": ">", "parent": 141, "children": [], "start_point": {"row": 266, "column": 13}, "end_point": {"row": 266, "column": 14}}, {"id": 144, "type": "number_literal", "text": "0", "parent": 141, "children": [], "start_point": {"row": 266, "column": 15}, "end_point": {"row": 266, "column": 16}}, {"id": 145, "type": "assignment_expression", "text": "jg = j + gap", "parent": 139, "children": [146, 147, 148], "start_point": {"row": 267, "column": 2}, "end_point": {"row": 267, "column": 14}}, {"id": 146, "type": "identifier", "text": "jg", "parent": 145, "children": [], "start_point": {"row": 267, "column": 2}, "end_point": {"row": 267, "column": 4}}, {"id": 147, "type": "=", "text": "=", "parent": 145, "children": [], "start_point": {"row": 267, "column": 5}, "end_point": {"row": 267, "column": 6}}, {"id": 148, "type": "binary_expression", "text": "j + gap", "parent": 145, "children": [149, 150, 151], "start_point": {"row": 267, "column": 7}, "end_point": {"row": 267, "column": 14}}, {"id": 149, "type": "identifier", "text": "j", "parent": 148, "children": [], "start_point": {"row": 267, "column": 7}, "end_point": {"row": 267, "column": 8}}, {"id": 150, "type": "+", "text": "+", "parent": 148, "children": [], "start_point": {"row": 267, "column": 9}, "end_point": {"row": 267, "column": 10}}, {"id": 151, "type": "identifier", "text": "gap", "parent": 148, "children": [], "start_point": {"row": 267, "column": 11}, "end_point": {"row": 267, "column": 14}}, {"id": 152, "type": "if_statement", "text": "if (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n\t\t\tiorder[jg - 1] - 1) * array_len, array_len, array_len)\n\t\t\t) {\n\t\t j = 0;\n\t\t} else {\n\t\t swapi_(&iorder[j - 1], &iorder[jg - 1]);\n\t\t}", "parent": 139, "children": [153, 195], "start_point": {"row": 268, "column": 2}, "end_point": {"row": 274, "column": 3}}, {"id": 153, "type": "parenthesized_expression", "text": "(l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n\t\t\tiorder[jg - 1] - 1) * array_len, array_len, array_len)\n\t\t\t)", "parent": 152, "children": [154], "start_point": {"row": 268, "column": 5}, "end_point": {"row": 270, "column": 4}}, {"id": 154, "type": "call_expression", "text": "l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n\t\t\tiorder[jg - 1] - 1) * array_len, array_len, array_len)", "parent": 153, "children": [155, 156], "start_point": {"row": 268, "column": 6}, "end_point": {"row": 269, "column": 57}}, {"id": 155, "type": "identifier", "text": "l_le", "parent": 154, "children": [], "start_point": {"row": 268, "column": 6}, "end_point": {"row": 268, "column": 10}}, {"id": 156, "type": "argument_list", "text": "(array + (iorder[j - 1] - 1) * array_len, array + (\n\t\t\tiorder[jg - 1] - 1) * array_len, array_len, array_len)", "parent": 154, "children": [157, 173, 189, 190], "start_point": {"row": 268, "column": 10}, "end_point": {"row": 269, "column": 57}}, {"id": 157, "type": "binary_expression", "text": "array + (iorder[j - 1] - 1) * array_len", "parent": 156, "children": [158, 159, 160], "start_point": {"row": 268, "column": 11}, "end_point": {"row": 268, "column": 50}}, {"id": 158, "type": "identifier", "text": "array", "parent": 157, "children": [], "start_point": {"row": 268, "column": 11}, "end_point": {"row": 268, "column": 16}}, {"id": 159, "type": "+", "text": "+", "parent": 157, "children": [], "start_point": {"row": 268, "column": 17}, "end_point": {"row": 268, "column": 18}}, {"id": 160, "type": "binary_expression", "text": "(iorder[j - 1] - 1) * array_len", "parent": 157, "children": [161, 171, 172], "start_point": {"row": 268, "column": 19}, "end_point": {"row": 268, "column": 50}}, {"id": 161, "type": "parenthesized_expression", "text": "(iorder[j - 1] - 1)", "parent": 160, "children": [162], "start_point": {"row": 268, "column": 19}, "end_point": {"row": 268, "column": 38}}, {"id": 162, "type": "binary_expression", "text": "iorder[j - 1] - 1", "parent": 161, "children": [163, 169, 170], "start_point": {"row": 268, "column": 20}, "end_point": {"row": 268, "column": 37}}, {"id": 163, "type": "subscript_expression", "text": "iorder[j - 1]", "parent": 162, "children": [164, 165], "start_point": {"row": 268, "column": 20}, "end_point": {"row": 268, "column": 33}}, {"id": 164, "type": "identifier", "text": "iorder", "parent": 163, "children": [], "start_point": {"row": 268, "column": 20}, "end_point": {"row": 268, "column": 26}}, {"id": 165, "type": "binary_expression", "text": "j - 1", "parent": 163, "children": [166, 167, 168], "start_point": {"row": 268, "column": 27}, "end_point": {"row": 268, "column": 32}}, {"id": 166, "type": "identifier", "text": "j", "parent": 165, "children": [], "start_point": {"row": 268, "column": 27}, "end_point": {"row": 268, "column": 28}}, {"id": 167, "type": "-", "text": "-", "parent": 165, "children": [], "start_point": {"row": 268, "column": 29}, "end_point": {"row": 268, "column": 30}}, {"id": 168, "type": "number_literal", "text": "1", "parent": 165, "children": [], "start_point": {"row": 268, "column": 31}, "end_point": {"row": 268, "column": 32}}, {"id": 169, "type": "-", "text": "-", "parent": 162, "children": [], "start_point": {"row": 268, "column": 34}, "end_point": {"row": 268, "column": 35}}, {"id": 170, "type": "number_literal", "text": "1", "parent": 162, "children": [], "start_point": {"row": 268, "column": 36}, "end_point": {"row": 268, "column": 37}}, {"id": 171, "type": "*", "text": "*", "parent": 160, "children": [], "start_point": {"row": 268, "column": 39}, "end_point": {"row": 268, "column": 40}}, {"id": 172, "type": "identifier", "text": "array_len", "parent": 160, "children": [], "start_point": {"row": 268, "column": 41}, "end_point": {"row": 268, "column": 50}}, {"id": 173, "type": "binary_expression", "text": "array + (\n\t\t\tiorder[jg - 1] - 1) * array_len", "parent": 156, "children": [174, 175, 176], "start_point": {"row": 268, "column": 52}, "end_point": {"row": 269, "column": 34}}, {"id": 174, "type": "identifier", "text": "array", "parent": 173, "children": [], "start_point": {"row": 268, "column": 52}, "end_point": {"row": 268, "column": 57}}, {"id": 175, "type": "+", "text": "+", "parent": 173, "children": [], "start_point": {"row": 268, "column": 58}, "end_point": {"row": 268, "column": 59}}, {"id": 176, "type": "binary_expression", "text": "(\n\t\t\tiorder[jg - 1] - 1) * array_len", "parent": 173, "children": [177, 187, 188], "start_point": {"row": 268, "column": 60}, "end_point": {"row": 269, "column": 34}}, {"id": 177, "type": "parenthesized_expression", "text": "(\n\t\t\tiorder[jg - 1] - 1)", "parent": 176, "children": [178], "start_point": {"row": 268, "column": 60}, "end_point": {"row": 269, "column": 22}}, {"id": 178, "type": "binary_expression", "text": "iorder[jg - 1] - 1", "parent": 177, "children": [179, 185, 186], "start_point": {"row": 269, "column": 3}, "end_point": {"row": 269, "column": 21}}, {"id": 179, "type": "subscript_expression", "text": "iorder[jg - 1]", "parent": 178, "children": [180, 181], "start_point": {"row": 269, "column": 3}, "end_point": {"row": 269, "column": 17}}, {"id": 180, "type": "identifier", "text": "iorder", "parent": 179, "children": [], "start_point": {"row": 269, "column": 3}, "end_point": {"row": 269, "column": 9}}, {"id": 181, "type": "binary_expression", "text": "jg - 1", "parent": 179, "children": [182, 183, 184], "start_point": {"row": 269, "column": 10}, "end_point": {"row": 269, "column": 16}}, {"id": 182, "type": "identifier", "text": "jg", "parent": 181, "children": [], "start_point": {"row": 269, "column": 10}, "end_point": {"row": 269, "column": 12}}, {"id": 183, "type": "-", "text": "-", "parent": 181, "children": [], "start_point": {"row": 269, "column": 13}, "end_point": {"row": 269, "column": 14}}, {"id": 184, "type": "number_literal", "text": "1", "parent": 181, "children": [], "start_point": {"row": 269, "column": 15}, "end_point": {"row": 269, "column": 16}}, {"id": 185, "type": "-", "text": "-", "parent": 178, "children": [], "start_point": {"row": 269, "column": 18}, "end_point": {"row": 269, "column": 19}}, {"id": 186, "type": "number_literal", "text": "1", "parent": 178, "children": [], "start_point": {"row": 269, "column": 20}, "end_point": {"row": 269, "column": 21}}, {"id": 187, "type": "*", "text": "*", "parent": 176, "children": [], "start_point": {"row": 269, "column": 23}, "end_point": {"row": 269, "column": 24}}, {"id": 188, "type": "identifier", "text": "array_len", "parent": 176, "children": [], "start_point": {"row": 269, "column": 25}, "end_point": {"row": 269, "column": 34}}, {"id": 189, "type": "identifier", "text": "array_len", "parent": 156, "children": [], "start_point": {"row": 269, "column": 36}, "end_point": {"row": 269, "column": 45}}, {"id": 190, "type": "identifier", "text": "array_len", "parent": 156, "children": [], "start_point": {"row": 269, "column": 47}, "end_point": {"row": 269, "column": 56}}, {"id": 191, "type": "assignment_expression", "text": "j = 0", "parent": 152, "children": [192, 193, 194], "start_point": {"row": 271, "column": 6}, "end_point": {"row": 271, "column": 11}}, {"id": 192, "type": "identifier", "text": "j", "parent": 191, "children": [], "start_point": {"row": 271, "column": 6}, "end_point": {"row": 271, "column": 7}}, {"id": 193, "type": "=", "text": "=", "parent": 191, "children": [], "start_point": {"row": 271, "column": 8}, "end_point": {"row": 271, "column": 9}}, {"id": 194, "type": "number_literal", "text": "0", "parent": 191, "children": [], "start_point": {"row": 271, "column": 10}, "end_point": {"row": 271, "column": 11}}, {"id": 195, "type": "else_clause", "text": "else {\n\t\t swapi_(&iorder[j - 1], &iorder[jg - 1]);\n\t\t}", "parent": 152, "children": [], "start_point": {"row": 272, "column": 4}, "end_point": {"row": 274, "column": 3}}, {"id": 196, "type": "call_expression", "text": "swapi_(&iorder[j - 1], &iorder[jg - 1])", "parent": 195, "children": [197, 198], "start_point": {"row": 273, "column": 6}, "end_point": {"row": 273, "column": 45}}, {"id": 197, "type": "identifier", "text": "swapi_", "parent": 196, "children": [], "start_point": {"row": 273, "column": 6}, "end_point": {"row": 273, "column": 12}}, {"id": 198, "type": "argument_list", "text": "(&iorder[j - 1], &iorder[jg - 1])", "parent": 196, "children": [199, 206], "start_point": {"row": 273, "column": 12}, "end_point": {"row": 273, "column": 45}}, {"id": 199, "type": "pointer_expression", "text": "&iorder[j - 1]", "parent": 198, "children": [200], "start_point": {"row": 273, "column": 13}, "end_point": {"row": 273, "column": 27}}, {"id": 200, "type": "subscript_expression", "text": "iorder[j - 1]", "parent": 199, "children": [201, 202], "start_point": {"row": 273, "column": 14}, "end_point": {"row": 273, "column": 27}}, {"id": 201, "type": "identifier", "text": "iorder", "parent": 200, "children": [], "start_point": {"row": 273, "column": 14}, "end_point": {"row": 273, "column": 20}}, {"id": 202, "type": "binary_expression", "text": "j - 1", "parent": 200, "children": [203, 204, 205], "start_point": {"row": 273, "column": 21}, "end_point": {"row": 273, "column": 26}}, {"id": 203, "type": "identifier", "text": "j", "parent": 202, "children": [], "start_point": {"row": 273, "column": 21}, "end_point": {"row": 273, "column": 22}}, {"id": 204, "type": "-", "text": "-", "parent": 202, "children": [], "start_point": {"row": 273, "column": 23}, "end_point": {"row": 273, "column": 24}}, {"id": 205, "type": "number_literal", "text": "1", "parent": 202, "children": [], "start_point": {"row": 273, "column": 25}, "end_point": {"row": 273, "column": 26}}, {"id": 206, "type": "pointer_expression", "text": "&iorder[jg - 1]", "parent": 198, "children": [207], "start_point": {"row": 273, "column": 29}, "end_point": {"row": 273, "column": 44}}, {"id": 207, "type": "subscript_expression", "text": "iorder[jg - 1]", "parent": 206, "children": [208, 209], "start_point": {"row": 273, "column": 30}, "end_point": {"row": 273, "column": 44}}, {"id": 208, "type": "identifier", "text": "iorder", "parent": 207, "children": [], "start_point": {"row": 273, "column": 30}, "end_point": {"row": 273, "column": 36}}, {"id": 209, "type": "binary_expression", "text": "jg - 1", "parent": 207, "children": [210, 211, 212], "start_point": {"row": 273, "column": 37}, "end_point": {"row": 273, "column": 43}}, {"id": 210, "type": "identifier", "text": "jg", "parent": 209, "children": [], "start_point": {"row": 273, "column": 37}, "end_point": {"row": 273, "column": 39}}, {"id": 211, "type": "-", "text": "-", "parent": 209, "children": [], "start_point": {"row": 273, "column": 40}, "end_point": {"row": 273, "column": 41}}, {"id": 212, "type": "number_literal", "text": "1", "parent": 209, "children": [], "start_point": {"row": 273, "column": 42}, "end_point": {"row": 273, "column": 43}}, {"id": 213, "type": "assignment_expression", "text": "j -= gap", "parent": 139, "children": [214, 215, 216], "start_point": {"row": 275, "column": 2}, "end_point": {"row": 275, "column": 10}}, {"id": 214, "type": "identifier", "text": "j", "parent": 213, "children": [], "start_point": {"row": 275, "column": 2}, "end_point": {"row": 275, "column": 3}}, {"id": 215, "type": "-=", "text": "-=", "parent": 213, "children": [], "start_point": {"row": 275, "column": 4}, "end_point": {"row": 275, "column": 6}}, {"id": 216, "type": "identifier", "text": "gap", "parent": 213, "children": [], "start_point": {"row": 275, "column": 7}, "end_point": {"row": 275, "column": 10}}, {"id": 217, "type": "assignment_expression", "text": "gap /= 2", "parent": 105, "children": [218, 219, 220], "start_point": {"row": 278, "column": 1}, "end_point": {"row": 278, "column": 9}}, {"id": 218, "type": "identifier", "text": "gap", "parent": 217, "children": [], "start_point": {"row": 278, "column": 1}, "end_point": {"row": 278, "column": 4}}, {"id": 219, "type": "/=", "text": "/=", "parent": 217, "children": [], "start_point": {"row": 278, "column": 5}, "end_point": {"row": 278, "column": 7}}, {"id": 220, "type": "number_literal", "text": "2", "parent": 217, "children": [], "start_point": {"row": 278, "column": 8}, "end_point": {"row": 278, "column": 9}}, {"id": 221, "type": "return_statement", "text": "return 0;", "parent": 3, "children": [222], "start_point": {"row": 280, "column": 4}, "end_point": {"row": 280, "column": 13}}, {"id": 222, "type": "number_literal", "text": "0", "parent": 221, "children": [], "start_point": {"row": 280, "column": 11}, "end_point": {"row": 280, "column": 12}}]}, "node_categories": {"declarations": {"functions": [3, 5, 31, 54], "variables": [8, 13, 18, 23, 26, 29, 34, 38, 42, 44, 46, 50, 57, 61, 65], "classes": [51], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [72, 80, 84, 88, 90, 99, 100, 106, 107, 114, 121, 125, 129, 135, 140, 141, 148, 153, 154, 157, 160, 161, 162, 163, 165, 173, 176, 177, 178, 179, 181, 196, 199, 200, 202, 206, 207, 209], "assignments": [69, 76, 87, 96, 111, 118, 132, 145, 191, 213, 217], "loops": [75, 105, 117, 139], "conditionals": [6, 12, 14, 17, 19, 22, 24, 25, 27, 28, 30, 32, 43, 45, 47, 48, 49, 55, 58, 62, 66, 67, 68, 70, 74, 77, 81, 83, 86, 89, 91, 95, 97, 102, 108, 112, 116, 119, 122, 126, 128, 131, 133, 136, 138, 142, 146, 149, 151, 152, 155, 158, 164, 166, 172, 174, 180, 182, 188, 189, 190, 192, 197, 201, 203, 208, 210, 214, 216, 218], "returns": [221], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 79, 93, 104, 110, 124, 144, 168, 170, 184, 186, 194, 205, 212, 220, 222], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "orderc_", "text_snippet": "int orderc_(char *array, integer *ndim, integer *iorder, \n\tftnlen array_len)\n{\n /* System generat"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "orderc_(char *array, integer *ndim, integer *iorder, \n\tftnlen array_len)"}, {"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "l_le(char *, char *, ftnlen, ftnlen)"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "swapi_(integer *, integer *)"}], "class_declarations": [{"node_id": 51, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 0, "text": "#include \"f2c.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/* orderc.f -- translated by f2c (version 19980913).\n You must link the resulting object file with the libraries:\n\t-lf2c -lm (in that order)\n*/\n\n#include \"f2c.h\"\n\n/* $Procedure ORDERC ( Order of a character array ) */\n/* Subroutine */ int orderc_(char *array, integer *ndim, integer *iorder, \n\tftnlen array_len)\n{\n /* System generated locals */\n integer i__1;\n\n /* Builtin functions */\n logical l_le(char *, char *, ftnlen, ftnlen);\n\n /* Local variables */\n integer i__, j;\n extern /* Subroutine */ int swapi_(integer *, integer *);\n integer jg, gap;\n\n/* $ Abstract */\n\n/* Determine the order of elements in an array of character strings. */\n\n/* $ Disclaimer */\n\n/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */\n/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */\n/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */\n/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */\n/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED \"AS-IS\" */\n/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */\n/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */\n/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */\n/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */\n/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */\n\n/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */\n/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */\n/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */\n/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */\n/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */\n/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */\n\n/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */\n/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */\n/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */\n/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */\n\n/* $ Required_Reading */\n\n/* None. */\n\n/* $ Keywords */\n\n/* ARRAY */\n/* SORT */\n\n/* $ Declarations */\n/* $ Brief_I/O */\n\n/* VARIABLE I/O DESCRIPTION */\n/* -------- --- -------------------------------------------------- */\n/* ARRAY I Input array. */\n/* NDIM I Dimension of ARRAY. */\n/* IORDER O Order vector for ARRAY. */\n\n/* $ Detailed_Input */\n\n/* ARRAY is the input array. */\n\n/* NDIM is the number of elements in the input array. */\n\n/* $ Detailed_Output */\n\n/* IORDER is the order vector for the input array. */\n/* IORDER(1) is the index of the smallest element */\n/* of ARRAY; IORDER(2) is the index of the next */\n/* smallest; and so on. Strings are ordered according */\n/* to the ASCII collating sequence. */\n\n/* $ Parameters */\n\n/* None. */\n\n/* $ Exceptions */\n\n/* Error free. */\n\n/* $ Files */\n\n/* None. */\n\n/* $ Particulars */\n\n/* ORDERC finds the index of the smallest element of the input */\n/* array. This becomes the first element of the order vector. */\n/* The process is repeated for the rest of the elements. */\n\n/* The order vector returned by ORDERC may be used by any of */\n/* the REORD routines to sort sets of related arrays, as shown */\n/* in the example below. */\n\n/* $ Examples */\n\n/* The numerical results shown for this example may differ across */\n/* platforms. The results depend on the SPICE kernels used as */\n/* input, the compiler and supporting libraries, and the machine */\n/* specific arithmetic implementation. */\n\n/* 1) Sort four related arrays (containing the names, masses, */\n/* integer ID codes, and flags indicating whether they have */\n/* a ring system, for a group of planets). */\n\n\n/* Example code begins here. */\n\n\n/* PROGRAM ORDERC_EX1 */\n/* IMPLICIT NONE */\n\n/* C */\n/* C Local constants. */\n/* C */\n/* INTEGER NDIM */\n/* PARAMETER ( NDIM = 8 ) */\n\n/* INTEGER STRLEN */\n/* PARAMETER ( STRLEN = 7 ) */\n\n/* C */\n/* C Local variables. */\n/* C */\n/* CHARACTER*(STRLEN) NAMES ( NDIM ) */\n\n/* DOUBLE PRECISION MASSES ( NDIM ) */\n\n/* INTEGER CODES ( NDIM ) */\n/* INTEGER I */\n/* INTEGER IORDER ( NDIM ) */\n\n/* LOGICAL RINGS ( NDIM ) */\n\n/* C */\n/* C Set the arrays containing the names, masses (given as */\n/* C ratios to of Solar GM to barycenter GM), integer ID */\n/* C codes, and flags indicating whether they have a ring */\n/* C system. */\n/* C */\n/* DATA NAMES / */\n/* . 'MERCURY', 'VENUS', 'EARTH', 'MARS', */\n/* . 'JUPITER', 'SATURN', 'URANUS', 'NEPTUNE' / */\n\n/* DATA MASSES / */\n/* . 22032.080D0, 324858.599D0, */\n/* . 398600.436D0, 42828.314D0, */\n/* . 126712767.881D0, 37940626.068D0, */\n/* . 5794559.128D0, 6836534.065D0 / */\n\n/* DATA CODES / 199, 299, 399, 499, */\n/* . 599, 699, 799, 899 / */\n\n/* DATA RINGS / */\n/* . .FALSE., .FALSE., .FALSE., .FALSE., */\n/* . .TRUE., .TRUE., .TRUE., .TRUE. / */\n\n/* C */\n/* C Sort the object arrays by name. */\n/* C */\n/* CALL ORDERC ( NAMES, NDIM, IORDER ) */\n\n/* CALL REORDC ( IORDER, NDIM, NAMES ) */\n/* CALL REORDD ( IORDER, NDIM, MASSES ) */\n/* CALL REORDI ( IORDER, NDIM, CODES ) */\n/* CALL REORDL ( IORDER, NDIM, RINGS ) */\n\n/* C */\n/* C Output the resulting table. */\n/* C */\n/* WRITE(*,'(A)') ' Planet Mass(GMS/GM) ID Code Rings?' */\n/* WRITE(*,'(A)') '------- ------------- ------- ------' */\n\n/* DO I = 1, NDIM */\n\n/* WRITE(*,'(A,F15.3,I9,L5)') NAMES(I), MASSES(I), */\n/* . CODES(I), RINGS(I) */\n\n/* END DO */\n\n/* END */\n\n\n/* When this program was executed on a Mac/Intel/gfortran/64-bit */\n/* platform, the output was: */\n\n\n/* Planet Mass(GMS/GM) ID Code Rings? */\n/* ------- ------------- ------- ------ */\n/* EARTH 398600.436 399 F */\n/* JUPITER 126712767.881 599 T */\n/* MARS 42828.314 499 F */\n/* MERCURY 22032.080 199 F */\n/* NEPTUNE 6836534.065 899 T */\n/* SATURN 37940626.068 699 T */\n/* URANUS 5794559.128 799 T */\n/* VENUS 324858.599 299 F */\n\n\n/* $ Restrictions */\n\n/* None. */\n\n/* $ Literature_References */\n\n/* None. */\n\n/* $ Author_and_Institution */\n\n/* <NAME> (ODC Space) */\n/* <NAME> (JPL) */\n/* <NAME> (JPL) */\n\n/* $ Version */\n\n/* - SPICELIB Version 1.1.0, 04-JUL-2021 (JDR) */\n\n/* Added IMPLICIT NONE statement. */\n\n/* Edited the header to comply with NAIF standard. */\n/* Added complete code example. */\n\n/* - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */\n\n/* Comment section for permuted index source lines was added */\n/* following the header. */\n\n/* - SPICELIB Version 1.0.0, 31-JAN-1990 (IMU) */\n\n/* -& */\n/* $ Index_Entries */\n\n/* order of a character array */\n\n/* -& */\n\n/* Local variables */\n\n\n/* Begin with the initial ordering. */\n\n i__1 = *ndim;\n for (i__ = 1; i__ <= i__1; ++i__) {\n\tiorder[i__ - 1] = i__;\n }\n\n/* Find the smallest element, then the next smallest, and so on. */\n/* This uses the Shell Sort algorithm, but swaps the elements of */\n/* the order vector instead of the array itself. */\n\n gap = *ndim / 2;\n while(gap > 0) {\n\ti__1 = *ndim;\n\tfor (i__ = gap + 1; i__ <= i__1; ++i__) {\n\t j = i__ - gap;\n\t while(j > 0) {\n\t\tjg = j + gap;\n\t\tif (l_le(array + (iorder[j - 1] - 1) * array_len, array + (\n\t\t\tiorder[jg - 1] - 1) * array_len, array_len, array_len)\n\t\t\t) {\n\t\t j = 0;\n\t\t} else {\n\t\t swapi_(&iorder[j - 1], &iorder[jg - 1]);\n\t\t}\n\t\tj -= gap;\n\t }\n\t}\n\tgap /= 2;\n }\n return 0;\n} /* orderc_ */\n\n"}
355
c
#ifndef ORGADD_H #define ORGADD_H #include <QDir> #include <QFile> #include <QString> #include <QIODevice> #include <QDebug> #include <stdio.h> #include <Windows.h> #define MAX_SIZE_PACKET 1024*10 class orgadd { public: orgadd(char* parpall); private: void loadoui(); QString orglib; }; #endif // ORGADD_H
13
23
(translation_unit) "#ifndef ORGADD_H\n#define ORGADD_H\n\n\n#include <QDir>\n#include <QFile>\n#include <QString>\n#include <QIODevice>\n#include <QDebug>\n\n#include <stdio.h>\n#include <Windows.h>\n\n\n#define MAX_SIZE_PACKET 1024*10\n\n\nclass orgadd\n{\npublic:\n\n orgadd(char* parpall);\n\n\n\nprivate:\n\n void loadoui();\n QString orglib;\n\n};\n\n#endif // ORGADD_H\n" (preproc_ifdef) "#ifndef ORGADD_H\n#define ORGADD_H\n\n\n#include <QDir>\n#include <QFile>\n#include <QString>\n#include <QIODevice>\n#include <QDebug>\n\n#include <stdio.h>\n#include <Windows.h>\n\n\n#define MAX_SIZE_PACKET 1024*10\n\n\nclass orgadd\n{\npublic:\n\n orgadd(char* parpall);\n\n\n\nprivate:\n\n void loadoui();\n QString orglib;\n\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "ORGADD_H" (preproc_def) "#define ORGADD_H\n" (#define) "#define" (identifier) "ORGADD_H" (preproc_include) "#include <QDir>\n" (#include) "#include" (system_lib_string) "<QDir>" (preproc_include) "#include <QFile>\n" (#include) "#include" (system_lib_string) "<QFile>" (preproc_include) "#include <QString>\n" (#include) "#include" (system_lib_string) "<QString>" (preproc_include) "#include <QIODevice>\n" (#include) "#include" (system_lib_string) "<QIODevice>" (preproc_include) "#include <QDebug>\n" (#include) "#include" (system_lib_string) "<QDebug>" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <Windows.h>\n" (#include) "#include" (system_lib_string) "<Windows.h>" (preproc_def) "#define MAX_SIZE_PACKET 1024*10\n" (#define) "#define" (identifier) "MAX_SIZE_PACKET" (preproc_arg) "1024*10" (function_definition) "class orgadd\n{\npublic:\n\n orgadd(char* parpall);\n\n\n\nprivate:\n\n void loadoui();\n QString orglib;\n\n}" (type_identifier) "class" (identifier) "orgadd" (compound_statement) "{\npublic:\n\n orgadd(char* parpall);\n\n\n\nprivate:\n\n void loadoui();\n QString orglib;\n\n}" ({) "{" (labeled_statement) "public:\n\n orgadd(char* parpall);" (statement_identifier) "public" (:) ":" (expression_statement) "orgadd(char* parpall);" (call_expression) "orgadd(char* parpall)" (identifier) "orgadd" (argument_list) "(char* parpall)" (() "(" (binary_expression) "char* parpall" (identifier) "char" (*) "*" (identifier) "parpall" ()) ")" (;) ";" (labeled_statement) "private:\n\n void loadoui();" (statement_identifier) "private" (:) ":" (declaration) "void loadoui();" (primitive_type) "void" (function_declarator) "loadoui()" (identifier) "loadoui" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "QString orglib;" (type_identifier) "QString" (identifier) "orglib" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// ORGADD_H"
71
0
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 13.0, "nodes": 51, "errors": 0, "source_hash": "aefa91e68ced33d9b3c0bf4a209f071c1ea9f83f92a030b5ac57c99d0fa5dfc3", "categorized_nodes": 40}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef ORGADD_H\n#define ORGADD_H\n\n\n#include <QDir>\n#include <QFile>\n#include <QString>\n#include <QIODevice>\n#include <QDebug>\n\n#include <stdio.h>\n#include <Windows.h>\n\n\n#define MAX_SIZE_PACKET 1024*10\n\n\nclass orgadd\n{\npublic:\n\n orgadd(char* parpall);\n\n\n\nprivate:\n\n void loadoui();\n QString orglib;\n\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 31, 50], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 32, "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": "ORGADD_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 16}}, {"id": 3, "type": "preproc_def", "text": "#define ORGADD_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": "ORGADD_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include <QDir>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<QDir>", "parent": 6, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 15}}, {"id": 9, "type": "preproc_include", "text": "#include <QFile>\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": "<QFile>", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 16}}, {"id": 12, "type": "preproc_include", "text": "#include <QString>\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": "<QString>", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include <QIODevice>\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": "<QIODevice>", "parent": 15, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 20}}, {"id": 18, "type": "preproc_include", "text": "#include <QDebug>\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": "<QDebug>", "parent": 18, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 17}}, {"id": 21, "type": "preproc_include", "text": "#include <stdio.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": "system_lib_string", "text": "<stdio.h>", "parent": 21, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 18}}, {"id": 24, "type": "preproc_include", "text": "#include <Windows.h>\n", "parent": 0, "children": [25, 26], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<Windows.h>", "parent": 24, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 20}}, {"id": 27, "type": "preproc_def", "text": "#define MAX_SIZE_PACKET 1024*10\n", "parent": 0, "children": [28, 29, 30], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 28, "type": "#define", "text": "#define", "parent": 27, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 29, "type": "identifier", "text": "MAX_SIZE_PACKET", "parent": 27, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 23}}, {"id": 30, "type": "preproc_arg", "text": "1024*10", "parent": 27, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 31}}, {"id": 31, "type": "function_definition", "text": "class orgadd\n{\npublic:\n\n orgadd(char* parpall);\n\n\n\nprivate:\n\n void loadoui();\n QString orglib;\n\n}", "parent": 0, "children": [32], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 32, "type": "identifier", "text": "orgadd", "parent": 31, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 12}}, {"id": 33, "type": "labeled_statement", "text": "public:\n\n orgadd(char* parpall);", "parent": 31, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 21, "column": 26}}, {"id": 34, "type": "call_expression", "text": "orgadd(char* parpall)", "parent": 33, "children": [35, 36], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 25}}, {"id": 35, "type": "identifier", "text": "orgadd", "parent": 34, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 10}}, {"id": 36, "type": "argument_list", "text": "(char* parpall)", "parent": 34, "children": [37], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 25}}, {"id": 37, "type": "binary_expression", "text": "char* parpall", "parent": 36, "children": [38, 39, 40], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 24}}, {"id": 38, "type": "identifier", "text": "char", "parent": 37, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 15}}, {"id": 39, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 16}}, {"id": 40, "type": "identifier", "text": "parpall", "parent": 37, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 24}}, {"id": 41, "type": "labeled_statement", "text": "private:\n\n void loadoui();", "parent": 31, "children": [42], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 27, "column": 19}}, {"id": 42, "type": "declaration", "text": "void loadoui();", "parent": 41, "children": [43, 44], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 19}}, {"id": 43, "type": "primitive_type", "text": "void", "parent": 42, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 8}}, {"id": 44, "type": "function_declarator", "text": "loadoui()", "parent": 42, "children": [45, 46], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 18}}, {"id": 45, "type": "identifier", "text": "loadoui", "parent": 44, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 16}}, {"id": 46, "type": "parameter_list", "text": "()", "parent": 44, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 18}}, {"id": 47, "type": "declaration", "text": "QString orglib;", "parent": 31, "children": [48, 49], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 19}}, {"id": 48, "type": "type_identifier", "text": "QString", "parent": 47, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 11}}, {"id": 49, "type": "identifier", "text": "orglib", "parent": 47, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 18}}, {"id": 50, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 6}}]}, "node_categories": {"declarations": {"functions": [31, 44], "variables": [42, 47], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25], "modules": [], "enums": []}, "statements": {"expressions": [34, 37], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 29, 32, 35, 38, 40, 45, 48, 49, 50], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 31, "universal_type": "function", "name": "orgadd", "text_snippet": "class orgadd\n{\npublic:\n\n orgadd(char* parpall);\n\n\n\nprivate:\n\n void loadoui();\n QString orgl"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "loadoui()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <QDir>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <QFile>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <QString>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <QIODevice>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <QDebug>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <stdio.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <Windows.h>\n"}, {"node_id": 25, "text": "#include"}]}, "original_source_code": "#ifndef ORGADD_H\n#define ORGADD_H\n\n\n#include <QDir>\n#include <QFile>\n#include <QString>\n#include <QIODevice>\n#include <QDebug>\n\n#include <stdio.h>\n#include <Windows.h>\n\n\n#define MAX_SIZE_PACKET 1024*10\n\n\nclass orgadd\n{\npublic:\n\n orgadd(char* parpall);\n\n\n\nprivate:\n\n void loadoui();\n QString orglib;\n\n};\n\n#endif // ORGADD_H\n"}
356
c
#pragma once #include "LuaBaseValue.h" // Lua Base Value // author by <NAME> // 2017/06/14 //string Value Type class LuaStringValue :public LuaBaseValue { public: virtual std::string toString() { return std::string(getCStringValue()); }; const char* getCStringValue() { return static_cast<const char*>(m_data); }; };
21.8
15
(translation_unit) "#pragma once \n#include "LuaBaseValue.h" \n// Lua Base Value \n// author by <NAME> \n// 2017/06/14 \n \n//string Value Type \nclass LuaStringValue :public LuaBaseValue \n{ \n public: \n virtual std::string toString() { \n return std::string(getCStringValue()); \n }; \n const char* getCStringValue() { return static_cast<const char*>(m_data); }; \n};" (preproc_call) "#pragma once \n" (preproc_directive) "#pragma" (preproc_arg) "once " (preproc_include) "#include "LuaBaseValue.h" \n" (#include) "#include" (string_literal) ""LuaBaseValue.h"" (") """ (string_content) "LuaBaseValue.h" (") """ (comment) "// Lua Base Value " (comment) "// author by <NAME> " (comment) "// 2017/06/14 " (comment) "//string Value Type " (function_definition) "class LuaStringValue :public LuaBaseValue \n{ \n public: \n virtual std::string toString() { \n return std::string(getCStringValue()); \n }" (type_identifier) "class" (identifier) "LuaStringValue" (ERROR) ":public LuaBaseValue" (:) ":" (identifier) "public" (identifier) "LuaBaseValue" (compound_statement) "{ \n public: \n virtual std::string toString() { \n return std::string(getCStringValue()); \n }" ({) "{" (labeled_statement) "public: \n virtual std::string toString() { \n return std::string(getCStringValue());" (statement_identifier) "public" (ERROR) ": \n virtual std::string toString() { \n return std:" (:) ":" (type_identifier) "virtual" (identifier) "std" (:) ":" (:) ":" (ERROR) "string toString()" (type_identifier) "string" (function_declarator) "toString()" (identifier) "toString" (parameter_list) "()" (() "(" ()) ")" ({) "{" (return) "return" (identifier) "std" (:) ":" (:) ":" (expression_statement) "string(getCStringValue());" (call_expression) "string(getCStringValue())" (identifier) "string" (argument_list) "(getCStringValue())" (() "(" (call_expression) "getCStringValue()" (identifier) "getCStringValue" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "const char* getCStringValue() { return static_cast<const char*>(m_data); }" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* getCStringValue()" (*) "*" (function_declarator) "getCStringValue()" (identifier) "getCStringValue" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return static_cast<const char*>(m_data); }" ({) "{" (return_statement) "return static_cast<const char*>(m_data);" (return) "return" (binary_expression) "static_cast<const char*>(m_data)" (binary_expression) "static_cast<const" (identifier) "static_cast" (<) "<" (identifier) "const" (ERROR) "char*" (identifier) "char" (*) "*" (>) ">" (parenthesized_expression) "(m_data)" (() "(" (identifier) "m_data" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";"
94
5
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 21.8, "nodes": 44, "errors": 0, "source_hash": "6806315a4e9cb24cff8d49f9089f2462764f6530c8c80cb1fe56c98c41c81e86", "categorized_nodes": 27}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once\r", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 13}}, {"id": 3, "type": "preproc_include", "text": "#include \"LuaBaseValue.h\"\r\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"LuaBaseValue.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 25}}, {"id": 6, "type": "function_definition", "text": "class LuaStringValue :public LuaBaseValue\r\n{\r\n\tpublic:\r\n\t\tvirtual std::string toString() {\r\n\t\t\treturn std::string(getCStringValue());\r\n\t\t}", "parent": null, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 12, "column": 3}}, {"id": 7, "type": "identifier", "text": "LuaStringValue", "parent": 6, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 20}}, {"id": 8, "type": "ERROR", "text": ":public LuaBaseValue", "parent": 6, "children": [9], "start_point": {"row": 7, "column": 21}, "end_point": {"row": 7, "column": 41}}, {"id": 9, "type": "identifier", "text": "LuaBaseValue", "parent": 8, "children": [], "start_point": {"row": 7, "column": 29}, "end_point": {"row": 7, "column": 41}}, {"id": 10, "type": "labeled_statement", "text": "public:\r\n\t\tvirtual std::string toString() {\r\n\t\t\treturn std::string(getCStringValue());", "parent": 6, "children": [11], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 11, "column": 41}}, {"id": 11, "type": "ERROR", "text": ":\r\n\t\tvirtual std::string toString() {\r\n\t\t\treturn std:", "parent": 10, "children": [12, 13, 14, 19], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 11, "column": 14}}, {"id": 12, "type": "type_identifier", "text": "virtual", "parent": 11, "children": [], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 9}}, {"id": 13, "type": "identifier", "text": "std", "parent": 11, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 13}}, {"id": 14, "type": "ERROR", "text": "string toString()", "parent": 11, "children": [15, 16], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 32}}, {"id": 15, "type": "type_identifier", "text": "string", "parent": 14, "children": [], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 21}}, {"id": 16, "type": "function_declarator", "text": "toString()", "parent": 14, "children": [17, 18], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 32}}, {"id": 17, "type": "identifier", "text": "toString", "parent": 16, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 30}}, {"id": 18, "type": "parameter_list", "text": "()", "parent": 16, "children": [], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 32}}, {"id": 19, "type": "identifier", "text": "std", "parent": 11, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 13}}, {"id": 20, "type": "call_expression", "text": "string(getCStringValue())", "parent": 10, "children": [21, 22], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 40}}, {"id": 21, "type": "identifier", "text": "string", "parent": 20, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 21}}, {"id": 22, "type": "argument_list", "text": "(getCStringValue())", "parent": 20, "children": [23], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 40}}, {"id": 23, "type": "call_expression", "text": "getCStringValue()", "parent": 22, "children": [24, 25], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 39}}, {"id": 24, "type": "identifier", "text": "getCStringValue", "parent": 23, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 37}}, {"id": 25, "type": "argument_list", "text": "()", "parent": 23, "children": [], "start_point": {"row": 11, "column": 37}, "end_point": {"row": 11, "column": 39}}, {"id": 26, "type": "function_definition", "text": "const char* getCStringValue() { return static_cast<const char*>(m_data); }", "parent": null, "children": [27, 28], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 76}}, {"id": 27, "type": "primitive_type", "text": "char", "parent": 26, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 12}}, {"id": 28, "type": "pointer_declarator", "text": "* getCStringValue()", "parent": 26, "children": [29, 30], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 31}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 13}}, {"id": 30, "type": "function_declarator", "text": "getCStringValue()", "parent": 28, "children": [31, 32], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 31}}, {"id": 31, "type": "identifier", "text": "getCStringValue", "parent": 30, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 29}}, {"id": 32, "type": "parameter_list", "text": "()", "parent": 30, "children": [], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 31}}, {"id": 33, "type": "return_statement", "text": "return static_cast<const char*>(m_data);", "parent": 26, "children": [34], "start_point": {"row": 13, "column": 34}, "end_point": {"row": 13, "column": 74}}, {"id": 34, "type": "binary_expression", "text": "static_cast<const char*>(m_data)", "parent": 33, "children": [35, 38, 41, 42], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 73}}, {"id": 35, "type": "binary_expression", "text": "static_cast<const", "parent": 34, "children": [36, 37], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 58}}, {"id": 36, "type": "identifier", "text": "static_cast", "parent": 35, "children": [], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 52}}, {"id": 37, "type": "<", "text": "<", "parent": 35, "children": [], "start_point": {"row": 13, "column": 52}, "end_point": {"row": 13, "column": 53}}, {"id": 38, "type": "ERROR", "text": "char*", "parent": 34, "children": [39, 40], "start_point": {"row": 13, "column": 59}, "end_point": {"row": 13, "column": 64}}, {"id": 39, "type": "identifier", "text": "char", "parent": 38, "children": [], "start_point": {"row": 13, "column": 59}, "end_point": {"row": 13, "column": 63}}, {"id": 40, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 13, "column": 63}, "end_point": {"row": 13, "column": 64}}, {"id": 41, "type": ">", "text": ">", "parent": 34, "children": [], "start_point": {"row": 13, "column": 64}, "end_point": {"row": 13, "column": 65}}, {"id": 42, "type": "parenthesized_expression", "text": "(m_data)", "parent": 34, "children": [43], "start_point": {"row": 13, "column": 65}, "end_point": {"row": 13, "column": 73}}, {"id": 43, "type": "identifier", "text": "m_data", "parent": 42, "children": [], "start_point": {"row": 13, "column": 66}, "end_point": {"row": 13, "column": 72}}]}, "node_categories": {"declarations": {"functions": [6, 16, 26, 30], "variables": [], "classes": [], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [20, 23, 34, 35, 42], "assignments": [], "loops": [], "conditionals": [7, 9, 12, 13, 15, 17, 19, 21, 24, 31, 36, 39, 43], "returns": [33], "exceptions": []}, "expressions": {"calls": [0], "literals": [5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "LuaStringValue", "text_snippet": "class LuaStringValue :public LuaBaseValue\r\n{\r\n\tpublic:\r\n\t\tvirtual std::string toString() {\r\n\t\t\tretur"}, {"node_id": 16, "universal_type": "function", "name": "unknown", "text_snippet": "toString()"}, {"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "const char* getCStringValue() { return static_cast<const char*>(m_data); }"}, {"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "getCStringValue()"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"LuaBaseValue.h\"\r\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\r\n#include \"LuaBaseValue.h\"\r\n// Lua Base Value\r\n// author by <NAME>\r\n// 2017/06/14\r\n\r\n//string Value Type\r\nclass LuaStringValue :public LuaBaseValue\r\n{\r\n\tpublic:\r\n\t\tvirtual std::string toString() {\r\n\t\t\treturn std::string(getCStringValue());\r\n\t\t};\r\n\t\tconst char* getCStringValue() { return static_cast<const char*>(m_data); };\r\n};"}
357
c
#include "drone.h" #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include "util.h" #include "client.h" #include "dashboard.h" #include "client_message.h" #include "drone_message.h" #include "mothership.h" #include "mothership_message.h" static bool process_message(Drone* drone, DroneMessage* message); static void drone_failure(Drone* drone); static unsigned int compute_sleep_time(Drone* drone); Drone* drone_constructor(unsigned int id, unsigned int maxLoad, unsigned int autonomy, unsigned int rechargingTime, Mothership* motherShip) { Drone* drone = (Drone*) malloc(sizeof(Drone)); drone->id = id; drone->maxLoad = maxLoad; drone->maxAutonomy = drone->autonomy = autonomy; drone->rechargingTime = rechargingTime; drone->motherShip = motherShip; drone->client = NULL; drone->package = NULL; drone->deliverySuccess = false; drone->state = S_ALIVE; check(pthread_mutex_init(&(drone->mutex), NULL),"Drone: pthread_mutex_init failed"); char buffer[10]; sprintf(buffer, "/drone%03d", drone->id); struct mq_attr attr; attr.mq_curmsgs = 0; attr.mq_maxmsg = 10; attr.mq_flags = 0; attr.mq_msgsize = sizeof(DroneMessage); check((drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)), "Drone: mq_open failed"); check(mq_unlink(buffer), "Drone: mq_unlink failed"); return drone; } void drone_free(Drone* drone) { check(pthread_mutex_destroy(&(drone->mutex)),"Drone: pthread_mutex_destroy failed"); check(mq_close(drone->msgQueueID),"Drone: mq_close failed"); free(drone); } void* drone_launch(Drone* drone) { DashboardMessage dashboardMessage; dashboardMessage.type = D_DRONE; dashboardMessage.number = drone->id; dashboardMessage.state = D_DRONE_WAITING; dashboard_sendMessage(global_dashboard, &dashboardMessage); DroneMessage droneMessage; check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed"); while(process_message(drone, &droneMessage)) { check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed"); } pthread_exit(0); } void drone_sendMessage(Drone* drone, DroneMessage* message) { check(mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0), "mq_send failed"); } unsigned int computePowerConsumption(Package* package, double mothershipToClientDistance) { return package->weight + (unsigned int) mothershipToClientDistance; } bool process_message(Drone* drone, DroneMessage* message) { DashboardMessage dashboardMessage; dashboardMessage.type = D_DRONE; dashboardMessage.number = drone->id; switch(message->type) { case MOTHERSHIP_END_OF_DELIVERY: { dashboardMessage.state = D_DRONE_FINISHED; dashboard_sendMessage(global_dashboard, &dashboardMessage); pthread_mutex_lock(&(drone->mutex)); drone->state = S_DEAD; pthread_mutex_unlock(&(drone->mutex)); LOG_INFO("[Drone %03d] poweroff", drone->id); return false; } case MOTHERSHIP_GO_RECHARGE: { dashboardMessage.state = D_DRONE_CHARGING; dashboard_sendMessage(global_dashboard, &dashboardMessage); LOG_INFO("[Drone %03d] Recharging battery", drone->id); sleep(drone->rechargingTime); pthread_mutex_lock(&(drone->mutex)); drone->autonomy = drone->maxAutonomy; pthread_mutex_unlock(&(drone->mutex)); LOG_INFO("[Drone %03d] Battery charged", drone->id); dashboardMessage.state = D_DRONE_WAITING; dashboard_sendMessage(global_dashboard, &dashboardMessage); MothershipMessage mothershipMessage; mothershipMessage.sender_id = drone->id; mothershipMessage.type = DRONE_DONE_CHARGING; mothership_sendMessage(drone->motherShip, &mothershipMessage); break; } case MOTHERSHIP_GO_DELIVER_PACKAGE: { dashboardMessage.state = D_DRONE_FLYING_MTC; dashboard_sendMessage(global_dashboard, &dashboardMessage); LOG_INFO("[Drone %03d] Package", drone->id); pthread_mutex_lock(&(drone->mutex)); unsigned int consumption = computePowerConsumption(drone->package, 5); pthread_mutex_unlock(&(drone->mutex)); drone_failure(drone); sleep(compute_sleep_time(drone)); ClientMessage clientMessage; clientMessage.type = DRONE_PUT_TARGET; pthread_mutex_lock(&(drone->mutex)); client_sendMessage(drone->client, &clientMessage); pthread_mutex_unlock(&(drone->mutex)); sleep(1); // Wait the client before considering him as absent. MothershipMessage mothershipMessage; mothershipMessage.sender_id = drone->id; pthread_mutex_lock(&(drone->mutex)); pthread_mutex_lock(&(drone->client->targetMutex)); if(drone->client->targetInstalled) { dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS; mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS; clientMessage.type = DRONE_DELIVERY_SUCCESS; drone->deliverySuccess = true; } else { dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL; mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL; drone->deliverySuccess = false; if(drone->package->numberOfTryRemaining > 1){ clientMessage.type = DRONE_DELIVERY_FAILURE; } else{ clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE; } } pthread_mutex_unlock(&(drone->client->targetMutex)); pthread_mutex_unlock(&(drone->mutex)); dashboard_sendMessage(global_dashboard, &dashboardMessage); mothership_sendMessage(drone->motherShip, &mothershipMessage); client_sendMessage(drone->client, &clientMessage); drone_failure(drone); sleep(compute_sleep_time(drone)); pthread_mutex_lock(&(drone->mutex)); drone->autonomy -= consumption; pthread_mutex_unlock(&(drone->mutex)); dashboardMessage.state = D_DRONE_WAITING; dashboard_sendMessage(global_dashboard, &dashboardMessage); mothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP; mothership_sendMessage(drone->motherShip, &mothershipMessage); break; } default: break; } return true; } unsigned int compute_sleep_time(Drone* drone) { unsigned int distance = drone->client->distance - 1; // minus 1 to send the target message 1s before arriving return distance > 1 ? distance / 4 : 1; } void drone_failure(Drone* drone) { if ((rand() % 30) == 0) { pthread_mutex_lock(&(drone->mutex)); drone->state = S_DEAD; pthread_mutex_unlock(&(drone->mutex)); MothershipMessage msg; msg.sender_id = drone->id; msg.type = DRONE_DEAD; mothership_sendMessage(drone->motherShip, &msg); DashboardMessage dMsg; dMsg.type = D_DRONE; dMsg.state = D_DRONE_DEAD; dMsg.number = drone->id; dashboard_sendMessage(global_dashboard, &dMsg); if (drone->package != NULL) { dMsg.type = D_PACKAGE; dMsg.state = D_PACKAGE_FAIL; dMsg.number = drone->package->id; dashboard_sendMessage(global_dashboard, &dMsg); } pthread_exit(0); } }
37.28
177
(translation_unit) "#include "drone.h"\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <unistd.h>\n\n#include "util.h"\n#include "client.h"\n#include "dashboard.h"\n#include "client_message.h"\n#include "drone_message.h"\n#include "mothership.h"\n#include "mothership_message.h"\n\nstatic bool process_message(Drone* drone, DroneMessage* message);\nstatic void drone_failure(Drone* drone);\nstatic unsigned int compute_sleep_time(Drone* drone);\n\nDrone* drone_constructor(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n unsigned int rechargingTime, Mothership* motherShip) {\n Drone* drone = (Drone*) malloc(sizeof(Drone));\n drone->id = id;\n drone->maxLoad = maxLoad;\n drone->maxAutonomy = drone->autonomy = autonomy;\n drone->rechargingTime = rechargingTime;\n drone->motherShip = motherShip;\n drone->client = NULL;\n drone->package = NULL;\n drone->deliverySuccess = false;\n drone->state = S_ALIVE;\n\n check(pthread_mutex_init(&(drone->mutex), NULL),"Drone: pthread_mutex_init failed");\n\n char buffer[10];\n sprintf(buffer, "/drone%03d", drone->id);\n struct mq_attr attr;\n attr.mq_curmsgs = 0;\n attr.mq_maxmsg = 10;\n attr.mq_flags = 0;\n attr.mq_msgsize = sizeof(DroneMessage);\n check((drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)), "Drone: mq_open failed");\n check(mq_unlink(buffer), "Drone: mq_unlink failed");\n\n return drone;\n}\n\nvoid drone_free(Drone* drone) {\n check(pthread_mutex_destroy(&(drone->mutex)),"Drone: pthread_mutex_destroy failed");\n check(mq_close(drone->msgQueueID),"Drone: mq_close failed");\n free(drone);\n}\n\nvoid* drone_launch(Drone* drone) {\n DashboardMessage dashboardMessage;\n dashboardMessage.type = D_DRONE;\n dashboardMessage.number = drone->id;\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n DroneMessage droneMessage;\n check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed");\n while(process_message(drone, &droneMessage)) {\n check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed");\n }\n pthread_exit(0);\n}\n\nvoid drone_sendMessage(Drone* drone, DroneMessage* message) {\n check(mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0), "mq_send failed");\n}\n\nunsigned int computePowerConsumption(Package* package, double mothershipToClientDistance) {\n return package->weight + (unsigned int) mothershipToClientDistance;\n}\n\nbool process_message(Drone* drone, DroneMessage* message) {\n DashboardMessage dashboardMessage;\n dashboardMessage.type = D_DRONE;\n dashboardMessage.number = drone->id;\n\n switch(message->type) {\n case MOTHERSHIP_END_OF_DELIVERY: {\n dashboardMessage.state = D_DRONE_FINISHED;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n LOG_INFO("[Drone %03d] poweroff", drone->id);\n return false;\n }\n case MOTHERSHIP_GO_RECHARGE: {\n dashboardMessage.state = D_DRONE_CHARGING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Recharging battery", drone->id);\n sleep(drone->rechargingTime);\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy = drone->maxAutonomy;\n pthread_mutex_unlock(&(drone->mutex));\n\n LOG_INFO("[Drone %03d] Battery charged", drone->id);\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n mothershipMessage.type = DRONE_DONE_CHARGING;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }\n case MOTHERSHIP_GO_DELIVER_PACKAGE: {\n dashboardMessage.state = D_DRONE_FLYING_MTC;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Package", drone->id);\n pthread_mutex_lock(&(drone->mutex));\n unsigned int consumption = computePowerConsumption(drone->package, 5);\n pthread_mutex_unlock(&(drone->mutex));\n\n drone_failure(drone);\n\n sleep(compute_sleep_time(drone));\n ClientMessage clientMessage;\n clientMessage.type = DRONE_PUT_TARGET;\n pthread_mutex_lock(&(drone->mutex));\n client_sendMessage(drone->client, &clientMessage);\n pthread_mutex_unlock(&(drone->mutex));\n sleep(1); // Wait the client before considering him as absent.\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n pthread_mutex_lock(&(drone->mutex));\n pthread_mutex_lock(&(drone->client->targetMutex));\n if(drone->client->targetInstalled) {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n clientMessage.type = DRONE_DELIVERY_SUCCESS;\n drone->deliverySuccess = true;\n } else {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n drone->deliverySuccess = false;\n if(drone->package->numberOfTryRemaining > 1){\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }\n else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }\n }\n pthread_mutex_unlock(&(drone->client->targetMutex));\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n client_sendMessage(drone->client, &clientMessage);\n\n drone_failure(drone);\n sleep(compute_sleep_time(drone));\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy -= consumption;\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n mothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }\n default:\n break;\n }\n return true;\n}\n\nunsigned int compute_sleep_time(Drone* drone) {\n unsigned int distance = drone->client->distance - 1;\n // minus 1 to send the target message 1s before arriving\n\n return distance > 1 ? distance / 4 : 1;\n}\n\nvoid drone_failure(Drone* drone) {\n if ((rand() % 30) == 0) {\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n\n MothershipMessage msg;\n msg.sender_id = drone->id;\n msg.type = DRONE_DEAD;\n\n mothership_sendMessage(drone->motherShip, &msg);\n\n DashboardMessage dMsg;\n dMsg.type = D_DRONE;\n dMsg.state = D_DRONE_DEAD;\n dMsg.number = drone->id;\n\n dashboard_sendMessage(global_dashboard, &dMsg);\n if (drone->package != NULL) {\n dMsg.type = D_PACKAGE;\n dMsg.state = D_PACKAGE_FAIL;\n dMsg.number = drone->package->id;\n dashboard_sendMessage(global_dashboard, &dMsg);\n }\n\n pthread_exit(0);\n }\n}\n" (preproc_include) "#include "drone.h"\n" (#include) "#include" (string_literal) ""drone.h"" (") """ (string_content) "drone.h" (") """ (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_include) "#include "util.h"\n" (#include) "#include" (string_literal) ""util.h"" (") """ (string_content) "util.h" (") """ (preproc_include) "#include "client.h"\n" (#include) "#include" (string_literal) ""client.h"" (") """ (string_content) "client.h" (") """ (preproc_include) "#include "dashboard.h"\n" (#include) "#include" (string_literal) ""dashboard.h"" (") """ (string_content) "dashboard.h" (") """ (preproc_include) "#include "client_message.h"\n" (#include) "#include" (string_literal) ""client_message.h"" (") """ (string_content) "client_message.h" (") """ (preproc_include) "#include "drone_message.h"\n" (#include) "#include" (string_literal) ""drone_message.h"" (") """ (string_content) "drone_message.h" (") """ (preproc_include) "#include "mothership.h"\n" (#include) "#include" (string_literal) ""mothership.h"" (") """ (string_content) "mothership.h" (") """ (preproc_include) "#include "mothership_message.h"\n" (#include) "#include" (string_literal) ""mothership_message.h"" (") """ (string_content) "mothership_message.h" (") """ (declaration) "static bool process_message(Drone* drone, DroneMessage* message);" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "process_message(Drone* drone, DroneMessage* message)" (identifier) "process_message" (parameter_list) "(Drone* drone, DroneMessage* message)" (() "(" (parameter_declaration) "Drone* drone" (type_identifier) "Drone" (pointer_declarator) "* drone" (*) "*" (identifier) "drone" (,) "," (parameter_declaration) "DroneMessage* message" (type_identifier) "DroneMessage" (pointer_declarator) "* message" (*) "*" (identifier) "message" ()) ")" (;) ";" (declaration) "static void drone_failure(Drone* drone);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "drone_failure(Drone* drone)" (identifier) "drone_failure" (parameter_list) "(Drone* drone)" (() "(" (parameter_declaration) "Drone* drone" (type_identifier) "Drone" (pointer_declarator) "* drone" (*) "*" (identifier) "drone" ()) ")" (;) ";" (declaration) "static unsigned int compute_sleep_time(Drone* drone);" (storage_class_specifier) "static" (static) "static" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "compute_sleep_time(Drone* drone)" (identifier) "compute_sleep_time" (parameter_list) "(Drone* drone)" (() "(" (parameter_declaration) "Drone* drone" (type_identifier) "Drone" (pointer_declarator) "* drone" (*) "*" (identifier) "drone" ()) ")" (;) ";" (function_definition) "Drone* drone_constructor(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n unsigned int rechargingTime, Mothership* motherShip) {\n Drone* drone = (Drone*) malloc(sizeof(Drone));\n drone->id = id;\n drone->maxLoad = maxLoad;\n drone->maxAutonomy = drone->autonomy = autonomy;\n drone->rechargingTime = rechargingTime;\n drone->motherShip = motherShip;\n drone->client = NULL;\n drone->package = NULL;\n drone->deliverySuccess = false;\n drone->state = S_ALIVE;\n\n check(pthread_mutex_init(&(drone->mutex), NULL),"Drone: pthread_mutex_init failed");\n\n char buffer[10];\n sprintf(buffer, "/drone%03d", drone->id);\n struct mq_attr attr;\n attr.mq_curmsgs = 0;\n attr.mq_maxmsg = 10;\n attr.mq_flags = 0;\n attr.mq_msgsize = sizeof(DroneMessage);\n check((drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)), "Drone: mq_open failed");\n check(mq_unlink(buffer), "Drone: mq_unlink failed");\n\n return drone;\n}" (type_identifier) "Drone" (pointer_declarator) "* drone_constructor(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n unsigned int rechargingTime, Mothership* motherShip)" (*) "*" (function_declarator) "drone_constructor(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n unsigned int rechargingTime, Mothership* motherShip)" (identifier) "drone_constructor" (parameter_list) "(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n unsigned int rechargingTime, Mothership* motherShip)" (() "(" (parameter_declaration) "unsigned int id" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "id" (,) "," (parameter_declaration) "unsigned int maxLoad" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "maxLoad" (,) "," (parameter_declaration) "unsigned int autonomy" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "autonomy" (,) "," (parameter_declaration) "unsigned int rechargingTime" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "rechargingTime" (,) "," (parameter_declaration) "Mothership* motherShip" (type_identifier) "Mothership" (pointer_declarator) "* motherShip" (*) "*" (identifier) "motherShip" ()) ")" (compound_statement) "{\n Drone* drone = (Drone*) malloc(sizeof(Drone));\n drone->id = id;\n drone->maxLoad = maxLoad;\n drone->maxAutonomy = drone->autonomy = autonomy;\n drone->rechargingTime = rechargingTime;\n drone->motherShip = motherShip;\n drone->client = NULL;\n drone->package = NULL;\n drone->deliverySuccess = false;\n drone->state = S_ALIVE;\n\n check(pthread_mutex_init(&(drone->mutex), NULL),"Drone: pthread_mutex_init failed");\n\n char buffer[10];\n sprintf(buffer, "/drone%03d", drone->id);\n struct mq_attr attr;\n attr.mq_curmsgs = 0;\n attr.mq_maxmsg = 10;\n attr.mq_flags = 0;\n attr.mq_msgsize = sizeof(DroneMessage);\n check((drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)), "Drone: mq_open failed");\n check(mq_unlink(buffer), "Drone: mq_unlink failed");\n\n return drone;\n}" ({) "{" (declaration) "Drone* drone = (Drone*) malloc(sizeof(Drone));" (type_identifier) "Drone" (init_declarator) "* drone = (Drone*) malloc(sizeof(Drone))" (pointer_declarator) "* drone" (*) "*" (identifier) "drone" (=) "=" (cast_expression) "(Drone*) malloc(sizeof(Drone))" (() "(" (type_descriptor) "Drone*" (type_identifier) "Drone" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(sizeof(Drone))" (identifier) "malloc" (argument_list) "(sizeof(Drone))" (() "(" (sizeof_expression) "sizeof(Drone)" (sizeof) "sizeof" (parenthesized_expression) "(Drone)" (() "(" (identifier) "Drone" ()) ")" ()) ")" (;) ";" (expression_statement) "drone->id = id;" (assignment_expression) "drone->id = id" (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" (=) "=" (identifier) "id" (;) ";" (expression_statement) "drone->maxLoad = maxLoad;" (assignment_expression) "drone->maxLoad = maxLoad" (field_expression) "drone->maxLoad" (identifier) "drone" (->) "->" (field_identifier) "maxLoad" (=) "=" (identifier) "maxLoad" (;) ";" (expression_statement) "drone->maxAutonomy = drone->autonomy = autonomy;" (assignment_expression) "drone->maxAutonomy = drone->autonomy = autonomy" (field_expression) "drone->maxAutonomy" (identifier) "drone" (->) "->" (field_identifier) "maxAutonomy" (=) "=" (assignment_expression) "drone->autonomy = autonomy" (field_expression) "drone->autonomy" (identifier) "drone" (->) "->" (field_identifier) "autonomy" (=) "=" (identifier) "autonomy" (;) ";" (expression_statement) "drone->rechargingTime = rechargingTime;" (assignment_expression) "drone->rechargingTime = rechargingTime" (field_expression) "drone->rechargingTime" (identifier) "drone" (->) "->" (field_identifier) "rechargingTime" (=) "=" (identifier) "rechargingTime" (;) ";" (expression_statement) "drone->motherShip = motherShip;" (assignment_expression) "drone->motherShip = motherShip" (field_expression) "drone->motherShip" (identifier) "drone" (->) "->" (field_identifier) "motherShip" (=) "=" (identifier) "motherShip" (;) ";" (expression_statement) "drone->client = NULL;" (assignment_expression) "drone->client = NULL" (field_expression) "drone->client" (identifier) "drone" (->) "->" (field_identifier) "client" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "drone->package = NULL;" (assignment_expression) "drone->package = NULL" (field_expression) "drone->package" (identifier) "drone" (->) "->" (field_identifier) "package" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "drone->deliverySuccess = false;" (assignment_expression) "drone->deliverySuccess = false" (field_expression) "drone->deliverySuccess" (identifier) "drone" (->) "->" (field_identifier) "deliverySuccess" (=) "=" (false) "false" (;) ";" (expression_statement) "drone->state = S_ALIVE;" (assignment_expression) "drone->state = S_ALIVE" (field_expression) "drone->state" (identifier) "drone" (->) "->" (field_identifier) "state" (=) "=" (identifier) "S_ALIVE" (;) ";" (expression_statement) "check(pthread_mutex_init(&(drone->mutex), NULL),"Drone: pthread_mutex_init failed");" (call_expression) "check(pthread_mutex_init(&(drone->mutex), NULL),"Drone: pthread_mutex_init failed")" (identifier) "check" (argument_list) "(pthread_mutex_init(&(drone->mutex), NULL),"Drone: pthread_mutex_init failed")" (() "(" (call_expression) "pthread_mutex_init(&(drone->mutex), NULL)" (identifier) "pthread_mutex_init" (argument_list) "(&(drone->mutex), NULL)" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (,) "," (string_literal) ""Drone: pthread_mutex_init failed"" (") """ (string_content) "Drone: pthread_mutex_init failed" (") """ ()) ")" (;) ";" (declaration) "char buffer[10];" (primitive_type) "char" (array_declarator) "buffer[10]" (identifier) "buffer" ([) "[" (number_literal) "10" (]) "]" (;) ";" (expression_statement) "sprintf(buffer, "/drone%03d", drone->id);" (call_expression) "sprintf(buffer, "/drone%03d", drone->id)" (identifier) "sprintf" (argument_list) "(buffer, "/drone%03d", drone->id)" (() "(" (identifier) "buffer" (,) "," (string_literal) ""/drone%03d"" (") """ (string_content) "/drone%03d" (") """ (,) "," (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" ()) ")" (;) ";" (declaration) "struct mq_attr attr;" (struct_specifier) "struct mq_attr" (struct) "struct" (type_identifier) "mq_attr" (identifier) "attr" (;) ";" (expression_statement) "attr.mq_curmsgs = 0;" (assignment_expression) "attr.mq_curmsgs = 0" (field_expression) "attr.mq_curmsgs" (identifier) "attr" (.) "." (field_identifier) "mq_curmsgs" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "attr.mq_maxmsg = 10;" (assignment_expression) "attr.mq_maxmsg = 10" (field_expression) "attr.mq_maxmsg" (identifier) "attr" (.) "." (field_identifier) "mq_maxmsg" (=) "=" (number_literal) "10" (;) ";" (expression_statement) "attr.mq_flags = 0;" (assignment_expression) "attr.mq_flags = 0" (field_expression) "attr.mq_flags" (identifier) "attr" (.) "." (field_identifier) "mq_flags" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "attr.mq_msgsize = sizeof(DroneMessage);" (assignment_expression) "attr.mq_msgsize = sizeof(DroneMessage)" (field_expression) "attr.mq_msgsize" (identifier) "attr" (.) "." (field_identifier) "mq_msgsize" (=) "=" (sizeof_expression) "sizeof(DroneMessage)" (sizeof) "sizeof" (parenthesized_expression) "(DroneMessage)" (() "(" (identifier) "DroneMessage" ()) ")" (;) ";" (expression_statement) "check((drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)), "Drone: mq_open failed");" (call_expression) "check((drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)), "Drone: mq_open failed")" (identifier) "check" (argument_list) "((drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)), "Drone: mq_open failed")" (() "(" (parenthesized_expression) "(drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr))" (() "(" (assignment_expression) "drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)" (field_expression) "drone->msgQueueID" (identifier) "drone" (->) "->" (field_identifier) "msgQueueID" (=) "=" (call_expression) "mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)" (identifier) "mq_open" (argument_list) "(buffer, O_RDWR | O_CREAT, 0660, &attr)" (() "(" (identifier) "buffer" (,) "," (binary_expression) "O_RDWR | O_CREAT" (identifier) "O_RDWR" (|) "|" (identifier) "O_CREAT" (,) "," (number_literal) "0660" (,) "," (pointer_expression) "&attr" (&) "&" (identifier) "attr" ()) ")" ()) ")" (,) "," (string_literal) ""Drone: mq_open failed"" (") """ (string_content) "Drone: mq_open failed" (") """ ()) ")" (;) ";" (expression_statement) "check(mq_unlink(buffer), "Drone: mq_unlink failed");" (call_expression) "check(mq_unlink(buffer), "Drone: mq_unlink failed")" (identifier) "check" (argument_list) "(mq_unlink(buffer), "Drone: mq_unlink failed")" (() "(" (call_expression) "mq_unlink(buffer)" (identifier) "mq_unlink" (argument_list) "(buffer)" (() "(" (identifier) "buffer" ()) ")" (,) "," (string_literal) ""Drone: mq_unlink failed"" (") """ (string_content) "Drone: mq_unlink failed" (") """ ()) ")" (;) ";" (return_statement) "return drone;" (return) "return" (identifier) "drone" (;) ";" (}) "}" (function_definition) "void drone_free(Drone* drone) {\n check(pthread_mutex_destroy(&(drone->mutex)),"Drone: pthread_mutex_destroy failed");\n check(mq_close(drone->msgQueueID),"Drone: mq_close failed");\n free(drone);\n}" (primitive_type) "void" (function_declarator) "drone_free(Drone* drone)" (identifier) "drone_free" (parameter_list) "(Drone* drone)" (() "(" (parameter_declaration) "Drone* drone" (type_identifier) "Drone" (pointer_declarator) "* drone" (*) "*" (identifier) "drone" ()) ")" (compound_statement) "{\n check(pthread_mutex_destroy(&(drone->mutex)),"Drone: pthread_mutex_destroy failed");\n check(mq_close(drone->msgQueueID),"Drone: mq_close failed");\n free(drone);\n}" ({) "{" (expression_statement) "check(pthread_mutex_destroy(&(drone->mutex)),"Drone: pthread_mutex_destroy failed");" (call_expression) "check(pthread_mutex_destroy(&(drone->mutex)),"Drone: pthread_mutex_destroy failed")" (identifier) "check" (argument_list) "(pthread_mutex_destroy(&(drone->mutex)),"Drone: pthread_mutex_destroy failed")" (() "(" (call_expression) "pthread_mutex_destroy(&(drone->mutex))" (identifier) "pthread_mutex_destroy" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (,) "," (string_literal) ""Drone: pthread_mutex_destroy failed"" (") """ (string_content) "Drone: pthread_mutex_destroy failed" (") """ ()) ")" (;) ";" (expression_statement) "check(mq_close(drone->msgQueueID),"Drone: mq_close failed");" (call_expression) "check(mq_close(drone->msgQueueID),"Drone: mq_close failed")" (identifier) "check" (argument_list) "(mq_close(drone->msgQueueID),"Drone: mq_close failed")" (() "(" (call_expression) "mq_close(drone->msgQueueID)" (identifier) "mq_close" (argument_list) "(drone->msgQueueID)" (() "(" (field_expression) "drone->msgQueueID" (identifier) "drone" (->) "->" (field_identifier) "msgQueueID" ()) ")" (,) "," (string_literal) ""Drone: mq_close failed"" (") """ (string_content) "Drone: mq_close failed" (") """ ()) ")" (;) ";" (expression_statement) "free(drone);" (call_expression) "free(drone)" (identifier) "free" (argument_list) "(drone)" (() "(" (identifier) "drone" ()) ")" (;) ";" (}) "}" (function_definition) "void* drone_launch(Drone* drone) {\n DashboardMessage dashboardMessage;\n dashboardMessage.type = D_DRONE;\n dashboardMessage.number = drone->id;\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n DroneMessage droneMessage;\n check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed");\n while(process_message(drone, &droneMessage)) {\n check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed");\n }\n pthread_exit(0);\n}" (primitive_type) "void" (pointer_declarator) "* drone_launch(Drone* drone)" (*) "*" (function_declarator) "drone_launch(Drone* drone)" (identifier) "drone_launch" (parameter_list) "(Drone* drone)" (() "(" (parameter_declaration) "Drone* drone" (type_identifier) "Drone" (pointer_declarator) "* drone" (*) "*" (identifier) "drone" ()) ")" (compound_statement) "{\n DashboardMessage dashboardMessage;\n dashboardMessage.type = D_DRONE;\n dashboardMessage.number = drone->id;\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n DroneMessage droneMessage;\n check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed");\n while(process_message(drone, &droneMessage)) {\n check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed");\n }\n pthread_exit(0);\n}" ({) "{" (declaration) "DashboardMessage dashboardMessage;" (type_identifier) "DashboardMessage" (identifier) "dashboardMessage" (;) ";" (expression_statement) "dashboardMessage.type = D_DRONE;" (assignment_expression) "dashboardMessage.type = D_DRONE" (field_expression) "dashboardMessage.type" (identifier) "dashboardMessage" (.) "." (field_identifier) "type" (=) "=" (identifier) "D_DRONE" (;) ";" (expression_statement) "dashboardMessage.number = drone->id;" (assignment_expression) "dashboardMessage.number = drone->id" (field_expression) "dashboardMessage.number" (identifier) "dashboardMessage" (.) "." (field_identifier) "number" (=) "=" (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" (;) ";" (expression_statement) "dashboardMessage.state = D_DRONE_WAITING;" (assignment_expression) "dashboardMessage.state = D_DRONE_WAITING" (field_expression) "dashboardMessage.state" (identifier) "dashboardMessage" (.) "." (field_identifier) "state" (=) "=" (identifier) "D_DRONE_WAITING" (;) ";" (expression_statement) "dashboard_sendMessage(global_dashboard, &dashboardMessage);" (call_expression) "dashboard_sendMessage(global_dashboard, &dashboardMessage)" (identifier) "dashboard_sendMessage" (argument_list) "(global_dashboard, &dashboardMessage)" (() "(" (identifier) "global_dashboard" (,) "," (pointer_expression) "&dashboardMessage" (&) "&" (identifier) "dashboardMessage" ()) ")" (;) ";" (declaration) "DroneMessage droneMessage;" (type_identifier) "DroneMessage" (identifier) "droneMessage" (;) ";" (expression_statement) "check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed");" (call_expression) "check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed")" (identifier) "check" (argument_list) "((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed")" (() "(" (cast_expression) "(int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (call_expression) "mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)" (identifier) "mq_receive" (argument_list) "(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)" (() "(" (field_expression) "drone->msgQueueID" (identifier) "drone" (->) "->" (field_identifier) "msgQueueID" (,) "," (cast_expression) "(char*) &droneMessage" (() "(" (type_descriptor) "char*" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&droneMessage" (&) "&" (identifier) "droneMessage" (,) "," (sizeof_expression) "sizeof(DroneMessage)" (sizeof) "sizeof" (parenthesized_expression) "(DroneMessage)" (() "(" (identifier) "DroneMessage" ()) ")" (,) "," (number_literal) "0" ()) ")" (,) "," (string_literal) ""mq_receive failed"" (") """ (string_content) "mq_receive failed" (") """ ()) ")" (;) ";" (while_statement) "while(process_message(drone, &droneMessage)) {\n check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed");\n }" (while) "while" (parenthesized_expression) "(process_message(drone, &droneMessage))" (() "(" (call_expression) "process_message(drone, &droneMessage)" (identifier) "process_message" (argument_list) "(drone, &droneMessage)" (() "(" (identifier) "drone" (,) "," (pointer_expression) "&droneMessage" (&) "&" (identifier) "droneMessage" ()) ")" ()) ")" (compound_statement) "{\n check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed");\n }" ({) "{" (expression_statement) "check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed");" (call_expression) "check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed")" (identifier) "check" (argument_list) "((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), "mq_receive failed")" (() "(" (cast_expression) "(int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (call_expression) "mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)" (identifier) "mq_receive" (argument_list) "(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)" (() "(" (field_expression) "drone->msgQueueID" (identifier) "drone" (->) "->" (field_identifier) "msgQueueID" (,) "," (cast_expression) "(char*) &droneMessage" (() "(" (type_descriptor) "char*" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&droneMessage" (&) "&" (identifier) "droneMessage" (,) "," (sizeof_expression) "sizeof(DroneMessage)" (sizeof) "sizeof" (parenthesized_expression) "(DroneMessage)" (() "(" (identifier) "DroneMessage" ()) ")" (,) "," (number_literal) "0" ()) ")" (,) "," (string_literal) ""mq_receive failed"" (") """ (string_content) "mq_receive failed" (") """ ()) ")" (;) ";" (}) "}" (expression_statement) "pthread_exit(0);" (call_expression) "pthread_exit(0)" (identifier) "pthread_exit" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}" (function_definition) "void drone_sendMessage(Drone* drone, DroneMessage* message) {\n check(mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0), "mq_send failed");\n}" (primitive_type) "void" (function_declarator) "drone_sendMessage(Drone* drone, DroneMessage* message)" (identifier) "drone_sendMessage" (parameter_list) "(Drone* drone, DroneMessage* message)" (() "(" (parameter_declaration) "Drone* drone" (type_identifier) "Drone" (pointer_declarator) "* drone" (*) "*" (identifier) "drone" (,) "," (parameter_declaration) "DroneMessage* message" (type_identifier) "DroneMessage" (pointer_declarator) "* message" (*) "*" (identifier) "message" ()) ")" (compound_statement) "{\n check(mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0), "mq_send failed");\n}" ({) "{" (expression_statement) "check(mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0), "mq_send failed");" (call_expression) "check(mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0), "mq_send failed")" (identifier) "check" (argument_list) "(mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0), "mq_send failed")" (() "(" (call_expression) "mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0)" (identifier) "mq_send" (argument_list) "(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0)" (() "(" (field_expression) "drone->msgQueueID" (identifier) "drone" (->) "->" (field_identifier) "msgQueueID" (,) "," (cast_expression) "(const char*) message" (() "(" (type_descriptor) "const char*" (type_qualifier) "const" (const) "const" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "message" (,) "," (sizeof_expression) "sizeof(DroneMessage)" (sizeof) "sizeof" (parenthesized_expression) "(DroneMessage)" (() "(" (identifier) "DroneMessage" ()) ")" (,) "," (number_literal) "0" ()) ")" (,) "," (string_literal) ""mq_send failed"" (") """ (string_content) "mq_send failed" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "unsigned int computePowerConsumption(Package* package, double mothershipToClientDistance) {\n return package->weight + (unsigned int) mothershipToClientDistance;\n}" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "computePowerConsumption(Package* package, double mothershipToClientDistance)" (identifier) "computePowerConsumption" (parameter_list) "(Package* package, double mothershipToClientDistance)" (() "(" (parameter_declaration) "Package* package" (type_identifier) "Package" (pointer_declarator) "* package" (*) "*" (identifier) "package" (,) "," (parameter_declaration) "double mothershipToClientDistance" (primitive_type) "double" (identifier) "mothershipToClientDistance" ()) ")" (compound_statement) "{\n return package->weight + (unsigned int) mothershipToClientDistance;\n}" ({) "{" (return_statement) "return package->weight + (unsigned int) mothershipToClientDistance;" (return) "return" (binary_expression) "package->weight + (unsigned int) mothershipToClientDistance" (field_expression) "package->weight" (identifier) "package" (->) "->" (field_identifier) "weight" (+) "+" (cast_expression) "(unsigned int) mothershipToClientDistance" (() "(" (type_descriptor) "unsigned int" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" ()) ")" (identifier) "mothershipToClientDistance" (;) ";" (}) "}" (function_definition) "bool process_message(Drone* drone, DroneMessage* message) {\n DashboardMessage dashboardMessage;\n dashboardMessage.type = D_DRONE;\n dashboardMessage.number = drone->id;\n\n switch(message->type) {\n case MOTHERSHIP_END_OF_DELIVERY: {\n dashboardMessage.state = D_DRONE_FINISHED;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n LOG_INFO("[Drone %03d] poweroff", drone->id);\n return false;\n }\n case MOTHERSHIP_GO_RECHARGE: {\n dashboardMessage.state = D_DRONE_CHARGING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Recharging battery", drone->id);\n sleep(drone->rechargingTime);\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy = drone->maxAutonomy;\n pthread_mutex_unlock(&(drone->mutex));\n\n LOG_INFO("[Drone %03d] Battery charged", drone->id);\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n mothershipMessage.type = DRONE_DONE_CHARGING;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }\n case MOTHERSHIP_GO_DELIVER_PACKAGE: {\n dashboardMessage.state = D_DRONE_FLYING_MTC;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Package", drone->id);\n pthread_mutex_lock(&(drone->mutex));\n unsigned int consumption = computePowerConsumption(drone->package, 5);\n pthread_mutex_unlock(&(drone->mutex));\n\n drone_failure(drone);\n\n sleep(compute_sleep_time(drone));\n ClientMessage clientMessage;\n clientMessage.type = DRONE_PUT_TARGET;\n pthread_mutex_lock(&(drone->mutex));\n client_sendMessage(drone->client, &clientMessage);\n pthread_mutex_unlock(&(drone->mutex));\n sleep(1); // Wait the client before considering him as absent.\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n pthread_mutex_lock(&(drone->mutex));\n pthread_mutex_lock(&(drone->client->targetMutex));\n if(drone->client->targetInstalled) {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n clientMessage.type = DRONE_DELIVERY_SUCCESS;\n drone->deliverySuccess = true;\n } else {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n drone->deliverySuccess = false;\n if(drone->package->numberOfTryRemaining > 1){\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }\n else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }\n }\n pthread_mutex_unlock(&(drone->client->targetMutex));\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n client_sendMessage(drone->client, &clientMessage);\n\n drone_failure(drone);\n sleep(compute_sleep_time(drone));\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy -= consumption;\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n mothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }\n default:\n break;\n }\n return true;\n}" (primitive_type) "bool" (function_declarator) "process_message(Drone* drone, DroneMessage* message)" (identifier) "process_message" (parameter_list) "(Drone* drone, DroneMessage* message)" (() "(" (parameter_declaration) "Drone* drone" (type_identifier) "Drone" (pointer_declarator) "* drone" (*) "*" (identifier) "drone" (,) "," (parameter_declaration) "DroneMessage* message" (type_identifier) "DroneMessage" (pointer_declarator) "* message" (*) "*" (identifier) "message" ()) ")" (compound_statement) "{\n DashboardMessage dashboardMessage;\n dashboardMessage.type = D_DRONE;\n dashboardMessage.number = drone->id;\n\n switch(message->type) {\n case MOTHERSHIP_END_OF_DELIVERY: {\n dashboardMessage.state = D_DRONE_FINISHED;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n LOG_INFO("[Drone %03d] poweroff", drone->id);\n return false;\n }\n case MOTHERSHIP_GO_RECHARGE: {\n dashboardMessage.state = D_DRONE_CHARGING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Recharging battery", drone->id);\n sleep(drone->rechargingTime);\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy = drone->maxAutonomy;\n pthread_mutex_unlock(&(drone->mutex));\n\n LOG_INFO("[Drone %03d] Battery charged", drone->id);\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n mothershipMessage.type = DRONE_DONE_CHARGING;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }\n case MOTHERSHIP_GO_DELIVER_PACKAGE: {\n dashboardMessage.state = D_DRONE_FLYING_MTC;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Package", drone->id);\n pthread_mutex_lock(&(drone->mutex));\n unsigned int consumption = computePowerConsumption(drone->package, 5);\n pthread_mutex_unlock(&(drone->mutex));\n\n drone_failure(drone);\n\n sleep(compute_sleep_time(drone));\n ClientMessage clientMessage;\n clientMessage.type = DRONE_PUT_TARGET;\n pthread_mutex_lock(&(drone->mutex));\n client_sendMessage(drone->client, &clientMessage);\n pthread_mutex_unlock(&(drone->mutex));\n sleep(1); // Wait the client before considering him as absent.\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n pthread_mutex_lock(&(drone->mutex));\n pthread_mutex_lock(&(drone->client->targetMutex));\n if(drone->client->targetInstalled) {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n clientMessage.type = DRONE_DELIVERY_SUCCESS;\n drone->deliverySuccess = true;\n } else {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n drone->deliverySuccess = false;\n if(drone->package->numberOfTryRemaining > 1){\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }\n else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }\n }\n pthread_mutex_unlock(&(drone->client->targetMutex));\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n client_sendMessage(drone->client, &clientMessage);\n\n drone_failure(drone);\n sleep(compute_sleep_time(drone));\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy -= consumption;\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n mothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }\n default:\n break;\n }\n return true;\n}" ({) "{" (declaration) "DashboardMessage dashboardMessage;" (type_identifier) "DashboardMessage" (identifier) "dashboardMessage" (;) ";" (expression_statement) "dashboardMessage.type = D_DRONE;" (assignment_expression) "dashboardMessage.type = D_DRONE" (field_expression) "dashboardMessage.type" (identifier) "dashboardMessage" (.) "." (field_identifier) "type" (=) "=" (identifier) "D_DRONE" (;) ";" (expression_statement) "dashboardMessage.number = drone->id;" (assignment_expression) "dashboardMessage.number = drone->id" (field_expression) "dashboardMessage.number" (identifier) "dashboardMessage" (.) "." (field_identifier) "number" (=) "=" (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" (;) ";" (switch_statement) "switch(message->type) {\n case MOTHERSHIP_END_OF_DELIVERY: {\n dashboardMessage.state = D_DRONE_FINISHED;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n LOG_INFO("[Drone %03d] poweroff", drone->id);\n return false;\n }\n case MOTHERSHIP_GO_RECHARGE: {\n dashboardMessage.state = D_DRONE_CHARGING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Recharging battery", drone->id);\n sleep(drone->rechargingTime);\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy = drone->maxAutonomy;\n pthread_mutex_unlock(&(drone->mutex));\n\n LOG_INFO("[Drone %03d] Battery charged", drone->id);\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n mothershipMessage.type = DRONE_DONE_CHARGING;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }\n case MOTHERSHIP_GO_DELIVER_PACKAGE: {\n dashboardMessage.state = D_DRONE_FLYING_MTC;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Package", drone->id);\n pthread_mutex_lock(&(drone->mutex));\n unsigned int consumption = computePowerConsumption(drone->package, 5);\n pthread_mutex_unlock(&(drone->mutex));\n\n drone_failure(drone);\n\n sleep(compute_sleep_time(drone));\n ClientMessage clientMessage;\n clientMessage.type = DRONE_PUT_TARGET;\n pthread_mutex_lock(&(drone->mutex));\n client_sendMessage(drone->client, &clientMessage);\n pthread_mutex_unlock(&(drone->mutex));\n sleep(1); // Wait the client before considering him as absent.\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n pthread_mutex_lock(&(drone->mutex));\n pthread_mutex_lock(&(drone->client->targetMutex));\n if(drone->client->targetInstalled) {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n clientMessage.type = DRONE_DELIVERY_SUCCESS;\n drone->deliverySuccess = true;\n } else {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n drone->deliverySuccess = false;\n if(drone->package->numberOfTryRemaining > 1){\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }\n else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }\n }\n pthread_mutex_unlock(&(drone->client->targetMutex));\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n client_sendMessage(drone->client, &clientMessage);\n\n drone_failure(drone);\n sleep(compute_sleep_time(drone));\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy -= consumption;\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n mothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }\n default:\n break;\n }" (switch) "switch" (parenthesized_expression) "(message->type)" (() "(" (field_expression) "message->type" (identifier) "message" (->) "->" (field_identifier) "type" ()) ")" (compound_statement) "{\n case MOTHERSHIP_END_OF_DELIVERY: {\n dashboardMessage.state = D_DRONE_FINISHED;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n LOG_INFO("[Drone %03d] poweroff", drone->id);\n return false;\n }\n case MOTHERSHIP_GO_RECHARGE: {\n dashboardMessage.state = D_DRONE_CHARGING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Recharging battery", drone->id);\n sleep(drone->rechargingTime);\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy = drone->maxAutonomy;\n pthread_mutex_unlock(&(drone->mutex));\n\n LOG_INFO("[Drone %03d] Battery charged", drone->id);\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n mothershipMessage.type = DRONE_DONE_CHARGING;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }\n case MOTHERSHIP_GO_DELIVER_PACKAGE: {\n dashboardMessage.state = D_DRONE_FLYING_MTC;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Package", drone->id);\n pthread_mutex_lock(&(drone->mutex));\n unsigned int consumption = computePowerConsumption(drone->package, 5);\n pthread_mutex_unlock(&(drone->mutex));\n\n drone_failure(drone);\n\n sleep(compute_sleep_time(drone));\n ClientMessage clientMessage;\n clientMessage.type = DRONE_PUT_TARGET;\n pthread_mutex_lock(&(drone->mutex));\n client_sendMessage(drone->client, &clientMessage);\n pthread_mutex_unlock(&(drone->mutex));\n sleep(1); // Wait the client before considering him as absent.\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n pthread_mutex_lock(&(drone->mutex));\n pthread_mutex_lock(&(drone->client->targetMutex));\n if(drone->client->targetInstalled) {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n clientMessage.type = DRONE_DELIVERY_SUCCESS;\n drone->deliverySuccess = true;\n } else {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n drone->deliverySuccess = false;\n if(drone->package->numberOfTryRemaining > 1){\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }\n else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }\n }\n pthread_mutex_unlock(&(drone->client->targetMutex));\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n client_sendMessage(drone->client, &clientMessage);\n\n drone_failure(drone);\n sleep(compute_sleep_time(drone));\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy -= consumption;\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n mothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }\n default:\n break;\n }" ({) "{" (case_statement) "case MOTHERSHIP_END_OF_DELIVERY: {\n dashboardMessage.state = D_DRONE_FINISHED;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n LOG_INFO("[Drone %03d] poweroff", drone->id);\n return false;\n }" (case) "case" (identifier) "MOTHERSHIP_END_OF_DELIVERY" (:) ":" (compound_statement) "{\n dashboardMessage.state = D_DRONE_FINISHED;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n LOG_INFO("[Drone %03d] poweroff", drone->id);\n return false;\n }" ({) "{" (expression_statement) "dashboardMessage.state = D_DRONE_FINISHED;" (assignment_expression) "dashboardMessage.state = D_DRONE_FINISHED" (field_expression) "dashboardMessage.state" (identifier) "dashboardMessage" (.) "." (field_identifier) "state" (=) "=" (identifier) "D_DRONE_FINISHED" (;) ";" (expression_statement) "dashboard_sendMessage(global_dashboard, &dashboardMessage);" (call_expression) "dashboard_sendMessage(global_dashboard, &dashboardMessage)" (identifier) "dashboard_sendMessage" (argument_list) "(global_dashboard, &dashboardMessage)" (() "(" (identifier) "global_dashboard" (,) "," (pointer_expression) "&dashboardMessage" (&) "&" (identifier) "dashboardMessage" ()) ")" (;) ";" (expression_statement) "pthread_mutex_lock(&(drone->mutex));" (call_expression) "pthread_mutex_lock(&(drone->mutex))" (identifier) "pthread_mutex_lock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "drone->state = S_DEAD;" (assignment_expression) "drone->state = S_DEAD" (field_expression) "drone->state" (identifier) "drone" (->) "->" (field_identifier) "state" (=) "=" (identifier) "S_DEAD" (;) ";" (expression_statement) "pthread_mutex_unlock(&(drone->mutex));" (call_expression) "pthread_mutex_unlock(&(drone->mutex))" (identifier) "pthread_mutex_unlock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "LOG_INFO("[Drone %03d] poweroff", drone->id);" (call_expression) "LOG_INFO("[Drone %03d] poweroff", drone->id)" (identifier) "LOG_INFO" (argument_list) "("[Drone %03d] poweroff", drone->id)" (() "(" (string_literal) ""[Drone %03d] poweroff"" (") """ (string_content) "[Drone %03d] poweroff" (") """ (,) "," (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" ()) ")" (;) ";" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (case_statement) "case MOTHERSHIP_GO_RECHARGE: {\n dashboardMessage.state = D_DRONE_CHARGING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Recharging battery", drone->id);\n sleep(drone->rechargingTime);\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy = drone->maxAutonomy;\n pthread_mutex_unlock(&(drone->mutex));\n\n LOG_INFO("[Drone %03d] Battery charged", drone->id);\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n mothershipMessage.type = DRONE_DONE_CHARGING;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }" (case) "case" (identifier) "MOTHERSHIP_GO_RECHARGE" (:) ":" (compound_statement) "{\n dashboardMessage.state = D_DRONE_CHARGING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Recharging battery", drone->id);\n sleep(drone->rechargingTime);\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy = drone->maxAutonomy;\n pthread_mutex_unlock(&(drone->mutex));\n\n LOG_INFO("[Drone %03d] Battery charged", drone->id);\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n mothershipMessage.type = DRONE_DONE_CHARGING;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }" ({) "{" (expression_statement) "dashboardMessage.state = D_DRONE_CHARGING;" (assignment_expression) "dashboardMessage.state = D_DRONE_CHARGING" (field_expression) "dashboardMessage.state" (identifier) "dashboardMessage" (.) "." (field_identifier) "state" (=) "=" (identifier) "D_DRONE_CHARGING" (;) ";" (expression_statement) "dashboard_sendMessage(global_dashboard, &dashboardMessage);" (call_expression) "dashboard_sendMessage(global_dashboard, &dashboardMessage)" (identifier) "dashboard_sendMessage" (argument_list) "(global_dashboard, &dashboardMessage)" (() "(" (identifier) "global_dashboard" (,) "," (pointer_expression) "&dashboardMessage" (&) "&" (identifier) "dashboardMessage" ()) ")" (;) ";" (expression_statement) "LOG_INFO("[Drone %03d] Recharging battery", drone->id);" (call_expression) "LOG_INFO("[Drone %03d] Recharging battery", drone->id)" (identifier) "LOG_INFO" (argument_list) "("[Drone %03d] Recharging battery", drone->id)" (() "(" (string_literal) ""[Drone %03d] Recharging battery"" (") """ (string_content) "[Drone %03d] Recharging battery" (") """ (,) "," (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" ()) ")" (;) ";" (expression_statement) "sleep(drone->rechargingTime);" (call_expression) "sleep(drone->rechargingTime)" (identifier) "sleep" (argument_list) "(drone->rechargingTime)" (() "(" (field_expression) "drone->rechargingTime" (identifier) "drone" (->) "->" (field_identifier) "rechargingTime" ()) ")" (;) ";" (expression_statement) "pthread_mutex_lock(&(drone->mutex));" (call_expression) "pthread_mutex_lock(&(drone->mutex))" (identifier) "pthread_mutex_lock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "drone->autonomy = drone->maxAutonomy;" (assignment_expression) "drone->autonomy = drone->maxAutonomy" (field_expression) "drone->autonomy" (identifier) "drone" (->) "->" (field_identifier) "autonomy" (=) "=" (field_expression) "drone->maxAutonomy" (identifier) "drone" (->) "->" (field_identifier) "maxAutonomy" (;) ";" (expression_statement) "pthread_mutex_unlock(&(drone->mutex));" (call_expression) "pthread_mutex_unlock(&(drone->mutex))" (identifier) "pthread_mutex_unlock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "LOG_INFO("[Drone %03d] Battery charged", drone->id);" (call_expression) "LOG_INFO("[Drone %03d] Battery charged", drone->id)" (identifier) "LOG_INFO" (argument_list) "("[Drone %03d] Battery charged", drone->id)" (() "(" (string_literal) ""[Drone %03d] Battery charged"" (") """ (string_content) "[Drone %03d] Battery charged" (") """ (,) "," (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" ()) ")" (;) ";" (expression_statement) "dashboardMessage.state = D_DRONE_WAITING;" (assignment_expression) "dashboardMessage.state = D_DRONE_WAITING" (field_expression) "dashboardMessage.state" (identifier) "dashboardMessage" (.) "." (field_identifier) "state" (=) "=" (identifier) "D_DRONE_WAITING" (;) ";" (expression_statement) "dashboard_sendMessage(global_dashboard, &dashboardMessage);" (call_expression) "dashboard_sendMessage(global_dashboard, &dashboardMessage)" (identifier) "dashboard_sendMessage" (argument_list) "(global_dashboard, &dashboardMessage)" (() "(" (identifier) "global_dashboard" (,) "," (pointer_expression) "&dashboardMessage" (&) "&" (identifier) "dashboardMessage" ()) ")" (;) ";" (declaration) "MothershipMessage mothershipMessage;" (type_identifier) "MothershipMessage" (identifier) "mothershipMessage" (;) ";" (expression_statement) "mothershipMessage.sender_id = drone->id;" (assignment_expression) "mothershipMessage.sender_id = drone->id" (field_expression) "mothershipMessage.sender_id" (identifier) "mothershipMessage" (.) "." (field_identifier) "sender_id" (=) "=" (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" (;) ";" (expression_statement) "mothershipMessage.type = DRONE_DONE_CHARGING;" (assignment_expression) "mothershipMessage.type = DRONE_DONE_CHARGING" (field_expression) "mothershipMessage.type" (identifier) "mothershipMessage" (.) "." (field_identifier) "type" (=) "=" (identifier) "DRONE_DONE_CHARGING" (;) ";" (expression_statement) "mothership_sendMessage(drone->motherShip, &mothershipMessage);" (call_expression) "mothership_sendMessage(drone->motherShip, &mothershipMessage)" (identifier) "mothership_sendMessage" (argument_list) "(drone->motherShip, &mothershipMessage)" (() "(" (field_expression) "drone->motherShip" (identifier) "drone" (->) "->" (field_identifier) "motherShip" (,) "," (pointer_expression) "&mothershipMessage" (&) "&" (identifier) "mothershipMessage" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (case_statement) "case MOTHERSHIP_GO_DELIVER_PACKAGE: {\n dashboardMessage.state = D_DRONE_FLYING_MTC;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Package", drone->id);\n pthread_mutex_lock(&(drone->mutex));\n unsigned int consumption = computePowerConsumption(drone->package, 5);\n pthread_mutex_unlock(&(drone->mutex));\n\n drone_failure(drone);\n\n sleep(compute_sleep_time(drone));\n ClientMessage clientMessage;\n clientMessage.type = DRONE_PUT_TARGET;\n pthread_mutex_lock(&(drone->mutex));\n client_sendMessage(drone->client, &clientMessage);\n pthread_mutex_unlock(&(drone->mutex));\n sleep(1); // Wait the client before considering him as absent.\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n pthread_mutex_lock(&(drone->mutex));\n pthread_mutex_lock(&(drone->client->targetMutex));\n if(drone->client->targetInstalled) {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n clientMessage.type = DRONE_DELIVERY_SUCCESS;\n drone->deliverySuccess = true;\n } else {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n drone->deliverySuccess = false;\n if(drone->package->numberOfTryRemaining > 1){\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }\n else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }\n }\n pthread_mutex_unlock(&(drone->client->targetMutex));\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n client_sendMessage(drone->client, &clientMessage);\n\n drone_failure(drone);\n sleep(compute_sleep_time(drone));\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy -= consumption;\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n mothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }" (case) "case" (identifier) "MOTHERSHIP_GO_DELIVER_PACKAGE" (:) ":" (compound_statement) "{\n dashboardMessage.state = D_DRONE_FLYING_MTC;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n LOG_INFO("[Drone %03d] Package", drone->id);\n pthread_mutex_lock(&(drone->mutex));\n unsigned int consumption = computePowerConsumption(drone->package, 5);\n pthread_mutex_unlock(&(drone->mutex));\n\n drone_failure(drone);\n\n sleep(compute_sleep_time(drone));\n ClientMessage clientMessage;\n clientMessage.type = DRONE_PUT_TARGET;\n pthread_mutex_lock(&(drone->mutex));\n client_sendMessage(drone->client, &clientMessage);\n pthread_mutex_unlock(&(drone->mutex));\n sleep(1); // Wait the client before considering him as absent.\n\n MothershipMessage mothershipMessage;\n mothershipMessage.sender_id = drone->id;\n pthread_mutex_lock(&(drone->mutex));\n pthread_mutex_lock(&(drone->client->targetMutex));\n if(drone->client->targetInstalled) {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n clientMessage.type = DRONE_DELIVERY_SUCCESS;\n drone->deliverySuccess = true;\n } else {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n drone->deliverySuccess = false;\n if(drone->package->numberOfTryRemaining > 1){\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }\n else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }\n }\n pthread_mutex_unlock(&(drone->client->targetMutex));\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n client_sendMessage(drone->client, &clientMessage);\n\n drone_failure(drone);\n sleep(compute_sleep_time(drone));\n pthread_mutex_lock(&(drone->mutex));\n drone->autonomy -= consumption;\n pthread_mutex_unlock(&(drone->mutex));\n\n dashboardMessage.state = D_DRONE_WAITING;\n dashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n mothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;\n mothership_sendMessage(drone->motherShip, &mothershipMessage);\n break;\n }" ({) "{" (expression_statement) "dashboardMessage.state = D_DRONE_FLYING_MTC;" (assignment_expression) "dashboardMessage.state = D_DRONE_FLYING_MTC" (field_expression) "dashboardMessage.state" (identifier) "dashboardMessage" (.) "." (field_identifier) "state" (=) "=" (identifier) "D_DRONE_FLYING_MTC" (;) ";" (expression_statement) "dashboard_sendMessage(global_dashboard, &dashboardMessage);" (call_expression) "dashboard_sendMessage(global_dashboard, &dashboardMessage)" (identifier) "dashboard_sendMessage" (argument_list) "(global_dashboard, &dashboardMessage)" (() "(" (identifier) "global_dashboard" (,) "," (pointer_expression) "&dashboardMessage" (&) "&" (identifier) "dashboardMessage" ()) ")" (;) ";" (expression_statement) "LOG_INFO("[Drone %03d] Package", drone->id);" (call_expression) "LOG_INFO("[Drone %03d] Package", drone->id)" (identifier) "LOG_INFO" (argument_list) "("[Drone %03d] Package", drone->id)" (() "(" (string_literal) ""[Drone %03d] Package"" (") """ (string_content) "[Drone %03d] Package" (") """ (,) "," (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" ()) ")" (;) ";" (expression_statement) "pthread_mutex_lock(&(drone->mutex));" (call_expression) "pthread_mutex_lock(&(drone->mutex))" (identifier) "pthread_mutex_lock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (declaration) "unsigned int consumption = computePowerConsumption(drone->package, 5);" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (init_declarator) "consumption = computePowerConsumption(drone->package, 5)" (identifier) "consumption" (=) "=" (call_expression) "computePowerConsumption(drone->package, 5)" (identifier) "computePowerConsumption" (argument_list) "(drone->package, 5)" (() "(" (field_expression) "drone->package" (identifier) "drone" (->) "->" (field_identifier) "package" (,) "," (number_literal) "5" ()) ")" (;) ";" (expression_statement) "pthread_mutex_unlock(&(drone->mutex));" (call_expression) "pthread_mutex_unlock(&(drone->mutex))" (identifier) "pthread_mutex_unlock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "drone_failure(drone);" (call_expression) "drone_failure(drone)" (identifier) "drone_failure" (argument_list) "(drone)" (() "(" (identifier) "drone" ()) ")" (;) ";" (expression_statement) "sleep(compute_sleep_time(drone));" (call_expression) "sleep(compute_sleep_time(drone))" (identifier) "sleep" (argument_list) "(compute_sleep_time(drone))" (() "(" (call_expression) "compute_sleep_time(drone)" (identifier) "compute_sleep_time" (argument_list) "(drone)" (() "(" (identifier) "drone" ()) ")" ()) ")" (;) ";" (declaration) "ClientMessage clientMessage;" (type_identifier) "ClientMessage" (identifier) "clientMessage" (;) ";" (expression_statement) "clientMessage.type = DRONE_PUT_TARGET;" (assignment_expression) "clientMessage.type = DRONE_PUT_TARGET" (field_expression) "clientMessage.type" (identifier) "clientMessage" (.) "." (field_identifier) "type" (=) "=" (identifier) "DRONE_PUT_TARGET" (;) ";" (expression_statement) "pthread_mutex_lock(&(drone->mutex));" (call_expression) "pthread_mutex_lock(&(drone->mutex))" (identifier) "pthread_mutex_lock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "client_sendMessage(drone->client, &clientMessage);" (call_expression) "client_sendMessage(drone->client, &clientMessage)" (identifier) "client_sendMessage" (argument_list) "(drone->client, &clientMessage)" (() "(" (field_expression) "drone->client" (identifier) "drone" (->) "->" (field_identifier) "client" (,) "," (pointer_expression) "&clientMessage" (&) "&" (identifier) "clientMessage" ()) ")" (;) ";" (expression_statement) "pthread_mutex_unlock(&(drone->mutex));" (call_expression) "pthread_mutex_unlock(&(drone->mutex))" (identifier) "pthread_mutex_unlock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "sleep(1);" (call_expression) "sleep(1)" (identifier) "sleep" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (comment) "// Wait the client before considering him as absent." (declaration) "MothershipMessage mothershipMessage;" (type_identifier) "MothershipMessage" (identifier) "mothershipMessage" (;) ";" (expression_statement) "mothershipMessage.sender_id = drone->id;" (assignment_expression) "mothershipMessage.sender_id = drone->id" (field_expression) "mothershipMessage.sender_id" (identifier) "mothershipMessage" (.) "." (field_identifier) "sender_id" (=) "=" (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" (;) ";" (expression_statement) "pthread_mutex_lock(&(drone->mutex));" (call_expression) "pthread_mutex_lock(&(drone->mutex))" (identifier) "pthread_mutex_lock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "pthread_mutex_lock(&(drone->client->targetMutex));" (call_expression) "pthread_mutex_lock(&(drone->client->targetMutex))" (identifier) "pthread_mutex_lock" (argument_list) "(&(drone->client->targetMutex))" (() "(" (pointer_expression) "&(drone->client->targetMutex)" (&) "&" (parenthesized_expression) "(drone->client->targetMutex)" (() "(" (field_expression) "drone->client->targetMutex" (field_expression) "drone->client" (identifier) "drone" (->) "->" (field_identifier) "client" (->) "->" (field_identifier) "targetMutex" ()) ")" ()) ")" (;) ";" (if_statement) "if(drone->client->targetInstalled) {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n clientMessage.type = DRONE_DELIVERY_SUCCESS;\n drone->deliverySuccess = true;\n } else {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n drone->deliverySuccess = false;\n if(drone->package->numberOfTryRemaining > 1){\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }\n else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }\n }" (if) "if" (parenthesized_expression) "(drone->client->targetInstalled)" (() "(" (field_expression) "drone->client->targetInstalled" (field_expression) "drone->client" (identifier) "drone" (->) "->" (field_identifier) "client" (->) "->" (field_identifier) "targetInstalled" ()) ")" (compound_statement) "{\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n clientMessage.type = DRONE_DELIVERY_SUCCESS;\n drone->deliverySuccess = true;\n }" ({) "{" (expression_statement) "dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;" (assignment_expression) "dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS" (field_expression) "dashboardMessage.state" (identifier) "dashboardMessage" (.) "." (field_identifier) "state" (=) "=" (identifier) "D_DRONE_FLYING_CTM_DELIVERY_SUCCESS" (;) ";" (expression_statement) "mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;" (assignment_expression) "mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS" (field_expression) "mothershipMessage.type" (identifier) "mothershipMessage" (.) "." (field_identifier) "type" (=) "=" (identifier) "DRONE_PACKAGE_DELIVERED_SUCCESS" (;) ";" (expression_statement) "clientMessage.type = DRONE_DELIVERY_SUCCESS;" (assignment_expression) "clientMessage.type = DRONE_DELIVERY_SUCCESS" (field_expression) "clientMessage.type" (identifier) "clientMessage" (.) "." (field_identifier) "type" (=) "=" (identifier) "DRONE_DELIVERY_SUCCESS" (;) ";" (expression_statement) "drone->deliverySuccess = true;" (assignment_expression) "drone->deliverySuccess = true" (field_expression) "drone->deliverySuccess" (identifier) "drone" (->) "->" (field_identifier) "deliverySuccess" (=) "=" (true) "true" (;) ";" (}) "}" (else_clause) "else {\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n drone->deliverySuccess = false;\n if(drone->package->numberOfTryRemaining > 1){\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }\n else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }\n }" (else) "else" (compound_statement) "{\n dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n drone->deliverySuccess = false;\n if(drone->package->numberOfTryRemaining > 1){\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }\n else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }\n }" ({) "{" (expression_statement) "dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;" (assignment_expression) "dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL" (field_expression) "dashboardMessage.state" (identifier) "dashboardMessage" (.) "." (field_identifier) "state" (=) "=" (identifier) "D_DRONE_FLYING_CTM_DELIVERY_FAIL" (;) ";" (expression_statement) "mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;" (assignment_expression) "mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL" (field_expression) "mothershipMessage.type" (identifier) "mothershipMessage" (.) "." (field_identifier) "type" (=) "=" (identifier) "DRONE_PACKAGE_DELIVERED_FAIL" (;) ";" (expression_statement) "drone->deliverySuccess = false;" (assignment_expression) "drone->deliverySuccess = false" (field_expression) "drone->deliverySuccess" (identifier) "drone" (->) "->" (field_identifier) "deliverySuccess" (=) "=" (false) "false" (;) ";" (if_statement) "if(drone->package->numberOfTryRemaining > 1){\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }\n else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }" (if) "if" (parenthesized_expression) "(drone->package->numberOfTryRemaining > 1)" (() "(" (binary_expression) "drone->package->numberOfTryRemaining > 1" (field_expression) "drone->package->numberOfTryRemaining" (field_expression) "drone->package" (identifier) "drone" (->) "->" (field_identifier) "package" (->) "->" (field_identifier) "numberOfTryRemaining" (>) ">" (number_literal) "1" ()) ")" (compound_statement) "{\n clientMessage.type = DRONE_DELIVERY_FAILURE;\n }" ({) "{" (expression_statement) "clientMessage.type = DRONE_DELIVERY_FAILURE;" (assignment_expression) "clientMessage.type = DRONE_DELIVERY_FAILURE" (field_expression) "clientMessage.type" (identifier) "clientMessage" (.) "." (field_identifier) "type" (=) "=" (identifier) "DRONE_DELIVERY_FAILURE" (;) ";" (}) "}" (else_clause) "else{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }" (else) "else" (compound_statement) "{\n clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n }" ({) "{" (expression_statement) "clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;" (assignment_expression) "clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE" (field_expression) "clientMessage.type" (identifier) "clientMessage" (.) "." (field_identifier) "type" (=) "=" (identifier) "DRONE_DELIVERY_FINAL_FAILURE" (;) ";" (}) "}" (}) "}" (expression_statement) "pthread_mutex_unlock(&(drone->client->targetMutex));" (call_expression) "pthread_mutex_unlock(&(drone->client->targetMutex))" (identifier) "pthread_mutex_unlock" (argument_list) "(&(drone->client->targetMutex))" (() "(" (pointer_expression) "&(drone->client->targetMutex)" (&) "&" (parenthesized_expression) "(drone->client->targetMutex)" (() "(" (field_expression) "drone->client->targetMutex" (field_expression) "drone->client" (identifier) "drone" (->) "->" (field_identifier) "client" (->) "->" (field_identifier) "targetMutex" ()) ")" ()) ")" (;) ";" (expression_statement) "pthread_mutex_unlock(&(drone->mutex));" (call_expression) "pthread_mutex_unlock(&(drone->mutex))" (identifier) "pthread_mutex_unlock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "dashboard_sendMessage(global_dashboard, &dashboardMessage);" (call_expression) "dashboard_sendMessage(global_dashboard, &dashboardMessage)" (identifier) "dashboard_sendMessage" (argument_list) "(global_dashboard, &dashboardMessage)" (() "(" (identifier) "global_dashboard" (,) "," (pointer_expression) "&dashboardMessage" (&) "&" (identifier) "dashboardMessage" ()) ")" (;) ";" (expression_statement) "mothership_sendMessage(drone->motherShip, &mothershipMessage);" (call_expression) "mothership_sendMessage(drone->motherShip, &mothershipMessage)" (identifier) "mothership_sendMessage" (argument_list) "(drone->motherShip, &mothershipMessage)" (() "(" (field_expression) "drone->motherShip" (identifier) "drone" (->) "->" (field_identifier) "motherShip" (,) "," (pointer_expression) "&mothershipMessage" (&) "&" (identifier) "mothershipMessage" ()) ")" (;) ";" (expression_statement) "client_sendMessage(drone->client, &clientMessage);" (call_expression) "client_sendMessage(drone->client, &clientMessage)" (identifier) "client_sendMessage" (argument_list) "(drone->client, &clientMessage)" (() "(" (field_expression) "drone->client" (identifier) "drone" (->) "->" (field_identifier) "client" (,) "," (pointer_expression) "&clientMessage" (&) "&" (identifier) "clientMessage" ()) ")" (;) ";" (expression_statement) "drone_failure(drone);" (call_expression) "drone_failure(drone)" (identifier) "drone_failure" (argument_list) "(drone)" (() "(" (identifier) "drone" ()) ")" (;) ";" (expression_statement) "sleep(compute_sleep_time(drone));" (call_expression) "sleep(compute_sleep_time(drone))" (identifier) "sleep" (argument_list) "(compute_sleep_time(drone))" (() "(" (call_expression) "compute_sleep_time(drone)" (identifier) "compute_sleep_time" (argument_list) "(drone)" (() "(" (identifier) "drone" ()) ")" ()) ")" (;) ";" (expression_statement) "pthread_mutex_lock(&(drone->mutex));" (call_expression) "pthread_mutex_lock(&(drone->mutex))" (identifier) "pthread_mutex_lock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "drone->autonomy -= consumption;" (assignment_expression) "drone->autonomy -= consumption" (field_expression) "drone->autonomy" (identifier) "drone" (->) "->" (field_identifier) "autonomy" (-=) "-=" (identifier) "consumption" (;) ";" (expression_statement) "pthread_mutex_unlock(&(drone->mutex));" (call_expression) "pthread_mutex_unlock(&(drone->mutex))" (identifier) "pthread_mutex_unlock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "dashboardMessage.state = D_DRONE_WAITING;" (assignment_expression) "dashboardMessage.state = D_DRONE_WAITING" (field_expression) "dashboardMessage.state" (identifier) "dashboardMessage" (.) "." (field_identifier) "state" (=) "=" (identifier) "D_DRONE_WAITING" (;) ";" (expression_statement) "dashboard_sendMessage(global_dashboard, &dashboardMessage);" (call_expression) "dashboard_sendMessage(global_dashboard, &dashboardMessage)" (identifier) "dashboard_sendMessage" (argument_list) "(global_dashboard, &dashboardMessage)" (() "(" (identifier) "global_dashboard" (,) "," (pointer_expression) "&dashboardMessage" (&) "&" (identifier) "dashboardMessage" ()) ")" (;) ";" (expression_statement) "mothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;" (assignment_expression) "mothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP" (field_expression) "mothershipMessage.type" (identifier) "mothershipMessage" (.) "." (field_identifier) "type" (=) "=" (identifier) "DRONE_BACK_TO_MOTHERSHIP" (;) ";" (expression_statement) "mothership_sendMessage(drone->motherShip, &mothershipMessage);" (call_expression) "mothership_sendMessage(drone->motherShip, &mothershipMessage)" (identifier) "mothership_sendMessage" (argument_list) "(drone->motherShip, &mothershipMessage)" (() "(" (field_expression) "drone->motherShip" (identifier) "drone" (->) "->" (field_identifier) "motherShip" (,) "," (pointer_expression) "&mothershipMessage" (&) "&" (identifier) "mothershipMessage" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (case_statement) "default:\n break;" (default) "default" (:) ":" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (function_definition) "unsigned int compute_sleep_time(Drone* drone) {\n unsigned int distance = drone->client->distance - 1;\n // minus 1 to send the target message 1s before arriving\n\n return distance > 1 ? distance / 4 : 1;\n}" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "compute_sleep_time(Drone* drone)" (identifier) "compute_sleep_time" (parameter_list) "(Drone* drone)" (() "(" (parameter_declaration) "Drone* drone" (type_identifier) "Drone" (pointer_declarator) "* drone" (*) "*" (identifier) "drone" ()) ")" (compound_statement) "{\n unsigned int distance = drone->client->distance - 1;\n // minus 1 to send the target message 1s before arriving\n\n return distance > 1 ? distance / 4 : 1;\n}" ({) "{" (declaration) "unsigned int distance = drone->client->distance - 1;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (init_declarator) "distance = drone->client->distance - 1" (identifier) "distance" (=) "=" (binary_expression) "drone->client->distance - 1" (field_expression) "drone->client->distance" (field_expression) "drone->client" (identifier) "drone" (->) "->" (field_identifier) "client" (->) "->" (field_identifier) "distance" (-) "-" (number_literal) "1" (;) ";" (comment) "// minus 1 to send the target message 1s before arriving" (return_statement) "return distance > 1 ? distance / 4 : 1;" (return) "return" (conditional_expression) "distance > 1 ? distance / 4 : 1" (binary_expression) "distance > 1" (identifier) "distance" (>) ">" (number_literal) "1" (?) "?" (binary_expression) "distance / 4" (identifier) "distance" (/) "/" (number_literal) "4" (:) ":" (number_literal) "1" (;) ";" (}) "}" (function_definition) "void drone_failure(Drone* drone) {\n if ((rand() % 30) == 0) {\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n\n MothershipMessage msg;\n msg.sender_id = drone->id;\n msg.type = DRONE_DEAD;\n\n mothership_sendMessage(drone->motherShip, &msg);\n\n DashboardMessage dMsg;\n dMsg.type = D_DRONE;\n dMsg.state = D_DRONE_DEAD;\n dMsg.number = drone->id;\n\n dashboard_sendMessage(global_dashboard, &dMsg);\n if (drone->package != NULL) {\n dMsg.type = D_PACKAGE;\n dMsg.state = D_PACKAGE_FAIL;\n dMsg.number = drone->package->id;\n dashboard_sendMessage(global_dashboard, &dMsg);\n }\n\n pthread_exit(0);\n }\n}" (primitive_type) "void" (function_declarator) "drone_failure(Drone* drone)" (identifier) "drone_failure" (parameter_list) "(Drone* drone)" (() "(" (parameter_declaration) "Drone* drone" (type_identifier) "Drone" (pointer_declarator) "* drone" (*) "*" (identifier) "drone" ()) ")" (compound_statement) "{\n if ((rand() % 30) == 0) {\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n\n MothershipMessage msg;\n msg.sender_id = drone->id;\n msg.type = DRONE_DEAD;\n\n mothership_sendMessage(drone->motherShip, &msg);\n\n DashboardMessage dMsg;\n dMsg.type = D_DRONE;\n dMsg.state = D_DRONE_DEAD;\n dMsg.number = drone->id;\n\n dashboard_sendMessage(global_dashboard, &dMsg);\n if (drone->package != NULL) {\n dMsg.type = D_PACKAGE;\n dMsg.state = D_PACKAGE_FAIL;\n dMsg.number = drone->package->id;\n dashboard_sendMessage(global_dashboard, &dMsg);\n }\n\n pthread_exit(0);\n }\n}" ({) "{" (if_statement) "if ((rand() % 30) == 0) {\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n\n MothershipMessage msg;\n msg.sender_id = drone->id;\n msg.type = DRONE_DEAD;\n\n mothership_sendMessage(drone->motherShip, &msg);\n\n DashboardMessage dMsg;\n dMsg.type = D_DRONE;\n dMsg.state = D_DRONE_DEAD;\n dMsg.number = drone->id;\n\n dashboard_sendMessage(global_dashboard, &dMsg);\n if (drone->package != NULL) {\n dMsg.type = D_PACKAGE;\n dMsg.state = D_PACKAGE_FAIL;\n dMsg.number = drone->package->id;\n dashboard_sendMessage(global_dashboard, &dMsg);\n }\n\n pthread_exit(0);\n }" (if) "if" (parenthesized_expression) "((rand() % 30) == 0)" (() "(" (binary_expression) "(rand() % 30) == 0" (parenthesized_expression) "(rand() % 30)" (() "(" (binary_expression) "rand() % 30" (call_expression) "rand()" (identifier) "rand" (argument_list) "()" (() "(" ()) ")" (%) "%" (number_literal) "30" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n pthread_mutex_lock(&(drone->mutex));\n drone->state = S_DEAD;\n pthread_mutex_unlock(&(drone->mutex));\n\n MothershipMessage msg;\n msg.sender_id = drone->id;\n msg.type = DRONE_DEAD;\n\n mothership_sendMessage(drone->motherShip, &msg);\n\n DashboardMessage dMsg;\n dMsg.type = D_DRONE;\n dMsg.state = D_DRONE_DEAD;\n dMsg.number = drone->id;\n\n dashboard_sendMessage(global_dashboard, &dMsg);\n if (drone->package != NULL) {\n dMsg.type = D_PACKAGE;\n dMsg.state = D_PACKAGE_FAIL;\n dMsg.number = drone->package->id;\n dashboard_sendMessage(global_dashboard, &dMsg);\n }\n\n pthread_exit(0);\n }" ({) "{" (expression_statement) "pthread_mutex_lock(&(drone->mutex));" (call_expression) "pthread_mutex_lock(&(drone->mutex))" (identifier) "pthread_mutex_lock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (expression_statement) "drone->state = S_DEAD;" (assignment_expression) "drone->state = S_DEAD" (field_expression) "drone->state" (identifier) "drone" (->) "->" (field_identifier) "state" (=) "=" (identifier) "S_DEAD" (;) ";" (expression_statement) "pthread_mutex_unlock(&(drone->mutex));" (call_expression) "pthread_mutex_unlock(&(drone->mutex))" (identifier) "pthread_mutex_unlock" (argument_list) "(&(drone->mutex))" (() "(" (pointer_expression) "&(drone->mutex)" (&) "&" (parenthesized_expression) "(drone->mutex)" (() "(" (field_expression) "drone->mutex" (identifier) "drone" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (declaration) "MothershipMessage msg;" (type_identifier) "MothershipMessage" (identifier) "msg" (;) ";" (expression_statement) "msg.sender_id = drone->id;" (assignment_expression) "msg.sender_id = drone->id" (field_expression) "msg.sender_id" (identifier) "msg" (.) "." (field_identifier) "sender_id" (=) "=" (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" (;) ";" (expression_statement) "msg.type = DRONE_DEAD;" (assignment_expression) "msg.type = DRONE_DEAD" (field_expression) "msg.type" (identifier) "msg" (.) "." (field_identifier) "type" (=) "=" (identifier) "DRONE_DEAD" (;) ";" (expression_statement) "mothership_sendMessage(drone->motherShip, &msg);" (call_expression) "mothership_sendMessage(drone->motherShip, &msg)" (identifier) "mothership_sendMessage" (argument_list) "(drone->motherShip, &msg)" (() "(" (field_expression) "drone->motherShip" (identifier) "drone" (->) "->" (field_identifier) "motherShip" (,) "," (pointer_expression) "&msg" (&) "&" (identifier) "msg" ()) ")" (;) ";" (declaration) "DashboardMessage dMsg;" (type_identifier) "DashboardMessage" (identifier) "dMsg" (;) ";" (expression_statement) "dMsg.type = D_DRONE;" (assignment_expression) "dMsg.type = D_DRONE" (field_expression) "dMsg.type" (identifier) "dMsg" (.) "." (field_identifier) "type" (=) "=" (identifier) "D_DRONE" (;) ";" (expression_statement) "dMsg.state = D_DRONE_DEAD;" (assignment_expression) "dMsg.state = D_DRONE_DEAD" (field_expression) "dMsg.state" (identifier) "dMsg" (.) "." (field_identifier) "state" (=) "=" (identifier) "D_DRONE_DEAD" (;) ";" (expression_statement) "dMsg.number = drone->id;" (assignment_expression) "dMsg.number = drone->id" (field_expression) "dMsg.number" (identifier) "dMsg" (.) "." (field_identifier) "number" (=) "=" (field_expression) "drone->id" (identifier) "drone" (->) "->" (field_identifier) "id" (;) ";" (expression_statement) "dashboard_sendMessage(global_dashboard, &dMsg);" (call_expression) "dashboard_sendMessage(global_dashboard, &dMsg)" (identifier) "dashboard_sendMessage" (argument_list) "(global_dashboard, &dMsg)" (() "(" (identifier) "global_dashboard" (,) "," (pointer_expression) "&dMsg" (&) "&" (identifier) "dMsg" ()) ")" (;) ";" (if_statement) "if (drone->package != NULL) {\n dMsg.type = D_PACKAGE;\n dMsg.state = D_PACKAGE_FAIL;\n dMsg.number = drone->package->id;\n dashboard_sendMessage(global_dashboard, &dMsg);\n }" (if) "if" (parenthesized_expression) "(drone->package != NULL)" (() "(" (binary_expression) "drone->package != NULL" (field_expression) "drone->package" (identifier) "drone" (->) "->" (field_identifier) "package" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n dMsg.type = D_PACKAGE;\n dMsg.state = D_PACKAGE_FAIL;\n dMsg.number = drone->package->id;\n dashboard_sendMessage(global_dashboard, &dMsg);\n }" ({) "{" (expression_statement) "dMsg.type = D_PACKAGE;" (assignment_expression) "dMsg.type = D_PACKAGE" (field_expression) "dMsg.type" (identifier) "dMsg" (.) "." (field_identifier) "type" (=) "=" (identifier) "D_PACKAGE" (;) ";" (expression_statement) "dMsg.state = D_PACKAGE_FAIL;" (assignment_expression) "dMsg.state = D_PACKAGE_FAIL" (field_expression) "dMsg.state" (identifier) "dMsg" (.) "." (field_identifier) "state" (=) "=" (identifier) "D_PACKAGE_FAIL" (;) ";" (expression_statement) "dMsg.number = drone->package->id;" (assignment_expression) "dMsg.number = drone->package->id" (field_expression) "dMsg.number" (identifier) "dMsg" (.) "." (field_identifier) "number" (=) "=" (field_expression) "drone->package->id" (field_expression) "drone->package" (identifier) "drone" (->) "->" (field_identifier) "package" (->) "->" (field_identifier) "id" (;) ";" (expression_statement) "dashboard_sendMessage(global_dashboard, &dMsg);" (call_expression) "dashboard_sendMessage(global_dashboard, &dMsg)" (identifier) "dashboard_sendMessage" (argument_list) "(global_dashboard, &dMsg)" (() "(" (identifier) "global_dashboard" (,) "," (pointer_expression) "&dMsg" (&) "&" (identifier) "dMsg" ()) ")" (;) ";" (}) "}" (expression_statement) "pthread_exit(0);" (call_expression) "pthread_exit(0)" (identifier) "pthread_exit" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}" (}) "}"
1,951
0
{"language": "c", "success": true, "metadata": {"lines": 177, "avg_line_length": 37.28, "nodes": 1133, "errors": 0, "source_hash": "84a12a79f327268e160eae5aa97197babce3d417d01703b3a4b76e0a50309bb1", "categorized_nodes": 883}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"drone.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": "\"drone.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": 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": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdio.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<unistd.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include \"util.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"util.h\"", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 17}}, {"id": 15, "type": "preproc_include", "text": "#include \"client.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"client.h\"", "parent": 15, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 19}}, {"id": 18, "type": "preproc_include", "text": "#include \"dashboard.h\"\n", "parent": null, "children": [19, 20], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"dashboard.h\"", "parent": 18, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 22}}, {"id": 21, "type": "preproc_include", "text": "#include \"client_message.h\"\n", "parent": null, "children": [22, 23], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"client_message.h\"", "parent": 21, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 27}}, {"id": 24, "type": "preproc_include", "text": "#include \"drone_message.h\"\n", "parent": null, "children": [25, 26], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"drone_message.h\"", "parent": 24, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 26}}, {"id": 27, "type": "preproc_include", "text": "#include \"mothership.h\"\n", "parent": null, "children": [28, 29], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"mothership.h\"", "parent": 27, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 23}}, {"id": 30, "type": "preproc_include", "text": "#include \"mothership_message.h\"\n", "parent": null, "children": [31, 32], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"mothership_message.h\"", "parent": 30, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 31}}, {"id": 33, "type": "declaration", "text": "static bool process_message(Drone* drone, DroneMessage* message);", "parent": null, "children": [34, 35], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 65}}, {"id": 34, "type": "primitive_type", "text": "bool", "parent": 33, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 11}}, {"id": 35, "type": "function_declarator", "text": "process_message(Drone* drone, DroneMessage* message)", "parent": 33, "children": [36, 37], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 64}}, {"id": 36, "type": "identifier", "text": "process_message", "parent": 35, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 27}}, {"id": 37, "type": "parameter_list", "text": "(Drone* drone, DroneMessage* message)", "parent": 35, "children": [38, 43], "start_point": {"row": 14, "column": 27}, "end_point": {"row": 14, "column": 64}}, {"id": 38, "type": "parameter_declaration", "text": "Drone* drone", "parent": 37, "children": [39, 40], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 40}}, {"id": 39, "type": "type_identifier", "text": "Drone", "parent": 38, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 33}}, {"id": 40, "type": "pointer_declarator", "text": "* drone", "parent": 38, "children": [41, 42], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 40}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 34}}, {"id": 42, "type": "identifier", "text": "drone", "parent": 40, "children": [], "start_point": {"row": 14, "column": 35}, "end_point": {"row": 14, "column": 40}}, {"id": 43, "type": "parameter_declaration", "text": "DroneMessage* message", "parent": 37, "children": [44, 45], "start_point": {"row": 14, "column": 42}, "end_point": {"row": 14, "column": 63}}, {"id": 44, "type": "type_identifier", "text": "DroneMessage", "parent": 43, "children": [], "start_point": {"row": 14, "column": 42}, "end_point": {"row": 14, "column": 54}}, {"id": 45, "type": "pointer_declarator", "text": "* message", "parent": 43, "children": [46, 47], "start_point": {"row": 14, "column": 54}, "end_point": {"row": 14, "column": 63}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 14, "column": 54}, "end_point": {"row": 14, "column": 55}}, {"id": 47, "type": "identifier", "text": "message", "parent": 45, "children": [], "start_point": {"row": 14, "column": 56}, "end_point": {"row": 14, "column": 63}}, {"id": 48, "type": "declaration", "text": "static void drone_failure(Drone* drone);", "parent": null, "children": [49, 50], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 40}}, {"id": 49, "type": "primitive_type", "text": "void", "parent": 48, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 11}}, {"id": 50, "type": "function_declarator", "text": "drone_failure(Drone* drone)", "parent": 48, "children": [51, 52], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 39}}, {"id": 51, "type": "identifier", "text": "drone_failure", "parent": 50, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 25}}, {"id": 52, "type": "parameter_list", "text": "(Drone* drone)", "parent": 50, "children": [53], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 39}}, {"id": 53, "type": "parameter_declaration", "text": "Drone* drone", "parent": 52, "children": [54, 55], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 38}}, {"id": 54, "type": "type_identifier", "text": "Drone", "parent": 53, "children": [], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 31}}, {"id": 55, "type": "pointer_declarator", "text": "* drone", "parent": 53, "children": [56, 57], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 38}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 32}}, {"id": 57, "type": "identifier", "text": "drone", "parent": 55, "children": [], "start_point": {"row": 15, "column": 33}, "end_point": {"row": 15, "column": 38}}, {"id": 58, "type": "declaration", "text": "static unsigned int compute_sleep_time(Drone* drone);", "parent": null, "children": [59, 62], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 53}}, {"id": 59, "type": "sized_type_specifier", "text": "unsigned int", "parent": 58, "children": [60, 61], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 19}}, {"id": 60, "type": "unsigned", "text": "unsigned", "parent": 59, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 15}}, {"id": 61, "type": "primitive_type", "text": "int", "parent": 59, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 19}}, {"id": 62, "type": "function_declarator", "text": "compute_sleep_time(Drone* drone)", "parent": 58, "children": [63, 64], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 52}}, {"id": 63, "type": "identifier", "text": "compute_sleep_time", "parent": 62, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 38}}, {"id": 64, "type": "parameter_list", "text": "(Drone* drone)", "parent": 62, "children": [65], "start_point": {"row": 16, "column": 38}, "end_point": {"row": 16, "column": 52}}, {"id": 65, "type": "parameter_declaration", "text": "Drone* drone", "parent": 64, "children": [66, 67], "start_point": {"row": 16, "column": 39}, "end_point": {"row": 16, "column": 51}}, {"id": 66, "type": "type_identifier", "text": "Drone", "parent": 65, "children": [], "start_point": {"row": 16, "column": 39}, "end_point": {"row": 16, "column": 44}}, {"id": 67, "type": "pointer_declarator", "text": "* drone", "parent": 65, "children": [68, 69], "start_point": {"row": 16, "column": 44}, "end_point": {"row": 16, "column": 51}}, {"id": 68, "type": "*", "text": "*", "parent": 67, "children": [], "start_point": {"row": 16, "column": 44}, "end_point": {"row": 16, "column": 45}}, {"id": 69, "type": "identifier", "text": "drone", "parent": 67, "children": [], "start_point": {"row": 16, "column": 46}, "end_point": {"row": 16, "column": 51}}, {"id": 70, "type": "function_definition", "text": "Drone* drone_constructor(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n unsigned int rechargingTime, Mothership* motherShip) {\n\tDrone* drone = (Drone*) malloc(sizeof(Drone));\n\tdrone->id = id;\n\tdrone->maxLoad = maxLoad;\n\tdrone->maxAutonomy = drone->autonomy = autonomy;\n\tdrone->rechargingTime = rechargingTime;\n\tdrone->motherShip = motherShip;\n\tdrone->client = NULL;\n\tdrone->package = NULL;\n\tdrone->deliverySuccess = false;\n\tdrone->state = S_ALIVE;\n\n\tcheck(pthread_mutex_init(&(drone->mutex), NULL),\"Drone: pthread_mutex_init failed\");\n\n\tchar buffer[10];\n\tsprintf(buffer, \"/drone%03d\", drone->id);\n\tstruct mq_attr attr;\n\tattr.mq_curmsgs = 0;\n\tattr.mq_maxmsg = 10;\n\tattr.mq_flags = 0;\n\tattr.mq_msgsize = sizeof(DroneMessage);\n\tcheck((drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)), \"Drone: mq_open failed\");\n\tcheck(mq_unlink(buffer), \"Drone: mq_unlink failed\");\n\n\treturn drone;\n}", "parent": null, "children": [71, 72], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 71, "type": "type_identifier", "text": "Drone", "parent": 70, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 5}}, {"id": 72, "type": "pointer_declarator", "text": "* drone_constructor(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n unsigned int rechargingTime, Mothership* motherShip)", "parent": 70, "children": [73, 74], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 19, "column": 77}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 6}}, {"id": 74, "type": "function_declarator", "text": "drone_constructor(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n unsigned int rechargingTime, Mothership* motherShip)", "parent": 72, "children": [75, 76], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 19, "column": 77}}, {"id": 75, "type": "identifier", "text": "drone_constructor", "parent": 74, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 24}}, {"id": 76, "type": "parameter_list", "text": "(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n unsigned int rechargingTime, Mothership* motherShip)", "parent": 74, "children": [77, 82, 87, 92, 97], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 19, "column": 77}}, {"id": 77, "type": "parameter_declaration", "text": "unsigned int id", "parent": 76, "children": [78, 81], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 40}}, {"id": 78, "type": "sized_type_specifier", "text": "unsigned int", "parent": 77, "children": [79, 80], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 37}}, {"id": 79, "type": "unsigned", "text": "unsigned", "parent": 78, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 33}}, {"id": 80, "type": "primitive_type", "text": "int", "parent": 78, "children": [], "start_point": {"row": 18, "column": 34}, "end_point": {"row": 18, "column": 37}}, {"id": 81, "type": "identifier", "text": "id", "parent": 77, "children": [], "start_point": {"row": 18, "column": 38}, "end_point": {"row": 18, "column": 40}}, {"id": 82, "type": "parameter_declaration", "text": "unsigned int maxLoad", "parent": 76, "children": [83, 86], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 62}}, {"id": 83, "type": "sized_type_specifier", "text": "unsigned int", "parent": 82, "children": [84, 85], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 54}}, {"id": 84, "type": "unsigned", "text": "unsigned", "parent": 83, "children": [], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 50}}, {"id": 85, "type": "primitive_type", "text": "int", "parent": 83, "children": [], "start_point": {"row": 18, "column": 51}, "end_point": {"row": 18, "column": 54}}, {"id": 86, "type": "identifier", "text": "maxLoad", "parent": 82, "children": [], "start_point": {"row": 18, "column": 55}, "end_point": {"row": 18, "column": 62}}, {"id": 87, "type": "parameter_declaration", "text": "unsigned int autonomy", "parent": 76, "children": [88, 91], "start_point": {"row": 18, "column": 64}, "end_point": {"row": 18, "column": 85}}, {"id": 88, "type": "sized_type_specifier", "text": "unsigned int", "parent": 87, "children": [89, 90], "start_point": {"row": 18, "column": 64}, "end_point": {"row": 18, "column": 76}}, {"id": 89, "type": "unsigned", "text": "unsigned", "parent": 88, "children": [], "start_point": {"row": 18, "column": 64}, "end_point": {"row": 18, "column": 72}}, {"id": 90, "type": "primitive_type", "text": "int", "parent": 88, "children": [], "start_point": {"row": 18, "column": 73}, "end_point": {"row": 18, "column": 76}}, {"id": 91, "type": "identifier", "text": "autonomy", "parent": 87, "children": [], "start_point": {"row": 18, "column": 77}, "end_point": {"row": 18, "column": 85}}, {"id": 92, "type": "parameter_declaration", "text": "unsigned int rechargingTime", "parent": 76, "children": [93, 96], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 52}}, {"id": 93, "type": "sized_type_specifier", "text": "unsigned int", "parent": 92, "children": [94, 95], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 37}}, {"id": 94, "type": "unsigned", "text": "unsigned", "parent": 93, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 33}}, {"id": 95, "type": "primitive_type", "text": "int", "parent": 93, "children": [], "start_point": {"row": 19, "column": 34}, "end_point": {"row": 19, "column": 37}}, {"id": 96, "type": "identifier", "text": "rechargingTime", "parent": 92, "children": [], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 52}}, {"id": 97, "type": "parameter_declaration", "text": "Mothership* motherShip", "parent": 76, "children": [98, 99], "start_point": {"row": 19, "column": 54}, "end_point": {"row": 19, "column": 76}}, {"id": 98, "type": "type_identifier", "text": "Mothership", "parent": 97, "children": [], "start_point": {"row": 19, "column": 54}, "end_point": {"row": 19, "column": 64}}, {"id": 99, "type": "pointer_declarator", "text": "* motherShip", "parent": 97, "children": [100, 101], "start_point": {"row": 19, "column": 64}, "end_point": {"row": 19, "column": 76}}, {"id": 100, "type": "*", "text": "*", "parent": 99, "children": [], "start_point": {"row": 19, "column": 64}, "end_point": {"row": 19, "column": 65}}, {"id": 101, "type": "identifier", "text": "motherShip", "parent": 99, "children": [], "start_point": {"row": 19, "column": 66}, "end_point": {"row": 19, "column": 76}}, {"id": 102, "type": "declaration", "text": "Drone* drone = (Drone*) malloc(sizeof(Drone));", "parent": 70, "children": [103, 104], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 47}}, {"id": 103, "type": "type_identifier", "text": "Drone", "parent": 102, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 6}}, {"id": 104, "type": "init_declarator", "text": "* drone = (Drone*) malloc(sizeof(Drone))", "parent": 102, "children": [105, 108, 109], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 46}}, {"id": 105, "type": "pointer_declarator", "text": "* drone", "parent": 104, "children": [106, 107], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 13}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 7}}, {"id": 107, "type": "identifier", "text": "drone", "parent": 105, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 13}}, {"id": 108, "type": "=", "text": "=", "parent": 104, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 15}}, {"id": 109, "type": "cast_expression", "text": "(Drone*) malloc(sizeof(Drone))", "parent": 104, "children": [110, 114], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 46}}, {"id": 110, "type": "type_descriptor", "text": "Drone*", "parent": 109, "children": [111, 112], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 23}}, {"id": 111, "type": "type_identifier", "text": "Drone", "parent": 110, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 22}}, {"id": 112, "type": "abstract_pointer_declarator", "text": "*", "parent": 110, "children": [113], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 23}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 23}}, {"id": 114, "type": "call_expression", "text": "malloc(sizeof(Drone))", "parent": 109, "children": [115, 116], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 46}}, {"id": 115, "type": "identifier", "text": "malloc", "parent": 114, "children": [], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 31}}, {"id": 116, "type": "argument_list", "text": "(sizeof(Drone))", "parent": 114, "children": [117], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 46}}, {"id": 117, "type": "sizeof_expression", "text": "sizeof(Drone)", "parent": 116, "children": [118], "start_point": {"row": 20, "column": 32}, "end_point": {"row": 20, "column": 45}}, {"id": 118, "type": "parenthesized_expression", "text": "(Drone)", "parent": 117, "children": [119], "start_point": {"row": 20, "column": 38}, "end_point": {"row": 20, "column": 45}}, {"id": 119, "type": "identifier", "text": "Drone", "parent": 118, "children": [], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 44}}, {"id": 120, "type": "assignment_expression", "text": "drone->id = id", "parent": 70, "children": [121, 124, 125], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 15}}, {"id": 121, "type": "field_expression", "text": "drone->id", "parent": 120, "children": [122, 123], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 10}}, {"id": 122, "type": "identifier", "text": "drone", "parent": 121, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 6}}, {"id": 123, "type": "field_identifier", "text": "id", "parent": 121, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 10}}, {"id": 124, "type": "=", "text": "=", "parent": 120, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 12}}, {"id": 125, "type": "identifier", "text": "id", "parent": 120, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 15}}, {"id": 126, "type": "assignment_expression", "text": "drone->maxLoad = maxLoad", "parent": 70, "children": [127, 130, 131], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 25}}, {"id": 127, "type": "field_expression", "text": "drone->maxLoad", "parent": 126, "children": [128, 129], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 15}}, {"id": 128, "type": "identifier", "text": "drone", "parent": 127, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 6}}, {"id": 129, "type": "field_identifier", "text": "maxLoad", "parent": 127, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 15}}, {"id": 130, "type": "=", "text": "=", "parent": 126, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 17}}, {"id": 131, "type": "identifier", "text": "maxLoad", "parent": 126, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 25}}, {"id": 132, "type": "assignment_expression", "text": "drone->maxAutonomy = drone->autonomy = autonomy", "parent": 70, "children": [133, 136, 137], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 48}}, {"id": 133, "type": "field_expression", "text": "drone->maxAutonomy", "parent": 132, "children": [134, 135], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 19}}, {"id": 134, "type": "identifier", "text": "drone", "parent": 133, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 6}}, {"id": 135, "type": "field_identifier", "text": "maxAutonomy", "parent": 133, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 19}}, {"id": 136, "type": "=", "text": "=", "parent": 132, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 21}}, {"id": 137, "type": "assignment_expression", "text": "drone->autonomy = autonomy", "parent": 132, "children": [138, 141, 142], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 48}}, {"id": 138, "type": "field_expression", "text": "drone->autonomy", "parent": 137, "children": [139, 140], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 37}}, {"id": 139, "type": "identifier", "text": "drone", "parent": 138, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 27}}, {"id": 140, "type": "field_identifier", "text": "autonomy", "parent": 138, "children": [], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 37}}, {"id": 141, "type": "=", "text": "=", "parent": 137, "children": [], "start_point": {"row": 23, "column": 38}, "end_point": {"row": 23, "column": 39}}, {"id": 142, "type": "identifier", "text": "autonomy", "parent": 137, "children": [], "start_point": {"row": 23, "column": 40}, "end_point": {"row": 23, "column": 48}}, {"id": 143, "type": "assignment_expression", "text": "drone->rechargingTime = rechargingTime", "parent": 70, "children": [144, 147, 148], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 39}}, {"id": 144, "type": "field_expression", "text": "drone->rechargingTime", "parent": 143, "children": [145, 146], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 22}}, {"id": 145, "type": "identifier", "text": "drone", "parent": 144, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 6}}, {"id": 146, "type": "field_identifier", "text": "rechargingTime", "parent": 144, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 22}}, {"id": 147, "type": "=", "text": "=", "parent": 143, "children": [], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 24}}, {"id": 148, "type": "identifier", "text": "rechargingTime", "parent": 143, "children": [], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 39}}, {"id": 149, "type": "assignment_expression", "text": "drone->motherShip = motherShip", "parent": 70, "children": [150, 153, 154], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 31}}, {"id": 150, "type": "field_expression", "text": "drone->motherShip", "parent": 149, "children": [151, 152], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 18}}, {"id": 151, "type": "identifier", "text": "drone", "parent": 150, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 6}}, {"id": 152, "type": "field_identifier", "text": "motherShip", "parent": 150, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 18}}, {"id": 153, "type": "=", "text": "=", "parent": 149, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 20}}, {"id": 154, "type": "identifier", "text": "motherShip", "parent": 149, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 31}}, {"id": 155, "type": "assignment_expression", "text": "drone->client = NULL", "parent": 70, "children": [156, 159, 160], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 21}}, {"id": 156, "type": "field_expression", "text": "drone->client", "parent": 155, "children": [157, 158], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 14}}, {"id": 157, "type": "identifier", "text": "drone", "parent": 156, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 6}}, {"id": 158, "type": "field_identifier", "text": "client", "parent": 156, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 14}}, {"id": 159, "type": "=", "text": "=", "parent": 155, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 16}}, {"id": 160, "type": "null", "text": "NULL", "parent": 155, "children": [161], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 21}}, {"id": 161, "type": "NULL", "text": "NULL", "parent": 160, "children": [], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 21}}, {"id": 162, "type": "assignment_expression", "text": "drone->package = NULL", "parent": 70, "children": [163, 165, 166], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 22}}, {"id": 163, "type": "field_expression", "text": "drone->package", "parent": 162, "children": [164], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 15}}, {"id": 164, "type": "identifier", "text": "drone", "parent": 163, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 6}}, {"id": 165, "type": "=", "text": "=", "parent": 162, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 17}}, {"id": 166, "type": "null", "text": "NULL", "parent": 162, "children": [167], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 22}}, {"id": 167, "type": "NULL", "text": "NULL", "parent": 166, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 22}}, {"id": 168, "type": "assignment_expression", "text": "drone->deliverySuccess = false", "parent": 70, "children": [169, 172, 173], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 31}}, {"id": 169, "type": "field_expression", "text": "drone->deliverySuccess", "parent": 168, "children": [170, 171], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 23}}, {"id": 170, "type": "identifier", "text": "drone", "parent": 169, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 6}}, {"id": 171, "type": "field_identifier", "text": "deliverySuccess", "parent": 169, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 23}}, {"id": 172, "type": "=", "text": "=", "parent": 168, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 25}}, {"id": 173, "type": "false", "text": "false", "parent": 168, "children": [], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 31}}, {"id": 174, "type": "assignment_expression", "text": "drone->state = S_ALIVE", "parent": 70, "children": [175, 178, 179], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 23}}, {"id": 175, "type": "field_expression", "text": "drone->state", "parent": 174, "children": [176, 177], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 13}}, {"id": 176, "type": "identifier", "text": "drone", "parent": 175, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 6}}, {"id": 177, "type": "field_identifier", "text": "state", "parent": 175, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 13}}, {"id": 178, "type": "=", "text": "=", "parent": 174, "children": [], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 15}}, {"id": 179, "type": "identifier", "text": "S_ALIVE", "parent": 174, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 23}}, {"id": 180, "type": "call_expression", "text": "check(pthread_mutex_init(&(drone->mutex), NULL),\"Drone: pthread_mutex_init failed\")", "parent": 70, "children": [181, 182], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 84}}, {"id": 181, "type": "identifier", "text": "check", "parent": 180, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 6}}, {"id": 182, "type": "argument_list", "text": "(pthread_mutex_init(&(drone->mutex), NULL),\"Drone: pthread_mutex_init failed\")", "parent": 180, "children": [183, 193], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 84}}, {"id": 183, "type": "call_expression", "text": "pthread_mutex_init(&(drone->mutex), NULL)", "parent": 182, "children": [184, 185], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 48}}, {"id": 184, "type": "identifier", "text": "pthread_mutex_init", "parent": 183, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 25}}, {"id": 185, "type": "argument_list", "text": "(&(drone->mutex), NULL)", "parent": 183, "children": [186, 191], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 48}}, {"id": 186, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 185, "children": [187], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 41}}, {"id": 187, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 186, "children": [188], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 41}}, {"id": 188, "type": "field_expression", "text": "drone->mutex", "parent": 187, "children": [189, 190], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 40}}, {"id": 189, "type": "identifier", "text": "drone", "parent": 188, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 33}}, {"id": 190, "type": "field_identifier", "text": "mutex", "parent": 188, "children": [], "start_point": {"row": 31, "column": 35}, "end_point": {"row": 31, "column": 40}}, {"id": 191, "type": "null", "text": "NULL", "parent": 185, "children": [192], "start_point": {"row": 31, "column": 43}, "end_point": {"row": 31, "column": 47}}, {"id": 192, "type": "NULL", "text": "NULL", "parent": 191, "children": [], "start_point": {"row": 31, "column": 43}, "end_point": {"row": 31, "column": 47}}, {"id": 193, "type": "string_literal", "text": "\"Drone: pthread_mutex_init failed\"", "parent": 182, "children": [], "start_point": {"row": 31, "column": 49}, "end_point": {"row": 31, "column": 83}}, {"id": 194, "type": "declaration", "text": "char buffer[10];", "parent": 70, "children": [195, 196], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 17}}, {"id": 195, "type": "primitive_type", "text": "char", "parent": 194, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 5}}, {"id": 196, "type": "array_declarator", "text": "buffer[10]", "parent": 194, "children": [197, 198], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 16}}, {"id": 197, "type": "identifier", "text": "buffer", "parent": 196, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 12}}, {"id": 198, "type": "number_literal", "text": "10", "parent": 196, "children": [], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 15}}, {"id": 199, "type": "call_expression", "text": "sprintf(buffer, \"/drone%03d\", drone->id)", "parent": 70, "children": [200, 201], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 41}}, {"id": 200, "type": "identifier", "text": "sprintf", "parent": 199, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 8}}, {"id": 201, "type": "argument_list", "text": "(buffer, \"/drone%03d\", drone->id)", "parent": 199, "children": [202, 203, 204], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 41}}, {"id": 202, "type": "identifier", "text": "buffer", "parent": 201, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 15}}, {"id": 203, "type": "string_literal", "text": "\"/drone%03d\"", "parent": 201, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 29}}, {"id": 204, "type": "field_expression", "text": "drone->id", "parent": 201, "children": [205, 206], "start_point": {"row": 34, "column": 31}, "end_point": {"row": 34, "column": 40}}, {"id": 205, "type": "identifier", "text": "drone", "parent": 204, "children": [], "start_point": {"row": 34, "column": 31}, "end_point": {"row": 34, "column": 36}}, {"id": 206, "type": "field_identifier", "text": "id", "parent": 204, "children": [], "start_point": {"row": 34, "column": 38}, "end_point": {"row": 34, "column": 40}}, {"id": 207, "type": "declaration", "text": "struct mq_attr attr;", "parent": 70, "children": [208, 211], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 21}}, {"id": 208, "type": "struct_specifier", "text": "struct mq_attr", "parent": 207, "children": [209, 210], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 15}}, {"id": 209, "type": "struct", "text": "struct", "parent": 208, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 7}}, {"id": 210, "type": "type_identifier", "text": "mq_attr", "parent": 208, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 15}}, {"id": 211, "type": "identifier", "text": "attr", "parent": 207, "children": [], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 20}}, {"id": 212, "type": "assignment_expression", "text": "attr.mq_curmsgs = 0", "parent": 70, "children": [213, 216, 217], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 20}}, {"id": 213, "type": "field_expression", "text": "attr.mq_curmsgs", "parent": 212, "children": [214, 215], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 16}}, {"id": 214, "type": "identifier", "text": "attr", "parent": 213, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 5}}, {"id": 215, "type": "field_identifier", "text": "mq_curmsgs", "parent": 213, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 16}}, {"id": 216, "type": "=", "text": "=", "parent": 212, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 217, "type": "number_literal", "text": "0", "parent": 212, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 20}}, {"id": 218, "type": "assignment_expression", "text": "attr.mq_maxmsg = 10", "parent": 70, "children": [219, 222, 223], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 20}}, {"id": 219, "type": "field_expression", "text": "attr.mq_maxmsg", "parent": 218, "children": [220, 221], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 15}}, {"id": 220, "type": "identifier", "text": "attr", "parent": 219, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 5}}, {"id": 221, "type": "field_identifier", "text": "mq_maxmsg", "parent": 219, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 15}}, {"id": 222, "type": "=", "text": "=", "parent": 218, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 17}}, {"id": 223, "type": "number_literal", "text": "10", "parent": 218, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 20}}, {"id": 224, "type": "assignment_expression", "text": "attr.mq_flags = 0", "parent": 70, "children": [225, 228, 229], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 18}}, {"id": 225, "type": "field_expression", "text": "attr.mq_flags", "parent": 224, "children": [226, 227], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 14}}, {"id": 226, "type": "identifier", "text": "attr", "parent": 225, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 5}}, {"id": 227, "type": "field_identifier", "text": "mq_flags", "parent": 225, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 14}}, {"id": 228, "type": "=", "text": "=", "parent": 224, "children": [], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 16}}, {"id": 229, "type": "number_literal", "text": "0", "parent": 224, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 18}}, {"id": 230, "type": "assignment_expression", "text": "attr.mq_msgsize = sizeof(DroneMessage)", "parent": 70, "children": [231, 234, 235], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 39}}, {"id": 231, "type": "field_expression", "text": "attr.mq_msgsize", "parent": 230, "children": [232, 233], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 16}}, {"id": 232, "type": "identifier", "text": "attr", "parent": 231, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 5}}, {"id": 233, "type": "field_identifier", "text": "mq_msgsize", "parent": 231, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 16}}, {"id": 234, "type": "=", "text": "=", "parent": 230, "children": [], "start_point": {"row": 39, "column": 17}, "end_point": {"row": 39, "column": 18}}, {"id": 235, "type": "sizeof_expression", "text": "sizeof(DroneMessage)", "parent": 230, "children": [236], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 39}}, {"id": 236, "type": "parenthesized_expression", "text": "(DroneMessage)", "parent": 235, "children": [237], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 39}}, {"id": 237, "type": "identifier", "text": "DroneMessage", "parent": 236, "children": [], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 38}}, {"id": 238, "type": "call_expression", "text": "check((drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)), \"Drone: mq_open failed\")", "parent": 70, "children": [239, 240], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 101}}, {"id": 239, "type": "identifier", "text": "check", "parent": 238, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 6}}, {"id": 240, "type": "argument_list", "text": "((drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)), \"Drone: mq_open failed\")", "parent": 238, "children": [241, 257], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 101}}, {"id": 241, "type": "parenthesized_expression", "text": "(drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr))", "parent": 240, "children": [242], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 75}}, {"id": 242, "type": "assignment_expression", "text": "drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)", "parent": 241, "children": [243, 246, 247], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 74}}, {"id": 243, "type": "field_expression", "text": "drone->msgQueueID", "parent": 242, "children": [244, 245], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 25}}, {"id": 244, "type": "identifier", "text": "drone", "parent": 243, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 13}}, {"id": 245, "type": "field_identifier", "text": "msgQueueID", "parent": 243, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 25}}, {"id": 246, "type": "=", "text": "=", "parent": 242, "children": [], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 27}}, {"id": 247, "type": "call_expression", "text": "mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)", "parent": 242, "children": [248, 249], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 74}}, {"id": 248, "type": "identifier", "text": "mq_open", "parent": 247, "children": [], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 35}}, {"id": 249, "type": "argument_list", "text": "(buffer, O_RDWR | O_CREAT, 0660, &attr)", "parent": 247, "children": [250, 251, 254, 255], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 74}}, {"id": 250, "type": "identifier", "text": "buffer", "parent": 249, "children": [], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 42}}, {"id": 251, "type": "binary_expression", "text": "O_RDWR | O_CREAT", "parent": 249, "children": [252, 253], "start_point": {"row": 40, "column": 44}, "end_point": {"row": 40, "column": 60}}, {"id": 252, "type": "identifier", "text": "O_RDWR", "parent": 251, "children": [], "start_point": {"row": 40, "column": 44}, "end_point": {"row": 40, "column": 50}}, {"id": 253, "type": "identifier", "text": "O_CREAT", "parent": 251, "children": [], "start_point": {"row": 40, "column": 53}, "end_point": {"row": 40, "column": 60}}, {"id": 254, "type": "number_literal", "text": "0660", "parent": 249, "children": [], "start_point": {"row": 40, "column": 62}, "end_point": {"row": 40, "column": 66}}, {"id": 255, "type": "pointer_expression", "text": "&attr", "parent": 249, "children": [256], "start_point": {"row": 40, "column": 68}, "end_point": {"row": 40, "column": 73}}, {"id": 256, "type": "identifier", "text": "attr", "parent": 255, "children": [], "start_point": {"row": 40, "column": 69}, "end_point": {"row": 40, "column": 73}}, {"id": 257, "type": "string_literal", "text": "\"Drone: mq_open failed\"", "parent": 240, "children": [], "start_point": {"row": 40, "column": 77}, "end_point": {"row": 40, "column": 100}}, {"id": 258, "type": "call_expression", "text": "check(mq_unlink(buffer), \"Drone: mq_unlink failed\")", "parent": 70, "children": [259, 260], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 52}}, {"id": 259, "type": "identifier", "text": "check", "parent": 258, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 6}}, {"id": 260, "type": "argument_list", "text": "(mq_unlink(buffer), \"Drone: mq_unlink failed\")", "parent": 258, "children": [261, 265], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 52}}, {"id": 261, "type": "call_expression", "text": "mq_unlink(buffer)", "parent": 260, "children": [262, 263], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 24}}, {"id": 262, "type": "identifier", "text": "mq_unlink", "parent": 261, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 16}}, {"id": 263, "type": "argument_list", "text": "(buffer)", "parent": 261, "children": [264], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 24}}, {"id": 264, "type": "identifier", "text": "buffer", "parent": 263, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 23}}, {"id": 265, "type": "string_literal", "text": "\"Drone: mq_unlink failed\"", "parent": 260, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 51}}, {"id": 266, "type": "return_statement", "text": "return drone;", "parent": 70, "children": [267], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 14}}, {"id": 267, "type": "identifier", "text": "drone", "parent": 266, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 13}}, {"id": 268, "type": "function_definition", "text": "void drone_free(Drone* drone) {\n\tcheck(pthread_mutex_destroy(&(drone->mutex)),\"Drone: pthread_mutex_destroy failed\");\n\tcheck(mq_close(drone->msgQueueID),\"Drone: mq_close failed\");\n\tfree(drone);\n}", "parent": null, "children": [269, 270], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 269, "type": "primitive_type", "text": "void", "parent": 268, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 4}}, {"id": 270, "type": "function_declarator", "text": "drone_free(Drone* drone)", "parent": 268, "children": [271, 272], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 29}}, {"id": 271, "type": "identifier", "text": "drone_free", "parent": 270, "children": [], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 15}}, {"id": 272, "type": "parameter_list", "text": "(Drone* drone)", "parent": 270, "children": [273], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 29}}, {"id": 273, "type": "parameter_declaration", "text": "Drone* drone", "parent": 272, "children": [274, 275], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 28}}, {"id": 274, "type": "type_identifier", "text": "Drone", "parent": 273, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 21}}, {"id": 275, "type": "pointer_declarator", "text": "* drone", "parent": 273, "children": [276, 277], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 28}}, {"id": 276, "type": "*", "text": "*", "parent": 275, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 22}}, {"id": 277, "type": "identifier", "text": "drone", "parent": 275, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 28}}, {"id": 278, "type": "call_expression", "text": "check(pthread_mutex_destroy(&(drone->mutex)),\"Drone: pthread_mutex_destroy failed\")", "parent": 268, "children": [279, 280], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 84}}, {"id": 279, "type": "identifier", "text": "check", "parent": 278, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 6}}, {"id": 280, "type": "argument_list", "text": "(pthread_mutex_destroy(&(drone->mutex)),\"Drone: pthread_mutex_destroy failed\")", "parent": 278, "children": [281, 289], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 84}}, {"id": 281, "type": "call_expression", "text": "pthread_mutex_destroy(&(drone->mutex))", "parent": 280, "children": [282, 283], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 45}}, {"id": 282, "type": "identifier", "text": "pthread_mutex_destroy", "parent": 281, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 28}}, {"id": 283, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 281, "children": [284], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 45}}, {"id": 284, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 283, "children": [285], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 47, "column": 44}}, {"id": 285, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 284, "children": [286], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 44}}, {"id": 286, "type": "field_expression", "text": "drone->mutex", "parent": 285, "children": [287, 288], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 43}}, {"id": 287, "type": "identifier", "text": "drone", "parent": 286, "children": [], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 36}}, {"id": 288, "type": "field_identifier", "text": "mutex", "parent": 286, "children": [], "start_point": {"row": 47, "column": 38}, "end_point": {"row": 47, "column": 43}}, {"id": 289, "type": "string_literal", "text": "\"Drone: pthread_mutex_destroy failed\"", "parent": 280, "children": [], "start_point": {"row": 47, "column": 46}, "end_point": {"row": 47, "column": 83}}, {"id": 290, "type": "call_expression", "text": "check(mq_close(drone->msgQueueID),\"Drone: mq_close failed\")", "parent": 268, "children": [291, 292], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 60}}, {"id": 291, "type": "identifier", "text": "check", "parent": 290, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 6}}, {"id": 292, "type": "argument_list", "text": "(mq_close(drone->msgQueueID),\"Drone: mq_close failed\")", "parent": 290, "children": [293, 299], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 60}}, {"id": 293, "type": "call_expression", "text": "mq_close(drone->msgQueueID)", "parent": 292, "children": [294, 295], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 34}}, {"id": 294, "type": "identifier", "text": "mq_close", "parent": 293, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 15}}, {"id": 295, "type": "argument_list", "text": "(drone->msgQueueID)", "parent": 293, "children": [296], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 34}}, {"id": 296, "type": "field_expression", "text": "drone->msgQueueID", "parent": 295, "children": [297, 298], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 33}}, {"id": 297, "type": "identifier", "text": "drone", "parent": 296, "children": [], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 21}}, {"id": 298, "type": "field_identifier", "text": "msgQueueID", "parent": 296, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 33}}, {"id": 299, "type": "string_literal", "text": "\"Drone: mq_close failed\"", "parent": 292, "children": [], "start_point": {"row": 48, "column": 35}, "end_point": {"row": 48, "column": 59}}, {"id": 300, "type": "call_expression", "text": "free(drone)", "parent": 268, "children": [301, 302], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 12}}, {"id": 301, "type": "identifier", "text": "free", "parent": 300, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 5}}, {"id": 302, "type": "argument_list", "text": "(drone)", "parent": 300, "children": [303], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 12}}, {"id": 303, "type": "identifier", "text": "drone", "parent": 302, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 11}}, {"id": 304, "type": "function_definition", "text": "void* drone_launch(Drone* drone) {\n\tDashboardMessage dashboardMessage;\n\tdashboardMessage.type = D_DRONE;\n\tdashboardMessage.number = drone->id;\n\tdashboardMessage.state = D_DRONE_WAITING;\n\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\tDroneMessage droneMessage;\n\tcheck((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), \"mq_receive failed\");\n\twhile(process_message(drone, &droneMessage)) {\n\t\tcheck((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), \"mq_receive failed\");\n\t}\n\tpthread_exit(0);\n}", "parent": null, "children": [305, 306], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 305, "type": "primitive_type", "text": "void", "parent": 304, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 4}}, {"id": 306, "type": "pointer_declarator", "text": "* drone_launch(Drone* drone)", "parent": 304, "children": [307, 308], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 32}}, {"id": 307, "type": "*", "text": "*", "parent": 306, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 5}}, {"id": 308, "type": "function_declarator", "text": "drone_launch(Drone* drone)", "parent": 306, "children": [309, 310], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 32}}, {"id": 309, "type": "identifier", "text": "drone_launch", "parent": 308, "children": [], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 18}}, {"id": 310, "type": "parameter_list", "text": "(Drone* drone)", "parent": 308, "children": [311], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 32}}, {"id": 311, "type": "parameter_declaration", "text": "Drone* drone", "parent": 310, "children": [312, 313], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 31}}, {"id": 312, "type": "type_identifier", "text": "Drone", "parent": 311, "children": [], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 24}}, {"id": 313, "type": "pointer_declarator", "text": "* drone", "parent": 311, "children": [314, 315], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 31}}, {"id": 314, "type": "*", "text": "*", "parent": 313, "children": [], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 25}}, {"id": 315, "type": "identifier", "text": "drone", "parent": 313, "children": [], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 31}}, {"id": 316, "type": "declaration", "text": "DashboardMessage dashboardMessage;", "parent": 304, "children": [317, 318], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 35}}, {"id": 317, "type": "type_identifier", "text": "DashboardMessage", "parent": 316, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 17}}, {"id": 318, "type": "identifier", "text": "dashboardMessage", "parent": 316, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 34}}, {"id": 319, "type": "assignment_expression", "text": "dashboardMessage.type = D_DRONE", "parent": 304, "children": [320, 323, 324], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 32}}, {"id": 320, "type": "field_expression", "text": "dashboardMessage.type", "parent": 319, "children": [321, 322], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 22}}, {"id": 321, "type": "identifier", "text": "dashboardMessage", "parent": 320, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 17}}, {"id": 322, "type": "field_identifier", "text": "type", "parent": 320, "children": [], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 22}}, {"id": 323, "type": "=", "text": "=", "parent": 319, "children": [], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 24}}, {"id": 324, "type": "identifier", "text": "D_DRONE", "parent": 319, "children": [], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 32}}, {"id": 325, "type": "assignment_expression", "text": "dashboardMessage.number = drone->id", "parent": 304, "children": [326, 329, 330], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 36}}, {"id": 326, "type": "field_expression", "text": "dashboardMessage.number", "parent": 325, "children": [327, 328], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 24}}, {"id": 327, "type": "identifier", "text": "dashboardMessage", "parent": 326, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 17}}, {"id": 328, "type": "field_identifier", "text": "number", "parent": 326, "children": [], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 24}}, {"id": 329, "type": "=", "text": "=", "parent": 325, "children": [], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 26}}, {"id": 330, "type": "field_expression", "text": "drone->id", "parent": 325, "children": [331, 332], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 36}}, {"id": 331, "type": "identifier", "text": "drone", "parent": 330, "children": [], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 32}}, {"id": 332, "type": "field_identifier", "text": "id", "parent": 330, "children": [], "start_point": {"row": 55, "column": 34}, "end_point": {"row": 55, "column": 36}}, {"id": 333, "type": "assignment_expression", "text": "dashboardMessage.state = D_DRONE_WAITING", "parent": 304, "children": [334, 337, 338], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 41}}, {"id": 334, "type": "field_expression", "text": "dashboardMessage.state", "parent": 333, "children": [335, 336], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 23}}, {"id": 335, "type": "identifier", "text": "dashboardMessage", "parent": 334, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 17}}, {"id": 336, "type": "field_identifier", "text": "state", "parent": 334, "children": [], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 23}}, {"id": 337, "type": "=", "text": "=", "parent": 333, "children": [], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 25}}, {"id": 338, "type": "identifier", "text": "D_DRONE_WAITING", "parent": 333, "children": [], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 41}}, {"id": 339, "type": "call_expression", "text": "dashboard_sendMessage(global_dashboard, &dashboardMessage)", "parent": 304, "children": [340, 341], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 59}}, {"id": 340, "type": "identifier", "text": "dashboard_sendMessage", "parent": 339, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 22}}, {"id": 341, "type": "argument_list", "text": "(global_dashboard, &dashboardMessage)", "parent": 339, "children": [342, 343], "start_point": {"row": 57, "column": 22}, "end_point": {"row": 57, "column": 59}}, {"id": 342, "type": "identifier", "text": "global_dashboard", "parent": 341, "children": [], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 39}}, {"id": 343, "type": "pointer_expression", "text": "&dashboardMessage", "parent": 341, "children": [344], "start_point": {"row": 57, "column": 41}, "end_point": {"row": 57, "column": 58}}, {"id": 344, "type": "identifier", "text": "dashboardMessage", "parent": 343, "children": [], "start_point": {"row": 57, "column": 42}, "end_point": {"row": 57, "column": 58}}, {"id": 345, "type": "declaration", "text": "DroneMessage droneMessage;", "parent": 304, "children": [346, 347], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 27}}, {"id": 346, "type": "type_identifier", "text": "DroneMessage", "parent": 345, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 13}}, {"id": 347, "type": "identifier", "text": "droneMessage", "parent": 345, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 26}}, {"id": 348, "type": "call_expression", "text": "check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), \"mq_receive failed\")", "parent": 304, "children": [349, 350], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 112}}, {"id": 349, "type": "identifier", "text": "check", "parent": 348, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 6}}, {"id": 350, "type": "argument_list", "text": "((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), \"mq_receive failed\")", "parent": 348, "children": [351, 371], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 112}}, {"id": 351, "type": "cast_expression", "text": "(int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)", "parent": 350, "children": [352, 354], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 90}}, {"id": 352, "type": "type_descriptor", "text": "int", "parent": 351, "children": [353], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 11}}, {"id": 353, "type": "primitive_type", "text": "int", "parent": 352, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 11}}, {"id": 354, "type": "call_expression", "text": "mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)", "parent": 351, "children": [355, 356], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 90}}, {"id": 355, "type": "identifier", "text": "mq_receive", "parent": 354, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 23}}, {"id": 356, "type": "argument_list", "text": "(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)", "parent": 354, "children": [357, 360, 367, 370], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 90}}, {"id": 357, "type": "field_expression", "text": "drone->msgQueueID", "parent": 356, "children": [358, 359], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 41}}, {"id": 358, "type": "identifier", "text": "drone", "parent": 357, "children": [], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 29}}, {"id": 359, "type": "field_identifier", "text": "msgQueueID", "parent": 357, "children": [], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 41}}, {"id": 360, "type": "cast_expression", "text": "(char*) &droneMessage", "parent": 356, "children": [361, 365], "start_point": {"row": 60, "column": 43}, "end_point": {"row": 60, "column": 64}}, {"id": 361, "type": "type_descriptor", "text": "char*", "parent": 360, "children": [362, 363], "start_point": {"row": 60, "column": 44}, "end_point": {"row": 60, "column": 49}}, {"id": 362, "type": "primitive_type", "text": "char", "parent": 361, "children": [], "start_point": {"row": 60, "column": 44}, "end_point": {"row": 60, "column": 48}}, {"id": 363, "type": "abstract_pointer_declarator", "text": "*", "parent": 361, "children": [364], "start_point": {"row": 60, "column": 48}, "end_point": {"row": 60, "column": 49}}, {"id": 364, "type": "*", "text": "*", "parent": 363, "children": [], "start_point": {"row": 60, "column": 48}, "end_point": {"row": 60, "column": 49}}, {"id": 365, "type": "pointer_expression", "text": "&droneMessage", "parent": 360, "children": [366], "start_point": {"row": 60, "column": 51}, "end_point": {"row": 60, "column": 64}}, {"id": 366, "type": "identifier", "text": "droneMessage", "parent": 365, "children": [], "start_point": {"row": 60, "column": 52}, "end_point": {"row": 60, "column": 64}}, {"id": 367, "type": "sizeof_expression", "text": "sizeof(DroneMessage)", "parent": 356, "children": [368], "start_point": {"row": 60, "column": 66}, "end_point": {"row": 60, "column": 86}}, {"id": 368, "type": "parenthesized_expression", "text": "(DroneMessage)", "parent": 367, "children": [369], "start_point": {"row": 60, "column": 72}, "end_point": {"row": 60, "column": 86}}, {"id": 369, "type": "identifier", "text": "DroneMessage", "parent": 368, "children": [], "start_point": {"row": 60, "column": 73}, "end_point": {"row": 60, "column": 85}}, {"id": 370, "type": "number_literal", "text": "0", "parent": 356, "children": [], "start_point": {"row": 60, "column": 88}, "end_point": {"row": 60, "column": 89}}, {"id": 371, "type": "string_literal", "text": "\"mq_receive failed\"", "parent": 350, "children": [], "start_point": {"row": 60, "column": 92}, "end_point": {"row": 60, "column": 111}}, {"id": 372, "type": "while_statement", "text": "while(process_message(drone, &droneMessage)) {\n\t\tcheck((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), \"mq_receive failed\");\n\t}", "parent": 304, "children": [373], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 63, "column": 2}}, {"id": 373, "type": "parenthesized_expression", "text": "(process_message(drone, &droneMessage))", "parent": 372, "children": [374], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 45}}, {"id": 374, "type": "call_expression", "text": "process_message(drone, &droneMessage)", "parent": 373, "children": [375, 376], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 44}}, {"id": 375, "type": "identifier", "text": "process_message", "parent": 374, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 22}}, {"id": 376, "type": "argument_list", "text": "(drone, &droneMessage)", "parent": 374, "children": [377, 378], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 44}}, {"id": 377, "type": "identifier", "text": "drone", "parent": 376, "children": [], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 28}}, {"id": 378, "type": "pointer_expression", "text": "&droneMessage", "parent": 376, "children": [379], "start_point": {"row": 61, "column": 30}, "end_point": {"row": 61, "column": 43}}, {"id": 379, "type": "identifier", "text": "droneMessage", "parent": 378, "children": [], "start_point": {"row": 61, "column": 31}, "end_point": {"row": 61, "column": 43}}, {"id": 380, "type": "call_expression", "text": "check((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), \"mq_receive failed\")", "parent": 372, "children": [381, 382], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 113}}, {"id": 381, "type": "identifier", "text": "check", "parent": 380, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 7}}, {"id": 382, "type": "argument_list", "text": "((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), \"mq_receive failed\")", "parent": 380, "children": [383, 403], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 113}}, {"id": 383, "type": "cast_expression", "text": "(int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)", "parent": 382, "children": [384, 386], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 91}}, {"id": 384, "type": "type_descriptor", "text": "int", "parent": 383, "children": [385], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 12}}, {"id": 385, "type": "primitive_type", "text": "int", "parent": 384, "children": [], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 12}}, {"id": 386, "type": "call_expression", "text": "mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)", "parent": 383, "children": [387, 388], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 91}}, {"id": 387, "type": "identifier", "text": "mq_receive", "parent": 386, "children": [], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 24}}, {"id": 388, "type": "argument_list", "text": "(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0)", "parent": 386, "children": [389, 392, 399, 402], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 91}}, {"id": 389, "type": "field_expression", "text": "drone->msgQueueID", "parent": 388, "children": [390, 391], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 42}}, {"id": 390, "type": "identifier", "text": "drone", "parent": 389, "children": [], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 30}}, {"id": 391, "type": "field_identifier", "text": "msgQueueID", "parent": 389, "children": [], "start_point": {"row": 62, "column": 32}, "end_point": {"row": 62, "column": 42}}, {"id": 392, "type": "cast_expression", "text": "(char*) &droneMessage", "parent": 388, "children": [393, 397], "start_point": {"row": 62, "column": 44}, "end_point": {"row": 62, "column": 65}}, {"id": 393, "type": "type_descriptor", "text": "char*", "parent": 392, "children": [394, 395], "start_point": {"row": 62, "column": 45}, "end_point": {"row": 62, "column": 50}}, {"id": 394, "type": "primitive_type", "text": "char", "parent": 393, "children": [], "start_point": {"row": 62, "column": 45}, "end_point": {"row": 62, "column": 49}}, {"id": 395, "type": "abstract_pointer_declarator", "text": "*", "parent": 393, "children": [396], "start_point": {"row": 62, "column": 49}, "end_point": {"row": 62, "column": 50}}, {"id": 396, "type": "*", "text": "*", "parent": 395, "children": [], "start_point": {"row": 62, "column": 49}, "end_point": {"row": 62, "column": 50}}, {"id": 397, "type": "pointer_expression", "text": "&droneMessage", "parent": 392, "children": [398], "start_point": {"row": 62, "column": 52}, "end_point": {"row": 62, "column": 65}}, {"id": 398, "type": "identifier", "text": "droneMessage", "parent": 397, "children": [], "start_point": {"row": 62, "column": 53}, "end_point": {"row": 62, "column": 65}}, {"id": 399, "type": "sizeof_expression", "text": "sizeof(DroneMessage)", "parent": 388, "children": [400], "start_point": {"row": 62, "column": 67}, "end_point": {"row": 62, "column": 87}}, {"id": 400, "type": "parenthesized_expression", "text": "(DroneMessage)", "parent": 399, "children": [401], "start_point": {"row": 62, "column": 73}, "end_point": {"row": 62, "column": 87}}, {"id": 401, "type": "identifier", "text": "DroneMessage", "parent": 400, "children": [], "start_point": {"row": 62, "column": 74}, "end_point": {"row": 62, "column": 86}}, {"id": 402, "type": "number_literal", "text": "0", "parent": 388, "children": [], "start_point": {"row": 62, "column": 89}, "end_point": {"row": 62, "column": 90}}, {"id": 403, "type": "string_literal", "text": "\"mq_receive failed\"", "parent": 382, "children": [], "start_point": {"row": 62, "column": 93}, "end_point": {"row": 62, "column": 112}}, {"id": 404, "type": "call_expression", "text": "pthread_exit(0)", "parent": 304, "children": [405, 406], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 16}}, {"id": 405, "type": "identifier", "text": "pthread_exit", "parent": 404, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 13}}, {"id": 406, "type": "argument_list", "text": "(0)", "parent": 404, "children": [407], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 16}}, {"id": 407, "type": "number_literal", "text": "0", "parent": 406, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 15}}, {"id": 408, "type": "function_definition", "text": "void drone_sendMessage(Drone* drone, DroneMessage* message) {\n\tcheck(mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0), \"mq_send failed\");\n}", "parent": null, "children": [409, 410], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 69, "column": 1}}, {"id": 409, "type": "primitive_type", "text": "void", "parent": 408, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 4}}, {"id": 410, "type": "function_declarator", "text": "drone_sendMessage(Drone* drone, DroneMessage* message)", "parent": 408, "children": [411, 412], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 59}}, {"id": 411, "type": "identifier", "text": "drone_sendMessage", "parent": 410, "children": [], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 22}}, {"id": 412, "type": "parameter_list", "text": "(Drone* drone, DroneMessage* message)", "parent": 410, "children": [413, 418], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 59}}, {"id": 413, "type": "parameter_declaration", "text": "Drone* drone", "parent": 412, "children": [414, 415], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 35}}, {"id": 414, "type": "type_identifier", "text": "Drone", "parent": 413, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 28}}, {"id": 415, "type": "pointer_declarator", "text": "* drone", "parent": 413, "children": [416, 417], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 35}}, {"id": 416, "type": "*", "text": "*", "parent": 415, "children": [], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 29}}, {"id": 417, "type": "identifier", "text": "drone", "parent": 415, "children": [], "start_point": {"row": 67, "column": 30}, "end_point": {"row": 67, "column": 35}}, {"id": 418, "type": "parameter_declaration", "text": "DroneMessage* message", "parent": 412, "children": [419, 420], "start_point": {"row": 67, "column": 37}, "end_point": {"row": 67, "column": 58}}, {"id": 419, "type": "type_identifier", "text": "DroneMessage", "parent": 418, "children": [], "start_point": {"row": 67, "column": 37}, "end_point": {"row": 67, "column": 49}}, {"id": 420, "type": "pointer_declarator", "text": "* message", "parent": 418, "children": [421, 422], "start_point": {"row": 67, "column": 49}, "end_point": {"row": 67, "column": 58}}, {"id": 421, "type": "*", "text": "*", "parent": 420, "children": [], "start_point": {"row": 67, "column": 49}, "end_point": {"row": 67, "column": 50}}, {"id": 422, "type": "identifier", "text": "message", "parent": 420, "children": [], "start_point": {"row": 67, "column": 51}, "end_point": {"row": 67, "column": 58}}, {"id": 423, "type": "call_expression", "text": "check(mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0), \"mq_send failed\")", "parent": 408, "children": [424, 425], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 100}}, {"id": 424, "type": "identifier", "text": "check", "parent": 423, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 6}}, {"id": 425, "type": "argument_list", "text": "(mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0), \"mq_send failed\")", "parent": 423, "children": [426, 442], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 100}}, {"id": 426, "type": "call_expression", "text": "mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0)", "parent": 425, "children": [427, 428], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 81}}, {"id": 427, "type": "identifier", "text": "mq_send", "parent": 426, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 14}}, {"id": 428, "type": "argument_list", "text": "(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0)", "parent": 426, "children": [429, 432, 438, 441], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 81}}, {"id": 429, "type": "field_expression", "text": "drone->msgQueueID", "parent": 428, "children": [430, 431], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 32}}, {"id": 430, "type": "identifier", "text": "drone", "parent": 429, "children": [], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 20}}, {"id": 431, "type": "field_identifier", "text": "msgQueueID", "parent": 429, "children": [], "start_point": {"row": 68, "column": 22}, "end_point": {"row": 68, "column": 32}}, {"id": 432, "type": "cast_expression", "text": "(const char*) message", "parent": 428, "children": [433, 437], "start_point": {"row": 68, "column": 34}, "end_point": {"row": 68, "column": 55}}, {"id": 433, "type": "type_descriptor", "text": "const char*", "parent": 432, "children": [434, 435], "start_point": {"row": 68, "column": 35}, "end_point": {"row": 68, "column": 46}}, {"id": 434, "type": "primitive_type", "text": "char", "parent": 433, "children": [], "start_point": {"row": 68, "column": 41}, "end_point": {"row": 68, "column": 45}}, {"id": 435, "type": "abstract_pointer_declarator", "text": "*", "parent": 433, "children": [436], "start_point": {"row": 68, "column": 45}, "end_point": {"row": 68, "column": 46}}, {"id": 436, "type": "*", "text": "*", "parent": 435, "children": [], "start_point": {"row": 68, "column": 45}, "end_point": {"row": 68, "column": 46}}, {"id": 437, "type": "identifier", "text": "message", "parent": 432, "children": [], "start_point": {"row": 68, "column": 48}, "end_point": {"row": 68, "column": 55}}, {"id": 438, "type": "sizeof_expression", "text": "sizeof(DroneMessage)", "parent": 428, "children": [439], "start_point": {"row": 68, "column": 57}, "end_point": {"row": 68, "column": 77}}, {"id": 439, "type": "parenthesized_expression", "text": "(DroneMessage)", "parent": 438, "children": [440], "start_point": {"row": 68, "column": 63}, "end_point": {"row": 68, "column": 77}}, {"id": 440, "type": "identifier", "text": "DroneMessage", "parent": 439, "children": [], "start_point": {"row": 68, "column": 64}, "end_point": {"row": 68, "column": 76}}, {"id": 441, "type": "number_literal", "text": "0", "parent": 428, "children": [], "start_point": {"row": 68, "column": 79}, "end_point": {"row": 68, "column": 80}}, {"id": 442, "type": "string_literal", "text": "\"mq_send failed\"", "parent": 425, "children": [], "start_point": {"row": 68, "column": 83}, "end_point": {"row": 68, "column": 99}}, {"id": 443, "type": "function_definition", "text": "unsigned int computePowerConsumption(Package* package, double mothershipToClientDistance) {\n\treturn package->weight + (unsigned int) mothershipToClientDistance;\n}", "parent": null, "children": [444, 447], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 73, "column": 1}}, {"id": 444, "type": "sized_type_specifier", "text": "unsigned int", "parent": 443, "children": [445, 446], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 12}}, {"id": 445, "type": "unsigned", "text": "unsigned", "parent": 444, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 8}}, {"id": 446, "type": "primitive_type", "text": "int", "parent": 444, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 12}}, {"id": 447, "type": "function_declarator", "text": "computePowerConsumption(Package* package, double mothershipToClientDistance)", "parent": 443, "children": [448, 449], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 89}}, {"id": 448, "type": "identifier", "text": "computePowerConsumption", "parent": 447, "children": [], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 36}}, {"id": 449, "type": "parameter_list", "text": "(Package* package, double mothershipToClientDistance)", "parent": 447, "children": [450, 454], "start_point": {"row": 71, "column": 36}, "end_point": {"row": 71, "column": 89}}, {"id": 450, "type": "parameter_declaration", "text": "Package* package", "parent": 449, "children": [451, 452], "start_point": {"row": 71, "column": 37}, "end_point": {"row": 71, "column": 53}}, {"id": 451, "type": "type_identifier", "text": "Package", "parent": 450, "children": [], "start_point": {"row": 71, "column": 37}, "end_point": {"row": 71, "column": 44}}, {"id": 452, "type": "pointer_declarator", "text": "* package", "parent": 450, "children": [453], "start_point": {"row": 71, "column": 44}, "end_point": {"row": 71, "column": 53}}, {"id": 453, "type": "*", "text": "*", "parent": 452, "children": [], "start_point": {"row": 71, "column": 44}, "end_point": {"row": 71, "column": 45}}, {"id": 454, "type": "parameter_declaration", "text": "double mothershipToClientDistance", "parent": 449, "children": [455, 456], "start_point": {"row": 71, "column": 55}, "end_point": {"row": 71, "column": 88}}, {"id": 455, "type": "primitive_type", "text": "double", "parent": 454, "children": [], "start_point": {"row": 71, "column": 55}, "end_point": {"row": 71, "column": 61}}, {"id": 456, "type": "identifier", "text": "mothershipToClientDistance", "parent": 454, "children": [], "start_point": {"row": 71, "column": 62}, "end_point": {"row": 71, "column": 88}}, {"id": 457, "type": "return_statement", "text": "return package->weight + (unsigned int) mothershipToClientDistance;", "parent": 443, "children": [458], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 68}}, {"id": 458, "type": "binary_expression", "text": "package->weight + (unsigned int) mothershipToClientDistance", "parent": 457, "children": [459, 461, 462], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 67}}, {"id": 459, "type": "field_expression", "text": "package->weight", "parent": 458, "children": [460], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 23}}, {"id": 460, "type": "field_identifier", "text": "weight", "parent": 459, "children": [], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 23}}, {"id": 461, "type": "+", "text": "+", "parent": 458, "children": [], "start_point": {"row": 72, "column": 24}, "end_point": {"row": 72, "column": 25}}, {"id": 462, "type": "cast_expression", "text": "(unsigned int) mothershipToClientDistance", "parent": 458, "children": [463, 467], "start_point": {"row": 72, "column": 26}, "end_point": {"row": 72, "column": 67}}, {"id": 463, "type": "type_descriptor", "text": "unsigned int", "parent": 462, "children": [464], "start_point": {"row": 72, "column": 27}, "end_point": {"row": 72, "column": 39}}, {"id": 464, "type": "sized_type_specifier", "text": "unsigned int", "parent": 463, "children": [465, 466], "start_point": {"row": 72, "column": 27}, "end_point": {"row": 72, "column": 39}}, {"id": 465, "type": "unsigned", "text": "unsigned", "parent": 464, "children": [], "start_point": {"row": 72, "column": 27}, "end_point": {"row": 72, "column": 35}}, {"id": 466, "type": "primitive_type", "text": "int", "parent": 464, "children": [], "start_point": {"row": 72, "column": 36}, "end_point": {"row": 72, "column": 39}}, {"id": 467, "type": "identifier", "text": "mothershipToClientDistance", "parent": 462, "children": [], "start_point": {"row": 72, "column": 41}, "end_point": {"row": 72, "column": 67}}, {"id": 468, "type": "function_definition", "text": "bool process_message(Drone* drone, DroneMessage* message) {\n\tDashboardMessage dashboardMessage;\n\tdashboardMessage.type = D_DRONE;\n\tdashboardMessage.number = drone->id;\n\n\tswitch(message->type) {\n\t\tcase MOTHERSHIP_END_OF_DELIVERY: {\n\t\t\tdashboardMessage.state = D_DRONE_FINISHED;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->state = S_DEAD;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\t\t\tLOG_INFO(\"[Drone %03d] poweroff\", drone->id);\n\t\t\treturn false;\n\t\t}\n\t\tcase MOTHERSHIP_GO_RECHARGE: {\n\t\t\tdashboardMessage.state = D_DRONE_CHARGING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tLOG_INFO(\"[Drone %03d] Recharging battery\", drone->id);\n\t\t\tsleep(drone->rechargingTime);\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->autonomy = drone->maxAutonomy;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tLOG_INFO(\"[Drone %03d] Battery charged\", drone->id);\n\n\t\t\tdashboardMessage.state = D_DRONE_WAITING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tMothershipMessage mothershipMessage;\n\t\t\tmothershipMessage.sender_id = drone->id;\n\t\t\tmothershipMessage.type = DRONE_DONE_CHARGING;\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tbreak;\n\t\t}\n\t\tcase MOTHERSHIP_GO_DELIVER_PACKAGE: {\n\t\t\tdashboardMessage.state = D_DRONE_FLYING_MTC;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tLOG_INFO(\"[Drone %03d] Package\", drone->id);\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tunsigned int consumption = computePowerConsumption(drone->package, 5);\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdrone_failure(drone);\n\n\t\t\tsleep(compute_sleep_time(drone));\n\t\t\tClientMessage clientMessage;\n\t\t\tclientMessage.type = DRONE_PUT_TARGET;\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tclient_sendMessage(drone->client, &clientMessage);\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\t\t\tsleep(1); // Wait the client before considering him as absent.\n\n\t\t\tMothershipMessage mothershipMessage;\n\t\t\tmothershipMessage.sender_id = drone->id;\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tpthread_mutex_lock(&(drone->client->targetMutex));\n\t\t\tif(drone->client->targetInstalled) {\n\t\t\t\tdashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n\t\t\t\tmothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n\t\t\t\tclientMessage.type = DRONE_DELIVERY_SUCCESS;\n\t\t\t\tdrone->deliverySuccess = true;\n\t\t\t} else {\n\t\t\t\tdashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n\t\t\t\tmothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n\t\t\t\tdrone->deliverySuccess = false;\n\t\t\t\tif(drone->package->numberOfTryRemaining > 1){\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FAILURE;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpthread_mutex_unlock(&(drone->client->targetMutex));\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tclient_sendMessage(drone->client, &clientMessage);\n\n\t\t\tdrone_failure(drone);\n\t\t\tsleep(compute_sleep_time(drone));\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->autonomy -= consumption;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdashboardMessage.state = D_DRONE_WAITING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tmothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\treturn true;\n}", "parent": null, "children": [469, 470], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 175, "column": 1}}, {"id": 469, "type": "primitive_type", "text": "bool", "parent": 468, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 4}}, {"id": 470, "type": "function_declarator", "text": "process_message(Drone* drone, DroneMessage* message)", "parent": 468, "children": [471, 472], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 57}}, {"id": 471, "type": "identifier", "text": "process_message", "parent": 470, "children": [], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 20}}, {"id": 472, "type": "parameter_list", "text": "(Drone* drone, DroneMessage* message)", "parent": 470, "children": [473, 478], "start_point": {"row": 75, "column": 20}, "end_point": {"row": 75, "column": 57}}, {"id": 473, "type": "parameter_declaration", "text": "Drone* drone", "parent": 472, "children": [474, 475], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 33}}, {"id": 474, "type": "type_identifier", "text": "Drone", "parent": 473, "children": [], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 26}}, {"id": 475, "type": "pointer_declarator", "text": "* drone", "parent": 473, "children": [476, 477], "start_point": {"row": 75, "column": 26}, "end_point": {"row": 75, "column": 33}}, {"id": 476, "type": "*", "text": "*", "parent": 475, "children": [], "start_point": {"row": 75, "column": 26}, "end_point": {"row": 75, "column": 27}}, {"id": 477, "type": "identifier", "text": "drone", "parent": 475, "children": [], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 33}}, {"id": 478, "type": "parameter_declaration", "text": "DroneMessage* message", "parent": 472, "children": [479, 480], "start_point": {"row": 75, "column": 35}, "end_point": {"row": 75, "column": 56}}, {"id": 479, "type": "type_identifier", "text": "DroneMessage", "parent": 478, "children": [], "start_point": {"row": 75, "column": 35}, "end_point": {"row": 75, "column": 47}}, {"id": 480, "type": "pointer_declarator", "text": "* message", "parent": 478, "children": [481, 482], "start_point": {"row": 75, "column": 47}, "end_point": {"row": 75, "column": 56}}, {"id": 481, "type": "*", "text": "*", "parent": 480, "children": [], "start_point": {"row": 75, "column": 47}, "end_point": {"row": 75, "column": 48}}, {"id": 482, "type": "identifier", "text": "message", "parent": 480, "children": [], "start_point": {"row": 75, "column": 49}, "end_point": {"row": 75, "column": 56}}, {"id": 483, "type": "declaration", "text": "DashboardMessage dashboardMessage;", "parent": 468, "children": [484, 485], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 35}}, {"id": 484, "type": "type_identifier", "text": "DashboardMessage", "parent": 483, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 17}}, {"id": 485, "type": "identifier", "text": "dashboardMessage", "parent": 483, "children": [], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 34}}, {"id": 486, "type": "assignment_expression", "text": "dashboardMessage.type = D_DRONE", "parent": 468, "children": [487, 490, 491], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 32}}, {"id": 487, "type": "field_expression", "text": "dashboardMessage.type", "parent": 486, "children": [488, 489], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 22}}, {"id": 488, "type": "identifier", "text": "dashboardMessage", "parent": 487, "children": [], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 17}}, {"id": 489, "type": "field_identifier", "text": "type", "parent": 487, "children": [], "start_point": {"row": 77, "column": 18}, "end_point": {"row": 77, "column": 22}}, {"id": 490, "type": "=", "text": "=", "parent": 486, "children": [], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 24}}, {"id": 491, "type": "identifier", "text": "D_DRONE", "parent": 486, "children": [], "start_point": {"row": 77, "column": 25}, "end_point": {"row": 77, "column": 32}}, {"id": 492, "type": "assignment_expression", "text": "dashboardMessage.number = drone->id", "parent": 468, "children": [493, 496, 497], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 36}}, {"id": 493, "type": "field_expression", "text": "dashboardMessage.number", "parent": 492, "children": [494, 495], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 24}}, {"id": 494, "type": "identifier", "text": "dashboardMessage", "parent": 493, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 17}}, {"id": 495, "type": "field_identifier", "text": "number", "parent": 493, "children": [], "start_point": {"row": 78, "column": 18}, "end_point": {"row": 78, "column": 24}}, {"id": 496, "type": "=", "text": "=", "parent": 492, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 26}}, {"id": 497, "type": "field_expression", "text": "drone->id", "parent": 492, "children": [498, 499], "start_point": {"row": 78, "column": 27}, "end_point": {"row": 78, "column": 36}}, {"id": 498, "type": "identifier", "text": "drone", "parent": 497, "children": [], "start_point": {"row": 78, "column": 27}, "end_point": {"row": 78, "column": 32}}, {"id": 499, "type": "field_identifier", "text": "id", "parent": 497, "children": [], "start_point": {"row": 78, "column": 34}, "end_point": {"row": 78, "column": 36}}, {"id": 500, "type": "switch_statement", "text": "switch(message->type) {\n\t\tcase MOTHERSHIP_END_OF_DELIVERY: {\n\t\t\tdashboardMessage.state = D_DRONE_FINISHED;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->state = S_DEAD;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\t\t\tLOG_INFO(\"[Drone %03d] poweroff\", drone->id);\n\t\t\treturn false;\n\t\t}\n\t\tcase MOTHERSHIP_GO_RECHARGE: {\n\t\t\tdashboardMessage.state = D_DRONE_CHARGING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tLOG_INFO(\"[Drone %03d] Recharging battery\", drone->id);\n\t\t\tsleep(drone->rechargingTime);\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->autonomy = drone->maxAutonomy;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tLOG_INFO(\"[Drone %03d] Battery charged\", drone->id);\n\n\t\t\tdashboardMessage.state = D_DRONE_WAITING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tMothershipMessage mothershipMessage;\n\t\t\tmothershipMessage.sender_id = drone->id;\n\t\t\tmothershipMessage.type = DRONE_DONE_CHARGING;\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tbreak;\n\t\t}\n\t\tcase MOTHERSHIP_GO_DELIVER_PACKAGE: {\n\t\t\tdashboardMessage.state = D_DRONE_FLYING_MTC;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tLOG_INFO(\"[Drone %03d] Package\", drone->id);\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tunsigned int consumption = computePowerConsumption(drone->package, 5);\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdrone_failure(drone);\n\n\t\t\tsleep(compute_sleep_time(drone));\n\t\t\tClientMessage clientMessage;\n\t\t\tclientMessage.type = DRONE_PUT_TARGET;\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tclient_sendMessage(drone->client, &clientMessage);\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\t\t\tsleep(1); // Wait the client before considering him as absent.\n\n\t\t\tMothershipMessage mothershipMessage;\n\t\t\tmothershipMessage.sender_id = drone->id;\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tpthread_mutex_lock(&(drone->client->targetMutex));\n\t\t\tif(drone->client->targetInstalled) {\n\t\t\t\tdashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n\t\t\t\tmothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n\t\t\t\tclientMessage.type = DRONE_DELIVERY_SUCCESS;\n\t\t\t\tdrone->deliverySuccess = true;\n\t\t\t} else {\n\t\t\t\tdashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n\t\t\t\tmothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n\t\t\t\tdrone->deliverySuccess = false;\n\t\t\t\tif(drone->package->numberOfTryRemaining > 1){\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FAILURE;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpthread_mutex_unlock(&(drone->client->targetMutex));\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tclient_sendMessage(drone->client, &clientMessage);\n\n\t\t\tdrone_failure(drone);\n\t\t\tsleep(compute_sleep_time(drone));\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->autonomy -= consumption;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdashboardMessage.state = D_DRONE_WAITING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tmothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\tbreak;\n\t}", "parent": 468, "children": [501, 502], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 173, "column": 2}}, {"id": 501, "type": "switch", "text": "switch", "parent": 500, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 7}}, {"id": 502, "type": "parenthesized_expression", "text": "(message->type)", "parent": 500, "children": [503], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 22}}, {"id": 503, "type": "field_expression", "text": "message->type", "parent": 502, "children": [504, 505], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 21}}, {"id": 504, "type": "identifier", "text": "message", "parent": 503, "children": [], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 15}}, {"id": 505, "type": "field_identifier", "text": "type", "parent": 503, "children": [], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 21}}, {"id": 506, "type": "case_statement", "text": "case MOTHERSHIP_END_OF_DELIVERY: {\n\t\t\tdashboardMessage.state = D_DRONE_FINISHED;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->state = S_DEAD;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\t\t\tLOG_INFO(\"[Drone %03d] poweroff\", drone->id);\n\t\t\treturn false;\n\t\t}", "parent": 500, "children": [507, 508], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 90, "column": 3}}, {"id": 507, "type": "case", "text": "case", "parent": 506, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 6}}, {"id": 508, "type": "identifier", "text": "MOTHERSHIP_END_OF_DELIVERY", "parent": 506, "children": [], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 33}}, {"id": 509, "type": "assignment_expression", "text": "dashboardMessage.state = D_DRONE_FINISHED", "parent": 506, "children": [510, 513, 514], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 44}}, {"id": 510, "type": "field_expression", "text": "dashboardMessage.state", "parent": 509, "children": [511, 512], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 25}}, {"id": 511, "type": "identifier", "text": "dashboardMessage", "parent": 510, "children": [], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 19}}, {"id": 512, "type": "field_identifier", "text": "state", "parent": 510, "children": [], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 25}}, {"id": 513, "type": "=", "text": "=", "parent": 509, "children": [], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 27}}, {"id": 514, "type": "identifier", "text": "D_DRONE_FINISHED", "parent": 509, "children": [], "start_point": {"row": 82, "column": 28}, "end_point": {"row": 82, "column": 44}}, {"id": 515, "type": "call_expression", "text": "dashboard_sendMessage(global_dashboard, &dashboardMessage)", "parent": 506, "children": [516, 517], "start_point": {"row": 83, "column": 3}, "end_point": {"row": 83, "column": 61}}, {"id": 516, "type": "identifier", "text": "dashboard_sendMessage", "parent": 515, "children": [], "start_point": {"row": 83, "column": 3}, "end_point": {"row": 83, "column": 24}}, {"id": 517, "type": "argument_list", "text": "(global_dashboard, &dashboardMessage)", "parent": 515, "children": [518, 519], "start_point": {"row": 83, "column": 24}, "end_point": {"row": 83, "column": 61}}, {"id": 518, "type": "identifier", "text": "global_dashboard", "parent": 517, "children": [], "start_point": {"row": 83, "column": 25}, "end_point": {"row": 83, "column": 41}}, {"id": 519, "type": "pointer_expression", "text": "&dashboardMessage", "parent": 517, "children": [520], "start_point": {"row": 83, "column": 43}, "end_point": {"row": 83, "column": 60}}, {"id": 520, "type": "identifier", "text": "dashboardMessage", "parent": 519, "children": [], "start_point": {"row": 83, "column": 44}, "end_point": {"row": 83, "column": 60}}, {"id": 521, "type": "call_expression", "text": "pthread_mutex_lock(&(drone->mutex))", "parent": 506, "children": [522, 523], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 38}}, {"id": 522, "type": "identifier", "text": "pthread_mutex_lock", "parent": 521, "children": [], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 21}}, {"id": 523, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 521, "children": [524], "start_point": {"row": 85, "column": 21}, "end_point": {"row": 85, "column": 38}}, {"id": 524, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 523, "children": [525], "start_point": {"row": 85, "column": 22}, "end_point": {"row": 85, "column": 37}}, {"id": 525, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 524, "children": [526], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 37}}, {"id": 526, "type": "field_expression", "text": "drone->mutex", "parent": 525, "children": [527, 528], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 36}}, {"id": 527, "type": "identifier", "text": "drone", "parent": 526, "children": [], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 29}}, {"id": 528, "type": "field_identifier", "text": "mutex", "parent": 526, "children": [], "start_point": {"row": 85, "column": 31}, "end_point": {"row": 85, "column": 36}}, {"id": 529, "type": "assignment_expression", "text": "drone->state = S_DEAD", "parent": 506, "children": [530, 533, 534], "start_point": {"row": 86, "column": 3}, "end_point": {"row": 86, "column": 24}}, {"id": 530, "type": "field_expression", "text": "drone->state", "parent": 529, "children": [531, 532], "start_point": {"row": 86, "column": 3}, "end_point": {"row": 86, "column": 15}}, {"id": 531, "type": "identifier", "text": "drone", "parent": 530, "children": [], "start_point": {"row": 86, "column": 3}, "end_point": {"row": 86, "column": 8}}, {"id": 532, "type": "field_identifier", "text": "state", "parent": 530, "children": [], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 15}}, {"id": 533, "type": "=", "text": "=", "parent": 529, "children": [], "start_point": {"row": 86, "column": 16}, "end_point": {"row": 86, "column": 17}}, {"id": 534, "type": "identifier", "text": "S_DEAD", "parent": 529, "children": [], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 24}}, {"id": 535, "type": "call_expression", "text": "pthread_mutex_unlock(&(drone->mutex))", "parent": 506, "children": [536, 537], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 40}}, {"id": 536, "type": "identifier", "text": "pthread_mutex_unlock", "parent": 535, "children": [], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 23}}, {"id": 537, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 535, "children": [538], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 40}}, {"id": 538, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 537, "children": [539], "start_point": {"row": 87, "column": 24}, "end_point": {"row": 87, "column": 39}}, {"id": 539, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 538, "children": [540], "start_point": {"row": 87, "column": 25}, "end_point": {"row": 87, "column": 39}}, {"id": 540, "type": "field_expression", "text": "drone->mutex", "parent": 539, "children": [541, 542], "start_point": {"row": 87, "column": 26}, "end_point": {"row": 87, "column": 38}}, {"id": 541, "type": "identifier", "text": "drone", "parent": 540, "children": [], "start_point": {"row": 87, "column": 26}, "end_point": {"row": 87, "column": 31}}, {"id": 542, "type": "field_identifier", "text": "mutex", "parent": 540, "children": [], "start_point": {"row": 87, "column": 33}, "end_point": {"row": 87, "column": 38}}, {"id": 543, "type": "call_expression", "text": "LOG_INFO(\"[Drone %03d] poweroff\", drone->id)", "parent": 506, "children": [544, 545], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 88, "column": 47}}, {"id": 544, "type": "identifier", "text": "LOG_INFO", "parent": 543, "children": [], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 88, "column": 11}}, {"id": 545, "type": "argument_list", "text": "(\"[Drone %03d] poweroff\", drone->id)", "parent": 543, "children": [546, 547], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 47}}, {"id": 546, "type": "string_literal", "text": "\"[Drone %03d] poweroff\"", "parent": 545, "children": [], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 35}}, {"id": 547, "type": "field_expression", "text": "drone->id", "parent": 545, "children": [548, 549], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 46}}, {"id": 548, "type": "identifier", "text": "drone", "parent": 547, "children": [], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 42}}, {"id": 549, "type": "field_identifier", "text": "id", "parent": 547, "children": [], "start_point": {"row": 88, "column": 44}, "end_point": {"row": 88, "column": 46}}, {"id": 550, "type": "return_statement", "text": "return false;", "parent": 506, "children": [551], "start_point": {"row": 89, "column": 3}, "end_point": {"row": 89, "column": 16}}, {"id": 551, "type": "false", "text": "false", "parent": 550, "children": [], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 15}}, {"id": 552, "type": "case_statement", "text": "case MOTHERSHIP_GO_RECHARGE: {\n\t\t\tdashboardMessage.state = D_DRONE_CHARGING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tLOG_INFO(\"[Drone %03d] Recharging battery\", drone->id);\n\t\t\tsleep(drone->rechargingTime);\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->autonomy = drone->maxAutonomy;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tLOG_INFO(\"[Drone %03d] Battery charged\", drone->id);\n\n\t\t\tdashboardMessage.state = D_DRONE_WAITING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tMothershipMessage mothershipMessage;\n\t\t\tmothershipMessage.sender_id = drone->id;\n\t\t\tmothershipMessage.type = DRONE_DONE_CHARGING;\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tbreak;\n\t\t}", "parent": 500, "children": [553, 554], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 111, "column": 3}}, {"id": 553, "type": "case", "text": "case", "parent": 552, "children": [], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 6}}, {"id": 554, "type": "identifier", "text": "MOTHERSHIP_GO_RECHARGE", "parent": 552, "children": [], "start_point": {"row": 91, "column": 7}, "end_point": {"row": 91, "column": 29}}, {"id": 555, "type": "assignment_expression", "text": "dashboardMessage.state = D_DRONE_CHARGING", "parent": 552, "children": [556, 559, 560], "start_point": {"row": 92, "column": 3}, "end_point": {"row": 92, "column": 44}}, {"id": 556, "type": "field_expression", "text": "dashboardMessage.state", "parent": 555, "children": [557, 558], "start_point": {"row": 92, "column": 3}, "end_point": {"row": 92, "column": 25}}, {"id": 557, "type": "identifier", "text": "dashboardMessage", "parent": 556, "children": [], "start_point": {"row": 92, "column": 3}, "end_point": {"row": 92, "column": 19}}, {"id": 558, "type": "field_identifier", "text": "state", "parent": 556, "children": [], "start_point": {"row": 92, "column": 20}, "end_point": {"row": 92, "column": 25}}, {"id": 559, "type": "=", "text": "=", "parent": 555, "children": [], "start_point": {"row": 92, "column": 26}, "end_point": {"row": 92, "column": 27}}, {"id": 560, "type": "identifier", "text": "D_DRONE_CHARGING", "parent": 555, "children": [], "start_point": {"row": 92, "column": 28}, "end_point": {"row": 92, "column": 44}}, {"id": 561, "type": "call_expression", "text": "dashboard_sendMessage(global_dashboard, &dashboardMessage)", "parent": 552, "children": [562, 563], "start_point": {"row": 93, "column": 3}, "end_point": {"row": 93, "column": 61}}, {"id": 562, "type": "identifier", "text": "dashboard_sendMessage", "parent": 561, "children": [], "start_point": {"row": 93, "column": 3}, "end_point": {"row": 93, "column": 24}}, {"id": 563, "type": "argument_list", "text": "(global_dashboard, &dashboardMessage)", "parent": 561, "children": [564, 565], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 61}}, {"id": 564, "type": "identifier", "text": "global_dashboard", "parent": 563, "children": [], "start_point": {"row": 93, "column": 25}, "end_point": {"row": 93, "column": 41}}, {"id": 565, "type": "pointer_expression", "text": "&dashboardMessage", "parent": 563, "children": [566], "start_point": {"row": 93, "column": 43}, "end_point": {"row": 93, "column": 60}}, {"id": 566, "type": "identifier", "text": "dashboardMessage", "parent": 565, "children": [], "start_point": {"row": 93, "column": 44}, "end_point": {"row": 93, "column": 60}}, {"id": 567, "type": "call_expression", "text": "LOG_INFO(\"[Drone %03d] Recharging battery\", drone->id)", "parent": 552, "children": [568, 569], "start_point": {"row": 95, "column": 3}, "end_point": {"row": 95, "column": 57}}, {"id": 568, "type": "identifier", "text": "LOG_INFO", "parent": 567, "children": [], "start_point": {"row": 95, "column": 3}, "end_point": {"row": 95, "column": 11}}, {"id": 569, "type": "argument_list", "text": "(\"[Drone %03d] Recharging battery\", drone->id)", "parent": 567, "children": [570, 571], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 57}}, {"id": 570, "type": "string_literal", "text": "\"[Drone %03d] Recharging battery\"", "parent": 569, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 45}}, {"id": 571, "type": "field_expression", "text": "drone->id", "parent": 569, "children": [572, 573], "start_point": {"row": 95, "column": 47}, "end_point": {"row": 95, "column": 56}}, {"id": 572, "type": "identifier", "text": "drone", "parent": 571, "children": [], "start_point": {"row": 95, "column": 47}, "end_point": {"row": 95, "column": 52}}, {"id": 573, "type": "field_identifier", "text": "id", "parent": 571, "children": [], "start_point": {"row": 95, "column": 54}, "end_point": {"row": 95, "column": 56}}, {"id": 574, "type": "call_expression", "text": "sleep(drone->rechargingTime)", "parent": 552, "children": [575, 576], "start_point": {"row": 96, "column": 3}, "end_point": {"row": 96, "column": 31}}, {"id": 575, "type": "identifier", "text": "sleep", "parent": 574, "children": [], "start_point": {"row": 96, "column": 3}, "end_point": {"row": 96, "column": 8}}, {"id": 576, "type": "argument_list", "text": "(drone->rechargingTime)", "parent": 574, "children": [577], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 31}}, {"id": 577, "type": "field_expression", "text": "drone->rechargingTime", "parent": 576, "children": [578, 579], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 30}}, {"id": 578, "type": "identifier", "text": "drone", "parent": 577, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 14}}, {"id": 579, "type": "field_identifier", "text": "rechargingTime", "parent": 577, "children": [], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 30}}, {"id": 580, "type": "call_expression", "text": "pthread_mutex_lock(&(drone->mutex))", "parent": 552, "children": [581, 582], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 38}}, {"id": 581, "type": "identifier", "text": "pthread_mutex_lock", "parent": 580, "children": [], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 21}}, {"id": 582, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 580, "children": [583], "start_point": {"row": 97, "column": 21}, "end_point": {"row": 97, "column": 38}}, {"id": 583, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 582, "children": [584], "start_point": {"row": 97, "column": 22}, "end_point": {"row": 97, "column": 37}}, {"id": 584, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 583, "children": [585], "start_point": {"row": 97, "column": 23}, "end_point": {"row": 97, "column": 37}}, {"id": 585, "type": "field_expression", "text": "drone->mutex", "parent": 584, "children": [586, 587], "start_point": {"row": 97, "column": 24}, "end_point": {"row": 97, "column": 36}}, {"id": 586, "type": "identifier", "text": "drone", "parent": 585, "children": [], "start_point": {"row": 97, "column": 24}, "end_point": {"row": 97, "column": 29}}, {"id": 587, "type": "field_identifier", "text": "mutex", "parent": 585, "children": [], "start_point": {"row": 97, "column": 31}, "end_point": {"row": 97, "column": 36}}, {"id": 588, "type": "assignment_expression", "text": "drone->autonomy = drone->maxAutonomy", "parent": 552, "children": [589, 592, 593], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 39}}, {"id": 589, "type": "field_expression", "text": "drone->autonomy", "parent": 588, "children": [590, 591], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 18}}, {"id": 590, "type": "identifier", "text": "drone", "parent": 589, "children": [], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 8}}, {"id": 591, "type": "field_identifier", "text": "autonomy", "parent": 589, "children": [], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 18}}, {"id": 592, "type": "=", "text": "=", "parent": 588, "children": [], "start_point": {"row": 98, "column": 19}, "end_point": {"row": 98, "column": 20}}, {"id": 593, "type": "field_expression", "text": "drone->maxAutonomy", "parent": 588, "children": [594, 595], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 39}}, {"id": 594, "type": "identifier", "text": "drone", "parent": 593, "children": [], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 26}}, {"id": 595, "type": "field_identifier", "text": "maxAutonomy", "parent": 593, "children": [], "start_point": {"row": 98, "column": 28}, "end_point": {"row": 98, "column": 39}}, {"id": 596, "type": "call_expression", "text": "pthread_mutex_unlock(&(drone->mutex))", "parent": 552, "children": [597, 598], "start_point": {"row": 99, "column": 3}, "end_point": {"row": 99, "column": 40}}, {"id": 597, "type": "identifier", "text": "pthread_mutex_unlock", "parent": 596, "children": [], "start_point": {"row": 99, "column": 3}, "end_point": {"row": 99, "column": 23}}, {"id": 598, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 596, "children": [599], "start_point": {"row": 99, "column": 23}, "end_point": {"row": 99, "column": 40}}, {"id": 599, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 598, "children": [600], "start_point": {"row": 99, "column": 24}, "end_point": {"row": 99, "column": 39}}, {"id": 600, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 599, "children": [601], "start_point": {"row": 99, "column": 25}, "end_point": {"row": 99, "column": 39}}, {"id": 601, "type": "field_expression", "text": "drone->mutex", "parent": 600, "children": [602, 603], "start_point": {"row": 99, "column": 26}, "end_point": {"row": 99, "column": 38}}, {"id": 602, "type": "identifier", "text": "drone", "parent": 601, "children": [], "start_point": {"row": 99, "column": 26}, "end_point": {"row": 99, "column": 31}}, {"id": 603, "type": "field_identifier", "text": "mutex", "parent": 601, "children": [], "start_point": {"row": 99, "column": 33}, "end_point": {"row": 99, "column": 38}}, {"id": 604, "type": "call_expression", "text": "LOG_INFO(\"[Drone %03d] Battery charged\", drone->id)", "parent": 552, "children": [605, 606], "start_point": {"row": 101, "column": 3}, "end_point": {"row": 101, "column": 54}}, {"id": 605, "type": "identifier", "text": "LOG_INFO", "parent": 604, "children": [], "start_point": {"row": 101, "column": 3}, "end_point": {"row": 101, "column": 11}}, {"id": 606, "type": "argument_list", "text": "(\"[Drone %03d] Battery charged\", drone->id)", "parent": 604, "children": [607, 608], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 54}}, {"id": 607, "type": "string_literal", "text": "\"[Drone %03d] Battery charged\"", "parent": 606, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 42}}, {"id": 608, "type": "field_expression", "text": "drone->id", "parent": 606, "children": [609, 610], "start_point": {"row": 101, "column": 44}, "end_point": {"row": 101, "column": 53}}, {"id": 609, "type": "identifier", "text": "drone", "parent": 608, "children": [], "start_point": {"row": 101, "column": 44}, "end_point": {"row": 101, "column": 49}}, {"id": 610, "type": "field_identifier", "text": "id", "parent": 608, "children": [], "start_point": {"row": 101, "column": 51}, "end_point": {"row": 101, "column": 53}}, {"id": 611, "type": "assignment_expression", "text": "dashboardMessage.state = D_DRONE_WAITING", "parent": 552, "children": [612, 615, 616], "start_point": {"row": 103, "column": 3}, "end_point": {"row": 103, "column": 43}}, {"id": 612, "type": "field_expression", "text": "dashboardMessage.state", "parent": 611, "children": [613, 614], "start_point": {"row": 103, "column": 3}, "end_point": {"row": 103, "column": 25}}, {"id": 613, "type": "identifier", "text": "dashboardMessage", "parent": 612, "children": [], "start_point": {"row": 103, "column": 3}, "end_point": {"row": 103, "column": 19}}, {"id": 614, "type": "field_identifier", "text": "state", "parent": 612, "children": [], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 25}}, {"id": 615, "type": "=", "text": "=", "parent": 611, "children": [], "start_point": {"row": 103, "column": 26}, "end_point": {"row": 103, "column": 27}}, {"id": 616, "type": "identifier", "text": "D_DRONE_WAITING", "parent": 611, "children": [], "start_point": {"row": 103, "column": 28}, "end_point": {"row": 103, "column": 43}}, {"id": 617, "type": "call_expression", "text": "dashboard_sendMessage(global_dashboard, &dashboardMessage)", "parent": 552, "children": [618, 619], "start_point": {"row": 104, "column": 3}, "end_point": {"row": 104, "column": 61}}, {"id": 618, "type": "identifier", "text": "dashboard_sendMessage", "parent": 617, "children": [], "start_point": {"row": 104, "column": 3}, "end_point": {"row": 104, "column": 24}}, {"id": 619, "type": "argument_list", "text": "(global_dashboard, &dashboardMessage)", "parent": 617, "children": [620, 621], "start_point": {"row": 104, "column": 24}, "end_point": {"row": 104, "column": 61}}, {"id": 620, "type": "identifier", "text": "global_dashboard", "parent": 619, "children": [], "start_point": {"row": 104, "column": 25}, "end_point": {"row": 104, "column": 41}}, {"id": 621, "type": "pointer_expression", "text": "&dashboardMessage", "parent": 619, "children": [622], "start_point": {"row": 104, "column": 43}, "end_point": {"row": 104, "column": 60}}, {"id": 622, "type": "identifier", "text": "dashboardMessage", "parent": 621, "children": [], "start_point": {"row": 104, "column": 44}, "end_point": {"row": 104, "column": 60}}, {"id": 623, "type": "declaration", "text": "MothershipMessage mothershipMessage;", "parent": 552, "children": [624, 625], "start_point": {"row": 106, "column": 3}, "end_point": {"row": 106, "column": 39}}, {"id": 624, "type": "type_identifier", "text": "MothershipMessage", "parent": 623, "children": [], "start_point": {"row": 106, "column": 3}, "end_point": {"row": 106, "column": 20}}, {"id": 625, "type": "identifier", "text": "mothershipMessage", "parent": 623, "children": [], "start_point": {"row": 106, "column": 21}, "end_point": {"row": 106, "column": 38}}, {"id": 626, "type": "assignment_expression", "text": "mothershipMessage.sender_id = drone->id", "parent": 552, "children": [627, 630, 631], "start_point": {"row": 107, "column": 3}, "end_point": {"row": 107, "column": 42}}, {"id": 627, "type": "field_expression", "text": "mothershipMessage.sender_id", "parent": 626, "children": [628, 629], "start_point": {"row": 107, "column": 3}, "end_point": {"row": 107, "column": 30}}, {"id": 628, "type": "identifier", "text": "mothershipMessage", "parent": 627, "children": [], "start_point": {"row": 107, "column": 3}, "end_point": {"row": 107, "column": 20}}, {"id": 629, "type": "field_identifier", "text": "sender_id", "parent": 627, "children": [], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 30}}, {"id": 630, "type": "=", "text": "=", "parent": 626, "children": [], "start_point": {"row": 107, "column": 31}, "end_point": {"row": 107, "column": 32}}, {"id": 631, "type": "field_expression", "text": "drone->id", "parent": 626, "children": [632, 633], "start_point": {"row": 107, "column": 33}, "end_point": {"row": 107, "column": 42}}, {"id": 632, "type": "identifier", "text": "drone", "parent": 631, "children": [], "start_point": {"row": 107, "column": 33}, "end_point": {"row": 107, "column": 38}}, {"id": 633, "type": "field_identifier", "text": "id", "parent": 631, "children": [], "start_point": {"row": 107, "column": 40}, "end_point": {"row": 107, "column": 42}}, {"id": 634, "type": "assignment_expression", "text": "mothershipMessage.type = DRONE_DONE_CHARGING", "parent": 552, "children": [635, 638, 639], "start_point": {"row": 108, "column": 3}, "end_point": {"row": 108, "column": 47}}, {"id": 635, "type": "field_expression", "text": "mothershipMessage.type", "parent": 634, "children": [636, 637], "start_point": {"row": 108, "column": 3}, "end_point": {"row": 108, "column": 25}}, {"id": 636, "type": "identifier", "text": "mothershipMessage", "parent": 635, "children": [], "start_point": {"row": 108, "column": 3}, "end_point": {"row": 108, "column": 20}}, {"id": 637, "type": "field_identifier", "text": "type", "parent": 635, "children": [], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 25}}, {"id": 638, "type": "=", "text": "=", "parent": 634, "children": [], "start_point": {"row": 108, "column": 26}, "end_point": {"row": 108, "column": 27}}, {"id": 639, "type": "identifier", "text": "DRONE_DONE_CHARGING", "parent": 634, "children": [], "start_point": {"row": 108, "column": 28}, "end_point": {"row": 108, "column": 47}}, {"id": 640, "type": "call_expression", "text": "mothership_sendMessage(drone->motherShip, &mothershipMessage)", "parent": 552, "children": [641, 642], "start_point": {"row": 109, "column": 3}, "end_point": {"row": 109, "column": 64}}, {"id": 641, "type": "identifier", "text": "mothership_sendMessage", "parent": 640, "children": [], "start_point": {"row": 109, "column": 3}, "end_point": {"row": 109, "column": 25}}, {"id": 642, "type": "argument_list", "text": "(drone->motherShip, &mothershipMessage)", "parent": 640, "children": [643, 646], "start_point": {"row": 109, "column": 25}, "end_point": {"row": 109, "column": 64}}, {"id": 643, "type": "field_expression", "text": "drone->motherShip", "parent": 642, "children": [644, 645], "start_point": {"row": 109, "column": 26}, "end_point": {"row": 109, "column": 43}}, {"id": 644, "type": "identifier", "text": "drone", "parent": 643, "children": [], "start_point": {"row": 109, "column": 26}, "end_point": {"row": 109, "column": 31}}, {"id": 645, "type": "field_identifier", "text": "motherShip", "parent": 643, "children": [], "start_point": {"row": 109, "column": 33}, "end_point": {"row": 109, "column": 43}}, {"id": 646, "type": "pointer_expression", "text": "&mothershipMessage", "parent": 642, "children": [647], "start_point": {"row": 109, "column": 45}, "end_point": {"row": 109, "column": 63}}, {"id": 647, "type": "identifier", "text": "mothershipMessage", "parent": 646, "children": [], "start_point": {"row": 109, "column": 46}, "end_point": {"row": 109, "column": 63}}, {"id": 648, "type": "break_statement", "text": "break;", "parent": 552, "children": [649], "start_point": {"row": 110, "column": 3}, "end_point": {"row": 110, "column": 9}}, {"id": 649, "type": "break", "text": "break", "parent": 648, "children": [], "start_point": {"row": 110, "column": 3}, "end_point": {"row": 110, "column": 8}}, {"id": 650, "type": "case_statement", "text": "case MOTHERSHIP_GO_DELIVER_PACKAGE: {\n\t\t\tdashboardMessage.state = D_DRONE_FLYING_MTC;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tLOG_INFO(\"[Drone %03d] Package\", drone->id);\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tunsigned int consumption = computePowerConsumption(drone->package, 5);\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdrone_failure(drone);\n\n\t\t\tsleep(compute_sleep_time(drone));\n\t\t\tClientMessage clientMessage;\n\t\t\tclientMessage.type = DRONE_PUT_TARGET;\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tclient_sendMessage(drone->client, &clientMessage);\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\t\t\tsleep(1); // Wait the client before considering him as absent.\n\n\t\t\tMothershipMessage mothershipMessage;\n\t\t\tmothershipMessage.sender_id = drone->id;\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tpthread_mutex_lock(&(drone->client->targetMutex));\n\t\t\tif(drone->client->targetInstalled) {\n\t\t\t\tdashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n\t\t\t\tmothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n\t\t\t\tclientMessage.type = DRONE_DELIVERY_SUCCESS;\n\t\t\t\tdrone->deliverySuccess = true;\n\t\t\t} else {\n\t\t\t\tdashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n\t\t\t\tmothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n\t\t\t\tdrone->deliverySuccess = false;\n\t\t\t\tif(drone->package->numberOfTryRemaining > 1){\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FAILURE;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpthread_mutex_unlock(&(drone->client->targetMutex));\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tclient_sendMessage(drone->client, &clientMessage);\n\n\t\t\tdrone_failure(drone);\n\t\t\tsleep(compute_sleep_time(drone));\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->autonomy -= consumption;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdashboardMessage.state = D_DRONE_WAITING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tmothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tbreak;\n\t\t}", "parent": 500, "children": [651, 652], "start_point": {"row": 112, "column": 2}, "end_point": {"row": 170, "column": 3}}, {"id": 651, "type": "case", "text": "case", "parent": 650, "children": [], "start_point": {"row": 112, "column": 2}, "end_point": {"row": 112, "column": 6}}, {"id": 652, "type": "identifier", "text": "MOTHERSHIP_GO_DELIVER_PACKAGE", "parent": 650, "children": [], "start_point": {"row": 112, "column": 7}, "end_point": {"row": 112, "column": 36}}, {"id": 653, "type": "assignment_expression", "text": "dashboardMessage.state = D_DRONE_FLYING_MTC", "parent": 650, "children": [654, 657, 658], "start_point": {"row": 113, "column": 3}, "end_point": {"row": 113, "column": 46}}, {"id": 654, "type": "field_expression", "text": "dashboardMessage.state", "parent": 653, "children": [655, 656], "start_point": {"row": 113, "column": 3}, "end_point": {"row": 113, "column": 25}}, {"id": 655, "type": "identifier", "text": "dashboardMessage", "parent": 654, "children": [], "start_point": {"row": 113, "column": 3}, "end_point": {"row": 113, "column": 19}}, {"id": 656, "type": "field_identifier", "text": "state", "parent": 654, "children": [], "start_point": {"row": 113, "column": 20}, "end_point": {"row": 113, "column": 25}}, {"id": 657, "type": "=", "text": "=", "parent": 653, "children": [], "start_point": {"row": 113, "column": 26}, "end_point": {"row": 113, "column": 27}}, {"id": 658, "type": "identifier", "text": "D_DRONE_FLYING_MTC", "parent": 653, "children": [], "start_point": {"row": 113, "column": 28}, "end_point": {"row": 113, "column": 46}}, {"id": 659, "type": "call_expression", "text": "dashboard_sendMessage(global_dashboard, &dashboardMessage)", "parent": 650, "children": [660, 661], "start_point": {"row": 114, "column": 3}, "end_point": {"row": 114, "column": 61}}, {"id": 660, "type": "identifier", "text": "dashboard_sendMessage", "parent": 659, "children": [], "start_point": {"row": 114, "column": 3}, "end_point": {"row": 114, "column": 24}}, {"id": 661, "type": "argument_list", "text": "(global_dashboard, &dashboardMessage)", "parent": 659, "children": [662, 663], "start_point": {"row": 114, "column": 24}, "end_point": {"row": 114, "column": 61}}, {"id": 662, "type": "identifier", "text": "global_dashboard", "parent": 661, "children": [], "start_point": {"row": 114, "column": 25}, "end_point": {"row": 114, "column": 41}}, {"id": 663, "type": "pointer_expression", "text": "&dashboardMessage", "parent": 661, "children": [664], "start_point": {"row": 114, "column": 43}, "end_point": {"row": 114, "column": 60}}, {"id": 664, "type": "identifier", "text": "dashboardMessage", "parent": 663, "children": [], "start_point": {"row": 114, "column": 44}, "end_point": {"row": 114, "column": 60}}, {"id": 665, "type": "call_expression", "text": "LOG_INFO(\"[Drone %03d] Package\", drone->id)", "parent": 650, "children": [666, 667], "start_point": {"row": 116, "column": 3}, "end_point": {"row": 116, "column": 46}}, {"id": 666, "type": "identifier", "text": "LOG_INFO", "parent": 665, "children": [], "start_point": {"row": 116, "column": 3}, "end_point": {"row": 116, "column": 11}}, {"id": 667, "type": "argument_list", "text": "(\"[Drone %03d] Package\", drone->id)", "parent": 665, "children": [668, 669], "start_point": {"row": 116, "column": 11}, "end_point": {"row": 116, "column": 46}}, {"id": 668, "type": "string_literal", "text": "\"[Drone %03d] Package\"", "parent": 667, "children": [], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 34}}, {"id": 669, "type": "field_expression", "text": "drone->id", "parent": 667, "children": [670, 671], "start_point": {"row": 116, "column": 36}, "end_point": {"row": 116, "column": 45}}, {"id": 670, "type": "identifier", "text": "drone", "parent": 669, "children": [], "start_point": {"row": 116, "column": 36}, "end_point": {"row": 116, "column": 41}}, {"id": 671, "type": "field_identifier", "text": "id", "parent": 669, "children": [], "start_point": {"row": 116, "column": 43}, "end_point": {"row": 116, "column": 45}}, {"id": 672, "type": "call_expression", "text": "pthread_mutex_lock(&(drone->mutex))", "parent": 650, "children": [673, 674], "start_point": {"row": 117, "column": 3}, "end_point": {"row": 117, "column": 38}}, {"id": 673, "type": "identifier", "text": "pthread_mutex_lock", "parent": 672, "children": [], "start_point": {"row": 117, "column": 3}, "end_point": {"row": 117, "column": 21}}, {"id": 674, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 672, "children": [675], "start_point": {"row": 117, "column": 21}, "end_point": {"row": 117, "column": 38}}, {"id": 675, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 674, "children": [676], "start_point": {"row": 117, "column": 22}, "end_point": {"row": 117, "column": 37}}, {"id": 676, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 675, "children": [677], "start_point": {"row": 117, "column": 23}, "end_point": {"row": 117, "column": 37}}, {"id": 677, "type": "field_expression", "text": "drone->mutex", "parent": 676, "children": [678, 679], "start_point": {"row": 117, "column": 24}, "end_point": {"row": 117, "column": 36}}, {"id": 678, "type": "identifier", "text": "drone", "parent": 677, "children": [], "start_point": {"row": 117, "column": 24}, "end_point": {"row": 117, "column": 29}}, {"id": 679, "type": "field_identifier", "text": "mutex", "parent": 677, "children": [], "start_point": {"row": 117, "column": 31}, "end_point": {"row": 117, "column": 36}}, {"id": 680, "type": "declaration", "text": "unsigned int consumption = computePowerConsumption(drone->package, 5);", "parent": 650, "children": [681, 684], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 73}}, {"id": 681, "type": "sized_type_specifier", "text": "unsigned int", "parent": 680, "children": [682, 683], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 15}}, {"id": 682, "type": "unsigned", "text": "unsigned", "parent": 681, "children": [], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 11}}, {"id": 683, "type": "primitive_type", "text": "int", "parent": 681, "children": [], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 15}}, {"id": 684, "type": "init_declarator", "text": "consumption = computePowerConsumption(drone->package, 5)", "parent": 680, "children": [685, 686, 687], "start_point": {"row": 118, "column": 16}, "end_point": {"row": 118, "column": 72}}, {"id": 685, "type": "identifier", "text": "consumption", "parent": 684, "children": [], "start_point": {"row": 118, "column": 16}, "end_point": {"row": 118, "column": 27}}, {"id": 686, "type": "=", "text": "=", "parent": 684, "children": [], "start_point": {"row": 118, "column": 28}, "end_point": {"row": 118, "column": 29}}, {"id": 687, "type": "call_expression", "text": "computePowerConsumption(drone->package, 5)", "parent": 684, "children": [688, 689], "start_point": {"row": 118, "column": 30}, "end_point": {"row": 118, "column": 72}}, {"id": 688, "type": "identifier", "text": "computePowerConsumption", "parent": 687, "children": [], "start_point": {"row": 118, "column": 30}, "end_point": {"row": 118, "column": 53}}, {"id": 689, "type": "argument_list", "text": "(drone->package, 5)", "parent": 687, "children": [690, 692], "start_point": {"row": 118, "column": 53}, "end_point": {"row": 118, "column": 72}}, {"id": 690, "type": "field_expression", "text": "drone->package", "parent": 689, "children": [691], "start_point": {"row": 118, "column": 54}, "end_point": {"row": 118, "column": 68}}, {"id": 691, "type": "identifier", "text": "drone", "parent": 690, "children": [], "start_point": {"row": 118, "column": 54}, "end_point": {"row": 118, "column": 59}}, {"id": 692, "type": "number_literal", "text": "5", "parent": 689, "children": [], "start_point": {"row": 118, "column": 70}, "end_point": {"row": 118, "column": 71}}, {"id": 693, "type": "call_expression", "text": "pthread_mutex_unlock(&(drone->mutex))", "parent": 650, "children": [694, 695], "start_point": {"row": 119, "column": 3}, "end_point": {"row": 119, "column": 40}}, {"id": 694, "type": "identifier", "text": "pthread_mutex_unlock", "parent": 693, "children": [], "start_point": {"row": 119, "column": 3}, "end_point": {"row": 119, "column": 23}}, {"id": 695, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 693, "children": [696], "start_point": {"row": 119, "column": 23}, "end_point": {"row": 119, "column": 40}}, {"id": 696, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 695, "children": [697], "start_point": {"row": 119, "column": 24}, "end_point": {"row": 119, "column": 39}}, {"id": 697, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 696, "children": [698], "start_point": {"row": 119, "column": 25}, "end_point": {"row": 119, "column": 39}}, {"id": 698, "type": "field_expression", "text": "drone->mutex", "parent": 697, "children": [699, 700], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 38}}, {"id": 699, "type": "identifier", "text": "drone", "parent": 698, "children": [], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 31}}, {"id": 700, "type": "field_identifier", "text": "mutex", "parent": 698, "children": [], "start_point": {"row": 119, "column": 33}, "end_point": {"row": 119, "column": 38}}, {"id": 701, "type": "call_expression", "text": "drone_failure(drone)", "parent": 650, "children": [702, 703], "start_point": {"row": 121, "column": 3}, "end_point": {"row": 121, "column": 23}}, {"id": 702, "type": "identifier", "text": "drone_failure", "parent": 701, "children": [], "start_point": {"row": 121, "column": 3}, "end_point": {"row": 121, "column": 16}}, {"id": 703, "type": "argument_list", "text": "(drone)", "parent": 701, "children": [704], "start_point": {"row": 121, "column": 16}, "end_point": {"row": 121, "column": 23}}, {"id": 704, "type": "identifier", "text": "drone", "parent": 703, "children": [], "start_point": {"row": 121, "column": 17}, "end_point": {"row": 121, "column": 22}}, {"id": 705, "type": "call_expression", "text": "sleep(compute_sleep_time(drone))", "parent": 650, "children": [706, 707], "start_point": {"row": 123, "column": 3}, "end_point": {"row": 123, "column": 35}}, {"id": 706, "type": "identifier", "text": "sleep", "parent": 705, "children": [], "start_point": {"row": 123, "column": 3}, "end_point": {"row": 123, "column": 8}}, {"id": 707, "type": "argument_list", "text": "(compute_sleep_time(drone))", "parent": 705, "children": [708], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 35}}, {"id": 708, "type": "call_expression", "text": "compute_sleep_time(drone)", "parent": 707, "children": [709, 710], "start_point": {"row": 123, "column": 9}, "end_point": {"row": 123, "column": 34}}, {"id": 709, "type": "identifier", "text": "compute_sleep_time", "parent": 708, "children": [], "start_point": {"row": 123, "column": 9}, "end_point": {"row": 123, "column": 27}}, {"id": 710, "type": "argument_list", "text": "(drone)", "parent": 708, "children": [711], "start_point": {"row": 123, "column": 27}, "end_point": {"row": 123, "column": 34}}, {"id": 711, "type": "identifier", "text": "drone", "parent": 710, "children": [], "start_point": {"row": 123, "column": 28}, "end_point": {"row": 123, "column": 33}}, {"id": 712, "type": "declaration", "text": "ClientMessage clientMessage;", "parent": 650, "children": [713, 714], "start_point": {"row": 124, "column": 3}, "end_point": {"row": 124, "column": 31}}, {"id": 713, "type": "type_identifier", "text": "ClientMessage", "parent": 712, "children": [], "start_point": {"row": 124, "column": 3}, "end_point": {"row": 124, "column": 16}}, {"id": 714, "type": "identifier", "text": "clientMessage", "parent": 712, "children": [], "start_point": {"row": 124, "column": 17}, "end_point": {"row": 124, "column": 30}}, {"id": 715, "type": "assignment_expression", "text": "clientMessage.type = DRONE_PUT_TARGET", "parent": 650, "children": [716, 719, 720], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 40}}, {"id": 716, "type": "field_expression", "text": "clientMessage.type", "parent": 715, "children": [717, 718], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 21}}, {"id": 717, "type": "identifier", "text": "clientMessage", "parent": 716, "children": [], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 16}}, {"id": 718, "type": "field_identifier", "text": "type", "parent": 716, "children": [], "start_point": {"row": 125, "column": 17}, "end_point": {"row": 125, "column": 21}}, {"id": 719, "type": "=", "text": "=", "parent": 715, "children": [], "start_point": {"row": 125, "column": 22}, "end_point": {"row": 125, "column": 23}}, {"id": 720, "type": "identifier", "text": "DRONE_PUT_TARGET", "parent": 715, "children": [], "start_point": {"row": 125, "column": 24}, "end_point": {"row": 125, "column": 40}}, {"id": 721, "type": "call_expression", "text": "pthread_mutex_lock(&(drone->mutex))", "parent": 650, "children": [722, 723], "start_point": {"row": 126, "column": 3}, "end_point": {"row": 126, "column": 38}}, {"id": 722, "type": "identifier", "text": "pthread_mutex_lock", "parent": 721, "children": [], "start_point": {"row": 126, "column": 3}, "end_point": {"row": 126, "column": 21}}, {"id": 723, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 721, "children": [724], "start_point": {"row": 126, "column": 21}, "end_point": {"row": 126, "column": 38}}, {"id": 724, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 723, "children": [725], "start_point": {"row": 126, "column": 22}, "end_point": {"row": 126, "column": 37}}, {"id": 725, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 724, "children": [726], "start_point": {"row": 126, "column": 23}, "end_point": {"row": 126, "column": 37}}, {"id": 726, "type": "field_expression", "text": "drone->mutex", "parent": 725, "children": [727, 728], "start_point": {"row": 126, "column": 24}, "end_point": {"row": 126, "column": 36}}, {"id": 727, "type": "identifier", "text": "drone", "parent": 726, "children": [], "start_point": {"row": 126, "column": 24}, "end_point": {"row": 126, "column": 29}}, {"id": 728, "type": "field_identifier", "text": "mutex", "parent": 726, "children": [], "start_point": {"row": 126, "column": 31}, "end_point": {"row": 126, "column": 36}}, {"id": 729, "type": "call_expression", "text": "client_sendMessage(drone->client, &clientMessage)", "parent": 650, "children": [730, 731], "start_point": {"row": 127, "column": 3}, "end_point": {"row": 127, "column": 52}}, {"id": 730, "type": "identifier", "text": "client_sendMessage", "parent": 729, "children": [], "start_point": {"row": 127, "column": 3}, "end_point": {"row": 127, "column": 21}}, {"id": 731, "type": "argument_list", "text": "(drone->client, &clientMessage)", "parent": 729, "children": [732, 735], "start_point": {"row": 127, "column": 21}, "end_point": {"row": 127, "column": 52}}, {"id": 732, "type": "field_expression", "text": "drone->client", "parent": 731, "children": [733, 734], "start_point": {"row": 127, "column": 22}, "end_point": {"row": 127, "column": 35}}, {"id": 733, "type": "identifier", "text": "drone", "parent": 732, "children": [], "start_point": {"row": 127, "column": 22}, "end_point": {"row": 127, "column": 27}}, {"id": 734, "type": "field_identifier", "text": "client", "parent": 732, "children": [], "start_point": {"row": 127, "column": 29}, "end_point": {"row": 127, "column": 35}}, {"id": 735, "type": "pointer_expression", "text": "&clientMessage", "parent": 731, "children": [736], "start_point": {"row": 127, "column": 37}, "end_point": {"row": 127, "column": 51}}, {"id": 736, "type": "identifier", "text": "clientMessage", "parent": 735, "children": [], "start_point": {"row": 127, "column": 38}, "end_point": {"row": 127, "column": 51}}, {"id": 737, "type": "call_expression", "text": "pthread_mutex_unlock(&(drone->mutex))", "parent": 650, "children": [738, 739], "start_point": {"row": 128, "column": 3}, "end_point": {"row": 128, "column": 40}}, {"id": 738, "type": "identifier", "text": "pthread_mutex_unlock", "parent": 737, "children": [], "start_point": {"row": 128, "column": 3}, "end_point": {"row": 128, "column": 23}}, {"id": 739, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 737, "children": [740], "start_point": {"row": 128, "column": 23}, "end_point": {"row": 128, "column": 40}}, {"id": 740, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 739, "children": [741], "start_point": {"row": 128, "column": 24}, "end_point": {"row": 128, "column": 39}}, {"id": 741, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 740, "children": [742], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 39}}, {"id": 742, "type": "field_expression", "text": "drone->mutex", "parent": 741, "children": [743, 744], "start_point": {"row": 128, "column": 26}, "end_point": {"row": 128, "column": 38}}, {"id": 743, "type": "identifier", "text": "drone", "parent": 742, "children": [], "start_point": {"row": 128, "column": 26}, "end_point": {"row": 128, "column": 31}}, {"id": 744, "type": "field_identifier", "text": "mutex", "parent": 742, "children": [], "start_point": {"row": 128, "column": 33}, "end_point": {"row": 128, "column": 38}}, {"id": 745, "type": "call_expression", "text": "sleep(1)", "parent": 650, "children": [746, 747], "start_point": {"row": 129, "column": 3}, "end_point": {"row": 129, "column": 11}}, {"id": 746, "type": "identifier", "text": "sleep", "parent": 745, "children": [], "start_point": {"row": 129, "column": 3}, "end_point": {"row": 129, "column": 8}}, {"id": 747, "type": "argument_list", "text": "(1)", "parent": 745, "children": [748], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 11}}, {"id": 748, "type": "number_literal", "text": "1", "parent": 747, "children": [], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 10}}, {"id": 749, "type": "declaration", "text": "MothershipMessage mothershipMessage;", "parent": 650, "children": [750, 751], "start_point": {"row": 131, "column": 3}, "end_point": {"row": 131, "column": 39}}, {"id": 750, "type": "type_identifier", "text": "MothershipMessage", "parent": 749, "children": [], "start_point": {"row": 131, "column": 3}, "end_point": {"row": 131, "column": 20}}, {"id": 751, "type": "identifier", "text": "mothershipMessage", "parent": 749, "children": [], "start_point": {"row": 131, "column": 21}, "end_point": {"row": 131, "column": 38}}, {"id": 752, "type": "assignment_expression", "text": "mothershipMessage.sender_id = drone->id", "parent": 650, "children": [753, 756, 757], "start_point": {"row": 132, "column": 3}, "end_point": {"row": 132, "column": 42}}, {"id": 753, "type": "field_expression", "text": "mothershipMessage.sender_id", "parent": 752, "children": [754, 755], "start_point": {"row": 132, "column": 3}, "end_point": {"row": 132, "column": 30}}, {"id": 754, "type": "identifier", "text": "mothershipMessage", "parent": 753, "children": [], "start_point": {"row": 132, "column": 3}, "end_point": {"row": 132, "column": 20}}, {"id": 755, "type": "field_identifier", "text": "sender_id", "parent": 753, "children": [], "start_point": {"row": 132, "column": 21}, "end_point": {"row": 132, "column": 30}}, {"id": 756, "type": "=", "text": "=", "parent": 752, "children": [], "start_point": {"row": 132, "column": 31}, "end_point": {"row": 132, "column": 32}}, {"id": 757, "type": "field_expression", "text": "drone->id", "parent": 752, "children": [758, 759], "start_point": {"row": 132, "column": 33}, "end_point": {"row": 132, "column": 42}}, {"id": 758, "type": "identifier", "text": "drone", "parent": 757, "children": [], "start_point": {"row": 132, "column": 33}, "end_point": {"row": 132, "column": 38}}, {"id": 759, "type": "field_identifier", "text": "id", "parent": 757, "children": [], "start_point": {"row": 132, "column": 40}, "end_point": {"row": 132, "column": 42}}, {"id": 760, "type": "call_expression", "text": "pthread_mutex_lock(&(drone->mutex))", "parent": 650, "children": [761, 762], "start_point": {"row": 133, "column": 3}, "end_point": {"row": 133, "column": 38}}, {"id": 761, "type": "identifier", "text": "pthread_mutex_lock", "parent": 760, "children": [], "start_point": {"row": 133, "column": 3}, "end_point": {"row": 133, "column": 21}}, {"id": 762, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 760, "children": [763], "start_point": {"row": 133, "column": 21}, "end_point": {"row": 133, "column": 38}}, {"id": 763, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 762, "children": [764], "start_point": {"row": 133, "column": 22}, "end_point": {"row": 133, "column": 37}}, {"id": 764, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 763, "children": [765], "start_point": {"row": 133, "column": 23}, "end_point": {"row": 133, "column": 37}}, {"id": 765, "type": "field_expression", "text": "drone->mutex", "parent": 764, "children": [766, 767], "start_point": {"row": 133, "column": 24}, "end_point": {"row": 133, "column": 36}}, {"id": 766, "type": "identifier", "text": "drone", "parent": 765, "children": [], "start_point": {"row": 133, "column": 24}, "end_point": {"row": 133, "column": 29}}, {"id": 767, "type": "field_identifier", "text": "mutex", "parent": 765, "children": [], "start_point": {"row": 133, "column": 31}, "end_point": {"row": 133, "column": 36}}, {"id": 768, "type": "call_expression", "text": "pthread_mutex_lock(&(drone->client->targetMutex))", "parent": 650, "children": [769, 770], "start_point": {"row": 134, "column": 3}, "end_point": {"row": 134, "column": 52}}, {"id": 769, "type": "identifier", "text": "pthread_mutex_lock", "parent": 768, "children": [], "start_point": {"row": 134, "column": 3}, "end_point": {"row": 134, "column": 21}}, {"id": 770, "type": "argument_list", "text": "(&(drone->client->targetMutex))", "parent": 768, "children": [771], "start_point": {"row": 134, "column": 21}, "end_point": {"row": 134, "column": 52}}, {"id": 771, "type": "pointer_expression", "text": "&(drone->client->targetMutex)", "parent": 770, "children": [772], "start_point": {"row": 134, "column": 22}, "end_point": {"row": 134, "column": 51}}, {"id": 772, "type": "parenthesized_expression", "text": "(drone->client->targetMutex)", "parent": 771, "children": [773], "start_point": {"row": 134, "column": 23}, "end_point": {"row": 134, "column": 51}}, {"id": 773, "type": "field_expression", "text": "drone->client->targetMutex", "parent": 772, "children": [774, 777], "start_point": {"row": 134, "column": 24}, "end_point": {"row": 134, "column": 50}}, {"id": 774, "type": "field_expression", "text": "drone->client", "parent": 773, "children": [775, 776], "start_point": {"row": 134, "column": 24}, "end_point": {"row": 134, "column": 37}}, {"id": 775, "type": "identifier", "text": "drone", "parent": 774, "children": [], "start_point": {"row": 134, "column": 24}, "end_point": {"row": 134, "column": 29}}, {"id": 776, "type": "field_identifier", "text": "client", "parent": 774, "children": [], "start_point": {"row": 134, "column": 31}, "end_point": {"row": 134, "column": 37}}, {"id": 777, "type": "field_identifier", "text": "targetMutex", "parent": 773, "children": [], "start_point": {"row": 134, "column": 39}, "end_point": {"row": 134, "column": 50}}, {"id": 778, "type": "if_statement", "text": "if(drone->client->targetInstalled) {\n\t\t\t\tdashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n\t\t\t\tmothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n\t\t\t\tclientMessage.type = DRONE_DELIVERY_SUCCESS;\n\t\t\t\tdrone->deliverySuccess = true;\n\t\t\t} else {\n\t\t\t\tdashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n\t\t\t\tmothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n\t\t\t\tdrone->deliverySuccess = false;\n\t\t\t\tif(drone->package->numberOfTryRemaining > 1){\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FAILURE;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n\t\t\t\t}\n\t\t\t}", "parent": 650, "children": [779, 809], "start_point": {"row": 135, "column": 3}, "end_point": {"row": 150, "column": 4}}, {"id": 779, "type": "parenthesized_expression", "text": "(drone->client->targetInstalled)", "parent": 778, "children": [780], "start_point": {"row": 135, "column": 5}, "end_point": {"row": 135, "column": 37}}, {"id": 780, "type": "field_expression", "text": "drone->client->targetInstalled", "parent": 779, "children": [781, 784], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 135, "column": 36}}, {"id": 781, "type": "field_expression", "text": "drone->client", "parent": 780, "children": [782, 783], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 135, "column": 19}}, {"id": 782, "type": "identifier", "text": "drone", "parent": 781, "children": [], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 135, "column": 11}}, {"id": 783, "type": "field_identifier", "text": "client", "parent": 781, "children": [], "start_point": {"row": 135, "column": 13}, "end_point": {"row": 135, "column": 19}}, {"id": 784, "type": "field_identifier", "text": "targetInstalled", "parent": 780, "children": [], "start_point": {"row": 135, "column": 21}, "end_point": {"row": 135, "column": 36}}, {"id": 785, "type": "assignment_expression", "text": "dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS", "parent": 778, "children": [786, 789, 790], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 64}}, {"id": 786, "type": "field_expression", "text": "dashboardMessage.state", "parent": 785, "children": [787, 788], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 26}}, {"id": 787, "type": "identifier", "text": "dashboardMessage", "parent": 786, "children": [], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 20}}, {"id": 788, "type": "field_identifier", "text": "state", "parent": 786, "children": [], "start_point": {"row": 136, "column": 21}, "end_point": {"row": 136, "column": 26}}, {"id": 789, "type": "=", "text": "=", "parent": 785, "children": [], "start_point": {"row": 136, "column": 27}, "end_point": {"row": 136, "column": 28}}, {"id": 790, "type": "identifier", "text": "D_DRONE_FLYING_CTM_DELIVERY_SUCCESS", "parent": 785, "children": [], "start_point": {"row": 136, "column": 29}, "end_point": {"row": 136, "column": 64}}, {"id": 791, "type": "assignment_expression", "text": "mothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS", "parent": 778, "children": [792, 795, 796], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 137, "column": 60}}, {"id": 792, "type": "field_expression", "text": "mothershipMessage.type", "parent": 791, "children": [793, 794], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 137, "column": 26}}, {"id": 793, "type": "identifier", "text": "mothershipMessage", "parent": 792, "children": [], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 137, "column": 21}}, {"id": 794, "type": "field_identifier", "text": "type", "parent": 792, "children": [], "start_point": {"row": 137, "column": 22}, "end_point": {"row": 137, "column": 26}}, {"id": 795, "type": "=", "text": "=", "parent": 791, "children": [], "start_point": {"row": 137, "column": 27}, "end_point": {"row": 137, "column": 28}}, {"id": 796, "type": "identifier", "text": "DRONE_PACKAGE_DELIVERED_SUCCESS", "parent": 791, "children": [], "start_point": {"row": 137, "column": 29}, "end_point": {"row": 137, "column": 60}}, {"id": 797, "type": "assignment_expression", "text": "clientMessage.type = DRONE_DELIVERY_SUCCESS", "parent": 778, "children": [798, 801, 802], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 47}}, {"id": 798, "type": "field_expression", "text": "clientMessage.type", "parent": 797, "children": [799, 800], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 22}}, {"id": 799, "type": "identifier", "text": "clientMessage", "parent": 798, "children": [], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 17}}, {"id": 800, "type": "field_identifier", "text": "type", "parent": 798, "children": [], "start_point": {"row": 138, "column": 18}, "end_point": {"row": 138, "column": 22}}, {"id": 801, "type": "=", "text": "=", "parent": 797, "children": [], "start_point": {"row": 138, "column": 23}, "end_point": {"row": 138, "column": 24}}, {"id": 802, "type": "identifier", "text": "DRONE_DELIVERY_SUCCESS", "parent": 797, "children": [], "start_point": {"row": 138, "column": 25}, "end_point": {"row": 138, "column": 47}}, {"id": 803, "type": "assignment_expression", "text": "drone->deliverySuccess = true", "parent": 778, "children": [804, 807, 808], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 33}}, {"id": 804, "type": "field_expression", "text": "drone->deliverySuccess", "parent": 803, "children": [805, 806], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 26}}, {"id": 805, "type": "identifier", "text": "drone", "parent": 804, "children": [], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 9}}, {"id": 806, "type": "field_identifier", "text": "deliverySuccess", "parent": 804, "children": [], "start_point": {"row": 139, "column": 11}, "end_point": {"row": 139, "column": 26}}, {"id": 807, "type": "=", "text": "=", "parent": 803, "children": [], "start_point": {"row": 139, "column": 27}, "end_point": {"row": 139, "column": 28}}, {"id": 808, "type": "true", "text": "true", "parent": 803, "children": [], "start_point": {"row": 139, "column": 29}, "end_point": {"row": 139, "column": 33}}, {"id": 809, "type": "else_clause", "text": "else {\n\t\t\t\tdashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n\t\t\t\tmothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n\t\t\t\tdrone->deliverySuccess = false;\n\t\t\t\tif(drone->package->numberOfTryRemaining > 1){\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FAILURE;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n\t\t\t\t}\n\t\t\t}", "parent": 778, "children": [], "start_point": {"row": 140, "column": 5}, "end_point": {"row": 150, "column": 4}}, {"id": 810, "type": "assignment_expression", "text": "dashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL", "parent": 809, "children": [811, 814, 815], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 61}}, {"id": 811, "type": "field_expression", "text": "dashboardMessage.state", "parent": 810, "children": [812, 813], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 26}}, {"id": 812, "type": "identifier", "text": "dashboardMessage", "parent": 811, "children": [], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 20}}, {"id": 813, "type": "field_identifier", "text": "state", "parent": 811, "children": [], "start_point": {"row": 141, "column": 21}, "end_point": {"row": 141, "column": 26}}, {"id": 814, "type": "=", "text": "=", "parent": 810, "children": [], "start_point": {"row": 141, "column": 27}, "end_point": {"row": 141, "column": 28}}, {"id": 815, "type": "identifier", "text": "D_DRONE_FLYING_CTM_DELIVERY_FAIL", "parent": 810, "children": [], "start_point": {"row": 141, "column": 29}, "end_point": {"row": 141, "column": 61}}, {"id": 816, "type": "assignment_expression", "text": "mothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL", "parent": 809, "children": [817, 820, 821], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 57}}, {"id": 817, "type": "field_expression", "text": "mothershipMessage.type", "parent": 816, "children": [818, 819], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 26}}, {"id": 818, "type": "identifier", "text": "mothershipMessage", "parent": 817, "children": [], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 21}}, {"id": 819, "type": "field_identifier", "text": "type", "parent": 817, "children": [], "start_point": {"row": 142, "column": 22}, "end_point": {"row": 142, "column": 26}}, {"id": 820, "type": "=", "text": "=", "parent": 816, "children": [], "start_point": {"row": 142, "column": 27}, "end_point": {"row": 142, "column": 28}}, {"id": 821, "type": "identifier", "text": "DRONE_PACKAGE_DELIVERED_FAIL", "parent": 816, "children": [], "start_point": {"row": 142, "column": 29}, "end_point": {"row": 142, "column": 57}}, {"id": 822, "type": "assignment_expression", "text": "drone->deliverySuccess = false", "parent": 809, "children": [823, 826, 827], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 34}}, {"id": 823, "type": "field_expression", "text": "drone->deliverySuccess", "parent": 822, "children": [824, 825], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 26}}, {"id": 824, "type": "identifier", "text": "drone", "parent": 823, "children": [], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 9}}, {"id": 825, "type": "field_identifier", "text": "deliverySuccess", "parent": 823, "children": [], "start_point": {"row": 143, "column": 11}, "end_point": {"row": 143, "column": 26}}, {"id": 826, "type": "=", "text": "=", "parent": 822, "children": [], "start_point": {"row": 143, "column": 27}, "end_point": {"row": 143, "column": 28}}, {"id": 827, "type": "false", "text": "false", "parent": 822, "children": [], "start_point": {"row": 143, "column": 29}, "end_point": {"row": 143, "column": 34}}, {"id": 828, "type": "if_statement", "text": "if(drone->package->numberOfTryRemaining > 1){\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FAILURE;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n\t\t\t\t}", "parent": 809, "children": [829, 843], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 149, "column": 5}}, {"id": 829, "type": "parenthesized_expression", "text": "(drone->package->numberOfTryRemaining > 1)", "parent": 828, "children": [830], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 48}}, {"id": 830, "type": "binary_expression", "text": "drone->package->numberOfTryRemaining > 1", "parent": 829, "children": [831, 835, 836], "start_point": {"row": 144, "column": 7}, "end_point": {"row": 144, "column": 47}}, {"id": 831, "type": "field_expression", "text": "drone->package->numberOfTryRemaining", "parent": 830, "children": [832, 834], "start_point": {"row": 144, "column": 7}, "end_point": {"row": 144, "column": 43}}, {"id": 832, "type": "field_expression", "text": "drone->package", "parent": 831, "children": [833], "start_point": {"row": 144, "column": 7}, "end_point": {"row": 144, "column": 21}}, {"id": 833, "type": "identifier", "text": "drone", "parent": 832, "children": [], "start_point": {"row": 144, "column": 7}, "end_point": {"row": 144, "column": 12}}, {"id": 834, "type": "field_identifier", "text": "numberOfTryRemaining", "parent": 831, "children": [], "start_point": {"row": 144, "column": 23}, "end_point": {"row": 144, "column": 43}}, {"id": 835, "type": ">", "text": ">", "parent": 830, "children": [], "start_point": {"row": 144, "column": 44}, "end_point": {"row": 144, "column": 45}}, {"id": 836, "type": "number_literal", "text": "1", "parent": 830, "children": [], "start_point": {"row": 144, "column": 46}, "end_point": {"row": 144, "column": 47}}, {"id": 837, "type": "assignment_expression", "text": "clientMessage.type = DRONE_DELIVERY_FAILURE", "parent": 828, "children": [838, 841, 842], "start_point": {"row": 145, "column": 5}, "end_point": {"row": 145, "column": 48}}, {"id": 838, "type": "field_expression", "text": "clientMessage.type", "parent": 837, "children": [839, 840], "start_point": {"row": 145, "column": 5}, "end_point": {"row": 145, "column": 23}}, {"id": 839, "type": "identifier", "text": "clientMessage", "parent": 838, "children": [], "start_point": {"row": 145, "column": 5}, "end_point": {"row": 145, "column": 18}}, {"id": 840, "type": "field_identifier", "text": "type", "parent": 838, "children": [], "start_point": {"row": 145, "column": 19}, "end_point": {"row": 145, "column": 23}}, {"id": 841, "type": "=", "text": "=", "parent": 837, "children": [], "start_point": {"row": 145, "column": 24}, "end_point": {"row": 145, "column": 25}}, {"id": 842, "type": "identifier", "text": "DRONE_DELIVERY_FAILURE", "parent": 837, "children": [], "start_point": {"row": 145, "column": 26}, "end_point": {"row": 145, "column": 48}}, {"id": 843, "type": "else_clause", "text": "else{\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n\t\t\t\t}", "parent": 828, "children": [], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 149, "column": 5}}, {"id": 844, "type": "assignment_expression", "text": "clientMessage.type = DRONE_DELIVERY_FINAL_FAILURE", "parent": 843, "children": [845, 848, 849], "start_point": {"row": 148, "column": 5}, "end_point": {"row": 148, "column": 54}}, {"id": 845, "type": "field_expression", "text": "clientMessage.type", "parent": 844, "children": [846, 847], "start_point": {"row": 148, "column": 5}, "end_point": {"row": 148, "column": 23}}, {"id": 846, "type": "identifier", "text": "clientMessage", "parent": 845, "children": [], "start_point": {"row": 148, "column": 5}, "end_point": {"row": 148, "column": 18}}, {"id": 847, "type": "field_identifier", "text": "type", "parent": 845, "children": [], "start_point": {"row": 148, "column": 19}, "end_point": {"row": 148, "column": 23}}, {"id": 848, "type": "=", "text": "=", "parent": 844, "children": [], "start_point": {"row": 148, "column": 24}, "end_point": {"row": 148, "column": 25}}, {"id": 849, "type": "identifier", "text": "DRONE_DELIVERY_FINAL_FAILURE", "parent": 844, "children": [], "start_point": {"row": 148, "column": 26}, "end_point": {"row": 148, "column": 54}}, {"id": 850, "type": "call_expression", "text": "pthread_mutex_unlock(&(drone->client->targetMutex))", "parent": 650, "children": [851, 852], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 54}}, {"id": 851, "type": "identifier", "text": "pthread_mutex_unlock", "parent": 850, "children": [], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 23}}, {"id": 852, "type": "argument_list", "text": "(&(drone->client->targetMutex))", "parent": 850, "children": [853], "start_point": {"row": 151, "column": 23}, "end_point": {"row": 151, "column": 54}}, {"id": 853, "type": "pointer_expression", "text": "&(drone->client->targetMutex)", "parent": 852, "children": [854], "start_point": {"row": 151, "column": 24}, "end_point": {"row": 151, "column": 53}}, {"id": 854, "type": "parenthesized_expression", "text": "(drone->client->targetMutex)", "parent": 853, "children": [855], "start_point": {"row": 151, "column": 25}, "end_point": {"row": 151, "column": 53}}, {"id": 855, "type": "field_expression", "text": "drone->client->targetMutex", "parent": 854, "children": [856, 859], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 52}}, {"id": 856, "type": "field_expression", "text": "drone->client", "parent": 855, "children": [857, 858], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 39}}, {"id": 857, "type": "identifier", "text": "drone", "parent": 856, "children": [], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 31}}, {"id": 858, "type": "field_identifier", "text": "client", "parent": 856, "children": [], "start_point": {"row": 151, "column": 33}, "end_point": {"row": 151, "column": 39}}, {"id": 859, "type": "field_identifier", "text": "targetMutex", "parent": 855, "children": [], "start_point": {"row": 151, "column": 41}, "end_point": {"row": 151, "column": 52}}, {"id": 860, "type": "call_expression", "text": "pthread_mutex_unlock(&(drone->mutex))", "parent": 650, "children": [861, 862], "start_point": {"row": 152, "column": 3}, "end_point": {"row": 152, "column": 40}}, {"id": 861, "type": "identifier", "text": "pthread_mutex_unlock", "parent": 860, "children": [], "start_point": {"row": 152, "column": 3}, "end_point": {"row": 152, "column": 23}}, {"id": 862, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 860, "children": [863], "start_point": {"row": 152, "column": 23}, "end_point": {"row": 152, "column": 40}}, {"id": 863, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 862, "children": [864], "start_point": {"row": 152, "column": 24}, "end_point": {"row": 152, "column": 39}}, {"id": 864, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 863, "children": [865], "start_point": {"row": 152, "column": 25}, "end_point": {"row": 152, "column": 39}}, {"id": 865, "type": "field_expression", "text": "drone->mutex", "parent": 864, "children": [866, 867], "start_point": {"row": 152, "column": 26}, "end_point": {"row": 152, "column": 38}}, {"id": 866, "type": "identifier", "text": "drone", "parent": 865, "children": [], "start_point": {"row": 152, "column": 26}, "end_point": {"row": 152, "column": 31}}, {"id": 867, "type": "field_identifier", "text": "mutex", "parent": 865, "children": [], "start_point": {"row": 152, "column": 33}, "end_point": {"row": 152, "column": 38}}, {"id": 868, "type": "call_expression", "text": "dashboard_sendMessage(global_dashboard, &dashboardMessage)", "parent": 650, "children": [869, 870], "start_point": {"row": 154, "column": 3}, "end_point": {"row": 154, "column": 61}}, {"id": 869, "type": "identifier", "text": "dashboard_sendMessage", "parent": 868, "children": [], "start_point": {"row": 154, "column": 3}, "end_point": {"row": 154, "column": 24}}, {"id": 870, "type": "argument_list", "text": "(global_dashboard, &dashboardMessage)", "parent": 868, "children": [871, 872], "start_point": {"row": 154, "column": 24}, "end_point": {"row": 154, "column": 61}}, {"id": 871, "type": "identifier", "text": "global_dashboard", "parent": 870, "children": [], "start_point": {"row": 154, "column": 25}, "end_point": {"row": 154, "column": 41}}, {"id": 872, "type": "pointer_expression", "text": "&dashboardMessage", "parent": 870, "children": [873], "start_point": {"row": 154, "column": 43}, "end_point": {"row": 154, "column": 60}}, {"id": 873, "type": "identifier", "text": "dashboardMessage", "parent": 872, "children": [], "start_point": {"row": 154, "column": 44}, "end_point": {"row": 154, "column": 60}}, {"id": 874, "type": "call_expression", "text": "mothership_sendMessage(drone->motherShip, &mothershipMessage)", "parent": 650, "children": [875, 876], "start_point": {"row": 155, "column": 3}, "end_point": {"row": 155, "column": 64}}, {"id": 875, "type": "identifier", "text": "mothership_sendMessage", "parent": 874, "children": [], "start_point": {"row": 155, "column": 3}, "end_point": {"row": 155, "column": 25}}, {"id": 876, "type": "argument_list", "text": "(drone->motherShip, &mothershipMessage)", "parent": 874, "children": [877, 880], "start_point": {"row": 155, "column": 25}, "end_point": {"row": 155, "column": 64}}, {"id": 877, "type": "field_expression", "text": "drone->motherShip", "parent": 876, "children": [878, 879], "start_point": {"row": 155, "column": 26}, "end_point": {"row": 155, "column": 43}}, {"id": 878, "type": "identifier", "text": "drone", "parent": 877, "children": [], "start_point": {"row": 155, "column": 26}, "end_point": {"row": 155, "column": 31}}, {"id": 879, "type": "field_identifier", "text": "motherShip", "parent": 877, "children": [], "start_point": {"row": 155, "column": 33}, "end_point": {"row": 155, "column": 43}}, {"id": 880, "type": "pointer_expression", "text": "&mothershipMessage", "parent": 876, "children": [881], "start_point": {"row": 155, "column": 45}, "end_point": {"row": 155, "column": 63}}, {"id": 881, "type": "identifier", "text": "mothershipMessage", "parent": 880, "children": [], "start_point": {"row": 155, "column": 46}, "end_point": {"row": 155, "column": 63}}, {"id": 882, "type": "call_expression", "text": "client_sendMessage(drone->client, &clientMessage)", "parent": 650, "children": [883, 884], "start_point": {"row": 156, "column": 3}, "end_point": {"row": 156, "column": 52}}, {"id": 883, "type": "identifier", "text": "client_sendMessage", "parent": 882, "children": [], "start_point": {"row": 156, "column": 3}, "end_point": {"row": 156, "column": 21}}, {"id": 884, "type": "argument_list", "text": "(drone->client, &clientMessage)", "parent": 882, "children": [885, 888], "start_point": {"row": 156, "column": 21}, "end_point": {"row": 156, "column": 52}}, {"id": 885, "type": "field_expression", "text": "drone->client", "parent": 884, "children": [886, 887], "start_point": {"row": 156, "column": 22}, "end_point": {"row": 156, "column": 35}}, {"id": 886, "type": "identifier", "text": "drone", "parent": 885, "children": [], "start_point": {"row": 156, "column": 22}, "end_point": {"row": 156, "column": 27}}, {"id": 887, "type": "field_identifier", "text": "client", "parent": 885, "children": [], "start_point": {"row": 156, "column": 29}, "end_point": {"row": 156, "column": 35}}, {"id": 888, "type": "pointer_expression", "text": "&clientMessage", "parent": 884, "children": [889], "start_point": {"row": 156, "column": 37}, "end_point": {"row": 156, "column": 51}}, {"id": 889, "type": "identifier", "text": "clientMessage", "parent": 888, "children": [], "start_point": {"row": 156, "column": 38}, "end_point": {"row": 156, "column": 51}}, {"id": 890, "type": "call_expression", "text": "drone_failure(drone)", "parent": 650, "children": [891, 892], "start_point": {"row": 158, "column": 3}, "end_point": {"row": 158, "column": 23}}, {"id": 891, "type": "identifier", "text": "drone_failure", "parent": 890, "children": [], "start_point": {"row": 158, "column": 3}, "end_point": {"row": 158, "column": 16}}, {"id": 892, "type": "argument_list", "text": "(drone)", "parent": 890, "children": [893], "start_point": {"row": 158, "column": 16}, "end_point": {"row": 158, "column": 23}}, {"id": 893, "type": "identifier", "text": "drone", "parent": 892, "children": [], "start_point": {"row": 158, "column": 17}, "end_point": {"row": 158, "column": 22}}, {"id": 894, "type": "call_expression", "text": "sleep(compute_sleep_time(drone))", "parent": 650, "children": [895, 896], "start_point": {"row": 159, "column": 3}, "end_point": {"row": 159, "column": 35}}, {"id": 895, "type": "identifier", "text": "sleep", "parent": 894, "children": [], "start_point": {"row": 159, "column": 3}, "end_point": {"row": 159, "column": 8}}, {"id": 896, "type": "argument_list", "text": "(compute_sleep_time(drone))", "parent": 894, "children": [897], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 35}}, {"id": 897, "type": "call_expression", "text": "compute_sleep_time(drone)", "parent": 896, "children": [898, 899], "start_point": {"row": 159, "column": 9}, "end_point": {"row": 159, "column": 34}}, {"id": 898, "type": "identifier", "text": "compute_sleep_time", "parent": 897, "children": [], "start_point": {"row": 159, "column": 9}, "end_point": {"row": 159, "column": 27}}, {"id": 899, "type": "argument_list", "text": "(drone)", "parent": 897, "children": [900], "start_point": {"row": 159, "column": 27}, "end_point": {"row": 159, "column": 34}}, {"id": 900, "type": "identifier", "text": "drone", "parent": 899, "children": [], "start_point": {"row": 159, "column": 28}, "end_point": {"row": 159, "column": 33}}, {"id": 901, "type": "call_expression", "text": "pthread_mutex_lock(&(drone->mutex))", "parent": 650, "children": [902, 903], "start_point": {"row": 160, "column": 3}, "end_point": {"row": 160, "column": 38}}, {"id": 902, "type": "identifier", "text": "pthread_mutex_lock", "parent": 901, "children": [], "start_point": {"row": 160, "column": 3}, "end_point": {"row": 160, "column": 21}}, {"id": 903, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 901, "children": [904], "start_point": {"row": 160, "column": 21}, "end_point": {"row": 160, "column": 38}}, {"id": 904, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 903, "children": [905], "start_point": {"row": 160, "column": 22}, "end_point": {"row": 160, "column": 37}}, {"id": 905, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 904, "children": [906], "start_point": {"row": 160, "column": 23}, "end_point": {"row": 160, "column": 37}}, {"id": 906, "type": "field_expression", "text": "drone->mutex", "parent": 905, "children": [907, 908], "start_point": {"row": 160, "column": 24}, "end_point": {"row": 160, "column": 36}}, {"id": 907, "type": "identifier", "text": "drone", "parent": 906, "children": [], "start_point": {"row": 160, "column": 24}, "end_point": {"row": 160, "column": 29}}, {"id": 908, "type": "field_identifier", "text": "mutex", "parent": 906, "children": [], "start_point": {"row": 160, "column": 31}, "end_point": {"row": 160, "column": 36}}, {"id": 909, "type": "assignment_expression", "text": "drone->autonomy -= consumption", "parent": 650, "children": [910, 913, 914], "start_point": {"row": 161, "column": 3}, "end_point": {"row": 161, "column": 33}}, {"id": 910, "type": "field_expression", "text": "drone->autonomy", "parent": 909, "children": [911, 912], "start_point": {"row": 161, "column": 3}, "end_point": {"row": 161, "column": 18}}, {"id": 911, "type": "identifier", "text": "drone", "parent": 910, "children": [], "start_point": {"row": 161, "column": 3}, "end_point": {"row": 161, "column": 8}}, {"id": 912, "type": "field_identifier", "text": "autonomy", "parent": 910, "children": [], "start_point": {"row": 161, "column": 10}, "end_point": {"row": 161, "column": 18}}, {"id": 913, "type": "-=", "text": "-=", "parent": 909, "children": [], "start_point": {"row": 161, "column": 19}, "end_point": {"row": 161, "column": 21}}, {"id": 914, "type": "identifier", "text": "consumption", "parent": 909, "children": [], "start_point": {"row": 161, "column": 22}, "end_point": {"row": 161, "column": 33}}, {"id": 915, "type": "call_expression", "text": "pthread_mutex_unlock(&(drone->mutex))", "parent": 650, "children": [916, 917], "start_point": {"row": 162, "column": 3}, "end_point": {"row": 162, "column": 40}}, {"id": 916, "type": "identifier", "text": "pthread_mutex_unlock", "parent": 915, "children": [], "start_point": {"row": 162, "column": 3}, "end_point": {"row": 162, "column": 23}}, {"id": 917, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 915, "children": [918], "start_point": {"row": 162, "column": 23}, "end_point": {"row": 162, "column": 40}}, {"id": 918, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 917, "children": [919], "start_point": {"row": 162, "column": 24}, "end_point": {"row": 162, "column": 39}}, {"id": 919, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 918, "children": [920], "start_point": {"row": 162, "column": 25}, "end_point": {"row": 162, "column": 39}}, {"id": 920, "type": "field_expression", "text": "drone->mutex", "parent": 919, "children": [921, 922], "start_point": {"row": 162, "column": 26}, "end_point": {"row": 162, "column": 38}}, {"id": 921, "type": "identifier", "text": "drone", "parent": 920, "children": [], "start_point": {"row": 162, "column": 26}, "end_point": {"row": 162, "column": 31}}, {"id": 922, "type": "field_identifier", "text": "mutex", "parent": 920, "children": [], "start_point": {"row": 162, "column": 33}, "end_point": {"row": 162, "column": 38}}, {"id": 923, "type": "assignment_expression", "text": "dashboardMessage.state = D_DRONE_WAITING", "parent": 650, "children": [924, 927, 928], "start_point": {"row": 164, "column": 3}, "end_point": {"row": 164, "column": 43}}, {"id": 924, "type": "field_expression", "text": "dashboardMessage.state", "parent": 923, "children": [925, 926], "start_point": {"row": 164, "column": 3}, "end_point": {"row": 164, "column": 25}}, {"id": 925, "type": "identifier", "text": "dashboardMessage", "parent": 924, "children": [], "start_point": {"row": 164, "column": 3}, "end_point": {"row": 164, "column": 19}}, {"id": 926, "type": "field_identifier", "text": "state", "parent": 924, "children": [], "start_point": {"row": 164, "column": 20}, "end_point": {"row": 164, "column": 25}}, {"id": 927, "type": "=", "text": "=", "parent": 923, "children": [], "start_point": {"row": 164, "column": 26}, "end_point": {"row": 164, "column": 27}}, {"id": 928, "type": "identifier", "text": "D_DRONE_WAITING", "parent": 923, "children": [], "start_point": {"row": 164, "column": 28}, "end_point": {"row": 164, "column": 43}}, {"id": 929, "type": "call_expression", "text": "dashboard_sendMessage(global_dashboard, &dashboardMessage)", "parent": 650, "children": [930, 931], "start_point": {"row": 165, "column": 3}, "end_point": {"row": 165, "column": 61}}, {"id": 930, "type": "identifier", "text": "dashboard_sendMessage", "parent": 929, "children": [], "start_point": {"row": 165, "column": 3}, "end_point": {"row": 165, "column": 24}}, {"id": 931, "type": "argument_list", "text": "(global_dashboard, &dashboardMessage)", "parent": 929, "children": [932, 933], "start_point": {"row": 165, "column": 24}, "end_point": {"row": 165, "column": 61}}, {"id": 932, "type": "identifier", "text": "global_dashboard", "parent": 931, "children": [], "start_point": {"row": 165, "column": 25}, "end_point": {"row": 165, "column": 41}}, {"id": 933, "type": "pointer_expression", "text": "&dashboardMessage", "parent": 931, "children": [934], "start_point": {"row": 165, "column": 43}, "end_point": {"row": 165, "column": 60}}, {"id": 934, "type": "identifier", "text": "dashboardMessage", "parent": 933, "children": [], "start_point": {"row": 165, "column": 44}, "end_point": {"row": 165, "column": 60}}, {"id": 935, "type": "assignment_expression", "text": "mothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP", "parent": 650, "children": [936, 939, 940], "start_point": {"row": 167, "column": 3}, "end_point": {"row": 167, "column": 52}}, {"id": 936, "type": "field_expression", "text": "mothershipMessage.type", "parent": 935, "children": [937, 938], "start_point": {"row": 167, "column": 3}, "end_point": {"row": 167, "column": 25}}, {"id": 937, "type": "identifier", "text": "mothershipMessage", "parent": 936, "children": [], "start_point": {"row": 167, "column": 3}, "end_point": {"row": 167, "column": 20}}, {"id": 938, "type": "field_identifier", "text": "type", "parent": 936, "children": [], "start_point": {"row": 167, "column": 21}, "end_point": {"row": 167, "column": 25}}, {"id": 939, "type": "=", "text": "=", "parent": 935, "children": [], "start_point": {"row": 167, "column": 26}, "end_point": {"row": 167, "column": 27}}, {"id": 940, "type": "identifier", "text": "DRONE_BACK_TO_MOTHERSHIP", "parent": 935, "children": [], "start_point": {"row": 167, "column": 28}, "end_point": {"row": 167, "column": 52}}, {"id": 941, "type": "call_expression", "text": "mothership_sendMessage(drone->motherShip, &mothershipMessage)", "parent": 650, "children": [942, 943], "start_point": {"row": 168, "column": 3}, "end_point": {"row": 168, "column": 64}}, {"id": 942, "type": "identifier", "text": "mothership_sendMessage", "parent": 941, "children": [], "start_point": {"row": 168, "column": 3}, "end_point": {"row": 168, "column": 25}}, {"id": 943, "type": "argument_list", "text": "(drone->motherShip, &mothershipMessage)", "parent": 941, "children": [944, 947], "start_point": {"row": 168, "column": 25}, "end_point": {"row": 168, "column": 64}}, {"id": 944, "type": "field_expression", "text": "drone->motherShip", "parent": 943, "children": [945, 946], "start_point": {"row": 168, "column": 26}, "end_point": {"row": 168, "column": 43}}, {"id": 945, "type": "identifier", "text": "drone", "parent": 944, "children": [], "start_point": {"row": 168, "column": 26}, "end_point": {"row": 168, "column": 31}}, {"id": 946, "type": "field_identifier", "text": "motherShip", "parent": 944, "children": [], "start_point": {"row": 168, "column": 33}, "end_point": {"row": 168, "column": 43}}, {"id": 947, "type": "pointer_expression", "text": "&mothershipMessage", "parent": 943, "children": [948], "start_point": {"row": 168, "column": 45}, "end_point": {"row": 168, "column": 63}}, {"id": 948, "type": "identifier", "text": "mothershipMessage", "parent": 947, "children": [], "start_point": {"row": 168, "column": 46}, "end_point": {"row": 168, "column": 63}}, {"id": 949, "type": "break_statement", "text": "break;", "parent": 650, "children": [950], "start_point": {"row": 169, "column": 3}, "end_point": {"row": 169, "column": 9}}, {"id": 950, "type": "break", "text": "break", "parent": 949, "children": [], "start_point": {"row": 169, "column": 3}, "end_point": {"row": 169, "column": 8}}, {"id": 951, "type": "case_statement", "text": "default:\n\t\t\tbreak;", "parent": 500, "children": [952, 953], "start_point": {"row": 171, "column": 2}, "end_point": {"row": 172, "column": 9}}, {"id": 952, "type": "default", "text": "default", "parent": 951, "children": [], "start_point": {"row": 171, "column": 2}, "end_point": {"row": 171, "column": 9}}, {"id": 953, "type": "break_statement", "text": "break;", "parent": 951, "children": [954], "start_point": {"row": 172, "column": 3}, "end_point": {"row": 172, "column": 9}}, {"id": 954, "type": "break", "text": "break", "parent": 953, "children": [], "start_point": {"row": 172, "column": 3}, "end_point": {"row": 172, "column": 8}}, {"id": 955, "type": "return_statement", "text": "return true;", "parent": 468, "children": [956], "start_point": {"row": 174, "column": 1}, "end_point": {"row": 174, "column": 13}}, {"id": 956, "type": "true", "text": "true", "parent": 955, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 12}}, {"id": 957, "type": "function_definition", "text": "unsigned int compute_sleep_time(Drone* drone) {\n\tunsigned int distance = drone->client->distance - 1;\n\t// minus 1 to send the target message 1s before arriving\n\n\treturn distance > 1 ? distance / 4 : 1;\n}", "parent": null, "children": [958, 961], "start_point": {"row": 177, "column": 0}, "end_point": {"row": 182, "column": 1}}, {"id": 958, "type": "sized_type_specifier", "text": "unsigned int", "parent": 957, "children": [959, 960], "start_point": {"row": 177, "column": 0}, "end_point": {"row": 177, "column": 12}}, {"id": 959, "type": "unsigned", "text": "unsigned", "parent": 958, "children": [], "start_point": {"row": 177, "column": 0}, "end_point": {"row": 177, "column": 8}}, {"id": 960, "type": "primitive_type", "text": "int", "parent": 958, "children": [], "start_point": {"row": 177, "column": 9}, "end_point": {"row": 177, "column": 12}}, {"id": 961, "type": "function_declarator", "text": "compute_sleep_time(Drone* drone)", "parent": 957, "children": [962, 963], "start_point": {"row": 177, "column": 13}, "end_point": {"row": 177, "column": 45}}, {"id": 962, "type": "identifier", "text": "compute_sleep_time", "parent": 961, "children": [], "start_point": {"row": 177, "column": 13}, "end_point": {"row": 177, "column": 31}}, {"id": 963, "type": "parameter_list", "text": "(Drone* drone)", "parent": 961, "children": [964], "start_point": {"row": 177, "column": 31}, "end_point": {"row": 177, "column": 45}}, {"id": 964, "type": "parameter_declaration", "text": "Drone* drone", "parent": 963, "children": [965, 966], "start_point": {"row": 177, "column": 32}, "end_point": {"row": 177, "column": 44}}, {"id": 965, "type": "type_identifier", "text": "Drone", "parent": 964, "children": [], "start_point": {"row": 177, "column": 32}, "end_point": {"row": 177, "column": 37}}, {"id": 966, "type": "pointer_declarator", "text": "* drone", "parent": 964, "children": [967, 968], "start_point": {"row": 177, "column": 37}, "end_point": {"row": 177, "column": 44}}, {"id": 967, "type": "*", "text": "*", "parent": 966, "children": [], "start_point": {"row": 177, "column": 37}, "end_point": {"row": 177, "column": 38}}, {"id": 968, "type": "identifier", "text": "drone", "parent": 966, "children": [], "start_point": {"row": 177, "column": 39}, "end_point": {"row": 177, "column": 44}}, {"id": 969, "type": "declaration", "text": "unsigned int distance = drone->client->distance - 1;", "parent": 957, "children": [970, 973], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 53}}, {"id": 970, "type": "sized_type_specifier", "text": "unsigned int", "parent": 969, "children": [971, 972], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 13}}, {"id": 971, "type": "unsigned", "text": "unsigned", "parent": 970, "children": [], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 9}}, {"id": 972, "type": "primitive_type", "text": "int", "parent": 970, "children": [], "start_point": {"row": 178, "column": 10}, "end_point": {"row": 178, "column": 13}}, {"id": 973, "type": "init_declarator", "text": "distance = drone->client->distance - 1", "parent": 969, "children": [974, 975, 976], "start_point": {"row": 178, "column": 14}, "end_point": {"row": 178, "column": 52}}, {"id": 974, "type": "identifier", "text": "distance", "parent": 973, "children": [], "start_point": {"row": 178, "column": 14}, "end_point": {"row": 178, "column": 22}}, {"id": 975, "type": "=", "text": "=", "parent": 973, "children": [], "start_point": {"row": 178, "column": 23}, "end_point": {"row": 178, "column": 24}}, {"id": 976, "type": "binary_expression", "text": "drone->client->distance - 1", "parent": 973, "children": [977, 982, 983], "start_point": {"row": 178, "column": 25}, "end_point": {"row": 178, "column": 52}}, {"id": 977, "type": "field_expression", "text": "drone->client->distance", "parent": 976, "children": [978, 981], "start_point": {"row": 178, "column": 25}, "end_point": {"row": 178, "column": 48}}, {"id": 978, "type": "field_expression", "text": "drone->client", "parent": 977, "children": [979, 980], "start_point": {"row": 178, "column": 25}, "end_point": {"row": 178, "column": 38}}, {"id": 979, "type": "identifier", "text": "drone", "parent": 978, "children": [], "start_point": {"row": 178, "column": 25}, "end_point": {"row": 178, "column": 30}}, {"id": 980, "type": "field_identifier", "text": "client", "parent": 978, "children": [], "start_point": {"row": 178, "column": 32}, "end_point": {"row": 178, "column": 38}}, {"id": 981, "type": "field_identifier", "text": "distance", "parent": 977, "children": [], "start_point": {"row": 178, "column": 40}, "end_point": {"row": 178, "column": 48}}, {"id": 982, "type": "-", "text": "-", "parent": 976, "children": [], "start_point": {"row": 178, "column": 49}, "end_point": {"row": 178, "column": 50}}, {"id": 983, "type": "number_literal", "text": "1", "parent": 976, "children": [], "start_point": {"row": 178, "column": 51}, "end_point": {"row": 178, "column": 52}}, {"id": 984, "type": "return_statement", "text": "return distance > 1 ? distance / 4 : 1;", "parent": 957, "children": [985], "start_point": {"row": 181, "column": 1}, "end_point": {"row": 181, "column": 40}}, {"id": 985, "type": "conditional_expression", "text": "distance > 1 ? distance / 4 : 1", "parent": 984, "children": [986, 990, 991, 995], "start_point": {"row": 181, "column": 8}, "end_point": {"row": 181, "column": 39}}, {"id": 986, "type": "binary_expression", "text": "distance > 1", "parent": 985, "children": [987, 988, 989], "start_point": {"row": 181, "column": 8}, "end_point": {"row": 181, "column": 20}}, {"id": 987, "type": "identifier", "text": "distance", "parent": 986, "children": [], "start_point": {"row": 181, "column": 8}, "end_point": {"row": 181, "column": 16}}, {"id": 988, "type": ">", "text": ">", "parent": 986, "children": [], "start_point": {"row": 181, "column": 17}, "end_point": {"row": 181, "column": 18}}, {"id": 989, "type": "number_literal", "text": "1", "parent": 986, "children": [], "start_point": {"row": 181, "column": 19}, "end_point": {"row": 181, "column": 20}}, {"id": 990, "type": "?", "text": "?", "parent": 985, "children": [], "start_point": {"row": 181, "column": 21}, "end_point": {"row": 181, "column": 22}}, {"id": 991, "type": "binary_expression", "text": "distance / 4", "parent": 985, "children": [992, 993, 994], "start_point": {"row": 181, "column": 23}, "end_point": {"row": 181, "column": 35}}, {"id": 992, "type": "identifier", "text": "distance", "parent": 991, "children": [], "start_point": {"row": 181, "column": 23}, "end_point": {"row": 181, "column": 31}}, {"id": 993, "type": "/", "text": "/", "parent": 991, "children": [], "start_point": {"row": 181, "column": 32}, "end_point": {"row": 181, "column": 33}}, {"id": 994, "type": "number_literal", "text": "4", "parent": 991, "children": [], "start_point": {"row": 181, "column": 34}, "end_point": {"row": 181, "column": 35}}, {"id": 995, "type": "number_literal", "text": "1", "parent": 985, "children": [], "start_point": {"row": 181, "column": 38}, "end_point": {"row": 181, "column": 39}}, {"id": 996, "type": "function_definition", "text": "void drone_failure(Drone* drone) {\n\tif ((rand() % 30) == 0) {\n\t\tpthread_mutex_lock(&(drone->mutex));\n\t\tdrone->state = S_DEAD;\n\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\tMothershipMessage msg;\n\t\tmsg.sender_id = drone->id;\n\t\tmsg.type = DRONE_DEAD;\n\n\t\tmothership_sendMessage(drone->motherShip, &msg);\n\n\t\tDashboardMessage dMsg;\n\t\tdMsg.type = D_DRONE;\n\t\tdMsg.state = D_DRONE_DEAD;\n\t\tdMsg.number = drone->id;\n\n\t\tdashboard_sendMessage(global_dashboard, &dMsg);\n\t\tif (drone->package != NULL) {\n\t\t\tdMsg.type = D_PACKAGE;\n\t\t\tdMsg.state = D_PACKAGE_FAIL;\n\t\t\tdMsg.number = drone->package->id;\n\t\t\tdashboard_sendMessage(global_dashboard, &dMsg);\n\t\t}\n\n\t\tpthread_exit(0);\n\t}\n}", "parent": null, "children": [997, 998], "start_point": {"row": 184, "column": 0}, "end_point": {"row": 211, "column": 1}}, {"id": 997, "type": "primitive_type", "text": "void", "parent": 996, "children": [], "start_point": {"row": 184, "column": 0}, "end_point": {"row": 184, "column": 4}}, {"id": 998, "type": "function_declarator", "text": "drone_failure(Drone* drone)", "parent": 996, "children": [999, 1000], "start_point": {"row": 184, "column": 5}, "end_point": {"row": 184, "column": 32}}, {"id": 999, "type": "identifier", "text": "drone_failure", "parent": 998, "children": [], "start_point": {"row": 184, "column": 5}, "end_point": {"row": 184, "column": 18}}, {"id": 1000, "type": "parameter_list", "text": "(Drone* drone)", "parent": 998, "children": [1001], "start_point": {"row": 184, "column": 18}, "end_point": {"row": 184, "column": 32}}, {"id": 1001, "type": "parameter_declaration", "text": "Drone* drone", "parent": 1000, "children": [1002, 1003], "start_point": {"row": 184, "column": 19}, "end_point": {"row": 184, "column": 31}}, {"id": 1002, "type": "type_identifier", "text": "Drone", "parent": 1001, "children": [], "start_point": {"row": 184, "column": 19}, "end_point": {"row": 184, "column": 24}}, {"id": 1003, "type": "pointer_declarator", "text": "* drone", "parent": 1001, "children": [1004, 1005], "start_point": {"row": 184, "column": 24}, "end_point": {"row": 184, "column": 31}}, {"id": 1004, "type": "*", "text": "*", "parent": 1003, "children": [], "start_point": {"row": 184, "column": 24}, "end_point": {"row": 184, "column": 25}}, {"id": 1005, "type": "identifier", "text": "drone", "parent": 1003, "children": [], "start_point": {"row": 184, "column": 26}, "end_point": {"row": 184, "column": 31}}, {"id": 1006, "type": "if_statement", "text": "if ((rand() % 30) == 0) {\n\t\tpthread_mutex_lock(&(drone->mutex));\n\t\tdrone->state = S_DEAD;\n\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\tMothershipMessage msg;\n\t\tmsg.sender_id = drone->id;\n\t\tmsg.type = DRONE_DEAD;\n\n\t\tmothership_sendMessage(drone->motherShip, &msg);\n\n\t\tDashboardMessage dMsg;\n\t\tdMsg.type = D_DRONE;\n\t\tdMsg.state = D_DRONE_DEAD;\n\t\tdMsg.number = drone->id;\n\n\t\tdashboard_sendMessage(global_dashboard, &dMsg);\n\t\tif (drone->package != NULL) {\n\t\t\tdMsg.type = D_PACKAGE;\n\t\t\tdMsg.state = D_PACKAGE_FAIL;\n\t\t\tdMsg.number = drone->package->id;\n\t\t\tdashboard_sendMessage(global_dashboard, &dMsg);\n\t\t}\n\n\t\tpthread_exit(0);\n\t}", "parent": 996, "children": [1007], "start_point": {"row": 185, "column": 1}, "end_point": {"row": 210, "column": 2}}, {"id": 1007, "type": "parenthesized_expression", "text": "((rand() % 30) == 0)", "parent": 1006, "children": [1008], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 24}}, {"id": 1008, "type": "binary_expression", "text": "(rand() % 30) == 0", "parent": 1007, "children": [1009, 1016, 1017], "start_point": {"row": 185, "column": 5}, "end_point": {"row": 185, "column": 23}}, {"id": 1009, "type": "parenthesized_expression", "text": "(rand() % 30)", "parent": 1008, "children": [1010], "start_point": {"row": 185, "column": 5}, "end_point": {"row": 185, "column": 18}}, {"id": 1010, "type": "binary_expression", "text": "rand() % 30", "parent": 1009, "children": [1011, 1014, 1015], "start_point": {"row": 185, "column": 6}, "end_point": {"row": 185, "column": 17}}, {"id": 1011, "type": "call_expression", "text": "rand()", "parent": 1010, "children": [1012, 1013], "start_point": {"row": 185, "column": 6}, "end_point": {"row": 185, "column": 12}}, {"id": 1012, "type": "identifier", "text": "rand", "parent": 1011, "children": [], "start_point": {"row": 185, "column": 6}, "end_point": {"row": 185, "column": 10}}, {"id": 1013, "type": "argument_list", "text": "()", "parent": 1011, "children": [], "start_point": {"row": 185, "column": 10}, "end_point": {"row": 185, "column": 12}}, {"id": 1014, "type": "%", "text": "%", "parent": 1010, "children": [], "start_point": {"row": 185, "column": 13}, "end_point": {"row": 185, "column": 14}}, {"id": 1015, "type": "number_literal", "text": "30", "parent": 1010, "children": [], "start_point": {"row": 185, "column": 15}, "end_point": {"row": 185, "column": 17}}, {"id": 1016, "type": "==", "text": "==", "parent": 1008, "children": [], "start_point": {"row": 185, "column": 19}, "end_point": {"row": 185, "column": 21}}, {"id": 1017, "type": "number_literal", "text": "0", "parent": 1008, "children": [], "start_point": {"row": 185, "column": 22}, "end_point": {"row": 185, "column": 23}}, {"id": 1018, "type": "call_expression", "text": "pthread_mutex_lock(&(drone->mutex))", "parent": 1006, "children": [1019, 1020], "start_point": {"row": 186, "column": 2}, "end_point": {"row": 186, "column": 37}}, {"id": 1019, "type": "identifier", "text": "pthread_mutex_lock", "parent": 1018, "children": [], "start_point": {"row": 186, "column": 2}, "end_point": {"row": 186, "column": 20}}, {"id": 1020, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 1018, "children": [1021], "start_point": {"row": 186, "column": 20}, "end_point": {"row": 186, "column": 37}}, {"id": 1021, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 1020, "children": [1022], "start_point": {"row": 186, "column": 21}, "end_point": {"row": 186, "column": 36}}, {"id": 1022, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 1021, "children": [1023], "start_point": {"row": 186, "column": 22}, "end_point": {"row": 186, "column": 36}}, {"id": 1023, "type": "field_expression", "text": "drone->mutex", "parent": 1022, "children": [1024, 1025], "start_point": {"row": 186, "column": 23}, "end_point": {"row": 186, "column": 35}}, {"id": 1024, "type": "identifier", "text": "drone", "parent": 1023, "children": [], "start_point": {"row": 186, "column": 23}, "end_point": {"row": 186, "column": 28}}, {"id": 1025, "type": "field_identifier", "text": "mutex", "parent": 1023, "children": [], "start_point": {"row": 186, "column": 30}, "end_point": {"row": 186, "column": 35}}, {"id": 1026, "type": "assignment_expression", "text": "drone->state = S_DEAD", "parent": 1006, "children": [1027, 1030, 1031], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 23}}, {"id": 1027, "type": "field_expression", "text": "drone->state", "parent": 1026, "children": [1028, 1029], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 14}}, {"id": 1028, "type": "identifier", "text": "drone", "parent": 1027, "children": [], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 7}}, {"id": 1029, "type": "field_identifier", "text": "state", "parent": 1027, "children": [], "start_point": {"row": 187, "column": 9}, "end_point": {"row": 187, "column": 14}}, {"id": 1030, "type": "=", "text": "=", "parent": 1026, "children": [], "start_point": {"row": 187, "column": 15}, "end_point": {"row": 187, "column": 16}}, {"id": 1031, "type": "identifier", "text": "S_DEAD", "parent": 1026, "children": [], "start_point": {"row": 187, "column": 17}, "end_point": {"row": 187, "column": 23}}, {"id": 1032, "type": "call_expression", "text": "pthread_mutex_unlock(&(drone->mutex))", "parent": 1006, "children": [1033, 1034], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 188, "column": 39}}, {"id": 1033, "type": "identifier", "text": "pthread_mutex_unlock", "parent": 1032, "children": [], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 188, "column": 22}}, {"id": 1034, "type": "argument_list", "text": "(&(drone->mutex))", "parent": 1032, "children": [1035], "start_point": {"row": 188, "column": 22}, "end_point": {"row": 188, "column": 39}}, {"id": 1035, "type": "pointer_expression", "text": "&(drone->mutex)", "parent": 1034, "children": [1036], "start_point": {"row": 188, "column": 23}, "end_point": {"row": 188, "column": 38}}, {"id": 1036, "type": "parenthesized_expression", "text": "(drone->mutex)", "parent": 1035, "children": [1037], "start_point": {"row": 188, "column": 24}, "end_point": {"row": 188, "column": 38}}, {"id": 1037, "type": "field_expression", "text": "drone->mutex", "parent": 1036, "children": [1038, 1039], "start_point": {"row": 188, "column": 25}, "end_point": {"row": 188, "column": 37}}, {"id": 1038, "type": "identifier", "text": "drone", "parent": 1037, "children": [], "start_point": {"row": 188, "column": 25}, "end_point": {"row": 188, "column": 30}}, {"id": 1039, "type": "field_identifier", "text": "mutex", "parent": 1037, "children": [], "start_point": {"row": 188, "column": 32}, "end_point": {"row": 188, "column": 37}}, {"id": 1040, "type": "declaration", "text": "MothershipMessage msg;", "parent": 1006, "children": [1041, 1042], "start_point": {"row": 190, "column": 2}, "end_point": {"row": 190, "column": 24}}, {"id": 1041, "type": "type_identifier", "text": "MothershipMessage", "parent": 1040, "children": [], "start_point": {"row": 190, "column": 2}, "end_point": {"row": 190, "column": 19}}, {"id": 1042, "type": "identifier", "text": "msg", "parent": 1040, "children": [], "start_point": {"row": 190, "column": 20}, "end_point": {"row": 190, "column": 23}}, {"id": 1043, "type": "assignment_expression", "text": "msg.sender_id = drone->id", "parent": 1006, "children": [1044, 1047, 1048], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 27}}, {"id": 1044, "type": "field_expression", "text": "msg.sender_id", "parent": 1043, "children": [1045, 1046], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 15}}, {"id": 1045, "type": "identifier", "text": "msg", "parent": 1044, "children": [], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 5}}, {"id": 1046, "type": "field_identifier", "text": "sender_id", "parent": 1044, "children": [], "start_point": {"row": 191, "column": 6}, "end_point": {"row": 191, "column": 15}}, {"id": 1047, "type": "=", "text": "=", "parent": 1043, "children": [], "start_point": {"row": 191, "column": 16}, "end_point": {"row": 191, "column": 17}}, {"id": 1048, "type": "field_expression", "text": "drone->id", "parent": 1043, "children": [1049, 1050], "start_point": {"row": 191, "column": 18}, "end_point": {"row": 191, "column": 27}}, {"id": 1049, "type": "identifier", "text": "drone", "parent": 1048, "children": [], "start_point": {"row": 191, "column": 18}, "end_point": {"row": 191, "column": 23}}, {"id": 1050, "type": "field_identifier", "text": "id", "parent": 1048, "children": [], "start_point": {"row": 191, "column": 25}, "end_point": {"row": 191, "column": 27}}, {"id": 1051, "type": "assignment_expression", "text": "msg.type = DRONE_DEAD", "parent": 1006, "children": [1052, 1055, 1056], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 23}}, {"id": 1052, "type": "field_expression", "text": "msg.type", "parent": 1051, "children": [1053, 1054], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 10}}, {"id": 1053, "type": "identifier", "text": "msg", "parent": 1052, "children": [], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 5}}, {"id": 1054, "type": "field_identifier", "text": "type", "parent": 1052, "children": [], "start_point": {"row": 192, "column": 6}, "end_point": {"row": 192, "column": 10}}, {"id": 1055, "type": "=", "text": "=", "parent": 1051, "children": [], "start_point": {"row": 192, "column": 11}, "end_point": {"row": 192, "column": 12}}, {"id": 1056, "type": "identifier", "text": "DRONE_DEAD", "parent": 1051, "children": [], "start_point": {"row": 192, "column": 13}, "end_point": {"row": 192, "column": 23}}, {"id": 1057, "type": "call_expression", "text": "mothership_sendMessage(drone->motherShip, &msg)", "parent": 1006, "children": [1058, 1059], "start_point": {"row": 194, "column": 2}, "end_point": {"row": 194, "column": 49}}, {"id": 1058, "type": "identifier", "text": "mothership_sendMessage", "parent": 1057, "children": [], "start_point": {"row": 194, "column": 2}, "end_point": {"row": 194, "column": 24}}, {"id": 1059, "type": "argument_list", "text": "(drone->motherShip, &msg)", "parent": 1057, "children": [1060, 1063], "start_point": {"row": 194, "column": 24}, "end_point": {"row": 194, "column": 49}}, {"id": 1060, "type": "field_expression", "text": "drone->motherShip", "parent": 1059, "children": [1061, 1062], "start_point": {"row": 194, "column": 25}, "end_point": {"row": 194, "column": 42}}, {"id": 1061, "type": "identifier", "text": "drone", "parent": 1060, "children": [], "start_point": {"row": 194, "column": 25}, "end_point": {"row": 194, "column": 30}}, {"id": 1062, "type": "field_identifier", "text": "motherShip", "parent": 1060, "children": [], "start_point": {"row": 194, "column": 32}, "end_point": {"row": 194, "column": 42}}, {"id": 1063, "type": "pointer_expression", "text": "&msg", "parent": 1059, "children": [1064], "start_point": {"row": 194, "column": 44}, "end_point": {"row": 194, "column": 48}}, {"id": 1064, "type": "identifier", "text": "msg", "parent": 1063, "children": [], "start_point": {"row": 194, "column": 45}, "end_point": {"row": 194, "column": 48}}, {"id": 1065, "type": "declaration", "text": "DashboardMessage dMsg;", "parent": 1006, "children": [1066, 1067], "start_point": {"row": 196, "column": 2}, "end_point": {"row": 196, "column": 24}}, {"id": 1066, "type": "type_identifier", "text": "DashboardMessage", "parent": 1065, "children": [], "start_point": {"row": 196, "column": 2}, "end_point": {"row": 196, "column": 18}}, {"id": 1067, "type": "identifier", "text": "dMsg", "parent": 1065, "children": [], "start_point": {"row": 196, "column": 19}, "end_point": {"row": 196, "column": 23}}, {"id": 1068, "type": "assignment_expression", "text": "dMsg.type = D_DRONE", "parent": 1006, "children": [1069, 1072, 1073], "start_point": {"row": 197, "column": 2}, "end_point": {"row": 197, "column": 21}}, {"id": 1069, "type": "field_expression", "text": "dMsg.type", "parent": 1068, "children": [1070, 1071], "start_point": {"row": 197, "column": 2}, "end_point": {"row": 197, "column": 11}}, {"id": 1070, "type": "identifier", "text": "dMsg", "parent": 1069, "children": [], "start_point": {"row": 197, "column": 2}, "end_point": {"row": 197, "column": 6}}, {"id": 1071, "type": "field_identifier", "text": "type", "parent": 1069, "children": [], "start_point": {"row": 197, "column": 7}, "end_point": {"row": 197, "column": 11}}, {"id": 1072, "type": "=", "text": "=", "parent": 1068, "children": [], "start_point": {"row": 197, "column": 12}, "end_point": {"row": 197, "column": 13}}, {"id": 1073, "type": "identifier", "text": "D_DRONE", "parent": 1068, "children": [], "start_point": {"row": 197, "column": 14}, "end_point": {"row": 197, "column": 21}}, {"id": 1074, "type": "assignment_expression", "text": "dMsg.state = D_DRONE_DEAD", "parent": 1006, "children": [1075, 1078, 1079], "start_point": {"row": 198, "column": 2}, "end_point": {"row": 198, "column": 27}}, {"id": 1075, "type": "field_expression", "text": "dMsg.state", "parent": 1074, "children": [1076, 1077], "start_point": {"row": 198, "column": 2}, "end_point": {"row": 198, "column": 12}}, {"id": 1076, "type": "identifier", "text": "dMsg", "parent": 1075, "children": [], "start_point": {"row": 198, "column": 2}, "end_point": {"row": 198, "column": 6}}, {"id": 1077, "type": "field_identifier", "text": "state", "parent": 1075, "children": [], "start_point": {"row": 198, "column": 7}, "end_point": {"row": 198, "column": 12}}, {"id": 1078, "type": "=", "text": "=", "parent": 1074, "children": [], "start_point": {"row": 198, "column": 13}, "end_point": {"row": 198, "column": 14}}, {"id": 1079, "type": "identifier", "text": "D_DRONE_DEAD", "parent": 1074, "children": [], "start_point": {"row": 198, "column": 15}, "end_point": {"row": 198, "column": 27}}, {"id": 1080, "type": "assignment_expression", "text": "dMsg.number = drone->id", "parent": 1006, "children": [1081, 1084, 1085], "start_point": {"row": 199, "column": 2}, "end_point": {"row": 199, "column": 25}}, {"id": 1081, "type": "field_expression", "text": "dMsg.number", "parent": 1080, "children": [1082, 1083], "start_point": {"row": 199, "column": 2}, "end_point": {"row": 199, "column": 13}}, {"id": 1082, "type": "identifier", "text": "dMsg", "parent": 1081, "children": [], "start_point": {"row": 199, "column": 2}, "end_point": {"row": 199, "column": 6}}, {"id": 1083, "type": "field_identifier", "text": "number", "parent": 1081, "children": [], "start_point": {"row": 199, "column": 7}, "end_point": {"row": 199, "column": 13}}, {"id": 1084, "type": "=", "text": "=", "parent": 1080, "children": [], "start_point": {"row": 199, "column": 14}, "end_point": {"row": 199, "column": 15}}, {"id": 1085, "type": "field_expression", "text": "drone->id", "parent": 1080, "children": [1086, 1087], "start_point": {"row": 199, "column": 16}, "end_point": {"row": 199, "column": 25}}, {"id": 1086, "type": "identifier", "text": "drone", "parent": 1085, "children": [], "start_point": {"row": 199, "column": 16}, "end_point": {"row": 199, "column": 21}}, {"id": 1087, "type": "field_identifier", "text": "id", "parent": 1085, "children": [], "start_point": {"row": 199, "column": 23}, "end_point": {"row": 199, "column": 25}}, {"id": 1088, "type": "call_expression", "text": "dashboard_sendMessage(global_dashboard, &dMsg)", "parent": 1006, "children": [1089, 1090], "start_point": {"row": 201, "column": 2}, "end_point": {"row": 201, "column": 48}}, {"id": 1089, "type": "identifier", "text": "dashboard_sendMessage", "parent": 1088, "children": [], "start_point": {"row": 201, "column": 2}, "end_point": {"row": 201, "column": 23}}, {"id": 1090, "type": "argument_list", "text": "(global_dashboard, &dMsg)", "parent": 1088, "children": [1091, 1092], "start_point": {"row": 201, "column": 23}, "end_point": {"row": 201, "column": 48}}, {"id": 1091, "type": "identifier", "text": "global_dashboard", "parent": 1090, "children": [], "start_point": {"row": 201, "column": 24}, "end_point": {"row": 201, "column": 40}}, {"id": 1092, "type": "pointer_expression", "text": "&dMsg", "parent": 1090, "children": [1093], "start_point": {"row": 201, "column": 42}, "end_point": {"row": 201, "column": 47}}, {"id": 1093, "type": "identifier", "text": "dMsg", "parent": 1092, "children": [], "start_point": {"row": 201, "column": 43}, "end_point": {"row": 201, "column": 47}}, {"id": 1094, "type": "if_statement", "text": "if (drone->package != NULL) {\n\t\t\tdMsg.type = D_PACKAGE;\n\t\t\tdMsg.state = D_PACKAGE_FAIL;\n\t\t\tdMsg.number = drone->package->id;\n\t\t\tdashboard_sendMessage(global_dashboard, &dMsg);\n\t\t}", "parent": 1006, "children": [1095], "start_point": {"row": 202, "column": 2}, "end_point": {"row": 207, "column": 3}}, {"id": 1095, "type": "parenthesized_expression", "text": "(drone->package != NULL)", "parent": 1094, "children": [1096], "start_point": {"row": 202, "column": 5}, "end_point": {"row": 202, "column": 29}}, {"id": 1096, "type": "binary_expression", "text": "drone->package != NULL", "parent": 1095, "children": [1097, 1099, 1100], "start_point": {"row": 202, "column": 6}, "end_point": {"row": 202, "column": 28}}, {"id": 1097, "type": "field_expression", "text": "drone->package", "parent": 1096, "children": [1098], "start_point": {"row": 202, "column": 6}, "end_point": {"row": 202, "column": 20}}, {"id": 1098, "type": "identifier", "text": "drone", "parent": 1097, "children": [], "start_point": {"row": 202, "column": 6}, "end_point": {"row": 202, "column": 11}}, {"id": 1099, "type": "!=", "text": "!=", "parent": 1096, "children": [], "start_point": {"row": 202, "column": 21}, "end_point": {"row": 202, "column": 23}}, {"id": 1100, "type": "null", "text": "NULL", "parent": 1096, "children": [1101], "start_point": {"row": 202, "column": 24}, "end_point": {"row": 202, "column": 28}}, {"id": 1101, "type": "NULL", "text": "NULL", "parent": 1100, "children": [], "start_point": {"row": 202, "column": 24}, "end_point": {"row": 202, "column": 28}}, {"id": 1102, "type": "assignment_expression", "text": "dMsg.type = D_PACKAGE", "parent": 1094, "children": [1103, 1106, 1107], "start_point": {"row": 203, "column": 3}, "end_point": {"row": 203, "column": 24}}, {"id": 1103, "type": "field_expression", "text": "dMsg.type", "parent": 1102, "children": [1104, 1105], "start_point": {"row": 203, "column": 3}, "end_point": {"row": 203, "column": 12}}, {"id": 1104, "type": "identifier", "text": "dMsg", "parent": 1103, "children": [], "start_point": {"row": 203, "column": 3}, "end_point": {"row": 203, "column": 7}}, {"id": 1105, "type": "field_identifier", "text": "type", "parent": 1103, "children": [], "start_point": {"row": 203, "column": 8}, "end_point": {"row": 203, "column": 12}}, {"id": 1106, "type": "=", "text": "=", "parent": 1102, "children": [], "start_point": {"row": 203, "column": 13}, "end_point": {"row": 203, "column": 14}}, {"id": 1107, "type": "identifier", "text": "D_PACKAGE", "parent": 1102, "children": [], "start_point": {"row": 203, "column": 15}, "end_point": {"row": 203, "column": 24}}, {"id": 1108, "type": "assignment_expression", "text": "dMsg.state = D_PACKAGE_FAIL", "parent": 1094, "children": [1109, 1112, 1113], "start_point": {"row": 204, "column": 3}, "end_point": {"row": 204, "column": 30}}, {"id": 1109, "type": "field_expression", "text": "dMsg.state", "parent": 1108, "children": [1110, 1111], "start_point": {"row": 204, "column": 3}, "end_point": {"row": 204, "column": 13}}, {"id": 1110, "type": "identifier", "text": "dMsg", "parent": 1109, "children": [], "start_point": {"row": 204, "column": 3}, "end_point": {"row": 204, "column": 7}}, {"id": 1111, "type": "field_identifier", "text": "state", "parent": 1109, "children": [], "start_point": {"row": 204, "column": 8}, "end_point": {"row": 204, "column": 13}}, {"id": 1112, "type": "=", "text": "=", "parent": 1108, "children": [], "start_point": {"row": 204, "column": 14}, "end_point": {"row": 204, "column": 15}}, {"id": 1113, "type": "identifier", "text": "D_PACKAGE_FAIL", "parent": 1108, "children": [], "start_point": {"row": 204, "column": 16}, "end_point": {"row": 204, "column": 30}}, {"id": 1114, "type": "assignment_expression", "text": "dMsg.number = drone->package->id", "parent": 1094, "children": [1115, 1118, 1119], "start_point": {"row": 205, "column": 3}, "end_point": {"row": 205, "column": 35}}, {"id": 1115, "type": "field_expression", "text": "dMsg.number", "parent": 1114, "children": [1116, 1117], "start_point": {"row": 205, "column": 3}, "end_point": {"row": 205, "column": 14}}, {"id": 1116, "type": "identifier", "text": "dMsg", "parent": 1115, "children": [], "start_point": {"row": 205, "column": 3}, "end_point": {"row": 205, "column": 7}}, {"id": 1117, "type": "field_identifier", "text": "number", "parent": 1115, "children": [], "start_point": {"row": 205, "column": 8}, "end_point": {"row": 205, "column": 14}}, {"id": 1118, "type": "=", "text": "=", "parent": 1114, "children": [], "start_point": {"row": 205, "column": 15}, "end_point": {"row": 205, "column": 16}}, {"id": 1119, "type": "field_expression", "text": "drone->package->id", "parent": 1114, "children": [1120, 1122], "start_point": {"row": 205, "column": 17}, "end_point": {"row": 205, "column": 35}}, {"id": 1120, "type": "field_expression", "text": "drone->package", "parent": 1119, "children": [1121], "start_point": {"row": 205, "column": 17}, "end_point": {"row": 205, "column": 31}}, {"id": 1121, "type": "identifier", "text": "drone", "parent": 1120, "children": [], "start_point": {"row": 205, "column": 17}, "end_point": {"row": 205, "column": 22}}, {"id": 1122, "type": "field_identifier", "text": "id", "parent": 1119, "children": [], "start_point": {"row": 205, "column": 33}, "end_point": {"row": 205, "column": 35}}, {"id": 1123, "type": "call_expression", "text": "dashboard_sendMessage(global_dashboard, &dMsg)", "parent": 1094, "children": [1124, 1125], "start_point": {"row": 206, "column": 3}, "end_point": {"row": 206, "column": 49}}, {"id": 1124, "type": "identifier", "text": "dashboard_sendMessage", "parent": 1123, "children": [], "start_point": {"row": 206, "column": 3}, "end_point": {"row": 206, "column": 24}}, {"id": 1125, "type": "argument_list", "text": "(global_dashboard, &dMsg)", "parent": 1123, "children": [1126, 1127], "start_point": {"row": 206, "column": 24}, "end_point": {"row": 206, "column": 49}}, {"id": 1126, "type": "identifier", "text": "global_dashboard", "parent": 1125, "children": [], "start_point": {"row": 206, "column": 25}, "end_point": {"row": 206, "column": 41}}, {"id": 1127, "type": "pointer_expression", "text": "&dMsg", "parent": 1125, "children": [1128], "start_point": {"row": 206, "column": 43}, "end_point": {"row": 206, "column": 48}}, {"id": 1128, "type": "identifier", "text": "dMsg", "parent": 1127, "children": [], "start_point": {"row": 206, "column": 44}, "end_point": {"row": 206, "column": 48}}, {"id": 1129, "type": "call_expression", "text": "pthread_exit(0)", "parent": 1006, "children": [1130, 1131], "start_point": {"row": 209, "column": 2}, "end_point": {"row": 209, "column": 17}}, {"id": 1130, "type": "identifier", "text": "pthread_exit", "parent": 1129, "children": [], "start_point": {"row": 209, "column": 2}, "end_point": {"row": 209, "column": 14}}, {"id": 1131, "type": "argument_list", "text": "(0)", "parent": 1129, "children": [1132], "start_point": {"row": 209, "column": 14}, "end_point": {"row": 209, "column": 17}}, {"id": 1132, "type": "number_literal", "text": "0", "parent": 1131, "children": [], "start_point": {"row": 209, "column": 15}, "end_point": {"row": 209, "column": 16}}]}, "node_categories": {"declarations": {"functions": [35, 50, 62, 70, 74, 268, 270, 304, 308, 408, 410, 443, 447, 468, 470, 957, 961, 996, 998], "variables": [33, 38, 43, 48, 53, 58, 65, 77, 82, 87, 92, 97, 102, 194, 207, 273, 311, 316, 345, 413, 418, 450, 454, 473, 478, 483, 623, 680, 712, 749, 964, 969, 1001, 1040, 1065], "classes": [208, 209], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31], "modules": [], "enums": []}, "statements": {"expressions": [109, 114, 117, 118, 121, 127, 133, 138, 144, 150, 156, 163, 169, 175, 180, 183, 186, 187, 188, 199, 204, 213, 219, 225, 231, 235, 236, 238, 241, 243, 247, 251, 255, 258, 261, 278, 281, 284, 285, 286, 290, 293, 296, 300, 320, 326, 330, 334, 339, 343, 348, 351, 354, 357, 360, 365, 367, 368, 373, 374, 378, 380, 383, 386, 389, 392, 397, 399, 400, 404, 423, 426, 429, 432, 438, 439, 458, 459, 462, 487, 493, 497, 502, 503, 510, 515, 519, 521, 524, 525, 526, 530, 535, 538, 539, 540, 543, 547, 556, 561, 565, 567, 571, 574, 577, 580, 583, 584, 585, 589, 593, 596, 599, 600, 601, 604, 608, 612, 617, 621, 627, 631, 635, 640, 643, 646, 654, 659, 663, 665, 669, 672, 675, 676, 677, 687, 690, 693, 696, 697, 698, 701, 705, 708, 716, 721, 724, 725, 726, 729, 732, 735, 737, 740, 741, 742, 745, 753, 757, 760, 763, 764, 765, 768, 771, 772, 773, 774, 779, 780, 781, 786, 792, 798, 804, 811, 817, 823, 829, 830, 831, 832, 838, 845, 850, 853, 854, 855, 856, 860, 863, 864, 865, 868, 872, 874, 877, 880, 882, 885, 888, 890, 894, 897, 901, 904, 905, 906, 910, 915, 918, 919, 920, 924, 929, 933, 936, 941, 944, 947, 976, 977, 978, 986, 991, 1007, 1008, 1009, 1010, 1011, 1018, 1021, 1022, 1023, 1027, 1032, 1035, 1036, 1037, 1044, 1048, 1052, 1057, 1060, 1063, 1069, 1075, 1081, 1085, 1088, 1092, 1095, 1096, 1097, 1103, 1109, 1115, 1119, 1120, 1123, 1127, 1129], "assignments": [120, 126, 132, 137, 143, 149, 155, 162, 168, 174, 212, 218, 224, 230, 242, 319, 325, 333, 486, 492, 509, 529, 555, 588, 611, 626, 634, 653, 715, 752, 785, 791, 797, 803, 810, 816, 822, 837, 844, 909, 923, 935, 1026, 1043, 1051, 1068, 1074, 1080, 1102, 1108, 1114], "loops": [372], "conditionals": [36, 39, 42, 44, 47, 51, 54, 57, 59, 63, 66, 69, 71, 75, 78, 81, 83, 86, 88, 91, 93, 96, 98, 101, 103, 107, 111, 115, 119, 122, 123, 125, 128, 129, 131, 134, 135, 139, 140, 142, 145, 146, 148, 151, 152, 154, 157, 158, 164, 170, 171, 176, 177, 179, 181, 184, 189, 190, 197, 200, 202, 205, 206, 210, 211, 214, 215, 220, 221, 226, 227, 232, 233, 237, 239, 244, 245, 248, 250, 252, 253, 256, 259, 262, 264, 267, 271, 274, 277, 279, 282, 287, 288, 291, 294, 297, 298, 301, 303, 309, 312, 315, 317, 318, 321, 322, 324, 327, 328, 331, 332, 335, 336, 338, 340, 342, 344, 346, 347, 349, 355, 358, 359, 366, 369, 375, 377, 379, 381, 387, 390, 391, 398, 401, 405, 411, 414, 417, 419, 422, 424, 427, 430, 431, 437, 440, 444, 448, 451, 456, 460, 464, 467, 471, 474, 477, 479, 482, 484, 485, 488, 489, 491, 494, 495, 498, 499, 500, 501, 504, 505, 506, 507, 508, 511, 512, 514, 516, 518, 520, 522, 527, 528, 531, 532, 534, 536, 541, 542, 544, 548, 549, 552, 553, 554, 557, 558, 560, 562, 564, 566, 568, 572, 573, 575, 578, 579, 581, 586, 587, 590, 591, 594, 595, 597, 602, 603, 605, 609, 610, 613, 614, 616, 618, 620, 622, 624, 625, 628, 629, 632, 633, 636, 637, 639, 641, 644, 645, 647, 650, 651, 652, 655, 656, 658, 660, 662, 664, 666, 670, 671, 673, 678, 679, 681, 685, 688, 691, 694, 699, 700, 702, 704, 706, 709, 711, 713, 714, 717, 718, 720, 722, 727, 728, 730, 733, 734, 736, 738, 743, 744, 746, 750, 751, 754, 755, 758, 759, 761, 766, 767, 769, 775, 776, 777, 778, 782, 783, 784, 787, 788, 790, 793, 794, 796, 799, 800, 802, 805, 806, 812, 813, 815, 818, 819, 821, 824, 825, 828, 833, 834, 839, 840, 842, 846, 847, 849, 851, 857, 858, 859, 861, 866, 867, 869, 871, 873, 875, 878, 879, 881, 883, 886, 887, 889, 891, 893, 895, 898, 900, 902, 907, 908, 911, 912, 914, 916, 921, 922, 925, 926, 928, 930, 932, 934, 937, 938, 940, 942, 945, 946, 948, 951, 958, 962, 965, 968, 970, 974, 979, 980, 981, 985, 987, 992, 999, 1002, 1005, 1006, 1012, 1019, 1024, 1025, 1028, 1029, 1031, 1033, 1038, 1039, 1041, 1042, 1045, 1046, 1049, 1050, 1053, 1054, 1056, 1058, 1061, 1062, 1064, 1066, 1067, 1070, 1071, 1073, 1076, 1077, 1079, 1082, 1083, 1086, 1087, 1089, 1091, 1093, 1094, 1098, 1104, 1105, 1107, 1110, 1111, 1113, 1116, 1117, 1121, 1122, 1124, 1126, 1128, 1130], "returns": [266, 457, 550, 955, 984], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 193, 198, 203, 217, 223, 229, 254, 257, 265, 289, 299, 370, 371, 402, 403, 407, 441, 442, 546, 570, 607, 668, 692, 748, 836, 983, 989, 994, 995, 1015, 1017, 1132], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "process_message(Drone* drone, DroneMessage* message)"}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "drone_failure(Drone* drone)"}, {"node_id": 62, "universal_type": "function", "name": "unknown", "text_snippet": "compute_sleep_time(Drone* drone)"}, {"node_id": 70, "universal_type": "function", "name": "id,", "text_snippet": "Drone* drone_constructor(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n "}, {"node_id": 74, "universal_type": "function", "name": "id,", "text_snippet": "drone_constructor(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n "}, {"node_id": 268, "universal_type": "function", "name": "drone_free", "text_snippet": "void drone_free(Drone* drone) {\n\tcheck(pthread_mutex_destroy(&(drone->mutex)),\"Drone: pthread_mutex_"}, {"node_id": 270, "universal_type": "function", "name": "unknown", "text_snippet": "drone_free(Drone* drone)"}, {"node_id": 304, "universal_type": "function", "name": "unknown", "text_snippet": "void* drone_launch(Drone* drone) {\n\tDashboardMessage dashboardMessage;\n\tdashboardMessage.type = D_DR"}, {"node_id": 308, "universal_type": "function", "name": "unknown", "text_snippet": "drone_launch(Drone* drone)"}, {"node_id": 408, "universal_type": "function", "name": "drone_sendMessage", "text_snippet": "void drone_sendMessage(Drone* drone, DroneMessage* message) {\n\tcheck(mq_send(drone->msgQueueID, (con"}, {"node_id": 410, "universal_type": "function", "name": "unknown", "text_snippet": "drone_sendMessage(Drone* drone, DroneMessage* message)"}, {"node_id": 443, "universal_type": "function", "name": "computePowerConsumption", "text_snippet": "unsigned int computePowerConsumption(Package* package, double mothershipToClientDistance) {\n\treturn "}, {"node_id": 447, "universal_type": "function", "name": "unknown", "text_snippet": "computePowerConsumption(Package* package, double mothershipToClientDistance)"}, {"node_id": 468, "universal_type": "function", "name": "process_message", "text_snippet": "bool process_message(Drone* drone, DroneMessage* message) {\n\tDashboardMessage dashboardMessage;\n\tdas"}, {"node_id": 470, "universal_type": "function", "name": "unknown", "text_snippet": "process_message(Drone* drone, DroneMessage* message)"}, {"node_id": 957, "universal_type": "function", "name": "compute_sleep_time", "text_snippet": "unsigned int compute_sleep_time(Drone* drone) {\n\tunsigned int distance = drone->client->distance - 1"}, {"node_id": 961, "universal_type": "function", "name": "unknown", "text_snippet": "compute_sleep_time(Drone* drone)"}, {"node_id": 996, "universal_type": "function", "name": "drone_failure", "text_snippet": "void drone_failure(Drone* drone) {\n\tif ((rand() % 30) == 0) {\n\t\tpthread_mutex_lock(&(drone->mutex));"}, {"node_id": 998, "universal_type": "function", "name": "unknown", "text_snippet": "drone_failure(Drone* drone)"}], "class_declarations": [{"node_id": 208, "universal_type": "class", "name": "mq_attr", "text_snippet": "struct mq_attr"}, {"node_id": 209, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"drone.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 <stdio.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <unistd.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"util.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"client.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"dashboard.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"client_message.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"drone_message.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"mothership.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"mothership_message.h\"\n"}, {"node_id": 31, "text": "#include"}]}, "original_source_code": "#include \"drone.h\"\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <unistd.h>\n\n#include \"util.h\"\n#include \"client.h\"\n#include \"dashboard.h\"\n#include \"client_message.h\"\n#include \"drone_message.h\"\n#include \"mothership.h\"\n#include \"mothership_message.h\"\n\nstatic bool process_message(Drone* drone, DroneMessage* message);\nstatic void drone_failure(Drone* drone);\nstatic unsigned int compute_sleep_time(Drone* drone);\n\nDrone* drone_constructor(unsigned int id, unsigned int maxLoad, unsigned int autonomy,\n unsigned int rechargingTime, Mothership* motherShip) {\n\tDrone* drone = (Drone*) malloc(sizeof(Drone));\n\tdrone->id = id;\n\tdrone->maxLoad = maxLoad;\n\tdrone->maxAutonomy = drone->autonomy = autonomy;\n\tdrone->rechargingTime = rechargingTime;\n\tdrone->motherShip = motherShip;\n\tdrone->client = NULL;\n\tdrone->package = NULL;\n\tdrone->deliverySuccess = false;\n\tdrone->state = S_ALIVE;\n\n\tcheck(pthread_mutex_init(&(drone->mutex), NULL),\"Drone: pthread_mutex_init failed\");\n\n\tchar buffer[10];\n\tsprintf(buffer, \"/drone%03d\", drone->id);\n\tstruct mq_attr attr;\n\tattr.mq_curmsgs = 0;\n\tattr.mq_maxmsg = 10;\n\tattr.mq_flags = 0;\n\tattr.mq_msgsize = sizeof(DroneMessage);\n\tcheck((drone->msgQueueID = mq_open(buffer, O_RDWR | O_CREAT, 0660, &attr)), \"Drone: mq_open failed\");\n\tcheck(mq_unlink(buffer), \"Drone: mq_unlink failed\");\n\n\treturn drone;\n}\n\nvoid drone_free(Drone* drone) {\n\tcheck(pthread_mutex_destroy(&(drone->mutex)),\"Drone: pthread_mutex_destroy failed\");\n\tcheck(mq_close(drone->msgQueueID),\"Drone: mq_close failed\");\n\tfree(drone);\n}\n\nvoid* drone_launch(Drone* drone) {\n\tDashboardMessage dashboardMessage;\n\tdashboardMessage.type = D_DRONE;\n\tdashboardMessage.number = drone->id;\n\tdashboardMessage.state = D_DRONE_WAITING;\n\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\tDroneMessage droneMessage;\n\tcheck((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), \"mq_receive failed\");\n\twhile(process_message(drone, &droneMessage)) {\n\t\tcheck((int) mq_receive(drone->msgQueueID, (char*) &droneMessage, sizeof(DroneMessage), 0), \"mq_receive failed\");\n\t}\n\tpthread_exit(0);\n}\n\nvoid drone_sendMessage(Drone* drone, DroneMessage* message) {\n\tcheck(mq_send(drone->msgQueueID, (const char*) message, sizeof(DroneMessage), 0), \"mq_send failed\");\n}\n\nunsigned int computePowerConsumption(Package* package, double mothershipToClientDistance) {\n\treturn package->weight + (unsigned int) mothershipToClientDistance;\n}\n\nbool process_message(Drone* drone, DroneMessage* message) {\n\tDashboardMessage dashboardMessage;\n\tdashboardMessage.type = D_DRONE;\n\tdashboardMessage.number = drone->id;\n\n\tswitch(message->type) {\n\t\tcase MOTHERSHIP_END_OF_DELIVERY: {\n\t\t\tdashboardMessage.state = D_DRONE_FINISHED;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->state = S_DEAD;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\t\t\tLOG_INFO(\"[Drone %03d] poweroff\", drone->id);\n\t\t\treturn false;\n\t\t}\n\t\tcase MOTHERSHIP_GO_RECHARGE: {\n\t\t\tdashboardMessage.state = D_DRONE_CHARGING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tLOG_INFO(\"[Drone %03d] Recharging battery\", drone->id);\n\t\t\tsleep(drone->rechargingTime);\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->autonomy = drone->maxAutonomy;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tLOG_INFO(\"[Drone %03d] Battery charged\", drone->id);\n\n\t\t\tdashboardMessage.state = D_DRONE_WAITING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tMothershipMessage mothershipMessage;\n\t\t\tmothershipMessage.sender_id = drone->id;\n\t\t\tmothershipMessage.type = DRONE_DONE_CHARGING;\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tbreak;\n\t\t}\n\t\tcase MOTHERSHIP_GO_DELIVER_PACKAGE: {\n\t\t\tdashboardMessage.state = D_DRONE_FLYING_MTC;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tLOG_INFO(\"[Drone %03d] Package\", drone->id);\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tunsigned int consumption = computePowerConsumption(drone->package, 5);\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdrone_failure(drone);\n\n\t\t\tsleep(compute_sleep_time(drone));\n\t\t\tClientMessage clientMessage;\n\t\t\tclientMessage.type = DRONE_PUT_TARGET;\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tclient_sendMessage(drone->client, &clientMessage);\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\t\t\tsleep(1); // Wait the client before considering him as absent.\n\n\t\t\tMothershipMessage mothershipMessage;\n\t\t\tmothershipMessage.sender_id = drone->id;\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tpthread_mutex_lock(&(drone->client->targetMutex));\n\t\t\tif(drone->client->targetInstalled) {\n\t\t\t\tdashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_SUCCESS;\n\t\t\t\tmothershipMessage.type = DRONE_PACKAGE_DELIVERED_SUCCESS;\n\t\t\t\tclientMessage.type = DRONE_DELIVERY_SUCCESS;\n\t\t\t\tdrone->deliverySuccess = true;\n\t\t\t} else {\n\t\t\t\tdashboardMessage.state = D_DRONE_FLYING_CTM_DELIVERY_FAIL;\n\t\t\t\tmothershipMessage.type = DRONE_PACKAGE_DELIVERED_FAIL;\n\t\t\t\tdrone->deliverySuccess = false;\n\t\t\t\tif(drone->package->numberOfTryRemaining > 1){\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FAILURE;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tclientMessage.type = DRONE_DELIVERY_FINAL_FAILURE;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpthread_mutex_unlock(&(drone->client->targetMutex));\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tclient_sendMessage(drone->client, &clientMessage);\n\n\t\t\tdrone_failure(drone);\n\t\t\tsleep(compute_sleep_time(drone));\n\t\t\tpthread_mutex_lock(&(drone->mutex));\n\t\t\tdrone->autonomy -= consumption;\n\t\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\t\tdashboardMessage.state = D_DRONE_WAITING;\n\t\t\tdashboard_sendMessage(global_dashboard, &dashboardMessage);\n\n\t\t\tmothershipMessage.type = DRONE_BACK_TO_MOTHERSHIP;\n\t\t\tmothership_sendMessage(drone->motherShip, &mothershipMessage);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\treturn true;\n}\n\nunsigned int compute_sleep_time(Drone* drone) {\n\tunsigned int distance = drone->client->distance - 1;\n\t// minus 1 to send the target message 1s before arriving\n\n\treturn distance > 1 ? distance / 4 : 1;\n}\n\nvoid drone_failure(Drone* drone) {\n\tif ((rand() % 30) == 0) {\n\t\tpthread_mutex_lock(&(drone->mutex));\n\t\tdrone->state = S_DEAD;\n\t\tpthread_mutex_unlock(&(drone->mutex));\n\n\t\tMothershipMessage msg;\n\t\tmsg.sender_id = drone->id;\n\t\tmsg.type = DRONE_DEAD;\n\n\t\tmothership_sendMessage(drone->motherShip, &msg);\n\n\t\tDashboardMessage dMsg;\n\t\tdMsg.type = D_DRONE;\n\t\tdMsg.state = D_DRONE_DEAD;\n\t\tdMsg.number = drone->id;\n\n\t\tdashboard_sendMessage(global_dashboard, &dMsg);\n\t\tif (drone->package != NULL) {\n\t\t\tdMsg.type = D_PACKAGE;\n\t\t\tdMsg.state = D_PACKAGE_FAIL;\n\t\t\tdMsg.number = drone->package->id;\n\t\t\tdashboard_sendMessage(global_dashboard, &dMsg);\n\t\t}\n\n\t\tpthread_exit(0);\n\t}\n}\n"}
358
c
/* The MIT License Copyright (c) 2008 <NAME> <<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. */ #ifndef GOM_NOODLE_H #define GOM_NOODLE_H #include <glib/gmacros.h> G_BEGIN_DECLS typedef struct _GomNoodle GomNoodle; typedef struct _GomNoodleClass GomNoodleClass; G_END_DECLS #include "gom/gomevttgt.h" G_BEGIN_DECLS #define GOM_TYPE_NOODLE (gom_noodle_get_type ()) #define GOM_NOODLE(i) (G_TYPE_CHECK_INSTANCE_CAST ((i), GOM_TYPE_NOODLE, GomNoodle)) #define GOM_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOM_TYPE_NOODLE, GomNoodleClass)) #define GOM_IS_NOODLE(i) (G_TYPE_CHECK_INSTANCE_TYPE ((i), GOM_TYPE_NOODLE)) #define GOM_IS_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOM_TYPE_NOODLE)) #define GOM_NOODLE_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS ((i), GOM_TYPE_NOODLE, GomNoodleClass)) struct _GomNoodle { GomEvtTgt parent; }; struct _GomNoodleClass { GomEvtTgtClass parent_class; }; GType gom_noodle_get_type (void); G_END_DECLS #endif /* GOM_NOODLE_H */
45.53
43
(translation_unit) "/*\nThe MIT License\n\nCopyright (c) 2008 <NAME> <<EMAIL>>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n#ifndef GOM_NOODLE_H\n#define GOM_NOODLE_H\n\n#include <glib/gmacros.h>\n\nG_BEGIN_DECLS\n\ntypedef struct _GomNoodle GomNoodle;\ntypedef struct _GomNoodleClass GomNoodleClass;\n\nG_END_DECLS\n\n#include "gom/gomevttgt.h"\n\nG_BEGIN_DECLS\n\n#define GOM_TYPE_NOODLE (gom_noodle_get_type ())\n#define GOM_NOODLE(i) (G_TYPE_CHECK_INSTANCE_CAST ((i), GOM_TYPE_NOODLE, GomNoodle))\n#define GOM_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOM_TYPE_NOODLE, GomNoodleClass))\n#define GOM_IS_NOODLE(i) (G_TYPE_CHECK_INSTANCE_TYPE ((i), GOM_TYPE_NOODLE))\n#define GOM_IS_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOM_TYPE_NOODLE))\n#define GOM_NOODLE_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS ((i), GOM_TYPE_NOODLE, GomNoodleClass))\n\nstruct _GomNoodle {\n GomEvtTgt parent;\n};\n\nstruct _GomNoodleClass {\n GomEvtTgtClass parent_class;\n};\n\nGType gom_noodle_get_type (void);\n\nG_END_DECLS\n\n#endif /* GOM_NOODLE_H */\n\n" (comment) "/*\nThe MIT License\n\nCopyright (c) 2008 <NAME> <<EMAIL>>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/" (preproc_ifdef) "#ifndef GOM_NOODLE_H\n#define GOM_NOODLE_H\n\n#include <glib/gmacros.h>\n\nG_BEGIN_DECLS\n\ntypedef struct _GomNoodle GomNoodle;\ntypedef struct _GomNoodleClass GomNoodleClass;\n\nG_END_DECLS\n\n#include "gom/gomevttgt.h"\n\nG_BEGIN_DECLS\n\n#define GOM_TYPE_NOODLE (gom_noodle_get_type ())\n#define GOM_NOODLE(i) (G_TYPE_CHECK_INSTANCE_CAST ((i), GOM_TYPE_NOODLE, GomNoodle))\n#define GOM_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOM_TYPE_NOODLE, GomNoodleClass))\n#define GOM_IS_NOODLE(i) (G_TYPE_CHECK_INSTANCE_TYPE ((i), GOM_TYPE_NOODLE))\n#define GOM_IS_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOM_TYPE_NOODLE))\n#define GOM_NOODLE_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS ((i), GOM_TYPE_NOODLE, GomNoodleClass))\n\nstruct _GomNoodle {\n GomEvtTgt parent;\n};\n\nstruct _GomNoodleClass {\n GomEvtTgtClass parent_class;\n};\n\nGType gom_noodle_get_type (void);\n\nG_END_DECLS\n\n#endif" (#ifndef) "#ifndef" (identifier) "GOM_NOODLE_H" (preproc_def) "#define GOM_NOODLE_H\n" (#define) "#define" (identifier) "GOM_NOODLE_H" (preproc_include) "#include <glib/gmacros.h>\n" (#include) "#include" (system_lib_string) "<glib/gmacros.h>" (declaration) "G_BEGIN_DECLS\n\ntypedef" (type_identifier) "G_BEGIN_DECLS" (identifier) "typedef" (;) "" (declaration) "struct _GomNoodle GomNoodle;" (struct_specifier) "struct _GomNoodle" (struct) "struct" (type_identifier) "_GomNoodle" (identifier) "GomNoodle" (;) ";" (type_definition) "typedef struct _GomNoodleClass GomNoodleClass;" (typedef) "typedef" (struct_specifier) "struct _GomNoodleClass" (struct) "struct" (type_identifier) "_GomNoodleClass" (type_identifier) "GomNoodleClass" (;) ";" (expression_statement) "G_END_DECLS\n\n#include "gom/gomevttgt.h"\n\nG_BEGIN_DECLS" (concatenated_string) "G_END_DECLS\n\n#include "gom/gomevttgt.h"\n\nG_BEGIN_DECLS" (identifier) "G_END_DECLS" (ERROR) "#include" (#include) "#include" (string_literal) ""gom/gomevttgt.h"" (") """ (string_content) "gom/gomevttgt.h" (") """ (identifier) "G_BEGIN_DECLS" (;) "" (preproc_def) "#define GOM_TYPE_NOODLE (gom_noodle_get_type ())\n" (#define) "#define" (identifier) "GOM_TYPE_NOODLE" (preproc_arg) "(gom_noodle_get_type ())" (preproc_function_def) "#define GOM_NOODLE(i) (G_TYPE_CHECK_INSTANCE_CAST ((i), GOM_TYPE_NOODLE, GomNoodle))\n" (#define) "#define" (identifier) "GOM_NOODLE" (preproc_params) "(i)" (() "(" (identifier) "i" ()) ")" (preproc_arg) "(G_TYPE_CHECK_INSTANCE_CAST ((i), GOM_TYPE_NOODLE, GomNoodle))" (preproc_function_def) "#define GOM_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOM_TYPE_NOODLE, GomNoodleClass))\n" (#define) "#define" (identifier) "GOM_NOODLE_CLASS" (preproc_params) "(k)" (() "(" (identifier) "k" ()) ")" (preproc_arg) "(G_TYPE_CHECK_CLASS_CAST ((k), GOM_TYPE_NOODLE, GomNoodleClass))" (preproc_function_def) "#define GOM_IS_NOODLE(i) (G_TYPE_CHECK_INSTANCE_TYPE ((i), GOM_TYPE_NOODLE))\n" (#define) "#define" (identifier) "GOM_IS_NOODLE" (preproc_params) "(i)" (() "(" (identifier) "i" ()) ")" (preproc_arg) "(G_TYPE_CHECK_INSTANCE_TYPE ((i), GOM_TYPE_NOODLE))" (preproc_function_def) "#define GOM_IS_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOM_TYPE_NOODLE))\n" (#define) "#define" (identifier) "GOM_IS_NOODLE_CLASS" (preproc_params) "(k)" (() "(" (identifier) "k" ()) ")" (preproc_arg) "(G_TYPE_CHECK_CLASS_TYPE ((k), GOM_TYPE_NOODLE))" (preproc_function_def) "#define GOM_NOODLE_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS ((i), GOM_TYPE_NOODLE, GomNoodleClass))\n" (#define) "#define" (identifier) "GOM_NOODLE_GET_CLASS" (preproc_params) "(i)" (() "(" (identifier) "i" ()) ")" (preproc_arg) "(G_TYPE_INSTANCE_GET_CLASS ((i), GOM_TYPE_NOODLE, GomNoodleClass))" (struct_specifier) "struct _GomNoodle {\n GomEvtTgt parent;\n}" (struct) "struct" (type_identifier) "_GomNoodle" (field_declaration_list) "{\n GomEvtTgt parent;\n}" ({) "{" (field_declaration) "GomEvtTgt parent;" (type_identifier) "GomEvtTgt" (field_identifier) "parent" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct _GomNoodleClass {\n GomEvtTgtClass parent_class;\n}" (struct) "struct" (type_identifier) "_GomNoodleClass" (field_declaration_list) "{\n GomEvtTgtClass parent_class;\n}" ({) "{" (field_declaration) "GomEvtTgtClass parent_class;" (type_identifier) "GomEvtTgtClass" (field_identifier) "parent_class" (;) ";" (}) "}" (;) ";" (declaration) "GType gom_noodle_get_type (void);" (type_identifier) "GType" (function_declarator) "gom_noodle_get_type (void)" (identifier) "gom_noodle_get_type" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (type_identifier) "G_END_DECLS" (;) "" (#endif) "#endif" (comment) "/* GOM_NOODLE_H */"
119
1
{"language": "c", "success": true, "metadata": {"lines": 43, "avg_line_length": 45.53, "nodes": 84, "errors": 0, "source_hash": "841a4ae94f1416ca642665fd3ded343f9dd36ddebb0638186f4536c5c8bf8b0c", "categorized_nodes": 60}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef GOM_NOODLE_H\n#define GOM_NOODLE_H\n\n#include <glib/gmacros.h>\n\nG_BEGIN_DECLS\n\ntypedef struct _GomNoodle GomNoodle;\ntypedef struct _GomNoodleClass GomNoodleClass;\n\nG_END_DECLS\n\n#include \"gom/gomevttgt.h\"\n\nG_BEGIN_DECLS\n\n#define GOM_TYPE_NOODLE (gom_noodle_get_type ())\n#define GOM_NOODLE(i) (G_TYPE_CHECK_INSTANCE_CAST ((i), GOM_TYPE_NOODLE, GomNoodle))\n#define GOM_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOM_TYPE_NOODLE, GomNoodleClass))\n#define GOM_IS_NOODLE(i) (G_TYPE_CHECK_INSTANCE_TYPE ((i), GOM_TYPE_NOODLE))\n#define GOM_IS_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOM_TYPE_NOODLE))\n#define GOM_NOODLE_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS ((i), GOM_TYPE_NOODLE, GomNoodleClass))\n\nstruct _GomNoodle {\n GomEvtTgt parent;\n};\n\nstruct _GomNoodleClass {\n GomEvtTgtClass parent_class;\n};\n\nGType gom_noodle_get_type (void);\n\nG_END_DECLS\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 17, 29, 33, 39, 45, 51, 57, 63, 69, 75, 82, 83], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 58, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 2, "type": "identifier", "text": "GOM_NOODLE_H", "parent": 0, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 20}}, {"id": 3, "type": "preproc_def", "text": "#define GOM_NOODLE_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 5, "type": "identifier", "text": "GOM_NOODLE_H", "parent": 3, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include <glib/gmacros.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<glib/gmacros.h>", "parent": 6, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 25}}, {"id": 9, "type": "declaration", "text": "G_BEGIN_DECLS\n\ntypedef", "parent": 0, "children": [10, 11], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 10, "type": "type_identifier", "text": "G_BEGIN_DECLS", "parent": 9, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 13}}, {"id": 11, "type": "identifier", "text": "typedef", "parent": 9, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 12, "type": "declaration", "text": "struct _GomNoodle GomNoodle;", "parent": 0, "children": [13, 16], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 41}}, {"id": 13, "type": "struct_specifier", "text": "struct _GomNoodle", "parent": 12, "children": [14, 15], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 25}}, {"id": 14, "type": "struct", "text": "struct", "parent": 13, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 14}}, {"id": 15, "type": "type_identifier", "text": "_GomNoodle", "parent": 13, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 25}}, {"id": 16, "type": "identifier", "text": "GomNoodle", "parent": 12, "children": [], "start_point": {"row": 30, "column": 31}, "end_point": {"row": 30, "column": 40}}, {"id": 17, "type": "type_definition", "text": "typedef struct _GomNoodleClass GomNoodleClass;", "parent": 0, "children": [18, 19, 22], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 46}}, {"id": 18, "type": "typedef", "text": "typedef", "parent": 17, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 19, "type": "struct_specifier", "text": "struct _GomNoodleClass", "parent": 17, "children": [20, 21], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 30}}, {"id": 20, "type": "struct", "text": "struct", "parent": 19, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 14}}, {"id": 21, "type": "type_identifier", "text": "_GomNoodleClass", "parent": 19, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 30}}, {"id": 22, "type": "type_identifier", "text": "GomNoodleClass", "parent": 17, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 45}}, {"id": 23, "type": "concatenated_string", "text": "G_END_DECLS\n\n#include \"gom/gomevttgt.h\"\n\nG_BEGIN_DECLS", "parent": 0, "children": [24, 25, 27, 28], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 37, "column": 13}}, {"id": 24, "type": "identifier", "text": "G_END_DECLS", "parent": 23, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 11}}, {"id": 25, "type": "ERROR", "text": "#include", "parent": 23, "children": [26], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 26, "type": "#include", "text": "#include", "parent": 25, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 27, "type": "string_literal", "text": "\"gom/gomevttgt.h\"", "parent": 23, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 26}}, {"id": 28, "type": "identifier", "text": "G_BEGIN_DECLS", "parent": 23, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 13}}, {"id": 29, "type": "preproc_def", "text": "#define GOM_TYPE_NOODLE (gom_noodle_get_type ())\n", "parent": 0, "children": [30, 31, 32], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 30, "type": "#define", "text": "#define", "parent": 29, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 7}}, {"id": 31, "type": "identifier", "text": "GOM_TYPE_NOODLE", "parent": 29, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 23}}, {"id": 32, "type": "preproc_arg", "text": "(gom_noodle_get_type ())", "parent": 29, "children": [], "start_point": {"row": 39, "column": 32}, "end_point": {"row": 39, "column": 56}}, {"id": 33, "type": "preproc_function_def", "text": "#define GOM_NOODLE(i) (G_TYPE_CHECK_INSTANCE_CAST ((i), GOM_TYPE_NOODLE, GomNoodle))\n", "parent": 0, "children": [34, 35, 36, 38], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 0}}, {"id": 34, "type": "#define", "text": "#define", "parent": 33, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 7}}, {"id": 35, "type": "identifier", "text": "GOM_NOODLE", "parent": 33, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 18}}, {"id": 36, "type": "preproc_params", "text": "(i)", "parent": 33, "children": [37], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 21}}, {"id": 37, "type": "identifier", "text": "i", "parent": 36, "children": [], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 20}}, {"id": 38, "type": "preproc_arg", "text": "(G_TYPE_CHECK_INSTANCE_CAST ((i), GOM_TYPE_NOODLE, GomNoodle))", "parent": 33, "children": [], "start_point": {"row": 40, "column": 32}, "end_point": {"row": 40, "column": 94}}, {"id": 39, "type": "preproc_function_def", "text": "#define GOM_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOM_TYPE_NOODLE, GomNoodleClass))\n", "parent": 0, "children": [40, 41, 42, 44], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 0}}, {"id": 40, "type": "#define", "text": "#define", "parent": 39, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 7}}, {"id": 41, "type": "identifier", "text": "GOM_NOODLE_CLASS", "parent": 39, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 24}}, {"id": 42, "type": "preproc_params", "text": "(k)", "parent": 39, "children": [43], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 27}}, {"id": 43, "type": "identifier", "text": "k", "parent": 42, "children": [], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 26}}, {"id": 44, "type": "preproc_arg", "text": "(G_TYPE_CHECK_CLASS_CAST ((k), GOM_TYPE_NOODLE, GomNoodleClass))", "parent": 39, "children": [], "start_point": {"row": 41, "column": 32}, "end_point": {"row": 41, "column": 99}}, {"id": 45, "type": "preproc_function_def", "text": "#define GOM_IS_NOODLE(i) (G_TYPE_CHECK_INSTANCE_TYPE ((i), GOM_TYPE_NOODLE))\n", "parent": 0, "children": [46, 47, 48, 50], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 0}}, {"id": 46, "type": "#define", "text": "#define", "parent": 45, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 7}}, {"id": 47, "type": "identifier", "text": "GOM_IS_NOODLE", "parent": 45, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 21}}, {"id": 48, "type": "preproc_params", "text": "(i)", "parent": 45, "children": [49], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 24}}, {"id": 49, "type": "identifier", "text": "i", "parent": 48, "children": [], "start_point": {"row": 42, "column": 22}, "end_point": {"row": 42, "column": 23}}, {"id": 50, "type": "preproc_arg", "text": "(G_TYPE_CHECK_INSTANCE_TYPE ((i), GOM_TYPE_NOODLE))", "parent": 45, "children": [], "start_point": {"row": 42, "column": 32}, "end_point": {"row": 42, "column": 83}}, {"id": 51, "type": "preproc_function_def", "text": "#define GOM_IS_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOM_TYPE_NOODLE))\n", "parent": 0, "children": [52, 53, 54, 56], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 52, "type": "#define", "text": "#define", "parent": 51, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 7}}, {"id": 53, "type": "identifier", "text": "GOM_IS_NOODLE_CLASS", "parent": 51, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 27}}, {"id": 54, "type": "preproc_params", "text": "(k)", "parent": 51, "children": [55], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 30}}, {"id": 55, "type": "identifier", "text": "k", "parent": 54, "children": [], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 29}}, {"id": 56, "type": "preproc_arg", "text": "(G_TYPE_CHECK_CLASS_TYPE ((k), GOM_TYPE_NOODLE))", "parent": 51, "children": [], "start_point": {"row": 43, "column": 32}, "end_point": {"row": 43, "column": 83}}, {"id": 57, "type": "preproc_function_def", "text": "#define GOM_NOODLE_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS ((i), GOM_TYPE_NOODLE, GomNoodleClass))\n", "parent": 0, "children": [58, 59, 60, 62], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 58, "type": "#define", "text": "#define", "parent": 57, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 59, "type": "identifier", "text": "GOM_NOODLE_GET_CLASS", "parent": 57, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 28}}, {"id": 60, "type": "preproc_params", "text": "(i)", "parent": 57, "children": [61], "start_point": {"row": 44, "column": 28}, "end_point": {"row": 44, "column": 31}}, {"id": 61, "type": "identifier", "text": "i", "parent": 60, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 30}}, {"id": 62, "type": "preproc_arg", "text": "(G_TYPE_INSTANCE_GET_CLASS ((i), GOM_TYPE_NOODLE, GomNoodleClass))", "parent": 57, "children": [], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 99}}, {"id": 63, "type": "struct_specifier", "text": "struct _GomNoodle {\n GomEvtTgt parent;\n}", "parent": 0, "children": [64, 65], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 64, "type": "struct", "text": "struct", "parent": 63, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 65, "type": "type_identifier", "text": "_GomNoodle", "parent": 63, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 17}}, {"id": 66, "type": "field_declaration", "text": "GomEvtTgt parent;", "parent": 63, "children": [67, 68], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 21}}, {"id": 67, "type": "type_identifier", "text": "GomEvtTgt", "parent": 66, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 13}}, {"id": 68, "type": "field_identifier", "text": "parent", "parent": 66, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 20}}, {"id": 69, "type": "struct_specifier", "text": "struct _GomNoodleClass {\n GomEvtTgtClass parent_class;\n}", "parent": 0, "children": [70, 71], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 52, "column": 1}}, {"id": 70, "type": "struct", "text": "struct", "parent": 69, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 6}}, {"id": 71, "type": "type_identifier", "text": "_GomNoodleClass", "parent": 69, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 22}}, {"id": 72, "type": "field_declaration", "text": "GomEvtTgtClass parent_class;", "parent": 69, "children": [73, 74], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 32}}, {"id": 73, "type": "type_identifier", "text": "GomEvtTgtClass", "parent": 72, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 18}}, {"id": 74, "type": "field_identifier", "text": "parent_class", "parent": 72, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 31}}, {"id": 75, "type": "declaration", "text": "GType gom_noodle_get_type (void);", "parent": 0, "children": [76, 77], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 33}}, {"id": 76, "type": "type_identifier", "text": "GType", "parent": 75, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 5}}, {"id": 77, "type": "function_declarator", "text": "gom_noodle_get_type (void)", "parent": 75, "children": [78, 79], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 32}}, {"id": 78, "type": "identifier", "text": "gom_noodle_get_type", "parent": 77, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 25}}, {"id": 79, "type": "parameter_list", "text": "(void)", "parent": 77, "children": [80], "start_point": {"row": 54, "column": 26}, "end_point": {"row": 54, "column": 32}}, {"id": 80, "type": "parameter_declaration", "text": "void", "parent": 79, "children": [81], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 31}}, {"id": 81, "type": "primitive_type", "text": "void", "parent": 80, "children": [], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 31}}, {"id": 82, "type": "type_identifier", "text": "G_END_DECLS", "parent": 0, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 11}}, {"id": 83, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 6}}]}, "node_categories": {"declarations": {"functions": [33, 39, 45, 51, 57, 77], "variables": [9, 12, 17, 66, 72, 75, 80], "classes": [13, 14, 19, 20, 63, 64, 69, 70], "imports": [6, 7, 26], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 11, 15, 16, 21, 22, 24, 28, 31, 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 68, 71, 73, 74, 76, 78, 82, 83], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 23, 27], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 33, "universal_type": "function", "name": "unknown", "text_snippet": "#define GOM_NOODLE(i) (G_TYPE_CHECK_INSTANCE_CAST ((i), GOM_TYPE_NOODLE, GomNoodle))\n"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "#define GOM_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOM_TYPE_NOODLE, GomNoodleClass))\n"}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "#define GOM_IS_NOODLE(i) (G_TYPE_CHECK_INSTANCE_TYPE ((i), GOM_TYPE_NOODLE))\n"}, {"node_id": 51, "universal_type": "function", "name": "unknown", "text_snippet": "#define GOM_IS_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOM_TYPE_NOODLE))\n"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "#define GOM_NOODLE_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS ((i), GOM_TYPE_NOODLE, GomNoodleClass))\n"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "gom_noodle_get_type (void)"}], "class_declarations": [{"node_id": 13, "universal_type": "class", "name": "_GomNoodle", "text_snippet": "struct _GomNoodle"}, {"node_id": 14, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 19, "universal_type": "class", "name": "_GomNoodleClass", "text_snippet": "struct _GomNoodleClass"}, {"node_id": 20, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 63, "universal_type": "class", "name": "_GomNoodle", "text_snippet": "struct _GomNoodle {\n GomEvtTgt parent;\n}"}, {"node_id": 64, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 69, "universal_type": "class", "name": "_GomNoodleClass", "text_snippet": "struct _GomNoodleClass {\n GomEvtTgtClass parent_class;\n}"}, {"node_id": 70, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <glib/gmacros.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 26, "text": "#include"}]}, "original_source_code": "/*\nThe MIT License\n\nCopyright (c) 2008 <NAME> <<EMAIL>>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n#ifndef GOM_NOODLE_H\n#define GOM_NOODLE_H\n\n#include <glib/gmacros.h>\n\nG_BEGIN_DECLS\n\ntypedef struct _GomNoodle GomNoodle;\ntypedef struct _GomNoodleClass GomNoodleClass;\n\nG_END_DECLS\n\n#include \"gom/gomevttgt.h\"\n\nG_BEGIN_DECLS\n\n#define GOM_TYPE_NOODLE (gom_noodle_get_type ())\n#define GOM_NOODLE(i) (G_TYPE_CHECK_INSTANCE_CAST ((i), GOM_TYPE_NOODLE, GomNoodle))\n#define GOM_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOM_TYPE_NOODLE, GomNoodleClass))\n#define GOM_IS_NOODLE(i) (G_TYPE_CHECK_INSTANCE_TYPE ((i), GOM_TYPE_NOODLE))\n#define GOM_IS_NOODLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOM_TYPE_NOODLE))\n#define GOM_NOODLE_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS ((i), GOM_TYPE_NOODLE, GomNoodleClass))\n\nstruct _GomNoodle {\n GomEvtTgt parent;\n};\n\nstruct _GomNoodleClass {\n GomEvtTgtClass parent_class;\n};\n\nGType gom_noodle_get_type (void);\n\nG_END_DECLS\n\n#endif /* GOM_NOODLE_H */\n\n"}
359
c
#include "linsched.h" #include <assert.h> /* for in_sched_functions() */ char __sched_text_start[1]; char __sched_text_end[1]; static struct rcu_head *rcu_head; static struct rcu_head **rcu_curtail = &rcu_head; /* 'rcu' */ void call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu)) { head->func = func; head->next = NULL; *rcu_curtail = head; rcu_curtail = &head->next; } void linsched_rcu_invoke(void) { while(rcu_head) { struct rcu_head *next = rcu_head->next; rcu_head->func(rcu_head); rcu_head = next; } } /* kernel/workqueue.c */ void wq_worker_waking_up(struct task_struct *task, unsigned int cpu) {} struct task_struct *wq_worker_sleeping(struct task_struct *task, unsigned int cpu) { /* should be unused */ assert(0); return NULL; } /* posix-timers.c */ int __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p) { /* should be unused */ assert(0); return 0; } struct k_itimer; int posix_timer_event(struct k_itimer *timr, int si_private) { /* should be unused */ assert(0); return 0; } struct k_clock; void posix_timers_register_clock(const clockid_t clock_id, struct k_clock *new_clock) { /* should be unused */ assert(0); } /* kernel/smp.c */ void __smp_call_function_single(int cpu, struct call_single_data *data, int wait) { int this_cpu = smp_processor_id(); unsigned long flags; if (cpu != this_cpu) linsched_change_cpu(cpu); local_irq_save(flags); data->func(data->info); local_irq_restore(flags); if (cpu != this_cpu) linsched_change_cpu(this_cpu); } void wake_up_stop_task(int cpu, cpu_stop_fn_t fxn, void *data); /* kernel/stop_machine.c */ void linsched_current_handler(void); int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fxn, void *arg) { struct task_struct *stop = stop_tasks[cpu]; int this_cpu = smp_processor_id(), ret; linsched_change_cpu(cpu); wake_up_process(stop); /* switch to stop */ schedule(); BUG_ON(current != stop); ret = fxn(arg); /* switch back */ stop->state = TASK_INTERRUPTIBLE; schedule(); /* let whoever followed the stop task re-program (if needed) */ linsched_current_handler(); BUG_ON(current == stop); linsched_change_cpu(this_cpu); return ret; } void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fxn, void *arg, struct cpu_stop_work *work_buf) { struct task_struct *stop = stop_tasks[cpu]; struct stop_task *stop_task = task_thread_info(stop)->td->data; int this_cpu = smp_processor_id(); /* * catch a data race on simultaneous calls to stop_one_cpu_nowait, if * this ends up happening we'd need to support a proper queue here. */ BUG_ON(stop_task->fxn); stop_task->fxn = fxn; stop_task->arg = arg; /* * in the nowait case we actually go through a schedule to make sure * that our cpu has a change to drop its rq->locks since they may be * needed. */ linsched_change_cpu(cpu); hrtimer_set_expires(&stop_task->timer, ns_to_ktime(1)); hrtimer_start_expires(&stop_task->timer, HRTIMER_MODE_REL); linsched_change_cpu(this_cpu); } int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus) { /* technically we should bounce every cpu, but don't bother */ return stop_one_cpu(cpumask_first(cpus), fn, data); } int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus) { int ret; /* No CPUs can come up or down during this. */ get_online_cpus(); ret = __stop_machine(fn, data, cpus); put_online_cpus(); return ret; } /* the below are unfortunately currently static so we re-define them */ __attribute__((weak)) struct task_group *cgroup_tg(struct cgroup *cgrp) { return container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id), struct task_group, css); } void __sched preempt_schedule(void) { }; void fire_sched_out_preempt_notifiers(struct task_struct *curr, struct task_struct *next) { } void fire_sched_in_preempt_notifiers(struct task_struct *curr) { } int security_task_getscheduler(struct task_struct *p, int policy, struct sched_param *lp) { return 0; } int security_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp) { return 0; } int cap_task_setnice(struct task_struct *p, int nice) { return 1; } int cap_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp) { return 1; }
25.66
162
(translation_unit) "#include "linsched.h"\n#include <assert.h>\n\n/* for in_sched_functions() */\nchar __sched_text_start[1];\nchar __sched_text_end[1];\n\nstatic struct rcu_head *rcu_head;\nstatic struct rcu_head **rcu_curtail = &rcu_head;\n/* 'rcu' */\nvoid call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu))\n{\n head->func = func;\n head->next = NULL;\n\n *rcu_curtail = head;\n rcu_curtail = &head->next;\n}\n\nvoid linsched_rcu_invoke(void)\n{\n while(rcu_head) {\n struct rcu_head *next = rcu_head->next;\n rcu_head->func(rcu_head);\n rcu_head = next;\n }\n}\n\n/* kernel/workqueue.c */\nvoid wq_worker_waking_up(struct task_struct *task, unsigned int cpu) {}\n\nstruct task_struct *wq_worker_sleeping(struct task_struct *task,\n unsigned int cpu)\n{\n /* should be unused */\n assert(0);\n\n return NULL;\n}\n\n/* posix-timers.c */\nint __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)\n{\n /* should be unused */\n assert(0);\n\n return 0;\n}\n\nstruct k_itimer;\nint posix_timer_event(struct k_itimer *timr, int si_private)\n{\n /* should be unused */\n assert(0);\n\n return 0;\n}\n\nstruct k_clock;\nvoid posix_timers_register_clock(const clockid_t clock_id,\n struct k_clock *new_clock)\n{\n /* should be unused */\n assert(0);\n}\n\n/* kernel/smp.c */\nvoid __smp_call_function_single(int cpu, struct call_single_data *data,\n int wait)\n{\n int this_cpu = smp_processor_id();\n unsigned long flags;\n\n if (cpu != this_cpu)\n linsched_change_cpu(cpu);\n\n local_irq_save(flags);\n data->func(data->info);\n local_irq_restore(flags);\n\n if (cpu != this_cpu)\n linsched_change_cpu(this_cpu);\n}\n\n\nvoid wake_up_stop_task(int cpu, cpu_stop_fn_t fxn, void *data);\n\n/* kernel/stop_machine.c */\nvoid linsched_current_handler(void);\n\nint stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fxn, void *arg)\n{\n struct task_struct *stop = stop_tasks[cpu];\n int this_cpu = smp_processor_id(), ret;\n\n linsched_change_cpu(cpu);\n wake_up_process(stop);\n /* switch to stop */\n schedule();\n BUG_ON(current != stop);\n ret = fxn(arg);\n /* switch back */\n stop->state = TASK_INTERRUPTIBLE;\n schedule();\n\n /* let whoever followed the stop task re-program (if needed) */\n linsched_current_handler();\n BUG_ON(current == stop);\n linsched_change_cpu(this_cpu);\n\n return ret;\n}\n\nvoid stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fxn, void *arg,\n struct cpu_stop_work *work_buf)\n{\n struct task_struct *stop = stop_tasks[cpu];\n struct stop_task *stop_task = task_thread_info(stop)->td->data;\n int this_cpu = smp_processor_id();\n\n /*\n * catch a data race on simultaneous calls to stop_one_cpu_nowait, if\n * this ends up happening we'd need to support a proper queue here.\n */\n BUG_ON(stop_task->fxn);\n stop_task->fxn = fxn;\n stop_task->arg = arg;\n\n /*\n * in the nowait case we actually go through a schedule to make sure\n * that our cpu has a change to drop its rq->locks since they may be\n * needed.\n */\n linsched_change_cpu(cpu);\n hrtimer_set_expires(&stop_task->timer, ns_to_ktime(1));\n hrtimer_start_expires(&stop_task->timer, HRTIMER_MODE_REL);\n linsched_change_cpu(this_cpu);\n}\n\nint __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)\n{\n /* technically we should bounce every cpu, but don't bother */\n return stop_one_cpu(cpumask_first(cpus), fn, data);\n}\n\nint stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)\n{\n int ret;\n\n /* No CPUs can come up or down during this. */\n get_online_cpus();\n ret = __stop_machine(fn, data, cpus);\n put_online_cpus();\n return ret;\n}\n\n/* the below are unfortunately currently static so we re-define them */\n__attribute__((weak)) struct task_group *cgroup_tg(struct cgroup *cgrp)\n{\n return container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),\n struct task_group, css);\n}\n\nvoid __sched preempt_schedule(void)\n{\n};\n\nvoid fire_sched_out_preempt_notifiers(struct task_struct *curr,\n struct task_struct *next)\n{\n}\n\nvoid fire_sched_in_preempt_notifiers(struct task_struct *curr)\n{\n}\n\nint security_task_getscheduler(struct task_struct *p,\n int policy, struct sched_param *lp)\n{\n return 0;\n}\n\nint security_task_setscheduler(struct task_struct *p,\n int policy, struct sched_param *lp)\n{\n return 0;\n}\n\nint cap_task_setnice(struct task_struct *p, int nice)\n{\n return 1;\n}\n\nint cap_task_setscheduler(struct task_struct *p, int policy,\n struct sched_param *lp)\n{\n return 1;\n}\n" (preproc_include) "#include "linsched.h"\n" (#include) "#include" (string_literal) ""linsched.h"" (") """ (string_content) "linsched.h" (") """ (preproc_include) "#include <assert.h>\n" (#include) "#include" (system_lib_string) "<assert.h>" (comment) "/* for in_sched_functions() */" (declaration) "char __sched_text_start[1];" (primitive_type) "char" (array_declarator) "__sched_text_start[1]" (identifier) "__sched_text_start" ([) "[" (number_literal) "1" (]) "]" (;) ";" (declaration) "char __sched_text_end[1];" (primitive_type) "char" (array_declarator) "__sched_text_end[1]" (identifier) "__sched_text_end" ([) "[" (number_literal) "1" (]) "]" (;) ";" (declaration) "static struct rcu_head *rcu_head;" (storage_class_specifier) "static" (static) "static" (struct_specifier) "struct rcu_head" (struct) "struct" (type_identifier) "rcu_head" (pointer_declarator) "*rcu_head" (*) "*" (identifier) "rcu_head" (;) ";" (declaration) "static struct rcu_head **rcu_curtail = &rcu_head;" (storage_class_specifier) "static" (static) "static" (struct_specifier) "struct rcu_head" (struct) "struct" (type_identifier) "rcu_head" (init_declarator) "**rcu_curtail = &rcu_head" (pointer_declarator) "**rcu_curtail" (*) "*" (pointer_declarator) "*rcu_curtail" (*) "*" (identifier) "rcu_curtail" (=) "=" (pointer_expression) "&rcu_head" (&) "&" (identifier) "rcu_head" (;) ";" (comment) "/* 'rcu' */" (function_definition) "void call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu))\n{\n head->func = func;\n head->next = NULL;\n\n *rcu_curtail = head;\n rcu_curtail = &head->next;\n}" (primitive_type) "void" (function_declarator) "call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu))" (identifier) "call_rcu_sched" (parameter_list) "(struct rcu_head *head, void (*func)(struct rcu_head *rcu))" (() "(" (parameter_declaration) "struct rcu_head *head" (struct_specifier) "struct rcu_head" (struct) "struct" (type_identifier) "rcu_head" (pointer_declarator) "*head" (*) "*" (identifier) "head" (,) "," (parameter_declaration) "void (*func)(struct rcu_head *rcu)" (primitive_type) "void" (function_declarator) "(*func)(struct rcu_head *rcu)" (parenthesized_declarator) "(*func)" (() "(" (pointer_declarator) "*func" (*) "*" (identifier) "func" ()) ")" (parameter_list) "(struct rcu_head *rcu)" (() "(" (parameter_declaration) "struct rcu_head *rcu" (struct_specifier) "struct rcu_head" (struct) "struct" (type_identifier) "rcu_head" (pointer_declarator) "*rcu" (*) "*" (identifier) "rcu" ()) ")" ()) ")" (compound_statement) "{\n head->func = func;\n head->next = NULL;\n\n *rcu_curtail = head;\n rcu_curtail = &head->next;\n}" ({) "{" (expression_statement) "head->func = func;" (assignment_expression) "head->func = func" (field_expression) "head->func" (identifier) "head" (->) "->" (field_identifier) "func" (=) "=" (identifier) "func" (;) ";" (expression_statement) "head->next = NULL;" (assignment_expression) "head->next = NULL" (field_expression) "head->next" (identifier) "head" (->) "->" (field_identifier) "next" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "*rcu_curtail = head;" (assignment_expression) "*rcu_curtail = head" (pointer_expression) "*rcu_curtail" (*) "*" (identifier) "rcu_curtail" (=) "=" (identifier) "head" (;) ";" (expression_statement) "rcu_curtail = &head->next;" (assignment_expression) "rcu_curtail = &head->next" (identifier) "rcu_curtail" (=) "=" (pointer_expression) "&head->next" (&) "&" (field_expression) "head->next" (identifier) "head" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (function_definition) "void linsched_rcu_invoke(void)\n{\n while(rcu_head) {\n struct rcu_head *next = rcu_head->next;\n rcu_head->func(rcu_head);\n rcu_head = next;\n }\n}" (primitive_type) "void" (function_declarator) "linsched_rcu_invoke(void)" (identifier) "linsched_rcu_invoke" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n while(rcu_head) {\n struct rcu_head *next = rcu_head->next;\n rcu_head->func(rcu_head);\n rcu_head = next;\n }\n}" ({) "{" (while_statement) "while(rcu_head) {\n struct rcu_head *next = rcu_head->next;\n rcu_head->func(rcu_head);\n rcu_head = next;\n }" (while) "while" (parenthesized_expression) "(rcu_head)" (() "(" (identifier) "rcu_head" ()) ")" (compound_statement) "{\n struct rcu_head *next = rcu_head->next;\n rcu_head->func(rcu_head);\n rcu_head = next;\n }" ({) "{" (declaration) "struct rcu_head *next = rcu_head->next;" (struct_specifier) "struct rcu_head" (struct) "struct" (type_identifier) "rcu_head" (init_declarator) "*next = rcu_head->next" (pointer_declarator) "*next" (*) "*" (identifier) "next" (=) "=" (field_expression) "rcu_head->next" (identifier) "rcu_head" (->) "->" (field_identifier) "next" (;) ";" (expression_statement) "rcu_head->func(rcu_head);" (call_expression) "rcu_head->func(rcu_head)" (field_expression) "rcu_head->func" (identifier) "rcu_head" (->) "->" (field_identifier) "func" (argument_list) "(rcu_head)" (() "(" (identifier) "rcu_head" ()) ")" (;) ";" (expression_statement) "rcu_head = next;" (assignment_expression) "rcu_head = next" (identifier) "rcu_head" (=) "=" (identifier) "next" (;) ";" (}) "}" (}) "}" (comment) "/* kernel/workqueue.c */" (function_definition) "void wq_worker_waking_up(struct task_struct *task, unsigned int cpu) {}" (primitive_type) "void" (function_declarator) "wq_worker_waking_up(struct task_struct *task, unsigned int cpu)" (identifier) "wq_worker_waking_up" (parameter_list) "(struct task_struct *task, unsigned int cpu)" (() "(" (parameter_declaration) "struct task_struct *task" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*task" (*) "*" (identifier) "task" (,) "," (parameter_declaration) "unsigned int cpu" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "cpu" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "struct task_struct *wq_worker_sleeping(struct task_struct *task,\n unsigned int cpu)\n{\n /* should be unused */\n assert(0);\n\n return NULL;\n}" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*wq_worker_sleeping(struct task_struct *task,\n unsigned int cpu)" (*) "*" (function_declarator) "wq_worker_sleeping(struct task_struct *task,\n unsigned int cpu)" (identifier) "wq_worker_sleeping" (parameter_list) "(struct task_struct *task,\n unsigned int cpu)" (() "(" (parameter_declaration) "struct task_struct *task" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*task" (*) "*" (identifier) "task" (,) "," (parameter_declaration) "unsigned int cpu" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "cpu" ()) ")" (compound_statement) "{\n /* should be unused */\n assert(0);\n\n return NULL;\n}" ({) "{" (comment) "/* should be unused */" (expression_statement) "assert(0);" (call_expression) "assert(0)" (identifier) "assert" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (comment) "/* posix-timers.c */" (function_definition) "int __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)\n{\n /* should be unused */\n assert(0);\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "__group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)" (identifier) "__group_send_sig_info" (parameter_list) "(int sig, struct siginfo *info, struct task_struct *p)" (() "(" (parameter_declaration) "int sig" (primitive_type) "int" (identifier) "sig" (,) "," (parameter_declaration) "struct siginfo *info" (struct_specifier) "struct siginfo" (struct) "struct" (type_identifier) "siginfo" (pointer_declarator) "*info" (*) "*" (identifier) "info" (,) "," (parameter_declaration) "struct task_struct *p" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*p" (*) "*" (identifier) "p" ()) ")" (compound_statement) "{\n /* should be unused */\n assert(0);\n\n return 0;\n}" ({) "{" (comment) "/* should be unused */" (expression_statement) "assert(0);" (call_expression) "assert(0)" (identifier) "assert" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (struct_specifier) "struct k_itimer" (struct) "struct" (type_identifier) "k_itimer" (;) ";" (function_definition) "int posix_timer_event(struct k_itimer *timr, int si_private)\n{\n /* should be unused */\n assert(0);\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "posix_timer_event(struct k_itimer *timr, int si_private)" (identifier) "posix_timer_event" (parameter_list) "(struct k_itimer *timr, int si_private)" (() "(" (parameter_declaration) "struct k_itimer *timr" (struct_specifier) "struct k_itimer" (struct) "struct" (type_identifier) "k_itimer" (pointer_declarator) "*timr" (*) "*" (identifier) "timr" (,) "," (parameter_declaration) "int si_private" (primitive_type) "int" (identifier) "si_private" ()) ")" (compound_statement) "{\n /* should be unused */\n assert(0);\n\n return 0;\n}" ({) "{" (comment) "/* should be unused */" (expression_statement) "assert(0);" (call_expression) "assert(0)" (identifier) "assert" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (struct_specifier) "struct k_clock" (struct) "struct" (type_identifier) "k_clock" (;) ";" (function_definition) "void posix_timers_register_clock(const clockid_t clock_id,\n struct k_clock *new_clock)\n{\n /* should be unused */\n assert(0);\n}" (primitive_type) "void" (function_declarator) "posix_timers_register_clock(const clockid_t clock_id,\n struct k_clock *new_clock)" (identifier) "posix_timers_register_clock" (parameter_list) "(const clockid_t clock_id,\n struct k_clock *new_clock)" (() "(" (parameter_declaration) "const clockid_t clock_id" (type_qualifier) "const" (const) "const" (type_identifier) "clockid_t" (identifier) "clock_id" (,) "," (parameter_declaration) "struct k_clock *new_clock" (struct_specifier) "struct k_clock" (struct) "struct" (type_identifier) "k_clock" (pointer_declarator) "*new_clock" (*) "*" (identifier) "new_clock" ()) ")" (compound_statement) "{\n /* should be unused */\n assert(0);\n}" ({) "{" (comment) "/* should be unused */" (expression_statement) "assert(0);" (call_expression) "assert(0)" (identifier) "assert" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}" (comment) "/* kernel/smp.c */" (function_definition) "void __smp_call_function_single(int cpu, struct call_single_data *data,\n int wait)\n{\n int this_cpu = smp_processor_id();\n unsigned long flags;\n\n if (cpu != this_cpu)\n linsched_change_cpu(cpu);\n\n local_irq_save(flags);\n data->func(data->info);\n local_irq_restore(flags);\n\n if (cpu != this_cpu)\n linsched_change_cpu(this_cpu);\n}" (primitive_type) "void" (function_declarator) "__smp_call_function_single(int cpu, struct call_single_data *data,\n int wait)" (identifier) "__smp_call_function_single" (parameter_list) "(int cpu, struct call_single_data *data,\n int wait)" (() "(" (parameter_declaration) "int cpu" (primitive_type) "int" (identifier) "cpu" (,) "," (parameter_declaration) "struct call_single_data *data" (struct_specifier) "struct call_single_data" (struct) "struct" (type_identifier) "call_single_data" (pointer_declarator) "*data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "int wait" (primitive_type) "int" (identifier) "wait" ()) ")" (compound_statement) "{\n int this_cpu = smp_processor_id();\n unsigned long flags;\n\n if (cpu != this_cpu)\n linsched_change_cpu(cpu);\n\n local_irq_save(flags);\n data->func(data->info);\n local_irq_restore(flags);\n\n if (cpu != this_cpu)\n linsched_change_cpu(this_cpu);\n}" ({) "{" (declaration) "int this_cpu = smp_processor_id();" (primitive_type) "int" (init_declarator) "this_cpu = smp_processor_id()" (identifier) "this_cpu" (=) "=" (call_expression) "smp_processor_id()" (identifier) "smp_processor_id" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "unsigned long flags;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "flags" (;) ";" (if_statement) "if (cpu != this_cpu)\n linsched_change_cpu(cpu);" (if) "if" (parenthesized_expression) "(cpu != this_cpu)" (() "(" (binary_expression) "cpu != this_cpu" (identifier) "cpu" (!=) "!=" (identifier) "this_cpu" ()) ")" (expression_statement) "linsched_change_cpu(cpu);" (call_expression) "linsched_change_cpu(cpu)" (identifier) "linsched_change_cpu" (argument_list) "(cpu)" (() "(" (identifier) "cpu" ()) ")" (;) ";" (expression_statement) "local_irq_save(flags);" (call_expression) "local_irq_save(flags)" (identifier) "local_irq_save" (argument_list) "(flags)" (() "(" (identifier) "flags" ()) ")" (;) ";" (expression_statement) "data->func(data->info);" (call_expression) "data->func(data->info)" (field_expression) "data->func" (identifier) "data" (->) "->" (field_identifier) "func" (argument_list) "(data->info)" (() "(" (field_expression) "data->info" (identifier) "data" (->) "->" (field_identifier) "info" ()) ")" (;) ";" (expression_statement) "local_irq_restore(flags);" (call_expression) "local_irq_restore(flags)" (identifier) "local_irq_restore" (argument_list) "(flags)" (() "(" (identifier) "flags" ()) ")" (;) ";" (if_statement) "if (cpu != this_cpu)\n linsched_change_cpu(this_cpu);" (if) "if" (parenthesized_expression) "(cpu != this_cpu)" (() "(" (binary_expression) "cpu != this_cpu" (identifier) "cpu" (!=) "!=" (identifier) "this_cpu" ()) ")" (expression_statement) "linsched_change_cpu(this_cpu);" (call_expression) "linsched_change_cpu(this_cpu)" (identifier) "linsched_change_cpu" (argument_list) "(this_cpu)" (() "(" (identifier) "this_cpu" ()) ")" (;) ";" (}) "}" (declaration) "void wake_up_stop_task(int cpu, cpu_stop_fn_t fxn, void *data);" (primitive_type) "void" (function_declarator) "wake_up_stop_task(int cpu, cpu_stop_fn_t fxn, void *data)" (identifier) "wake_up_stop_task" (parameter_list) "(int cpu, cpu_stop_fn_t fxn, void *data)" (() "(" (parameter_declaration) "int cpu" (primitive_type) "int" (identifier) "cpu" (,) "," (parameter_declaration) "cpu_stop_fn_t fxn" (type_identifier) "cpu_stop_fn_t" (identifier) "fxn" (,) "," (parameter_declaration) "void *data" (primitive_type) "void" (pointer_declarator) "*data" (*) "*" (identifier) "data" ()) ")" (;) ";" (comment) "/* kernel/stop_machine.c */" (declaration) "void linsched_current_handler(void);" (primitive_type) "void" (function_declarator) "linsched_current_handler(void)" (identifier) "linsched_current_handler" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (function_definition) "int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fxn, void *arg)\n{\n struct task_struct *stop = stop_tasks[cpu];\n int this_cpu = smp_processor_id(), ret;\n\n linsched_change_cpu(cpu);\n wake_up_process(stop);\n /* switch to stop */\n schedule();\n BUG_ON(current != stop);\n ret = fxn(arg);\n /* switch back */\n stop->state = TASK_INTERRUPTIBLE;\n schedule();\n\n /* let whoever followed the stop task re-program (if needed) */\n linsched_current_handler();\n BUG_ON(current == stop);\n linsched_change_cpu(this_cpu);\n\n return ret;\n}" (primitive_type) "int" (function_declarator) "stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fxn, void *arg)" (identifier) "stop_one_cpu" (parameter_list) "(unsigned int cpu, cpu_stop_fn_t fxn, void *arg)" (() "(" (parameter_declaration) "unsigned int cpu" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "cpu" (,) "," (parameter_declaration) "cpu_stop_fn_t fxn" (type_identifier) "cpu_stop_fn_t" (identifier) "fxn" (,) "," (parameter_declaration) "void *arg" (primitive_type) "void" (pointer_declarator) "*arg" (*) "*" (identifier) "arg" ()) ")" (compound_statement) "{\n struct task_struct *stop = stop_tasks[cpu];\n int this_cpu = smp_processor_id(), ret;\n\n linsched_change_cpu(cpu);\n wake_up_process(stop);\n /* switch to stop */\n schedule();\n BUG_ON(current != stop);\n ret = fxn(arg);\n /* switch back */\n stop->state = TASK_INTERRUPTIBLE;\n schedule();\n\n /* let whoever followed the stop task re-program (if needed) */\n linsched_current_handler();\n BUG_ON(current == stop);\n linsched_change_cpu(this_cpu);\n\n return ret;\n}" ({) "{" (declaration) "struct task_struct *stop = stop_tasks[cpu];" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (init_declarator) "*stop = stop_tasks[cpu]" (pointer_declarator) "*stop" (*) "*" (identifier) "stop" (=) "=" (subscript_expression) "stop_tasks[cpu]" (identifier) "stop_tasks" ([) "[" (identifier) "cpu" (]) "]" (;) ";" (declaration) "int this_cpu = smp_processor_id(), ret;" (primitive_type) "int" (init_declarator) "this_cpu = smp_processor_id()" (identifier) "this_cpu" (=) "=" (call_expression) "smp_processor_id()" (identifier) "smp_processor_id" (argument_list) "()" (() "(" ()) ")" (,) "," (identifier) "ret" (;) ";" (expression_statement) "linsched_change_cpu(cpu);" (call_expression) "linsched_change_cpu(cpu)" (identifier) "linsched_change_cpu" (argument_list) "(cpu)" (() "(" (identifier) "cpu" ()) ")" (;) ";" (expression_statement) "wake_up_process(stop);" (call_expression) "wake_up_process(stop)" (identifier) "wake_up_process" (argument_list) "(stop)" (() "(" (identifier) "stop" ()) ")" (;) ";" (comment) "/* switch to stop */" (expression_statement) "schedule();" (call_expression) "schedule()" (identifier) "schedule" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "BUG_ON(current != stop);" (call_expression) "BUG_ON(current != stop)" (identifier) "BUG_ON" (argument_list) "(current != stop)" (() "(" (binary_expression) "current != stop" (identifier) "current" (!=) "!=" (identifier) "stop" ()) ")" (;) ";" (expression_statement) "ret = fxn(arg);" (assignment_expression) "ret = fxn(arg)" (identifier) "ret" (=) "=" (call_expression) "fxn(arg)" (identifier) "fxn" (argument_list) "(arg)" (() "(" (identifier) "arg" ()) ")" (;) ";" (comment) "/* switch back */" (expression_statement) "stop->state = TASK_INTERRUPTIBLE;" (assignment_expression) "stop->state = TASK_INTERRUPTIBLE" (field_expression) "stop->state" (identifier) "stop" (->) "->" (field_identifier) "state" (=) "=" (identifier) "TASK_INTERRUPTIBLE" (;) ";" (expression_statement) "schedule();" (call_expression) "schedule()" (identifier) "schedule" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/* let whoever followed the stop task re-program (if needed) */" (expression_statement) "linsched_current_handler();" (call_expression) "linsched_current_handler()" (identifier) "linsched_current_handler" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "BUG_ON(current == stop);" (call_expression) "BUG_ON(current == stop)" (identifier) "BUG_ON" (argument_list) "(current == stop)" (() "(" (binary_expression) "current == stop" (identifier) "current" (==) "==" (identifier) "stop" ()) ")" (;) ";" (expression_statement) "linsched_change_cpu(this_cpu);" (call_expression) "linsched_change_cpu(this_cpu)" (identifier) "linsched_change_cpu" (argument_list) "(this_cpu)" (() "(" (identifier) "this_cpu" ()) ")" (;) ";" (return_statement) "return ret;" (return) "return" (identifier) "ret" (;) ";" (}) "}" (function_definition) "void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fxn, void *arg,\n struct cpu_stop_work *work_buf)\n{\n struct task_struct *stop = stop_tasks[cpu];\n struct stop_task *stop_task = task_thread_info(stop)->td->data;\n int this_cpu = smp_processor_id();\n\n /*\n * catch a data race on simultaneous calls to stop_one_cpu_nowait, if\n * this ends up happening we'd need to support a proper queue here.\n */\n BUG_ON(stop_task->fxn);\n stop_task->fxn = fxn;\n stop_task->arg = arg;\n\n /*\n * in the nowait case we actually go through a schedule to make sure\n * that our cpu has a change to drop its rq->locks since they may be\n * needed.\n */\n linsched_change_cpu(cpu);\n hrtimer_set_expires(&stop_task->timer, ns_to_ktime(1));\n hrtimer_start_expires(&stop_task->timer, HRTIMER_MODE_REL);\n linsched_change_cpu(this_cpu);\n}" (primitive_type) "void" (function_declarator) "stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fxn, void *arg,\n struct cpu_stop_work *work_buf)" (identifier) "stop_one_cpu_nowait" (parameter_list) "(unsigned int cpu, cpu_stop_fn_t fxn, void *arg,\n struct cpu_stop_work *work_buf)" (() "(" (parameter_declaration) "unsigned int cpu" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "cpu" (,) "," (parameter_declaration) "cpu_stop_fn_t fxn" (type_identifier) "cpu_stop_fn_t" (identifier) "fxn" (,) "," (parameter_declaration) "void *arg" (primitive_type) "void" (pointer_declarator) "*arg" (*) "*" (identifier) "arg" (,) "," (parameter_declaration) "struct cpu_stop_work *work_buf" (struct_specifier) "struct cpu_stop_work" (struct) "struct" (type_identifier) "cpu_stop_work" (pointer_declarator) "*work_buf" (*) "*" (identifier) "work_buf" ()) ")" (compound_statement) "{\n struct task_struct *stop = stop_tasks[cpu];\n struct stop_task *stop_task = task_thread_info(stop)->td->data;\n int this_cpu = smp_processor_id();\n\n /*\n * catch a data race on simultaneous calls to stop_one_cpu_nowait, if\n * this ends up happening we'd need to support a proper queue here.\n */\n BUG_ON(stop_task->fxn);\n stop_task->fxn = fxn;\n stop_task->arg = arg;\n\n /*\n * in the nowait case we actually go through a schedule to make sure\n * that our cpu has a change to drop its rq->locks since they may be\n * needed.\n */\n linsched_change_cpu(cpu);\n hrtimer_set_expires(&stop_task->timer, ns_to_ktime(1));\n hrtimer_start_expires(&stop_task->timer, HRTIMER_MODE_REL);\n linsched_change_cpu(this_cpu);\n}" ({) "{" (declaration) "struct task_struct *stop = stop_tasks[cpu];" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (init_declarator) "*stop = stop_tasks[cpu]" (pointer_declarator) "*stop" (*) "*" (identifier) "stop" (=) "=" (subscript_expression) "stop_tasks[cpu]" (identifier) "stop_tasks" ([) "[" (identifier) "cpu" (]) "]" (;) ";" (declaration) "struct stop_task *stop_task = task_thread_info(stop)->td->data;" (struct_specifier) "struct stop_task" (struct) "struct" (type_identifier) "stop_task" (init_declarator) "*stop_task = task_thread_info(stop)->td->data" (pointer_declarator) "*stop_task" (*) "*" (identifier) "stop_task" (=) "=" (field_expression) "task_thread_info(stop)->td->data" (field_expression) "task_thread_info(stop)->td" (call_expression) "task_thread_info(stop)" (identifier) "task_thread_info" (argument_list) "(stop)" (() "(" (identifier) "stop" ()) ")" (->) "->" (field_identifier) "td" (->) "->" (field_identifier) "data" (;) ";" (declaration) "int this_cpu = smp_processor_id();" (primitive_type) "int" (init_declarator) "this_cpu = smp_processor_id()" (identifier) "this_cpu" (=) "=" (call_expression) "smp_processor_id()" (identifier) "smp_processor_id" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/*\n * catch a data race on simultaneous calls to stop_one_cpu_nowait, if\n * this ends up happening we'd need to support a proper queue here.\n */" (expression_statement) "BUG_ON(stop_task->fxn);" (call_expression) "BUG_ON(stop_task->fxn)" (identifier) "BUG_ON" (argument_list) "(stop_task->fxn)" (() "(" (field_expression) "stop_task->fxn" (identifier) "stop_task" (->) "->" (field_identifier) "fxn" ()) ")" (;) ";" (expression_statement) "stop_task->fxn = fxn;" (assignment_expression) "stop_task->fxn = fxn" (field_expression) "stop_task->fxn" (identifier) "stop_task" (->) "->" (field_identifier) "fxn" (=) "=" (identifier) "fxn" (;) ";" (expression_statement) "stop_task->arg = arg;" (assignment_expression) "stop_task->arg = arg" (field_expression) "stop_task->arg" (identifier) "stop_task" (->) "->" (field_identifier) "arg" (=) "=" (identifier) "arg" (;) ";" (comment) "/*\n * in the nowait case we actually go through a schedule to make sure\n * that our cpu has a change to drop its rq->locks since they may be\n * needed.\n */" (expression_statement) "linsched_change_cpu(cpu);" (call_expression) "linsched_change_cpu(cpu)" (identifier) "linsched_change_cpu" (argument_list) "(cpu)" (() "(" (identifier) "cpu" ()) ")" (;) ";" (expression_statement) "hrtimer_set_expires(&stop_task->timer, ns_to_ktime(1));" (call_expression) "hrtimer_set_expires(&stop_task->timer, ns_to_ktime(1))" (identifier) "hrtimer_set_expires" (argument_list) "(&stop_task->timer, ns_to_ktime(1))" (() "(" (pointer_expression) "&stop_task->timer" (&) "&" (field_expression) "stop_task->timer" (identifier) "stop_task" (->) "->" (field_identifier) "timer" (,) "," (call_expression) "ns_to_ktime(1)" (identifier) "ns_to_ktime" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" ()) ")" (;) ";" (expression_statement) "hrtimer_start_expires(&stop_task->timer, HRTIMER_MODE_REL);" (call_expression) "hrtimer_start_expires(&stop_task->timer, HRTIMER_MODE_REL)" (identifier) "hrtimer_start_expires" (argument_list) "(&stop_task->timer, HRTIMER_MODE_REL)" (() "(" (pointer_expression) "&stop_task->timer" (&) "&" (field_expression) "stop_task->timer" (identifier) "stop_task" (->) "->" (field_identifier) "timer" (,) "," (identifier) "HRTIMER_MODE_REL" ()) ")" (;) ";" (expression_statement) "linsched_change_cpu(this_cpu);" (call_expression) "linsched_change_cpu(this_cpu)" (identifier) "linsched_change_cpu" (argument_list) "(this_cpu)" (() "(" (identifier) "this_cpu" ()) ")" (;) ";" (}) "}" (function_definition) "int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)\n{\n /* technically we should bounce every cpu, but don't bother */\n return stop_one_cpu(cpumask_first(cpus), fn, data);\n}" (primitive_type) "int" (function_declarator) "__stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)" (identifier) "__stop_machine" (parameter_list) "(int (*fn)(void *), void *data, const struct cpumask *cpus)" (() "(" (parameter_declaration) "int (*fn)(void *)" (primitive_type) "int" (function_declarator) "(*fn)(void *)" (parenthesized_declarator) "(*fn)" (() "(" (pointer_declarator) "*fn" (*) "*" (identifier) "fn" ()) ")" (parameter_list) "(void *)" (() "(" (parameter_declaration) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (,) "," (parameter_declaration) "void *data" (primitive_type) "void" (pointer_declarator) "*data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "const struct cpumask *cpus" (type_qualifier) "const" (const) "const" (struct_specifier) "struct cpumask" (struct) "struct" (type_identifier) "cpumask" (pointer_declarator) "*cpus" (*) "*" (identifier) "cpus" ()) ")" (compound_statement) "{\n /* technically we should bounce every cpu, but don't bother */\n return stop_one_cpu(cpumask_first(cpus), fn, data);\n}" ({) "{" (comment) "/* technically we should bounce every cpu, but don't bother */" (return_statement) "return stop_one_cpu(cpumask_first(cpus), fn, data);" (return) "return" (call_expression) "stop_one_cpu(cpumask_first(cpus), fn, data)" (identifier) "stop_one_cpu" (argument_list) "(cpumask_first(cpus), fn, data)" (() "(" (call_expression) "cpumask_first(cpus)" (identifier) "cpumask_first" (argument_list) "(cpus)" (() "(" (identifier) "cpus" ()) ")" (,) "," (identifier) "fn" (,) "," (identifier) "data" ()) ")" (;) ";" (}) "}" (function_definition) "int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)\n{\n int ret;\n\n /* No CPUs can come up or down during this. */\n get_online_cpus();\n ret = __stop_machine(fn, data, cpus);\n put_online_cpus();\n return ret;\n}" (primitive_type) "int" (function_declarator) "stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)" (identifier) "stop_machine" (parameter_list) "(int (*fn)(void *), void *data, const struct cpumask *cpus)" (() "(" (parameter_declaration) "int (*fn)(void *)" (primitive_type) "int" (function_declarator) "(*fn)(void *)" (parenthesized_declarator) "(*fn)" (() "(" (pointer_declarator) "*fn" (*) "*" (identifier) "fn" ()) ")" (parameter_list) "(void *)" (() "(" (parameter_declaration) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (,) "," (parameter_declaration) "void *data" (primitive_type) "void" (pointer_declarator) "*data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "const struct cpumask *cpus" (type_qualifier) "const" (const) "const" (struct_specifier) "struct cpumask" (struct) "struct" (type_identifier) "cpumask" (pointer_declarator) "*cpus" (*) "*" (identifier) "cpus" ()) ")" (compound_statement) "{\n int ret;\n\n /* No CPUs can come up or down during this. */\n get_online_cpus();\n ret = __stop_machine(fn, data, cpus);\n put_online_cpus();\n return ret;\n}" ({) "{" (declaration) "int ret;" (primitive_type) "int" (identifier) "ret" (;) ";" (comment) "/* No CPUs can come up or down during this. */" (expression_statement) "get_online_cpus();" (call_expression) "get_online_cpus()" (identifier) "get_online_cpus" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "ret = __stop_machine(fn, data, cpus);" (assignment_expression) "ret = __stop_machine(fn, data, cpus)" (identifier) "ret" (=) "=" (call_expression) "__stop_machine(fn, data, cpus)" (identifier) "__stop_machine" (argument_list) "(fn, data, cpus)" (() "(" (identifier) "fn" (,) "," (identifier) "data" (,) "," (identifier) "cpus" ()) ")" (;) ";" (expression_statement) "put_online_cpus();" (call_expression) "put_online_cpus()" (identifier) "put_online_cpus" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return ret;" (return) "return" (identifier) "ret" (;) ";" (}) "}" (comment) "/* the below are unfortunately currently static so we re-define them */" (function_definition) "__attribute__((weak)) struct task_group *cgroup_tg(struct cgroup *cgrp)\n{\n return container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),\n struct task_group, css);\n}" (attribute_specifier) "__attribute__((weak))" (__attribute__) "__attribute__" (() "(" (argument_list) "(weak)" (() "(" (identifier) "weak" ()) ")" ()) ")" (struct_specifier) "struct task_group" (struct) "struct" (type_identifier) "task_group" (pointer_declarator) "*cgroup_tg(struct cgroup *cgrp)" (*) "*" (function_declarator) "cgroup_tg(struct cgroup *cgrp)" (identifier) "cgroup_tg" (parameter_list) "(struct cgroup *cgrp)" (() "(" (parameter_declaration) "struct cgroup *cgrp" (struct_specifier) "struct cgroup" (struct) "struct" (type_identifier) "cgroup" (pointer_declarator) "*cgrp" (*) "*" (identifier) "cgrp" ()) ")" (compound_statement) "{\n return container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),\n struct task_group, css);\n}" ({) "{" (return_statement) "return container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),\n struct task_group, css);" (return) "return" (call_expression) "container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),\n struct task_group, css)" (identifier) "container_of" (argument_list) "(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),\n struct task_group, css)" (() "(" (call_expression) "cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id)" (identifier) "cgroup_subsys_state" (argument_list) "(cgrp, cpu_cgroup_subsys_id)" (() "(" (identifier) "cgrp" (,) "," (identifier) "cpu_cgroup_subsys_id" ()) ")" (,) "," (ERROR) "struct" (identifier) "struct" (identifier) "task_group" (,) "," (identifier) "css" ()) ")" (;) ";" (}) "}" (function_definition) "void __sched preempt_schedule(void)\n{\n}" (primitive_type) "void" (ERROR) "__sched" (identifier) "__sched" (function_declarator) "preempt_schedule(void)" (identifier) "preempt_schedule" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "void fire_sched_out_preempt_notifiers(struct task_struct *curr,\n struct task_struct *next)\n{\n}" (primitive_type) "void" (function_declarator) "fire_sched_out_preempt_notifiers(struct task_struct *curr,\n struct task_struct *next)" (identifier) "fire_sched_out_preempt_notifiers" (parameter_list) "(struct task_struct *curr,\n struct task_struct *next)" (() "(" (parameter_declaration) "struct task_struct *curr" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*curr" (*) "*" (identifier) "curr" (,) "," (parameter_declaration) "struct task_struct *next" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*next" (*) "*" (identifier) "next" ()) ")" (compound_statement) "{\n}" ({) "{" (}) "}" (function_definition) "void fire_sched_in_preempt_notifiers(struct task_struct *curr)\n{\n}" (primitive_type) "void" (function_declarator) "fire_sched_in_preempt_notifiers(struct task_struct *curr)" (identifier) "fire_sched_in_preempt_notifiers" (parameter_list) "(struct task_struct *curr)" (() "(" (parameter_declaration) "struct task_struct *curr" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*curr" (*) "*" (identifier) "curr" ()) ")" (compound_statement) "{\n}" ({) "{" (}) "}" (function_definition) "int security_task_getscheduler(struct task_struct *p,\n int policy, struct sched_param *lp)\n{\n return 0;\n}" (primitive_type) "int" (function_declarator) "security_task_getscheduler(struct task_struct *p,\n int policy, struct sched_param *lp)" (identifier) "security_task_getscheduler" (parameter_list) "(struct task_struct *p,\n int policy, struct sched_param *lp)" (() "(" (parameter_declaration) "struct task_struct *p" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*p" (*) "*" (identifier) "p" (,) "," (parameter_declaration) "int policy" (primitive_type) "int" (identifier) "policy" (,) "," (parameter_declaration) "struct sched_param *lp" (struct_specifier) "struct sched_param" (struct) "struct" (type_identifier) "sched_param" (pointer_declarator) "*lp" (*) "*" (identifier) "lp" ()) ")" (compound_statement) "{\n return 0;\n}" ({) "{" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "int security_task_setscheduler(struct task_struct *p,\n int policy, struct sched_param *lp)\n{\n return 0;\n}" (primitive_type) "int" (function_declarator) "security_task_setscheduler(struct task_struct *p,\n int policy, struct sched_param *lp)" (identifier) "security_task_setscheduler" (parameter_list) "(struct task_struct *p,\n int policy, struct sched_param *lp)" (() "(" (parameter_declaration) "struct task_struct *p" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*p" (*) "*" (identifier) "p" (,) "," (parameter_declaration) "int policy" (primitive_type) "int" (identifier) "policy" (,) "," (parameter_declaration) "struct sched_param *lp" (struct_specifier) "struct sched_param" (struct) "struct" (type_identifier) "sched_param" (pointer_declarator) "*lp" (*) "*" (identifier) "lp" ()) ")" (compound_statement) "{\n return 0;\n}" ({) "{" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "int cap_task_setnice(struct task_struct *p, int nice)\n{\n return 1;\n}" (primitive_type) "int" (function_declarator) "cap_task_setnice(struct task_struct *p, int nice)" (identifier) "cap_task_setnice" (parameter_list) "(struct task_struct *p, int nice)" (() "(" (parameter_declaration) "struct task_struct *p" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*p" (*) "*" (identifier) "p" (,) "," (parameter_declaration) "int nice" (primitive_type) "int" (identifier) "nice" ()) ")" (compound_statement) "{\n return 1;\n}" ({) "{" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (function_definition) "int cap_task_setscheduler(struct task_struct *p, int policy,\n struct sched_param *lp)\n{\n return 1;\n}" (primitive_type) "int" (function_declarator) "cap_task_setscheduler(struct task_struct *p, int policy,\n struct sched_param *lp)" (identifier) "cap_task_setscheduler" (parameter_list) "(struct task_struct *p, int policy,\n struct sched_param *lp)" (() "(" (parameter_declaration) "struct task_struct *p" (struct_specifier) "struct task_struct" (struct) "struct" (type_identifier) "task_struct" (pointer_declarator) "*p" (*) "*" (identifier) "p" (,) "," (parameter_declaration) "int policy" (primitive_type) "int" (identifier) "policy" (,) "," (parameter_declaration) "struct sched_param *lp" (struct_specifier) "struct sched_param" (struct) "struct" (type_identifier) "sched_param" (pointer_declarator) "*lp" (*) "*" (identifier) "lp" ()) ")" (compound_statement) "{\n return 1;\n}" ({) "{" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}"
1,188
2
{"language": "c", "success": true, "metadata": {"lines": 162, "avg_line_length": 25.66, "nodes": 776, "errors": 0, "source_hash": "825a1172372062599ded2059eddd1409b95c6d3ee806c0dd6ab3e90cbd871b86", "categorized_nodes": 529}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"linsched.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": "\"linsched.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 21}}, {"id": 3, "type": "preproc_include", "text": "#include <assert.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": "<assert.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "declaration", "text": "char __sched_text_start[1];", "parent": null, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 27}}, {"id": 7, "type": "primitive_type", "text": "char", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 4}}, {"id": 8, "type": "array_declarator", "text": "__sched_text_start[1]", "parent": 6, "children": [9, 10], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 26}}, {"id": 9, "type": "identifier", "text": "__sched_text_start", "parent": 8, "children": [], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 23}}, {"id": 10, "type": "number_literal", "text": "1", "parent": 8, "children": [], "start_point": {"row": 4, "column": 24}, "end_point": {"row": 4, "column": 25}}, {"id": 11, "type": "declaration", "text": "char __sched_text_end[1];", "parent": null, "children": [12, 13], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 25}}, {"id": 12, "type": "primitive_type", "text": "char", "parent": 11, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 4}}, {"id": 13, "type": "array_declarator", "text": "__sched_text_end[1]", "parent": 11, "children": [14, 15], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 24}}, {"id": 14, "type": "identifier", "text": "__sched_text_end", "parent": 13, "children": [], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 21}}, {"id": 15, "type": "number_literal", "text": "1", "parent": 13, "children": [], "start_point": {"row": 5, "column": 22}, "end_point": {"row": 5, "column": 23}}, {"id": 16, "type": "declaration", "text": "static struct rcu_head *rcu_head;", "parent": null, "children": [17, 20], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 33}}, {"id": 17, "type": "struct_specifier", "text": "struct rcu_head", "parent": 16, "children": [18, 19], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 22}}, {"id": 18, "type": "struct", "text": "struct", "parent": 17, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 13}}, {"id": 19, "type": "type_identifier", "text": "rcu_head", "parent": 17, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 22}}, {"id": 20, "type": "pointer_declarator", "text": "*rcu_head", "parent": 16, "children": [21, 22], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 32}}, {"id": 21, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 24}}, {"id": 22, "type": "identifier", "text": "rcu_head", "parent": 20, "children": [], "start_point": {"row": 7, "column": 24}, "end_point": {"row": 7, "column": 32}}, {"id": 23, "type": "declaration", "text": "static struct rcu_head **rcu_curtail = &rcu_head;", "parent": null, "children": [24, 27], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 49}}, {"id": 24, "type": "struct_specifier", "text": "struct rcu_head", "parent": 23, "children": [25, 26], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 22}}, {"id": 25, "type": "struct", "text": "struct", "parent": 24, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 13}}, {"id": 26, "type": "type_identifier", "text": "rcu_head", "parent": 24, "children": [], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 22}}, {"id": 27, "type": "init_declarator", "text": "**rcu_curtail = &rcu_head", "parent": 23, "children": [28, 33, 34], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 48}}, {"id": 28, "type": "pointer_declarator", "text": "**rcu_curtail", "parent": 27, "children": [29, 30], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 36}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 24}}, {"id": 30, "type": "pointer_declarator", "text": "*rcu_curtail", "parent": 28, "children": [31, 32], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 36}}, {"id": 31, "type": "*", "text": "*", "parent": 30, "children": [], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 25}}, {"id": 32, "type": "identifier", "text": "rcu_curtail", "parent": 30, "children": [], "start_point": {"row": 8, "column": 25}, "end_point": {"row": 8, "column": 36}}, {"id": 33, "type": "=", "text": "=", "parent": 27, "children": [], "start_point": {"row": 8, "column": 37}, "end_point": {"row": 8, "column": 38}}, {"id": 34, "type": "pointer_expression", "text": "&rcu_head", "parent": 27, "children": [35], "start_point": {"row": 8, "column": 39}, "end_point": {"row": 8, "column": 48}}, {"id": 35, "type": "identifier", "text": "rcu_head", "parent": 34, "children": [], "start_point": {"row": 8, "column": 40}, "end_point": {"row": 8, "column": 48}}, {"id": 36, "type": "function_definition", "text": "void call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu))\n{\n\thead->func = func;\n\thead->next = NULL;\n\n\t*rcu_curtail = head;\n\trcu_curtail = &head->next;\n}", "parent": null, "children": [37, 38], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 37, "type": "primitive_type", "text": "void", "parent": 36, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 4}}, {"id": 38, "type": "function_declarator", "text": "call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu))", "parent": 36, "children": [39, 40], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 78}}, {"id": 39, "type": "identifier", "text": "call_rcu_sched", "parent": 38, "children": [], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 19}}, {"id": 40, "type": "parameter_list", "text": "(struct rcu_head *head, void (*func)(struct rcu_head *rcu))", "parent": 38, "children": [41, 48], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 78}}, {"id": 41, "type": "parameter_declaration", "text": "struct rcu_head *head", "parent": 40, "children": [42, 45], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 41}}, {"id": 42, "type": "struct_specifier", "text": "struct rcu_head", "parent": 41, "children": [43, 44], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 35}}, {"id": 43, "type": "struct", "text": "struct", "parent": 42, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 26}}, {"id": 44, "type": "type_identifier", "text": "rcu_head", "parent": 42, "children": [], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 35}}, {"id": 45, "type": "pointer_declarator", "text": "*head", "parent": 41, "children": [46, 47], "start_point": {"row": 10, "column": 36}, "end_point": {"row": 10, "column": 41}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 10, "column": 36}, "end_point": {"row": 10, "column": 37}}, {"id": 47, "type": "identifier", "text": "head", "parent": 45, "children": [], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 41}}, {"id": 48, "type": "parameter_declaration", "text": "void (*func)(struct rcu_head *rcu)", "parent": 40, "children": [49, 50], "start_point": {"row": 10, "column": 43}, "end_point": {"row": 10, "column": 77}}, {"id": 49, "type": "primitive_type", "text": "void", "parent": 48, "children": [], "start_point": {"row": 10, "column": 43}, "end_point": {"row": 10, "column": 47}}, {"id": 50, "type": "function_declarator", "text": "(*func)(struct rcu_head *rcu)", "parent": 48, "children": [51, 55], "start_point": {"row": 10, "column": 48}, "end_point": {"row": 10, "column": 77}}, {"id": 51, "type": "parenthesized_declarator", "text": "(*func)", "parent": 50, "children": [52], "start_point": {"row": 10, "column": 48}, "end_point": {"row": 10, "column": 55}}, {"id": 52, "type": "pointer_declarator", "text": "*func", "parent": 51, "children": [53, 54], "start_point": {"row": 10, "column": 49}, "end_point": {"row": 10, "column": 54}}, {"id": 53, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 10, "column": 49}, "end_point": {"row": 10, "column": 50}}, {"id": 54, "type": "identifier", "text": "func", "parent": 52, "children": [], "start_point": {"row": 10, "column": 50}, "end_point": {"row": 10, "column": 54}}, {"id": 55, "type": "parameter_list", "text": "(struct rcu_head *rcu)", "parent": 50, "children": [56], "start_point": {"row": 10, "column": 55}, "end_point": {"row": 10, "column": 77}}, {"id": 56, "type": "parameter_declaration", "text": "struct rcu_head *rcu", "parent": 55, "children": [57, 60], "start_point": {"row": 10, "column": 56}, "end_point": {"row": 10, "column": 76}}, {"id": 57, "type": "struct_specifier", "text": "struct rcu_head", "parent": 56, "children": [58, 59], "start_point": {"row": 10, "column": 56}, "end_point": {"row": 10, "column": 71}}, {"id": 58, "type": "struct", "text": "struct", "parent": 57, "children": [], "start_point": {"row": 10, "column": 56}, "end_point": {"row": 10, "column": 62}}, {"id": 59, "type": "type_identifier", "text": "rcu_head", "parent": 57, "children": [], "start_point": {"row": 10, "column": 63}, "end_point": {"row": 10, "column": 71}}, {"id": 60, "type": "pointer_declarator", "text": "*rcu", "parent": 56, "children": [61, 62], "start_point": {"row": 10, "column": 72}, "end_point": {"row": 10, "column": 76}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 10, "column": 72}, "end_point": {"row": 10, "column": 73}}, {"id": 62, "type": "identifier", "text": "rcu", "parent": 60, "children": [], "start_point": {"row": 10, "column": 73}, "end_point": {"row": 10, "column": 76}}, {"id": 63, "type": "assignment_expression", "text": "head->func = func", "parent": 36, "children": [64, 67, 68], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 18}}, {"id": 64, "type": "field_expression", "text": "head->func", "parent": 63, "children": [65, 66], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 11}}, {"id": 65, "type": "identifier", "text": "head", "parent": 64, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 5}}, {"id": 66, "type": "field_identifier", "text": "func", "parent": 64, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 11}}, {"id": 67, "type": "=", "text": "=", "parent": 63, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 13}}, {"id": 68, "type": "identifier", "text": "func", "parent": 63, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 18}}, {"id": 69, "type": "assignment_expression", "text": "head->next = NULL", "parent": 36, "children": [70, 73, 74], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 18}}, {"id": 70, "type": "field_expression", "text": "head->next", "parent": 69, "children": [71, 72], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 11}}, {"id": 71, "type": "identifier", "text": "head", "parent": 70, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 5}}, {"id": 72, "type": "field_identifier", "text": "next", "parent": 70, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 11}}, {"id": 73, "type": "=", "text": "=", "parent": 69, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 13}}, {"id": 74, "type": "null", "text": "NULL", "parent": 69, "children": [75], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 18}}, {"id": 75, "type": "NULL", "text": "NULL", "parent": 74, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 18}}, {"id": 76, "type": "assignment_expression", "text": "*rcu_curtail = head", "parent": 36, "children": [77, 80, 81], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 20}}, {"id": 77, "type": "pointer_expression", "text": "*rcu_curtail", "parent": 76, "children": [78, 79], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 13}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 2}}, {"id": 79, "type": "identifier", "text": "rcu_curtail", "parent": 77, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 13}}, {"id": 80, "type": "=", "text": "=", "parent": 76, "children": [], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 15}}, {"id": 81, "type": "identifier", "text": "head", "parent": 76, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 20}}, {"id": 82, "type": "assignment_expression", "text": "rcu_curtail = &head->next", "parent": 36, "children": [83, 84, 85], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 26}}, {"id": 83, "type": "identifier", "text": "rcu_curtail", "parent": 82, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 12}}, {"id": 84, "type": "=", "text": "=", "parent": 82, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 14}}, {"id": 85, "type": "pointer_expression", "text": "&head->next", "parent": 82, "children": [86], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 26}}, {"id": 86, "type": "field_expression", "text": "head->next", "parent": 85, "children": [87, 88], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 26}}, {"id": 87, "type": "identifier", "text": "head", "parent": 86, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 20}}, {"id": 88, "type": "field_identifier", "text": "next", "parent": 86, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 26}}, {"id": 89, "type": "function_definition", "text": "void linsched_rcu_invoke(void)\n{\n\twhile(rcu_head) {\n\t\tstruct rcu_head *next = rcu_head->next;\n\t\trcu_head->func(rcu_head);\n\t\trcu_head = next;\n\t}\n}", "parent": null, "children": [90, 91], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 90, "type": "primitive_type", "text": "void", "parent": 89, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 4}}, {"id": 91, "type": "function_declarator", "text": "linsched_rcu_invoke(void)", "parent": 89, "children": [92, 93], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 30}}, {"id": 92, "type": "identifier", "text": "linsched_rcu_invoke", "parent": 91, "children": [], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 24}}, {"id": 93, "type": "parameter_list", "text": "(void)", "parent": 91, "children": [94], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 30}}, {"id": 94, "type": "parameter_declaration", "text": "void", "parent": 93, "children": [95], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 29}}, {"id": 95, "type": "primitive_type", "text": "void", "parent": 94, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 29}}, {"id": 96, "type": "while_statement", "text": "while(rcu_head) {\n\t\tstruct rcu_head *next = rcu_head->next;\n\t\trcu_head->func(rcu_head);\n\t\trcu_head = next;\n\t}", "parent": 89, "children": [97], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 25, "column": 2}}, {"id": 97, "type": "parenthesized_expression", "text": "(rcu_head)", "parent": 96, "children": [98], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 16}}, {"id": 98, "type": "identifier", "text": "rcu_head", "parent": 97, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 15}}, {"id": 99, "type": "declaration", "text": "struct rcu_head *next = rcu_head->next;", "parent": 96, "children": [100, 103], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 41}}, {"id": 100, "type": "struct_specifier", "text": "struct rcu_head", "parent": 99, "children": [101, 102], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 17}}, {"id": 101, "type": "struct", "text": "struct", "parent": 100, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 8}}, {"id": 102, "type": "type_identifier", "text": "rcu_head", "parent": 100, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 17}}, {"id": 103, "type": "init_declarator", "text": "*next = rcu_head->next", "parent": 99, "children": [104, 107, 108], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 40}}, {"id": 104, "type": "pointer_declarator", "text": "*next", "parent": 103, "children": [105, 106], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 23}}, {"id": 105, "type": "*", "text": "*", "parent": 104, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 19}}, {"id": 106, "type": "identifier", "text": "next", "parent": 104, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 23}}, {"id": 107, "type": "=", "text": "=", "parent": 103, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 25}}, {"id": 108, "type": "field_expression", "text": "rcu_head->next", "parent": 103, "children": [109, 110], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 40}}, {"id": 109, "type": "identifier", "text": "rcu_head", "parent": 108, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 34}}, {"id": 110, "type": "field_identifier", "text": "next", "parent": 108, "children": [], "start_point": {"row": 22, "column": 36}, "end_point": {"row": 22, "column": 40}}, {"id": 111, "type": "call_expression", "text": "rcu_head->func(rcu_head)", "parent": 96, "children": [112, 115], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 26}}, {"id": 112, "type": "field_expression", "text": "rcu_head->func", "parent": 111, "children": [113, 114], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 16}}, {"id": 113, "type": "identifier", "text": "rcu_head", "parent": 112, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 10}}, {"id": 114, "type": "field_identifier", "text": "func", "parent": 112, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 16}}, {"id": 115, "type": "argument_list", "text": "(rcu_head)", "parent": 111, "children": [116], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 26}}, {"id": 116, "type": "identifier", "text": "rcu_head", "parent": 115, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 25}}, {"id": 117, "type": "assignment_expression", "text": "rcu_head = next", "parent": 96, "children": [118, 119, 120], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 17}}, {"id": 118, "type": "identifier", "text": "rcu_head", "parent": 117, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 10}}, {"id": 119, "type": "=", "text": "=", "parent": 117, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 12}}, {"id": 120, "type": "identifier", "text": "next", "parent": 117, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 17}}, {"id": 121, "type": "function_definition", "text": "void wq_worker_waking_up(struct task_struct *task, unsigned int cpu) {}", "parent": null, "children": [122, 123], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 71}}, {"id": 122, "type": "primitive_type", "text": "void", "parent": 121, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 4}}, {"id": 123, "type": "function_declarator", "text": "wq_worker_waking_up(struct task_struct *task, unsigned int cpu)", "parent": 121, "children": [124, 125], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 68}}, {"id": 124, "type": "identifier", "text": "wq_worker_waking_up", "parent": 123, "children": [], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 24}}, {"id": 125, "type": "parameter_list", "text": "(struct task_struct *task, unsigned int cpu)", "parent": 123, "children": [126, 133], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 68}}, {"id": 126, "type": "parameter_declaration", "text": "struct task_struct *task", "parent": 125, "children": [127, 130], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 49}}, {"id": 127, "type": "struct_specifier", "text": "struct task_struct", "parent": 126, "children": [128, 129], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 43}}, {"id": 128, "type": "struct", "text": "struct", "parent": 127, "children": [], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 31}}, {"id": 129, "type": "type_identifier", "text": "task_struct", "parent": 127, "children": [], "start_point": {"row": 29, "column": 32}, "end_point": {"row": 29, "column": 43}}, {"id": 130, "type": "pointer_declarator", "text": "*task", "parent": 126, "children": [131, 132], "start_point": {"row": 29, "column": 44}, "end_point": {"row": 29, "column": 49}}, {"id": 131, "type": "*", "text": "*", "parent": 130, "children": [], "start_point": {"row": 29, "column": 44}, "end_point": {"row": 29, "column": 45}}, {"id": 132, "type": "identifier", "text": "task", "parent": 130, "children": [], "start_point": {"row": 29, "column": 45}, "end_point": {"row": 29, "column": 49}}, {"id": 133, "type": "parameter_declaration", "text": "unsigned int cpu", "parent": 125, "children": [134, 137], "start_point": {"row": 29, "column": 51}, "end_point": {"row": 29, "column": 67}}, {"id": 134, "type": "sized_type_specifier", "text": "unsigned int", "parent": 133, "children": [135, 136], "start_point": {"row": 29, "column": 51}, "end_point": {"row": 29, "column": 63}}, {"id": 135, "type": "unsigned", "text": "unsigned", "parent": 134, "children": [], "start_point": {"row": 29, "column": 51}, "end_point": {"row": 29, "column": 59}}, {"id": 136, "type": "primitive_type", "text": "int", "parent": 134, "children": [], "start_point": {"row": 29, "column": 60}, "end_point": {"row": 29, "column": 63}}, {"id": 137, "type": "identifier", "text": "cpu", "parent": 133, "children": [], "start_point": {"row": 29, "column": 64}, "end_point": {"row": 29, "column": 67}}, {"id": 138, "type": "function_definition", "text": "struct task_struct *wq_worker_sleeping(struct task_struct *task,\n\t\t\t\t unsigned int cpu)\n{\n\t/* should be unused */\n\tassert(0);\n\n\treturn NULL;\n}", "parent": null, "children": [139, 142], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 139, "type": "struct_specifier", "text": "struct task_struct", "parent": 138, "children": [140, 141], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 18}}, {"id": 140, "type": "struct", "text": "struct", "parent": 139, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 141, "type": "type_identifier", "text": "task_struct", "parent": 139, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 18}}, {"id": 142, "type": "pointer_declarator", "text": "*wq_worker_sleeping(struct task_struct *task,\n\t\t\t\t unsigned int cpu)", "parent": 138, "children": [143, 144], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 32, "column": 28}}, {"id": 143, "type": "*", "text": "*", "parent": 142, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 20}}, {"id": 144, "type": "function_declarator", "text": "wq_worker_sleeping(struct task_struct *task,\n\t\t\t\t unsigned int cpu)", "parent": 142, "children": [145, 146], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 32, "column": 28}}, {"id": 145, "type": "identifier", "text": "wq_worker_sleeping", "parent": 144, "children": [], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 38}}, {"id": 146, "type": "parameter_list", "text": "(struct task_struct *task,\n\t\t\t\t unsigned int cpu)", "parent": 144, "children": [147, 154], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 32, "column": 28}}, {"id": 147, "type": "parameter_declaration", "text": "struct task_struct *task", "parent": 146, "children": [148, 151], "start_point": {"row": 31, "column": 39}, "end_point": {"row": 31, "column": 63}}, {"id": 148, "type": "struct_specifier", "text": "struct task_struct", "parent": 147, "children": [149, 150], "start_point": {"row": 31, "column": 39}, "end_point": {"row": 31, "column": 57}}, {"id": 149, "type": "struct", "text": "struct", "parent": 148, "children": [], "start_point": {"row": 31, "column": 39}, "end_point": {"row": 31, "column": 45}}, {"id": 150, "type": "type_identifier", "text": "task_struct", "parent": 148, "children": [], "start_point": {"row": 31, "column": 46}, "end_point": {"row": 31, "column": 57}}, {"id": 151, "type": "pointer_declarator", "text": "*task", "parent": 147, "children": [152, 153], "start_point": {"row": 31, "column": 58}, "end_point": {"row": 31, "column": 63}}, {"id": 152, "type": "*", "text": "*", "parent": 151, "children": [], "start_point": {"row": 31, "column": 58}, "end_point": {"row": 31, "column": 59}}, {"id": 153, "type": "identifier", "text": "task", "parent": 151, "children": [], "start_point": {"row": 31, "column": 59}, "end_point": {"row": 31, "column": 63}}, {"id": 154, "type": "parameter_declaration", "text": "unsigned int cpu", "parent": 146, "children": [155, 158], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 27}}, {"id": 155, "type": "sized_type_specifier", "text": "unsigned int", "parent": 154, "children": [156, 157], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 23}}, {"id": 156, "type": "unsigned", "text": "unsigned", "parent": 155, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 19}}, {"id": 157, "type": "primitive_type", "text": "int", "parent": 155, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 23}}, {"id": 158, "type": "identifier", "text": "cpu", "parent": 154, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 27}}, {"id": 159, "type": "call_expression", "text": "assert(0)", "parent": 138, "children": [160, 161], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 10}}, {"id": 160, "type": "identifier", "text": "assert", "parent": 159, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 7}}, {"id": 161, "type": "argument_list", "text": "(0)", "parent": 159, "children": [162], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 10}}, {"id": 162, "type": "number_literal", "text": "0", "parent": 161, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 9}}, {"id": 163, "type": "return_statement", "text": "return NULL;", "parent": 138, "children": [164], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 13}}, {"id": 164, "type": "null", "text": "NULL", "parent": 163, "children": [165], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 12}}, {"id": 165, "type": "NULL", "text": "NULL", "parent": 164, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 12}}, {"id": 166, "type": "function_definition", "text": "int __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)\n{\n\t/* should be unused */\n\tassert(0);\n\n\treturn 0;\n}", "parent": null, "children": [167, 168], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 167, "type": "primitive_type", "text": "int", "parent": 166, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 3}}, {"id": 168, "type": "function_declarator", "text": "__group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)", "parent": 166, "children": [169, 170], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 79}}, {"id": 169, "type": "identifier", "text": "__group_send_sig_info", "parent": 168, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 25}}, {"id": 170, "type": "parameter_list", "text": "(int sig, struct siginfo *info, struct task_struct *p)", "parent": 168, "children": [171, 174, 181], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 79}}, {"id": 171, "type": "parameter_declaration", "text": "int sig", "parent": 170, "children": [172, 173], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 33}}, {"id": 172, "type": "primitive_type", "text": "int", "parent": 171, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 29}}, {"id": 173, "type": "identifier", "text": "sig", "parent": 171, "children": [], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 33}}, {"id": 174, "type": "parameter_declaration", "text": "struct siginfo *info", "parent": 170, "children": [175, 178], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 55}}, {"id": 175, "type": "struct_specifier", "text": "struct siginfo", "parent": 174, "children": [176, 177], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 49}}, {"id": 176, "type": "struct", "text": "struct", "parent": 175, "children": [], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 41}}, {"id": 177, "type": "type_identifier", "text": "siginfo", "parent": 175, "children": [], "start_point": {"row": 41, "column": 42}, "end_point": {"row": 41, "column": 49}}, {"id": 178, "type": "pointer_declarator", "text": "*info", "parent": 174, "children": [179, 180], "start_point": {"row": 41, "column": 50}, "end_point": {"row": 41, "column": 55}}, {"id": 179, "type": "*", "text": "*", "parent": 178, "children": [], "start_point": {"row": 41, "column": 50}, "end_point": {"row": 41, "column": 51}}, {"id": 180, "type": "identifier", "text": "info", "parent": 178, "children": [], "start_point": {"row": 41, "column": 51}, "end_point": {"row": 41, "column": 55}}, {"id": 181, "type": "parameter_declaration", "text": "struct task_struct *p", "parent": 170, "children": [182, 185], "start_point": {"row": 41, "column": 57}, "end_point": {"row": 41, "column": 78}}, {"id": 182, "type": "struct_specifier", "text": "struct task_struct", "parent": 181, "children": [183, 184], "start_point": {"row": 41, "column": 57}, "end_point": {"row": 41, "column": 75}}, {"id": 183, "type": "struct", "text": "struct", "parent": 182, "children": [], "start_point": {"row": 41, "column": 57}, "end_point": {"row": 41, "column": 63}}, {"id": 184, "type": "type_identifier", "text": "task_struct", "parent": 182, "children": [], "start_point": {"row": 41, "column": 64}, "end_point": {"row": 41, "column": 75}}, {"id": 185, "type": "pointer_declarator", "text": "*p", "parent": 181, "children": [186, 187], "start_point": {"row": 41, "column": 76}, "end_point": {"row": 41, "column": 78}}, {"id": 186, "type": "*", "text": "*", "parent": 185, "children": [], "start_point": {"row": 41, "column": 76}, "end_point": {"row": 41, "column": 77}}, {"id": 187, "type": "identifier", "text": "p", "parent": 185, "children": [], "start_point": {"row": 41, "column": 77}, "end_point": {"row": 41, "column": 78}}, {"id": 188, "type": "call_expression", "text": "assert(0)", "parent": 166, "children": [189, 190], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 10}}, {"id": 189, "type": "identifier", "text": "assert", "parent": 188, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 7}}, {"id": 190, "type": "argument_list", "text": "(0)", "parent": 188, "children": [191], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 10}}, {"id": 191, "type": "number_literal", "text": "0", "parent": 190, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 9}}, {"id": 192, "type": "return_statement", "text": "return 0;", "parent": 166, "children": [193], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 10}}, {"id": 193, "type": "number_literal", "text": "0", "parent": 192, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 9}}, {"id": 194, "type": "struct_specifier", "text": "struct k_itimer", "parent": null, "children": [195, 196], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 15}}, {"id": 195, "type": "struct", "text": "struct", "parent": 194, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 6}}, {"id": 196, "type": "type_identifier", "text": "k_itimer", "parent": 194, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 15}}, {"id": 197, "type": "function_definition", "text": "int posix_timer_event(struct k_itimer *timr, int si_private)\n{\n\t/* should be unused */\n\tassert(0);\n\n\treturn 0;\n}", "parent": null, "children": [198, 199], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 198, "type": "primitive_type", "text": "int", "parent": 197, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 3}}, {"id": 199, "type": "function_declarator", "text": "posix_timer_event(struct k_itimer *timr, int si_private)", "parent": 197, "children": [200, 201], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 60}}, {"id": 200, "type": "identifier", "text": "posix_timer_event", "parent": 199, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 21}}, {"id": 201, "type": "parameter_list", "text": "(struct k_itimer *timr, int si_private)", "parent": 199, "children": [202, 209], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 60}}, {"id": 202, "type": "parameter_declaration", "text": "struct k_itimer *timr", "parent": 201, "children": [203, 206], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 43}}, {"id": 203, "type": "struct_specifier", "text": "struct k_itimer", "parent": 202, "children": [204, 205], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 37}}, {"id": 204, "type": "struct", "text": "struct", "parent": 203, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 28}}, {"id": 205, "type": "type_identifier", "text": "k_itimer", "parent": 203, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 37}}, {"id": 206, "type": "pointer_declarator", "text": "*timr", "parent": 202, "children": [207, 208], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 50, "column": 43}}, {"id": 207, "type": "*", "text": "*", "parent": 206, "children": [], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 50, "column": 39}}, {"id": 208, "type": "identifier", "text": "timr", "parent": 206, "children": [], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 43}}, {"id": 209, "type": "parameter_declaration", "text": "int si_private", "parent": 201, "children": [210, 211], "start_point": {"row": 50, "column": 45}, "end_point": {"row": 50, "column": 59}}, {"id": 210, "type": "primitive_type", "text": "int", "parent": 209, "children": [], "start_point": {"row": 50, "column": 45}, "end_point": {"row": 50, "column": 48}}, {"id": 211, "type": "identifier", "text": "si_private", "parent": 209, "children": [], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 59}}, {"id": 212, "type": "call_expression", "text": "assert(0)", "parent": 197, "children": [213, 214], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 10}}, {"id": 213, "type": "identifier", "text": "assert", "parent": 212, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 7}}, {"id": 214, "type": "argument_list", "text": "(0)", "parent": 212, "children": [215], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 10}}, {"id": 215, "type": "number_literal", "text": "0", "parent": 214, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 9}}, {"id": 216, "type": "return_statement", "text": "return 0;", "parent": 197, "children": [217], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 10}}, {"id": 217, "type": "number_literal", "text": "0", "parent": 216, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 9}}, {"id": 218, "type": "struct_specifier", "text": "struct k_clock", "parent": null, "children": [219, 220], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 14}}, {"id": 219, "type": "struct", "text": "struct", "parent": 218, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 6}}, {"id": 220, "type": "type_identifier", "text": "k_clock", "parent": 218, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 14}}, {"id": 221, "type": "function_definition", "text": "void posix_timers_register_clock(const clockid_t clock_id,\n\t\t\t\t struct k_clock *new_clock)\n{\n\t/* should be unused */\n\tassert(0);\n}", "parent": null, "children": [222, 223], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 222, "type": "primitive_type", "text": "void", "parent": 221, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 4}}, {"id": 223, "type": "function_declarator", "text": "posix_timers_register_clock(const clockid_t clock_id,\n\t\t\t\t struct k_clock *new_clock)", "parent": 221, "children": [224, 225], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 60, "column": 31}}, {"id": 224, "type": "identifier", "text": "posix_timers_register_clock", "parent": 223, "children": [], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 32}}, {"id": 225, "type": "parameter_list", "text": "(const clockid_t clock_id,\n\t\t\t\t struct k_clock *new_clock)", "parent": 223, "children": [226, 229], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 60, "column": 31}}, {"id": 226, "type": "parameter_declaration", "text": "const clockid_t clock_id", "parent": 225, "children": [227, 228], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 57}}, {"id": 227, "type": "type_identifier", "text": "clockid_t", "parent": 226, "children": [], "start_point": {"row": 59, "column": 39}, "end_point": {"row": 59, "column": 48}}, {"id": 228, "type": "identifier", "text": "clock_id", "parent": 226, "children": [], "start_point": {"row": 59, "column": 49}, "end_point": {"row": 59, "column": 57}}, {"id": 229, "type": "parameter_declaration", "text": "struct k_clock *new_clock", "parent": 225, "children": [230, 233], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 30}}, {"id": 230, "type": "struct_specifier", "text": "struct k_clock", "parent": 229, "children": [231, 232], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 19}}, {"id": 231, "type": "struct", "text": "struct", "parent": 230, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 11}}, {"id": 232, "type": "type_identifier", "text": "k_clock", "parent": 230, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 19}}, {"id": 233, "type": "pointer_declarator", "text": "*new_clock", "parent": 229, "children": [234, 235], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 30}}, {"id": 234, "type": "*", "text": "*", "parent": 233, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 21}}, {"id": 235, "type": "identifier", "text": "new_clock", "parent": 233, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 30}}, {"id": 236, "type": "call_expression", "text": "assert(0)", "parent": 221, "children": [237, 238], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 10}}, {"id": 237, "type": "identifier", "text": "assert", "parent": 236, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 7}}, {"id": 238, "type": "argument_list", "text": "(0)", "parent": 236, "children": [239], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 10}}, {"id": 239, "type": "number_literal", "text": "0", "parent": 238, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 9}}, {"id": 240, "type": "function_definition", "text": "void __smp_call_function_single(int cpu, struct call_single_data *data,\n\t\t\t\tint wait)\n{\n\tint this_cpu = smp_processor_id();\n\tunsigned long flags;\n\n\tif (cpu != this_cpu)\n\t\tlinsched_change_cpu(cpu);\n\n\tlocal_irq_save(flags);\n\tdata->func(data->info);\n\tlocal_irq_restore(flags);\n\n\tif (cpu != this_cpu)\n\t\tlinsched_change_cpu(this_cpu);\n}", "parent": null, "children": [241, 242], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 82, "column": 1}}, {"id": 241, "type": "primitive_type", "text": "void", "parent": 240, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 4}}, {"id": 242, "type": "function_declarator", "text": "__smp_call_function_single(int cpu, struct call_single_data *data,\n\t\t\t\tint wait)", "parent": 240, "children": [243, 244], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 68, "column": 13}}, {"id": 243, "type": "identifier", "text": "__smp_call_function_single", "parent": 242, "children": [], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 31}}, {"id": 244, "type": "parameter_list", "text": "(int cpu, struct call_single_data *data,\n\t\t\t\tint wait)", "parent": 242, "children": [245, 248, 255], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 68, "column": 13}}, {"id": 245, "type": "parameter_declaration", "text": "int cpu", "parent": 244, "children": [246, 247], "start_point": {"row": 67, "column": 32}, "end_point": {"row": 67, "column": 39}}, {"id": 246, "type": "primitive_type", "text": "int", "parent": 245, "children": [], "start_point": {"row": 67, "column": 32}, "end_point": {"row": 67, "column": 35}}, {"id": 247, "type": "identifier", "text": "cpu", "parent": 245, "children": [], "start_point": {"row": 67, "column": 36}, "end_point": {"row": 67, "column": 39}}, {"id": 248, "type": "parameter_declaration", "text": "struct call_single_data *data", "parent": 244, "children": [249, 252], "start_point": {"row": 67, "column": 41}, "end_point": {"row": 67, "column": 70}}, {"id": 249, "type": "struct_specifier", "text": "struct call_single_data", "parent": 248, "children": [250, 251], "start_point": {"row": 67, "column": 41}, "end_point": {"row": 67, "column": 64}}, {"id": 250, "type": "struct", "text": "struct", "parent": 249, "children": [], "start_point": {"row": 67, "column": 41}, "end_point": {"row": 67, "column": 47}}, {"id": 251, "type": "type_identifier", "text": "call_single_data", "parent": 249, "children": [], "start_point": {"row": 67, "column": 48}, "end_point": {"row": 67, "column": 64}}, {"id": 252, "type": "pointer_declarator", "text": "*data", "parent": 248, "children": [253, 254], "start_point": {"row": 67, "column": 65}, "end_point": {"row": 67, "column": 70}}, {"id": 253, "type": "*", "text": "*", "parent": 252, "children": [], "start_point": {"row": 67, "column": 65}, "end_point": {"row": 67, "column": 66}}, {"id": 254, "type": "identifier", "text": "data", "parent": 252, "children": [], "start_point": {"row": 67, "column": 66}, "end_point": {"row": 67, "column": 70}}, {"id": 255, "type": "parameter_declaration", "text": "int wait", "parent": 244, "children": [256, 257], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 12}}, {"id": 256, "type": "primitive_type", "text": "int", "parent": 255, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 7}}, {"id": 257, "type": "identifier", "text": "wait", "parent": 255, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 12}}, {"id": 258, "type": "declaration", "text": "int this_cpu = smp_processor_id();", "parent": 240, "children": [259, 260], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 35}}, {"id": 259, "type": "primitive_type", "text": "int", "parent": 258, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 4}}, {"id": 260, "type": "init_declarator", "text": "this_cpu = smp_processor_id()", "parent": 258, "children": [261, 262, 263], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 34}}, {"id": 261, "type": "identifier", "text": "this_cpu", "parent": 260, "children": [], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 13}}, {"id": 262, "type": "=", "text": "=", "parent": 260, "children": [], "start_point": {"row": 70, "column": 14}, "end_point": {"row": 70, "column": 15}}, {"id": 263, "type": "call_expression", "text": "smp_processor_id()", "parent": 260, "children": [264, 265], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 34}}, {"id": 264, "type": "identifier", "text": "smp_processor_id", "parent": 263, "children": [], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 32}}, {"id": 265, "type": "argument_list", "text": "()", "parent": 263, "children": [], "start_point": {"row": 70, "column": 32}, "end_point": {"row": 70, "column": 34}}, {"id": 266, "type": "declaration", "text": "unsigned long flags;", "parent": 240, "children": [267, 270], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 21}}, {"id": 267, "type": "sized_type_specifier", "text": "unsigned long", "parent": 266, "children": [268, 269], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 14}}, {"id": 268, "type": "unsigned", "text": "unsigned", "parent": 267, "children": [], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 9}}, {"id": 269, "type": "long", "text": "long", "parent": 267, "children": [], "start_point": {"row": 71, "column": 10}, "end_point": {"row": 71, "column": 14}}, {"id": 270, "type": "identifier", "text": "flags", "parent": 266, "children": [], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 20}}, {"id": 271, "type": "if_statement", "text": "if (cpu != this_cpu)\n\t\tlinsched_change_cpu(cpu);", "parent": 240, "children": [272], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 74, "column": 27}}, {"id": 272, "type": "parenthesized_expression", "text": "(cpu != this_cpu)", "parent": 271, "children": [273], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 21}}, {"id": 273, "type": "binary_expression", "text": "cpu != this_cpu", "parent": 272, "children": [274, 275, 276], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 20}}, {"id": 274, "type": "identifier", "text": "cpu", "parent": 273, "children": [], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 8}}, {"id": 275, "type": "!=", "text": "!=", "parent": 273, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 11}}, {"id": 276, "type": "identifier", "text": "this_cpu", "parent": 273, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 20}}, {"id": 277, "type": "call_expression", "text": "linsched_change_cpu(cpu)", "parent": 271, "children": [278, 279], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 26}}, {"id": 278, "type": "identifier", "text": "linsched_change_cpu", "parent": 277, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 21}}, {"id": 279, "type": "argument_list", "text": "(cpu)", "parent": 277, "children": [280], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 26}}, {"id": 280, "type": "identifier", "text": "cpu", "parent": 279, "children": [], "start_point": {"row": 74, "column": 22}, "end_point": {"row": 74, "column": 25}}, {"id": 281, "type": "call_expression", "text": "local_irq_save(flags)", "parent": 240, "children": [282, 283], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 22}}, {"id": 282, "type": "identifier", "text": "local_irq_save", "parent": 281, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 15}}, {"id": 283, "type": "argument_list", "text": "(flags)", "parent": 281, "children": [284], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 22}}, {"id": 284, "type": "identifier", "text": "flags", "parent": 283, "children": [], "start_point": {"row": 76, "column": 16}, "end_point": {"row": 76, "column": 21}}, {"id": 285, "type": "call_expression", "text": "data->func(data->info)", "parent": 240, "children": [286, 289], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 23}}, {"id": 286, "type": "field_expression", "text": "data->func", "parent": 285, "children": [287, 288], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 11}}, {"id": 287, "type": "identifier", "text": "data", "parent": 286, "children": [], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 5}}, {"id": 288, "type": "field_identifier", "text": "func", "parent": 286, "children": [], "start_point": {"row": 77, "column": 7}, "end_point": {"row": 77, "column": 11}}, {"id": 289, "type": "argument_list", "text": "(data->info)", "parent": 285, "children": [290], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 23}}, {"id": 290, "type": "field_expression", "text": "data->info", "parent": 289, "children": [291, 292], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 22}}, {"id": 291, "type": "identifier", "text": "data", "parent": 290, "children": [], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 16}}, {"id": 292, "type": "field_identifier", "text": "info", "parent": 290, "children": [], "start_point": {"row": 77, "column": 18}, "end_point": {"row": 77, "column": 22}}, {"id": 293, "type": "call_expression", "text": "local_irq_restore(flags)", "parent": 240, "children": [294, 295], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 25}}, {"id": 294, "type": "identifier", "text": "local_irq_restore", "parent": 293, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 18}}, {"id": 295, "type": "argument_list", "text": "(flags)", "parent": 293, "children": [296], "start_point": {"row": 78, "column": 18}, "end_point": {"row": 78, "column": 25}}, {"id": 296, "type": "identifier", "text": "flags", "parent": 295, "children": [], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 24}}, {"id": 297, "type": "if_statement", "text": "if (cpu != this_cpu)\n\t\tlinsched_change_cpu(this_cpu);", "parent": 240, "children": [298], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 81, "column": 32}}, {"id": 298, "type": "parenthesized_expression", "text": "(cpu != this_cpu)", "parent": 297, "children": [299], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 21}}, {"id": 299, "type": "binary_expression", "text": "cpu != this_cpu", "parent": 298, "children": [300, 301, 302], "start_point": {"row": 80, "column": 5}, "end_point": {"row": 80, "column": 20}}, {"id": 300, "type": "identifier", "text": "cpu", "parent": 299, "children": [], "start_point": {"row": 80, "column": 5}, "end_point": {"row": 80, "column": 8}}, {"id": 301, "type": "!=", "text": "!=", "parent": 299, "children": [], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 11}}, {"id": 302, "type": "identifier", "text": "this_cpu", "parent": 299, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 20}}, {"id": 303, "type": "call_expression", "text": "linsched_change_cpu(this_cpu)", "parent": 297, "children": [304, 305], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 31}}, {"id": 304, "type": "identifier", "text": "linsched_change_cpu", "parent": 303, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 21}}, {"id": 305, "type": "argument_list", "text": "(this_cpu)", "parent": 303, "children": [306], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 31}}, {"id": 306, "type": "identifier", "text": "this_cpu", "parent": 305, "children": [], "start_point": {"row": 81, "column": 22}, "end_point": {"row": 81, "column": 30}}, {"id": 307, "type": "declaration", "text": "void wake_up_stop_task(int cpu, cpu_stop_fn_t fxn, void *data);", "parent": null, "children": [308, 309], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 63}}, {"id": 308, "type": "primitive_type", "text": "void", "parent": 307, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 4}}, {"id": 309, "type": "function_declarator", "text": "wake_up_stop_task(int cpu, cpu_stop_fn_t fxn, void *data)", "parent": 307, "children": [310, 311], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 62}}, {"id": 310, "type": "identifier", "text": "wake_up_stop_task", "parent": 309, "children": [], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 22}}, {"id": 311, "type": "parameter_list", "text": "(int cpu, cpu_stop_fn_t fxn, void *data)", "parent": 309, "children": [312, 315, 318], "start_point": {"row": 85, "column": 22}, "end_point": {"row": 85, "column": 62}}, {"id": 312, "type": "parameter_declaration", "text": "int cpu", "parent": 311, "children": [313, 314], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 30}}, {"id": 313, "type": "primitive_type", "text": "int", "parent": 312, "children": [], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 26}}, {"id": 314, "type": "identifier", "text": "cpu", "parent": 312, "children": [], "start_point": {"row": 85, "column": 27}, "end_point": {"row": 85, "column": 30}}, {"id": 315, "type": "parameter_declaration", "text": "cpu_stop_fn_t fxn", "parent": 311, "children": [316, 317], "start_point": {"row": 85, "column": 32}, "end_point": {"row": 85, "column": 49}}, {"id": 316, "type": "type_identifier", "text": "cpu_stop_fn_t", "parent": 315, "children": [], "start_point": {"row": 85, "column": 32}, "end_point": {"row": 85, "column": 45}}, {"id": 317, "type": "identifier", "text": "fxn", "parent": 315, "children": [], "start_point": {"row": 85, "column": 46}, "end_point": {"row": 85, "column": 49}}, {"id": 318, "type": "parameter_declaration", "text": "void *data", "parent": 311, "children": [319, 320], "start_point": {"row": 85, "column": 51}, "end_point": {"row": 85, "column": 61}}, {"id": 319, "type": "primitive_type", "text": "void", "parent": 318, "children": [], "start_point": {"row": 85, "column": 51}, "end_point": {"row": 85, "column": 55}}, {"id": 320, "type": "pointer_declarator", "text": "*data", "parent": 318, "children": [321, 322], "start_point": {"row": 85, "column": 56}, "end_point": {"row": 85, "column": 61}}, {"id": 321, "type": "*", "text": "*", "parent": 320, "children": [], "start_point": {"row": 85, "column": 56}, "end_point": {"row": 85, "column": 57}}, {"id": 322, "type": "identifier", "text": "data", "parent": 320, "children": [], "start_point": {"row": 85, "column": 57}, "end_point": {"row": 85, "column": 61}}, {"id": 323, "type": "declaration", "text": "void linsched_current_handler(void);", "parent": null, "children": [324, 325], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 36}}, {"id": 324, "type": "primitive_type", "text": "void", "parent": 323, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 4}}, {"id": 325, "type": "function_declarator", "text": "linsched_current_handler(void)", "parent": 323, "children": [326, 327], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 35}}, {"id": 326, "type": "identifier", "text": "linsched_current_handler", "parent": 325, "children": [], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 29}}, {"id": 327, "type": "parameter_list", "text": "(void)", "parent": 325, "children": [328], "start_point": {"row": 88, "column": 29}, "end_point": {"row": 88, "column": 35}}, {"id": 328, "type": "parameter_declaration", "text": "void", "parent": 327, "children": [329], "start_point": {"row": 88, "column": 30}, "end_point": {"row": 88, "column": 34}}, {"id": 329, "type": "primitive_type", "text": "void", "parent": 328, "children": [], "start_point": {"row": 88, "column": 30}, "end_point": {"row": 88, "column": 34}}, {"id": 330, "type": "function_definition", "text": "int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fxn, void *arg)\n{\n\tstruct task_struct *stop = stop_tasks[cpu];\n\tint this_cpu = smp_processor_id(), ret;\n\n\tlinsched_change_cpu(cpu);\n\twake_up_process(stop);\n\t/* switch to stop */\n\tschedule();\n\tBUG_ON(current != stop);\n\tret = fxn(arg);\n\t/* switch back */\n\tstop->state = TASK_INTERRUPTIBLE;\n\tschedule();\n\n\t/* let whoever followed the stop task re-program (if needed) */\n\tlinsched_current_handler();\n\tBUG_ON(current == stop);\n\tlinsched_change_cpu(this_cpu);\n\n\treturn ret;\n}", "parent": null, "children": [331, 332], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 111, "column": 1}}, {"id": 331, "type": "primitive_type", "text": "int", "parent": 330, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 3}}, {"id": 332, "type": "function_declarator", "text": "stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fxn, void *arg)", "parent": 330, "children": [333, 334], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 64}}, {"id": 333, "type": "identifier", "text": "stop_one_cpu", "parent": 332, "children": [], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 16}}, {"id": 334, "type": "parameter_list", "text": "(unsigned int cpu, cpu_stop_fn_t fxn, void *arg)", "parent": 332, "children": [335, 340, 343], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 64}}, {"id": 335, "type": "parameter_declaration", "text": "unsigned int cpu", "parent": 334, "children": [336, 339], "start_point": {"row": 90, "column": 17}, "end_point": {"row": 90, "column": 33}}, {"id": 336, "type": "sized_type_specifier", "text": "unsigned int", "parent": 335, "children": [337, 338], "start_point": {"row": 90, "column": 17}, "end_point": {"row": 90, "column": 29}}, {"id": 337, "type": "unsigned", "text": "unsigned", "parent": 336, "children": [], "start_point": {"row": 90, "column": 17}, "end_point": {"row": 90, "column": 25}}, {"id": 338, "type": "primitive_type", "text": "int", "parent": 336, "children": [], "start_point": {"row": 90, "column": 26}, "end_point": {"row": 90, "column": 29}}, {"id": 339, "type": "identifier", "text": "cpu", "parent": 335, "children": [], "start_point": {"row": 90, "column": 30}, "end_point": {"row": 90, "column": 33}}, {"id": 340, "type": "parameter_declaration", "text": "cpu_stop_fn_t fxn", "parent": 334, "children": [341, 342], "start_point": {"row": 90, "column": 35}, "end_point": {"row": 90, "column": 52}}, {"id": 341, "type": "type_identifier", "text": "cpu_stop_fn_t", "parent": 340, "children": [], "start_point": {"row": 90, "column": 35}, "end_point": {"row": 90, "column": 48}}, {"id": 342, "type": "identifier", "text": "fxn", "parent": 340, "children": [], "start_point": {"row": 90, "column": 49}, "end_point": {"row": 90, "column": 52}}, {"id": 343, "type": "parameter_declaration", "text": "void *arg", "parent": 334, "children": [344, 345], "start_point": {"row": 90, "column": 54}, "end_point": {"row": 90, "column": 63}}, {"id": 344, "type": "primitive_type", "text": "void", "parent": 343, "children": [], "start_point": {"row": 90, "column": 54}, "end_point": {"row": 90, "column": 58}}, {"id": 345, "type": "pointer_declarator", "text": "*arg", "parent": 343, "children": [346, 347], "start_point": {"row": 90, "column": 59}, "end_point": {"row": 90, "column": 63}}, {"id": 346, "type": "*", "text": "*", "parent": 345, "children": [], "start_point": {"row": 90, "column": 59}, "end_point": {"row": 90, "column": 60}}, {"id": 347, "type": "identifier", "text": "arg", "parent": 345, "children": [], "start_point": {"row": 90, "column": 60}, "end_point": {"row": 90, "column": 63}}, {"id": 348, "type": "declaration", "text": "struct task_struct *stop = stop_tasks[cpu];", "parent": 330, "children": [349, 352], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 44}}, {"id": 349, "type": "struct_specifier", "text": "struct task_struct", "parent": 348, "children": [350, 351], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 19}}, {"id": 350, "type": "struct", "text": "struct", "parent": 349, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 7}}, {"id": 351, "type": "type_identifier", "text": "task_struct", "parent": 349, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 19}}, {"id": 352, "type": "init_declarator", "text": "*stop = stop_tasks[cpu]", "parent": 348, "children": [353, 356, 357], "start_point": {"row": 92, "column": 20}, "end_point": {"row": 92, "column": 43}}, {"id": 353, "type": "pointer_declarator", "text": "*stop", "parent": 352, "children": [354, 355], "start_point": {"row": 92, "column": 20}, "end_point": {"row": 92, "column": 25}}, {"id": 354, "type": "*", "text": "*", "parent": 353, "children": [], "start_point": {"row": 92, "column": 20}, "end_point": {"row": 92, "column": 21}}, {"id": 355, "type": "identifier", "text": "stop", "parent": 353, "children": [], "start_point": {"row": 92, "column": 21}, "end_point": {"row": 92, "column": 25}}, {"id": 356, "type": "=", "text": "=", "parent": 352, "children": [], "start_point": {"row": 92, "column": 26}, "end_point": {"row": 92, "column": 27}}, {"id": 357, "type": "subscript_expression", "text": "stop_tasks[cpu]", "parent": 352, "children": [358, 359], "start_point": {"row": 92, "column": 28}, "end_point": {"row": 92, "column": 43}}, {"id": 358, "type": "identifier", "text": "stop_tasks", "parent": 357, "children": [], "start_point": {"row": 92, "column": 28}, "end_point": {"row": 92, "column": 38}}, {"id": 359, "type": "identifier", "text": "cpu", "parent": 357, "children": [], "start_point": {"row": 92, "column": 39}, "end_point": {"row": 92, "column": 42}}, {"id": 360, "type": "declaration", "text": "int this_cpu = smp_processor_id(), ret;", "parent": 330, "children": [361, 362, 368], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 40}}, {"id": 361, "type": "primitive_type", "text": "int", "parent": 360, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 4}}, {"id": 362, "type": "init_declarator", "text": "this_cpu = smp_processor_id()", "parent": 360, "children": [363, 364, 365], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 34}}, {"id": 363, "type": "identifier", "text": "this_cpu", "parent": 362, "children": [], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 13}}, {"id": 364, "type": "=", "text": "=", "parent": 362, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 15}}, {"id": 365, "type": "call_expression", "text": "smp_processor_id()", "parent": 362, "children": [366, 367], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 34}}, {"id": 366, "type": "identifier", "text": "smp_processor_id", "parent": 365, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 32}}, {"id": 367, "type": "argument_list", "text": "()", "parent": 365, "children": [], "start_point": {"row": 93, "column": 32}, "end_point": {"row": 93, "column": 34}}, {"id": 368, "type": "identifier", "text": "ret", "parent": 360, "children": [], "start_point": {"row": 93, "column": 36}, "end_point": {"row": 93, "column": 39}}, {"id": 369, "type": "call_expression", "text": "linsched_change_cpu(cpu)", "parent": 330, "children": [370, 371], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 25}}, {"id": 370, "type": "identifier", "text": "linsched_change_cpu", "parent": 369, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 20}}, {"id": 371, "type": "argument_list", "text": "(cpu)", "parent": 369, "children": [372], "start_point": {"row": 95, "column": 20}, "end_point": {"row": 95, "column": 25}}, {"id": 372, "type": "identifier", "text": "cpu", "parent": 371, "children": [], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 24}}, {"id": 373, "type": "call_expression", "text": "wake_up_process(stop)", "parent": 330, "children": [374, 375], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 22}}, {"id": 374, "type": "identifier", "text": "wake_up_process", "parent": 373, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 16}}, {"id": 375, "type": "argument_list", "text": "(stop)", "parent": 373, "children": [376], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 22}}, {"id": 376, "type": "identifier", "text": "stop", "parent": 375, "children": [], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 21}}, {"id": 377, "type": "call_expression", "text": "schedule()", "parent": 330, "children": [378, 379], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 11}}, {"id": 378, "type": "identifier", "text": "schedule", "parent": 377, "children": [], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 9}}, {"id": 379, "type": "argument_list", "text": "()", "parent": 377, "children": [], "start_point": {"row": 98, "column": 9}, "end_point": {"row": 98, "column": 11}}, {"id": 380, "type": "call_expression", "text": "BUG_ON(current != stop)", "parent": 330, "children": [381, 382], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 24}}, {"id": 381, "type": "identifier", "text": "BUG_ON", "parent": 380, "children": [], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 7}}, {"id": 382, "type": "argument_list", "text": "(current != stop)", "parent": 380, "children": [383], "start_point": {"row": 99, "column": 7}, "end_point": {"row": 99, "column": 24}}, {"id": 383, "type": "binary_expression", "text": "current != stop", "parent": 382, "children": [384, 385, 386], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 23}}, {"id": 384, "type": "identifier", "text": "current", "parent": 383, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 15}}, {"id": 385, "type": "!=", "text": "!=", "parent": 383, "children": [], "start_point": {"row": 99, "column": 16}, "end_point": {"row": 99, "column": 18}}, {"id": 386, "type": "identifier", "text": "stop", "parent": 383, "children": [], "start_point": {"row": 99, "column": 19}, "end_point": {"row": 99, "column": 23}}, {"id": 387, "type": "assignment_expression", "text": "ret = fxn(arg)", "parent": 330, "children": [388, 389, 390], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 15}}, {"id": 388, "type": "identifier", "text": "ret", "parent": 387, "children": [], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 4}}, {"id": 389, "type": "=", "text": "=", "parent": 387, "children": [], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 6}}, {"id": 390, "type": "call_expression", "text": "fxn(arg)", "parent": 387, "children": [391, 392], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 15}}, {"id": 391, "type": "identifier", "text": "fxn", "parent": 390, "children": [], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 10}}, {"id": 392, "type": "argument_list", "text": "(arg)", "parent": 390, "children": [393], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 15}}, {"id": 393, "type": "identifier", "text": "arg", "parent": 392, "children": [], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 100, "column": 14}}, {"id": 394, "type": "assignment_expression", "text": "stop->state = TASK_INTERRUPTIBLE", "parent": 330, "children": [395, 398, 399], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 33}}, {"id": 395, "type": "field_expression", "text": "stop->state", "parent": 394, "children": [396, 397], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 12}}, {"id": 396, "type": "identifier", "text": "stop", "parent": 395, "children": [], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 5}}, {"id": 397, "type": "field_identifier", "text": "state", "parent": 395, "children": [], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 12}}, {"id": 398, "type": "=", "text": "=", "parent": 394, "children": [], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 14}}, {"id": 399, "type": "identifier", "text": "TASK_INTERRUPTIBLE", "parent": 394, "children": [], "start_point": {"row": 102, "column": 15}, "end_point": {"row": 102, "column": 33}}, {"id": 400, "type": "call_expression", "text": "schedule()", "parent": 330, "children": [401, 402], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 11}}, {"id": 401, "type": "identifier", "text": "schedule", "parent": 400, "children": [], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 9}}, {"id": 402, "type": "argument_list", "text": "()", "parent": 400, "children": [], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 103, "column": 11}}, {"id": 403, "type": "call_expression", "text": "linsched_current_handler()", "parent": 330, "children": [404, 405], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 27}}, {"id": 404, "type": "identifier", "text": "linsched_current_handler", "parent": 403, "children": [], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 25}}, {"id": 405, "type": "argument_list", "text": "()", "parent": 403, "children": [], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 27}}, {"id": 406, "type": "call_expression", "text": "BUG_ON(current == stop)", "parent": 330, "children": [407, 408], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 24}}, {"id": 407, "type": "identifier", "text": "BUG_ON", "parent": 406, "children": [], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 7}}, {"id": 408, "type": "argument_list", "text": "(current == stop)", "parent": 406, "children": [409], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 24}}, {"id": 409, "type": "binary_expression", "text": "current == stop", "parent": 408, "children": [410, 411, 412], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 23}}, {"id": 410, "type": "identifier", "text": "current", "parent": 409, "children": [], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 15}}, {"id": 411, "type": "==", "text": "==", "parent": 409, "children": [], "start_point": {"row": 107, "column": 16}, "end_point": {"row": 107, "column": 18}}, {"id": 412, "type": "identifier", "text": "stop", "parent": 409, "children": [], "start_point": {"row": 107, "column": 19}, "end_point": {"row": 107, "column": 23}}, {"id": 413, "type": "call_expression", "text": "linsched_change_cpu(this_cpu)", "parent": 330, "children": [414, 415], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 30}}, {"id": 414, "type": "identifier", "text": "linsched_change_cpu", "parent": 413, "children": [], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 20}}, {"id": 415, "type": "argument_list", "text": "(this_cpu)", "parent": 413, "children": [416], "start_point": {"row": 108, "column": 20}, "end_point": {"row": 108, "column": 30}}, {"id": 416, "type": "identifier", "text": "this_cpu", "parent": 415, "children": [], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 29}}, {"id": 417, "type": "return_statement", "text": "return ret;", "parent": 330, "children": [418], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 12}}, {"id": 418, "type": "identifier", "text": "ret", "parent": 417, "children": [], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 11}}, {"id": 419, "type": "function_definition", "text": "void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fxn, void *arg,\n\t\t\t struct cpu_stop_work *work_buf)\n{\n\tstruct task_struct *stop = stop_tasks[cpu];\n\tstruct stop_task *stop_task = task_thread_info(stop)->td->data;\n\tint this_cpu = smp_processor_id();\n\n\t/*\n\t * catch a data race on simultaneous calls to stop_one_cpu_nowait, if\n\t * this ends up happening we'd need to support a proper queue here.\n\t */\n\tBUG_ON(stop_task->fxn);\n\tstop_task->fxn = fxn;\n\tstop_task->arg = arg;\n\n\t/*\n\t * in the nowait case we actually go through a schedule to make sure\n\t * that our cpu has a change to drop its rq->locks since they may be\n\t * needed.\n\t */\n\tlinsched_change_cpu(cpu);\n\thrtimer_set_expires(&stop_task->timer, ns_to_ktime(1));\n\thrtimer_start_expires(&stop_task->timer, HRTIMER_MODE_REL);\n\tlinsched_change_cpu(this_cpu);\n}", "parent": null, "children": [420, 421], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 137, "column": 1}}, {"id": 420, "type": "primitive_type", "text": "void", "parent": 419, "children": [], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 4}}, {"id": 421, "type": "function_declarator", "text": "stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fxn, void *arg,\n\t\t\t struct cpu_stop_work *work_buf)", "parent": 419, "children": [422, 423], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 114, "column": 35}}, {"id": 422, "type": "identifier", "text": "stop_one_cpu_nowait", "parent": 421, "children": [], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 24}}, {"id": 423, "type": "parameter_list", "text": "(unsigned int cpu, cpu_stop_fn_t fxn, void *arg,\n\t\t\t struct cpu_stop_work *work_buf)", "parent": 421, "children": [424, 429, 432, 437], "start_point": {"row": 113, "column": 24}, "end_point": {"row": 114, "column": 35}}, {"id": 424, "type": "parameter_declaration", "text": "unsigned int cpu", "parent": 423, "children": [425, 428], "start_point": {"row": 113, "column": 25}, "end_point": {"row": 113, "column": 41}}, {"id": 425, "type": "sized_type_specifier", "text": "unsigned int", "parent": 424, "children": [426, 427], "start_point": {"row": 113, "column": 25}, "end_point": {"row": 113, "column": 37}}, {"id": 426, "type": "unsigned", "text": "unsigned", "parent": 425, "children": [], "start_point": {"row": 113, "column": 25}, "end_point": {"row": 113, "column": 33}}, {"id": 427, "type": "primitive_type", "text": "int", "parent": 425, "children": [], "start_point": {"row": 113, "column": 34}, "end_point": {"row": 113, "column": 37}}, {"id": 428, "type": "identifier", "text": "cpu", "parent": 424, "children": [], "start_point": {"row": 113, "column": 38}, "end_point": {"row": 113, "column": 41}}, {"id": 429, "type": "parameter_declaration", "text": "cpu_stop_fn_t fxn", "parent": 423, "children": [430, 431], "start_point": {"row": 113, "column": 43}, "end_point": {"row": 113, "column": 60}}, {"id": 430, "type": "type_identifier", "text": "cpu_stop_fn_t", "parent": 429, "children": [], "start_point": {"row": 113, "column": 43}, "end_point": {"row": 113, "column": 56}}, {"id": 431, "type": "identifier", "text": "fxn", "parent": 429, "children": [], "start_point": {"row": 113, "column": 57}, "end_point": {"row": 113, "column": 60}}, {"id": 432, "type": "parameter_declaration", "text": "void *arg", "parent": 423, "children": [433, 434], "start_point": {"row": 113, "column": 62}, "end_point": {"row": 113, "column": 71}}, {"id": 433, "type": "primitive_type", "text": "void", "parent": 432, "children": [], "start_point": {"row": 113, "column": 62}, "end_point": {"row": 113, "column": 66}}, {"id": 434, "type": "pointer_declarator", "text": "*arg", "parent": 432, "children": [435, 436], "start_point": {"row": 113, "column": 67}, "end_point": {"row": 113, "column": 71}}, {"id": 435, "type": "*", "text": "*", "parent": 434, "children": [], "start_point": {"row": 113, "column": 67}, "end_point": {"row": 113, "column": 68}}, {"id": 436, "type": "identifier", "text": "arg", "parent": 434, "children": [], "start_point": {"row": 113, "column": 68}, "end_point": {"row": 113, "column": 71}}, {"id": 437, "type": "parameter_declaration", "text": "struct cpu_stop_work *work_buf", "parent": 423, "children": [438, 441], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 34}}, {"id": 438, "type": "struct_specifier", "text": "struct cpu_stop_work", "parent": 437, "children": [439, 440], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 24}}, {"id": 439, "type": "struct", "text": "struct", "parent": 438, "children": [], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 10}}, {"id": 440, "type": "type_identifier", "text": "cpu_stop_work", "parent": 438, "children": [], "start_point": {"row": 114, "column": 11}, "end_point": {"row": 114, "column": 24}}, {"id": 441, "type": "pointer_declarator", "text": "*work_buf", "parent": 437, "children": [442, 443], "start_point": {"row": 114, "column": 25}, "end_point": {"row": 114, "column": 34}}, {"id": 442, "type": "*", "text": "*", "parent": 441, "children": [], "start_point": {"row": 114, "column": 25}, "end_point": {"row": 114, "column": 26}}, {"id": 443, "type": "identifier", "text": "work_buf", "parent": 441, "children": [], "start_point": {"row": 114, "column": 26}, "end_point": {"row": 114, "column": 34}}, {"id": 444, "type": "declaration", "text": "struct task_struct *stop = stop_tasks[cpu];", "parent": 419, "children": [445, 448], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 44}}, {"id": 445, "type": "struct_specifier", "text": "struct task_struct", "parent": 444, "children": [446, 447], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 19}}, {"id": 446, "type": "struct", "text": "struct", "parent": 445, "children": [], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 7}}, {"id": 447, "type": "type_identifier", "text": "task_struct", "parent": 445, "children": [], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 19}}, {"id": 448, "type": "init_declarator", "text": "*stop = stop_tasks[cpu]", "parent": 444, "children": [449, 452, 453], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 43}}, {"id": 449, "type": "pointer_declarator", "text": "*stop", "parent": 448, "children": [450, 451], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 25}}, {"id": 450, "type": "*", "text": "*", "parent": 449, "children": [], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 21}}, {"id": 451, "type": "identifier", "text": "stop", "parent": 449, "children": [], "start_point": {"row": 116, "column": 21}, "end_point": {"row": 116, "column": 25}}, {"id": 452, "type": "=", "text": "=", "parent": 448, "children": [], "start_point": {"row": 116, "column": 26}, "end_point": {"row": 116, "column": 27}}, {"id": 453, "type": "subscript_expression", "text": "stop_tasks[cpu]", "parent": 448, "children": [454, 455], "start_point": {"row": 116, "column": 28}, "end_point": {"row": 116, "column": 43}}, {"id": 454, "type": "identifier", "text": "stop_tasks", "parent": 453, "children": [], "start_point": {"row": 116, "column": 28}, "end_point": {"row": 116, "column": 38}}, {"id": 455, "type": "identifier", "text": "cpu", "parent": 453, "children": [], "start_point": {"row": 116, "column": 39}, "end_point": {"row": 116, "column": 42}}, {"id": 456, "type": "declaration", "text": "struct stop_task *stop_task = task_thread_info(stop)->td->data;", "parent": 419, "children": [457, 460], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 64}}, {"id": 457, "type": "struct_specifier", "text": "struct stop_task", "parent": 456, "children": [458, 459], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 17}}, {"id": 458, "type": "struct", "text": "struct", "parent": 457, "children": [], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 7}}, {"id": 459, "type": "type_identifier", "text": "stop_task", "parent": 457, "children": [], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 17}}, {"id": 460, "type": "init_declarator", "text": "*stop_task = task_thread_info(stop)->td->data", "parent": 456, "children": [461, 464, 465], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 63}}, {"id": 461, "type": "pointer_declarator", "text": "*stop_task", "parent": 460, "children": [462, 463], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 28}}, {"id": 462, "type": "*", "text": "*", "parent": 461, "children": [], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 19}}, {"id": 463, "type": "identifier", "text": "stop_task", "parent": 461, "children": [], "start_point": {"row": 117, "column": 19}, "end_point": {"row": 117, "column": 28}}, {"id": 464, "type": "=", "text": "=", "parent": 460, "children": [], "start_point": {"row": 117, "column": 29}, "end_point": {"row": 117, "column": 30}}, {"id": 465, "type": "field_expression", "text": "task_thread_info(stop)->td->data", "parent": 460, "children": [466, 472], "start_point": {"row": 117, "column": 31}, "end_point": {"row": 117, "column": 63}}, {"id": 466, "type": "field_expression", "text": "task_thread_info(stop)->td", "parent": 465, "children": [467, 471], "start_point": {"row": 117, "column": 31}, "end_point": {"row": 117, "column": 57}}, {"id": 467, "type": "call_expression", "text": "task_thread_info(stop)", "parent": 466, "children": [468, 469], "start_point": {"row": 117, "column": 31}, "end_point": {"row": 117, "column": 53}}, {"id": 468, "type": "identifier", "text": "task_thread_info", "parent": 467, "children": [], "start_point": {"row": 117, "column": 31}, "end_point": {"row": 117, "column": 47}}, {"id": 469, "type": "argument_list", "text": "(stop)", "parent": 467, "children": [470], "start_point": {"row": 117, "column": 47}, "end_point": {"row": 117, "column": 53}}, {"id": 470, "type": "identifier", "text": "stop", "parent": 469, "children": [], "start_point": {"row": 117, "column": 48}, "end_point": {"row": 117, "column": 52}}, {"id": 471, "type": "field_identifier", "text": "td", "parent": 466, "children": [], "start_point": {"row": 117, "column": 55}, "end_point": {"row": 117, "column": 57}}, {"id": 472, "type": "field_identifier", "text": "data", "parent": 465, "children": [], "start_point": {"row": 117, "column": 59}, "end_point": {"row": 117, "column": 63}}, {"id": 473, "type": "declaration", "text": "int this_cpu = smp_processor_id();", "parent": 419, "children": [474, 475], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 35}}, {"id": 474, "type": "primitive_type", "text": "int", "parent": 473, "children": [], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 4}}, {"id": 475, "type": "init_declarator", "text": "this_cpu = smp_processor_id()", "parent": 473, "children": [476, 477, 478], "start_point": {"row": 118, "column": 5}, "end_point": {"row": 118, "column": 34}}, {"id": 476, "type": "identifier", "text": "this_cpu", "parent": 475, "children": [], "start_point": {"row": 118, "column": 5}, "end_point": {"row": 118, "column": 13}}, {"id": 477, "type": "=", "text": "=", "parent": 475, "children": [], "start_point": {"row": 118, "column": 14}, "end_point": {"row": 118, "column": 15}}, {"id": 478, "type": "call_expression", "text": "smp_processor_id()", "parent": 475, "children": [479, 480], "start_point": {"row": 118, "column": 16}, "end_point": {"row": 118, "column": 34}}, {"id": 479, "type": "identifier", "text": "smp_processor_id", "parent": 478, "children": [], "start_point": {"row": 118, "column": 16}, "end_point": {"row": 118, "column": 32}}, {"id": 480, "type": "argument_list", "text": "()", "parent": 478, "children": [], "start_point": {"row": 118, "column": 32}, "end_point": {"row": 118, "column": 34}}, {"id": 481, "type": "call_expression", "text": "BUG_ON(stop_task->fxn)", "parent": 419, "children": [482, 483], "start_point": {"row": 124, "column": 1}, "end_point": {"row": 124, "column": 23}}, {"id": 482, "type": "identifier", "text": "BUG_ON", "parent": 481, "children": [], "start_point": {"row": 124, "column": 1}, "end_point": {"row": 124, "column": 7}}, {"id": 483, "type": "argument_list", "text": "(stop_task->fxn)", "parent": 481, "children": [484], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 23}}, {"id": 484, "type": "field_expression", "text": "stop_task->fxn", "parent": 483, "children": [485, 486], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 22}}, {"id": 485, "type": "identifier", "text": "stop_task", "parent": 484, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 17}}, {"id": 486, "type": "field_identifier", "text": "fxn", "parent": 484, "children": [], "start_point": {"row": 124, "column": 19}, "end_point": {"row": 124, "column": 22}}, {"id": 487, "type": "assignment_expression", "text": "stop_task->fxn = fxn", "parent": 419, "children": [488, 491, 492], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 21}}, {"id": 488, "type": "field_expression", "text": "stop_task->fxn", "parent": 487, "children": [489, 490], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 15}}, {"id": 489, "type": "identifier", "text": "stop_task", "parent": 488, "children": [], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 10}}, {"id": 490, "type": "field_identifier", "text": "fxn", "parent": 488, "children": [], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 15}}, {"id": 491, "type": "=", "text": "=", "parent": 487, "children": [], "start_point": {"row": 125, "column": 16}, "end_point": {"row": 125, "column": 17}}, {"id": 492, "type": "identifier", "text": "fxn", "parent": 487, "children": [], "start_point": {"row": 125, "column": 18}, "end_point": {"row": 125, "column": 21}}, {"id": 493, "type": "assignment_expression", "text": "stop_task->arg = arg", "parent": 419, "children": [494, 497, 498], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 21}}, {"id": 494, "type": "field_expression", "text": "stop_task->arg", "parent": 493, "children": [495, 496], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 15}}, {"id": 495, "type": "identifier", "text": "stop_task", "parent": 494, "children": [], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 10}}, {"id": 496, "type": "field_identifier", "text": "arg", "parent": 494, "children": [], "start_point": {"row": 126, "column": 12}, "end_point": {"row": 126, "column": 15}}, {"id": 497, "type": "=", "text": "=", "parent": 493, "children": [], "start_point": {"row": 126, "column": 16}, "end_point": {"row": 126, "column": 17}}, {"id": 498, "type": "identifier", "text": "arg", "parent": 493, "children": [], "start_point": {"row": 126, "column": 18}, "end_point": {"row": 126, "column": 21}}, {"id": 499, "type": "call_expression", "text": "linsched_change_cpu(cpu)", "parent": 419, "children": [500, 501], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 25}}, {"id": 500, "type": "identifier", "text": "linsched_change_cpu", "parent": 499, "children": [], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 20}}, {"id": 501, "type": "argument_list", "text": "(cpu)", "parent": 499, "children": [502], "start_point": {"row": 133, "column": 20}, "end_point": {"row": 133, "column": 25}}, {"id": 502, "type": "identifier", "text": "cpu", "parent": 501, "children": [], "start_point": {"row": 133, "column": 21}, "end_point": {"row": 133, "column": 24}}, {"id": 503, "type": "call_expression", "text": "hrtimer_set_expires(&stop_task->timer, ns_to_ktime(1))", "parent": 419, "children": [504, 505], "start_point": {"row": 134, "column": 1}, "end_point": {"row": 134, "column": 55}}, {"id": 504, "type": "identifier", "text": "hrtimer_set_expires", "parent": 503, "children": [], "start_point": {"row": 134, "column": 1}, "end_point": {"row": 134, "column": 20}}, {"id": 505, "type": "argument_list", "text": "(&stop_task->timer, ns_to_ktime(1))", "parent": 503, "children": [506, 510], "start_point": {"row": 134, "column": 20}, "end_point": {"row": 134, "column": 55}}, {"id": 506, "type": "pointer_expression", "text": "&stop_task->timer", "parent": 505, "children": [507], "start_point": {"row": 134, "column": 21}, "end_point": {"row": 134, "column": 38}}, {"id": 507, "type": "field_expression", "text": "stop_task->timer", "parent": 506, "children": [508, 509], "start_point": {"row": 134, "column": 22}, "end_point": {"row": 134, "column": 38}}, {"id": 508, "type": "identifier", "text": "stop_task", "parent": 507, "children": [], "start_point": {"row": 134, "column": 22}, "end_point": {"row": 134, "column": 31}}, {"id": 509, "type": "field_identifier", "text": "timer", "parent": 507, "children": [], "start_point": {"row": 134, "column": 33}, "end_point": {"row": 134, "column": 38}}, {"id": 510, "type": "call_expression", "text": "ns_to_ktime(1)", "parent": 505, "children": [511, 512], "start_point": {"row": 134, "column": 40}, "end_point": {"row": 134, "column": 54}}, {"id": 511, "type": "identifier", "text": "ns_to_ktime", "parent": 510, "children": [], "start_point": {"row": 134, "column": 40}, "end_point": {"row": 134, "column": 51}}, {"id": 512, "type": "argument_list", "text": "(1)", "parent": 510, "children": [513], "start_point": {"row": 134, "column": 51}, "end_point": {"row": 134, "column": 54}}, {"id": 513, "type": "number_literal", "text": "1", "parent": 512, "children": [], "start_point": {"row": 134, "column": 52}, "end_point": {"row": 134, "column": 53}}, {"id": 514, "type": "call_expression", "text": "hrtimer_start_expires(&stop_task->timer, HRTIMER_MODE_REL)", "parent": 419, "children": [515, 516], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 59}}, {"id": 515, "type": "identifier", "text": "hrtimer_start_expires", "parent": 514, "children": [], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 22}}, {"id": 516, "type": "argument_list", "text": "(&stop_task->timer, HRTIMER_MODE_REL)", "parent": 514, "children": [517, 521], "start_point": {"row": 135, "column": 22}, "end_point": {"row": 135, "column": 59}}, {"id": 517, "type": "pointer_expression", "text": "&stop_task->timer", "parent": 516, "children": [518], "start_point": {"row": 135, "column": 23}, "end_point": {"row": 135, "column": 40}}, {"id": 518, "type": "field_expression", "text": "stop_task->timer", "parent": 517, "children": [519, 520], "start_point": {"row": 135, "column": 24}, "end_point": {"row": 135, "column": 40}}, {"id": 519, "type": "identifier", "text": "stop_task", "parent": 518, "children": [], "start_point": {"row": 135, "column": 24}, "end_point": {"row": 135, "column": 33}}, {"id": 520, "type": "field_identifier", "text": "timer", "parent": 518, "children": [], "start_point": {"row": 135, "column": 35}, "end_point": {"row": 135, "column": 40}}, {"id": 521, "type": "identifier", "text": "HRTIMER_MODE_REL", "parent": 516, "children": [], "start_point": {"row": 135, "column": 42}, "end_point": {"row": 135, "column": 58}}, {"id": 522, "type": "call_expression", "text": "linsched_change_cpu(this_cpu)", "parent": 419, "children": [523, 524], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 30}}, {"id": 523, "type": "identifier", "text": "linsched_change_cpu", "parent": 522, "children": [], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 20}}, {"id": 524, "type": "argument_list", "text": "(this_cpu)", "parent": 522, "children": [525], "start_point": {"row": 136, "column": 20}, "end_point": {"row": 136, "column": 30}}, {"id": 525, "type": "identifier", "text": "this_cpu", "parent": 524, "children": [], "start_point": {"row": 136, "column": 21}, "end_point": {"row": 136, "column": 29}}, {"id": 526, "type": "function_definition", "text": "int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)\n{\n\t/* technically we should bounce every cpu, but don't bother */\n\treturn stop_one_cpu(cpumask_first(cpus), fn, data);\n}", "parent": null, "children": [527, 528], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 143, "column": 1}}, {"id": 527, "type": "primitive_type", "text": "int", "parent": 526, "children": [], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 139, "column": 3}}, {"id": 528, "type": "function_declarator", "text": "__stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)", "parent": 526, "children": [529, 530], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 77}}, {"id": 529, "type": "identifier", "text": "__stop_machine", "parent": 528, "children": [], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 18}}, {"id": 530, "type": "parameter_list", "text": "(int (*fn)(void *), void *data, const struct cpumask *cpus)", "parent": 528, "children": [531, 543, 548], "start_point": {"row": 139, "column": 18}, "end_point": {"row": 139, "column": 77}}, {"id": 531, "type": "parameter_declaration", "text": "int (*fn)(void *)", "parent": 530, "children": [532, 533], "start_point": {"row": 139, "column": 19}, "end_point": {"row": 139, "column": 36}}, {"id": 532, "type": "primitive_type", "text": "int", "parent": 531, "children": [], "start_point": {"row": 139, "column": 19}, "end_point": {"row": 139, "column": 22}}, {"id": 533, "type": "function_declarator", "text": "(*fn)(void *)", "parent": 531, "children": [534, 538], "start_point": {"row": 139, "column": 23}, "end_point": {"row": 139, "column": 36}}, {"id": 534, "type": "parenthesized_declarator", "text": "(*fn)", "parent": 533, "children": [535], "start_point": {"row": 139, "column": 23}, "end_point": {"row": 139, "column": 28}}, {"id": 535, "type": "pointer_declarator", "text": "*fn", "parent": 534, "children": [536, 537], "start_point": {"row": 139, "column": 24}, "end_point": {"row": 139, "column": 27}}, {"id": 536, "type": "*", "text": "*", "parent": 535, "children": [], "start_point": {"row": 139, "column": 24}, "end_point": {"row": 139, "column": 25}}, {"id": 537, "type": "identifier", "text": "fn", "parent": 535, "children": [], "start_point": {"row": 139, "column": 25}, "end_point": {"row": 139, "column": 27}}, {"id": 538, "type": "parameter_list", "text": "(void *)", "parent": 533, "children": [539], "start_point": {"row": 139, "column": 28}, "end_point": {"row": 139, "column": 36}}, {"id": 539, "type": "parameter_declaration", "text": "void *", "parent": 538, "children": [540, 541], "start_point": {"row": 139, "column": 29}, "end_point": {"row": 139, "column": 35}}, {"id": 540, "type": "primitive_type", "text": "void", "parent": 539, "children": [], "start_point": {"row": 139, "column": 29}, "end_point": {"row": 139, "column": 33}}, {"id": 541, "type": "abstract_pointer_declarator", "text": "*", "parent": 539, "children": [542], "start_point": {"row": 139, "column": 34}, "end_point": {"row": 139, "column": 35}}, {"id": 542, "type": "*", "text": "*", "parent": 541, "children": [], "start_point": {"row": 139, "column": 34}, "end_point": {"row": 139, "column": 35}}, {"id": 543, "type": "parameter_declaration", "text": "void *data", "parent": 530, "children": [544, 545], "start_point": {"row": 139, "column": 38}, "end_point": {"row": 139, "column": 48}}, {"id": 544, "type": "primitive_type", "text": "void", "parent": 543, "children": [], "start_point": {"row": 139, "column": 38}, "end_point": {"row": 139, "column": 42}}, {"id": 545, "type": "pointer_declarator", "text": "*data", "parent": 543, "children": [546, 547], "start_point": {"row": 139, "column": 43}, "end_point": {"row": 139, "column": 48}}, {"id": 546, "type": "*", "text": "*", "parent": 545, "children": [], "start_point": {"row": 139, "column": 43}, "end_point": {"row": 139, "column": 44}}, {"id": 547, "type": "identifier", "text": "data", "parent": 545, "children": [], "start_point": {"row": 139, "column": 44}, "end_point": {"row": 139, "column": 48}}, {"id": 548, "type": "parameter_declaration", "text": "const struct cpumask *cpus", "parent": 530, "children": [549, 552], "start_point": {"row": 139, "column": 50}, "end_point": {"row": 139, "column": 76}}, {"id": 549, "type": "struct_specifier", "text": "struct cpumask", "parent": 548, "children": [550, 551], "start_point": {"row": 139, "column": 56}, "end_point": {"row": 139, "column": 70}}, {"id": 550, "type": "struct", "text": "struct", "parent": 549, "children": [], "start_point": {"row": 139, "column": 56}, "end_point": {"row": 139, "column": 62}}, {"id": 551, "type": "type_identifier", "text": "cpumask", "parent": 549, "children": [], "start_point": {"row": 139, "column": 63}, "end_point": {"row": 139, "column": 70}}, {"id": 552, "type": "pointer_declarator", "text": "*cpus", "parent": 548, "children": [553, 554], "start_point": {"row": 139, "column": 71}, "end_point": {"row": 139, "column": 76}}, {"id": 553, "type": "*", "text": "*", "parent": 552, "children": [], "start_point": {"row": 139, "column": 71}, "end_point": {"row": 139, "column": 72}}, {"id": 554, "type": "identifier", "text": "cpus", "parent": 552, "children": [], "start_point": {"row": 139, "column": 72}, "end_point": {"row": 139, "column": 76}}, {"id": 555, "type": "return_statement", "text": "return stop_one_cpu(cpumask_first(cpus), fn, data);", "parent": 526, "children": [556], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 52}}, {"id": 556, "type": "call_expression", "text": "stop_one_cpu(cpumask_first(cpus), fn, data)", "parent": 555, "children": [557, 558], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 51}}, {"id": 557, "type": "identifier", "text": "stop_one_cpu", "parent": 556, "children": [], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 20}}, {"id": 558, "type": "argument_list", "text": "(cpumask_first(cpus), fn, data)", "parent": 556, "children": [559, 563, 564], "start_point": {"row": 142, "column": 20}, "end_point": {"row": 142, "column": 51}}, {"id": 559, "type": "call_expression", "text": "cpumask_first(cpus)", "parent": 558, "children": [560, 561], "start_point": {"row": 142, "column": 21}, "end_point": {"row": 142, "column": 40}}, {"id": 560, "type": "identifier", "text": "cpumask_first", "parent": 559, "children": [], "start_point": {"row": 142, "column": 21}, "end_point": {"row": 142, "column": 34}}, {"id": 561, "type": "argument_list", "text": "(cpus)", "parent": 559, "children": [562], "start_point": {"row": 142, "column": 34}, "end_point": {"row": 142, "column": 40}}, {"id": 562, "type": "identifier", "text": "cpus", "parent": 561, "children": [], "start_point": {"row": 142, "column": 35}, "end_point": {"row": 142, "column": 39}}, {"id": 563, "type": "identifier", "text": "fn", "parent": 558, "children": [], "start_point": {"row": 142, "column": 42}, "end_point": {"row": 142, "column": 44}}, {"id": 564, "type": "identifier", "text": "data", "parent": 558, "children": [], "start_point": {"row": 142, "column": 46}, "end_point": {"row": 142, "column": 50}}, {"id": 565, "type": "function_definition", "text": "int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)\n{\n\tint ret;\n\n\t/* No CPUs can come up or down during this. */\n\tget_online_cpus();\n\tret = __stop_machine(fn, data, cpus);\n\tput_online_cpus();\n\treturn ret;\n}", "parent": null, "children": [566, 567], "start_point": {"row": 145, "column": 0}, "end_point": {"row": 154, "column": 1}}, {"id": 566, "type": "primitive_type", "text": "int", "parent": 565, "children": [], "start_point": {"row": 145, "column": 0}, "end_point": {"row": 145, "column": 3}}, {"id": 567, "type": "function_declarator", "text": "stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)", "parent": 565, "children": [568, 569], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 75}}, {"id": 568, "type": "identifier", "text": "stop_machine", "parent": 567, "children": [], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 16}}, {"id": 569, "type": "parameter_list", "text": "(int (*fn)(void *), void *data, const struct cpumask *cpus)", "parent": 567, "children": [570, 582, 587], "start_point": {"row": 145, "column": 16}, "end_point": {"row": 145, "column": 75}}, {"id": 570, "type": "parameter_declaration", "text": "int (*fn)(void *)", "parent": 569, "children": [571, 572], "start_point": {"row": 145, "column": 17}, "end_point": {"row": 145, "column": 34}}, {"id": 571, "type": "primitive_type", "text": "int", "parent": 570, "children": [], "start_point": {"row": 145, "column": 17}, "end_point": {"row": 145, "column": 20}}, {"id": 572, "type": "function_declarator", "text": "(*fn)(void *)", "parent": 570, "children": [573, 577], "start_point": {"row": 145, "column": 21}, "end_point": {"row": 145, "column": 34}}, {"id": 573, "type": "parenthesized_declarator", "text": "(*fn)", "parent": 572, "children": [574], "start_point": {"row": 145, "column": 21}, "end_point": {"row": 145, "column": 26}}, {"id": 574, "type": "pointer_declarator", "text": "*fn", "parent": 573, "children": [575, 576], "start_point": {"row": 145, "column": 22}, "end_point": {"row": 145, "column": 25}}, {"id": 575, "type": "*", "text": "*", "parent": 574, "children": [], "start_point": {"row": 145, "column": 22}, "end_point": {"row": 145, "column": 23}}, {"id": 576, "type": "identifier", "text": "fn", "parent": 574, "children": [], "start_point": {"row": 145, "column": 23}, "end_point": {"row": 145, "column": 25}}, {"id": 577, "type": "parameter_list", "text": "(void *)", "parent": 572, "children": [578], "start_point": {"row": 145, "column": 26}, "end_point": {"row": 145, "column": 34}}, {"id": 578, "type": "parameter_declaration", "text": "void *", "parent": 577, "children": [579, 580], "start_point": {"row": 145, "column": 27}, "end_point": {"row": 145, "column": 33}}, {"id": 579, "type": "primitive_type", "text": "void", "parent": 578, "children": [], "start_point": {"row": 145, "column": 27}, "end_point": {"row": 145, "column": 31}}, {"id": 580, "type": "abstract_pointer_declarator", "text": "*", "parent": 578, "children": [581], "start_point": {"row": 145, "column": 32}, "end_point": {"row": 145, "column": 33}}, {"id": 581, "type": "*", "text": "*", "parent": 580, "children": [], "start_point": {"row": 145, "column": 32}, "end_point": {"row": 145, "column": 33}}, {"id": 582, "type": "parameter_declaration", "text": "void *data", "parent": 569, "children": [583, 584], "start_point": {"row": 145, "column": 36}, "end_point": {"row": 145, "column": 46}}, {"id": 583, "type": "primitive_type", "text": "void", "parent": 582, "children": [], "start_point": {"row": 145, "column": 36}, "end_point": {"row": 145, "column": 40}}, {"id": 584, "type": "pointer_declarator", "text": "*data", "parent": 582, "children": [585, 586], "start_point": {"row": 145, "column": 41}, "end_point": {"row": 145, "column": 46}}, {"id": 585, "type": "*", "text": "*", "parent": 584, "children": [], "start_point": {"row": 145, "column": 41}, "end_point": {"row": 145, "column": 42}}, {"id": 586, "type": "identifier", "text": "data", "parent": 584, "children": [], "start_point": {"row": 145, "column": 42}, "end_point": {"row": 145, "column": 46}}, {"id": 587, "type": "parameter_declaration", "text": "const struct cpumask *cpus", "parent": 569, "children": [588, 591], "start_point": {"row": 145, "column": 48}, "end_point": {"row": 145, "column": 74}}, {"id": 588, "type": "struct_specifier", "text": "struct cpumask", "parent": 587, "children": [589, 590], "start_point": {"row": 145, "column": 54}, "end_point": {"row": 145, "column": 68}}, {"id": 589, "type": "struct", "text": "struct", "parent": 588, "children": [], "start_point": {"row": 145, "column": 54}, "end_point": {"row": 145, "column": 60}}, {"id": 590, "type": "type_identifier", "text": "cpumask", "parent": 588, "children": [], "start_point": {"row": 145, "column": 61}, "end_point": {"row": 145, "column": 68}}, {"id": 591, "type": "pointer_declarator", "text": "*cpus", "parent": 587, "children": [592, 593], "start_point": {"row": 145, "column": 69}, "end_point": {"row": 145, "column": 74}}, {"id": 592, "type": "*", "text": "*", "parent": 591, "children": [], "start_point": {"row": 145, "column": 69}, "end_point": {"row": 145, "column": 70}}, {"id": 593, "type": "identifier", "text": "cpus", "parent": 591, "children": [], "start_point": {"row": 145, "column": 70}, "end_point": {"row": 145, "column": 74}}, {"id": 594, "type": "declaration", "text": "int ret;", "parent": 565, "children": [595, 596], "start_point": {"row": 147, "column": 1}, "end_point": {"row": 147, "column": 9}}, {"id": 595, "type": "primitive_type", "text": "int", "parent": 594, "children": [], "start_point": {"row": 147, "column": 1}, "end_point": {"row": 147, "column": 4}}, {"id": 596, "type": "identifier", "text": "ret", "parent": 594, "children": [], "start_point": {"row": 147, "column": 5}, "end_point": {"row": 147, "column": 8}}, {"id": 597, "type": "call_expression", "text": "get_online_cpus()", "parent": 565, "children": [598, 599], "start_point": {"row": 150, "column": 1}, "end_point": {"row": 150, "column": 18}}, {"id": 598, "type": "identifier", "text": "get_online_cpus", "parent": 597, "children": [], "start_point": {"row": 150, "column": 1}, "end_point": {"row": 150, "column": 16}}, {"id": 599, "type": "argument_list", "text": "()", "parent": 597, "children": [], "start_point": {"row": 150, "column": 16}, "end_point": {"row": 150, "column": 18}}, {"id": 600, "type": "assignment_expression", "text": "ret = __stop_machine(fn, data, cpus)", "parent": 565, "children": [601, 602, 603], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 151, "column": 37}}, {"id": 601, "type": "identifier", "text": "ret", "parent": 600, "children": [], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 151, "column": 4}}, {"id": 602, "type": "=", "text": "=", "parent": 600, "children": [], "start_point": {"row": 151, "column": 5}, "end_point": {"row": 151, "column": 6}}, {"id": 603, "type": "call_expression", "text": "__stop_machine(fn, data, cpus)", "parent": 600, "children": [604, 605], "start_point": {"row": 151, "column": 7}, "end_point": {"row": 151, "column": 37}}, {"id": 604, "type": "identifier", "text": "__stop_machine", "parent": 603, "children": [], "start_point": {"row": 151, "column": 7}, "end_point": {"row": 151, "column": 21}}, {"id": 605, "type": "argument_list", "text": "(fn, data, cpus)", "parent": 603, "children": [606, 607, 608], "start_point": {"row": 151, "column": 21}, "end_point": {"row": 151, "column": 37}}, {"id": 606, "type": "identifier", "text": "fn", "parent": 605, "children": [], "start_point": {"row": 151, "column": 22}, "end_point": {"row": 151, "column": 24}}, {"id": 607, "type": "identifier", "text": "data", "parent": 605, "children": [], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 30}}, {"id": 608, "type": "identifier", "text": "cpus", "parent": 605, "children": [], "start_point": {"row": 151, "column": 32}, "end_point": {"row": 151, "column": 36}}, {"id": 609, "type": "call_expression", "text": "put_online_cpus()", "parent": 565, "children": [610, 611], "start_point": {"row": 152, "column": 1}, "end_point": {"row": 152, "column": 18}}, {"id": 610, "type": "identifier", "text": "put_online_cpus", "parent": 609, "children": [], "start_point": {"row": 152, "column": 1}, "end_point": {"row": 152, "column": 16}}, {"id": 611, "type": "argument_list", "text": "()", "parent": 609, "children": [], "start_point": {"row": 152, "column": 16}, "end_point": {"row": 152, "column": 18}}, {"id": 612, "type": "return_statement", "text": "return ret;", "parent": 565, "children": [613], "start_point": {"row": 153, "column": 1}, "end_point": {"row": 153, "column": 12}}, {"id": 613, "type": "identifier", "text": "ret", "parent": 612, "children": [], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 11}}, {"id": 614, "type": "function_definition", "text": "__attribute__((weak)) struct task_group *cgroup_tg(struct cgroup *cgrp)\n{\n\treturn container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),\n\t\t\t struct task_group, css);\n}", "parent": null, "children": [615, 619, 622], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 161, "column": 1}}, {"id": 615, "type": "attribute_specifier", "text": "__attribute__((weak))", "parent": 614, "children": [616, 617], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 157, "column": 21}}, {"id": 616, "type": "__attribute__", "text": "__attribute__", "parent": 615, "children": [], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 157, "column": 13}}, {"id": 617, "type": "argument_list", "text": "(weak)", "parent": 615, "children": [618], "start_point": {"row": 157, "column": 14}, "end_point": {"row": 157, "column": 20}}, {"id": 618, "type": "identifier", "text": "weak", "parent": 617, "children": [], "start_point": {"row": 157, "column": 15}, "end_point": {"row": 157, "column": 19}}, {"id": 619, "type": "struct_specifier", "text": "struct task_group", "parent": 614, "children": [620, 621], "start_point": {"row": 157, "column": 22}, "end_point": {"row": 157, "column": 39}}, {"id": 620, "type": "struct", "text": "struct", "parent": 619, "children": [], "start_point": {"row": 157, "column": 22}, "end_point": {"row": 157, "column": 28}}, {"id": 621, "type": "type_identifier", "text": "task_group", "parent": 619, "children": [], "start_point": {"row": 157, "column": 29}, "end_point": {"row": 157, "column": 39}}, {"id": 622, "type": "pointer_declarator", "text": "*cgroup_tg(struct cgroup *cgrp)", "parent": 614, "children": [623, 624], "start_point": {"row": 157, "column": 40}, "end_point": {"row": 157, "column": 71}}, {"id": 623, "type": "*", "text": "*", "parent": 622, "children": [], "start_point": {"row": 157, "column": 40}, "end_point": {"row": 157, "column": 41}}, {"id": 624, "type": "function_declarator", "text": "cgroup_tg(struct cgroup *cgrp)", "parent": 622, "children": [625, 626], "start_point": {"row": 157, "column": 41}, "end_point": {"row": 157, "column": 71}}, {"id": 625, "type": "identifier", "text": "cgroup_tg", "parent": 624, "children": [], "start_point": {"row": 157, "column": 41}, "end_point": {"row": 157, "column": 50}}, {"id": 626, "type": "parameter_list", "text": "(struct cgroup *cgrp)", "parent": 624, "children": [627], "start_point": {"row": 157, "column": 50}, "end_point": {"row": 157, "column": 71}}, {"id": 627, "type": "parameter_declaration", "text": "struct cgroup *cgrp", "parent": 626, "children": [628, 631], "start_point": {"row": 157, "column": 51}, "end_point": {"row": 157, "column": 70}}, {"id": 628, "type": "struct_specifier", "text": "struct cgroup", "parent": 627, "children": [629, 630], "start_point": {"row": 157, "column": 51}, "end_point": {"row": 157, "column": 64}}, {"id": 629, "type": "struct", "text": "struct", "parent": 628, "children": [], "start_point": {"row": 157, "column": 51}, "end_point": {"row": 157, "column": 57}}, {"id": 630, "type": "type_identifier", "text": "cgroup", "parent": 628, "children": [], "start_point": {"row": 157, "column": 58}, "end_point": {"row": 157, "column": 64}}, {"id": 631, "type": "pointer_declarator", "text": "*cgrp", "parent": 627, "children": [632, 633], "start_point": {"row": 157, "column": 65}, "end_point": {"row": 157, "column": 70}}, {"id": 632, "type": "*", "text": "*", "parent": 631, "children": [], "start_point": {"row": 157, "column": 65}, "end_point": {"row": 157, "column": 66}}, {"id": 633, "type": "identifier", "text": "cgrp", "parent": 631, "children": [], "start_point": {"row": 157, "column": 66}, "end_point": {"row": 157, "column": 70}}, {"id": 634, "type": "return_statement", "text": "return container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),\n\t\t\t struct task_group, css);", "parent": 614, "children": [635], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 160, "column": 31}}, {"id": 635, "type": "call_expression", "text": "container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),\n\t\t\t struct task_group, css)", "parent": 634, "children": [636, 637], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 160, "column": 30}}, {"id": 636, "type": "identifier", "text": "container_of", "parent": 635, "children": [], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 20}}, {"id": 637, "type": "argument_list", "text": "(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),\n\t\t\t struct task_group, css)", "parent": 635, "children": [638, 643, 645, 646], "start_point": {"row": 159, "column": 20}, "end_point": {"row": 160, "column": 30}}, {"id": 638, "type": "call_expression", "text": "cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id)", "parent": 637, "children": [639, 640], "start_point": {"row": 159, "column": 21}, "end_point": {"row": 159, "column": 68}}, {"id": 639, "type": "identifier", "text": "cgroup_subsys_state", "parent": 638, "children": [], "start_point": {"row": 159, "column": 21}, "end_point": {"row": 159, "column": 40}}, {"id": 640, "type": "argument_list", "text": "(cgrp, cpu_cgroup_subsys_id)", "parent": 638, "children": [641, 642], "start_point": {"row": 159, "column": 40}, "end_point": {"row": 159, "column": 68}}, {"id": 641, "type": "identifier", "text": "cgrp", "parent": 640, "children": [], "start_point": {"row": 159, "column": 41}, "end_point": {"row": 159, "column": 45}}, {"id": 642, "type": "identifier", "text": "cpu_cgroup_subsys_id", "parent": 640, "children": [], "start_point": {"row": 159, "column": 47}, "end_point": {"row": 159, "column": 67}}, {"id": 643, "type": "ERROR", "text": "struct", "parent": 637, "children": [644], "start_point": {"row": 160, "column": 7}, "end_point": {"row": 160, "column": 13}}, {"id": 644, "type": "identifier", "text": "struct", "parent": 643, "children": [], "start_point": {"row": 160, "column": 7}, "end_point": {"row": 160, "column": 13}}, {"id": 645, "type": "identifier", "text": "task_group", "parent": 637, "children": [], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 24}}, {"id": 646, "type": "identifier", "text": "css", "parent": 637, "children": [], "start_point": {"row": 160, "column": 26}, "end_point": {"row": 160, "column": 29}}, {"id": 647, "type": "function_definition", "text": "void __sched preempt_schedule(void)\n{\n}", "parent": null, "children": [648, 649, 651], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 165, "column": 1}}, {"id": 648, "type": "primitive_type", "text": "void", "parent": 647, "children": [], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 163, "column": 4}}, {"id": 649, "type": "ERROR", "text": "__sched", "parent": 647, "children": [650], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 12}}, {"id": 650, "type": "identifier", "text": "__sched", "parent": 649, "children": [], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 12}}, {"id": 651, "type": "function_declarator", "text": "preempt_schedule(void)", "parent": 647, "children": [652, 653], "start_point": {"row": 163, "column": 13}, "end_point": {"row": 163, "column": 35}}, {"id": 652, "type": "identifier", "text": "preempt_schedule", "parent": 651, "children": [], "start_point": {"row": 163, "column": 13}, "end_point": {"row": 163, "column": 29}}, {"id": 653, "type": "parameter_list", "text": "(void)", "parent": 651, "children": [654], "start_point": {"row": 163, "column": 29}, "end_point": {"row": 163, "column": 35}}, {"id": 654, "type": "parameter_declaration", "text": "void", "parent": 653, "children": [655], "start_point": {"row": 163, "column": 30}, "end_point": {"row": 163, "column": 34}}, {"id": 655, "type": "primitive_type", "text": "void", "parent": 654, "children": [], "start_point": {"row": 163, "column": 30}, "end_point": {"row": 163, "column": 34}}, {"id": 656, "type": "function_definition", "text": "void fire_sched_out_preempt_notifiers(struct task_struct *curr,\n\t\t\t\t struct task_struct *next)\n{\n}", "parent": null, "children": [657, 658], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 170, "column": 1}}, {"id": 657, "type": "primitive_type", "text": "void", "parent": 656, "children": [], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 167, "column": 4}}, {"id": 658, "type": "function_declarator", "text": "fire_sched_out_preempt_notifiers(struct task_struct *curr,\n\t\t\t\t struct task_struct *next)", "parent": 656, "children": [659, 660], "start_point": {"row": 167, "column": 5}, "end_point": {"row": 168, "column": 35}}, {"id": 659, "type": "identifier", "text": "fire_sched_out_preempt_notifiers", "parent": 658, "children": [], "start_point": {"row": 167, "column": 5}, "end_point": {"row": 167, "column": 37}}, {"id": 660, "type": "parameter_list", "text": "(struct task_struct *curr,\n\t\t\t\t struct task_struct *next)", "parent": 658, "children": [661, 668], "start_point": {"row": 167, "column": 37}, "end_point": {"row": 168, "column": 35}}, {"id": 661, "type": "parameter_declaration", "text": "struct task_struct *curr", "parent": 660, "children": [662, 665], "start_point": {"row": 167, "column": 38}, "end_point": {"row": 167, "column": 62}}, {"id": 662, "type": "struct_specifier", "text": "struct task_struct", "parent": 661, "children": [663, 664], "start_point": {"row": 167, "column": 38}, "end_point": {"row": 167, "column": 56}}, {"id": 663, "type": "struct", "text": "struct", "parent": 662, "children": [], "start_point": {"row": 167, "column": 38}, "end_point": {"row": 167, "column": 44}}, {"id": 664, "type": "type_identifier", "text": "task_struct", "parent": 662, "children": [], "start_point": {"row": 167, "column": 45}, "end_point": {"row": 167, "column": 56}}, {"id": 665, "type": "pointer_declarator", "text": "*curr", "parent": 661, "children": [666, 667], "start_point": {"row": 167, "column": 57}, "end_point": {"row": 167, "column": 62}}, {"id": 666, "type": "*", "text": "*", "parent": 665, "children": [], "start_point": {"row": 167, "column": 57}, "end_point": {"row": 167, "column": 58}}, {"id": 667, "type": "identifier", "text": "curr", "parent": 665, "children": [], "start_point": {"row": 167, "column": 58}, "end_point": {"row": 167, "column": 62}}, {"id": 668, "type": "parameter_declaration", "text": "struct task_struct *next", "parent": 660, "children": [669, 672], "start_point": {"row": 168, "column": 10}, "end_point": {"row": 168, "column": 34}}, {"id": 669, "type": "struct_specifier", "text": "struct task_struct", "parent": 668, "children": [670, 671], "start_point": {"row": 168, "column": 10}, "end_point": {"row": 168, "column": 28}}, {"id": 670, "type": "struct", "text": "struct", "parent": 669, "children": [], "start_point": {"row": 168, "column": 10}, "end_point": {"row": 168, "column": 16}}, {"id": 671, "type": "type_identifier", "text": "task_struct", "parent": 669, "children": [], "start_point": {"row": 168, "column": 17}, "end_point": {"row": 168, "column": 28}}, {"id": 672, "type": "pointer_declarator", "text": "*next", "parent": 668, "children": [673, 674], "start_point": {"row": 168, "column": 29}, "end_point": {"row": 168, "column": 34}}, {"id": 673, "type": "*", "text": "*", "parent": 672, "children": [], "start_point": {"row": 168, "column": 29}, "end_point": {"row": 168, "column": 30}}, {"id": 674, "type": "identifier", "text": "next", "parent": 672, "children": [], "start_point": {"row": 168, "column": 30}, "end_point": {"row": 168, "column": 34}}, {"id": 675, "type": "function_definition", "text": "void fire_sched_in_preempt_notifiers(struct task_struct *curr)\n{\n}", "parent": null, "children": [676, 677], "start_point": {"row": 172, "column": 0}, "end_point": {"row": 174, "column": 1}}, {"id": 676, "type": "primitive_type", "text": "void", "parent": 675, "children": [], "start_point": {"row": 172, "column": 0}, "end_point": {"row": 172, "column": 4}}, {"id": 677, "type": "function_declarator", "text": "fire_sched_in_preempt_notifiers(struct task_struct *curr)", "parent": 675, "children": [678, 679], "start_point": {"row": 172, "column": 5}, "end_point": {"row": 172, "column": 62}}, {"id": 678, "type": "identifier", "text": "fire_sched_in_preempt_notifiers", "parent": 677, "children": [], "start_point": {"row": 172, "column": 5}, "end_point": {"row": 172, "column": 36}}, {"id": 679, "type": "parameter_list", "text": "(struct task_struct *curr)", "parent": 677, "children": [680], "start_point": {"row": 172, "column": 36}, "end_point": {"row": 172, "column": 62}}, {"id": 680, "type": "parameter_declaration", "text": "struct task_struct *curr", "parent": 679, "children": [681, 684], "start_point": {"row": 172, "column": 37}, "end_point": {"row": 172, "column": 61}}, {"id": 681, "type": "struct_specifier", "text": "struct task_struct", "parent": 680, "children": [682, 683], "start_point": {"row": 172, "column": 37}, "end_point": {"row": 172, "column": 55}}, {"id": 682, "type": "struct", "text": "struct", "parent": 681, "children": [], "start_point": {"row": 172, "column": 37}, "end_point": {"row": 172, "column": 43}}, {"id": 683, "type": "type_identifier", "text": "task_struct", "parent": 681, "children": [], "start_point": {"row": 172, "column": 44}, "end_point": {"row": 172, "column": 55}}, {"id": 684, "type": "pointer_declarator", "text": "*curr", "parent": 680, "children": [685, 686], "start_point": {"row": 172, "column": 56}, "end_point": {"row": 172, "column": 61}}, {"id": 685, "type": "*", "text": "*", "parent": 684, "children": [], "start_point": {"row": 172, "column": 56}, "end_point": {"row": 172, "column": 57}}, {"id": 686, "type": "identifier", "text": "curr", "parent": 684, "children": [], "start_point": {"row": 172, "column": 57}, "end_point": {"row": 172, "column": 61}}, {"id": 687, "type": "function_definition", "text": "int security_task_getscheduler(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)\n{\n\treturn 0;\n}", "parent": null, "children": [688, 689], "start_point": {"row": 176, "column": 0}, "end_point": {"row": 180, "column": 1}}, {"id": 688, "type": "primitive_type", "text": "int", "parent": 687, "children": [], "start_point": {"row": 176, "column": 0}, "end_point": {"row": 176, "column": 3}}, {"id": 689, "type": "function_declarator", "text": "security_task_getscheduler(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)", "parent": 687, "children": [690, 691], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 177, "column": 45}}, {"id": 690, "type": "identifier", "text": "security_task_getscheduler", "parent": 689, "children": [], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 30}}, {"id": 691, "type": "parameter_list", "text": "(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)", "parent": 689, "children": [692, 699, 702], "start_point": {"row": 176, "column": 30}, "end_point": {"row": 177, "column": 45}}, {"id": 692, "type": "parameter_declaration", "text": "struct task_struct *p", "parent": 691, "children": [693, 696], "start_point": {"row": 176, "column": 31}, "end_point": {"row": 176, "column": 52}}, {"id": 693, "type": "struct_specifier", "text": "struct task_struct", "parent": 692, "children": [694, 695], "start_point": {"row": 176, "column": 31}, "end_point": {"row": 176, "column": 49}}, {"id": 694, "type": "struct", "text": "struct", "parent": 693, "children": [], "start_point": {"row": 176, "column": 31}, "end_point": {"row": 176, "column": 37}}, {"id": 695, "type": "type_identifier", "text": "task_struct", "parent": 693, "children": [], "start_point": {"row": 176, "column": 38}, "end_point": {"row": 176, "column": 49}}, {"id": 696, "type": "pointer_declarator", "text": "*p", "parent": 692, "children": [697, 698], "start_point": {"row": 176, "column": 50}, "end_point": {"row": 176, "column": 52}}, {"id": 697, "type": "*", "text": "*", "parent": 696, "children": [], "start_point": {"row": 176, "column": 50}, "end_point": {"row": 176, "column": 51}}, {"id": 698, "type": "identifier", "text": "p", "parent": 696, "children": [], "start_point": {"row": 176, "column": 51}, "end_point": {"row": 176, "column": 52}}, {"id": 699, "type": "parameter_declaration", "text": "int policy", "parent": 691, "children": [700, 701], "start_point": {"row": 177, "column": 10}, "end_point": {"row": 177, "column": 20}}, {"id": 700, "type": "primitive_type", "text": "int", "parent": 699, "children": [], "start_point": {"row": 177, "column": 10}, "end_point": {"row": 177, "column": 13}}, {"id": 701, "type": "identifier", "text": "policy", "parent": 699, "children": [], "start_point": {"row": 177, "column": 14}, "end_point": {"row": 177, "column": 20}}, {"id": 702, "type": "parameter_declaration", "text": "struct sched_param *lp", "parent": 691, "children": [703, 706], "start_point": {"row": 177, "column": 22}, "end_point": {"row": 177, "column": 44}}, {"id": 703, "type": "struct_specifier", "text": "struct sched_param", "parent": 702, "children": [704, 705], "start_point": {"row": 177, "column": 22}, "end_point": {"row": 177, "column": 40}}, {"id": 704, "type": "struct", "text": "struct", "parent": 703, "children": [], "start_point": {"row": 177, "column": 22}, "end_point": {"row": 177, "column": 28}}, {"id": 705, "type": "type_identifier", "text": "sched_param", "parent": 703, "children": [], "start_point": {"row": 177, "column": 29}, "end_point": {"row": 177, "column": 40}}, {"id": 706, "type": "pointer_declarator", "text": "*lp", "parent": 702, "children": [707, 708], "start_point": {"row": 177, "column": 41}, "end_point": {"row": 177, "column": 44}}, {"id": 707, "type": "*", "text": "*", "parent": 706, "children": [], "start_point": {"row": 177, "column": 41}, "end_point": {"row": 177, "column": 42}}, {"id": 708, "type": "identifier", "text": "lp", "parent": 706, "children": [], "start_point": {"row": 177, "column": 42}, "end_point": {"row": 177, "column": 44}}, {"id": 709, "type": "return_statement", "text": "return 0;", "parent": 687, "children": [710], "start_point": {"row": 179, "column": 1}, "end_point": {"row": 179, "column": 10}}, {"id": 710, "type": "number_literal", "text": "0", "parent": 709, "children": [], "start_point": {"row": 179, "column": 8}, "end_point": {"row": 179, "column": 9}}, {"id": 711, "type": "function_definition", "text": "int security_task_setscheduler(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)\n{\n\treturn 0;\n}", "parent": null, "children": [712, 713], "start_point": {"row": 182, "column": 0}, "end_point": {"row": 186, "column": 1}}, {"id": 712, "type": "primitive_type", "text": "int", "parent": 711, "children": [], "start_point": {"row": 182, "column": 0}, "end_point": {"row": 182, "column": 3}}, {"id": 713, "type": "function_declarator", "text": "security_task_setscheduler(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)", "parent": 711, "children": [714, 715], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 183, "column": 45}}, {"id": 714, "type": "identifier", "text": "security_task_setscheduler", "parent": 713, "children": [], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 30}}, {"id": 715, "type": "parameter_list", "text": "(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)", "parent": 713, "children": [716, 723, 726], "start_point": {"row": 182, "column": 30}, "end_point": {"row": 183, "column": 45}}, {"id": 716, "type": "parameter_declaration", "text": "struct task_struct *p", "parent": 715, "children": [717, 720], "start_point": {"row": 182, "column": 31}, "end_point": {"row": 182, "column": 52}}, {"id": 717, "type": "struct_specifier", "text": "struct task_struct", "parent": 716, "children": [718, 719], "start_point": {"row": 182, "column": 31}, "end_point": {"row": 182, "column": 49}}, {"id": 718, "type": "struct", "text": "struct", "parent": 717, "children": [], "start_point": {"row": 182, "column": 31}, "end_point": {"row": 182, "column": 37}}, {"id": 719, "type": "type_identifier", "text": "task_struct", "parent": 717, "children": [], "start_point": {"row": 182, "column": 38}, "end_point": {"row": 182, "column": 49}}, {"id": 720, "type": "pointer_declarator", "text": "*p", "parent": 716, "children": [721, 722], "start_point": {"row": 182, "column": 50}, "end_point": {"row": 182, "column": 52}}, {"id": 721, "type": "*", "text": "*", "parent": 720, "children": [], "start_point": {"row": 182, "column": 50}, "end_point": {"row": 182, "column": 51}}, {"id": 722, "type": "identifier", "text": "p", "parent": 720, "children": [], "start_point": {"row": 182, "column": 51}, "end_point": {"row": 182, "column": 52}}, {"id": 723, "type": "parameter_declaration", "text": "int policy", "parent": 715, "children": [724, 725], "start_point": {"row": 183, "column": 10}, "end_point": {"row": 183, "column": 20}}, {"id": 724, "type": "primitive_type", "text": "int", "parent": 723, "children": [], "start_point": {"row": 183, "column": 10}, "end_point": {"row": 183, "column": 13}}, {"id": 725, "type": "identifier", "text": "policy", "parent": 723, "children": [], "start_point": {"row": 183, "column": 14}, "end_point": {"row": 183, "column": 20}}, {"id": 726, "type": "parameter_declaration", "text": "struct sched_param *lp", "parent": 715, "children": [727, 730], "start_point": {"row": 183, "column": 22}, "end_point": {"row": 183, "column": 44}}, {"id": 727, "type": "struct_specifier", "text": "struct sched_param", "parent": 726, "children": [728, 729], "start_point": {"row": 183, "column": 22}, "end_point": {"row": 183, "column": 40}}, {"id": 728, "type": "struct", "text": "struct", "parent": 727, "children": [], "start_point": {"row": 183, "column": 22}, "end_point": {"row": 183, "column": 28}}, {"id": 729, "type": "type_identifier", "text": "sched_param", "parent": 727, "children": [], "start_point": {"row": 183, "column": 29}, "end_point": {"row": 183, "column": 40}}, {"id": 730, "type": "pointer_declarator", "text": "*lp", "parent": 726, "children": [731, 732], "start_point": {"row": 183, "column": 41}, "end_point": {"row": 183, "column": 44}}, {"id": 731, "type": "*", "text": "*", "parent": 730, "children": [], "start_point": {"row": 183, "column": 41}, "end_point": {"row": 183, "column": 42}}, {"id": 732, "type": "identifier", "text": "lp", "parent": 730, "children": [], "start_point": {"row": 183, "column": 42}, "end_point": {"row": 183, "column": 44}}, {"id": 733, "type": "return_statement", "text": "return 0;", "parent": 711, "children": [734], "start_point": {"row": 185, "column": 1}, "end_point": {"row": 185, "column": 10}}, {"id": 734, "type": "number_literal", "text": "0", "parent": 733, "children": [], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 9}}, {"id": 735, "type": "function_definition", "text": "int cap_task_setnice(struct task_struct *p, int nice)\n{\n\treturn 1;\n}", "parent": null, "children": [736, 737], "start_point": {"row": 188, "column": 0}, "end_point": {"row": 191, "column": 1}}, {"id": 736, "type": "primitive_type", "text": "int", "parent": 735, "children": [], "start_point": {"row": 188, "column": 0}, "end_point": {"row": 188, "column": 3}}, {"id": 737, "type": "function_declarator", "text": "cap_task_setnice(struct task_struct *p, int nice)", "parent": 735, "children": [738, 739], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 53}}, {"id": 738, "type": "identifier", "text": "cap_task_setnice", "parent": 737, "children": [], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 20}}, {"id": 739, "type": "parameter_list", "text": "(struct task_struct *p, int nice)", "parent": 737, "children": [740, 747], "start_point": {"row": 188, "column": 20}, "end_point": {"row": 188, "column": 53}}, {"id": 740, "type": "parameter_declaration", "text": "struct task_struct *p", "parent": 739, "children": [741, 744], "start_point": {"row": 188, "column": 21}, "end_point": {"row": 188, "column": 42}}, {"id": 741, "type": "struct_specifier", "text": "struct task_struct", "parent": 740, "children": [742, 743], "start_point": {"row": 188, "column": 21}, "end_point": {"row": 188, "column": 39}}, {"id": 742, "type": "struct", "text": "struct", "parent": 741, "children": [], "start_point": {"row": 188, "column": 21}, "end_point": {"row": 188, "column": 27}}, {"id": 743, "type": "type_identifier", "text": "task_struct", "parent": 741, "children": [], "start_point": {"row": 188, "column": 28}, "end_point": {"row": 188, "column": 39}}, {"id": 744, "type": "pointer_declarator", "text": "*p", "parent": 740, "children": [745, 746], "start_point": {"row": 188, "column": 40}, "end_point": {"row": 188, "column": 42}}, {"id": 745, "type": "*", "text": "*", "parent": 744, "children": [], "start_point": {"row": 188, "column": 40}, "end_point": {"row": 188, "column": 41}}, {"id": 746, "type": "identifier", "text": "p", "parent": 744, "children": [], "start_point": {"row": 188, "column": 41}, "end_point": {"row": 188, "column": 42}}, {"id": 747, "type": "parameter_declaration", "text": "int nice", "parent": 739, "children": [748, 749], "start_point": {"row": 188, "column": 44}, "end_point": {"row": 188, "column": 52}}, {"id": 748, "type": "primitive_type", "text": "int", "parent": 747, "children": [], "start_point": {"row": 188, "column": 44}, "end_point": {"row": 188, "column": 47}}, {"id": 749, "type": "identifier", "text": "nice", "parent": 747, "children": [], "start_point": {"row": 188, "column": 48}, "end_point": {"row": 188, "column": 52}}, {"id": 750, "type": "return_statement", "text": "return 1;", "parent": 735, "children": [751], "start_point": {"row": 190, "column": 1}, "end_point": {"row": 190, "column": 10}}, {"id": 751, "type": "number_literal", "text": "1", "parent": 750, "children": [], "start_point": {"row": 190, "column": 8}, "end_point": {"row": 190, "column": 9}}, {"id": 752, "type": "function_definition", "text": "int cap_task_setscheduler(struct task_struct *p, int policy,\n\t\t\tstruct sched_param *lp)\n{\n\treturn 1;\n}", "parent": null, "children": [753, 754], "start_point": {"row": 193, "column": 0}, "end_point": {"row": 197, "column": 1}}, {"id": 753, "type": "primitive_type", "text": "int", "parent": 752, "children": [], "start_point": {"row": 193, "column": 0}, "end_point": {"row": 193, "column": 3}}, {"id": 754, "type": "function_declarator", "text": "cap_task_setscheduler(struct task_struct *p, int policy,\n\t\t\tstruct sched_param *lp)", "parent": 752, "children": [755, 756], "start_point": {"row": 193, "column": 4}, "end_point": {"row": 194, "column": 26}}, {"id": 755, "type": "identifier", "text": "cap_task_setscheduler", "parent": 754, "children": [], "start_point": {"row": 193, "column": 4}, "end_point": {"row": 193, "column": 25}}, {"id": 756, "type": "parameter_list", "text": "(struct task_struct *p, int policy,\n\t\t\tstruct sched_param *lp)", "parent": 754, "children": [757, 764, 767], "start_point": {"row": 193, "column": 25}, "end_point": {"row": 194, "column": 26}}, {"id": 757, "type": "parameter_declaration", "text": "struct task_struct *p", "parent": 756, "children": [758, 761], "start_point": {"row": 193, "column": 26}, "end_point": {"row": 193, "column": 47}}, {"id": 758, "type": "struct_specifier", "text": "struct task_struct", "parent": 757, "children": [759, 760], "start_point": {"row": 193, "column": 26}, "end_point": {"row": 193, "column": 44}}, {"id": 759, "type": "struct", "text": "struct", "parent": 758, "children": [], "start_point": {"row": 193, "column": 26}, "end_point": {"row": 193, "column": 32}}, {"id": 760, "type": "type_identifier", "text": "task_struct", "parent": 758, "children": [], "start_point": {"row": 193, "column": 33}, "end_point": {"row": 193, "column": 44}}, {"id": 761, "type": "pointer_declarator", "text": "*p", "parent": 757, "children": [762, 763], "start_point": {"row": 193, "column": 45}, "end_point": {"row": 193, "column": 47}}, {"id": 762, "type": "*", "text": "*", "parent": 761, "children": [], "start_point": {"row": 193, "column": 45}, "end_point": {"row": 193, "column": 46}}, {"id": 763, "type": "identifier", "text": "p", "parent": 761, "children": [], "start_point": {"row": 193, "column": 46}, "end_point": {"row": 193, "column": 47}}, {"id": 764, "type": "parameter_declaration", "text": "int policy", "parent": 756, "children": [765, 766], "start_point": {"row": 193, "column": 49}, "end_point": {"row": 193, "column": 59}}, {"id": 765, "type": "primitive_type", "text": "int", "parent": 764, "children": [], "start_point": {"row": 193, "column": 49}, "end_point": {"row": 193, "column": 52}}, {"id": 766, "type": "identifier", "text": "policy", "parent": 764, "children": [], "start_point": {"row": 193, "column": 53}, "end_point": {"row": 193, "column": 59}}, {"id": 767, "type": "parameter_declaration", "text": "struct sched_param *lp", "parent": 756, "children": [768, 771], "start_point": {"row": 194, "column": 3}, "end_point": {"row": 194, "column": 25}}, {"id": 768, "type": "struct_specifier", "text": "struct sched_param", "parent": 767, "children": [769, 770], "start_point": {"row": 194, "column": 3}, "end_point": {"row": 194, "column": 21}}, {"id": 769, "type": "struct", "text": "struct", "parent": 768, "children": [], "start_point": {"row": 194, "column": 3}, "end_point": {"row": 194, "column": 9}}, {"id": 770, "type": "type_identifier", "text": "sched_param", "parent": 768, "children": [], "start_point": {"row": 194, "column": 10}, "end_point": {"row": 194, "column": 21}}, {"id": 771, "type": "pointer_declarator", "text": "*lp", "parent": 767, "children": [772, 773], "start_point": {"row": 194, "column": 22}, "end_point": {"row": 194, "column": 25}}, {"id": 772, "type": "*", "text": "*", "parent": 771, "children": [], "start_point": {"row": 194, "column": 22}, "end_point": {"row": 194, "column": 23}}, {"id": 773, "type": "identifier", "text": "lp", "parent": 771, "children": [], "start_point": {"row": 194, "column": 23}, "end_point": {"row": 194, "column": 25}}, {"id": 774, "type": "return_statement", "text": "return 1;", "parent": 752, "children": [775], "start_point": {"row": 196, "column": 1}, "end_point": {"row": 196, "column": 10}}, {"id": 775, "type": "number_literal", "text": "1", "parent": 774, "children": [], "start_point": {"row": 196, "column": 8}, "end_point": {"row": 196, "column": 9}}]}, "node_categories": {"declarations": {"functions": [36, 38, 50, 89, 91, 121, 123, 138, 144, 166, 168, 197, 199, 221, 223, 240, 242, 309, 325, 330, 332, 419, 421, 526, 528, 533, 565, 567, 572, 614, 624, 647, 651, 656, 658, 675, 677, 687, 689, 711, 713, 735, 737, 752, 754], "variables": [6, 11, 16, 23, 41, 48, 56, 94, 99, 126, 133, 147, 154, 171, 174, 181, 202, 209, 226, 229, 245, 248, 255, 258, 266, 307, 312, 315, 318, 323, 328, 335, 340, 343, 348, 360, 424, 429, 432, 437, 444, 456, 473, 531, 539, 543, 548, 570, 578, 582, 587, 594, 627, 654, 661, 668, 680, 692, 699, 702, 716, 723, 726, 740, 747, 757, 764, 767], "classes": [17, 18, 24, 25, 42, 43, 57, 58, 100, 101, 127, 128, 139, 140, 148, 149, 175, 176, 182, 183, 194, 195, 203, 204, 218, 219, 230, 231, 249, 250, 349, 350, 438, 439, 445, 446, 457, 458, 549, 550, 588, 589, 619, 620, 628, 629, 662, 663, 669, 670, 681, 682, 693, 694, 703, 704, 717, 718, 727, 728, 741, 742, 758, 759, 768, 769], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [34, 64, 70, 77, 85, 86, 97, 108, 111, 112, 159, 188, 212, 236, 263, 272, 273, 277, 281, 285, 286, 290, 293, 298, 299, 303, 357, 365, 369, 373, 377, 380, 383, 390, 395, 400, 403, 406, 409, 413, 453, 465, 466, 467, 478, 481, 484, 488, 494, 499, 503, 506, 507, 510, 514, 517, 518, 522, 556, 559, 597, 603, 609, 635, 638], "assignments": [63, 69, 76, 82, 117, 387, 394, 487, 493, 600], "loops": [96], "conditionals": [9, 14, 19, 22, 26, 32, 35, 39, 44, 47, 54, 59, 62, 65, 66, 68, 71, 72, 79, 81, 83, 87, 88, 92, 98, 102, 106, 109, 110, 113, 114, 116, 118, 120, 124, 129, 132, 134, 137, 141, 145, 150, 153, 155, 158, 160, 169, 173, 177, 180, 184, 187, 189, 196, 200, 205, 208, 211, 213, 220, 224, 227, 228, 232, 235, 237, 243, 247, 251, 254, 257, 261, 264, 267, 270, 271, 274, 276, 278, 280, 282, 284, 287, 288, 291, 292, 294, 296, 297, 300, 302, 304, 306, 310, 314, 316, 317, 322, 326, 333, 336, 339, 341, 342, 347, 351, 355, 358, 359, 363, 366, 368, 370, 372, 374, 376, 378, 381, 384, 386, 388, 391, 393, 396, 397, 399, 401, 404, 407, 410, 412, 414, 416, 418, 422, 425, 428, 430, 431, 436, 440, 443, 447, 451, 454, 455, 459, 463, 468, 470, 471, 472, 476, 479, 482, 485, 486, 489, 490, 492, 495, 496, 498, 500, 502, 504, 508, 509, 511, 515, 519, 520, 521, 523, 525, 529, 537, 547, 551, 554, 557, 560, 562, 563, 564, 568, 576, 586, 590, 593, 596, 598, 601, 604, 606, 607, 608, 610, 613, 615, 618, 621, 625, 630, 633, 636, 639, 641, 642, 644, 645, 646, 650, 652, 659, 664, 667, 671, 674, 678, 683, 686, 690, 695, 698, 701, 705, 708, 714, 719, 722, 725, 729, 732, 738, 743, 746, 749, 755, 760, 763, 766, 770, 773], "returns": [163, 192, 216, 417, 555, 612, 634, 709, 733, 750, 774], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 10, 15, 162, 191, 193, 215, 217, 239, 513, 710, 734, 751, 775], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 36, "universal_type": "function", "name": "call_rcu_sched", "text_snippet": "void call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu))\n{\n\thead->func = func;"}, {"node_id": 38, "universal_type": "function", "name": "", "text_snippet": "call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu))"}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "(*func)(struct rcu_head *rcu)"}, {"node_id": 89, "universal_type": "function", "name": "linsched_rcu_invoke", "text_snippet": "void linsched_rcu_invoke(void)\n{\n\twhile(rcu_head) {\n\t\tstruct rcu_head *next = rcu_head->next;\n\t\trcu_"}, {"node_id": 91, "universal_type": "function", "name": "unknown", "text_snippet": "linsched_rcu_invoke(void)"}, {"node_id": 121, "universal_type": "function", "name": "wq_worker_waking_up", "text_snippet": "void wq_worker_waking_up(struct task_struct *task, unsigned int cpu) {}"}, {"node_id": 123, "universal_type": "function", "name": "cpu)", "text_snippet": "wq_worker_waking_up(struct task_struct *task, unsigned int cpu)"}, {"node_id": 138, "universal_type": "function", "name": "task_struct", "text_snippet": "struct task_struct *wq_worker_sleeping(struct task_struct *task,\n\t\t\t\t unsigned int cpu)\n{\n\t/* "}, {"node_id": 144, "universal_type": "function", "name": "cpu)", "text_snippet": "wq_worker_sleeping(struct task_struct *task,\n\t\t\t\t unsigned int cpu)"}, {"node_id": 166, "universal_type": "function", "name": "__group_send_sig_info", "text_snippet": "int __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)\n{\n\t/* should be unus"}, {"node_id": 168, "universal_type": "function", "name": "siginfo", "text_snippet": "__group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)"}, {"node_id": 197, "universal_type": "function", "name": "posix_timer_event", "text_snippet": "int posix_timer_event(struct k_itimer *timr, int si_private)\n{\n\t/* should be unused */\n\tassert(0);\n\n"}, {"node_id": 199, "universal_type": "function", "name": "si_private)", "text_snippet": "posix_timer_event(struct k_itimer *timr, int si_private)"}, {"node_id": 221, "universal_type": "function", "name": "posix_timers_register_clock", "text_snippet": "void posix_timers_register_clock(const clockid_t clock_id,\n\t\t\t\t struct k_clock *new_clock)\n{\n\t/* sho"}, {"node_id": 223, "universal_type": "function", "name": "k_clock", "text_snippet": "posix_timers_register_clock(const clockid_t clock_id,\n\t\t\t\t struct k_clock *new_clock)"}, {"node_id": 240, "universal_type": "function", "name": "__smp_call_function_single", "text_snippet": "void __smp_call_function_single(int cpu, struct call_single_data *data,\n\t\t\t\tint wait)\n{\n\tint this_cp"}, {"node_id": 242, "universal_type": "function", "name": "call_single_data", "text_snippet": "__smp_call_function_single(int cpu, struct call_single_data *data,\n\t\t\t\tint wait)"}, {"node_id": 309, "universal_type": "function", "name": "*data)", "text_snippet": "wake_up_stop_task(int cpu, cpu_stop_fn_t fxn, void *data)"}, {"node_id": 325, "universal_type": "function", "name": "unknown", "text_snippet": "linsched_current_handler(void)"}, {"node_id": 330, "universal_type": "function", "name": "stop_one_cpu", "text_snippet": "int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fxn, void *arg)\n{\n\tstruct task_struct *stop = stop_"}, {"node_id": 332, "universal_type": "function", "name": "cpu,", "text_snippet": "stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fxn, void *arg)"}, {"node_id": 419, "universal_type": "function", "name": "stop_one_cpu_nowait", "text_snippet": "void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fxn, void *arg,\n\t\t\t struct cpu_stop_work *w"}, {"node_id": 421, "universal_type": "function", "name": "cpu,", "text_snippet": "stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fxn, void *arg,\n\t\t\t struct cpu_stop_work *work_b"}, {"node_id": 526, "universal_type": "function", "name": "__stop_machine", "text_snippet": "int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)\n{\n\t/* technically we s"}, {"node_id": 528, "universal_type": "function", "name": "*data,", "text_snippet": "__stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)"}, {"node_id": 533, "universal_type": "function", "name": "unknown", "text_snippet": "(*fn)(void *)"}, {"node_id": 565, "universal_type": "function", "name": "stop_machine", "text_snippet": "int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)\n{\n\tint ret;\n\n\t/* No CPUs"}, {"node_id": 567, "universal_type": "function", "name": "*data,", "text_snippet": "stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)"}, {"node_id": 572, "universal_type": "function", "name": "unknown", "text_snippet": "(*fn)(void *)"}, {"node_id": 614, "universal_type": "function", "name": "task_group", "text_snippet": "__attribute__((weak)) struct task_group *cgroup_tg(struct cgroup *cgrp)\n{\n\treturn container_of(cgrou"}, {"node_id": 624, "universal_type": "function", "name": "unknown", "text_snippet": "cgroup_tg(struct cgroup *cgrp)"}, {"node_id": 647, "universal_type": "function", "name": "__sched", "text_snippet": "void __sched preempt_schedule(void)\n{\n}"}, {"node_id": 651, "universal_type": "function", "name": "unknown", "text_snippet": "preempt_schedule(void)"}, {"node_id": 656, "universal_type": "function", "name": "fire_sched_out_preempt_notifiers", "text_snippet": "void fire_sched_out_preempt_notifiers(struct task_struct *curr,\n\t\t\t\t struct task_struct *next)\n"}, {"node_id": 658, "universal_type": "function", "name": "task_struct", "text_snippet": "fire_sched_out_preempt_notifiers(struct task_struct *curr,\n\t\t\t\t struct task_struct *next)"}, {"node_id": 675, "universal_type": "function", "name": "fire_sched_in_preempt_notifiers", "text_snippet": "void fire_sched_in_preempt_notifiers(struct task_struct *curr)\n{\n}"}, {"node_id": 677, "universal_type": "function", "name": "unknown", "text_snippet": "fire_sched_in_preempt_notifiers(struct task_struct *curr)"}, {"node_id": 687, "universal_type": "function", "name": "security_task_getscheduler", "text_snippet": "int security_task_getscheduler(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)\n"}, {"node_id": 689, "universal_type": "function", "name": "policy,", "text_snippet": "security_task_getscheduler(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)"}, {"node_id": 711, "universal_type": "function", "name": "security_task_setscheduler", "text_snippet": "int security_task_setscheduler(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)\n"}, {"node_id": 713, "universal_type": "function", "name": "policy,", "text_snippet": "security_task_setscheduler(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)"}, {"node_id": 735, "universal_type": "function", "name": "cap_task_setnice", "text_snippet": "int cap_task_setnice(struct task_struct *p, int nice)\n{\n\treturn 1;\n}"}, {"node_id": 737, "universal_type": "function", "name": "nice)", "text_snippet": "cap_task_setnice(struct task_struct *p, int nice)"}, {"node_id": 752, "universal_type": "function", "name": "cap_task_setscheduler", "text_snippet": "int cap_task_setscheduler(struct task_struct *p, int policy,\n\t\t\tstruct sched_param *lp)\n{\n\treturn 1;"}, {"node_id": 754, "universal_type": "function", "name": "policy,", "text_snippet": "cap_task_setscheduler(struct task_struct *p, int policy,\n\t\t\tstruct sched_param *lp)"}], "class_declarations": [{"node_id": 17, "universal_type": "class", "name": "rcu_head", "text_snippet": "struct rcu_head"}, {"node_id": 18, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 24, "universal_type": "class", "name": "rcu_head", "text_snippet": "struct rcu_head"}, {"node_id": 25, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 42, "universal_type": "class", "name": "rcu_head", "text_snippet": "struct rcu_head"}, {"node_id": 43, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 57, "universal_type": "class", "name": "rcu_head", "text_snippet": "struct rcu_head"}, {"node_id": 58, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 100, "universal_type": "class", "name": "rcu_head", "text_snippet": "struct rcu_head"}, {"node_id": 101, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 127, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 128, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 139, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 140, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 148, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 149, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 175, "universal_type": "class", "name": "siginfo", "text_snippet": "struct siginfo"}, {"node_id": 176, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 182, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 183, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 194, "universal_type": "class", "name": "k_itimer", "text_snippet": "struct k_itimer"}, {"node_id": 195, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 203, "universal_type": "class", "name": "k_itimer", "text_snippet": "struct k_itimer"}, {"node_id": 204, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 218, "universal_type": "class", "name": "k_clock", "text_snippet": "struct k_clock"}, {"node_id": 219, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 230, "universal_type": "class", "name": "k_clock", "text_snippet": "struct k_clock"}, {"node_id": 231, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 249, "universal_type": "class", "name": "call_single_data", "text_snippet": "struct call_single_data"}, {"node_id": 250, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 349, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 350, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 438, "universal_type": "class", "name": "cpu_stop_work", "text_snippet": "struct cpu_stop_work"}, {"node_id": 439, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 445, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 446, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 457, "universal_type": "class", "name": "stop_task", "text_snippet": "struct stop_task"}, {"node_id": 458, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 549, "universal_type": "class", "name": "cpumask", "text_snippet": "struct cpumask"}, {"node_id": 550, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 588, "universal_type": "class", "name": "cpumask", "text_snippet": "struct cpumask"}, {"node_id": 589, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 619, "universal_type": "class", "name": "task_group", "text_snippet": "struct task_group"}, {"node_id": 620, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 628, "universal_type": "class", "name": "cgroup", "text_snippet": "struct cgroup"}, {"node_id": 629, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 662, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 663, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 669, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 670, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 681, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 682, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 693, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 694, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 703, "universal_type": "class", "name": "sched_param", "text_snippet": "struct sched_param"}, {"node_id": 704, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 717, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 718, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 727, "universal_type": "class", "name": "sched_param", "text_snippet": "struct sched_param"}, {"node_id": 728, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 741, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 742, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 758, "universal_type": "class", "name": "task_struct", "text_snippet": "struct task_struct"}, {"node_id": 759, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 768, "universal_type": "class", "name": "sched_param", "text_snippet": "struct sched_param"}, {"node_id": 769, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"linsched.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <assert.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include \"linsched.h\"\n#include <assert.h>\n\n/* for in_sched_functions() */\nchar __sched_text_start[1];\nchar __sched_text_end[1];\n\nstatic struct rcu_head *rcu_head;\nstatic struct rcu_head **rcu_curtail = &rcu_head;\n/* 'rcu' */\nvoid call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu))\n{\n\thead->func = func;\n\thead->next = NULL;\n\n\t*rcu_curtail = head;\n\trcu_curtail = &head->next;\n}\n\nvoid linsched_rcu_invoke(void)\n{\n\twhile(rcu_head) {\n\t\tstruct rcu_head *next = rcu_head->next;\n\t\trcu_head->func(rcu_head);\n\t\trcu_head = next;\n\t}\n}\n\n/* kernel/workqueue.c */\nvoid wq_worker_waking_up(struct task_struct *task, unsigned int cpu) {}\n\nstruct task_struct *wq_worker_sleeping(struct task_struct *task,\n\t\t\t\t unsigned int cpu)\n{\n\t/* should be unused */\n\tassert(0);\n\n\treturn NULL;\n}\n\n/* posix-timers.c */\nint __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)\n{\n\t/* should be unused */\n\tassert(0);\n\n\treturn 0;\n}\n\nstruct k_itimer;\nint posix_timer_event(struct k_itimer *timr, int si_private)\n{\n\t/* should be unused */\n\tassert(0);\n\n\treturn 0;\n}\n\nstruct k_clock;\nvoid posix_timers_register_clock(const clockid_t clock_id,\n\t\t\t\t struct k_clock *new_clock)\n{\n\t/* should be unused */\n\tassert(0);\n}\n\n/* kernel/smp.c */\nvoid __smp_call_function_single(int cpu, struct call_single_data *data,\n\t\t\t\tint wait)\n{\n\tint this_cpu = smp_processor_id();\n\tunsigned long flags;\n\n\tif (cpu != this_cpu)\n\t\tlinsched_change_cpu(cpu);\n\n\tlocal_irq_save(flags);\n\tdata->func(data->info);\n\tlocal_irq_restore(flags);\n\n\tif (cpu != this_cpu)\n\t\tlinsched_change_cpu(this_cpu);\n}\n\n\nvoid wake_up_stop_task(int cpu, cpu_stop_fn_t fxn, void *data);\n\n/* kernel/stop_machine.c */\nvoid linsched_current_handler(void);\n\nint stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fxn, void *arg)\n{\n\tstruct task_struct *stop = stop_tasks[cpu];\n\tint this_cpu = smp_processor_id(), ret;\n\n\tlinsched_change_cpu(cpu);\n\twake_up_process(stop);\n\t/* switch to stop */\n\tschedule();\n\tBUG_ON(current != stop);\n\tret = fxn(arg);\n\t/* switch back */\n\tstop->state = TASK_INTERRUPTIBLE;\n\tschedule();\n\n\t/* let whoever followed the stop task re-program (if needed) */\n\tlinsched_current_handler();\n\tBUG_ON(current == stop);\n\tlinsched_change_cpu(this_cpu);\n\n\treturn ret;\n}\n\nvoid stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fxn, void *arg,\n\t\t\t struct cpu_stop_work *work_buf)\n{\n\tstruct task_struct *stop = stop_tasks[cpu];\n\tstruct stop_task *stop_task = task_thread_info(stop)->td->data;\n\tint this_cpu = smp_processor_id();\n\n\t/*\n\t * catch a data race on simultaneous calls to stop_one_cpu_nowait, if\n\t * this ends up happening we'd need to support a proper queue here.\n\t */\n\tBUG_ON(stop_task->fxn);\n\tstop_task->fxn = fxn;\n\tstop_task->arg = arg;\n\n\t/*\n\t * in the nowait case we actually go through a schedule to make sure\n\t * that our cpu has a change to drop its rq->locks since they may be\n\t * needed.\n\t */\n\tlinsched_change_cpu(cpu);\n\thrtimer_set_expires(&stop_task->timer, ns_to_ktime(1));\n\thrtimer_start_expires(&stop_task->timer, HRTIMER_MODE_REL);\n\tlinsched_change_cpu(this_cpu);\n}\n\nint __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)\n{\n\t/* technically we should bounce every cpu, but don't bother */\n\treturn stop_one_cpu(cpumask_first(cpus), fn, data);\n}\n\nint stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus)\n{\n\tint ret;\n\n\t/* No CPUs can come up or down during this. */\n\tget_online_cpus();\n\tret = __stop_machine(fn, data, cpus);\n\tput_online_cpus();\n\treturn ret;\n}\n\n/* the below are unfortunately currently static so we re-define them */\n__attribute__((weak)) struct task_group *cgroup_tg(struct cgroup *cgrp)\n{\n\treturn container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),\n\t\t\t struct task_group, css);\n}\n\nvoid __sched preempt_schedule(void)\n{\n};\n\nvoid fire_sched_out_preempt_notifiers(struct task_struct *curr,\n\t\t\t\t struct task_struct *next)\n{\n}\n\nvoid fire_sched_in_preempt_notifiers(struct task_struct *curr)\n{\n}\n\nint security_task_getscheduler(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)\n{\n\treturn 0;\n}\n\nint security_task_setscheduler(struct task_struct *p,\n\t\t\t int policy, struct sched_param *lp)\n{\n\treturn 0;\n}\n\nint cap_task_setnice(struct task_struct *p, int nice)\n{\n\treturn 1;\n}\n\nint cap_task_setscheduler(struct task_struct *p, int policy,\n\t\t\tstruct sched_param *lp)\n{\n\treturn 1;\n}\n"}
360
c
/* * malloc.h * * definitions & function prototype declarations for "malloc.c" */ #define BUFUNIT 32 #define b_size(n, type) ((((n) / BUFUNIT) + 1) \ * BUFUNIT * sizeof(type)) #define b_realloc(ptr, n, type) (((n) % BUFUNIT) ? ((type *)(ptr)) \ : (type *)Xrealloc(ptr, b_size(n, type))) extern char *Xmalloc __P_((ALLOC_T)); extern char *Xrealloc __P_((VOID_P, ALLOC_T)); extern VOID Xfree __P_((VOID_P)); extern char *Xstrdup __P_((CONST char *)); extern char *Xstrndup __P_((CONST char *, int)); extern char *c_realloc __P_((char *, ALLOC_T, ALLOC_T *)); #ifndef MINIMUMSHELL extern int vasprintf2 __P_((char **, CONST char *, va_list)); extern char *asprintf2 __P_((CONST char *, ...)); #endif
42.11
18
(translation_unit) "/*\n * malloc.h\n *\n * definitions & function prototype declarations for "malloc.c"\n */\n\n#define BUFUNIT 32\n#define b_size(n, type) ((((n) / BUFUNIT) + 1) \\n * BUFUNIT * sizeof(type))\n#define b_realloc(ptr, n, type) (((n) % BUFUNIT) ? ((type *)(ptr)) \\n : (type *)Xrealloc(ptr, b_size(n, type)))\n\nextern char *Xmalloc __P_((ALLOC_T));\nextern char *Xrealloc __P_((VOID_P, ALLOC_T));\nextern VOID Xfree __P_((VOID_P));\nextern char *Xstrdup __P_((CONST char *));\nextern char *Xstrndup __P_((CONST char *, int));\nextern char *c_realloc __P_((char *, ALLOC_T, ALLOC_T *));\n#ifndef MINIMUMSHELL\nextern int vasprintf2 __P_((char **, CONST char *, va_list));\nextern char *asprintf2 __P_((CONST char *, ...));\n#endif\n" (comment) "/*\n * malloc.h\n *\n * definitions & function prototype declarations for "malloc.c"\n */" (preproc_def) "#define BUFUNIT 32\n" (#define) "#define" (identifier) "BUFUNIT" (preproc_arg) "32" (preproc_function_def) "#define b_size(n, type) ((((n) / BUFUNIT) + 1) \\n * BUFUNIT * sizeof(type))\n" (#define) "#define" (identifier) "b_size" (preproc_params) "(n, type)" (() "(" (identifier) "n" (,) "," (identifier) "type" ()) ")" (preproc_arg) "((((n) / BUFUNIT) + 1) \\n * BUFUNIT * sizeof(type))" (preproc_function_def) "#define b_realloc(ptr, n, type) (((n) % BUFUNIT) ? ((type *)(ptr)) \\n : (type *)Xrealloc(ptr, b_size(n, type)))\n" (#define) "#define" (identifier) "b_realloc" (preproc_params) "(ptr, n, type)" (() "(" (identifier) "ptr" (,) "," (identifier) "n" (,) "," (identifier) "type" ()) ")" (preproc_arg) "(((n) % BUFUNIT) ? ((type *)(ptr)) \\n : (type *)Xrealloc(ptr, b_size(n, type)))" (declaration) "extern char *Xmalloc" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "char" (pointer_declarator) "*Xmalloc" (*) "*" (identifier) "Xmalloc" (;) "" (expression_statement) "__P_((ALLOC_T));" (call_expression) "__P_((ALLOC_T))" (identifier) "__P_" (argument_list) "((ALLOC_T))" (() "(" (parenthesized_expression) "(ALLOC_T)" (() "(" (identifier) "ALLOC_T" ()) ")" ()) ")" (;) ";" (declaration) "extern char *Xrealloc" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "char" (pointer_declarator) "*Xrealloc" (*) "*" (identifier) "Xrealloc" (;) "" (expression_statement) "__P_((VOID_P, ALLOC_T));" (call_expression) "__P_((VOID_P, ALLOC_T))" (identifier) "__P_" (argument_list) "((VOID_P, ALLOC_T))" (() "(" (parenthesized_expression) "(VOID_P, ALLOC_T)" (() "(" (comma_expression) "VOID_P, ALLOC_T" (identifier) "VOID_P" (,) "," (identifier) "ALLOC_T" ()) ")" ()) ")" (;) ";" (declaration) "extern VOID Xfree" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "VOID" (identifier) "Xfree" (;) "" (expression_statement) "__P_((VOID_P));" (call_expression) "__P_((VOID_P))" (identifier) "__P_" (argument_list) "((VOID_P))" (() "(" (parenthesized_expression) "(VOID_P)" (() "(" (identifier) "VOID_P" ()) ")" ()) ")" (;) ";" (declaration) "extern char *Xstrdup" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "char" (pointer_declarator) "*Xstrdup" (*) "*" (identifier) "Xstrdup" (;) "" (declaration) "__P_((CONST char *));" (type_identifier) "__P_" (parenthesized_declarator) "((CONST char *))" (() "(" (parenthesized_declarator) "(CONST char *)" (() "(" (identifier) "CONST" (ERROR) "char *" (identifier) "char" (*) "*" ()) ")" ()) ")" (;) ";" (declaration) "extern char *Xstrndup" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "char" (pointer_declarator) "*Xstrndup" (*) "*" (identifier) "Xstrndup" (;) "" (declaration) "__P_((CONST char *, int));" (type_identifier) "__P_" (parenthesized_declarator) "((CONST char *, int))" (() "(" (parenthesized_declarator) "(CONST char *, int)" (() "(" (identifier) "CONST" (ERROR) "char *, int" (identifier) "char" (*) "*" (,) "," (primitive_type) "int" ()) ")" ()) ")" (;) ";" (declaration) "extern char *c_realloc" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "char" (pointer_declarator) "*c_realloc" (*) "*" (identifier) "c_realloc" (;) "" (expression_statement) "__P_((char *, ALLOC_T, ALLOC_T *));" (call_expression) "__P_((char *, ALLOC_T, ALLOC_T *))" (identifier) "__P_" (argument_list) "((char *, ALLOC_T, ALLOC_T *))" (() "(" (parenthesized_expression) "(char *, ALLOC_T, ALLOC_T *)" (() "(" (ERROR) "char *," (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" (,) "," (comma_expression) "ALLOC_T, ALLOC_T" (identifier) "ALLOC_T" (,) "," (identifier) "ALLOC_T" (ERROR) "*" (*) "*" ()) ")" ()) ")" (;) ";" (preproc_ifdef) "#ifndef MINIMUMSHELL\nextern int vasprintf2 __P_((char **, CONST char *, va_list));\nextern char *asprintf2 __P_((CONST char *, ...));\n#endif" (#ifndef) "#ifndef" (identifier) "MINIMUMSHELL" (declaration) "extern int vasprintf2" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "int" (identifier) "vasprintf2" (;) "" (expression_statement) "__P_((char **, CONST char *, va_list));" (call_expression) "__P_((char **, CONST char *, va_list))" (identifier) "__P_" (argument_list) "((char **, CONST char *, va_list))" (() "(" (parenthesized_expression) "(char **, CONST char *, va_list)" (() "(" (ERROR) "char **, CONST char *," (type_descriptor) "char **" (primitive_type) "char" (abstract_pointer_declarator) "**" (*) "*" (abstract_pointer_declarator) "*" (*) "*" (,) "," (identifier) "CONST" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" (,) "," (identifier) "va_list" ()) ")" ()) ")" (;) ";" (declaration) "extern char *asprintf2" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "char" (pointer_declarator) "*asprintf2" (*) "*" (identifier) "asprintf2" (;) "" (declaration) "__P_((CONST char *, ...));" (type_identifier) "__P_" (parenthesized_declarator) "((CONST char *, ...))" (() "(" (parenthesized_declarator) "(CONST char *, ...)" (() "(" (identifier) "CONST" (ERROR) "char *, ..." (identifier) "char" (*) "*" (,) "," (...) "..." ()) ")" ()) ")" (;) ";" (#endif) "#endif"
218
6
{"language": "c", "success": true, "metadata": {"lines": 18, "avg_line_length": 42.11, "nodes": 148, "errors": 0, "source_hash": "def59c115e46ac53b46208407cb6432c38a015595f4f681bc0d8b63accf1da95", "categorized_nodes": 76}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_def", "text": "#define\tBUFUNIT\t\t\t32\n", "parent": null, "children": [1, 2, 3], "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": "BUFUNIT", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 15}}, {"id": 3, "type": "preproc_arg", "text": "32", "parent": 0, "children": [], "start_point": {"row": 6, "column": 18}, "end_point": {"row": 6, "column": 20}}, {"id": 4, "type": "preproc_function_def", "text": "#define\tb_size(n, type)\t\t((((n) / BUFUNIT) + 1) \\\n\t\t\t\t* BUFUNIT * sizeof(type))\n", "parent": null, "children": [5, 6, 7, 10], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 5, "type": "#define", "text": "#define", "parent": 4, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 6, "type": "identifier", "text": "b_size", "parent": 4, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 14}}, {"id": 7, "type": "preproc_params", "text": "(n, type)", "parent": 4, "children": [8, 9], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 23}}, {"id": 8, "type": "identifier", "text": "n", "parent": 7, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 16}}, {"id": 9, "type": "identifier", "text": "type", "parent": 7, "children": [], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 22}}, {"id": 10, "type": "preproc_arg", "text": "((((n) / BUFUNIT) + 1) \\\n\t\t\t\t* BUFUNIT * sizeof(type))", "parent": 4, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 8, "column": 29}}, {"id": 11, "type": "preproc_function_def", "text": "#define\tb_realloc(ptr, n, type)\t(((n) % BUFUNIT) ? ((type *)(ptr)) \\\n\t\t\t\t: (type *)Xrealloc(ptr, b_size(n, type)))\n", "parent": null, "children": [12, 13, 14, 18], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 12, "type": "#define", "text": "#define", "parent": 11, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 13, "type": "identifier", "text": "b_realloc", "parent": 11, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 17}}, {"id": 14, "type": "preproc_params", "text": "(ptr, n, type)", "parent": 11, "children": [15, 16, 17], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 31}}, {"id": 15, "type": "identifier", "text": "ptr", "parent": 14, "children": [], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 21}}, {"id": 16, "type": "identifier", "text": "n", "parent": 14, "children": [], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 24}}, {"id": 17, "type": "identifier", "text": "type", "parent": 14, "children": [], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 30}}, {"id": 18, "type": "preproc_arg", "text": "(((n) % BUFUNIT) ? ((type *)(ptr)) \\\n\t\t\t\t: (type *)Xrealloc(ptr, b_size(n, type)))", "parent": 11, "children": [], "start_point": {"row": 9, "column": 32}, "end_point": {"row": 10, "column": 45}}, {"id": 19, "type": "declaration", "text": "extern char *Xmalloc", "parent": null, "children": [20, 22, 23], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 20}}, {"id": 20, "type": "storage_class_specifier", "text": "extern", "parent": 19, "children": [21], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 21, "type": "extern", "text": "extern", "parent": 20, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 22, "type": "primitive_type", "text": "char", "parent": 19, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 11}}, {"id": 23, "type": "pointer_declarator", "text": "*Xmalloc", "parent": 19, "children": [24, 25], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 20}}, {"id": 24, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 13}}, {"id": 25, "type": "identifier", "text": "Xmalloc", "parent": 23, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 20}}, {"id": 26, "type": "call_expression", "text": "__P_((ALLOC_T))", "parent": null, "children": [27, 28], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 36}}, {"id": 27, "type": "identifier", "text": "__P_", "parent": 26, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 25}}, {"id": 28, "type": "argument_list", "text": "((ALLOC_T))", "parent": 26, "children": [29], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 36}}, {"id": 29, "type": "parenthesized_expression", "text": "(ALLOC_T)", "parent": 28, "children": [30], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 35}}, {"id": 30, "type": "identifier", "text": "ALLOC_T", "parent": 29, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 34}}, {"id": 31, "type": "declaration", "text": "extern char *Xrealloc", "parent": null, "children": [32, 34, 35], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 21}}, {"id": 32, "type": "storage_class_specifier", "text": "extern", "parent": 31, "children": [33], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 33, "type": "extern", "text": "extern", "parent": 32, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 34, "type": "primitive_type", "text": "char", "parent": 31, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 11}}, {"id": 35, "type": "pointer_declarator", "text": "*Xrealloc", "parent": 31, "children": [36, 37], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 21}}, {"id": 36, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 13}}, {"id": 37, "type": "identifier", "text": "Xrealloc", "parent": 35, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 21}}, {"id": 38, "type": "call_expression", "text": "__P_((VOID_P, ALLOC_T))", "parent": null, "children": [39, 40], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 45}}, {"id": 39, "type": "identifier", "text": "__P_", "parent": 38, "children": [], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 26}}, {"id": 40, "type": "argument_list", "text": "((VOID_P, ALLOC_T))", "parent": 38, "children": [41], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 45}}, {"id": 41, "type": "parenthesized_expression", "text": "(VOID_P, ALLOC_T)", "parent": 40, "children": [42], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 44}}, {"id": 42, "type": "comma_expression", "text": "VOID_P, ALLOC_T", "parent": 41, "children": [43, 44], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 43}}, {"id": 43, "type": "identifier", "text": "VOID_P", "parent": 42, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 34}}, {"id": 44, "type": "identifier", "text": "ALLOC_T", "parent": 42, "children": [], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 43}}, {"id": 45, "type": "declaration", "text": "extern VOID Xfree", "parent": null, "children": [46, 48, 49], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 17}}, {"id": 46, "type": "storage_class_specifier", "text": "extern", "parent": 45, "children": [47], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 47, "type": "extern", "text": "extern", "parent": 46, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 48, "type": "type_identifier", "text": "VOID", "parent": 45, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 11}}, {"id": 49, "type": "identifier", "text": "Xfree", "parent": 45, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 17}}, {"id": 50, "type": "call_expression", "text": "__P_((VOID_P))", "parent": null, "children": [51, 52], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 32}}, {"id": 51, "type": "identifier", "text": "__P_", "parent": 50, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 22}}, {"id": 52, "type": "argument_list", "text": "((VOID_P))", "parent": 50, "children": [53], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 32}}, {"id": 53, "type": "parenthesized_expression", "text": "(VOID_P)", "parent": 52, "children": [54], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 31}}, {"id": 54, "type": "identifier", "text": "VOID_P", "parent": 53, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 30}}, {"id": 55, "type": "declaration", "text": "extern char *Xstrdup", "parent": null, "children": [56, 58, 59], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 20}}, {"id": 56, "type": "storage_class_specifier", "text": "extern", "parent": 55, "children": [57], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 57, "type": "extern", "text": "extern", "parent": 56, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 58, "type": "primitive_type", "text": "char", "parent": 55, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 11}}, {"id": 59, "type": "pointer_declarator", "text": "*Xstrdup", "parent": 55, "children": [60, 61], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 20}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 13}}, {"id": 61, "type": "identifier", "text": "Xstrdup", "parent": 59, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 20}}, {"id": 62, "type": "declaration", "text": "__P_((CONST char *));", "parent": null, "children": [63, 64], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 42}}, {"id": 63, "type": "type_identifier", "text": "__P_", "parent": 62, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 25}}, {"id": 64, "type": "parenthesized_declarator", "text": "((CONST char *))", "parent": 62, "children": [65], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 41}}, {"id": 65, "type": "parenthesized_declarator", "text": "(CONST char *)", "parent": 64, "children": [66, 67], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 40}}, {"id": 66, "type": "identifier", "text": "CONST", "parent": 65, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 32}}, {"id": 67, "type": "ERROR", "text": "char *", "parent": 65, "children": [68, 69], "start_point": {"row": 15, "column": 33}, "end_point": {"row": 15, "column": 39}}, {"id": 68, "type": "identifier", "text": "char", "parent": 67, "children": [], "start_point": {"row": 15, "column": 33}, "end_point": {"row": 15, "column": 37}}, {"id": 69, "type": "*", "text": "*", "parent": 67, "children": [], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 39}}, {"id": 70, "type": "declaration", "text": "extern char *Xstrndup", "parent": null, "children": [71, 73, 74], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 21}}, {"id": 71, "type": "storage_class_specifier", "text": "extern", "parent": 70, "children": [72], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 72, "type": "extern", "text": "extern", "parent": 71, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 73, "type": "primitive_type", "text": "char", "parent": 70, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 11}}, {"id": 74, "type": "pointer_declarator", "text": "*Xstrndup", "parent": 70, "children": [75, 76], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 21}}, {"id": 75, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 13}}, {"id": 76, "type": "identifier", "text": "Xstrndup", "parent": 74, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 21}}, {"id": 77, "type": "declaration", "text": "__P_((CONST char *, int));", "parent": null, "children": [78, 79], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 48}}, {"id": 78, "type": "type_identifier", "text": "__P_", "parent": 77, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 26}}, {"id": 79, "type": "parenthesized_declarator", "text": "((CONST char *, int))", "parent": 77, "children": [80], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 47}}, {"id": 80, "type": "parenthesized_declarator", "text": "(CONST char *, int)", "parent": 79, "children": [81, 82], "start_point": {"row": 16, "column": 27}, "end_point": {"row": 16, "column": 46}}, {"id": 81, "type": "identifier", "text": "CONST", "parent": 80, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 33}}, {"id": 82, "type": "ERROR", "text": "char *, int", "parent": 80, "children": [83, 84, 85], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 45}}, {"id": 83, "type": "identifier", "text": "char", "parent": 82, "children": [], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 38}}, {"id": 84, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 16, "column": 39}, "end_point": {"row": 16, "column": 40}}, {"id": 85, "type": "primitive_type", "text": "int", "parent": 82, "children": [], "start_point": {"row": 16, "column": 42}, "end_point": {"row": 16, "column": 45}}, {"id": 86, "type": "declaration", "text": "extern char *c_realloc", "parent": null, "children": [87, 89, 90], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 22}}, {"id": 87, "type": "storage_class_specifier", "text": "extern", "parent": 86, "children": [88], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 88, "type": "extern", "text": "extern", "parent": 87, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 89, "type": "primitive_type", "text": "char", "parent": 86, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 11}}, {"id": 90, "type": "pointer_declarator", "text": "*c_realloc", "parent": 86, "children": [91, 92], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 22}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 13}}, {"id": 92, "type": "identifier", "text": "c_realloc", "parent": 90, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 22}}, {"id": 93, "type": "call_expression", "text": "__P_((char *, ALLOC_T, ALLOC_T *))", "parent": null, "children": [94, 95], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 57}}, {"id": 94, "type": "identifier", "text": "__P_", "parent": 93, "children": [], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 27}}, {"id": 95, "type": "argument_list", "text": "((char *, ALLOC_T, ALLOC_T *))", "parent": 93, "children": [96], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 57}}, {"id": 96, "type": "parenthesized_expression", "text": "(char *, ALLOC_T, ALLOC_T *)", "parent": 95, "children": [97, 102, 105], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 56}}, {"id": 97, "type": "ERROR", "text": "char *,", "parent": 96, "children": [98], "start_point": {"row": 17, "column": 29}, "end_point": {"row": 17, "column": 36}}, {"id": 98, "type": "type_descriptor", "text": "char *", "parent": 97, "children": [99, 100], "start_point": {"row": 17, "column": 29}, "end_point": {"row": 17, "column": 35}}, {"id": 99, "type": "primitive_type", "text": "char", "parent": 98, "children": [], "start_point": {"row": 17, "column": 29}, "end_point": {"row": 17, "column": 33}}, {"id": 100, "type": "abstract_pointer_declarator", "text": "*", "parent": 98, "children": [101], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 35}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 35}}, {"id": 102, "type": "comma_expression", "text": "ALLOC_T, ALLOC_T", "parent": 96, "children": [103, 104], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 53}}, {"id": 103, "type": "identifier", "text": "ALLOC_T", "parent": 102, "children": [], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 44}}, {"id": 104, "type": "identifier", "text": "ALLOC_T", "parent": 102, "children": [], "start_point": {"row": 17, "column": 46}, "end_point": {"row": 17, "column": 53}}, {"id": 105, "type": "ERROR", "text": "*", "parent": 96, "children": [106], "start_point": {"row": 17, "column": 54}, "end_point": {"row": 17, "column": 55}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 17, "column": 54}, "end_point": {"row": 17, "column": 55}}, {"id": 107, "type": "preproc_ifdef", "text": "#ifndef\tMINIMUMSHELL\nextern int vasprintf2 __P_((char **, CONST char *, va_list));\nextern char *asprintf2 __P_((CONST char *, ...));\n#endif", "parent": null, "children": [108, 109, 110, 132, 139, 147], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 108, "type": "#ifndef", "text": "#ifndef", "parent": 107, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 109, "type": "identifier", "text": "MINIMUMSHELL", "parent": 107, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 20}}, {"id": 110, "type": "declaration", "text": "extern int vasprintf2", "parent": 107, "children": [111, 113, 114], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 21}}, {"id": 111, "type": "storage_class_specifier", "text": "extern", "parent": 110, "children": [112], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 112, "type": "extern", "text": "extern", "parent": 111, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 113, "type": "primitive_type", "text": "int", "parent": 110, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 10}}, {"id": 114, "type": "identifier", "text": "vasprintf2", "parent": 110, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 21}}, {"id": 115, "type": "call_expression", "text": "__P_((char **, CONST char *, va_list))", "parent": 107, "children": [116, 117], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 60}}, {"id": 116, "type": "identifier", "text": "__P_", "parent": 115, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 26}}, {"id": 117, "type": "argument_list", "text": "((char **, CONST char *, va_list))", "parent": 115, "children": [118], "start_point": {"row": 19, "column": 26}, "end_point": {"row": 19, "column": 60}}, {"id": 118, "type": "parenthesized_expression", "text": "(char **, CONST char *, va_list)", "parent": 117, "children": [119, 131], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 59}}, {"id": 119, "type": "ERROR", "text": "char **, CONST char *,", "parent": 118, "children": [120, 126, 127], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 50}}, {"id": 120, "type": "type_descriptor", "text": "char **", "parent": 119, "children": [121, 122], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 35}}, {"id": 121, "type": "primitive_type", "text": "char", "parent": 120, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 32}}, {"id": 122, "type": "abstract_pointer_declarator", "text": "**", "parent": 120, "children": [123, 124], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 35}}, {"id": 123, "type": "*", "text": "*", "parent": 122, "children": [], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 34}}, {"id": 124, "type": "abstract_pointer_declarator", "text": "*", "parent": 122, "children": [125], "start_point": {"row": 19, "column": 34}, "end_point": {"row": 19, "column": 35}}, {"id": 125, "type": "*", "text": "*", "parent": 124, "children": [], "start_point": {"row": 19, "column": 34}, "end_point": {"row": 19, "column": 35}}, {"id": 126, "type": "identifier", "text": "CONST", "parent": 119, "children": [], "start_point": {"row": 19, "column": 37}, "end_point": {"row": 19, "column": 42}}, {"id": 127, "type": "type_descriptor", "text": "char *", "parent": 119, "children": [128, 129], "start_point": {"row": 19, "column": 43}, "end_point": {"row": 19, "column": 49}}, {"id": 128, "type": "primitive_type", "text": "char", "parent": 127, "children": [], "start_point": {"row": 19, "column": 43}, "end_point": {"row": 19, "column": 47}}, {"id": 129, "type": "abstract_pointer_declarator", "text": "*", "parent": 127, "children": [130], "start_point": {"row": 19, "column": 48}, "end_point": {"row": 19, "column": 49}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 19, "column": 48}, "end_point": {"row": 19, "column": 49}}, {"id": 131, "type": "identifier", "text": "va_list", "parent": 118, "children": [], "start_point": {"row": 19, "column": 51}, "end_point": {"row": 19, "column": 58}}, {"id": 132, "type": "declaration", "text": "extern char *asprintf2", "parent": 107, "children": [133, 135, 136], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 22}}, {"id": 133, "type": "storage_class_specifier", "text": "extern", "parent": 132, "children": [134], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 134, "type": "extern", "text": "extern", "parent": 133, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 135, "type": "primitive_type", "text": "char", "parent": 132, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 11}}, {"id": 136, "type": "pointer_declarator", "text": "*asprintf2", "parent": 132, "children": [137, 138], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 22}}, {"id": 137, "type": "*", "text": "*", "parent": 136, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 13}}, {"id": 138, "type": "identifier", "text": "asprintf2", "parent": 136, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 22}}, {"id": 139, "type": "declaration", "text": "__P_((CONST char *, ...));", "parent": 107, "children": [140, 141], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 49}}, {"id": 140, "type": "type_identifier", "text": "__P_", "parent": 139, "children": [], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 27}}, {"id": 141, "type": "parenthesized_declarator", "text": "((CONST char *, ...))", "parent": 139, "children": [142], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 48}}, {"id": 142, "type": "parenthesized_declarator", "text": "(CONST char *, ...)", "parent": 141, "children": [143, 144], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 47}}, {"id": 143, "type": "identifier", "text": "CONST", "parent": 142, "children": [], "start_point": {"row": 20, "column": 29}, "end_point": {"row": 20, "column": 34}}, {"id": 144, "type": "ERROR", "text": "char *, ...", "parent": 142, "children": [145, 146], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 46}}, {"id": 145, "type": "identifier", "text": "char", "parent": 144, "children": [], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 39}}, {"id": 146, "type": "*", "text": "*", "parent": 144, "children": [], "start_point": {"row": 20, "column": 40}, "end_point": {"row": 20, "column": 41}}, {"id": 147, "type": "#endif", "text": "#endif", "parent": 107, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 6}}]}, "node_categories": {"declarations": {"functions": [4, 11], "variables": [19, 31, 45, 55, 62, 70, 77, 86, 110, 132, 139], "classes": [20, 32, 46, 56, 71, 87, 111, 133], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [26, 29, 38, 41, 42, 50, 53, 93, 96, 102, 115, 118], "assignments": [], "loops": [], "conditionals": [2, 6, 8, 9, 13, 15, 16, 17, 25, 27, 30, 37, 39, 43, 44, 48, 49, 51, 54, 61, 63, 66, 68, 76, 78, 81, 83, 92, 94, 103, 104, 107, 108, 109, 114, 116, 126, 131, 138, 140, 143, 145, 147], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 4, "universal_type": "function", "name": "unknown", "text_snippet": "#define\tb_size(n, type)\t\t((((n) / BUFUNIT) + 1) \\\n\t\t\t\t* BUFUNIT * sizeof(type))\n"}, {"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "#define\tb_realloc(ptr, n, type)\t(((n) % BUFUNIT) ? ((type *)(ptr)) \\\n\t\t\t\t: (type *)Xrealloc(ptr, b_s"}], "class_declarations": [{"node_id": 20, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 32, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 46, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 56, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 71, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 87, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 111, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 133, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": []}, "original_source_code": "/*\n *\tmalloc.h\n *\n *\tdefinitions & function prototype declarations for \"malloc.c\"\n */\n\n#define\tBUFUNIT\t\t\t32\n#define\tb_size(n, type)\t\t((((n) / BUFUNIT) + 1) \\\n\t\t\t\t* BUFUNIT * sizeof(type))\n#define\tb_realloc(ptr, n, type)\t(((n) % BUFUNIT) ? ((type *)(ptr)) \\\n\t\t\t\t: (type *)Xrealloc(ptr, b_size(n, type)))\n\nextern char *Xmalloc __P_((ALLOC_T));\nextern char *Xrealloc __P_((VOID_P, ALLOC_T));\nextern VOID Xfree __P_((VOID_P));\nextern char *Xstrdup __P_((CONST char *));\nextern char *Xstrndup __P_((CONST char *, int));\nextern char *c_realloc __P_((char *, ALLOC_T, ALLOC_T *));\n#ifndef\tMINIMUMSHELL\nextern int vasprintf2 __P_((char **, CONST char *, va_list));\nextern char *asprintf2 __P_((CONST char *, ...));\n#endif\n"}
361
c
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notice for more information. //============================================================================ #ifndef vtk_m_cont_internal_IteratorFromArrayPortal_h #define vtk_m_cont_internal_IteratorFromArrayPortal_h #include <vtkm/Assert.h> #include <vtkm/cont/ArrayPortal.h> #include <vtkm/internal/ArrayPortalValueReference.h> namespace vtkm { namespace cont { namespace internal { template <class ArrayPortalType> class IteratorFromArrayPortal { public: using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type; using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>; using pointer = typename std::add_pointer<value_type>::type; using difference_type = std::ptrdiff_t; using iterator_category = std::random_access_iterator_tag; using iter = IteratorFromArrayPortal<ArrayPortalType>; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT IteratorFromArrayPortal() : Portal() , Index(0) { } VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0) : Portal(portal) , Index(index) { VTKM_ASSERT(index >= 0); VTKM_ASSERT(index <= portal.GetNumberOfValues()); } VTKM_EXEC_CONT reference operator*() const { return reference(this->Portal, this->Index); } VTKM_EXEC_CONT reference operator->() const { return reference(this->Portal, this->Index); } VTKM_EXEC_CONT reference operator[](difference_type idx) const { return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx)); } VTKM_EXEC_CONT iter& operator++() { this->Index++; VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues()); return *this; } VTKM_EXEC_CONT iter operator++(int) { return iter(this->Portal, this->Index++); } VTKM_EXEC_CONT iter& operator--() { this->Index--; VTKM_ASSERT(this->Index >= 0); return *this; } VTKM_EXEC_CONT iter operator--(int) { return iter(this->Portal, this->Index--); } VTKM_EXEC_CONT iter& operator+=(difference_type n) { this->Index += static_cast<vtkm::Id>(n); VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues()); return *this; } VTKM_EXEC_CONT iter& operator-=(difference_type n) { this->Index += static_cast<vtkm::Id>(n); VTKM_ASSERT(this->Index >= 0); return *this; } VTKM_EXEC_CONT iter operator-(difference_type n) const { return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n)); } ArrayPortalType Portal; vtkm::Id Index; }; template <class ArrayPortalType> VTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin( const ArrayPortalType& portal) { return IteratorFromArrayPortal<ArrayPortalType>(portal, 0); } template <class ArrayPortalType> VTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd( const ArrayPortalType& portal) { return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues()); } template <typename PortalType> VTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs, vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs) { return lhs.Index == rhs.Index; } template <typename PortalType> VTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs, vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs) { return lhs.Index != rhs.Index; } template <typename PortalType> VTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs, vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs) { return lhs.Index < rhs.Index; } template <typename PortalType> VTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs, vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs) { return lhs.Index <= rhs.Index; } template <typename PortalType> VTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs, vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs) { return lhs.Index > rhs.Index; } template <typename PortalType> VTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs, vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs) { return lhs.Index >= rhs.Index; } template <typename PortalType> VTKM_EXEC_CONT std::ptrdiff_t operator-( vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs, vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs) { return lhs.Index - rhs.Index; } template <typename PortalType> VTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+( vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter, std::ptrdiff_t n) { return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>( iter.Portal, iter.Index + static_cast<vtkm::Id>(n)); } template <typename PortalType> VTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+( std::ptrdiff_t n, vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter) { return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>( iter.Portal, iter.Index + static_cast<vtkm::Id>(n)); } } } } // namespace vtkm::cont::internal #endif //vtk_m_cont_internal_IteratorFromArrayPortal_h
34.15
170
(translation_unit) "//============================================================================\n// Copyright (c) Kitware, Inc.\n// All rights reserved.\n// See LICENSE.txt for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//============================================================================\n#ifndef vtk_m_cont_internal_IteratorFromArrayPortal_h\n#define vtk_m_cont_internal_IteratorFromArrayPortal_h\n\n#include <vtkm/Assert.h>\n#include <vtkm/cont/ArrayPortal.h>\n#include <vtkm/internal/ArrayPortalValueReference.h>\n\nnamespace vtkm\n{\nnamespace cont\n{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index == rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index != rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index < rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index <= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index > rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index >= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}\n}\n}\n} // namespace vtkm::cont::internal\n\n#endif //vtk_m_cont_internal_IteratorFromArrayPortal_h\n" (comment) "//============================================================================" (comment) "// Copyright (c) Kitware, Inc." (comment) "// All rights reserved." (comment) "// See LICENSE.txt for details." (comment) "//" (comment) "// This software is distributed WITHOUT ANY WARRANTY; without even" (comment) "// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR" (comment) "// PURPOSE. See the above copyright notice for more information." (comment) "//============================================================================" (preproc_ifdef) "#ifndef vtk_m_cont_internal_IteratorFromArrayPortal_h\n#define vtk_m_cont_internal_IteratorFromArrayPortal_h\n\n#include <vtkm/Assert.h>\n#include <vtkm/cont/ArrayPortal.h>\n#include <vtkm/internal/ArrayPortalValueReference.h>\n\nnamespace vtkm\n{\nnamespace cont\n{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index == rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index != rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index < rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index <= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index > rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index >= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}\n}\n}\n} // namespace vtkm::cont::internal\n\n#endif" (#ifndef) "#ifndef" (identifier) "vtk_m_cont_internal_IteratorFromArrayPortal_h" (preproc_def) "#define vtk_m_cont_internal_IteratorFromArrayPortal_h\n" (#define) "#define" (identifier) "vtk_m_cont_internal_IteratorFromArrayPortal_h" (preproc_include) "#include <vtkm/Assert.h>\n" (#include) "#include" (system_lib_string) "<vtkm/Assert.h>" (preproc_include) "#include <vtkm/cont/ArrayPortal.h>\n" (#include) "#include" (system_lib_string) "<vtkm/cont/ArrayPortal.h>" (preproc_include) "#include <vtkm/internal/ArrayPortalValueReference.h>\n" (#include) "#include" (system_lib_string) "<vtkm/internal/ArrayPortalValueReference.h>" (function_definition) "namespace vtkm\n{\nnamespace cont\n{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index == rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index != rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index < rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index <= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index > rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index >= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}" (type_identifier) "namespace" (identifier) "vtkm" (compound_statement) "{\nnamespace cont\n{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index == rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index != rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index < rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index <= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index > rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index >= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}" ({) "{" (function_definition) "namespace cont\n{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index == rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index != rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index < rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index <= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index > rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index >= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}" (type_identifier) "namespace" (identifier) "cont" (compound_statement) "{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index == rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index != rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index < rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index <= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index > rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index >= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}" ({) "{" (function_definition) "namespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}" (type_identifier) "namespace" (identifier) "internal" (compound_statement) "{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}" ({) "{" (ERROR) "template <class ArrayPortalType>\nclass IteratorFromArrayPortal" (binary_expression) "template <class ArrayPortalType>\nclass" (binary_expression) "template <class ArrayPortalType" (identifier) "template" (<) "<" (ERROR) "class" (identifier) "class" (identifier) "ArrayPortalType" (>) ">" (identifier) "class" (identifier) "IteratorFromArrayPortal" (compound_statement) "{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }" ({) "{" (labeled_statement) "public:\n using value_type = typename" (statement_identifier) "public" (:) ":" (declaration) "using value_type = typename" (type_identifier) "using" (init_declarator) "value_type = typename" (identifier) "value_type" (=) "=" (identifier) "typename" (;) "" (labeled_statement) "std::remove_const<typename" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "remove_const<typename" (binary_expression) "remove_const<typename" (identifier) "remove_const" (<) "<" (identifier) "typename" (;) "" (labeled_statement) "ArrayPortalType::ValueType>::type;" (statement_identifier) "ArrayPortalType" (ERROR) "::ValueType>:" (:) ":" (:) ":" (identifier) "ValueType" (>) ">" (:) ":" (:) ":" (expression_statement) "type;" (identifier) "type" (;) ";" (declaration) "using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;" (type_identifier) "using" (init_declarator) "reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType" (identifier) "reference" (=) "=" (ERROR) "vtkm::internal::" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (binary_expression) "ArrayPortalValueReference<ArrayPortalType" (identifier) "ArrayPortalValueReference" (<) "<" (identifier) "ArrayPortalType" (ERROR) ">" (>) ">" (;) ";" (declaration) "using pointer = typename" (type_identifier) "using" (init_declarator) "pointer = typename" (identifier) "pointer" (=) "=" (identifier) "typename" (;) "" (labeled_statement) "std::add_pointer<value_type>::type;" (statement_identifier) "std" (ERROR) "::add_pointer<value_type>:" (:) ":" (:) ":" (binary_expression) "add_pointer<value_type" (identifier) "add_pointer" (<) "<" (identifier) "value_type" (>) ">" (:) ":" (:) ":" (expression_statement) "type;" (identifier) "type" (;) ";" (declaration) "using difference_type = std::ptrdiff_t;" (type_identifier) "using" (init_declarator) "difference_type = std" (identifier) "difference_type" (=) "=" (identifier) "std" (ERROR) "::ptrdiff_t" (:) ":" (:) ":" (primitive_type) "ptrdiff_t" (;) ";" (declaration) "using iterator_category = std::random_access_iterator_tag;" (type_identifier) "using" (init_declarator) "iterator_category = std::random_access_iterator_tag" (identifier) "iterator_category" (=) "=" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (identifier) "random_access_iterator_tag" (;) ";" (declaration) "using iter = IteratorFromArrayPortal<ArrayPortalType>;" (type_identifier) "using" (init_declarator) "iter = IteratorFromArrayPortal<ArrayPortalType" (identifier) "iter" (=) "=" (binary_expression) "IteratorFromArrayPortal<ArrayPortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "ArrayPortalType" (ERROR) ">" (>) ">" (;) ";" (declaration) "VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT" (type_identifier) "VTKM_SUPPRESS_EXEC_WARNINGS" (identifier) "VTKM_EXEC_CONT" (;) "" (ERROR) "IteratorFromArrayPortal()\n :" (call_expression) "IteratorFromArrayPortal()" (identifier) "IteratorFromArrayPortal" (argument_list) "()" (() "(" ()) ")" (:) ":" (expression_statement) "Portal()\n , Index(0)" (comma_expression) "Portal()\n , Index(0)" (call_expression) "Portal()" (identifier) "Portal" (argument_list) "()" (() "(" ()) ")" (,) "," (call_expression) "Index(0)" (identifier) "Index" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) "" (compound_statement) "{\n }" ({) "{" (}) "}" (declaration) "VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT" (type_identifier) "VTKM_SUPPRESS_EXEC_WARNINGS" (identifier) "VTKM_EXEC_CONT" (;) "" (declaration) "explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);" (type_identifier) "explicit" (init_declarator) "IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)" (function_declarator) "IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index" (identifier) "IteratorFromArrayPortal" (parameter_list) "(const ArrayPortalType& portal, vtkm::Id" (() "(" (parameter_declaration) "const ArrayPortalType& portal" (type_qualifier) "const" (const) "const" (type_identifier) "ArrayPortalType" (ERROR) "&" (&) "&" (identifier) "portal" (,) "," (parameter_declaration) "vtkm::Id" (type_identifier) "vtkm" (ERROR) "::" (:) ":" (:) ":" (identifier) "Id" ()) "" (identifier) "index" (=) "=" (ERROR) "0)\n :" (number_literal) "0" ()) ")" (:) ":" (call_expression) "Portal(portal)" (identifier) "Portal" (argument_list) "(portal)" (() "(" (identifier) "portal" ()) ")" (,) "," (ERROR) "Index(index)\n {" (function_declarator) "Index(index)" (identifier) "Index" (parameter_list) "(index)" (() "(" (parameter_declaration) "index" (type_identifier) "index" ()) ")" ({) "{" (function_declarator) "VTKM_ASSERT(index >= 0)" (identifier) "VTKM_ASSERT" (parameter_list) "(index >= 0)" (() "(" (parameter_declaration) "index" (type_identifier) "index" (ERROR) ">= 0" (>=) ">=" (number_literal) "0" ()) ")" (;) ";" (expression_statement) "VTKM_ASSERT(index <= portal.GetNumberOfValues());" (call_expression) "VTKM_ASSERT(index <= portal.GetNumberOfValues())" (identifier) "VTKM_ASSERT" (argument_list) "(index <= portal.GetNumberOfValues())" (() "(" (binary_expression) "index <= portal.GetNumberOfValues()" (identifier) "index" (<=) "<=" (call_expression) "portal.GetNumberOfValues()" (field_expression) "portal.GetNumberOfValues" (identifier) "portal" (.) "." (field_identifier) "GetNumberOfValues" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (declaration) "VTKM_EXEC_CONT\n reference" (type_identifier) "VTKM_EXEC_CONT" (identifier) "reference" (;) "" (expression_statement) "operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);" (binary_expression) "operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0)" (identifier) "operator" (*) "*" (parenthesized_expression) "() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0)" (() "(" (ERROR) ") const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return reference(this->Portal, this->Index); }" ({) "{" (return_statement) "return reference(this->Portal, this->Index);" (return) "return" (call_expression) "reference(this->Portal, this->Index)" (identifier) "reference" (argument_list) "(this->Portal, this->Index)" (() "(" (field_expression) "this->Portal" (identifier) "this" (->) "->" (field_identifier) "Portal" (,) "," (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" ()) ")" (;) ";" (}) "}" (identifier) "VTKM_EXEC_CONT" (identifier) "reference" (call_expression) "operator->()" (field_expression) "operator->" (identifier) "operator" (->) "->" (field_identifier) "" (argument_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return reference(this->Portal, this->Index); }" ({) "{" (return_statement) "return reference(this->Portal, this->Index);" (return) "return" (call_expression) "reference(this->Portal, this->Index)" (identifier) "reference" (argument_list) "(this->Portal, this->Index)" (() "(" (field_expression) "this->Portal" (identifier) "this" (->) "->" (field_identifier) "Portal" (,) "," (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" ()) ")" (;) ";" (}) "}" (identifier) "VTKM_EXEC_CONT" (identifier) "reference" (type_descriptor) "operator[](difference_type idx)" (type_identifier) "operator" (abstract_function_declarator) "[](difference_type idx)" (abstract_array_declarator) "[]" ([) "[" (]) "]" (parameter_list) "(difference_type idx)" (() "(" (parameter_declaration) "difference_type idx" (type_identifier) "difference_type" (identifier) "idx" ()) ")" (identifier) "const" (compound_statement) "{\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }" ({) "{" (return_statement) "return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));" (return) "return" (call_expression) "reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx))" (identifier) "reference" (argument_list) "(this->Portal, this->Index + static_cast<vtkm::Id>(idx))" (() "(" (field_expression) "this->Portal" (identifier) "this" (->) "->" (field_identifier) "Portal" (,) "," (binary_expression) "this->Index + static_cast<vtkm::Id>(idx)" (binary_expression) "this->Index + static_cast<vtkm" (binary_expression) "this->Index + static_cast" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (+) "+" (identifier) "static_cast" (<) "<" (identifier) "vtkm" (ERROR) "::Id" (:) ":" (:) ":" (identifier) "Id" (>) ">" (parenthesized_expression) "(idx)" (() "(" (identifier) "idx" ()) ")" ()) ")" (;) ";" (}) "}" (identifier) "VTKM_EXEC_CONT" (binary_expression) "iter& operator++()" (identifier) "iter" (&) "&" (call_expression) "operator++()" (update_expression) "operator++" (identifier) "operator" (++) "++" (argument_list) "()" (() "(" ()) ")" (compound_statement) "{\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }" ({) "{" (expression_statement) "this->Index++;" (update_expression) "this->Index++" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (++) "++" (;) ";" (expression_statement) "VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());" (call_expression) "VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues())" (identifier) "VTKM_ASSERT" (argument_list) "(this->Index <= this->Portal.GetNumberOfValues())" (() "(" (binary_expression) "this->Index <= this->Portal.GetNumberOfValues()" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (<=) "<=" (call_expression) "this->Portal.GetNumberOfValues()" (field_expression) "this->Portal.GetNumberOfValues" (field_expression) "this->Portal" (identifier) "this" (->) "->" (field_identifier) "Portal" (.) "." (field_identifier) "GetNumberOfValues" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (return_statement) "return *this;" (return) "return" (pointer_expression) "*this" (*) "*" (identifier) "this" (;) ";" (}) "}" (identifier) "VTKM_EXEC_CONT" (identifier) "iter" (call_expression) "operator++(int)" (update_expression) "operator++" (identifier) "operator" (++) "++" (argument_list) "(int)" (() "(" (identifier) "int" ()) ")" (compound_statement) "{ return iter(this->Portal, this->Index++); }" ({) "{" (return_statement) "return iter(this->Portal, this->Index++);" (return) "return" (call_expression) "iter(this->Portal, this->Index++)" (identifier) "iter" (argument_list) "(this->Portal, this->Index++)" (() "(" (field_expression) "this->Portal" (identifier) "this" (->) "->" (field_identifier) "Portal" (,) "," (update_expression) "this->Index++" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (++) "++" ()) ")" (;) ";" (}) "}" (identifier) "VTKM_EXEC_CONT" (binary_expression) "iter& operator--()" (identifier) "iter" (&) "&" (call_expression) "operator--()" (update_expression) "operator--" (identifier) "operator" (--) "--" (argument_list) "()" (() "(" ()) ")" (compound_statement) "{\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }" ({) "{" (expression_statement) "this->Index--;" (update_expression) "this->Index--" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (--) "--" (;) ";" (expression_statement) "VTKM_ASSERT(this->Index >= 0);" (call_expression) "VTKM_ASSERT(this->Index >= 0)" (identifier) "VTKM_ASSERT" (argument_list) "(this->Index >= 0)" (() "(" (binary_expression) "this->Index >= 0" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (>=) ">=" (number_literal) "0" ()) ")" (;) ";" (return_statement) "return *this;" (return) "return" (pointer_expression) "*this" (*) "*" (identifier) "this" (;) ";" (}) "}" (identifier) "VTKM_EXEC_CONT" (identifier) "iter" (call_expression) "operator--(int)" (update_expression) "operator--" (identifier) "operator" (--) "--" (argument_list) "(int)" (() "(" (identifier) "int" ()) ")" (compound_statement) "{ return iter(this->Portal, this->Index--); }" ({) "{" (return_statement) "return iter(this->Portal, this->Index--);" (return) "return" (call_expression) "iter(this->Portal, this->Index--)" (identifier) "iter" (argument_list) "(this->Portal, this->Index--)" (() "(" (field_expression) "this->Portal" (identifier) "this" (->) "->" (field_identifier) "Portal" (,) "," (update_expression) "this->Index--" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (--) "--" ()) ")" (;) ";" (}) "}" (identifier) "VTKM_EXEC_CONT" (binary_expression) "iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0)" (identifier) "iter" (&) "&" (assignment_expression) "operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0)" (identifier) "operator" (+=) "+=" (binary_expression) "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0)" (binary_expression) "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType" (binary_expression) "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)" (binary_expression) "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType" (binary_expression) "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal" (binary_expression) "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType" (binary_expression) "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate" (binary_expression) "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }" (compound_literal_expression) "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }" (() "(" (type_descriptor) "difference_type" (type_identifier) "difference_type" (ERROR) "n" (identifier) "n" ()) ")" (initializer_list) "{\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }" ({) "{" (ERROR) "this->Index += static_cast<vtkm::Id>(n);" (binary_expression) "this->Index += static_cast<vtkm::Id>(n)" (assignment_expression) "this->Index += static_cast<vtkm" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (+=) "+=" (binary_expression) "static_cast<vtkm" (identifier) "static_cast" (<) "<" (identifier) "vtkm" (ERROR) "::Id" (:) ":" (:) ":" (identifier) "Id" (>) ">" (parenthesized_expression) "(n)" (() "(" (identifier) "n" ()) ")" (;) ";" (binary_expression) "VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this" (call_expression) "VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues())" (identifier) "VTKM_ASSERT" (argument_list) "(this->Index <= this->Portal.GetNumberOfValues())" (() "(" (binary_expression) "this->Index <= this->Portal.GetNumberOfValues()" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (<=) "<=" (call_expression) "this->Portal.GetNumberOfValues()" (field_expression) "this->Portal.GetNumberOfValues" (field_expression) "this->Portal" (identifier) "this" (->) "->" (field_identifier) "Portal" (.) "." (field_identifier) "GetNumberOfValues" (argument_list) "()" (() "(" ()) ")" ()) ")" (ERROR) ";\n return" (;) ";" (return) "return" (*) "*" (identifier) "this" (ERROR) ";" (;) ";" (}) "}" (ERROR) "VTKM_EXEC_CONT\n iter" (identifier) "VTKM_EXEC_CONT" (identifier) "iter" (&) "&" (assignment_expression) "operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }" (identifier) "operator" (-=) "-=" (compound_literal_expression) "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }" (() "(" (type_descriptor) "difference_type" (type_identifier) "difference_type" (ERROR) "n" (identifier) "n" ()) ")" (initializer_list) "{\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }" ({) "{" (ERROR) "this->Index += static_cast<vtkm::Id>(n);" (binary_expression) "this->Index += static_cast<vtkm::Id>(n)" (assignment_expression) "this->Index += static_cast<vtkm" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (+=) "+=" (binary_expression) "static_cast<vtkm" (identifier) "static_cast" (<) "<" (identifier) "vtkm" (ERROR) "::Id" (:) ":" (:) ":" (identifier) "Id" (>) ">" (parenthesized_expression) "(n)" (() "(" (identifier) "n" ()) ")" (;) ";" (binary_expression) "VTKM_ASSERT(this->Index >= 0);\n return *this" (call_expression) "VTKM_ASSERT(this->Index >= 0)" (identifier) "VTKM_ASSERT" (argument_list) "(this->Index >= 0)" (() "(" (binary_expression) "this->Index >= 0" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (>=) ">=" (number_literal) "0" ()) ")" (ERROR) ";\n return" (;) ";" (return) "return" (*) "*" (identifier) "this" (ERROR) ";" (;) ";" (}) "}" (ERROR) "VTKM_EXEC_CONT\n iter operator" (identifier) "VTKM_EXEC_CONT" (identifier) "iter" (identifier) "operator" (-) "-" (ERROR) "(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};" (compound_literal_expression) "(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }" (() "(" (type_descriptor) "difference_type" (type_identifier) "difference_type" (ERROR) "n" (identifier) "n" ()) ")" (ERROR) "const" (identifier) "const" (initializer_list) "{\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }" ({) "{" (ERROR) "return" (identifier) "return" (call_expression) "iter(this->Portal, this->Index - static_cast<vtkm::Id>(n))" (identifier) "iter" (argument_list) "(this->Portal, this->Index - static_cast<vtkm::Id>(n))" (() "(" (field_expression) "this->Portal" (identifier) "this" (->) "->" (field_identifier) "Portal" (,) "," (binary_expression) "this->Index - static_cast<vtkm::Id>(n)" (binary_expression) "this->Index - static_cast<vtkm" (binary_expression) "this->Index - static_cast" (field_expression) "this->Index" (identifier) "this" (->) "->" (field_identifier) "Index" (-) "-" (identifier) "static_cast" (<) "<" (identifier) "vtkm" (ERROR) "::Id" (:) ":" (:) ":" (identifier) "Id" (>) ">" (parenthesized_expression) "(n)" (() "(" (identifier) "n" ()) ")" ()) ")" (ERROR) ";" (;) ";" (}) "}" (identifier) "ArrayPortalType" (identifier) "Portal" (;) ";" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "Id" (identifier) "Index" (;) ";" (}) "}" (;) ";" (identifier) "template" (<) "<" (ERROR) "class" (identifier) "class" (identifier) "ArrayPortalType" (>) ">" (ERROR) "VTKM_EXEC_CONT" (identifier) "VTKM_EXEC_CONT" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "ArrayPortalType" (>) ">" (call_expression) "make_IteratorBegin(\n const ArrayPortalType& portal)" (identifier) "make_IteratorBegin" (argument_list) "(\n const ArrayPortalType& portal)" (() "(" (ERROR) "const" (identifier) "const" (binary_expression) "ArrayPortalType& portal" (identifier) "ArrayPortalType" (&) "&" (identifier) "portal" ()) ")" (ERROR) "{\n return IteratorFromArrayPortal" ({) "{" (return) "return" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "ArrayPortalType" (>) ">" (parenthesized_expression) "(portal, 0)" (() "(" (comma_expression) "portal, 0" (identifier) "portal" (,) "," (number_literal) "0" ()) ")" ()) "" (;) ";" (}) "}" (expression_statement) "template <class ArrayPortalType>\nVTKM_EXEC_CONT" (binary_expression) "template <class ArrayPortalType>\nVTKM_EXEC_CONT" (binary_expression) "template <class ArrayPortalType" (identifier) "template" (<) "<" (ERROR) "class" (identifier) "class" (identifier) "ArrayPortalType" (>) ">" (identifier) "VTKM_EXEC_CONT" (;) "" (expression_statement) "IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)" (binary_expression) "IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)" (binary_expression) "IteratorFromArrayPortal<ArrayPortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "ArrayPortalType" (>) ">" (call_expression) "make_IteratorEnd(\n const ArrayPortalType& portal)" (identifier) "make_IteratorEnd" (argument_list) "(\n const ArrayPortalType& portal)" (() "(" (ERROR) "const" (identifier) "const" (binary_expression) "ArrayPortalType& portal" (identifier) "ArrayPortalType" (&) "&" (identifier) "portal" ()) ")" (;) "" (compound_statement) "{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());\n}" ({) "{" (return_statement) "return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());" (return) "return" (binary_expression) "IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues())" (binary_expression) "IteratorFromArrayPortal<ArrayPortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "ArrayPortalType" (>) ">" (parenthesized_expression) "(portal, portal.GetNumberOfValues())" (() "(" (comma_expression) "portal, portal.GetNumberOfValues()" (identifier) "portal" (,) "," (call_expression) "portal.GetNumberOfValues()" (field_expression) "portal.GetNumberOfValues" (identifier) "portal" (.) "." (field_identifier) "GetNumberOfValues" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (expression_statement) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator" (binary_expression) "template <typename PortalType" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "PortalType" (>) ">" (ERROR) "VTKM_EXEC_CONT bool" (identifier) "VTKM_EXEC_CONT" (identifier) "bool" (identifier) "operator" (==) "==" (parenthesized_expression) "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (() "(" (ERROR) "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (comma_expression) "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm" (binary_expression) "IteratorFromArrayPortal<PortalType> const& lhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "lhs" (,) "," (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (binary_expression) "IteratorFromArrayPortal<PortalType> const& rhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "rhs" ()) ")" (;) "" (compound_statement) "{\n return lhs.Index == rhs.Index;\n}" ({) "{" (return_statement) "return lhs.Index == rhs.Index;" (return) "return" (binary_expression) "lhs.Index == rhs.Index" (field_expression) "lhs.Index" (identifier) "lhs" (.) "." (field_identifier) "Index" (==) "==" (field_expression) "rhs.Index" (identifier) "rhs" (.) "." (field_identifier) "Index" (;) ";" (}) "}" (expression_statement) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator" (binary_expression) "template <typename PortalType" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "PortalType" (>) ">" (ERROR) "VTKM_EXEC_CONT bool" (identifier) "VTKM_EXEC_CONT" (identifier) "bool" (identifier) "operator" (!=) "!=" (parenthesized_expression) "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (() "(" (ERROR) "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (comma_expression) "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm" (binary_expression) "IteratorFromArrayPortal<PortalType> const& lhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "lhs" (,) "," (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (binary_expression) "IteratorFromArrayPortal<PortalType> const& rhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "rhs" ()) ")" (;) "" (compound_statement) "{\n return lhs.Index != rhs.Index;\n}" ({) "{" (return_statement) "return lhs.Index != rhs.Index;" (return) "return" (binary_expression) "lhs.Index != rhs.Index" (field_expression) "lhs.Index" (identifier) "lhs" (.) "." (field_identifier) "Index" (!=) "!=" (field_expression) "rhs.Index" (identifier) "rhs" (.) "." (field_identifier) "Index" (;) ";" (}) "}" (expression_statement) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator" (binary_expression) "template <typename PortalType" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "PortalType" (>) ">" (ERROR) "VTKM_EXEC_CONT bool" (identifier) "VTKM_EXEC_CONT" (identifier) "bool" (identifier) "operator" (<) "<" (parenthesized_expression) "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (() "(" (ERROR) "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (comma_expression) "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm" (binary_expression) "IteratorFromArrayPortal<PortalType> const& lhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "lhs" (,) "," (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (binary_expression) "IteratorFromArrayPortal<PortalType> const& rhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "rhs" ()) ")" (;) "" (compound_statement) "{\n return lhs.Index < rhs.Index;\n}" ({) "{" (return_statement) "return lhs.Index < rhs.Index;" (return) "return" (binary_expression) "lhs.Index < rhs.Index" (field_expression) "lhs.Index" (identifier) "lhs" (.) "." (field_identifier) "Index" (<) "<" (field_expression) "rhs.Index" (identifier) "rhs" (.) "." (field_identifier) "Index" (;) ";" (}) "}" (expression_statement) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator" (binary_expression) "template <typename PortalType" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "PortalType" (>) ">" (ERROR) "VTKM_EXEC_CONT bool" (identifier) "VTKM_EXEC_CONT" (identifier) "bool" (identifier) "operator" (<=) "<=" (parenthesized_expression) "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (() "(" (ERROR) "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (comma_expression) "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm" (binary_expression) "IteratorFromArrayPortal<PortalType> const& lhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "lhs" (,) "," (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (binary_expression) "IteratorFromArrayPortal<PortalType> const& rhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "rhs" ()) ")" (;) "" (compound_statement) "{\n return lhs.Index <= rhs.Index;\n}" ({) "{" (return_statement) "return lhs.Index <= rhs.Index;" (return) "return" (binary_expression) "lhs.Index <= rhs.Index" (field_expression) "lhs.Index" (identifier) "lhs" (.) "." (field_identifier) "Index" (<=) "<=" (field_expression) "rhs.Index" (identifier) "rhs" (.) "." (field_identifier) "Index" (;) ";" (}) "}" (expression_statement) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator" (binary_expression) "template <typename PortalType" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "PortalType" (>) ">" (ERROR) "VTKM_EXEC_CONT bool" (identifier) "VTKM_EXEC_CONT" (identifier) "bool" (identifier) "operator" (>) ">" (parenthesized_expression) "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (() "(" (ERROR) "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (comma_expression) "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm" (binary_expression) "IteratorFromArrayPortal<PortalType> const& lhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "lhs" (,) "," (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (binary_expression) "IteratorFromArrayPortal<PortalType> const& rhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "rhs" ()) ")" (;) "" (compound_statement) "{\n return lhs.Index > rhs.Index;\n}" ({) "{" (return_statement) "return lhs.Index > rhs.Index;" (return) "return" (binary_expression) "lhs.Index > rhs.Index" (field_expression) "lhs.Index" (identifier) "lhs" (.) "." (field_identifier) "Index" (>) ">" (field_expression) "rhs.Index" (identifier) "rhs" (.) "." (field_identifier) "Index" (;) ";" (}) "}" (expression_statement) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT bool operator" (binary_expression) "template <typename PortalType" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "PortalType" (>) ">" (ERROR) "VTKM_EXEC_CONT bool" (identifier) "VTKM_EXEC_CONT" (identifier) "bool" (identifier) "operator" (>=) ">=" (parenthesized_expression) "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (() "(" (ERROR) "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (comma_expression) "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm" (binary_expression) "IteratorFromArrayPortal<PortalType> const& lhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "lhs" (,) "," (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (binary_expression) "IteratorFromArrayPortal<PortalType> const& rhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "rhs" ()) ")" (;) "" (compound_statement) "{\n return lhs.Index >= rhs.Index;\n}" ({) "{" (return_statement) "return lhs.Index >= rhs.Index;" (return) "return" (binary_expression) "lhs.Index >= rhs.Index" (field_expression) "lhs.Index" (identifier) "lhs" (.) "." (field_identifier) "Index" (>=) ">=" (field_expression) "rhs.Index" (identifier) "rhs" (.) "." (field_identifier) "Index" (;) ";" (}) "}" (expression_statement) "template <typename PortalType>\nVTKM_EXEC_CONT" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT" (binary_expression) "template <typename PortalType" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "PortalType" (>) ">" (identifier) "VTKM_EXEC_CONT" (;) "" (labeled_statement) "std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}" (statement_identifier) "std" (:) ":" (ERROR) ":ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (:) ":" (primitive_type) "ptrdiff_t" (identifier) "operator" (unary_expression) "-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (-) "-" (parenthesized_expression) "(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)" (() "(" (ERROR) "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (comma_expression) "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm" (binary_expression) "IteratorFromArrayPortal<PortalType> const& lhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "lhs" (,) "," (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (binary_expression) "IteratorFromArrayPortal<PortalType> const& rhs" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "rhs" ()) ")" (compound_statement) "{\n return lhs.Index - rhs.Index;\n}" ({) "{" (return_statement) "return lhs.Index - rhs.Index;" (return) "return" (binary_expression) "lhs.Index - rhs.Index" (field_expression) "lhs.Index" (identifier) "lhs" (.) "." (field_identifier) "Index" (-) "-" (field_expression) "rhs.Index" (identifier) "rhs" (.) "." (field_identifier) "Index" (;) ";" (}) "}" (expression_statement) "template <typename PortalType>\nVTKM_EXEC_CONT" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT" (binary_expression) "template <typename PortalType" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "PortalType" (>) ">" (identifier) "VTKM_EXEC_CONT" (;) "" (labeled_statement) "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));" (statement_identifier) "vtkm" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));" (statement_identifier) "cont" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));" (statement_identifier) "internal" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));" (binary_expression) "IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (binary_expression) "operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))" (identifier) "operator" (+) "+" (compound_literal_expression) "(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))" (() "(" (ERROR) "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (comma_expression) "IteratorFromArrayPortal<PortalType> const& iter,\n std" (binary_expression) "IteratorFromArrayPortal<PortalType> const& iter" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "iter" (,) "," (identifier) "std" (:) ":" (:) ":" (primitive_type) "ptrdiff_t" (type_descriptor) "n" (type_identifier) "n" ()) ")" (initializer_list) "{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))" ({) "{" (initializer_pair) "return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))" (field_identifier) "return" (ERROR) "vtkm::cont::internal:" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (binary_expression) "IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (parenthesized_expression) "(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))" (() "(" (ERROR) "iter.Portal, iter.Index + static_cast<vtkm::" (comma_expression) "iter.Portal, iter.Index + static_cast<vtkm" (field_expression) "iter.Portal" (identifier) "iter" (.) "." (field_identifier) "Portal" (,) "," (binary_expression) "iter.Index + static_cast<vtkm" (binary_expression) "iter.Index + static_cast" (field_expression) "iter.Index" (identifier) "iter" (.) "." (field_identifier) "Index" (+) "+" (identifier) "static_cast" (<) "<" (identifier) "vtkm" (:) ":" (:) ":" (binary_expression) "Id>(n)" (identifier) "Id" (>) ">" (parenthesized_expression) "(n)" (() "(" (identifier) "n" ()) ")" ()) ")" (}) "" (;) ";" (}) "}" (expression_statement) "template <typename PortalType>\nVTKM_EXEC_CONT" (binary_expression) "template <typename PortalType>\nVTKM_EXEC_CONT" (binary_expression) "template <typename PortalType" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "PortalType" (>) ">" (identifier) "VTKM_EXEC_CONT" (;) "" (labeled_statement) "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));" (statement_identifier) "vtkm" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));" (statement_identifier) "cont" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));" (statement_identifier) "internal" (:) ":" (ERROR) ":IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{" (:) ":" (binary_expression) "IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (binary_expression) "operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)" (identifier) "operator" (+) "+" (parenthesized_expression) "(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)" (() "(" (ERROR) "std::ptrdiff_t n,\n vtkm::cont::internal::" (identifier) "std" (:) ":" (:) ":" (primitive_type) "ptrdiff_t" (comma_expression) "n,\n vtkm" (identifier) "n" (,) "," (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (binary_expression) "IteratorFromArrayPortal<PortalType> const& iter" (binary_expression) "IteratorFromArrayPortal<PortalType> const" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (identifier) "const" (&) "&" (identifier) "iter" ()) ")" ({) "{" (return_statement) "return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));" (return) "return" (ERROR) "vtkm::cont::internal::" (identifier) "vtkm" (:) ":" (:) ":" (identifier) "cont" (:) ":" (:) ":" (identifier) "internal" (:) ":" (:) ":" (binary_expression) "IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))" (binary_expression) "IteratorFromArrayPortal<PortalType" (identifier) "IteratorFromArrayPortal" (<) "<" (identifier) "PortalType" (>) ">" (parenthesized_expression) "(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))" (() "(" (ERROR) "iter.Portal, iter.Index + static_cast<vtkm::" (comma_expression) "iter.Portal, iter.Index + static_cast<vtkm" (field_expression) "iter.Portal" (identifier) "iter" (.) "." (field_identifier) "Portal" (,) "," (binary_expression) "iter.Index + static_cast<vtkm" (binary_expression) "iter.Index + static_cast" (field_expression) "iter.Index" (identifier) "iter" (.) "." (field_identifier) "Index" (+) "+" (identifier) "static_cast" (<) "<" (identifier) "vtkm" (:) ":" (:) ":" (binary_expression) "Id>(n)" (identifier) "Id" (>) ">" (parenthesized_expression) "(n)" (() "(" (identifier) "n" ()) ")" ()) ")" (;) ";" (}) "}" (ERROR) "}\n}\n}" (}) "}" (}) "}" (}) "}" (comment) "// namespace vtkm::cont::internal" (#endif) "#endif" (comment) "//vtk_m_cont_internal_IteratorFromArrayPortal_h"
1,614
78
{"language": "c", "success": true, "metadata": {"lines": 170, "avg_line_length": 34.15, "nodes": 1015, "errors": 0, "source_hash": "71ad6a50154b9d0bb81652702e8c1091e29d65211f6bd629d3c7517f447e3706", "categorized_nodes": 747}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef vtk_m_cont_internal_IteratorFromArrayPortal_h\n#define vtk_m_cont_internal_IteratorFromArrayPortal_h\n\n#include <vtkm/Assert.h>\n#include <vtkm/cont/ArrayPortal.h>\n#include <vtkm/internal/ArrayPortalValueReference.h>\n\nnamespace vtkm\n{\nnamespace cont\n{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index == rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index != rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index < rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index <= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index > rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index >= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}\n}\n}\n} // namespace vtkm::cont::internal\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 1013, 1014], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 200, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 2, "type": "identifier", "text": "vtk_m_cont_internal_IteratorFromArrayPortal_h", "parent": 0, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 53}}, {"id": 3, "type": "preproc_def", "text": "#define vtk_m_cont_internal_IteratorFromArrayPortal_h\n", "parent": 0, "children": [4, 5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 5, "type": "identifier", "text": "vtk_m_cont_internal_IteratorFromArrayPortal_h", "parent": 3, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 53}}, {"id": 6, "type": "preproc_include", "text": "#include <vtkm/Assert.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<vtkm/Assert.h>", "parent": 6, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 24}}, {"id": 9, "type": "preproc_include", "text": "#include <vtkm/cont/ArrayPortal.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<vtkm/cont/ArrayPortal.h>", "parent": 9, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 34}}, {"id": 12, "type": "preproc_include", "text": "#include <vtkm/internal/ArrayPortalValueReference.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<vtkm/internal/ArrayPortalValueReference.h>", "parent": 12, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 52}}, {"id": 15, "type": "function_definition", "text": "namespace vtkm\n{\nnamespace cont\n{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index == rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index != rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index < rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index <= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index > rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index >= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 195, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 9}}, {"id": 17, "type": "identifier", "text": "vtkm", "parent": 15, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 14}}, {"id": 18, "type": "function_definition", "text": "namespace cont\n{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index == rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index != rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index < rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index <= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index > rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index >= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}", "parent": 15, "children": [19, 20], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 186, "column": 1}}, {"id": 19, "type": "type_identifier", "text": "namespace", "parent": 18, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 9}}, {"id": 20, "type": "identifier", "text": "cont", "parent": 18, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 14}}, {"id": 21, "type": "function_definition", "text": "namespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}", "parent": 18, "children": [22, 23], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 120, "column": 1}}, {"id": 22, "type": "type_identifier", "text": "namespace", "parent": 21, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 9}}, {"id": 23, "type": "identifier", "text": "internal", "parent": 21, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 18}}, {"id": 24, "type": "ERROR", "text": "template <class ArrayPortalType>\nclass IteratorFromArrayPortal", "parent": 21, "children": [25, 31], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 29}}, {"id": 25, "type": "binary_expression", "text": "template <class ArrayPortalType>\nclass", "parent": 24, "children": [26, 30], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 5}}, {"id": 26, "type": "binary_expression", "text": "template <class ArrayPortalType", "parent": 25, "children": [27, 28, 29], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 31}}, {"id": 27, "type": "identifier", "text": "template", "parent": 26, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 28, "type": "<", "text": "<", "parent": 26, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 10}}, {"id": 29, "type": "identifier", "text": "ArrayPortalType", "parent": 26, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 31}}, {"id": 30, "type": ">", "text": ">", "parent": 25, "children": [], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 32}}, {"id": 31, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 24, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 29}}, {"id": 32, "type": "labeled_statement", "text": "public:\n using value_type = typename", "parent": 21, "children": [33], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 29}}, {"id": 33, "type": "declaration", "text": "using value_type = typename", "parent": 32, "children": [34, 35], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 29}}, {"id": 34, "type": "type_identifier", "text": "using", "parent": 33, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 7}}, {"id": 35, "type": "init_declarator", "text": "value_type = typename", "parent": 33, "children": [36, 37, 38], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 29}}, {"id": 36, "type": "identifier", "text": "value_type", "parent": 35, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 18}}, {"id": 37, "type": "=", "text": "=", "parent": 35, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 20}}, {"id": 38, "type": "identifier", "text": "typename", "parent": 35, "children": [], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 29}}, {"id": 39, "type": "labeled_statement", "text": "std::remove_const<typename", "parent": 21, "children": [40], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 56}}, {"id": 40, "type": "statement_identifier", "text": "std", "parent": 39, "children": [], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 33}}, {"id": 41, "type": "binary_expression", "text": "remove_const<typename", "parent": 39, "children": [42, 43, 44], "start_point": {"row": 27, "column": 35}, "end_point": {"row": 27, "column": 56}}, {"id": 42, "type": "identifier", "text": "remove_const", "parent": 41, "children": [], "start_point": {"row": 27, "column": 35}, "end_point": {"row": 27, "column": 47}}, {"id": 43, "type": "<", "text": "<", "parent": 41, "children": [], "start_point": {"row": 27, "column": 47}, "end_point": {"row": 27, "column": 48}}, {"id": 44, "type": "identifier", "text": "typename", "parent": 41, "children": [], "start_point": {"row": 27, "column": 48}, "end_point": {"row": 27, "column": 56}}, {"id": 45, "type": "labeled_statement", "text": "ArrayPortalType::ValueType>::type;", "parent": 21, "children": [46, 47], "start_point": {"row": 27, "column": 57}, "end_point": {"row": 27, "column": 91}}, {"id": 46, "type": "statement_identifier", "text": "ArrayPortalType", "parent": 45, "children": [], "start_point": {"row": 27, "column": 57}, "end_point": {"row": 27, "column": 72}}, {"id": 47, "type": "ERROR", "text": "::ValueType>:", "parent": 45, "children": [48, 49], "start_point": {"row": 27, "column": 72}, "end_point": {"row": 27, "column": 85}}, {"id": 48, "type": "identifier", "text": "ValueType", "parent": 47, "children": [], "start_point": {"row": 27, "column": 74}, "end_point": {"row": 27, "column": 83}}, {"id": 49, "type": ">", "text": ">", "parent": 47, "children": [], "start_point": {"row": 27, "column": 83}, "end_point": {"row": 27, "column": 84}}, {"id": 50, "type": "identifier", "text": "type", "parent": 45, "children": [], "start_point": {"row": 27, "column": 86}, "end_point": {"row": 27, "column": 90}}, {"id": 51, "type": "declaration", "text": "using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;", "parent": 21, "children": [52, 53, 63], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 79}}, {"id": 52, "type": "type_identifier", "text": "using", "parent": 51, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 7}}, {"id": 53, "type": "init_declarator", "text": "reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType", "parent": 51, "children": [54, 55, 56, 59], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 77}}, {"id": 54, "type": "identifier", "text": "reference", "parent": 53, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 17}}, {"id": 55, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 19}}, {"id": 56, "type": "ERROR", "text": "vtkm::internal::", "parent": 53, "children": [57, 58], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 36}}, {"id": 57, "type": "identifier", "text": "vtkm", "parent": 56, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 24}}, {"id": 58, "type": "identifier", "text": "internal", "parent": 56, "children": [], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 34}}, {"id": 59, "type": "binary_expression", "text": "ArrayPortalValueReference<ArrayPortalType", "parent": 53, "children": [60, 61, 62], "start_point": {"row": 28, "column": 36}, "end_point": {"row": 28, "column": 77}}, {"id": 60, "type": "identifier", "text": "ArrayPortalValueReference", "parent": 59, "children": [], "start_point": {"row": 28, "column": 36}, "end_point": {"row": 28, "column": 61}}, {"id": 61, "type": "<", "text": "<", "parent": 59, "children": [], "start_point": {"row": 28, "column": 61}, "end_point": {"row": 28, "column": 62}}, {"id": 62, "type": "identifier", "text": "ArrayPortalType", "parent": 59, "children": [], "start_point": {"row": 28, "column": 62}, "end_point": {"row": 28, "column": 77}}, {"id": 63, "type": "ERROR", "text": ">", "parent": 51, "children": [64], "start_point": {"row": 28, "column": 77}, "end_point": {"row": 28, "column": 78}}, {"id": 64, "type": ">", "text": ">", "parent": 63, "children": [], "start_point": {"row": 28, "column": 77}, "end_point": {"row": 28, "column": 78}}, {"id": 65, "type": "declaration", "text": "using pointer = typename", "parent": 21, "children": [66, 67], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 26}}, {"id": 66, "type": "type_identifier", "text": "using", "parent": 65, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 7}}, {"id": 67, "type": "init_declarator", "text": "pointer = typename", "parent": 65, "children": [68, 69, 70], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 26}}, {"id": 68, "type": "identifier", "text": "pointer", "parent": 67, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 15}}, {"id": 69, "type": "=", "text": "=", "parent": 67, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 17}}, {"id": 70, "type": "identifier", "text": "typename", "parent": 67, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 26}}, {"id": 71, "type": "labeled_statement", "text": "std::add_pointer<value_type>::type;", "parent": 21, "children": [72, 73], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 62}}, {"id": 72, "type": "statement_identifier", "text": "std", "parent": 71, "children": [], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 30}}, {"id": 73, "type": "ERROR", "text": "::add_pointer<value_type>:", "parent": 71, "children": [74, 78], "start_point": {"row": 29, "column": 30}, "end_point": {"row": 29, "column": 56}}, {"id": 74, "type": "binary_expression", "text": "add_pointer<value_type", "parent": 73, "children": [75, 76, 77], "start_point": {"row": 29, "column": 32}, "end_point": {"row": 29, "column": 54}}, {"id": 75, "type": "identifier", "text": "add_pointer", "parent": 74, "children": [], "start_point": {"row": 29, "column": 32}, "end_point": {"row": 29, "column": 43}}, {"id": 76, "type": "<", "text": "<", "parent": 74, "children": [], "start_point": {"row": 29, "column": 43}, "end_point": {"row": 29, "column": 44}}, {"id": 77, "type": "identifier", "text": "value_type", "parent": 74, "children": [], "start_point": {"row": 29, "column": 44}, "end_point": {"row": 29, "column": 54}}, {"id": 78, "type": ">", "text": ">", "parent": 73, "children": [], "start_point": {"row": 29, "column": 54}, "end_point": {"row": 29, "column": 55}}, {"id": 79, "type": "identifier", "text": "type", "parent": 71, "children": [], "start_point": {"row": 29, "column": 57}, "end_point": {"row": 29, "column": 61}}, {"id": 80, "type": "declaration", "text": "using difference_type = std::ptrdiff_t;", "parent": 21, "children": [81, 82, 86], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 41}}, {"id": 81, "type": "type_identifier", "text": "using", "parent": 80, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 7}}, {"id": 82, "type": "init_declarator", "text": "difference_type = std", "parent": 80, "children": [83, 84, 85], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 29}}, {"id": 83, "type": "identifier", "text": "difference_type", "parent": 82, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 23}}, {"id": 84, "type": "=", "text": "=", "parent": 82, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 25}}, {"id": 85, "type": "identifier", "text": "std", "parent": 82, "children": [], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 29}}, {"id": 86, "type": "ERROR", "text": "::ptrdiff_t", "parent": 80, "children": [87], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 40}}, {"id": 87, "type": "primitive_type", "text": "ptrdiff_t", "parent": 86, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 40}}, {"id": 88, "type": "declaration", "text": "using iterator_category = std::random_access_iterator_tag;", "parent": 21, "children": [89, 90], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 60}}, {"id": 89, "type": "type_identifier", "text": "using", "parent": 88, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 7}}, {"id": 90, "type": "init_declarator", "text": "iterator_category = std::random_access_iterator_tag", "parent": 88, "children": [91, 92, 93, 95], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 59}}, {"id": 91, "type": "identifier", "text": "iterator_category", "parent": 90, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 25}}, {"id": 92, "type": "=", "text": "=", "parent": 90, "children": [], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 27}}, {"id": 93, "type": "ERROR", "text": "std::", "parent": 90, "children": [94], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 33}}, {"id": 94, "type": "identifier", "text": "std", "parent": 93, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 31}}, {"id": 95, "type": "identifier", "text": "random_access_iterator_tag", "parent": 90, "children": [], "start_point": {"row": 33, "column": 33}, "end_point": {"row": 33, "column": 59}}, {"id": 96, "type": "declaration", "text": "using iter = IteratorFromArrayPortal<ArrayPortalType>;", "parent": 21, "children": [97, 98, 105], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 56}}, {"id": 97, "type": "type_identifier", "text": "using", "parent": 96, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 7}}, {"id": 98, "type": "init_declarator", "text": "iter = IteratorFromArrayPortal<ArrayPortalType", "parent": 96, "children": [99, 100, 101], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 54}}, {"id": 99, "type": "identifier", "text": "iter", "parent": 98, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 12}}, {"id": 100, "type": "=", "text": "=", "parent": 98, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 14}}, {"id": 101, "type": "binary_expression", "text": "IteratorFromArrayPortal<ArrayPortalType", "parent": 98, "children": [102, 103, 104], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 54}}, {"id": 102, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 101, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 38}}, {"id": 103, "type": "<", "text": "<", "parent": 101, "children": [], "start_point": {"row": 35, "column": 38}, "end_point": {"row": 35, "column": 39}}, {"id": 104, "type": "identifier", "text": "ArrayPortalType", "parent": 101, "children": [], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 54}}, {"id": 105, "type": "ERROR", "text": ">", "parent": 96, "children": [106], "start_point": {"row": 35, "column": 54}, "end_point": {"row": 35, "column": 55}}, {"id": 106, "type": ">", "text": ">", "parent": 105, "children": [], "start_point": {"row": 35, "column": 54}, "end_point": {"row": 35, "column": 55}}, {"id": 107, "type": "declaration", "text": "VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT", "parent": 21, "children": [108, 109], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 38, "column": 16}}, {"id": 108, "type": "type_identifier", "text": "VTKM_SUPPRESS_EXEC_WARNINGS", "parent": 107, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 29}}, {"id": 109, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 107, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 16}}, {"id": 110, "type": "ERROR", "text": "IteratorFromArrayPortal()\n :", "parent": 21, "children": [111], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 40, "column": 5}}, {"id": 111, "type": "call_expression", "text": "IteratorFromArrayPortal()", "parent": 110, "children": [112, 113], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 27}}, {"id": 112, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 111, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 25}}, {"id": 113, "type": "argument_list", "text": "()", "parent": 111, "children": [], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 27}}, {"id": 114, "type": "comma_expression", "text": "Portal()\n , Index(0)", "parent": 21, "children": [115, 118], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 41, "column": 14}}, {"id": 115, "type": "call_expression", "text": "Portal()", "parent": 114, "children": [116, 117], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 14}}, {"id": 116, "type": "identifier", "text": "Portal", "parent": 115, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 12}}, {"id": 117, "type": "argument_list", "text": "()", "parent": 115, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 14}}, {"id": 118, "type": "call_expression", "text": "Index(0)", "parent": 114, "children": [119, 120], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 14}}, {"id": 119, "type": "identifier", "text": "Index", "parent": 118, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 11}}, {"id": 120, "type": "argument_list", "text": "(0)", "parent": 118, "children": [121], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 14}}, {"id": 121, "type": "number_literal", "text": "0", "parent": 120, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 13}}, {"id": 122, "type": "declaration", "text": "VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT", "parent": 21, "children": [123, 124], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 46, "column": 16}}, {"id": 123, "type": "type_identifier", "text": "VTKM_SUPPRESS_EXEC_WARNINGS", "parent": 122, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 29}}, {"id": 124, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 122, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 16}}, {"id": 125, "type": "declaration", "text": "explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);", "parent": 21, "children": [126, 127, 145, 151], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 51, "column": 28}}, {"id": 126, "type": "type_identifier", "text": "explicit", "parent": 125, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 10}}, {"id": 127, "type": "init_declarator", "text": "IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)", "parent": 125, "children": [128, 138, 139, 141], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 48, "column": 20}}, {"id": 128, "type": "function_declarator", "text": "IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index", "parent": 127, "children": [129, 130, 137], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 80}}, {"id": 129, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 128, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 34}}, {"id": 130, "type": "parameter_list", "text": "(const ArrayPortalType& portal, vtkm::Id", "parent": 128, "children": [131, 134], "start_point": {"row": 47, "column": 34}, "end_point": {"row": 47, "column": 74}}, {"id": 131, "type": "parameter_declaration", "text": "const ArrayPortalType& portal", "parent": 130, "children": [132, 133], "start_point": {"row": 47, "column": 35}, "end_point": {"row": 47, "column": 64}}, {"id": 132, "type": "type_identifier", "text": "ArrayPortalType", "parent": 131, "children": [], "start_point": {"row": 47, "column": 41}, "end_point": {"row": 47, "column": 56}}, {"id": 133, "type": "identifier", "text": "portal", "parent": 131, "children": [], "start_point": {"row": 47, "column": 58}, "end_point": {"row": 47, "column": 64}}, {"id": 134, "type": "parameter_declaration", "text": "vtkm::Id", "parent": 130, "children": [135, 136], "start_point": {"row": 47, "column": 66}, "end_point": {"row": 47, "column": 74}}, {"id": 135, "type": "type_identifier", "text": "vtkm", "parent": 134, "children": [], "start_point": {"row": 47, "column": 66}, "end_point": {"row": 47, "column": 70}}, {"id": 136, "type": "identifier", "text": "Id", "parent": 134, "children": [], "start_point": {"row": 47, "column": 72}, "end_point": {"row": 47, "column": 74}}, {"id": 137, "type": "identifier", "text": "index", "parent": 128, "children": [], "start_point": {"row": 47, "column": 75}, "end_point": {"row": 47, "column": 80}}, {"id": 138, "type": "=", "text": "=", "parent": 127, "children": [], "start_point": {"row": 47, "column": 81}, "end_point": {"row": 47, "column": 82}}, {"id": 139, "type": "ERROR", "text": "0)\n :", "parent": 127, "children": [140], "start_point": {"row": 47, "column": 83}, "end_point": {"row": 48, "column": 5}}, {"id": 140, "type": "number_literal", "text": "0", "parent": 139, "children": [], "start_point": {"row": 47, "column": 83}, "end_point": {"row": 47, "column": 84}}, {"id": 141, "type": "call_expression", "text": "Portal(portal)", "parent": 127, "children": [142, 143], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 20}}, {"id": 142, "type": "identifier", "text": "Portal", "parent": 141, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 12}}, {"id": 143, "type": "argument_list", "text": "(portal)", "parent": 141, "children": [144], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 20}}, {"id": 144, "type": "identifier", "text": "portal", "parent": 143, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 19}}, {"id": 145, "type": "ERROR", "text": "Index(index)\n {", "parent": 125, "children": [146], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 50, "column": 3}}, {"id": 146, "type": "function_declarator", "text": "Index(index)", "parent": 145, "children": [147, 148], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 18}}, {"id": 147, "type": "identifier", "text": "Index", "parent": 146, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 11}}, {"id": 148, "type": "parameter_list", "text": "(index)", "parent": 146, "children": [149], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 18}}, {"id": 149, "type": "parameter_declaration", "text": "index", "parent": 148, "children": [150], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 17}}, {"id": 150, "type": "type_identifier", "text": "index", "parent": 149, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 17}}, {"id": 151, "type": "function_declarator", "text": "VTKM_ASSERT(index >= 0)", "parent": 125, "children": [152, 153], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 27}}, {"id": 152, "type": "identifier", "text": "VTKM_ASSERT", "parent": 151, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 15}}, {"id": 153, "type": "parameter_list", "text": "(index >= 0)", "parent": 151, "children": [154, 156], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 27}}, {"id": 154, "type": "parameter_declaration", "text": "index", "parent": 153, "children": [155], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 21}}, {"id": 155, "type": "type_identifier", "text": "index", "parent": 154, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 21}}, {"id": 156, "type": "ERROR", "text": ">= 0", "parent": 153, "children": [157, 158], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 26}}, {"id": 157, "type": ">=", "text": ">=", "parent": 156, "children": [], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 24}}, {"id": 158, "type": "number_literal", "text": "0", "parent": 156, "children": [], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 26}}, {"id": 159, "type": "call_expression", "text": "VTKM_ASSERT(index <= portal.GetNumberOfValues())", "parent": 21, "children": [160, 161], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 52}}, {"id": 160, "type": "identifier", "text": "VTKM_ASSERT", "parent": 159, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 15}}, {"id": 161, "type": "argument_list", "text": "(index <= portal.GetNumberOfValues())", "parent": 159, "children": [162], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 52}}, {"id": 162, "type": "binary_expression", "text": "index <= portal.GetNumberOfValues()", "parent": 161, "children": [163, 164, 165], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 51}}, {"id": 163, "type": "identifier", "text": "index", "parent": 162, "children": [], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 21}}, {"id": 164, "type": "<=", "text": "<=", "parent": 162, "children": [], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 24}}, {"id": 165, "type": "call_expression", "text": "portal.GetNumberOfValues()", "parent": 162, "children": [166, 169], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 51}}, {"id": 166, "type": "field_expression", "text": "portal.GetNumberOfValues", "parent": 165, "children": [167, 168], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 49}}, {"id": 167, "type": "identifier", "text": "portal", "parent": 166, "children": [], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 31}}, {"id": 168, "type": "field_identifier", "text": "GetNumberOfValues", "parent": 166, "children": [], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 49}}, {"id": 169, "type": "argument_list", "text": "()", "parent": 165, "children": [], "start_point": {"row": 52, "column": 49}, "end_point": {"row": 52, "column": 51}}, {"id": 170, "type": "declaration", "text": "VTKM_EXEC_CONT\n reference", "parent": 21, "children": [171, 172], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 56, "column": 11}}, {"id": 171, "type": "type_identifier", "text": "VTKM_EXEC_CONT", "parent": 170, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 16}}, {"id": 172, "type": "identifier", "text": "reference", "parent": 170, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 11}}, {"id": 173, "type": "binary_expression", "text": "operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0)", "parent": 21, "children": [174, 175, 176], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 119, "column": 60}}, {"id": 174, "type": "identifier", "text": "operator", "parent": 173, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 20}}, {"id": 175, "type": "*", "text": "*", "parent": 173, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 21}}, {"id": 176, "type": "parenthesized_expression", "text": "() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0)", "parent": 173, "children": [177, 336], "start_point": {"row": 56, "column": 21}, "end_point": {"row": 119, "column": 60}}, {"id": 177, "type": "ERROR", "text": ") const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT", "parent": 176, "children": [188, 189, 190, 205, 206, 207, 237, 238, 269, 270, 271, 289, 290, 315, 316, 317, 335], "start_point": {"row": 56, "column": 22}, "end_point": {"row": 89, "column": 16}}, {"id": 178, "type": "return_statement", "text": "return reference(this->Portal, this->Index);", "parent": 177, "children": [179], "start_point": {"row": 56, "column": 32}, "end_point": {"row": 56, "column": 76}}, {"id": 179, "type": "call_expression", "text": "reference(this->Portal, this->Index)", "parent": 178, "children": [180, 181], "start_point": {"row": 56, "column": 39}, "end_point": {"row": 56, "column": 75}}, {"id": 180, "type": "identifier", "text": "reference", "parent": 179, "children": [], "start_point": {"row": 56, "column": 39}, "end_point": {"row": 56, "column": 48}}, {"id": 181, "type": "argument_list", "text": "(this->Portal, this->Index)", "parent": 179, "children": [182, 185], "start_point": {"row": 56, "column": 48}, "end_point": {"row": 56, "column": 75}}, {"id": 182, "type": "field_expression", "text": "this->Portal", "parent": 181, "children": [183, 184], "start_point": {"row": 56, "column": 49}, "end_point": {"row": 56, "column": 61}}, {"id": 183, "type": "identifier", "text": "this", "parent": 182, "children": [], "start_point": {"row": 56, "column": 49}, "end_point": {"row": 56, "column": 53}}, {"id": 184, "type": "field_identifier", "text": "Portal", "parent": 182, "children": [], "start_point": {"row": 56, "column": 55}, "end_point": {"row": 56, "column": 61}}, {"id": 185, "type": "field_expression", "text": "this->Index", "parent": 181, "children": [186, 187], "start_point": {"row": 56, "column": 63}, "end_point": {"row": 56, "column": 74}}, {"id": 186, "type": "identifier", "text": "this", "parent": 185, "children": [], "start_point": {"row": 56, "column": 63}, "end_point": {"row": 56, "column": 67}}, {"id": 187, "type": "field_identifier", "text": "Index", "parent": 185, "children": [], "start_point": {"row": 56, "column": 69}, "end_point": {"row": 56, "column": 74}}, {"id": 188, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 177, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 16}}, {"id": 189, "type": "identifier", "text": "reference", "parent": 177, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 11}}, {"id": 190, "type": "call_expression", "text": "operator->()", "parent": 177, "children": [191, 194], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 24}}, {"id": 191, "type": "field_expression", "text": "operator->", "parent": 190, "children": [192, 193], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 22}}, {"id": 192, "type": "identifier", "text": "operator", "parent": 191, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 20}}, {"id": 193, "type": "field_identifier", "text": "", "parent": 191, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 22}}, {"id": 194, "type": "argument_list", "text": "()", "parent": 190, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 24}}, {"id": 195, "type": "return_statement", "text": "return reference(this->Portal, this->Index);", "parent": 177, "children": [196], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 77}}, {"id": 196, "type": "call_expression", "text": "reference(this->Portal, this->Index)", "parent": 195, "children": [197, 198], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 76}}, {"id": 197, "type": "identifier", "text": "reference", "parent": 196, "children": [], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 49}}, {"id": 198, "type": "argument_list", "text": "(this->Portal, this->Index)", "parent": 196, "children": [199, 202], "start_point": {"row": 59, "column": 49}, "end_point": {"row": 59, "column": 76}}, {"id": 199, "type": "field_expression", "text": "this->Portal", "parent": 198, "children": [200, 201], "start_point": {"row": 59, "column": 50}, "end_point": {"row": 59, "column": 62}}, {"id": 200, "type": "identifier", "text": "this", "parent": 199, "children": [], "start_point": {"row": 59, "column": 50}, "end_point": {"row": 59, "column": 54}}, {"id": 201, "type": "field_identifier", "text": "Portal", "parent": 199, "children": [], "start_point": {"row": 59, "column": 56}, "end_point": {"row": 59, "column": 62}}, {"id": 202, "type": "field_expression", "text": "this->Index", "parent": 198, "children": [203, 204], "start_point": {"row": 59, "column": 64}, "end_point": {"row": 59, "column": 75}}, {"id": 203, "type": "identifier", "text": "this", "parent": 202, "children": [], "start_point": {"row": 59, "column": 64}, "end_point": {"row": 59, "column": 68}}, {"id": 204, "type": "field_identifier", "text": "Index", "parent": 202, "children": [], "start_point": {"row": 59, "column": 70}, "end_point": {"row": 59, "column": 75}}, {"id": 205, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 177, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 16}}, {"id": 206, "type": "identifier", "text": "reference", "parent": 177, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 11}}, {"id": 207, "type": "type_descriptor", "text": "operator[](difference_type idx)", "parent": 177, "children": [208, 209], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 43}}, {"id": 208, "type": "type_identifier", "text": "operator", "parent": 207, "children": [], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 20}}, {"id": 209, "type": "abstract_function_declarator", "text": "[](difference_type idx)", "parent": 207, "children": [210, 211], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 43}}, {"id": 210, "type": "abstract_array_declarator", "text": "[]", "parent": 209, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 22}}, {"id": 211, "type": "parameter_list", "text": "(difference_type idx)", "parent": 209, "children": [212], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 43}}, {"id": 212, "type": "parameter_declaration", "text": "difference_type idx", "parent": 211, "children": [213, 214], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 42}}, {"id": 213, "type": "type_identifier", "text": "difference_type", "parent": 212, "children": [], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 38}}, {"id": 214, "type": "identifier", "text": "idx", "parent": 212, "children": [], "start_point": {"row": 62, "column": 39}, "end_point": {"row": 62, "column": 42}}, {"id": 215, "type": "return_statement", "text": "return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));", "parent": 177, "children": [216], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 77}}, {"id": 216, "type": "call_expression", "text": "reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx))", "parent": 215, "children": [217, 218], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 76}}, {"id": 217, "type": "identifier", "text": "reference", "parent": 216, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 20}}, {"id": 218, "type": "argument_list", "text": "(this->Portal, this->Index + static_cast<vtkm::Id>(idx))", "parent": 216, "children": [219, 222], "start_point": {"row": 64, "column": 20}, "end_point": {"row": 64, "column": 76}}, {"id": 219, "type": "field_expression", "text": "this->Portal", "parent": 218, "children": [220, 221], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 33}}, {"id": 220, "type": "identifier", "text": "this", "parent": 219, "children": [], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 25}}, {"id": 221, "type": "field_identifier", "text": "Portal", "parent": 219, "children": [], "start_point": {"row": 64, "column": 27}, "end_point": {"row": 64, "column": 33}}, {"id": 222, "type": "binary_expression", "text": "this->Index + static_cast<vtkm::Id>(idx)", "parent": 218, "children": [223, 232, 234, 235], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 75}}, {"id": 223, "type": "binary_expression", "text": "this->Index + static_cast<vtkm", "parent": 222, "children": [224, 230, 231], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 65}}, {"id": 224, "type": "binary_expression", "text": "this->Index + static_cast", "parent": 223, "children": [225, 228, 229], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 60}}, {"id": 225, "type": "field_expression", "text": "this->Index", "parent": 224, "children": [226, 227], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 46}}, {"id": 226, "type": "identifier", "text": "this", "parent": 225, "children": [], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 39}}, {"id": 227, "type": "field_identifier", "text": "Index", "parent": 225, "children": [], "start_point": {"row": 64, "column": 41}, "end_point": {"row": 64, "column": 46}}, {"id": 228, "type": "+", "text": "+", "parent": 224, "children": [], "start_point": {"row": 64, "column": 47}, "end_point": {"row": 64, "column": 48}}, {"id": 229, "type": "identifier", "text": "static_cast", "parent": 224, "children": [], "start_point": {"row": 64, "column": 49}, "end_point": {"row": 64, "column": 60}}, {"id": 230, "type": "<", "text": "<", "parent": 223, "children": [], "start_point": {"row": 64, "column": 60}, "end_point": {"row": 64, "column": 61}}, {"id": 231, "type": "identifier", "text": "vtkm", "parent": 223, "children": [], "start_point": {"row": 64, "column": 61}, "end_point": {"row": 64, "column": 65}}, {"id": 232, "type": "ERROR", "text": "::Id", "parent": 222, "children": [233], "start_point": {"row": 64, "column": 65}, "end_point": {"row": 64, "column": 69}}, {"id": 233, "type": "identifier", "text": "Id", "parent": 232, "children": [], "start_point": {"row": 64, "column": 67}, "end_point": {"row": 64, "column": 69}}, {"id": 234, "type": ">", "text": ">", "parent": 222, "children": [], "start_point": {"row": 64, "column": 69}, "end_point": {"row": 64, "column": 70}}, {"id": 235, "type": "parenthesized_expression", "text": "(idx)", "parent": 222, "children": [236], "start_point": {"row": 64, "column": 70}, "end_point": {"row": 64, "column": 75}}, {"id": 236, "type": "identifier", "text": "idx", "parent": 235, "children": [], "start_point": {"row": 64, "column": 71}, "end_point": {"row": 64, "column": 74}}, {"id": 237, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 177, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 16}}, {"id": 238, "type": "binary_expression", "text": "iter& operator++()", "parent": 177, "children": [239, 240], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 20}}, {"id": 239, "type": "identifier", "text": "iter", "parent": 238, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 6}}, {"id": 240, "type": "call_expression", "text": "operator++()", "parent": 238, "children": [241, 244], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 20}}, {"id": 241, "type": "update_expression", "text": "operator++", "parent": 240, "children": [242, 243], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 18}}, {"id": 242, "type": "identifier", "text": "operator", "parent": 241, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 16}}, {"id": 243, "type": "++", "text": "++", "parent": 241, "children": [], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 18}}, {"id": 244, "type": "argument_list", "text": "()", "parent": 240, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 20}}, {"id": 245, "type": "update_expression", "text": "this->Index++", "parent": 177, "children": [246, 249], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 17}}, {"id": 246, "type": "field_expression", "text": "this->Index", "parent": 245, "children": [247, 248], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 15}}, {"id": 247, "type": "identifier", "text": "this", "parent": 246, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 8}}, {"id": 248, "type": "field_identifier", "text": "Index", "parent": 246, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 15}}, {"id": 249, "type": "++", "text": "++", "parent": 245, "children": [], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 17}}, {"id": 250, "type": "call_expression", "text": "VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues())", "parent": 177, "children": [251, 252], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 64}}, {"id": 251, "type": "identifier", "text": "VTKM_ASSERT", "parent": 250, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 15}}, {"id": 252, "type": "argument_list", "text": "(this->Index <= this->Portal.GetNumberOfValues())", "parent": 250, "children": [253], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 64}}, {"id": 253, "type": "binary_expression", "text": "this->Index <= this->Portal.GetNumberOfValues()", "parent": 252, "children": [254, 257, 258], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 63}}, {"id": 254, "type": "field_expression", "text": "this->Index", "parent": 253, "children": [255, 256], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 27}}, {"id": 255, "type": "identifier", "text": "this", "parent": 254, "children": [], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 20}}, {"id": 256, "type": "field_identifier", "text": "Index", "parent": 254, "children": [], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 27}}, {"id": 257, "type": "<=", "text": "<=", "parent": 253, "children": [], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 30}}, {"id": 258, "type": "call_expression", "text": "this->Portal.GetNumberOfValues()", "parent": 253, "children": [259, 264], "start_point": {"row": 71, "column": 31}, "end_point": {"row": 71, "column": 63}}, {"id": 259, "type": "field_expression", "text": "this->Portal.GetNumberOfValues", "parent": 258, "children": [260, 263], "start_point": {"row": 71, "column": 31}, "end_point": {"row": 71, "column": 61}}, {"id": 260, "type": "field_expression", "text": "this->Portal", "parent": 259, "children": [261, 262], "start_point": {"row": 71, "column": 31}, "end_point": {"row": 71, "column": 43}}, {"id": 261, "type": "identifier", "text": "this", "parent": 260, "children": [], "start_point": {"row": 71, "column": 31}, "end_point": {"row": 71, "column": 35}}, {"id": 262, "type": "field_identifier", "text": "Portal", "parent": 260, "children": [], "start_point": {"row": 71, "column": 37}, "end_point": {"row": 71, "column": 43}}, {"id": 263, "type": "field_identifier", "text": "GetNumberOfValues", "parent": 259, "children": [], "start_point": {"row": 71, "column": 44}, "end_point": {"row": 71, "column": 61}}, {"id": 264, "type": "argument_list", "text": "()", "parent": 258, "children": [], "start_point": {"row": 71, "column": 61}, "end_point": {"row": 71, "column": 63}}, {"id": 265, "type": "return_statement", "text": "return *this;", "parent": 177, "children": [266], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 17}}, {"id": 266, "type": "pointer_expression", "text": "*this", "parent": 265, "children": [267, 268], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 16}}, {"id": 267, "type": "*", "text": "*", "parent": 266, "children": [], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 12}}, {"id": 268, "type": "identifier", "text": "this", "parent": 266, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 16}}, {"id": 269, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 177, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 16}}, {"id": 270, "type": "identifier", "text": "iter", "parent": 177, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 6}}, {"id": 271, "type": "call_expression", "text": "operator++(int)", "parent": 177, "children": [272, 275], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 22}}, {"id": 272, "type": "update_expression", "text": "operator++", "parent": 271, "children": [273, 274], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 17}}, {"id": 273, "type": "identifier", "text": "operator", "parent": 272, "children": [], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 15}}, {"id": 274, "type": "++", "text": "++", "parent": 272, "children": [], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 17}}, {"id": 275, "type": "argument_list", "text": "(int)", "parent": 271, "children": [276], "start_point": {"row": 76, "column": 17}, "end_point": {"row": 76, "column": 22}}, {"id": 276, "type": "identifier", "text": "int", "parent": 275, "children": [], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 21}}, {"id": 277, "type": "return_statement", "text": "return iter(this->Portal, this->Index++);", "parent": 177, "children": [278], "start_point": {"row": 76, "column": 25}, "end_point": {"row": 76, "column": 66}}, {"id": 278, "type": "call_expression", "text": "iter(this->Portal, this->Index++)", "parent": 277, "children": [279, 280], "start_point": {"row": 76, "column": 32}, "end_point": {"row": 76, "column": 65}}, {"id": 279, "type": "identifier", "text": "iter", "parent": 278, "children": [], "start_point": {"row": 76, "column": 32}, "end_point": {"row": 76, "column": 36}}, {"id": 280, "type": "argument_list", "text": "(this->Portal, this->Index++)", "parent": 278, "children": [281, 284], "start_point": {"row": 76, "column": 36}, "end_point": {"row": 76, "column": 65}}, {"id": 281, "type": "field_expression", "text": "this->Portal", "parent": 280, "children": [282, 283], "start_point": {"row": 76, "column": 37}, "end_point": {"row": 76, "column": 49}}, {"id": 282, "type": "identifier", "text": "this", "parent": 281, "children": [], "start_point": {"row": 76, "column": 37}, "end_point": {"row": 76, "column": 41}}, {"id": 283, "type": "field_identifier", "text": "Portal", "parent": 281, "children": [], "start_point": {"row": 76, "column": 43}, "end_point": {"row": 76, "column": 49}}, {"id": 284, "type": "update_expression", "text": "this->Index++", "parent": 280, "children": [285, 288], "start_point": {"row": 76, "column": 51}, "end_point": {"row": 76, "column": 64}}, {"id": 285, "type": "field_expression", "text": "this->Index", "parent": 284, "children": [286, 287], "start_point": {"row": 76, "column": 51}, "end_point": {"row": 76, "column": 62}}, {"id": 286, "type": "identifier", "text": "this", "parent": 285, "children": [], "start_point": {"row": 76, "column": 51}, "end_point": {"row": 76, "column": 55}}, {"id": 287, "type": "field_identifier", "text": "Index", "parent": 285, "children": [], "start_point": {"row": 76, "column": 57}, "end_point": {"row": 76, "column": 62}}, {"id": 288, "type": "++", "text": "++", "parent": 284, "children": [], "start_point": {"row": 76, "column": 62}, "end_point": {"row": 76, "column": 64}}, {"id": 289, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 177, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 16}}, {"id": 290, "type": "binary_expression", "text": "iter& operator--()", "parent": 177, "children": [291, 292], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 20}}, {"id": 291, "type": "identifier", "text": "iter", "parent": 290, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 6}}, {"id": 292, "type": "call_expression", "text": "operator--()", "parent": 290, "children": [293, 296], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 20}}, {"id": 293, "type": "update_expression", "text": "operator--", "parent": 292, "children": [294, 295], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 18}}, {"id": 294, "type": "identifier", "text": "operator", "parent": 293, "children": [], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 16}}, {"id": 295, "type": "--", "text": "--", "parent": 293, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 18}}, {"id": 296, "type": "argument_list", "text": "()", "parent": 292, "children": [], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 20}}, {"id": 297, "type": "update_expression", "text": "this->Index--", "parent": 177, "children": [298, 301], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 17}}, {"id": 298, "type": "field_expression", "text": "this->Index", "parent": 297, "children": [299, 300], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 15}}, {"id": 299, "type": "identifier", "text": "this", "parent": 298, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 8}}, {"id": 300, "type": "field_identifier", "text": "Index", "parent": 298, "children": [], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 15}}, {"id": 301, "type": "--", "text": "--", "parent": 297, "children": [], "start_point": {"row": 81, "column": 15}, "end_point": {"row": 81, "column": 17}}, {"id": 302, "type": "call_expression", "text": "VTKM_ASSERT(this->Index >= 0)", "parent": 177, "children": [303, 304], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 33}}, {"id": 303, "type": "identifier", "text": "VTKM_ASSERT", "parent": 302, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 15}}, {"id": 304, "type": "argument_list", "text": "(this->Index >= 0)", "parent": 302, "children": [305], "start_point": {"row": 82, "column": 15}, "end_point": {"row": 82, "column": 33}}, {"id": 305, "type": "binary_expression", "text": "this->Index >= 0", "parent": 304, "children": [306, 309, 310], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 32}}, {"id": 306, "type": "field_expression", "text": "this->Index", "parent": 305, "children": [307, 308], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 27}}, {"id": 307, "type": "identifier", "text": "this", "parent": 306, "children": [], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 20}}, {"id": 308, "type": "field_identifier", "text": "Index", "parent": 306, "children": [], "start_point": {"row": 82, "column": 22}, "end_point": {"row": 82, "column": 27}}, {"id": 309, "type": ">=", "text": ">=", "parent": 305, "children": [], "start_point": {"row": 82, "column": 28}, "end_point": {"row": 82, "column": 30}}, {"id": 310, "type": "number_literal", "text": "0", "parent": 305, "children": [], "start_point": {"row": 82, "column": 31}, "end_point": {"row": 82, "column": 32}}, {"id": 311, "type": "return_statement", "text": "return *this;", "parent": 177, "children": [312], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 17}}, {"id": 312, "type": "pointer_expression", "text": "*this", "parent": 311, "children": [313, 314], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 16}}, {"id": 313, "type": "*", "text": "*", "parent": 312, "children": [], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 12}}, {"id": 314, "type": "identifier", "text": "this", "parent": 312, "children": [], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 16}}, {"id": 315, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 177, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 16}}, {"id": 316, "type": "identifier", "text": "iter", "parent": 177, "children": [], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 6}}, {"id": 317, "type": "call_expression", "text": "operator--(int)", "parent": 177, "children": [318, 321], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 22}}, {"id": 318, "type": "update_expression", "text": "operator--", "parent": 317, "children": [319, 320], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 17}}, {"id": 319, "type": "identifier", "text": "operator", "parent": 318, "children": [], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 15}}, {"id": 320, "type": "--", "text": "--", "parent": 318, "children": [], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 17}}, {"id": 321, "type": "argument_list", "text": "(int)", "parent": 317, "children": [322], "start_point": {"row": 87, "column": 17}, "end_point": {"row": 87, "column": 22}}, {"id": 322, "type": "identifier", "text": "int", "parent": 321, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 21}}, {"id": 323, "type": "return_statement", "text": "return iter(this->Portal, this->Index--);", "parent": 177, "children": [324], "start_point": {"row": 87, "column": 25}, "end_point": {"row": 87, "column": 66}}, {"id": 324, "type": "call_expression", "text": "iter(this->Portal, this->Index--)", "parent": 323, "children": [325, 326], "start_point": {"row": 87, "column": 32}, "end_point": {"row": 87, "column": 65}}, {"id": 325, "type": "identifier", "text": "iter", "parent": 324, "children": [], "start_point": {"row": 87, "column": 32}, "end_point": {"row": 87, "column": 36}}, {"id": 326, "type": "argument_list", "text": "(this->Portal, this->Index--)", "parent": 324, "children": [327, 330], "start_point": {"row": 87, "column": 36}, "end_point": {"row": 87, "column": 65}}, {"id": 327, "type": "field_expression", "text": "this->Portal", "parent": 326, "children": [328, 329], "start_point": {"row": 87, "column": 37}, "end_point": {"row": 87, "column": 49}}, {"id": 328, "type": "identifier", "text": "this", "parent": 327, "children": [], "start_point": {"row": 87, "column": 37}, "end_point": {"row": 87, "column": 41}}, {"id": 329, "type": "field_identifier", "text": "Portal", "parent": 327, "children": [], "start_point": {"row": 87, "column": 43}, "end_point": {"row": 87, "column": 49}}, {"id": 330, "type": "update_expression", "text": "this->Index--", "parent": 326, "children": [331, 334], "start_point": {"row": 87, "column": 51}, "end_point": {"row": 87, "column": 64}}, {"id": 331, "type": "field_expression", "text": "this->Index", "parent": 330, "children": [332, 333], "start_point": {"row": 87, "column": 51}, "end_point": {"row": 87, "column": 62}}, {"id": 332, "type": "identifier", "text": "this", "parent": 331, "children": [], "start_point": {"row": 87, "column": 51}, "end_point": {"row": 87, "column": 55}}, {"id": 333, "type": "field_identifier", "text": "Index", "parent": 331, "children": [], "start_point": {"row": 87, "column": 57}, "end_point": {"row": 87, "column": 62}}, {"id": 334, "type": "--", "text": "--", "parent": 330, "children": [], "start_point": {"row": 87, "column": 62}, "end_point": {"row": 87, "column": 64}}, {"id": 335, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 177, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 16}}, {"id": 336, "type": "binary_expression", "text": "iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0)", "parent": 176, "children": [337, 338], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 119, "column": 60}}, {"id": 337, "type": "identifier", "text": "iter", "parent": 336, "children": [], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 6}}, {"id": 338, "type": "assignment_expression", "text": "operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0)", "parent": 336, "children": [339, 340, 341], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 119, "column": 60}}, {"id": 339, "type": "identifier", "text": "operator", "parent": 338, "children": [], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 16}}, {"id": 340, "type": "+=", "text": "+=", "parent": 338, "children": [], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 18}}, {"id": 341, "type": "binary_expression", "text": "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0)", "parent": 338, "children": [342, 489, 490], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 119, "column": 60}}, {"id": 342, "type": "binary_expression", "text": "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType", "parent": 341, "children": [343, 485, 487, 488], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 119, "column": 48}}, {"id": 343, "type": "binary_expression", "text": "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)", "parent": 342, "children": [344, 478, 479], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 117, "column": 32}}, {"id": 344, "type": "binary_expression", "text": "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType", "parent": 343, "children": [345, 476, 477], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 116, "column": 54}}, {"id": 345, "type": "binary_expression", "text": "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal", "parent": 344, "children": [346, 472, 473, 475], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 116, "column": 38}}, {"id": 346, "type": "binary_expression", "text": "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType", "parent": 345, "children": [347, 470, 471], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 115, "column": 31}}, {"id": 347, "type": "binary_expression", "text": "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate", "parent": 346, "children": [348, 431, 435, 436, 469], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 115, "column": 8}}, {"id": 348, "type": "binary_expression", "text": "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }", "parent": 347, "children": [349, 390, 393], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 103, "column": 3}}, {"id": 349, "type": "compound_literal_expression", "text": "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }", "parent": 348, "children": [350, 352, 354], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 95, "column": 3}}, {"id": 350, "type": "type_descriptor", "text": "difference_type", "parent": 349, "children": [351], "start_point": {"row": 90, "column": 19}, "end_point": {"row": 90, "column": 34}}, {"id": 351, "type": "type_identifier", "text": "difference_type", "parent": 350, "children": [], "start_point": {"row": 90, "column": 19}, "end_point": {"row": 90, "column": 34}}, {"id": 352, "type": "ERROR", "text": "n", "parent": 349, "children": [353], "start_point": {"row": 90, "column": 35}, "end_point": {"row": 90, "column": 36}}, {"id": 353, "type": "identifier", "text": "n", "parent": 352, "children": [], "start_point": {"row": 90, "column": 35}, "end_point": {"row": 90, "column": 36}}, {"id": 354, "type": "initializer_list", "text": "{\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }", "parent": 349, "children": [355, 371], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 95, "column": 3}}, {"id": 355, "type": "ERROR", "text": "this->Index += static_cast<vtkm::Id>(n);", "parent": 354, "children": [356], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 44}}, {"id": 356, "type": "binary_expression", "text": "this->Index += static_cast<vtkm::Id>(n)", "parent": 355, "children": [357, 366, 368, 369], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 43}}, {"id": 357, "type": "assignment_expression", "text": "this->Index += static_cast<vtkm", "parent": 356, "children": [358, 361, 362], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 35}}, {"id": 358, "type": "field_expression", "text": "this->Index", "parent": 357, "children": [359, 360], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 15}}, {"id": 359, "type": "identifier", "text": "this", "parent": 358, "children": [], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 8}}, {"id": 360, "type": "field_identifier", "text": "Index", "parent": 358, "children": [], "start_point": {"row": 92, "column": 10}, "end_point": {"row": 92, "column": 15}}, {"id": 361, "type": "+=", "text": "+=", "parent": 357, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 18}}, {"id": 362, "type": "binary_expression", "text": "static_cast<vtkm", "parent": 357, "children": [363, 364, 365], "start_point": {"row": 92, "column": 19}, "end_point": {"row": 92, "column": 35}}, {"id": 363, "type": "identifier", "text": "static_cast", "parent": 362, "children": [], "start_point": {"row": 92, "column": 19}, "end_point": {"row": 92, "column": 30}}, {"id": 364, "type": "<", "text": "<", "parent": 362, "children": [], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 31}}, {"id": 365, "type": "identifier", "text": "vtkm", "parent": 362, "children": [], "start_point": {"row": 92, "column": 31}, "end_point": {"row": 92, "column": 35}}, {"id": 366, "type": "ERROR", "text": "::Id", "parent": 356, "children": [367], "start_point": {"row": 92, "column": 35}, "end_point": {"row": 92, "column": 39}}, {"id": 367, "type": "identifier", "text": "Id", "parent": 366, "children": [], "start_point": {"row": 92, "column": 37}, "end_point": {"row": 92, "column": 39}}, {"id": 368, "type": ">", "text": ">", "parent": 356, "children": [], "start_point": {"row": 92, "column": 39}, "end_point": {"row": 92, "column": 40}}, {"id": 369, "type": "parenthesized_expression", "text": "(n)", "parent": 356, "children": [370], "start_point": {"row": 92, "column": 40}, "end_point": {"row": 92, "column": 43}}, {"id": 370, "type": "identifier", "text": "n", "parent": 369, "children": [], "start_point": {"row": 92, "column": 41}, "end_point": {"row": 92, "column": 42}}, {"id": 371, "type": "binary_expression", "text": "VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this", "parent": 354, "children": [372, 387, 388, 389], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 94, "column": 16}}, {"id": 372, "type": "call_expression", "text": "VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues())", "parent": 371, "children": [373, 374], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 64}}, {"id": 373, "type": "identifier", "text": "VTKM_ASSERT", "parent": 372, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 15}}, {"id": 374, "type": "argument_list", "text": "(this->Index <= this->Portal.GetNumberOfValues())", "parent": 372, "children": [375], "start_point": {"row": 93, "column": 15}, "end_point": {"row": 93, "column": 64}}, {"id": 375, "type": "binary_expression", "text": "this->Index <= this->Portal.GetNumberOfValues()", "parent": 374, "children": [376, 379, 380], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 63}}, {"id": 376, "type": "field_expression", "text": "this->Index", "parent": 375, "children": [377, 378], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 27}}, {"id": 377, "type": "identifier", "text": "this", "parent": 376, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 20}}, {"id": 378, "type": "field_identifier", "text": "Index", "parent": 376, "children": [], "start_point": {"row": 93, "column": 22}, "end_point": {"row": 93, "column": 27}}, {"id": 379, "type": "<=", "text": "<=", "parent": 375, "children": [], "start_point": {"row": 93, "column": 28}, "end_point": {"row": 93, "column": 30}}, {"id": 380, "type": "call_expression", "text": "this->Portal.GetNumberOfValues()", "parent": 375, "children": [381, 386], "start_point": {"row": 93, "column": 31}, "end_point": {"row": 93, "column": 63}}, {"id": 381, "type": "field_expression", "text": "this->Portal.GetNumberOfValues", "parent": 380, "children": [382, 385], "start_point": {"row": 93, "column": 31}, "end_point": {"row": 93, "column": 61}}, {"id": 382, "type": "field_expression", "text": "this->Portal", "parent": 381, "children": [383, 384], "start_point": {"row": 93, "column": 31}, "end_point": {"row": 93, "column": 43}}, {"id": 383, "type": "identifier", "text": "this", "parent": 382, "children": [], "start_point": {"row": 93, "column": 31}, "end_point": {"row": 93, "column": 35}}, {"id": 384, "type": "field_identifier", "text": "Portal", "parent": 382, "children": [], "start_point": {"row": 93, "column": 37}, "end_point": {"row": 93, "column": 43}}, {"id": 385, "type": "field_identifier", "text": "GetNumberOfValues", "parent": 381, "children": [], "start_point": {"row": 93, "column": 44}, "end_point": {"row": 93, "column": 61}}, {"id": 386, "type": "argument_list", "text": "()", "parent": 380, "children": [], "start_point": {"row": 93, "column": 61}, "end_point": {"row": 93, "column": 63}}, {"id": 387, "type": "ERROR", "text": ";\n return", "parent": 371, "children": [], "start_point": {"row": 93, "column": 64}, "end_point": {"row": 94, "column": 10}}, {"id": 388, "type": "*", "text": "*", "parent": 371, "children": [], "start_point": {"row": 94, "column": 11}, "end_point": {"row": 94, "column": 12}}, {"id": 389, "type": "identifier", "text": "this", "parent": 371, "children": [], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 16}}, {"id": 390, "type": "ERROR", "text": "VTKM_EXEC_CONT\n iter", "parent": 348, "children": [391, 392], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 98, "column": 6}}, {"id": 391, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 390, "children": [], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 16}}, {"id": 392, "type": "identifier", "text": "iter", "parent": 390, "children": [], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 6}}, {"id": 393, "type": "assignment_expression", "text": "operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }", "parent": 348, "children": [394, 395, 396], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 103, "column": 3}}, {"id": 394, "type": "identifier", "text": "operator", "parent": 393, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 16}}, {"id": 395, "type": "-=", "text": "-=", "parent": 393, "children": [], "start_point": {"row": 98, "column": 16}, "end_point": {"row": 98, "column": 18}}, {"id": 396, "type": "compound_literal_expression", "text": "(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }", "parent": 393, "children": [397, 399, 401], "start_point": {"row": 98, "column": 18}, "end_point": {"row": 103, "column": 3}}, {"id": 397, "type": "type_descriptor", "text": "difference_type", "parent": 396, "children": [398], "start_point": {"row": 98, "column": 19}, "end_point": {"row": 98, "column": 34}}, {"id": 398, "type": "type_identifier", "text": "difference_type", "parent": 397, "children": [], "start_point": {"row": 98, "column": 19}, "end_point": {"row": 98, "column": 34}}, {"id": 399, "type": "ERROR", "text": "n", "parent": 396, "children": [400], "start_point": {"row": 98, "column": 35}, "end_point": {"row": 98, "column": 36}}, {"id": 400, "type": "identifier", "text": "n", "parent": 399, "children": [], "start_point": {"row": 98, "column": 35}, "end_point": {"row": 98, "column": 36}}, {"id": 401, "type": "initializer_list", "text": "{\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }", "parent": 396, "children": [402, 418], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 103, "column": 3}}, {"id": 402, "type": "ERROR", "text": "this->Index += static_cast<vtkm::Id>(n);", "parent": 401, "children": [403], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 44}}, {"id": 403, "type": "binary_expression", "text": "this->Index += static_cast<vtkm::Id>(n)", "parent": 402, "children": [404, 413, 415, 416], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 43}}, {"id": 404, "type": "assignment_expression", "text": "this->Index += static_cast<vtkm", "parent": 403, "children": [405, 408, 409], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 35}}, {"id": 405, "type": "field_expression", "text": "this->Index", "parent": 404, "children": [406, 407], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 15}}, {"id": 406, "type": "identifier", "text": "this", "parent": 405, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 8}}, {"id": 407, "type": "field_identifier", "text": "Index", "parent": 405, "children": [], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 15}}, {"id": 408, "type": "+=", "text": "+=", "parent": 404, "children": [], "start_point": {"row": 100, "column": 16}, "end_point": {"row": 100, "column": 18}}, {"id": 409, "type": "binary_expression", "text": "static_cast<vtkm", "parent": 404, "children": [410, 411, 412], "start_point": {"row": 100, "column": 19}, "end_point": {"row": 100, "column": 35}}, {"id": 410, "type": "identifier", "text": "static_cast", "parent": 409, "children": [], "start_point": {"row": 100, "column": 19}, "end_point": {"row": 100, "column": 30}}, {"id": 411, "type": "<", "text": "<", "parent": 409, "children": [], "start_point": {"row": 100, "column": 30}, "end_point": {"row": 100, "column": 31}}, {"id": 412, "type": "identifier", "text": "vtkm", "parent": 409, "children": [], "start_point": {"row": 100, "column": 31}, "end_point": {"row": 100, "column": 35}}, {"id": 413, "type": "ERROR", "text": "::Id", "parent": 403, "children": [414], "start_point": {"row": 100, "column": 35}, "end_point": {"row": 100, "column": 39}}, {"id": 414, "type": "identifier", "text": "Id", "parent": 413, "children": [], "start_point": {"row": 100, "column": 37}, "end_point": {"row": 100, "column": 39}}, {"id": 415, "type": ">", "text": ">", "parent": 403, "children": [], "start_point": {"row": 100, "column": 39}, "end_point": {"row": 100, "column": 40}}, {"id": 416, "type": "parenthesized_expression", "text": "(n)", "parent": 403, "children": [417], "start_point": {"row": 100, "column": 40}, "end_point": {"row": 100, "column": 43}}, {"id": 417, "type": "identifier", "text": "n", "parent": 416, "children": [], "start_point": {"row": 100, "column": 41}, "end_point": {"row": 100, "column": 42}}, {"id": 418, "type": "binary_expression", "text": "VTKM_ASSERT(this->Index >= 0);\n return *this", "parent": 401, "children": [419, 428, 429, 430], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 102, "column": 16}}, {"id": 419, "type": "call_expression", "text": "VTKM_ASSERT(this->Index >= 0)", "parent": 418, "children": [420, 421], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 33}}, {"id": 420, "type": "identifier", "text": "VTKM_ASSERT", "parent": 419, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 15}}, {"id": 421, "type": "argument_list", "text": "(this->Index >= 0)", "parent": 419, "children": [422], "start_point": {"row": 101, "column": 15}, "end_point": {"row": 101, "column": 33}}, {"id": 422, "type": "binary_expression", "text": "this->Index >= 0", "parent": 421, "children": [423, 426, 427], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 32}}, {"id": 423, "type": "field_expression", "text": "this->Index", "parent": 422, "children": [424, 425], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 27}}, {"id": 424, "type": "identifier", "text": "this", "parent": 423, "children": [], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 20}}, {"id": 425, "type": "field_identifier", "text": "Index", "parent": 423, "children": [], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 27}}, {"id": 426, "type": ">=", "text": ">=", "parent": 422, "children": [], "start_point": {"row": 101, "column": 28}, "end_point": {"row": 101, "column": 30}}, {"id": 427, "type": "number_literal", "text": "0", "parent": 422, "children": [], "start_point": {"row": 101, "column": 31}, "end_point": {"row": 101, "column": 32}}, {"id": 428, "type": "ERROR", "text": ";\n return", "parent": 418, "children": [], "start_point": {"row": 101, "column": 33}, "end_point": {"row": 102, "column": 10}}, {"id": 429, "type": "*", "text": "*", "parent": 418, "children": [], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 12}}, {"id": 430, "type": "identifier", "text": "this", "parent": 418, "children": [], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 16}}, {"id": 431, "type": "ERROR", "text": "VTKM_EXEC_CONT\n iter operator", "parent": 347, "children": [432, 433, 434], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 106, "column": 15}}, {"id": 432, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 431, "children": [], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 16}}, {"id": 433, "type": "identifier", "text": "iter", "parent": 431, "children": [], "start_point": {"row": 106, "column": 2}, "end_point": {"row": 106, "column": 6}}, {"id": 434, "type": "identifier", "text": "operator", "parent": 431, "children": [], "start_point": {"row": 106, "column": 7}, "end_point": {"row": 106, "column": 15}}, {"id": 435, "type": "-", "text": "-", "parent": 347, "children": [], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 16}}, {"id": 436, "type": "ERROR", "text": "(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};", "parent": 347, "children": [437, 464, 465, 466, 467, 468], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 113, "column": 2}}, {"id": 437, "type": "compound_literal_expression", "text": "(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }", "parent": 436, "children": [438, 440, 442], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 109, "column": 3}}, {"id": 438, "type": "type_descriptor", "text": "difference_type", "parent": 437, "children": [439], "start_point": {"row": 106, "column": 17}, "end_point": {"row": 106, "column": 32}}, {"id": 439, "type": "type_identifier", "text": "difference_type", "parent": 438, "children": [], "start_point": {"row": 106, "column": 17}, "end_point": {"row": 106, "column": 32}}, {"id": 440, "type": "ERROR", "text": "n", "parent": 437, "children": [441], "start_point": {"row": 106, "column": 33}, "end_point": {"row": 106, "column": 34}}, {"id": 441, "type": "identifier", "text": "n", "parent": 440, "children": [], "start_point": {"row": 106, "column": 33}, "end_point": {"row": 106, "column": 34}}, {"id": 442, "type": "initializer_list", "text": "{\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }", "parent": 437, "children": [443], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 109, "column": 3}}, {"id": 443, "type": "call_expression", "text": "iter(this->Portal, this->Index - static_cast<vtkm::Id>(n))", "parent": 442, "children": [444, 445], "start_point": {"row": 108, "column": 11}, "end_point": {"row": 108, "column": 69}}, {"id": 444, "type": "identifier", "text": "iter", "parent": 443, "children": [], "start_point": {"row": 108, "column": 11}, "end_point": {"row": 108, "column": 15}}, {"id": 445, "type": "argument_list", "text": "(this->Portal, this->Index - static_cast<vtkm::Id>(n))", "parent": 443, "children": [446, 449], "start_point": {"row": 108, "column": 15}, "end_point": {"row": 108, "column": 69}}, {"id": 446, "type": "field_expression", "text": "this->Portal", "parent": 445, "children": [447, 448], "start_point": {"row": 108, "column": 16}, "end_point": {"row": 108, "column": 28}}, {"id": 447, "type": "identifier", "text": "this", "parent": 446, "children": [], "start_point": {"row": 108, "column": 16}, "end_point": {"row": 108, "column": 20}}, {"id": 448, "type": "field_identifier", "text": "Portal", "parent": 446, "children": [], "start_point": {"row": 108, "column": 22}, "end_point": {"row": 108, "column": 28}}, {"id": 449, "type": "binary_expression", "text": "this->Index - static_cast<vtkm::Id>(n)", "parent": 445, "children": [450, 459, 461, 462], "start_point": {"row": 108, "column": 30}, "end_point": {"row": 108, "column": 68}}, {"id": 450, "type": "binary_expression", "text": "this->Index - static_cast<vtkm", "parent": 449, "children": [451, 457, 458], "start_point": {"row": 108, "column": 30}, "end_point": {"row": 108, "column": 60}}, {"id": 451, "type": "binary_expression", "text": "this->Index - static_cast", "parent": 450, "children": [452, 455, 456], "start_point": {"row": 108, "column": 30}, "end_point": {"row": 108, "column": 55}}, {"id": 452, "type": "field_expression", "text": "this->Index", "parent": 451, "children": [453, 454], "start_point": {"row": 108, "column": 30}, "end_point": {"row": 108, "column": 41}}, {"id": 453, "type": "identifier", "text": "this", "parent": 452, "children": [], "start_point": {"row": 108, "column": 30}, "end_point": {"row": 108, "column": 34}}, {"id": 454, "type": "field_identifier", "text": "Index", "parent": 452, "children": [], "start_point": {"row": 108, "column": 36}, "end_point": {"row": 108, "column": 41}}, {"id": 455, "type": "-", "text": "-", "parent": 451, "children": [], "start_point": {"row": 108, "column": 42}, "end_point": {"row": 108, "column": 43}}, {"id": 456, "type": "identifier", "text": "static_cast", "parent": 451, "children": [], "start_point": {"row": 108, "column": 44}, "end_point": {"row": 108, "column": 55}}, {"id": 457, "type": "<", "text": "<", "parent": 450, "children": [], "start_point": {"row": 108, "column": 55}, "end_point": {"row": 108, "column": 56}}, {"id": 458, "type": "identifier", "text": "vtkm", "parent": 450, "children": [], "start_point": {"row": 108, "column": 56}, "end_point": {"row": 108, "column": 60}}, {"id": 459, "type": "ERROR", "text": "::Id", "parent": 449, "children": [460], "start_point": {"row": 108, "column": 60}, "end_point": {"row": 108, "column": 64}}, {"id": 460, "type": "identifier", "text": "Id", "parent": 459, "children": [], "start_point": {"row": 108, "column": 62}, "end_point": {"row": 108, "column": 64}}, {"id": 461, "type": ">", "text": ">", "parent": 449, "children": [], "start_point": {"row": 108, "column": 64}, "end_point": {"row": 108, "column": 65}}, {"id": 462, "type": "parenthesized_expression", "text": "(n)", "parent": 449, "children": [463], "start_point": {"row": 108, "column": 65}, "end_point": {"row": 108, "column": 68}}, {"id": 463, "type": "identifier", "text": "n", "parent": 462, "children": [], "start_point": {"row": 108, "column": 66}, "end_point": {"row": 108, "column": 67}}, {"id": 464, "type": "identifier", "text": "ArrayPortalType", "parent": 436, "children": [], "start_point": {"row": 111, "column": 2}, "end_point": {"row": 111, "column": 17}}, {"id": 465, "type": "identifier", "text": "Portal", "parent": 436, "children": [], "start_point": {"row": 111, "column": 18}, "end_point": {"row": 111, "column": 24}}, {"id": 466, "type": "identifier", "text": "vtkm", "parent": 436, "children": [], "start_point": {"row": 112, "column": 2}, "end_point": {"row": 112, "column": 6}}, {"id": 467, "type": "identifier", "text": "Id", "parent": 436, "children": [], "start_point": {"row": 112, "column": 8}, "end_point": {"row": 112, "column": 10}}, {"id": 468, "type": "identifier", "text": "Index", "parent": 436, "children": [], "start_point": {"row": 112, "column": 11}, "end_point": {"row": 112, "column": 16}}, {"id": 469, "type": "identifier", "text": "template", "parent": 347, "children": [], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 115, "column": 8}}, {"id": 470, "type": "<", "text": "<", "parent": 346, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 10}}, {"id": 471, "type": "identifier", "text": "ArrayPortalType", "parent": 346, "children": [], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 31}}, {"id": 472, "type": ">", "text": ">", "parent": 345, "children": [], "start_point": {"row": 115, "column": 31}, "end_point": {"row": 115, "column": 32}}, {"id": 473, "type": "ERROR", "text": "VTKM_EXEC_CONT", "parent": 345, "children": [474], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 14}}, {"id": 474, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 473, "children": [], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 14}}, {"id": 475, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 345, "children": [], "start_point": {"row": 116, "column": 15}, "end_point": {"row": 116, "column": 38}}, {"id": 476, "type": "<", "text": "<", "parent": 344, "children": [], "start_point": {"row": 116, "column": 38}, "end_point": {"row": 116, "column": 39}}, {"id": 477, "type": "identifier", "text": "ArrayPortalType", "parent": 344, "children": [], "start_point": {"row": 116, "column": 39}, "end_point": {"row": 116, "column": 54}}, {"id": 478, "type": ">", "text": ">", "parent": 343, "children": [], "start_point": {"row": 116, "column": 54}, "end_point": {"row": 116, "column": 55}}, {"id": 479, "type": "call_expression", "text": "make_IteratorBegin(\n const ArrayPortalType& portal)", "parent": 343, "children": [480, 481], "start_point": {"row": 116, "column": 56}, "end_point": {"row": 117, "column": 32}}, {"id": 480, "type": "identifier", "text": "make_IteratorBegin", "parent": 479, "children": [], "start_point": {"row": 116, "column": 56}, "end_point": {"row": 116, "column": 74}}, {"id": 481, "type": "argument_list", "text": "(\n const ArrayPortalType& portal)", "parent": 479, "children": [482], "start_point": {"row": 116, "column": 74}, "end_point": {"row": 117, "column": 32}}, {"id": 482, "type": "binary_expression", "text": "ArrayPortalType& portal", "parent": 481, "children": [483, 484], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 31}}, {"id": 483, "type": "identifier", "text": "ArrayPortalType", "parent": 482, "children": [], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 23}}, {"id": 484, "type": "identifier", "text": "portal", "parent": 482, "children": [], "start_point": {"row": 117, "column": 25}, "end_point": {"row": 117, "column": 31}}, {"id": 485, "type": "ERROR", "text": "{\n return IteratorFromArrayPortal", "parent": 342, "children": [486], "start_point": {"row": 118, "column": 0}, "end_point": {"row": 119, "column": 32}}, {"id": 486, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 485, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 32}}, {"id": 487, "type": "<", "text": "<", "parent": 342, "children": [], "start_point": {"row": 119, "column": 32}, "end_point": {"row": 119, "column": 33}}, {"id": 488, "type": "identifier", "text": "ArrayPortalType", "parent": 342, "children": [], "start_point": {"row": 119, "column": 33}, "end_point": {"row": 119, "column": 48}}, {"id": 489, "type": ">", "text": ">", "parent": 341, "children": [], "start_point": {"row": 119, "column": 48}, "end_point": {"row": 119, "column": 49}}, {"id": 490, "type": "parenthesized_expression", "text": "(portal, 0)", "parent": 341, "children": [491], "start_point": {"row": 119, "column": 49}, "end_point": {"row": 119, "column": 60}}, {"id": 491, "type": "comma_expression", "text": "portal, 0", "parent": 490, "children": [492, 493], "start_point": {"row": 119, "column": 50}, "end_point": {"row": 119, "column": 59}}, {"id": 492, "type": "identifier", "text": "portal", "parent": 491, "children": [], "start_point": {"row": 119, "column": 50}, "end_point": {"row": 119, "column": 56}}, {"id": 493, "type": "number_literal", "text": "0", "parent": 491, "children": [], "start_point": {"row": 119, "column": 58}, "end_point": {"row": 119, "column": 59}}, {"id": 494, "type": "binary_expression", "text": "template <class ArrayPortalType>\nVTKM_EXEC_CONT", "parent": 18, "children": [495, 499, 500], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 123, "column": 14}}, {"id": 495, "type": "binary_expression", "text": "template <class ArrayPortalType", "parent": 494, "children": [496, 497, 498], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 122, "column": 31}}, {"id": 496, "type": "identifier", "text": "template", "parent": 495, "children": [], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 122, "column": 8}}, {"id": 497, "type": "<", "text": "<", "parent": 495, "children": [], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 10}}, {"id": 498, "type": "identifier", "text": "ArrayPortalType", "parent": 495, "children": [], "start_point": {"row": 122, "column": 16}, "end_point": {"row": 122, "column": 31}}, {"id": 499, "type": ">", "text": ">", "parent": 494, "children": [], "start_point": {"row": 122, "column": 31}, "end_point": {"row": 122, "column": 32}}, {"id": 500, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 494, "children": [], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 14}}, {"id": 501, "type": "binary_expression", "text": "IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)", "parent": 18, "children": [502, 506, 507], "start_point": {"row": 123, "column": 15}, "end_point": {"row": 124, "column": 32}}, {"id": 502, "type": "binary_expression", "text": "IteratorFromArrayPortal<ArrayPortalType", "parent": 501, "children": [503, 504, 505], "start_point": {"row": 123, "column": 15}, "end_point": {"row": 123, "column": 54}}, {"id": 503, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 502, "children": [], "start_point": {"row": 123, "column": 15}, "end_point": {"row": 123, "column": 38}}, {"id": 504, "type": "<", "text": "<", "parent": 502, "children": [], "start_point": {"row": 123, "column": 38}, "end_point": {"row": 123, "column": 39}}, {"id": 505, "type": "identifier", "text": "ArrayPortalType", "parent": 502, "children": [], "start_point": {"row": 123, "column": 39}, "end_point": {"row": 123, "column": 54}}, {"id": 506, "type": ">", "text": ">", "parent": 501, "children": [], "start_point": {"row": 123, "column": 54}, "end_point": {"row": 123, "column": 55}}, {"id": 507, "type": "call_expression", "text": "make_IteratorEnd(\n const ArrayPortalType& portal)", "parent": 501, "children": [508, 509], "start_point": {"row": 123, "column": 56}, "end_point": {"row": 124, "column": 32}}, {"id": 508, "type": "identifier", "text": "make_IteratorEnd", "parent": 507, "children": [], "start_point": {"row": 123, "column": 56}, "end_point": {"row": 123, "column": 72}}, {"id": 509, "type": "argument_list", "text": "(\n const ArrayPortalType& portal)", "parent": 507, "children": [510], "start_point": {"row": 123, "column": 72}, "end_point": {"row": 124, "column": 32}}, {"id": 510, "type": "binary_expression", "text": "ArrayPortalType& portal", "parent": 509, "children": [511, 512], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 31}}, {"id": 511, "type": "identifier", "text": "ArrayPortalType", "parent": 510, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 23}}, {"id": 512, "type": "identifier", "text": "portal", "parent": 510, "children": [], "start_point": {"row": 124, "column": 25}, "end_point": {"row": 124, "column": 31}}, {"id": 513, "type": "return_statement", "text": "return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());", "parent": 18, "children": [514], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 126, "column": 86}}, {"id": 514, "type": "binary_expression", "text": "IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues())", "parent": 513, "children": [515, 519, 520], "start_point": {"row": 126, "column": 9}, "end_point": {"row": 126, "column": 85}}, {"id": 515, "type": "binary_expression", "text": "IteratorFromArrayPortal<ArrayPortalType", "parent": 514, "children": [516, 517, 518], "start_point": {"row": 126, "column": 9}, "end_point": {"row": 126, "column": 48}}, {"id": 516, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 515, "children": [], "start_point": {"row": 126, "column": 9}, "end_point": {"row": 126, "column": 32}}, {"id": 517, "type": "<", "text": "<", "parent": 515, "children": [], "start_point": {"row": 126, "column": 32}, "end_point": {"row": 126, "column": 33}}, {"id": 518, "type": "identifier", "text": "ArrayPortalType", "parent": 515, "children": [], "start_point": {"row": 126, "column": 33}, "end_point": {"row": 126, "column": 48}}, {"id": 519, "type": ">", "text": ">", "parent": 514, "children": [], "start_point": {"row": 126, "column": 48}, "end_point": {"row": 126, "column": 49}}, {"id": 520, "type": "parenthesized_expression", "text": "(portal, portal.GetNumberOfValues())", "parent": 514, "children": [521], "start_point": {"row": 126, "column": 49}, "end_point": {"row": 126, "column": 85}}, {"id": 521, "type": "comma_expression", "text": "portal, portal.GetNumberOfValues()", "parent": 520, "children": [522, 523], "start_point": {"row": 126, "column": 50}, "end_point": {"row": 126, "column": 84}}, {"id": 522, "type": "identifier", "text": "portal", "parent": 521, "children": [], "start_point": {"row": 126, "column": 50}, "end_point": {"row": 126, "column": 56}}, {"id": 523, "type": "call_expression", "text": "portal.GetNumberOfValues()", "parent": 521, "children": [524, 527], "start_point": {"row": 126, "column": 58}, "end_point": {"row": 126, "column": 84}}, {"id": 524, "type": "field_expression", "text": "portal.GetNumberOfValues", "parent": 523, "children": [525, 526], "start_point": {"row": 126, "column": 58}, "end_point": {"row": 126, "column": 82}}, {"id": 525, "type": "identifier", "text": "portal", "parent": 524, "children": [], "start_point": {"row": 126, "column": 58}, "end_point": {"row": 126, "column": 64}}, {"id": 526, "type": "field_identifier", "text": "GetNumberOfValues", "parent": 524, "children": [], "start_point": {"row": 126, "column": 65}, "end_point": {"row": 126, "column": 82}}, {"id": 527, "type": "argument_list", "text": "()", "parent": 523, "children": [], "start_point": {"row": 126, "column": 82}, "end_point": {"row": 126, "column": 84}}, {"id": 528, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 18, "children": [529, 541, 542], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 131, "column": 100}}, {"id": 529, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator", "parent": 528, "children": [530, 536, 537, 540], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 130, "column": 28}}, {"id": 530, "type": "binary_expression", "text": "template <typename PortalType", "parent": 529, "children": [531, 532, 533, 535], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 129, "column": 29}}, {"id": 531, "type": "identifier", "text": "template", "parent": 530, "children": [], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 129, "column": 8}}, {"id": 532, "type": "<", "text": "<", "parent": 530, "children": [], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 10}}, {"id": 533, "type": "ERROR", "text": "typename", "parent": 530, "children": [534], "start_point": {"row": 129, "column": 10}, "end_point": {"row": 129, "column": 18}}, {"id": 534, "type": "identifier", "text": "typename", "parent": 533, "children": [], "start_point": {"row": 129, "column": 10}, "end_point": {"row": 129, "column": 18}}, {"id": 535, "type": "identifier", "text": "PortalType", "parent": 530, "children": [], "start_point": {"row": 129, "column": 19}, "end_point": {"row": 129, "column": 29}}, {"id": 536, "type": ">", "text": ">", "parent": 529, "children": [], "start_point": {"row": 129, "column": 29}, "end_point": {"row": 129, "column": 30}}, {"id": 537, "type": "ERROR", "text": "VTKM_EXEC_CONT bool", "parent": 529, "children": [538, 539], "start_point": {"row": 130, "column": 0}, "end_point": {"row": 130, "column": 19}}, {"id": 538, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 537, "children": [], "start_point": {"row": 130, "column": 0}, "end_point": {"row": 130, "column": 14}}, {"id": 539, "type": "identifier", "text": "bool", "parent": 537, "children": [], "start_point": {"row": 130, "column": 15}, "end_point": {"row": 130, "column": 19}}, {"id": 540, "type": "identifier", "text": "operator", "parent": 529, "children": [], "start_point": {"row": 130, "column": 20}, "end_point": {"row": 130, "column": 28}}, {"id": 541, "type": "==", "text": "==", "parent": 528, "children": [], "start_point": {"row": 130, "column": 28}, "end_point": {"row": 130, "column": 30}}, {"id": 542, "type": "parenthesized_expression", "text": "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 528, "children": [543, 559], "start_point": {"row": 130, "column": 30}, "end_point": {"row": 131, "column": 100}}, {"id": 543, "type": "ERROR", "text": "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::", "parent": 542, "children": [544, 545, 546, 547, 557, 558], "start_point": {"row": 130, "column": 31}, "end_point": {"row": 131, "column": 53}}, {"id": 544, "type": "identifier", "text": "vtkm", "parent": 543, "children": [], "start_point": {"row": 130, "column": 31}, "end_point": {"row": 130, "column": 35}}, {"id": 545, "type": "identifier", "text": "cont", "parent": 543, "children": [], "start_point": {"row": 130, "column": 37}, "end_point": {"row": 130, "column": 41}}, {"id": 546, "type": "identifier", "text": "internal", "parent": 543, "children": [], "start_point": {"row": 130, "column": 43}, "end_point": {"row": 130, "column": 51}}, {"id": 547, "type": "comma_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm", "parent": 543, "children": [548, 556], "start_point": {"row": 130, "column": 53}, "end_point": {"row": 131, "column": 35}}, {"id": 548, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs", "parent": 547, "children": [549, 555], "start_point": {"row": 130, "column": 53}, "end_point": {"row": 130, "column": 99}}, {"id": 549, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 548, "children": [550, 554], "start_point": {"row": 130, "column": 53}, "end_point": {"row": 130, "column": 94}}, {"id": 550, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 549, "children": [551, 552, 553], "start_point": {"row": 130, "column": 53}, "end_point": {"row": 130, "column": 87}}, {"id": 551, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 550, "children": [], "start_point": {"row": 130, "column": 53}, "end_point": {"row": 130, "column": 76}}, {"id": 552, "type": "<", "text": "<", "parent": 550, "children": [], "start_point": {"row": 130, "column": 76}, "end_point": {"row": 130, "column": 77}}, {"id": 553, "type": "identifier", "text": "PortalType", "parent": 550, "children": [], "start_point": {"row": 130, "column": 77}, "end_point": {"row": 130, "column": 87}}, {"id": 554, "type": ">", "text": ">", "parent": 549, "children": [], "start_point": {"row": 130, "column": 87}, "end_point": {"row": 130, "column": 88}}, {"id": 555, "type": "identifier", "text": "lhs", "parent": 548, "children": [], "start_point": {"row": 130, "column": 96}, "end_point": {"row": 130, "column": 99}}, {"id": 556, "type": "identifier", "text": "vtkm", "parent": 547, "children": [], "start_point": {"row": 131, "column": 31}, "end_point": {"row": 131, "column": 35}}, {"id": 557, "type": "identifier", "text": "cont", "parent": 543, "children": [], "start_point": {"row": 131, "column": 37}, "end_point": {"row": 131, "column": 41}}, {"id": 558, "type": "identifier", "text": "internal", "parent": 543, "children": [], "start_point": {"row": 131, "column": 43}, "end_point": {"row": 131, "column": 51}}, {"id": 559, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& rhs", "parent": 542, "children": [560, 566], "start_point": {"row": 131, "column": 53}, "end_point": {"row": 131, "column": 99}}, {"id": 560, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 559, "children": [561, 565], "start_point": {"row": 131, "column": 53}, "end_point": {"row": 131, "column": 94}}, {"id": 561, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 560, "children": [562, 563, 564], "start_point": {"row": 131, "column": 53}, "end_point": {"row": 131, "column": 87}}, {"id": 562, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 561, "children": [], "start_point": {"row": 131, "column": 53}, "end_point": {"row": 131, "column": 76}}, {"id": 563, "type": "<", "text": "<", "parent": 561, "children": [], "start_point": {"row": 131, "column": 76}, "end_point": {"row": 131, "column": 77}}, {"id": 564, "type": "identifier", "text": "PortalType", "parent": 561, "children": [], "start_point": {"row": 131, "column": 77}, "end_point": {"row": 131, "column": 87}}, {"id": 565, "type": ">", "text": ">", "parent": 560, "children": [], "start_point": {"row": 131, "column": 87}, "end_point": {"row": 131, "column": 88}}, {"id": 566, "type": "identifier", "text": "rhs", "parent": 559, "children": [], "start_point": {"row": 131, "column": 96}, "end_point": {"row": 131, "column": 99}}, {"id": 567, "type": "return_statement", "text": "return lhs.Index == rhs.Index;", "parent": 18, "children": [568], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 32}}, {"id": 568, "type": "binary_expression", "text": "lhs.Index == rhs.Index", "parent": 567, "children": [569, 572, 573], "start_point": {"row": 133, "column": 9}, "end_point": {"row": 133, "column": 31}}, {"id": 569, "type": "field_expression", "text": "lhs.Index", "parent": 568, "children": [570, 571], "start_point": {"row": 133, "column": 9}, "end_point": {"row": 133, "column": 18}}, {"id": 570, "type": "identifier", "text": "lhs", "parent": 569, "children": [], "start_point": {"row": 133, "column": 9}, "end_point": {"row": 133, "column": 12}}, {"id": 571, "type": "field_identifier", "text": "Index", "parent": 569, "children": [], "start_point": {"row": 133, "column": 13}, "end_point": {"row": 133, "column": 18}}, {"id": 572, "type": "==", "text": "==", "parent": 568, "children": [], "start_point": {"row": 133, "column": 19}, "end_point": {"row": 133, "column": 21}}, {"id": 573, "type": "field_expression", "text": "rhs.Index", "parent": 568, "children": [574, 575], "start_point": {"row": 133, "column": 22}, "end_point": {"row": 133, "column": 31}}, {"id": 574, "type": "identifier", "text": "rhs", "parent": 573, "children": [], "start_point": {"row": 133, "column": 22}, "end_point": {"row": 133, "column": 25}}, {"id": 575, "type": "field_identifier", "text": "Index", "parent": 573, "children": [], "start_point": {"row": 133, "column": 26}, "end_point": {"row": 133, "column": 31}}, {"id": 576, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 18, "children": [577, 589, 590], "start_point": {"row": 136, "column": 0}, "end_point": {"row": 138, "column": 100}}, {"id": 577, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator", "parent": 576, "children": [578, 584, 585, 588], "start_point": {"row": 136, "column": 0}, "end_point": {"row": 137, "column": 28}}, {"id": 578, "type": "binary_expression", "text": "template <typename PortalType", "parent": 577, "children": [579, 580, 581, 583], "start_point": {"row": 136, "column": 0}, "end_point": {"row": 136, "column": 29}}, {"id": 579, "type": "identifier", "text": "template", "parent": 578, "children": [], "start_point": {"row": 136, "column": 0}, "end_point": {"row": 136, "column": 8}}, {"id": 580, "type": "<", "text": "<", "parent": 578, "children": [], "start_point": {"row": 136, "column": 9}, "end_point": {"row": 136, "column": 10}}, {"id": 581, "type": "ERROR", "text": "typename", "parent": 578, "children": [582], "start_point": {"row": 136, "column": 10}, "end_point": {"row": 136, "column": 18}}, {"id": 582, "type": "identifier", "text": "typename", "parent": 581, "children": [], "start_point": {"row": 136, "column": 10}, "end_point": {"row": 136, "column": 18}}, {"id": 583, "type": "identifier", "text": "PortalType", "parent": 578, "children": [], "start_point": {"row": 136, "column": 19}, "end_point": {"row": 136, "column": 29}}, {"id": 584, "type": ">", "text": ">", "parent": 577, "children": [], "start_point": {"row": 136, "column": 29}, "end_point": {"row": 136, "column": 30}}, {"id": 585, "type": "ERROR", "text": "VTKM_EXEC_CONT bool", "parent": 577, "children": [586, 587], "start_point": {"row": 137, "column": 0}, "end_point": {"row": 137, "column": 19}}, {"id": 586, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 585, "children": [], "start_point": {"row": 137, "column": 0}, "end_point": {"row": 137, "column": 14}}, {"id": 587, "type": "identifier", "text": "bool", "parent": 585, "children": [], "start_point": {"row": 137, "column": 15}, "end_point": {"row": 137, "column": 19}}, {"id": 588, "type": "identifier", "text": "operator", "parent": 577, "children": [], "start_point": {"row": 137, "column": 20}, "end_point": {"row": 137, "column": 28}}, {"id": 589, "type": "!=", "text": "!=", "parent": 576, "children": [], "start_point": {"row": 137, "column": 28}, "end_point": {"row": 137, "column": 30}}, {"id": 590, "type": "parenthesized_expression", "text": "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 576, "children": [591, 607], "start_point": {"row": 137, "column": 30}, "end_point": {"row": 138, "column": 100}}, {"id": 591, "type": "ERROR", "text": "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::", "parent": 590, "children": [592, 593, 594, 595, 605, 606], "start_point": {"row": 137, "column": 31}, "end_point": {"row": 138, "column": 53}}, {"id": 592, "type": "identifier", "text": "vtkm", "parent": 591, "children": [], "start_point": {"row": 137, "column": 31}, "end_point": {"row": 137, "column": 35}}, {"id": 593, "type": "identifier", "text": "cont", "parent": 591, "children": [], "start_point": {"row": 137, "column": 37}, "end_point": {"row": 137, "column": 41}}, {"id": 594, "type": "identifier", "text": "internal", "parent": 591, "children": [], "start_point": {"row": 137, "column": 43}, "end_point": {"row": 137, "column": 51}}, {"id": 595, "type": "comma_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm", "parent": 591, "children": [596, 604], "start_point": {"row": 137, "column": 53}, "end_point": {"row": 138, "column": 35}}, {"id": 596, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs", "parent": 595, "children": [597, 603], "start_point": {"row": 137, "column": 53}, "end_point": {"row": 137, "column": 99}}, {"id": 597, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 596, "children": [598, 602], "start_point": {"row": 137, "column": 53}, "end_point": {"row": 137, "column": 94}}, {"id": 598, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 597, "children": [599, 600, 601], "start_point": {"row": 137, "column": 53}, "end_point": {"row": 137, "column": 87}}, {"id": 599, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 598, "children": [], "start_point": {"row": 137, "column": 53}, "end_point": {"row": 137, "column": 76}}, {"id": 600, "type": "<", "text": "<", "parent": 598, "children": [], "start_point": {"row": 137, "column": 76}, "end_point": {"row": 137, "column": 77}}, {"id": 601, "type": "identifier", "text": "PortalType", "parent": 598, "children": [], "start_point": {"row": 137, "column": 77}, "end_point": {"row": 137, "column": 87}}, {"id": 602, "type": ">", "text": ">", "parent": 597, "children": [], "start_point": {"row": 137, "column": 87}, "end_point": {"row": 137, "column": 88}}, {"id": 603, "type": "identifier", "text": "lhs", "parent": 596, "children": [], "start_point": {"row": 137, "column": 96}, "end_point": {"row": 137, "column": 99}}, {"id": 604, "type": "identifier", "text": "vtkm", "parent": 595, "children": [], "start_point": {"row": 138, "column": 31}, "end_point": {"row": 138, "column": 35}}, {"id": 605, "type": "identifier", "text": "cont", "parent": 591, "children": [], "start_point": {"row": 138, "column": 37}, "end_point": {"row": 138, "column": 41}}, {"id": 606, "type": "identifier", "text": "internal", "parent": 591, "children": [], "start_point": {"row": 138, "column": 43}, "end_point": {"row": 138, "column": 51}}, {"id": 607, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& rhs", "parent": 590, "children": [608, 614], "start_point": {"row": 138, "column": 53}, "end_point": {"row": 138, "column": 99}}, {"id": 608, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 607, "children": [609, 613], "start_point": {"row": 138, "column": 53}, "end_point": {"row": 138, "column": 94}}, {"id": 609, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 608, "children": [610, 611, 612], "start_point": {"row": 138, "column": 53}, "end_point": {"row": 138, "column": 87}}, {"id": 610, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 609, "children": [], "start_point": {"row": 138, "column": 53}, "end_point": {"row": 138, "column": 76}}, {"id": 611, "type": "<", "text": "<", "parent": 609, "children": [], "start_point": {"row": 138, "column": 76}, "end_point": {"row": 138, "column": 77}}, {"id": 612, "type": "identifier", "text": "PortalType", "parent": 609, "children": [], "start_point": {"row": 138, "column": 77}, "end_point": {"row": 138, "column": 87}}, {"id": 613, "type": ">", "text": ">", "parent": 608, "children": [], "start_point": {"row": 138, "column": 87}, "end_point": {"row": 138, "column": 88}}, {"id": 614, "type": "identifier", "text": "rhs", "parent": 607, "children": [], "start_point": {"row": 138, "column": 96}, "end_point": {"row": 138, "column": 99}}, {"id": 615, "type": "return_statement", "text": "return lhs.Index != rhs.Index;", "parent": 18, "children": [616], "start_point": {"row": 140, "column": 2}, "end_point": {"row": 140, "column": 32}}, {"id": 616, "type": "binary_expression", "text": "lhs.Index != rhs.Index", "parent": 615, "children": [617, 620, 621], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 31}}, {"id": 617, "type": "field_expression", "text": "lhs.Index", "parent": 616, "children": [618, 619], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 18}}, {"id": 618, "type": "identifier", "text": "lhs", "parent": 617, "children": [], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 12}}, {"id": 619, "type": "field_identifier", "text": "Index", "parent": 617, "children": [], "start_point": {"row": 140, "column": 13}, "end_point": {"row": 140, "column": 18}}, {"id": 620, "type": "!=", "text": "!=", "parent": 616, "children": [], "start_point": {"row": 140, "column": 19}, "end_point": {"row": 140, "column": 21}}, {"id": 621, "type": "field_expression", "text": "rhs.Index", "parent": 616, "children": [622, 623], "start_point": {"row": 140, "column": 22}, "end_point": {"row": 140, "column": 31}}, {"id": 622, "type": "identifier", "text": "rhs", "parent": 621, "children": [], "start_point": {"row": 140, "column": 22}, "end_point": {"row": 140, "column": 25}}, {"id": 623, "type": "field_identifier", "text": "Index", "parent": 621, "children": [], "start_point": {"row": 140, "column": 26}, "end_point": {"row": 140, "column": 31}}, {"id": 624, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 18, "children": [625, 637, 638], "start_point": {"row": 143, "column": 0}, "end_point": {"row": 145, "column": 99}}, {"id": 625, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator", "parent": 624, "children": [626, 632, 633, 636], "start_point": {"row": 143, "column": 0}, "end_point": {"row": 144, "column": 28}}, {"id": 626, "type": "binary_expression", "text": "template <typename PortalType", "parent": 625, "children": [627, 628, 629, 631], "start_point": {"row": 143, "column": 0}, "end_point": {"row": 143, "column": 29}}, {"id": 627, "type": "identifier", "text": "template", "parent": 626, "children": [], "start_point": {"row": 143, "column": 0}, "end_point": {"row": 143, "column": 8}}, {"id": 628, "type": "<", "text": "<", "parent": 626, "children": [], "start_point": {"row": 143, "column": 9}, "end_point": {"row": 143, "column": 10}}, {"id": 629, "type": "ERROR", "text": "typename", "parent": 626, "children": [630], "start_point": {"row": 143, "column": 10}, "end_point": {"row": 143, "column": 18}}, {"id": 630, "type": "identifier", "text": "typename", "parent": 629, "children": [], "start_point": {"row": 143, "column": 10}, "end_point": {"row": 143, "column": 18}}, {"id": 631, "type": "identifier", "text": "PortalType", "parent": 626, "children": [], "start_point": {"row": 143, "column": 19}, "end_point": {"row": 143, "column": 29}}, {"id": 632, "type": ">", "text": ">", "parent": 625, "children": [], "start_point": {"row": 143, "column": 29}, "end_point": {"row": 143, "column": 30}}, {"id": 633, "type": "ERROR", "text": "VTKM_EXEC_CONT bool", "parent": 625, "children": [634, 635], "start_point": {"row": 144, "column": 0}, "end_point": {"row": 144, "column": 19}}, {"id": 634, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 633, "children": [], "start_point": {"row": 144, "column": 0}, "end_point": {"row": 144, "column": 14}}, {"id": 635, "type": "identifier", "text": "bool", "parent": 633, "children": [], "start_point": {"row": 144, "column": 15}, "end_point": {"row": 144, "column": 19}}, {"id": 636, "type": "identifier", "text": "operator", "parent": 625, "children": [], "start_point": {"row": 144, "column": 20}, "end_point": {"row": 144, "column": 28}}, {"id": 637, "type": "<", "text": "<", "parent": 624, "children": [], "start_point": {"row": 144, "column": 28}, "end_point": {"row": 144, "column": 29}}, {"id": 638, "type": "parenthesized_expression", "text": "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 624, "children": [639, 655], "start_point": {"row": 144, "column": 29}, "end_point": {"row": 145, "column": 99}}, {"id": 639, "type": "ERROR", "text": "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::", "parent": 638, "children": [640, 641, 642, 643, 653, 654], "start_point": {"row": 144, "column": 30}, "end_point": {"row": 145, "column": 52}}, {"id": 640, "type": "identifier", "text": "vtkm", "parent": 639, "children": [], "start_point": {"row": 144, "column": 30}, "end_point": {"row": 144, "column": 34}}, {"id": 641, "type": "identifier", "text": "cont", "parent": 639, "children": [], "start_point": {"row": 144, "column": 36}, "end_point": {"row": 144, "column": 40}}, {"id": 642, "type": "identifier", "text": "internal", "parent": 639, "children": [], "start_point": {"row": 144, "column": 42}, "end_point": {"row": 144, "column": 50}}, {"id": 643, "type": "comma_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm", "parent": 639, "children": [644, 652], "start_point": {"row": 144, "column": 52}, "end_point": {"row": 145, "column": 34}}, {"id": 644, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs", "parent": 643, "children": [645, 651], "start_point": {"row": 144, "column": 52}, "end_point": {"row": 144, "column": 98}}, {"id": 645, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 644, "children": [646, 650], "start_point": {"row": 144, "column": 52}, "end_point": {"row": 144, "column": 93}}, {"id": 646, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 645, "children": [647, 648, 649], "start_point": {"row": 144, "column": 52}, "end_point": {"row": 144, "column": 86}}, {"id": 647, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 646, "children": [], "start_point": {"row": 144, "column": 52}, "end_point": {"row": 144, "column": 75}}, {"id": 648, "type": "<", "text": "<", "parent": 646, "children": [], "start_point": {"row": 144, "column": 75}, "end_point": {"row": 144, "column": 76}}, {"id": 649, "type": "identifier", "text": "PortalType", "parent": 646, "children": [], "start_point": {"row": 144, "column": 76}, "end_point": {"row": 144, "column": 86}}, {"id": 650, "type": ">", "text": ">", "parent": 645, "children": [], "start_point": {"row": 144, "column": 86}, "end_point": {"row": 144, "column": 87}}, {"id": 651, "type": "identifier", "text": "lhs", "parent": 644, "children": [], "start_point": {"row": 144, "column": 95}, "end_point": {"row": 144, "column": 98}}, {"id": 652, "type": "identifier", "text": "vtkm", "parent": 643, "children": [], "start_point": {"row": 145, "column": 30}, "end_point": {"row": 145, "column": 34}}, {"id": 653, "type": "identifier", "text": "cont", "parent": 639, "children": [], "start_point": {"row": 145, "column": 36}, "end_point": {"row": 145, "column": 40}}, {"id": 654, "type": "identifier", "text": "internal", "parent": 639, "children": [], "start_point": {"row": 145, "column": 42}, "end_point": {"row": 145, "column": 50}}, {"id": 655, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& rhs", "parent": 638, "children": [656, 662], "start_point": {"row": 145, "column": 52}, "end_point": {"row": 145, "column": 98}}, {"id": 656, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 655, "children": [657, 661], "start_point": {"row": 145, "column": 52}, "end_point": {"row": 145, "column": 93}}, {"id": 657, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 656, "children": [658, 659, 660], "start_point": {"row": 145, "column": 52}, "end_point": {"row": 145, "column": 86}}, {"id": 658, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 657, "children": [], "start_point": {"row": 145, "column": 52}, "end_point": {"row": 145, "column": 75}}, {"id": 659, "type": "<", "text": "<", "parent": 657, "children": [], "start_point": {"row": 145, "column": 75}, "end_point": {"row": 145, "column": 76}}, {"id": 660, "type": "identifier", "text": "PortalType", "parent": 657, "children": [], "start_point": {"row": 145, "column": 76}, "end_point": {"row": 145, "column": 86}}, {"id": 661, "type": ">", "text": ">", "parent": 656, "children": [], "start_point": {"row": 145, "column": 86}, "end_point": {"row": 145, "column": 87}}, {"id": 662, "type": "identifier", "text": "rhs", "parent": 655, "children": [], "start_point": {"row": 145, "column": 95}, "end_point": {"row": 145, "column": 98}}, {"id": 663, "type": "return_statement", "text": "return lhs.Index < rhs.Index;", "parent": 18, "children": [664], "start_point": {"row": 147, "column": 2}, "end_point": {"row": 147, "column": 31}}, {"id": 664, "type": "binary_expression", "text": "lhs.Index < rhs.Index", "parent": 663, "children": [665, 668, 669], "start_point": {"row": 147, "column": 9}, "end_point": {"row": 147, "column": 30}}, {"id": 665, "type": "field_expression", "text": "lhs.Index", "parent": 664, "children": [666, 667], "start_point": {"row": 147, "column": 9}, "end_point": {"row": 147, "column": 18}}, {"id": 666, "type": "identifier", "text": "lhs", "parent": 665, "children": [], "start_point": {"row": 147, "column": 9}, "end_point": {"row": 147, "column": 12}}, {"id": 667, "type": "field_identifier", "text": "Index", "parent": 665, "children": [], "start_point": {"row": 147, "column": 13}, "end_point": {"row": 147, "column": 18}}, {"id": 668, "type": "<", "text": "<", "parent": 664, "children": [], "start_point": {"row": 147, "column": 19}, "end_point": {"row": 147, "column": 20}}, {"id": 669, "type": "field_expression", "text": "rhs.Index", "parent": 664, "children": [670, 671], "start_point": {"row": 147, "column": 21}, "end_point": {"row": 147, "column": 30}}, {"id": 670, "type": "identifier", "text": "rhs", "parent": 669, "children": [], "start_point": {"row": 147, "column": 21}, "end_point": {"row": 147, "column": 24}}, {"id": 671, "type": "field_identifier", "text": "Index", "parent": 669, "children": [], "start_point": {"row": 147, "column": 25}, "end_point": {"row": 147, "column": 30}}, {"id": 672, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 18, "children": [673, 685, 686], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 152, "column": 100}}, {"id": 673, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator", "parent": 672, "children": [674, 680, 681, 684], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 151, "column": 28}}, {"id": 674, "type": "binary_expression", "text": "template <typename PortalType", "parent": 673, "children": [675, 676, 677, 679], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 150, "column": 29}}, {"id": 675, "type": "identifier", "text": "template", "parent": 674, "children": [], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 150, "column": 8}}, {"id": 676, "type": "<", "text": "<", "parent": 674, "children": [], "start_point": {"row": 150, "column": 9}, "end_point": {"row": 150, "column": 10}}, {"id": 677, "type": "ERROR", "text": "typename", "parent": 674, "children": [678], "start_point": {"row": 150, "column": 10}, "end_point": {"row": 150, "column": 18}}, {"id": 678, "type": "identifier", "text": "typename", "parent": 677, "children": [], "start_point": {"row": 150, "column": 10}, "end_point": {"row": 150, "column": 18}}, {"id": 679, "type": "identifier", "text": "PortalType", "parent": 674, "children": [], "start_point": {"row": 150, "column": 19}, "end_point": {"row": 150, "column": 29}}, {"id": 680, "type": ">", "text": ">", "parent": 673, "children": [], "start_point": {"row": 150, "column": 29}, "end_point": {"row": 150, "column": 30}}, {"id": 681, "type": "ERROR", "text": "VTKM_EXEC_CONT bool", "parent": 673, "children": [682, 683], "start_point": {"row": 151, "column": 0}, "end_point": {"row": 151, "column": 19}}, {"id": 682, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 681, "children": [], "start_point": {"row": 151, "column": 0}, "end_point": {"row": 151, "column": 14}}, {"id": 683, "type": "identifier", "text": "bool", "parent": 681, "children": [], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 19}}, {"id": 684, "type": "identifier", "text": "operator", "parent": 673, "children": [], "start_point": {"row": 151, "column": 20}, "end_point": {"row": 151, "column": 28}}, {"id": 685, "type": "<=", "text": "<=", "parent": 672, "children": [], "start_point": {"row": 151, "column": 28}, "end_point": {"row": 151, "column": 30}}, {"id": 686, "type": "parenthesized_expression", "text": "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 672, "children": [687, 703], "start_point": {"row": 151, "column": 30}, "end_point": {"row": 152, "column": 100}}, {"id": 687, "type": "ERROR", "text": "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::", "parent": 686, "children": [688, 689, 690, 691, 701, 702], "start_point": {"row": 151, "column": 31}, "end_point": {"row": 152, "column": 53}}, {"id": 688, "type": "identifier", "text": "vtkm", "parent": 687, "children": [], "start_point": {"row": 151, "column": 31}, "end_point": {"row": 151, "column": 35}}, {"id": 689, "type": "identifier", "text": "cont", "parent": 687, "children": [], "start_point": {"row": 151, "column": 37}, "end_point": {"row": 151, "column": 41}}, {"id": 690, "type": "identifier", "text": "internal", "parent": 687, "children": [], "start_point": {"row": 151, "column": 43}, "end_point": {"row": 151, "column": 51}}, {"id": 691, "type": "comma_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm", "parent": 687, "children": [692, 700], "start_point": {"row": 151, "column": 53}, "end_point": {"row": 152, "column": 35}}, {"id": 692, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs", "parent": 691, "children": [693, 699], "start_point": {"row": 151, "column": 53}, "end_point": {"row": 151, "column": 99}}, {"id": 693, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 692, "children": [694, 698], "start_point": {"row": 151, "column": 53}, "end_point": {"row": 151, "column": 94}}, {"id": 694, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 693, "children": [695, 696, 697], "start_point": {"row": 151, "column": 53}, "end_point": {"row": 151, "column": 87}}, {"id": 695, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 694, "children": [], "start_point": {"row": 151, "column": 53}, "end_point": {"row": 151, "column": 76}}, {"id": 696, "type": "<", "text": "<", "parent": 694, "children": [], "start_point": {"row": 151, "column": 76}, "end_point": {"row": 151, "column": 77}}, {"id": 697, "type": "identifier", "text": "PortalType", "parent": 694, "children": [], "start_point": {"row": 151, "column": 77}, "end_point": {"row": 151, "column": 87}}, {"id": 698, "type": ">", "text": ">", "parent": 693, "children": [], "start_point": {"row": 151, "column": 87}, "end_point": {"row": 151, "column": 88}}, {"id": 699, "type": "identifier", "text": "lhs", "parent": 692, "children": [], "start_point": {"row": 151, "column": 96}, "end_point": {"row": 151, "column": 99}}, {"id": 700, "type": "identifier", "text": "vtkm", "parent": 691, "children": [], "start_point": {"row": 152, "column": 31}, "end_point": {"row": 152, "column": 35}}, {"id": 701, "type": "identifier", "text": "cont", "parent": 687, "children": [], "start_point": {"row": 152, "column": 37}, "end_point": {"row": 152, "column": 41}}, {"id": 702, "type": "identifier", "text": "internal", "parent": 687, "children": [], "start_point": {"row": 152, "column": 43}, "end_point": {"row": 152, "column": 51}}, {"id": 703, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& rhs", "parent": 686, "children": [704, 710], "start_point": {"row": 152, "column": 53}, "end_point": {"row": 152, "column": 99}}, {"id": 704, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 703, "children": [705, 709], "start_point": {"row": 152, "column": 53}, "end_point": {"row": 152, "column": 94}}, {"id": 705, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 704, "children": [706, 707, 708], "start_point": {"row": 152, "column": 53}, "end_point": {"row": 152, "column": 87}}, {"id": 706, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 705, "children": [], "start_point": {"row": 152, "column": 53}, "end_point": {"row": 152, "column": 76}}, {"id": 707, "type": "<", "text": "<", "parent": 705, "children": [], "start_point": {"row": 152, "column": 76}, "end_point": {"row": 152, "column": 77}}, {"id": 708, "type": "identifier", "text": "PortalType", "parent": 705, "children": [], "start_point": {"row": 152, "column": 77}, "end_point": {"row": 152, "column": 87}}, {"id": 709, "type": ">", "text": ">", "parent": 704, "children": [], "start_point": {"row": 152, "column": 87}, "end_point": {"row": 152, "column": 88}}, {"id": 710, "type": "identifier", "text": "rhs", "parent": 703, "children": [], "start_point": {"row": 152, "column": 96}, "end_point": {"row": 152, "column": 99}}, {"id": 711, "type": "return_statement", "text": "return lhs.Index <= rhs.Index;", "parent": 18, "children": [712], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 154, "column": 32}}, {"id": 712, "type": "binary_expression", "text": "lhs.Index <= rhs.Index", "parent": 711, "children": [713, 716, 717], "start_point": {"row": 154, "column": 9}, "end_point": {"row": 154, "column": 31}}, {"id": 713, "type": "field_expression", "text": "lhs.Index", "parent": 712, "children": [714, 715], "start_point": {"row": 154, "column": 9}, "end_point": {"row": 154, "column": 18}}, {"id": 714, "type": "identifier", "text": "lhs", "parent": 713, "children": [], "start_point": {"row": 154, "column": 9}, "end_point": {"row": 154, "column": 12}}, {"id": 715, "type": "field_identifier", "text": "Index", "parent": 713, "children": [], "start_point": {"row": 154, "column": 13}, "end_point": {"row": 154, "column": 18}}, {"id": 716, "type": "<=", "text": "<=", "parent": 712, "children": [], "start_point": {"row": 154, "column": 19}, "end_point": {"row": 154, "column": 21}}, {"id": 717, "type": "field_expression", "text": "rhs.Index", "parent": 712, "children": [718, 719], "start_point": {"row": 154, "column": 22}, "end_point": {"row": 154, "column": 31}}, {"id": 718, "type": "identifier", "text": "rhs", "parent": 717, "children": [], "start_point": {"row": 154, "column": 22}, "end_point": {"row": 154, "column": 25}}, {"id": 719, "type": "field_identifier", "text": "Index", "parent": 717, "children": [], "start_point": {"row": 154, "column": 26}, "end_point": {"row": 154, "column": 31}}, {"id": 720, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 18, "children": [721, 733, 734], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 159, "column": 99}}, {"id": 721, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator", "parent": 720, "children": [722, 728, 729, 732], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 158, "column": 28}}, {"id": 722, "type": "binary_expression", "text": "template <typename PortalType", "parent": 721, "children": [723, 724, 725, 727], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 157, "column": 29}}, {"id": 723, "type": "identifier", "text": "template", "parent": 722, "children": [], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 157, "column": 8}}, {"id": 724, "type": "<", "text": "<", "parent": 722, "children": [], "start_point": {"row": 157, "column": 9}, "end_point": {"row": 157, "column": 10}}, {"id": 725, "type": "ERROR", "text": "typename", "parent": 722, "children": [726], "start_point": {"row": 157, "column": 10}, "end_point": {"row": 157, "column": 18}}, {"id": 726, "type": "identifier", "text": "typename", "parent": 725, "children": [], "start_point": {"row": 157, "column": 10}, "end_point": {"row": 157, "column": 18}}, {"id": 727, "type": "identifier", "text": "PortalType", "parent": 722, "children": [], "start_point": {"row": 157, "column": 19}, "end_point": {"row": 157, "column": 29}}, {"id": 728, "type": ">", "text": ">", "parent": 721, "children": [], "start_point": {"row": 157, "column": 29}, "end_point": {"row": 157, "column": 30}}, {"id": 729, "type": "ERROR", "text": "VTKM_EXEC_CONT bool", "parent": 721, "children": [730, 731], "start_point": {"row": 158, "column": 0}, "end_point": {"row": 158, "column": 19}}, {"id": 730, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 729, "children": [], "start_point": {"row": 158, "column": 0}, "end_point": {"row": 158, "column": 14}}, {"id": 731, "type": "identifier", "text": "bool", "parent": 729, "children": [], "start_point": {"row": 158, "column": 15}, "end_point": {"row": 158, "column": 19}}, {"id": 732, "type": "identifier", "text": "operator", "parent": 721, "children": [], "start_point": {"row": 158, "column": 20}, "end_point": {"row": 158, "column": 28}}, {"id": 733, "type": ">", "text": ">", "parent": 720, "children": [], "start_point": {"row": 158, "column": 28}, "end_point": {"row": 158, "column": 29}}, {"id": 734, "type": "parenthesized_expression", "text": "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 720, "children": [735, 751], "start_point": {"row": 158, "column": 29}, "end_point": {"row": 159, "column": 99}}, {"id": 735, "type": "ERROR", "text": "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::", "parent": 734, "children": [736, 737, 738, 739, 749, 750], "start_point": {"row": 158, "column": 30}, "end_point": {"row": 159, "column": 52}}, {"id": 736, "type": "identifier", "text": "vtkm", "parent": 735, "children": [], "start_point": {"row": 158, "column": 30}, "end_point": {"row": 158, "column": 34}}, {"id": 737, "type": "identifier", "text": "cont", "parent": 735, "children": [], "start_point": {"row": 158, "column": 36}, "end_point": {"row": 158, "column": 40}}, {"id": 738, "type": "identifier", "text": "internal", "parent": 735, "children": [], "start_point": {"row": 158, "column": 42}, "end_point": {"row": 158, "column": 50}}, {"id": 739, "type": "comma_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm", "parent": 735, "children": [740, 748], "start_point": {"row": 158, "column": 52}, "end_point": {"row": 159, "column": 34}}, {"id": 740, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs", "parent": 739, "children": [741, 747], "start_point": {"row": 158, "column": 52}, "end_point": {"row": 158, "column": 98}}, {"id": 741, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 740, "children": [742, 746], "start_point": {"row": 158, "column": 52}, "end_point": {"row": 158, "column": 93}}, {"id": 742, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 741, "children": [743, 744, 745], "start_point": {"row": 158, "column": 52}, "end_point": {"row": 158, "column": 86}}, {"id": 743, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 742, "children": [], "start_point": {"row": 158, "column": 52}, "end_point": {"row": 158, "column": 75}}, {"id": 744, "type": "<", "text": "<", "parent": 742, "children": [], "start_point": {"row": 158, "column": 75}, "end_point": {"row": 158, "column": 76}}, {"id": 745, "type": "identifier", "text": "PortalType", "parent": 742, "children": [], "start_point": {"row": 158, "column": 76}, "end_point": {"row": 158, "column": 86}}, {"id": 746, "type": ">", "text": ">", "parent": 741, "children": [], "start_point": {"row": 158, "column": 86}, "end_point": {"row": 158, "column": 87}}, {"id": 747, "type": "identifier", "text": "lhs", "parent": 740, "children": [], "start_point": {"row": 158, "column": 95}, "end_point": {"row": 158, "column": 98}}, {"id": 748, "type": "identifier", "text": "vtkm", "parent": 739, "children": [], "start_point": {"row": 159, "column": 30}, "end_point": {"row": 159, "column": 34}}, {"id": 749, "type": "identifier", "text": "cont", "parent": 735, "children": [], "start_point": {"row": 159, "column": 36}, "end_point": {"row": 159, "column": 40}}, {"id": 750, "type": "identifier", "text": "internal", "parent": 735, "children": [], "start_point": {"row": 159, "column": 42}, "end_point": {"row": 159, "column": 50}}, {"id": 751, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& rhs", "parent": 734, "children": [752, 758], "start_point": {"row": 159, "column": 52}, "end_point": {"row": 159, "column": 98}}, {"id": 752, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 751, "children": [753, 757], "start_point": {"row": 159, "column": 52}, "end_point": {"row": 159, "column": 93}}, {"id": 753, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 752, "children": [754, 755, 756], "start_point": {"row": 159, "column": 52}, "end_point": {"row": 159, "column": 86}}, {"id": 754, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 753, "children": [], "start_point": {"row": 159, "column": 52}, "end_point": {"row": 159, "column": 75}}, {"id": 755, "type": "<", "text": "<", "parent": 753, "children": [], "start_point": {"row": 159, "column": 75}, "end_point": {"row": 159, "column": 76}}, {"id": 756, "type": "identifier", "text": "PortalType", "parent": 753, "children": [], "start_point": {"row": 159, "column": 76}, "end_point": {"row": 159, "column": 86}}, {"id": 757, "type": ">", "text": ">", "parent": 752, "children": [], "start_point": {"row": 159, "column": 86}, "end_point": {"row": 159, "column": 87}}, {"id": 758, "type": "identifier", "text": "rhs", "parent": 751, "children": [], "start_point": {"row": 159, "column": 95}, "end_point": {"row": 159, "column": 98}}, {"id": 759, "type": "return_statement", "text": "return lhs.Index > rhs.Index;", "parent": 18, "children": [760], "start_point": {"row": 161, "column": 2}, "end_point": {"row": 161, "column": 31}}, {"id": 760, "type": "binary_expression", "text": "lhs.Index > rhs.Index", "parent": 759, "children": [761, 764, 765], "start_point": {"row": 161, "column": 9}, "end_point": {"row": 161, "column": 30}}, {"id": 761, "type": "field_expression", "text": "lhs.Index", "parent": 760, "children": [762, 763], "start_point": {"row": 161, "column": 9}, "end_point": {"row": 161, "column": 18}}, {"id": 762, "type": "identifier", "text": "lhs", "parent": 761, "children": [], "start_point": {"row": 161, "column": 9}, "end_point": {"row": 161, "column": 12}}, {"id": 763, "type": "field_identifier", "text": "Index", "parent": 761, "children": [], "start_point": {"row": 161, "column": 13}, "end_point": {"row": 161, "column": 18}}, {"id": 764, "type": ">", "text": ">", "parent": 760, "children": [], "start_point": {"row": 161, "column": 19}, "end_point": {"row": 161, "column": 20}}, {"id": 765, "type": "field_expression", "text": "rhs.Index", "parent": 760, "children": [766, 767], "start_point": {"row": 161, "column": 21}, "end_point": {"row": 161, "column": 30}}, {"id": 766, "type": "identifier", "text": "rhs", "parent": 765, "children": [], "start_point": {"row": 161, "column": 21}, "end_point": {"row": 161, "column": 24}}, {"id": 767, "type": "field_identifier", "text": "Index", "parent": 765, "children": [], "start_point": {"row": 161, "column": 25}, "end_point": {"row": 161, "column": 30}}, {"id": 768, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 18, "children": [769, 781, 782], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 166, "column": 100}}, {"id": 769, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT bool operator", "parent": 768, "children": [770, 776, 777, 780], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 165, "column": 28}}, {"id": 770, "type": "binary_expression", "text": "template <typename PortalType", "parent": 769, "children": [771, 772, 773, 775], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 164, "column": 29}}, {"id": 771, "type": "identifier", "text": "template", "parent": 770, "children": [], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 164, "column": 8}}, {"id": 772, "type": "<", "text": "<", "parent": 770, "children": [], "start_point": {"row": 164, "column": 9}, "end_point": {"row": 164, "column": 10}}, {"id": 773, "type": "ERROR", "text": "typename", "parent": 770, "children": [774], "start_point": {"row": 164, "column": 10}, "end_point": {"row": 164, "column": 18}}, {"id": 774, "type": "identifier", "text": "typename", "parent": 773, "children": [], "start_point": {"row": 164, "column": 10}, "end_point": {"row": 164, "column": 18}}, {"id": 775, "type": "identifier", "text": "PortalType", "parent": 770, "children": [], "start_point": {"row": 164, "column": 19}, "end_point": {"row": 164, "column": 29}}, {"id": 776, "type": ">", "text": ">", "parent": 769, "children": [], "start_point": {"row": 164, "column": 29}, "end_point": {"row": 164, "column": 30}}, {"id": 777, "type": "ERROR", "text": "VTKM_EXEC_CONT bool", "parent": 769, "children": [778, 779], "start_point": {"row": 165, "column": 0}, "end_point": {"row": 165, "column": 19}}, {"id": 778, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 777, "children": [], "start_point": {"row": 165, "column": 0}, "end_point": {"row": 165, "column": 14}}, {"id": 779, "type": "identifier", "text": "bool", "parent": 777, "children": [], "start_point": {"row": 165, "column": 15}, "end_point": {"row": 165, "column": 19}}, {"id": 780, "type": "identifier", "text": "operator", "parent": 769, "children": [], "start_point": {"row": 165, "column": 20}, "end_point": {"row": 165, "column": 28}}, {"id": 781, "type": ">=", "text": ">=", "parent": 768, "children": [], "start_point": {"row": 165, "column": 28}, "end_point": {"row": 165, "column": 30}}, {"id": 782, "type": "parenthesized_expression", "text": "(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 768, "children": [783, 799], "start_point": {"row": 165, "column": 30}, "end_point": {"row": 166, "column": 100}}, {"id": 783, "type": "ERROR", "text": "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::", "parent": 782, "children": [784, 785, 786, 787, 797, 798], "start_point": {"row": 165, "column": 31}, "end_point": {"row": 166, "column": 53}}, {"id": 784, "type": "identifier", "text": "vtkm", "parent": 783, "children": [], "start_point": {"row": 165, "column": 31}, "end_point": {"row": 165, "column": 35}}, {"id": 785, "type": "identifier", "text": "cont", "parent": 783, "children": [], "start_point": {"row": 165, "column": 37}, "end_point": {"row": 165, "column": 41}}, {"id": 786, "type": "identifier", "text": "internal", "parent": 783, "children": [], "start_point": {"row": 165, "column": 43}, "end_point": {"row": 165, "column": 51}}, {"id": 787, "type": "comma_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm", "parent": 783, "children": [788, 796], "start_point": {"row": 165, "column": 53}, "end_point": {"row": 166, "column": 35}}, {"id": 788, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs", "parent": 787, "children": [789, 795], "start_point": {"row": 165, "column": 53}, "end_point": {"row": 165, "column": 99}}, {"id": 789, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 788, "children": [790, 794], "start_point": {"row": 165, "column": 53}, "end_point": {"row": 165, "column": 94}}, {"id": 790, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 789, "children": [791, 792, 793], "start_point": {"row": 165, "column": 53}, "end_point": {"row": 165, "column": 87}}, {"id": 791, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 790, "children": [], "start_point": {"row": 165, "column": 53}, "end_point": {"row": 165, "column": 76}}, {"id": 792, "type": "<", "text": "<", "parent": 790, "children": [], "start_point": {"row": 165, "column": 76}, "end_point": {"row": 165, "column": 77}}, {"id": 793, "type": "identifier", "text": "PortalType", "parent": 790, "children": [], "start_point": {"row": 165, "column": 77}, "end_point": {"row": 165, "column": 87}}, {"id": 794, "type": ">", "text": ">", "parent": 789, "children": [], "start_point": {"row": 165, "column": 87}, "end_point": {"row": 165, "column": 88}}, {"id": 795, "type": "identifier", "text": "lhs", "parent": 788, "children": [], "start_point": {"row": 165, "column": 96}, "end_point": {"row": 165, "column": 99}}, {"id": 796, "type": "identifier", "text": "vtkm", "parent": 787, "children": [], "start_point": {"row": 166, "column": 31}, "end_point": {"row": 166, "column": 35}}, {"id": 797, "type": "identifier", "text": "cont", "parent": 783, "children": [], "start_point": {"row": 166, "column": 37}, "end_point": {"row": 166, "column": 41}}, {"id": 798, "type": "identifier", "text": "internal", "parent": 783, "children": [], "start_point": {"row": 166, "column": 43}, "end_point": {"row": 166, "column": 51}}, {"id": 799, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& rhs", "parent": 782, "children": [800, 806], "start_point": {"row": 166, "column": 53}, "end_point": {"row": 166, "column": 99}}, {"id": 800, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 799, "children": [801, 805], "start_point": {"row": 166, "column": 53}, "end_point": {"row": 166, "column": 94}}, {"id": 801, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 800, "children": [802, 803, 804], "start_point": {"row": 166, "column": 53}, "end_point": {"row": 166, "column": 87}}, {"id": 802, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 801, "children": [], "start_point": {"row": 166, "column": 53}, "end_point": {"row": 166, "column": 76}}, {"id": 803, "type": "<", "text": "<", "parent": 801, "children": [], "start_point": {"row": 166, "column": 76}, "end_point": {"row": 166, "column": 77}}, {"id": 804, "type": "identifier", "text": "PortalType", "parent": 801, "children": [], "start_point": {"row": 166, "column": 77}, "end_point": {"row": 166, "column": 87}}, {"id": 805, "type": ">", "text": ">", "parent": 800, "children": [], "start_point": {"row": 166, "column": 87}, "end_point": {"row": 166, "column": 88}}, {"id": 806, "type": "identifier", "text": "rhs", "parent": 799, "children": [], "start_point": {"row": 166, "column": 96}, "end_point": {"row": 166, "column": 99}}, {"id": 807, "type": "return_statement", "text": "return lhs.Index >= rhs.Index;", "parent": 18, "children": [808], "start_point": {"row": 168, "column": 2}, "end_point": {"row": 168, "column": 32}}, {"id": 808, "type": "binary_expression", "text": "lhs.Index >= rhs.Index", "parent": 807, "children": [809, 812, 813], "start_point": {"row": 168, "column": 9}, "end_point": {"row": 168, "column": 31}}, {"id": 809, "type": "field_expression", "text": "lhs.Index", "parent": 808, "children": [810, 811], "start_point": {"row": 168, "column": 9}, "end_point": {"row": 168, "column": 18}}, {"id": 810, "type": "identifier", "text": "lhs", "parent": 809, "children": [], "start_point": {"row": 168, "column": 9}, "end_point": {"row": 168, "column": 12}}, {"id": 811, "type": "field_identifier", "text": "Index", "parent": 809, "children": [], "start_point": {"row": 168, "column": 13}, "end_point": {"row": 168, "column": 18}}, {"id": 812, "type": ">=", "text": ">=", "parent": 808, "children": [], "start_point": {"row": 168, "column": 19}, "end_point": {"row": 168, "column": 21}}, {"id": 813, "type": "field_expression", "text": "rhs.Index", "parent": 808, "children": [814, 815], "start_point": {"row": 168, "column": 22}, "end_point": {"row": 168, "column": 31}}, {"id": 814, "type": "identifier", "text": "rhs", "parent": 813, "children": [], "start_point": {"row": 168, "column": 22}, "end_point": {"row": 168, "column": 25}}, {"id": 815, "type": "field_identifier", "text": "Index", "parent": 813, "children": [], "start_point": {"row": 168, "column": 26}, "end_point": {"row": 168, "column": 31}}, {"id": 816, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT", "parent": 18, "children": [817, 823, 824], "start_point": {"row": 171, "column": 0}, "end_point": {"row": 172, "column": 14}}, {"id": 817, "type": "binary_expression", "text": "template <typename PortalType", "parent": 816, "children": [818, 819, 820, 822], "start_point": {"row": 171, "column": 0}, "end_point": {"row": 171, "column": 29}}, {"id": 818, "type": "identifier", "text": "template", "parent": 817, "children": [], "start_point": {"row": 171, "column": 0}, "end_point": {"row": 171, "column": 8}}, {"id": 819, "type": "<", "text": "<", "parent": 817, "children": [], "start_point": {"row": 171, "column": 9}, "end_point": {"row": 171, "column": 10}}, {"id": 820, "type": "ERROR", "text": "typename", "parent": 817, "children": [821], "start_point": {"row": 171, "column": 10}, "end_point": {"row": 171, "column": 18}}, {"id": 821, "type": "identifier", "text": "typename", "parent": 820, "children": [], "start_point": {"row": 171, "column": 10}, "end_point": {"row": 171, "column": 18}}, {"id": 822, "type": "identifier", "text": "PortalType", "parent": 817, "children": [], "start_point": {"row": 171, "column": 19}, "end_point": {"row": 171, "column": 29}}, {"id": 823, "type": ">", "text": ">", "parent": 816, "children": [], "start_point": {"row": 171, "column": 29}, "end_point": {"row": 171, "column": 30}}, {"id": 824, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 816, "children": [], "start_point": {"row": 172, "column": 0}, "end_point": {"row": 172, "column": 14}}, {"id": 825, "type": "labeled_statement", "text": "std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}", "parent": 18, "children": [826, 827], "start_point": {"row": 172, "column": 15}, "end_point": {"row": 177, "column": 1}}, {"id": 826, "type": "statement_identifier", "text": "std", "parent": 825, "children": [], "start_point": {"row": 172, "column": 15}, "end_point": {"row": 172, "column": 18}}, {"id": 827, "type": "ERROR", "text": ":ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 825, "children": [828, 829, 830], "start_point": {"row": 172, "column": 19}, "end_point": {"row": 174, "column": 71}}, {"id": 828, "type": "primitive_type", "text": "ptrdiff_t", "parent": 827, "children": [], "start_point": {"row": 172, "column": 20}, "end_point": {"row": 172, "column": 29}}, {"id": 829, "type": "identifier", "text": "operator", "parent": 827, "children": [], "start_point": {"row": 172, "column": 30}, "end_point": {"row": 172, "column": 38}}, {"id": 830, "type": "unary_expression", "text": "-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 827, "children": [831, 832], "start_point": {"row": 172, "column": 38}, "end_point": {"row": 174, "column": 71}}, {"id": 831, "type": "-", "text": "-", "parent": 830, "children": [], "start_point": {"row": 172, "column": 38}, "end_point": {"row": 172, "column": 39}}, {"id": 832, "type": "parenthesized_expression", "text": "(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)", "parent": 830, "children": [833, 849], "start_point": {"row": 172, "column": 39}, "end_point": {"row": 174, "column": 71}}, {"id": 833, "type": "ERROR", "text": "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::", "parent": 832, "children": [834, 835, 836, 837, 847, 848], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 174, "column": 24}}, {"id": 834, "type": "identifier", "text": "vtkm", "parent": 833, "children": [], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 6}}, {"id": 835, "type": "identifier", "text": "cont", "parent": 833, "children": [], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 12}}, {"id": 836, "type": "identifier", "text": "internal", "parent": 833, "children": [], "start_point": {"row": 173, "column": 14}, "end_point": {"row": 173, "column": 22}}, {"id": 837, "type": "comma_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm", "parent": 833, "children": [838, 846], "start_point": {"row": 173, "column": 24}, "end_point": {"row": 174, "column": 6}}, {"id": 838, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& lhs", "parent": 837, "children": [839, 845], "start_point": {"row": 173, "column": 24}, "end_point": {"row": 173, "column": 70}}, {"id": 839, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 838, "children": [840, 844], "start_point": {"row": 173, "column": 24}, "end_point": {"row": 173, "column": 65}}, {"id": 840, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 839, "children": [841, 842, 843], "start_point": {"row": 173, "column": 24}, "end_point": {"row": 173, "column": 58}}, {"id": 841, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 840, "children": [], "start_point": {"row": 173, "column": 24}, "end_point": {"row": 173, "column": 47}}, {"id": 842, "type": "<", "text": "<", "parent": 840, "children": [], "start_point": {"row": 173, "column": 47}, "end_point": {"row": 173, "column": 48}}, {"id": 843, "type": "identifier", "text": "PortalType", "parent": 840, "children": [], "start_point": {"row": 173, "column": 48}, "end_point": {"row": 173, "column": 58}}, {"id": 844, "type": ">", "text": ">", "parent": 839, "children": [], "start_point": {"row": 173, "column": 58}, "end_point": {"row": 173, "column": 59}}, {"id": 845, "type": "identifier", "text": "lhs", "parent": 838, "children": [], "start_point": {"row": 173, "column": 67}, "end_point": {"row": 173, "column": 70}}, {"id": 846, "type": "identifier", "text": "vtkm", "parent": 837, "children": [], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 174, "column": 6}}, {"id": 847, "type": "identifier", "text": "cont", "parent": 833, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 12}}, {"id": 848, "type": "identifier", "text": "internal", "parent": 833, "children": [], "start_point": {"row": 174, "column": 14}, "end_point": {"row": 174, "column": 22}}, {"id": 849, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& rhs", "parent": 832, "children": [850, 856], "start_point": {"row": 174, "column": 24}, "end_point": {"row": 174, "column": 70}}, {"id": 850, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 849, "children": [851, 855], "start_point": {"row": 174, "column": 24}, "end_point": {"row": 174, "column": 65}}, {"id": 851, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 850, "children": [852, 853, 854], "start_point": {"row": 174, "column": 24}, "end_point": {"row": 174, "column": 58}}, {"id": 852, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 851, "children": [], "start_point": {"row": 174, "column": 24}, "end_point": {"row": 174, "column": 47}}, {"id": 853, "type": "<", "text": "<", "parent": 851, "children": [], "start_point": {"row": 174, "column": 47}, "end_point": {"row": 174, "column": 48}}, {"id": 854, "type": "identifier", "text": "PortalType", "parent": 851, "children": [], "start_point": {"row": 174, "column": 48}, "end_point": {"row": 174, "column": 58}}, {"id": 855, "type": ">", "text": ">", "parent": 850, "children": [], "start_point": {"row": 174, "column": 58}, "end_point": {"row": 174, "column": 59}}, {"id": 856, "type": "identifier", "text": "rhs", "parent": 849, "children": [], "start_point": {"row": 174, "column": 67}, "end_point": {"row": 174, "column": 70}}, {"id": 857, "type": "return_statement", "text": "return lhs.Index - rhs.Index;", "parent": 825, "children": [858], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 176, "column": 31}}, {"id": 858, "type": "binary_expression", "text": "lhs.Index - rhs.Index", "parent": 857, "children": [859, 862, 863], "start_point": {"row": 176, "column": 9}, "end_point": {"row": 176, "column": 30}}, {"id": 859, "type": "field_expression", "text": "lhs.Index", "parent": 858, "children": [860, 861], "start_point": {"row": 176, "column": 9}, "end_point": {"row": 176, "column": 18}}, {"id": 860, "type": "identifier", "text": "lhs", "parent": 859, "children": [], "start_point": {"row": 176, "column": 9}, "end_point": {"row": 176, "column": 12}}, {"id": 861, "type": "field_identifier", "text": "Index", "parent": 859, "children": [], "start_point": {"row": 176, "column": 13}, "end_point": {"row": 176, "column": 18}}, {"id": 862, "type": "-", "text": "-", "parent": 858, "children": [], "start_point": {"row": 176, "column": 19}, "end_point": {"row": 176, "column": 20}}, {"id": 863, "type": "field_expression", "text": "rhs.Index", "parent": 858, "children": [864, 865], "start_point": {"row": 176, "column": 21}, "end_point": {"row": 176, "column": 30}}, {"id": 864, "type": "identifier", "text": "rhs", "parent": 863, "children": [], "start_point": {"row": 176, "column": 21}, "end_point": {"row": 176, "column": 24}}, {"id": 865, "type": "field_identifier", "text": "Index", "parent": 863, "children": [], "start_point": {"row": 176, "column": 25}, "end_point": {"row": 176, "column": 30}}, {"id": 866, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT", "parent": 18, "children": [867, 873, 874], "start_point": {"row": 179, "column": 0}, "end_point": {"row": 180, "column": 14}}, {"id": 867, "type": "binary_expression", "text": "template <typename PortalType", "parent": 866, "children": [868, 869, 870, 872], "start_point": {"row": 179, "column": 0}, "end_point": {"row": 179, "column": 29}}, {"id": 868, "type": "identifier", "text": "template", "parent": 867, "children": [], "start_point": {"row": 179, "column": 0}, "end_point": {"row": 179, "column": 8}}, {"id": 869, "type": "<", "text": "<", "parent": 867, "children": [], "start_point": {"row": 179, "column": 9}, "end_point": {"row": 179, "column": 10}}, {"id": 870, "type": "ERROR", "text": "typename", "parent": 867, "children": [871], "start_point": {"row": 179, "column": 10}, "end_point": {"row": 179, "column": 18}}, {"id": 871, "type": "identifier", "text": "typename", "parent": 870, "children": [], "start_point": {"row": 179, "column": 10}, "end_point": {"row": 179, "column": 18}}, {"id": 872, "type": "identifier", "text": "PortalType", "parent": 867, "children": [], "start_point": {"row": 179, "column": 19}, "end_point": {"row": 179, "column": 29}}, {"id": 873, "type": ">", "text": ">", "parent": 866, "children": [], "start_point": {"row": 179, "column": 29}, "end_point": {"row": 179, "column": 30}}, {"id": 874, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 866, "children": [], "start_point": {"row": 180, "column": 0}, "end_point": {"row": 180, "column": 14}}, {"id": 875, "type": "labeled_statement", "text": "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));", "parent": 18, "children": [876, 877], "start_point": {"row": 180, "column": 15}, "end_point": {"row": 185, "column": 56}}, {"id": 876, "type": "statement_identifier", "text": "vtkm", "parent": 875, "children": [], "start_point": {"row": 180, "column": 15}, "end_point": {"row": 180, "column": 19}}, {"id": 877, "type": "labeled_statement", "text": "cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));", "parent": 875, "children": [878, 879], "start_point": {"row": 180, "column": 21}, "end_point": {"row": 185, "column": 56}}, {"id": 878, "type": "statement_identifier", "text": "cont", "parent": 877, "children": [], "start_point": {"row": 180, "column": 21}, "end_point": {"row": 180, "column": 25}}, {"id": 879, "type": "labeled_statement", "text": "internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));", "parent": 877, "children": [880], "start_point": {"row": 180, "column": 27}, "end_point": {"row": 185, "column": 56}}, {"id": 880, "type": "statement_identifier", "text": "internal", "parent": 879, "children": [], "start_point": {"row": 180, "column": 27}, "end_point": {"row": 180, "column": 35}}, {"id": 881, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))", "parent": 879, "children": [882, 886, 887], "start_point": {"row": 180, "column": 37}, "end_point": {"row": 185, "column": 55}}, {"id": 882, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 881, "children": [883, 884, 885], "start_point": {"row": 180, "column": 37}, "end_point": {"row": 180, "column": 71}}, {"id": 883, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 882, "children": [], "start_point": {"row": 180, "column": 37}, "end_point": {"row": 180, "column": 60}}, {"id": 884, "type": "<", "text": "<", "parent": 882, "children": [], "start_point": {"row": 180, "column": 60}, "end_point": {"row": 180, "column": 61}}, {"id": 885, "type": "identifier", "text": "PortalType", "parent": 882, "children": [], "start_point": {"row": 180, "column": 61}, "end_point": {"row": 180, "column": 71}}, {"id": 886, "type": ">", "text": ">", "parent": 881, "children": [], "start_point": {"row": 180, "column": 71}, "end_point": {"row": 180, "column": 72}}, {"id": 887, "type": "binary_expression", "text": "operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))", "parent": 881, "children": [888, 889, 890], "start_point": {"row": 180, "column": 73}, "end_point": {"row": 185, "column": 55}}, {"id": 888, "type": "identifier", "text": "operator", "parent": 887, "children": [], "start_point": {"row": 180, "column": 73}, "end_point": {"row": 180, "column": 81}}, {"id": 889, "type": "+", "text": "+", "parent": 887, "children": [], "start_point": {"row": 180, "column": 81}, "end_point": {"row": 180, "column": 82}}, {"id": 890, "type": "compound_literal_expression", "text": "(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))", "parent": 887, "children": [891, 906, 908], "start_point": {"row": 180, "column": 82}, "end_point": {"row": 185, "column": 55}}, {"id": 891, "type": "ERROR", "text": "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t", "parent": 890, "children": [892, 893, 894, 895, 905], "start_point": {"row": 181, "column": 2}, "end_point": {"row": 182, "column": 16}}, {"id": 892, "type": "identifier", "text": "vtkm", "parent": 891, "children": [], "start_point": {"row": 181, "column": 2}, "end_point": {"row": 181, "column": 6}}, {"id": 893, "type": "identifier", "text": "cont", "parent": 891, "children": [], "start_point": {"row": 181, "column": 8}, "end_point": {"row": 181, "column": 12}}, {"id": 894, "type": "identifier", "text": "internal", "parent": 891, "children": [], "start_point": {"row": 181, "column": 14}, "end_point": {"row": 181, "column": 22}}, {"id": 895, "type": "comma_expression", "text": "IteratorFromArrayPortal<PortalType> const& iter,\n std", "parent": 891, "children": [896, 904], "start_point": {"row": 181, "column": 24}, "end_point": {"row": 182, "column": 5}}, {"id": 896, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& iter", "parent": 895, "children": [897, 903], "start_point": {"row": 181, "column": 24}, "end_point": {"row": 181, "column": 71}}, {"id": 897, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 896, "children": [898, 902], "start_point": {"row": 181, "column": 24}, "end_point": {"row": 181, "column": 65}}, {"id": 898, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 897, "children": [899, 900, 901], "start_point": {"row": 181, "column": 24}, "end_point": {"row": 181, "column": 58}}, {"id": 899, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 898, "children": [], "start_point": {"row": 181, "column": 24}, "end_point": {"row": 181, "column": 47}}, {"id": 900, "type": "<", "text": "<", "parent": 898, "children": [], "start_point": {"row": 181, "column": 47}, "end_point": {"row": 181, "column": 48}}, {"id": 901, "type": "identifier", "text": "PortalType", "parent": 898, "children": [], "start_point": {"row": 181, "column": 48}, "end_point": {"row": 181, "column": 58}}, {"id": 902, "type": ">", "text": ">", "parent": 897, "children": [], "start_point": {"row": 181, "column": 58}, "end_point": {"row": 181, "column": 59}}, {"id": 903, "type": "identifier", "text": "iter", "parent": 896, "children": [], "start_point": {"row": 181, "column": 67}, "end_point": {"row": 181, "column": 71}}, {"id": 904, "type": "identifier", "text": "std", "parent": 895, "children": [], "start_point": {"row": 182, "column": 2}, "end_point": {"row": 182, "column": 5}}, {"id": 905, "type": "primitive_type", "text": "ptrdiff_t", "parent": 891, "children": [], "start_point": {"row": 182, "column": 7}, "end_point": {"row": 182, "column": 16}}, {"id": 906, "type": "type_descriptor", "text": "n", "parent": 890, "children": [907], "start_point": {"row": 182, "column": 17}, "end_point": {"row": 182, "column": 18}}, {"id": 907, "type": "type_identifier", "text": "n", "parent": 906, "children": [], "start_point": {"row": 182, "column": 17}, "end_point": {"row": 182, "column": 18}}, {"id": 908, "type": "initializer_list", "text": "{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))", "parent": 890, "children": [909], "start_point": {"row": 183, "column": 0}, "end_point": {"row": 185, "column": 55}}, {"id": 909, "type": "initializer_pair", "text": "return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))", "parent": 908, "children": [910, 914], "start_point": {"row": 184, "column": 2}, "end_point": {"row": 185, "column": 55}}, {"id": 910, "type": "ERROR", "text": "vtkm::cont::internal:", "parent": 909, "children": [911, 912, 913], "start_point": {"row": 184, "column": 9}, "end_point": {"row": 184, "column": 30}}, {"id": 911, "type": "identifier", "text": "vtkm", "parent": 910, "children": [], "start_point": {"row": 184, "column": 9}, "end_point": {"row": 184, "column": 13}}, {"id": 912, "type": "identifier", "text": "cont", "parent": 910, "children": [], "start_point": {"row": 184, "column": 15}, "end_point": {"row": 184, "column": 19}}, {"id": 913, "type": "identifier", "text": "internal", "parent": 910, "children": [], "start_point": {"row": 184, "column": 21}, "end_point": {"row": 184, "column": 29}}, {"id": 914, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))", "parent": 909, "children": [915, 919, 920], "start_point": {"row": 184, "column": 31}, "end_point": {"row": 185, "column": 55}}, {"id": 915, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 914, "children": [916, 917, 918], "start_point": {"row": 184, "column": 31}, "end_point": {"row": 184, "column": 65}}, {"id": 916, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 915, "children": [], "start_point": {"row": 184, "column": 31}, "end_point": {"row": 184, "column": 54}}, {"id": 917, "type": "<", "text": "<", "parent": 915, "children": [], "start_point": {"row": 184, "column": 54}, "end_point": {"row": 184, "column": 55}}, {"id": 918, "type": "identifier", "text": "PortalType", "parent": 915, "children": [], "start_point": {"row": 184, "column": 55}, "end_point": {"row": 184, "column": 65}}, {"id": 919, "type": ">", "text": ">", "parent": 914, "children": [], "start_point": {"row": 184, "column": 65}, "end_point": {"row": 184, "column": 66}}, {"id": 920, "type": "parenthesized_expression", "text": "(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))", "parent": 914, "children": [921, 935], "start_point": {"row": 184, "column": 66}, "end_point": {"row": 185, "column": 55}}, {"id": 921, "type": "ERROR", "text": "iter.Portal, iter.Index + static_cast<vtkm::", "parent": 920, "children": [922], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 48}}, {"id": 922, "type": "comma_expression", "text": "iter.Portal, iter.Index + static_cast<vtkm", "parent": 921, "children": [923, 926], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 46}}, {"id": 923, "type": "field_expression", "text": "iter.Portal", "parent": 922, "children": [924, 925], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 15}}, {"id": 924, "type": "identifier", "text": "iter", "parent": 923, "children": [], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 8}}, {"id": 925, "type": "field_identifier", "text": "Portal", "parent": 923, "children": [], "start_point": {"row": 185, "column": 9}, "end_point": {"row": 185, "column": 15}}, {"id": 926, "type": "binary_expression", "text": "iter.Index + static_cast<vtkm", "parent": 922, "children": [927, 933, 934], "start_point": {"row": 185, "column": 17}, "end_point": {"row": 185, "column": 46}}, {"id": 927, "type": "binary_expression", "text": "iter.Index + static_cast", "parent": 926, "children": [928, 931, 932], "start_point": {"row": 185, "column": 17}, "end_point": {"row": 185, "column": 41}}, {"id": 928, "type": "field_expression", "text": "iter.Index", "parent": 927, "children": [929, 930], "start_point": {"row": 185, "column": 17}, "end_point": {"row": 185, "column": 27}}, {"id": 929, "type": "identifier", "text": "iter", "parent": 928, "children": [], "start_point": {"row": 185, "column": 17}, "end_point": {"row": 185, "column": 21}}, {"id": 930, "type": "field_identifier", "text": "Index", "parent": 928, "children": [], "start_point": {"row": 185, "column": 22}, "end_point": {"row": 185, "column": 27}}, {"id": 931, "type": "+", "text": "+", "parent": 927, "children": [], "start_point": {"row": 185, "column": 28}, "end_point": {"row": 185, "column": 29}}, {"id": 932, "type": "identifier", "text": "static_cast", "parent": 927, "children": [], "start_point": {"row": 185, "column": 30}, "end_point": {"row": 185, "column": 41}}, {"id": 933, "type": "<", "text": "<", "parent": 926, "children": [], "start_point": {"row": 185, "column": 41}, "end_point": {"row": 185, "column": 42}}, {"id": 934, "type": "identifier", "text": "vtkm", "parent": 926, "children": [], "start_point": {"row": 185, "column": 42}, "end_point": {"row": 185, "column": 46}}, {"id": 935, "type": "binary_expression", "text": "Id>(n)", "parent": 920, "children": [936, 937, 938], "start_point": {"row": 185, "column": 48}, "end_point": {"row": 185, "column": 54}}, {"id": 936, "type": "identifier", "text": "Id", "parent": 935, "children": [], "start_point": {"row": 185, "column": 48}, "end_point": {"row": 185, "column": 50}}, {"id": 937, "type": ">", "text": ">", "parent": 935, "children": [], "start_point": {"row": 185, "column": 50}, "end_point": {"row": 185, "column": 51}}, {"id": 938, "type": "parenthesized_expression", "text": "(n)", "parent": 935, "children": [939], "start_point": {"row": 185, "column": 51}, "end_point": {"row": 185, "column": 54}}, {"id": 939, "type": "identifier", "text": "n", "parent": 938, "children": [], "start_point": {"row": 185, "column": 52}, "end_point": {"row": 185, "column": 53}}, {"id": 940, "type": "binary_expression", "text": "template <typename PortalType>\nVTKM_EXEC_CONT", "parent": 15, "children": [941, 947, 948], "start_point": {"row": 188, "column": 0}, "end_point": {"row": 189, "column": 14}}, {"id": 941, "type": "binary_expression", "text": "template <typename PortalType", "parent": 940, "children": [942, 943, 944, 946], "start_point": {"row": 188, "column": 0}, "end_point": {"row": 188, "column": 29}}, {"id": 942, "type": "identifier", "text": "template", "parent": 941, "children": [], "start_point": {"row": 188, "column": 0}, "end_point": {"row": 188, "column": 8}}, {"id": 943, "type": "<", "text": "<", "parent": 941, "children": [], "start_point": {"row": 188, "column": 9}, "end_point": {"row": 188, "column": 10}}, {"id": 944, "type": "ERROR", "text": "typename", "parent": 941, "children": [945], "start_point": {"row": 188, "column": 10}, "end_point": {"row": 188, "column": 18}}, {"id": 945, "type": "identifier", "text": "typename", "parent": 944, "children": [], "start_point": {"row": 188, "column": 10}, "end_point": {"row": 188, "column": 18}}, {"id": 946, "type": "identifier", "text": "PortalType", "parent": 941, "children": [], "start_point": {"row": 188, "column": 19}, "end_point": {"row": 188, "column": 29}}, {"id": 947, "type": ">", "text": ">", "parent": 940, "children": [], "start_point": {"row": 188, "column": 29}, "end_point": {"row": 188, "column": 30}}, {"id": 948, "type": "identifier", "text": "VTKM_EXEC_CONT", "parent": 940, "children": [], "start_point": {"row": 189, "column": 0}, "end_point": {"row": 189, "column": 14}}, {"id": 949, "type": "labeled_statement", "text": "vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));", "parent": 15, "children": [950, 951], "start_point": {"row": 189, "column": 15}, "end_point": {"row": 194, "column": 56}}, {"id": 950, "type": "statement_identifier", "text": "vtkm", "parent": 949, "children": [], "start_point": {"row": 189, "column": 15}, "end_point": {"row": 189, "column": 19}}, {"id": 951, "type": "labeled_statement", "text": "cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));", "parent": 949, "children": [952, 953], "start_point": {"row": 189, "column": 21}, "end_point": {"row": 194, "column": 56}}, {"id": 952, "type": "statement_identifier", "text": "cont", "parent": 951, "children": [], "start_point": {"row": 189, "column": 21}, "end_point": {"row": 189, "column": 25}}, {"id": 953, "type": "labeled_statement", "text": "internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));", "parent": 951, "children": [954, 955, 982], "start_point": {"row": 189, "column": 27}, "end_point": {"row": 194, "column": 56}}, {"id": 954, "type": "statement_identifier", "text": "internal", "parent": 953, "children": [], "start_point": {"row": 189, "column": 27}, "end_point": {"row": 189, "column": 35}}, {"id": 955, "type": "ERROR", "text": ":IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{", "parent": 953, "children": [956], "start_point": {"row": 189, "column": 36}, "end_point": {"row": 192, "column": 1}}, {"id": 956, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)", "parent": 955, "children": [957, 961, 962], "start_point": {"row": 189, "column": 37}, "end_point": {"row": 191, "column": 72}}, {"id": 957, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 956, "children": [958, 959, 960], "start_point": {"row": 189, "column": 37}, "end_point": {"row": 189, "column": 71}}, {"id": 958, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 957, "children": [], "start_point": {"row": 189, "column": 37}, "end_point": {"row": 189, "column": 60}}, {"id": 959, "type": "<", "text": "<", "parent": 957, "children": [], "start_point": {"row": 189, "column": 60}, "end_point": {"row": 189, "column": 61}}, {"id": 960, "type": "identifier", "text": "PortalType", "parent": 957, "children": [], "start_point": {"row": 189, "column": 61}, "end_point": {"row": 189, "column": 71}}, {"id": 961, "type": ">", "text": ">", "parent": 956, "children": [], "start_point": {"row": 189, "column": 71}, "end_point": {"row": 189, "column": 72}}, {"id": 962, "type": "binary_expression", "text": "operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)", "parent": 956, "children": [963, 964, 965], "start_point": {"row": 189, "column": 73}, "end_point": {"row": 191, "column": 72}}, {"id": 963, "type": "identifier", "text": "operator", "parent": 962, "children": [], "start_point": {"row": 189, "column": 73}, "end_point": {"row": 189, "column": 81}}, {"id": 964, "type": "+", "text": "+", "parent": 962, "children": [], "start_point": {"row": 189, "column": 81}, "end_point": {"row": 189, "column": 82}}, {"id": 965, "type": "parenthesized_expression", "text": "(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)", "parent": 962, "children": [966, 974], "start_point": {"row": 189, "column": 82}, "end_point": {"row": 191, "column": 72}}, {"id": 966, "type": "ERROR", "text": "std::ptrdiff_t n,\n vtkm::cont::internal::", "parent": 965, "children": [967, 968, 969, 972, 973], "start_point": {"row": 190, "column": 2}, "end_point": {"row": 191, "column": 24}}, {"id": 967, "type": "identifier", "text": "std", "parent": 966, "children": [], "start_point": {"row": 190, "column": 2}, "end_point": {"row": 190, "column": 5}}, {"id": 968, "type": "primitive_type", "text": "ptrdiff_t", "parent": 966, "children": [], "start_point": {"row": 190, "column": 7}, "end_point": {"row": 190, "column": 16}}, {"id": 969, "type": "comma_expression", "text": "n,\n vtkm", "parent": 966, "children": [970, 971], "start_point": {"row": 190, "column": 17}, "end_point": {"row": 191, "column": 6}}, {"id": 970, "type": "identifier", "text": "n", "parent": 969, "children": [], "start_point": {"row": 190, "column": 17}, "end_point": {"row": 190, "column": 18}}, {"id": 971, "type": "identifier", "text": "vtkm", "parent": 969, "children": [], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 6}}, {"id": 972, "type": "identifier", "text": "cont", "parent": 966, "children": [], "start_point": {"row": 191, "column": 8}, "end_point": {"row": 191, "column": 12}}, {"id": 973, "type": "identifier", "text": "internal", "parent": 966, "children": [], "start_point": {"row": 191, "column": 14}, "end_point": {"row": 191, "column": 22}}, {"id": 974, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const& iter", "parent": 965, "children": [975, 981], "start_point": {"row": 191, "column": 24}, "end_point": {"row": 191, "column": 71}}, {"id": 975, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType> const", "parent": 974, "children": [976, 980], "start_point": {"row": 191, "column": 24}, "end_point": {"row": 191, "column": 65}}, {"id": 976, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 975, "children": [977, 978, 979], "start_point": {"row": 191, "column": 24}, "end_point": {"row": 191, "column": 58}}, {"id": 977, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 976, "children": [], "start_point": {"row": 191, "column": 24}, "end_point": {"row": 191, "column": 47}}, {"id": 978, "type": "<", "text": "<", "parent": 976, "children": [], "start_point": {"row": 191, "column": 47}, "end_point": {"row": 191, "column": 48}}, {"id": 979, "type": "identifier", "text": "PortalType", "parent": 976, "children": [], "start_point": {"row": 191, "column": 48}, "end_point": {"row": 191, "column": 58}}, {"id": 980, "type": ">", "text": ">", "parent": 975, "children": [], "start_point": {"row": 191, "column": 58}, "end_point": {"row": 191, "column": 59}}, {"id": 981, "type": "identifier", "text": "iter", "parent": 974, "children": [], "start_point": {"row": 191, "column": 67}, "end_point": {"row": 191, "column": 71}}, {"id": 982, "type": "return_statement", "text": "return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));", "parent": 953, "children": [983, 987], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 194, "column": 56}}, {"id": 983, "type": "ERROR", "text": "vtkm::cont::internal::", "parent": 982, "children": [984, 985, 986], "start_point": {"row": 193, "column": 9}, "end_point": {"row": 193, "column": 31}}, {"id": 984, "type": "identifier", "text": "vtkm", "parent": 983, "children": [], "start_point": {"row": 193, "column": 9}, "end_point": {"row": 193, "column": 13}}, {"id": 985, "type": "identifier", "text": "cont", "parent": 983, "children": [], "start_point": {"row": 193, "column": 15}, "end_point": {"row": 193, "column": 19}}, {"id": 986, "type": "identifier", "text": "internal", "parent": 983, "children": [], "start_point": {"row": 193, "column": 21}, "end_point": {"row": 193, "column": 29}}, {"id": 987, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))", "parent": 982, "children": [988, 992, 993], "start_point": {"row": 193, "column": 31}, "end_point": {"row": 194, "column": 55}}, {"id": 988, "type": "binary_expression", "text": "IteratorFromArrayPortal<PortalType", "parent": 987, "children": [989, 990, 991], "start_point": {"row": 193, "column": 31}, "end_point": {"row": 193, "column": 65}}, {"id": 989, "type": "identifier", "text": "IteratorFromArrayPortal", "parent": 988, "children": [], "start_point": {"row": 193, "column": 31}, "end_point": {"row": 193, "column": 54}}, {"id": 990, "type": "<", "text": "<", "parent": 988, "children": [], "start_point": {"row": 193, "column": 54}, "end_point": {"row": 193, "column": 55}}, {"id": 991, "type": "identifier", "text": "PortalType", "parent": 988, "children": [], "start_point": {"row": 193, "column": 55}, "end_point": {"row": 193, "column": 65}}, {"id": 992, "type": ">", "text": ">", "parent": 987, "children": [], "start_point": {"row": 193, "column": 65}, "end_point": {"row": 193, "column": 66}}, {"id": 993, "type": "parenthesized_expression", "text": "(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n))", "parent": 987, "children": [994, 1008], "start_point": {"row": 193, "column": 66}, "end_point": {"row": 194, "column": 55}}, {"id": 994, "type": "ERROR", "text": "iter.Portal, iter.Index + static_cast<vtkm::", "parent": 993, "children": [995], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 194, "column": 48}}, {"id": 995, "type": "comma_expression", "text": "iter.Portal, iter.Index + static_cast<vtkm", "parent": 994, "children": [996, 999], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 194, "column": 46}}, {"id": 996, "type": "field_expression", "text": "iter.Portal", "parent": 995, "children": [997, 998], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 194, "column": 15}}, {"id": 997, "type": "identifier", "text": "iter", "parent": 996, "children": [], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 194, "column": 8}}, {"id": 998, "type": "field_identifier", "text": "Portal", "parent": 996, "children": [], "start_point": {"row": 194, "column": 9}, "end_point": {"row": 194, "column": 15}}, {"id": 999, "type": "binary_expression", "text": "iter.Index + static_cast<vtkm", "parent": 995, "children": [1000, 1006, 1007], "start_point": {"row": 194, "column": 17}, "end_point": {"row": 194, "column": 46}}, {"id": 1000, "type": "binary_expression", "text": "iter.Index + static_cast", "parent": 999, "children": [1001, 1004, 1005], "start_point": {"row": 194, "column": 17}, "end_point": {"row": 194, "column": 41}}, {"id": 1001, "type": "field_expression", "text": "iter.Index", "parent": 1000, "children": [1002, 1003], "start_point": {"row": 194, "column": 17}, "end_point": {"row": 194, "column": 27}}, {"id": 1002, "type": "identifier", "text": "iter", "parent": 1001, "children": [], "start_point": {"row": 194, "column": 17}, "end_point": {"row": 194, "column": 21}}, {"id": 1003, "type": "field_identifier", "text": "Index", "parent": 1001, "children": [], "start_point": {"row": 194, "column": 22}, "end_point": {"row": 194, "column": 27}}, {"id": 1004, "type": "+", "text": "+", "parent": 1000, "children": [], "start_point": {"row": 194, "column": 28}, "end_point": {"row": 194, "column": 29}}, {"id": 1005, "type": "identifier", "text": "static_cast", "parent": 1000, "children": [], "start_point": {"row": 194, "column": 30}, "end_point": {"row": 194, "column": 41}}, {"id": 1006, "type": "<", "text": "<", "parent": 999, "children": [], "start_point": {"row": 194, "column": 41}, "end_point": {"row": 194, "column": 42}}, {"id": 1007, "type": "identifier", "text": "vtkm", "parent": 999, "children": [], "start_point": {"row": 194, "column": 42}, "end_point": {"row": 194, "column": 46}}, {"id": 1008, "type": "binary_expression", "text": "Id>(n)", "parent": 993, "children": [1009, 1010, 1011], "start_point": {"row": 194, "column": 48}, "end_point": {"row": 194, "column": 54}}, {"id": 1009, "type": "identifier", "text": "Id", "parent": 1008, "children": [], "start_point": {"row": 194, "column": 48}, "end_point": {"row": 194, "column": 50}}, {"id": 1010, "type": ">", "text": ">", "parent": 1008, "children": [], "start_point": {"row": 194, "column": 50}, "end_point": {"row": 194, "column": 51}}, {"id": 1011, "type": "parenthesized_expression", "text": "(n)", "parent": 1008, "children": [1012], "start_point": {"row": 194, "column": 51}, "end_point": {"row": 194, "column": 54}}, {"id": 1012, "type": "identifier", "text": "n", "parent": 1011, "children": [], "start_point": {"row": 194, "column": 52}, "end_point": {"row": 194, "column": 53}}, {"id": 1013, "type": "ERROR", "text": "}\n}\n}", "parent": 0, "children": [], "start_point": {"row": 196, "column": 0}, "end_point": {"row": 198, "column": 1}}, {"id": 1014, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 200, "column": 0}, "end_point": {"row": 200, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 18, 21, 128, 146, 151, 209], "variables": [33, 51, 65, 80, 88, 96, 107, 122, 125, 131, 134, 149, 154, 170, 212], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [25, 26, 41, 59, 74, 101, 111, 114, 115, 118, 141, 159, 162, 165, 166, 173, 176, 179, 182, 185, 190, 191, 196, 199, 202, 216, 219, 222, 223, 224, 225, 235, 238, 240, 241, 245, 246, 250, 253, 254, 258, 259, 260, 266, 271, 272, 278, 281, 284, 285, 290, 292, 293, 297, 298, 302, 305, 306, 312, 317, 318, 324, 327, 330, 331, 336, 341, 342, 343, 344, 345, 346, 347, 348, 349, 356, 358, 362, 369, 371, 372, 375, 376, 380, 381, 382, 396, 403, 405, 409, 416, 418, 419, 422, 423, 437, 443, 446, 449, 450, 451, 452, 462, 479, 482, 490, 491, 494, 495, 501, 502, 507, 510, 514, 515, 520, 521, 523, 524, 528, 529, 530, 542, 547, 548, 549, 550, 559, 560, 561, 568, 569, 573, 576, 577, 578, 590, 595, 596, 597, 598, 607, 608, 609, 616, 617, 621, 624, 625, 626, 638, 643, 644, 645, 646, 655, 656, 657, 664, 665, 669, 672, 673, 674, 686, 691, 692, 693, 694, 703, 704, 705, 712, 713, 717, 720, 721, 722, 734, 739, 740, 741, 742, 751, 752, 753, 760, 761, 765, 768, 769, 770, 782, 787, 788, 789, 790, 799, 800, 801, 808, 809, 813, 816, 817, 830, 832, 837, 838, 839, 840, 849, 850, 851, 858, 859, 863, 866, 867, 881, 882, 887, 890, 895, 896, 897, 898, 914, 915, 920, 922, 923, 926, 927, 928, 935, 938, 940, 941, 956, 957, 962, 965, 969, 974, 975, 976, 987, 988, 993, 995, 996, 999, 1000, 1001, 1008, 1011], "assignments": [338, 357, 393, 404], "loops": [], "conditionals": [0, 1, 2, 5, 16, 17, 19, 20, 22, 23, 27, 29, 31, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 57, 58, 60, 62, 66, 68, 70, 72, 75, 77, 79, 81, 83, 85, 89, 91, 94, 95, 97, 99, 102, 104, 108, 109, 112, 116, 119, 123, 124, 126, 129, 132, 133, 135, 136, 137, 142, 144, 147, 150, 152, 155, 160, 163, 167, 168, 171, 172, 174, 180, 183, 184, 186, 187, 188, 189, 192, 193, 197, 200, 201, 203, 204, 205, 206, 208, 213, 214, 217, 220, 221, 226, 227, 229, 231, 233, 236, 237, 239, 242, 247, 248, 251, 255, 256, 261, 262, 263, 268, 269, 270, 273, 276, 279, 282, 283, 286, 287, 289, 291, 294, 299, 300, 303, 307, 308, 314, 315, 316, 319, 322, 325, 328, 329, 332, 333, 335, 337, 339, 351, 353, 359, 360, 363, 365, 367, 370, 373, 377, 378, 383, 384, 385, 389, 391, 392, 394, 398, 400, 406, 407, 410, 412, 414, 417, 420, 424, 425, 430, 432, 433, 434, 439, 441, 444, 447, 448, 453, 454, 456, 458, 460, 463, 464, 465, 466, 467, 468, 469, 471, 474, 475, 477, 480, 483, 484, 486, 488, 492, 496, 498, 500, 503, 505, 508, 511, 512, 516, 518, 522, 525, 526, 531, 534, 535, 538, 539, 540, 544, 545, 546, 551, 553, 555, 556, 557, 558, 562, 564, 566, 570, 571, 574, 575, 579, 582, 583, 586, 587, 588, 592, 593, 594, 599, 601, 603, 604, 605, 606, 610, 612, 614, 618, 619, 622, 623, 627, 630, 631, 634, 635, 636, 640, 641, 642, 647, 649, 651, 652, 653, 654, 658, 660, 662, 666, 667, 670, 671, 675, 678, 679, 682, 683, 684, 688, 689, 690, 695, 697, 699, 700, 701, 702, 706, 708, 710, 714, 715, 718, 719, 723, 726, 727, 730, 731, 732, 736, 737, 738, 743, 745, 747, 748, 749, 750, 754, 756, 758, 762, 763, 766, 767, 771, 774, 775, 778, 779, 780, 784, 785, 786, 791, 793, 795, 796, 797, 798, 802, 804, 806, 810, 811, 814, 815, 818, 821, 822, 824, 826, 829, 834, 835, 836, 841, 843, 845, 846, 847, 848, 852, 854, 856, 860, 861, 864, 865, 868, 871, 872, 874, 876, 878, 880, 883, 885, 888, 892, 893, 894, 899, 901, 903, 904, 907, 911, 912, 913, 916, 918, 924, 925, 929, 930, 932, 934, 936, 939, 942, 945, 946, 948, 950, 952, 954, 958, 960, 963, 967, 970, 971, 972, 973, 977, 979, 981, 984, 985, 986, 989, 991, 997, 998, 1002, 1003, 1005, 1007, 1009, 1012, 1014], "returns": [178, 195, 215, 265, 277, 311, 323, 513, 567, 615, 663, 711, 759, 807, 857, 982], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 121, 140, 158, 310, 427, 493], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "IteratorFromArrayPortal", "text_snippet": "namespace vtkm\n{\nnamespace cont\n{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass Itera"}, {"node_id": 18, "universal_type": "function", "name": "IteratorFromArrayPortal", "text_snippet": "namespace cont\n{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPorta"}, {"node_id": 21, "universal_type": "function", "name": "IteratorFromArrayPortal", "text_snippet": "namespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n usi"}, {"node_id": 128, "universal_type": "function", "name": "unknown", "text_snippet": "IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index"}, {"node_id": 146, "universal_type": "function", "name": "unknown", "text_snippet": "Index(index)"}, {"node_id": 151, "universal_type": "function", "name": "unknown", "text_snippet": "VTKM_ASSERT(index >= 0)"}, {"node_id": 209, "universal_type": "function", "name": "unknown", "text_snippet": "[](difference_type idx)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <vtkm/Assert.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <vtkm/cont/ArrayPortal.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <vtkm/internal/ArrayPortalValueReference.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "//============================================================================\n// Copyright (c) Kitware, Inc.\n// All rights reserved.\n// See LICENSE.txt for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//============================================================================\n#ifndef vtk_m_cont_internal_IteratorFromArrayPortal_h\n#define vtk_m_cont_internal_IteratorFromArrayPortal_h\n\n#include <vtkm/Assert.h>\n#include <vtkm/cont/ArrayPortal.h>\n#include <vtkm/internal/ArrayPortalValueReference.h>\n\nnamespace vtkm\n{\nnamespace cont\n{\nnamespace internal\n{\n\ntemplate <class ArrayPortalType>\nclass IteratorFromArrayPortal\n{\npublic:\n using value_type = typename std::remove_const<typename ArrayPortalType::ValueType>::type;\n using reference = vtkm::internal::ArrayPortalValueReference<ArrayPortalType>;\n using pointer = typename std::add_pointer<value_type>::type;\n\n using difference_type = std::ptrdiff_t;\n\n using iterator_category = std::random_access_iterator_tag;\n\n using iter = IteratorFromArrayPortal<ArrayPortalType>;\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n IteratorFromArrayPortal()\n : Portal()\n , Index(0)\n {\n }\n\n VTKM_SUPPRESS_EXEC_WARNINGS\n VTKM_EXEC_CONT\n explicit IteratorFromArrayPortal(const ArrayPortalType& portal, vtkm::Id index = 0)\n : Portal(portal)\n , Index(index)\n {\n VTKM_ASSERT(index >= 0);\n VTKM_ASSERT(index <= portal.GetNumberOfValues());\n }\n\n VTKM_EXEC_CONT\n reference operator*() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator->() const { return reference(this->Portal, this->Index); }\n\n VTKM_EXEC_CONT\n reference operator[](difference_type idx) const\n {\n return reference(this->Portal, this->Index + static_cast<vtkm::Id>(idx));\n }\n\n VTKM_EXEC_CONT\n iter& operator++()\n {\n this->Index++;\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator++(int) { return iter(this->Portal, this->Index++); }\n\n VTKM_EXEC_CONT\n iter& operator--()\n {\n this->Index--;\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator--(int) { return iter(this->Portal, this->Index--); }\n\n VTKM_EXEC_CONT\n iter& operator+=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index <= this->Portal.GetNumberOfValues());\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter& operator-=(difference_type n)\n {\n this->Index += static_cast<vtkm::Id>(n);\n VTKM_ASSERT(this->Index >= 0);\n return *this;\n }\n\n VTKM_EXEC_CONT\n iter operator-(difference_type n) const\n {\n return iter(this->Portal, this->Index - static_cast<vtkm::Id>(n));\n }\n\n ArrayPortalType Portal;\n vtkm::Id Index;\n};\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorBegin(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, 0);\n}\n\ntemplate <class ArrayPortalType>\nVTKM_EXEC_CONT IteratorFromArrayPortal<ArrayPortalType> make_IteratorEnd(\n const ArrayPortalType& portal)\n{\n return IteratorFromArrayPortal<ArrayPortalType>(portal, portal.GetNumberOfValues());\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator==(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index == rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator!=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index != rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index < rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator<=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index <= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index > rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT bool operator>=(vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index >= rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT std::ptrdiff_t operator-(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& lhs,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& rhs)\n{\n return lhs.Index - rhs.Index;\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter,\n std::ptrdiff_t n)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}\n\ntemplate <typename PortalType>\nVTKM_EXEC_CONT vtkm::cont::internal::IteratorFromArrayPortal<PortalType> operator+(\n std::ptrdiff_t n,\n vtkm::cont::internal::IteratorFromArrayPortal<PortalType> const& iter)\n{\n return vtkm::cont::internal::IteratorFromArrayPortal<PortalType>(\n iter.Portal, iter.Index + static_cast<vtkm::Id>(n));\n}\n}\n}\n} // namespace vtkm::cont::internal\n\n#endif //vtk_m_cont_internal_IteratorFromArrayPortal_h\n"}
362
c
#include<stdio.h> int main(){ int x,i,j,k; for(x=100;x<1000;x++){ i=x/100; j=(x-i*100)/10; k=(x-i*100-j*10); if(x==i*i*i+j*j*j+k*k*k){ printf("%d\n",x); } } }
13.67
12
(translation_unit) "#include<stdio.h> \n\nint main(){\n int x,i,j,k;\n for(x=100;x<1000;x++){\n i=x/100;\n j=(x-i*100)/10;\n k=(x-i*100-j*10);\n if(x==i*i*i+j*j*j+k*k*k){\n printf("%d\n",x);\n }\n }\n}\n" (preproc_include) "#include<stdio.h>" (#include) "#include" (system_lib_string) "<stdio.h>" (function_definition) "int main(){\n int x,i,j,k;\n for(x=100;x<1000;x++){\n i=x/100;\n j=(x-i*100)/10;\n k=(x-i*100-j*10);\n if(x==i*i*i+j*j*j+k*k*k){\n printf("%d\n",x);\n }\n }\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n int x,i,j,k;\n for(x=100;x<1000;x++){\n i=x/100;\n j=(x-i*100)/10;\n k=(x-i*100-j*10);\n if(x==i*i*i+j*j*j+k*k*k){\n printf("%d\n",x);\n }\n }\n}" ({) "{" (declaration) "int x,i,j,k;" (primitive_type) "int" (identifier) "x" (,) "," (identifier) "i" (,) "," (identifier) "j" (,) "," (identifier) "k" (;) ";" (for_statement) "for(x=100;x<1000;x++){\n i=x/100;\n j=(x-i*100)/10;\n k=(x-i*100-j*10);\n if(x==i*i*i+j*j*j+k*k*k){\n printf("%d\n",x);\n }\n }" (for) "for" (() "(" (assignment_expression) "x=100" (identifier) "x" (=) "=" (number_literal) "100" (;) ";" (binary_expression) "x<1000" (identifier) "x" (<) "<" (number_literal) "1000" (;) ";" (update_expression) "x++" (identifier) "x" (++) "++" ()) ")" (compound_statement) "{\n i=x/100;\n j=(x-i*100)/10;\n k=(x-i*100-j*10);\n if(x==i*i*i+j*j*j+k*k*k){\n printf("%d\n",x);\n }\n }" ({) "{" (expression_statement) "i=x/100;" (assignment_expression) "i=x/100" (identifier) "i" (=) "=" (binary_expression) "x/100" (identifier) "x" (/) "/" (number_literal) "100" (;) ";" (expression_statement) "j=(x-i*100)/10;" (assignment_expression) "j=(x-i*100)/10" (identifier) "j" (=) "=" (binary_expression) "(x-i*100)/10" (parenthesized_expression) "(x-i*100)" (() "(" (binary_expression) "x-i*100" (identifier) "x" (-) "-" (binary_expression) "i*100" (identifier) "i" (*) "*" (number_literal) "100" ()) ")" (/) "/" (number_literal) "10" (;) ";" (expression_statement) "k=(x-i*100-j*10);" (assignment_expression) "k=(x-i*100-j*10)" (identifier) "k" (=) "=" (parenthesized_expression) "(x-i*100-j*10)" (() "(" (binary_expression) "x-i*100-j*10" (binary_expression) "x-i*100" (identifier) "x" (-) "-" (binary_expression) "i*100" (identifier) "i" (*) "*" (number_literal) "100" (-) "-" (binary_expression) "j*10" (identifier) "j" (*) "*" (number_literal) "10" ()) ")" (;) ";" (if_statement) "if(x==i*i*i+j*j*j+k*k*k){\n printf("%d\n",x);\n }" (if) "if" (parenthesized_expression) "(x==i*i*i+j*j*j+k*k*k)" (() "(" (binary_expression) "x==i*i*i+j*j*j+k*k*k" (identifier) "x" (==) "==" (binary_expression) "i*i*i+j*j*j+k*k*k" (binary_expression) "i*i*i+j*j*j" (binary_expression) "i*i*i" (binary_expression) "i*i" (identifier) "i" (*) "*" (identifier) "i" (*) "*" (identifier) "i" (+) "+" (binary_expression) "j*j*j" (binary_expression) "j*j" (identifier) "j" (*) "*" (identifier) "j" (*) "*" (identifier) "j" (+) "+" (binary_expression) "k*k*k" (binary_expression) "k*k" (identifier) "k" (*) "*" (identifier) "k" (*) "*" (identifier) "k" ()) ")" (compound_statement) "{\n printf("%d\n",x);\n }" ({) "{" (expression_statement) "printf("%d\n",x);" (call_expression) "printf("%d\n",x)" (identifier) "printf" (argument_list) "("%d\n",x)" (() "(" (string_literal) ""%d\n"" (") """ (string_content) "%d" (escape_sequence) "\n" (") """ (,) "," (identifier) "x" ()) ")" (;) ";" (}) "}" (}) "}" (}) "}"
142
0
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 13.67, "nodes": 100, "errors": 0, "source_hash": "d2254052e35ddef3c3022e0dd0128b5b7401a3938d9d7353a626fac10d2946d9", "categorized_nodes": 72}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<stdio.h>", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 17}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 17}}, {"id": 3, "type": "function_definition", "text": "int main(){\n\tint x,i,j,k;\n\tfor(x=100;x<1000;x++){\n\t\ti=x/100;\n\t\tj=(x-i*100)/10;\n\t\tk=(x-i*100-j*10);\n\t\tif(x==i*i*i+j*j*j+k*k*k){\n\t\t\tprintf(\"%d\\n\",x);\n\t\t}\n\t}\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": 0}, "end_point": {"row": 2, "column": 3}}, {"id": 5, "type": "function_declarator", "text": "main()", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 4}, "end_point": {"row": 2, "column": 10}}, {"id": 6, "type": "identifier", "text": "main", "parent": 5, "children": [], "start_point": {"row": 2, "column": 4}, "end_point": {"row": 2, "column": 8}}, {"id": 7, "type": "parameter_list", "text": "()", "parent": 5, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 10}}, {"id": 8, "type": "declaration", "text": "int x,i,j,k;", "parent": 3, "children": [9, 10, 11, 12, 13], "start_point": {"row": 3, "column": 1}, "end_point": {"row": 3, "column": 13}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 3, "column": 1}, "end_point": {"row": 3, "column": 4}}, {"id": 10, "type": "identifier", "text": "x", "parent": 8, "children": [], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 6}}, {"id": 11, "type": "identifier", "text": "i", "parent": 8, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 8}}, {"id": 12, "type": "identifier", "text": "j", "parent": 8, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 10}}, {"id": 13, "type": "identifier", "text": "k", "parent": 8, "children": [], "start_point": {"row": 3, "column": 11}, "end_point": {"row": 3, "column": 12}}, {"id": 14, "type": "for_statement", "text": "for(x=100;x<1000;x++){\n\t\ti=x/100;\n\t\tj=(x-i*100)/10;\n\t\tk=(x-i*100-j*10);\n\t\tif(x==i*i*i+j*j*j+k*k*k){\n\t\t\tprintf(\"%d\\n\",x);\n\t\t}\n\t}", "parent": 3, "children": [15, 19, 23], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 11, "column": 2}}, {"id": 15, "type": "assignment_expression", "text": "x=100", "parent": 14, "children": [16, 17, 18], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 10}}, {"id": 16, "type": "identifier", "text": "x", "parent": 15, "children": [], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 6}}, {"id": 17, "type": "=", "text": "=", "parent": 15, "children": [], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 7}}, {"id": 18, "type": "number_literal", "text": "100", "parent": 15, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 10}}, {"id": 19, "type": "binary_expression", "text": "x<1000", "parent": 14, "children": [20, 21, 22], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 17}}, {"id": 20, "type": "identifier", "text": "x", "parent": 19, "children": [], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 12}}, {"id": 21, "type": "<", "text": "<", "parent": 19, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 13}}, {"id": 22, "type": "number_literal", "text": "1000", "parent": 19, "children": [], "start_point": {"row": 4, "column": 13}, "end_point": {"row": 4, "column": 17}}, {"id": 23, "type": "update_expression", "text": "x++", "parent": 14, "children": [24, 25], "start_point": {"row": 4, "column": 18}, "end_point": {"row": 4, "column": 21}}, {"id": 24, "type": "identifier", "text": "x", "parent": 23, "children": [], "start_point": {"row": 4, "column": 18}, "end_point": {"row": 4, "column": 19}}, {"id": 25, "type": "++", "text": "++", "parent": 23, "children": [], "start_point": {"row": 4, "column": 19}, "end_point": {"row": 4, "column": 21}}, {"id": 26, "type": "assignment_expression", "text": "i=x/100", "parent": 14, "children": [27, 28, 29], "start_point": {"row": 5, "column": 2}, "end_point": {"row": 5, "column": 9}}, {"id": 27, "type": "identifier", "text": "i", "parent": 26, "children": [], "start_point": {"row": 5, "column": 2}, "end_point": {"row": 5, "column": 3}}, {"id": 28, "type": "=", "text": "=", "parent": 26, "children": [], "start_point": {"row": 5, "column": 3}, "end_point": {"row": 5, "column": 4}}, {"id": 29, "type": "binary_expression", "text": "x/100", "parent": 26, "children": [30, 31, 32], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 9}}, {"id": 30, "type": "identifier", "text": "x", "parent": 29, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 5}}, {"id": 31, "type": "/", "text": "/", "parent": 29, "children": [], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 6}}, {"id": 32, "type": "number_literal", "text": "100", "parent": 29, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 9}}, {"id": 33, "type": "assignment_expression", "text": "j=(x-i*100)/10", "parent": 14, "children": [34, 35, 36], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 16}}, {"id": 34, "type": "identifier", "text": "j", "parent": 33, "children": [], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 3}}, {"id": 35, "type": "=", "text": "=", "parent": 33, "children": [], "start_point": {"row": 6, "column": 3}, "end_point": {"row": 6, "column": 4}}, {"id": 36, "type": "binary_expression", "text": "(x-i*100)/10", "parent": 33, "children": [37, 45, 46], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 16}}, {"id": 37, "type": "parenthesized_expression", "text": "(x-i*100)", "parent": 36, "children": [38], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 13}}, {"id": 38, "type": "binary_expression", "text": "x-i*100", "parent": 37, "children": [39, 40, 41], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 12}}, {"id": 39, "type": "identifier", "text": "x", "parent": 38, "children": [], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 6}}, {"id": 40, "type": "-", "text": "-", "parent": 38, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 7}}, {"id": 41, "type": "binary_expression", "text": "i*100", "parent": 38, "children": [42, 43, 44], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 12}}, {"id": 42, "type": "identifier", "text": "i", "parent": 41, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 8}}, {"id": 43, "type": "*", "text": "*", "parent": 41, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 9}}, {"id": 44, "type": "number_literal", "text": "100", "parent": 41, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 12}}, {"id": 45, "type": "/", "text": "/", "parent": 36, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 14}}, {"id": 46, "type": "number_literal", "text": "10", "parent": 36, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 16}}, {"id": 47, "type": "assignment_expression", "text": "k=(x-i*100-j*10)", "parent": 14, "children": [48, 49, 50], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 18}}, {"id": 48, "type": "identifier", "text": "k", "parent": 47, "children": [], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 3}}, {"id": 49, "type": "=", "text": "=", "parent": 47, "children": [], "start_point": {"row": 7, "column": 3}, "end_point": {"row": 7, "column": 4}}, {"id": 50, "type": "parenthesized_expression", "text": "(x-i*100-j*10)", "parent": 47, "children": [51], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 18}}, {"id": 51, "type": "binary_expression", "text": "x-i*100-j*10", "parent": 50, "children": [52, 59, 60], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 17}}, {"id": 52, "type": "binary_expression", "text": "x-i*100", "parent": 51, "children": [53, 54, 55], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 12}}, {"id": 53, "type": "identifier", "text": "x", "parent": 52, "children": [], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 6}}, {"id": 54, "type": "-", "text": "-", "parent": 52, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 7}}, {"id": 55, "type": "binary_expression", "text": "i*100", "parent": 52, "children": [56, 57, 58], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 12}}, {"id": 56, "type": "identifier", "text": "i", "parent": 55, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 8}}, {"id": 57, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 9}}, {"id": 58, "type": "number_literal", "text": "100", "parent": 55, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 12}}, {"id": 59, "type": "-", "text": "-", "parent": 51, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 13}}, {"id": 60, "type": "binary_expression", "text": "j*10", "parent": 51, "children": [61, 62, 63], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 17}}, {"id": 61, "type": "identifier", "text": "j", "parent": 60, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 14}}, {"id": 62, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 15}}, {"id": 63, "type": "number_literal", "text": "10", "parent": 60, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 17}}, {"id": 64, "type": "if_statement", "text": "if(x==i*i*i+j*j*j+k*k*k){\n\t\t\tprintf(\"%d\\n\",x);\n\t\t}", "parent": 14, "children": [65], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 10, "column": 3}}, {"id": 65, "type": "parenthesized_expression", "text": "(x==i*i*i+j*j*j+k*k*k)", "parent": 64, "children": [66], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 26}}, {"id": 66, "type": "binary_expression", "text": "x==i*i*i+j*j*j+k*k*k", "parent": 65, "children": [67, 68, 69], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 25}}, {"id": 67, "type": "identifier", "text": "x", "parent": 66, "children": [], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 6}}, {"id": 68, "type": "==", "text": "==", "parent": 66, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 8}}, {"id": 69, "type": "binary_expression", "text": "i*i*i+j*j*j+k*k*k", "parent": 66, "children": [70, 86, 87], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 25}}, {"id": 70, "type": "binary_expression", "text": "i*i*i+j*j*j", "parent": 69, "children": [71, 78, 79], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 19}}, {"id": 71, "type": "binary_expression", "text": "i*i*i", "parent": 70, "children": [72, 76, 77], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 13}}, {"id": 72, "type": "binary_expression", "text": "i*i", "parent": 71, "children": [73, 74, 75], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 11}}, {"id": 73, "type": "identifier", "text": "i", "parent": 72, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 9}}, {"id": 74, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 10}}, {"id": 75, "type": "identifier", "text": "i", "parent": 72, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 11}}, {"id": 76, "type": "*", "text": "*", "parent": 71, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 12}}, {"id": 77, "type": "identifier", "text": "i", "parent": 71, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 13}}, {"id": 78, "type": "+", "text": "+", "parent": 70, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 14}}, {"id": 79, "type": "binary_expression", "text": "j*j*j", "parent": 70, "children": [80, 84, 85], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 19}}, {"id": 80, "type": "binary_expression", "text": "j*j", "parent": 79, "children": [81, 82, 83], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 17}}, {"id": 81, "type": "identifier", "text": "j", "parent": 80, "children": [], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 15}}, {"id": 82, "type": "*", "text": "*", "parent": 80, "children": [], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 16}}, {"id": 83, "type": "identifier", "text": "j", "parent": 80, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 17}}, {"id": 84, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 18}}, {"id": 85, "type": "identifier", "text": "j", "parent": 79, "children": [], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 19}}, {"id": 86, "type": "+", "text": "+", "parent": 69, "children": [], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 20}}, {"id": 87, "type": "binary_expression", "text": "k*k*k", "parent": 69, "children": [88, 92, 93], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 25}}, {"id": 88, "type": "binary_expression", "text": "k*k", "parent": 87, "children": [89, 90, 91], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 23}}, {"id": 89, "type": "identifier", "text": "k", "parent": 88, "children": [], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 21}}, {"id": 90, "type": "*", "text": "*", "parent": 88, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 22}}, {"id": 91, "type": "identifier", "text": "k", "parent": 88, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 23}}, {"id": 92, "type": "*", "text": "*", "parent": 87, "children": [], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 24}}, {"id": 93, "type": "identifier", "text": "k", "parent": 87, "children": [], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 25}}, {"id": 94, "type": "call_expression", "text": "printf(\"%d\\n\",x)", "parent": 64, "children": [95, 96], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 9, "column": 19}}, {"id": 95, "type": "identifier", "text": "printf", "parent": 94, "children": [], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 9, "column": 9}}, {"id": 96, "type": "argument_list", "text": "(\"%d\\n\",x)", "parent": 94, "children": [97, 99], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 19}}, {"id": 97, "type": "string_literal", "text": "\"%d\\n\"", "parent": 96, "children": [98], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 16}}, {"id": 98, "type": "escape_sequence", "text": "\\n", "parent": 97, "children": [], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 15}}, {"id": 99, "type": "identifier", "text": "x", "parent": 96, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 18}}]}, "node_categories": {"declarations": {"functions": [3, 5], "variables": [8], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [19, 23, 29, 36, 37, 38, 41, 50, 51, 52, 55, 60, 65, 66, 69, 70, 71, 72, 79, 80, 87, 88, 94], "assignments": [15, 26, 33, 47], "loops": [14], "conditionals": [6, 10, 11, 12, 13, 16, 20, 24, 27, 30, 34, 39, 42, 48, 53, 56, 61, 64, 67, 73, 75, 77, 81, 83, 85, 89, 91, 93, 95, 99], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 18, 22, 32, 44, 46, 58, 63, 97], "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 x,i,j,k;\n\tfor(x=100;x<1000;x++){\n\t\ti=x/100;\n\t\tj=(x-i*100)/10;\n\t\tk=(x-i*100-j*10);\n\t"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include<stdio.h>"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include<stdio.h> \n\nint main(){\n\tint x,i,j,k;\n\tfor(x=100;x<1000;x++){\n\t\ti=x/100;\n\t\tj=(x-i*100)/10;\n\t\tk=(x-i*100-j*10);\n\t\tif(x==i*i*i+j*j*j+k*k*k){\n\t\t\tprintf(\"%d\\n\",x);\n\t\t}\n\t}\n}\n"}
363
c
// // YCBaseModel.h // YCTestDemo // // Created by 陈煜钏 on 2017/1/19. // Copyright © 2017年 陈煜钏. All rights reserved. // #import <Foundation/Foundation.h> //protocol #import "YCModelProtocol.h" @interface YCBaseModel : NSObject <YCModelProtocol, NSCoding> + (instancetype)modelWithJSONDictionary:(NSDictionary *)JSONDictionary; + (instancetype)modelWithDictionary:(NSDictionary *)dictionary; - (NSDictionary *)JSONDictionary; - (NSArray *)propertiesNameArray; @end
28.19
16
(translation_unit) "//\n// YCBaseModel.h\n// YCTestDemo\n//\n// Created by 陈煜钏 on 2017/1/19.\n// Copyright © 2017年 陈煜钏. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n//protocol\n#import "YCModelProtocol.h"\n\n@interface YCBaseModel : NSObject <YCModelProtocol, NSCoding>\n\n+ (instancetype)modelWithJSONDictionary:(NSDictionary *)JSONDictionary;\n\n+ (instancetype)modelWithDictionary:(NSDictionary *)dictionary;\n\n- (NSDictionary *)JSONDictionary;\n\n- (NSArray *)propertiesNameArray;\n\n@end\n" (comment) "//" (comment) "// YCBaseModel.h" (comment) "// YCTestDemo" (comment) "//" (comment) "// Created by 陈煜钏 on 2017/1/19.\n// C" (comment) "pyright © 2017年 陈煜钏. All rights reserved.\n//\n\n#import <F" (comment) "un" (preproc_call) "tion/Foundation.h>\n\n//protocol\n#im" (preproc_directive) "tion/Fo" (preproc_arg) "ndation.h>\n\n//protocol\n#i" (comment) "ort "YCMod" (preproc_call) "lProtocol.h"\n\n@interface YCB" (preproc_directive) "lProtoc" (preproc_arg) "l.h"\n\n@interface YC" (ERROR) "seModel : NSObject <YCModelProtocol, NSCoding>\n\n+ (instancetype)modelWithJSONDictionary:(NSDictionary *)JSONDictionary;\n\n+ (instancet" (ERROR) "s" (type_identifier) "eModel : " (ERROR) "SObject <YCModelProtocol" (identifier) "SObject <YC" (:) "o" (identifier) "elProtoc" (<) "l" (identifier) ", NSCoding>\n\n+ " (,) "(" (identifier) "nstancet" (>) "y" (unary_expression) ")modelWithJSONDictionary:(NSDictionary " (+) ")" (cast_expression) "odelWithJSONDictionary:(NSDictionary " (() "o" (type_descriptor) "delWithJSOND" (type_identifier) "delWithJSOND" ()) "i" (identifier) "ctionary:(NSDictionary " (:) "*" (() ")" (binary_expression) "JSONDictionary;\n\n+ (instancet" (identifier) "JSONDictiona" (*) "y" (ERROR) ";" ()) ";" (identifier) "\n\n+ (instancet" (expression_statement) "y" (;) "y" (expression_statement) ")modelWithDictionary:(NSDictionary *)dictionary;\n\n- (NSDictiona" (update_expression) ")modelWithDictionary:(NSDictionary *)dictionary;\n\n- (NSDiction" (binary_expression) ")modelWithDictionary:(NSDictionary *)dictionary;\n\n- (NSDiction" (unary_expression) ")modelWithDictionary:(NSDictionary " (+) ")" (cast_expression) "odelWithDictionary:(NSDictionary " (() "o" (type_descriptor) "delWithDicti" (type_identifier) "delWithDicti" ()) "o" (identifier) "nary:(NSDictionary " (ERROR) "*)dictionary;\n" (:) "*" (() ")" (identifier) "dictionary;\n" (*) "-" (ERROR) " " ()) " " (identifier) "(NSDiction" (--) "" (;) "a" (expression_statement) " *)JSONDictionary;\n\n- (NSArray *)" (unary_expression) " *)JSONDictionary;\n\n- (NSArray *" (-) " " (cast_expression) ")JSONDictionary;\n\n- (NSArray *" (() ")" (type_descriptor) "JSONDictionary" (type_identifier) "JSONDictiona" (abstract_pointer_declarator) "y" (*) "y" ()) ";" (identifier) "\n\n- (NSArray *" (;) ")" (expression_statement) "opertiesNameArray;\n\n@end\n" (unary_expression) "opertiesNameArray;\n\n@end\n" (-) "o" (cast_expression) "ertiesNameArray;\n\n@end\n" (() "e" (type_descriptor) "rtiesName" (type_identifier) "rtiesNa" (abstract_pointer_declarator) "e" (*) "e" ()) "A" (identifier) "rray;\n\n@end\n" (;) "" (ERROR) "" (ERROR) "" (expression_statement) "" (identifier) "" (;) ""
95
8
{"language": "c", "success": true, "metadata": {"lines": 16, "avg_line_length": 28.19, "nodes": 57, "errors": 0, "source_hash": "764315f4571f2e05144a31d22af8c375eff326e90a222c05dd2fa1827d15a18f", "categorized_nodes": 31}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "tion/Foundation.h>\n\n//protocol\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": "tion/Fo", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "ndation.h>\n\n//protocol\n#i", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "preproc_call", "text": "lProtocol.h\"\n\n@interface YCB", "parent": null, "children": [4, 5], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": "lProtoc", "parent": 3, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "l.h\"\n\n@interface YC", "parent": 3, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 27}}, {"id": 6, "type": "ERROR", "text": "seModel : NSObject <YCModelProtocol, NSCoding>\n\n+ (instancetype)modelWithJSONDictionary:(NSDictionary *)JSONDictionary;\n\n+ (instancet", "parent": null, "children": [7, 8, 9, 13, 14, 15, 16, 21], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 15, "column": 70}}, {"id": 7, "type": "ERROR", "text": "s", "parent": 6, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 8, "type": "type_identifier", "text": "eModel : ", "parent": 6, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 10}}, {"id": 9, "type": "ERROR", "text": "SObject <YCModelProtocol", "parent": 6, "children": [10, 11, 12], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 35}}, {"id": 10, "type": "identifier", "text": "SObject <YC", "parent": 9, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 22}}, {"id": 11, "type": "identifier", "text": "elProtoc", "parent": 9, "children": [], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 33}}, {"id": 12, "type": "<", "text": "l", "parent": 9, "children": [], "start_point": {"row": 13, "column": 34}, "end_point": {"row": 13, "column": 35}}, {"id": 13, "type": "identifier", "text": ", NSCoding>\n\n+ ", "parent": 6, "children": [], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 50}}, {"id": 14, "type": "identifier", "text": "nstancet", "parent": 6, "children": [], "start_point": {"row": 13, "column": 52}, "end_point": {"row": 13, "column": 60}}, {"id": 15, "type": ">", "text": "y", "parent": 6, "children": [], "start_point": {"row": 13, "column": 60}, "end_point": {"row": 13, "column": 61}}, {"id": 16, "type": "unary_expression", "text": ")modelWithJSONDictionary:(NSDictionary ", "parent": 6, "children": [17], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 39}}, {"id": 17, "type": "cast_expression", "text": "odelWithJSONDictionary:(NSDictionary ", "parent": 16, "children": [18, 20], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 39}}, {"id": 18, "type": "type_descriptor", "text": "delWithJSOND", "parent": 17, "children": [19], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 15}}, {"id": 19, "type": "type_identifier", "text": "delWithJSOND", "parent": 18, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 15}}, {"id": 20, "type": "identifier", "text": "ctionary:(NSDictionary ", "parent": 17, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 39}}, {"id": 21, "type": "binary_expression", "text": "JSONDictionary;\n\n+ (instancet", "parent": 6, "children": [22, 23, 24], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 70}}, {"id": 22, "type": "identifier", "text": "JSONDictiona", "parent": 21, "children": [], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 53}}, {"id": 23, "type": "*", "text": "y", "parent": 21, "children": [], "start_point": {"row": 15, "column": 54}, "end_point": {"row": 15, "column": 55}}, {"id": 24, "type": "identifier", "text": "\n\n+ (instancet", "parent": 21, "children": [], "start_point": {"row": 15, "column": 56}, "end_point": {"row": 15, "column": 70}}, {"id": 25, "type": "update_expression", "text": ")modelWithDictionary:(NSDictionary *)dictionary;\n\n- (NSDiction", "parent": null, "children": [26, 37], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 62}}, {"id": 26, "type": "binary_expression", "text": ")modelWithDictionary:(NSDictionary *)dictionary;\n\n- (NSDiction", "parent": 25, "children": [27, 32, 34, 35, 36], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 62}}, {"id": 27, "type": "unary_expression", "text": ")modelWithDictionary:(NSDictionary ", "parent": 26, "children": [28], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 35}}, {"id": 28, "type": "cast_expression", "text": "odelWithDictionary:(NSDictionary ", "parent": 27, "children": [29, 31], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 35}}, {"id": 29, "type": "type_descriptor", "text": "delWithDicti", "parent": 28, "children": [30], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 15}}, {"id": 30, "type": "type_identifier", "text": "delWithDicti", "parent": 29, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 15}}, {"id": 31, "type": "identifier", "text": "nary:(NSDictionary ", "parent": 28, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 35}}, {"id": 32, "type": "ERROR", "text": "*)dictionary;\n", "parent": 26, "children": [33], "start_point": {"row": 17, "column": 35}, "end_point": {"row": 17, "column": 49}}, {"id": 33, "type": "identifier", "text": "dictionary;\n", "parent": 32, "children": [], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 49}}, {"id": 34, "type": "*", "text": "-", "parent": 26, "children": [], "start_point": {"row": 17, "column": 50}, "end_point": {"row": 17, "column": 51}}, {"id": 35, "type": "ERROR", "text": " ", "parent": 26, "children": [], "start_point": {"row": 17, "column": 51}, "end_point": {"row": 17, "column": 52}}, {"id": 36, "type": "identifier", "text": "(NSDiction", "parent": 26, "children": [], "start_point": {"row": 17, "column": 52}, "end_point": {"row": 17, "column": 62}}, {"id": 37, "type": "--", "text": "", "parent": 25, "children": [], "start_point": {"row": 17, "column": 62}, "end_point": {"row": 17, "column": 62}}, {"id": 38, "type": "unary_expression", "text": " *)JSONDictionary;\n\n- (NSArray *", "parent": null, "children": [39, 40], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 32}}, {"id": 39, "type": "-", "text": " ", "parent": 38, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 40, "type": "cast_expression", "text": ")JSONDictionary;\n\n- (NSArray *", "parent": 38, "children": [41, 45], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 32}}, {"id": 41, "type": "type_descriptor", "text": "JSONDictionary", "parent": 40, "children": [42, 43], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 17}}, {"id": 42, "type": "type_identifier", "text": "JSONDictiona", "parent": 41, "children": [], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 15}}, {"id": 43, "type": "abstract_pointer_declarator", "text": "y", "parent": 41, "children": [44], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 17}}, {"id": 44, "type": "*", "text": "y", "parent": 43, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 17}}, {"id": 45, "type": "identifier", "text": "\n\n- (NSArray *", "parent": 40, "children": [], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 32}}, {"id": 46, "type": "unary_expression", "text": "opertiesNameArray;\n\n@end\n", "parent": null, "children": [47, 48], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 32}}, {"id": 47, "type": "-", "text": "o", "parent": 46, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 48, "type": "cast_expression", "text": "ertiesNameArray;\n\n@end\n", "parent": 46, "children": [49, 53], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 32}}, {"id": 49, "type": "type_descriptor", "text": "rtiesName", "parent": 48, "children": [50, 51], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 12}}, {"id": 50, "type": "type_identifier", "text": "rtiesNa", "parent": 49, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 10}}, {"id": 51, "type": "abstract_pointer_declarator", "text": "e", "parent": 49, "children": [52], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 12}}, {"id": 52, "type": "*", "text": "e", "parent": 51, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 12}}, {"id": 53, "type": "identifier", "text": "rray;\n\n@end\n", "parent": 48, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 32}}, {"id": 54, "type": "ERROR", "text": "", "parent": null, "children": [55], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 55, "type": "ERROR", "text": "", "parent": 54, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 56, "type": "identifier", "text": "", "parent": null, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [16, 17, 21, 25, 26, 27, 28, 38, 40, 46, 48], "assignments": [], "loops": [], "conditionals": [8, 10, 11, 13, 14, 19, 20, 22, 24, 30, 31, 33, 36, 42, 45, 50, 53, 56], "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// YCBaseModel.h\n// YCTestDemo\n//\n// Created by \u9648\u715c\u948f on 2017/1/19.\n// Copyright \u00a9 2017\u5e74 \u9648\u715c\u948f. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n//protocol\n#import \"YCModelProtocol.h\"\n\n@interface YCBaseModel : NSObject <YCModelProtocol, NSCoding>\n\n+ (instancetype)modelWithJSONDictionary:(NSDictionary *)JSONDictionary;\n\n+ (instancetype)modelWithDictionary:(NSDictionary *)dictionary;\n\n- (NSDictionary *)JSONDictionary;\n\n- (NSArray *)propertiesNameArray;\n\n@end\n"}
364
c
#include <stdio.h> int main() { int size; printf("Enter a number: "); scanf("%d", &size); int a[size]; printf("Enter %d numbers: ", size); for(int i = 0; i<size; i++) { scanf("%d", &a[i]); } printf("\nThe numbers entered are: "); for(int i = 0; i<size; i++) { printf("%d ", a[i]); } int max = a[0]; for(int i = 0; i<size; i++) { if(a[i]>max){ max = a[i]; } } printf("\nThe biggest number is: %d", max); }
17.96
23
(translation_unit) "#include <stdio.h>\n\nint main() {\n\n int size; \n printf("Enter a number: ");\n \n scanf("%d", &size);\n\n int a[size];\n printf("Enter %d numbers: ", size);\n for(int i = 0; i<size; i++) {\n scanf("%d", &a[i]);\n }\n\n printf("\nThe numbers entered are: ");\n for(int i = 0; i<size; i++) {\n printf("%d ", a[i]);\n }\n\n int max = a[0];\n for(int i = 0; i<size; i++) {\n if(a[i]>max){\n max = a[i];\n }\n }\n printf("\nThe biggest number is: %d", max);\n}" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (function_definition) "int main() {\n\n int size; \n printf("Enter a number: ");\n \n scanf("%d", &size);\n\n int a[size];\n printf("Enter %d numbers: ", size);\n for(int i = 0; i<size; i++) {\n scanf("%d", &a[i]);\n }\n\n printf("\nThe numbers entered are: ");\n for(int i = 0; i<size; i++) {\n printf("%d ", a[i]);\n }\n\n int max = a[0];\n for(int i = 0; i<size; i++) {\n if(a[i]>max){\n max = a[i];\n }\n }\n printf("\nThe biggest number is: %d", max);\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n\n int size; \n printf("Enter a number: ");\n \n scanf("%d", &size);\n\n int a[size];\n printf("Enter %d numbers: ", size);\n for(int i = 0; i<size; i++) {\n scanf("%d", &a[i]);\n }\n\n printf("\nThe numbers entered are: ");\n for(int i = 0; i<size; i++) {\n printf("%d ", a[i]);\n }\n\n int max = a[0];\n for(int i = 0; i<size; i++) {\n if(a[i]>max){\n max = a[i];\n }\n }\n printf("\nThe biggest number is: %d", max);\n}" ({) "{" (declaration) "int size;" (primitive_type) "int" (identifier) "size" (;) ";" (expression_statement) "printf("Enter a number: ");" (call_expression) "printf("Enter a number: ")" (identifier) "printf" (argument_list) "("Enter a number: ")" (() "(" (string_literal) ""Enter a number: "" (") """ (string_content) "Enter a number: " (") """ ()) ")" (;) ";" (expression_statement) "scanf("%d", &size);" (call_expression) "scanf("%d", &size)" (identifier) "scanf" (argument_list) "("%d", &size)" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (pointer_expression) "&size" (&) "&" (identifier) "size" ()) ")" (;) ";" (declaration) "int a[size];" (primitive_type) "int" (array_declarator) "a[size]" (identifier) "a" ([) "[" (identifier) "size" (]) "]" (;) ";" (expression_statement) "printf("Enter %d numbers: ", size);" (call_expression) "printf("Enter %d numbers: ", size)" (identifier) "printf" (argument_list) "("Enter %d numbers: ", size)" (() "(" (string_literal) ""Enter %d numbers: "" (") """ (string_content) "Enter %d numbers: " (") """ (,) "," (identifier) "size" ()) ")" (;) ";" (for_statement) "for(int i = 0; i<size; i++) {\n scanf("%d", &a[i]);\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 scanf("%d", &a[i]);\n }" ({) "{" (expression_statement) "scanf("%d", &a[i]);" (call_expression) "scanf("%d", &a[i])" (identifier) "scanf" (argument_list) "("%d", &a[i])" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (pointer_expression) "&a[i]" (&) "&" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("\nThe numbers entered are: ");" (call_expression) "printf("\nThe numbers entered are: ")" (identifier) "printf" (argument_list) "("\nThe numbers entered are: ")" (() "(" (string_literal) ""\nThe numbers entered are: "" (") """ (escape_sequence) "\n" (string_content) "The numbers entered are: " (") """ ()) ")" (;) ";" (for_statement) "for(int i = 0; i<size; i++) {\n printf("%d ", a[i]);\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 printf("%d ", a[i]);\n }" ({) "{" (expression_statement) "printf("%d ", a[i]);" (call_expression) "printf("%d ", a[i])" (identifier) "printf" (argument_list) "("%d ", a[i])" (() "(" (string_literal) ""%d "" (") """ (string_content) "%d " (") """ (,) "," (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (declaration) "int max = a[0];" (primitive_type) "int" (init_declarator) "max = a[0]" (identifier) "max" (=) "=" (subscript_expression) "a[0]" (identifier) "a" ([) "[" (number_literal) "0" (]) "]" (;) ";" (for_statement) "for(int i = 0; i<size; i++) {\n if(a[i]>max){\n max = a[i];\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 if(a[i]>max){\n max = a[i];\n }\n }" ({) "{" (if_statement) "if(a[i]>max){\n max = a[i];\n }" (if) "if" (parenthesized_expression) "(a[i]>max)" (() "(" (binary_expression) "a[i]>max" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" (>) ">" (identifier) "max" ()) ")" (compound_statement) "{\n max = a[i];\n }" ({) "{" (expression_statement) "max = a[i];" (assignment_expression) "max = a[i]" (identifier) "max" (=) "=" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" (;) ";" (}) "}" (}) "}" (expression_statement) "printf("\nThe biggest number is: %d", max);" (call_expression) "printf("\nThe biggest number is: %d", max)" (identifier) "printf" (argument_list) "("\nThe biggest number is: %d", max)" (() "(" (string_literal) ""\nThe biggest number is: %d"" (") """ (escape_sequence) "\n" (string_content) "The biggest number is: %d" (") """ (,) "," (identifier) "max" ()) ")" (;) ";" (}) "}"
230
0
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 17.96, "nodes": 121, "errors": 0, "source_hash": "f2a164be8c2de4fbb0522e423204a3a6ece05856715c34fe40c6828341fff08b", "categorized_nodes": 87}, "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": "function_definition", "text": "int main() {\n\n\tint size;\t\n\tprintf(\"Enter a number: \");\n\t\n\tscanf(\"%d\", &size);\n\n\tint a[size];\n\tprintf(\"Enter %d numbers: \", size);\n\tfor(int i = 0; i<size; i++) {\n\t\tscanf(\"%d\", &a[i]);\n\t}\n\n printf(\"\\nThe numbers entered are: \");\n\tfor(int i = 0; i<size; i++) {\n\t\tprintf(\"%d \", a[i]);\n\t}\n\n\tint max = a[0];\n\tfor(int i = 0; i<size; i++) {\n\t\tif(a[i]>max){\n\t\t\tmax = a[i];\n\t\t}\n\t}\n\tprintf(\"\\nThe biggest number is: %d\", max);\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "int", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 3}}, {"id": 5, "type": "function_declarator", "text": "main()", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 4}, "end_point": {"row": 2, "column": 10}}, {"id": 6, "type": "identifier", "text": "main", "parent": 5, "children": [], "start_point": {"row": 2, "column": 4}, "end_point": {"row": 2, "column": 8}}, {"id": 7, "type": "parameter_list", "text": "()", "parent": 5, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 10}}, {"id": 8, "type": "declaration", "text": "int size;", "parent": 3, "children": [9, 10], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 10}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 4}}, {"id": 10, "type": "identifier", "text": "size", "parent": 8, "children": [], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 9}}, {"id": 11, "type": "call_expression", "text": "printf(\"Enter a number: \")", "parent": 3, "children": [12, 13], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 27}}, {"id": 12, "type": "identifier", "text": "printf", "parent": 11, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 7}}, {"id": 13, "type": "argument_list", "text": "(\"Enter a number: \")", "parent": 11, "children": [14], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 27}}, {"id": 14, "type": "string_literal", "text": "\"Enter a number: \"", "parent": 13, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 26}}, {"id": 15, "type": "call_expression", "text": "scanf(\"%d\", &size)", "parent": 3, "children": [16, 17], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 19}}, {"id": 16, "type": "identifier", "text": "scanf", "parent": 15, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 6}}, {"id": 17, "type": "argument_list", "text": "(\"%d\", &size)", "parent": 15, "children": [18, 19], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 19}}, {"id": 18, "type": "string_literal", "text": "\"%d\"", "parent": 17, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 11}}, {"id": 19, "type": "pointer_expression", "text": "&size", "parent": 17, "children": [20], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 18}}, {"id": 20, "type": "identifier", "text": "size", "parent": 19, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 18}}, {"id": 21, "type": "declaration", "text": "int a[size];", "parent": 3, "children": [22, 23], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 13}}, {"id": 22, "type": "primitive_type", "text": "int", "parent": 21, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 4}}, {"id": 23, "type": "array_declarator", "text": "a[size]", "parent": 21, "children": [24, 25], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 12}}, {"id": 24, "type": "identifier", "text": "a", "parent": 23, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 6}}, {"id": 25, "type": "identifier", "text": "size", "parent": 23, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 11}}, {"id": 26, "type": "call_expression", "text": "printf(\"Enter %d numbers: \", size)", "parent": 3, "children": [27, 28], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 35}}, {"id": 27, "type": "identifier", "text": "printf", "parent": 26, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 7}}, {"id": 28, "type": "argument_list", "text": "(\"Enter %d numbers: \", size)", "parent": 26, "children": [29, 30], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 35}}, {"id": 29, "type": "string_literal", "text": "\"Enter %d numbers: \"", "parent": 28, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 28}}, {"id": 30, "type": "identifier", "text": "size", "parent": 28, "children": [], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 34}}, {"id": 31, "type": "for_statement", "text": "for(int i = 0; i<size; i++) {\n\t\tscanf(\"%d\", &a[i]);\n\t}", "parent": 3, "children": [32, 38, 42], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 13, "column": 2}}, {"id": 32, "type": "declaration", "text": "int i = 0;", "parent": 31, "children": [33, 34], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 15}}, {"id": 33, "type": "primitive_type", "text": "int", "parent": 32, "children": [], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 8}}, {"id": 34, "type": "init_declarator", "text": "i = 0", "parent": 32, "children": [35, 36, 37], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 14}}, {"id": 35, "type": "identifier", "text": "i", "parent": 34, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 10}}, {"id": 36, "type": "=", "text": "=", "parent": 34, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 12}}, {"id": 37, "type": "number_literal", "text": "0", "parent": 34, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 14}}, {"id": 38, "type": "binary_expression", "text": "i<size", "parent": 31, "children": [39, 40, 41], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 22}}, {"id": 39, "type": "identifier", "text": "i", "parent": 38, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 17}}, {"id": 40, "type": "<", "text": "<", "parent": 38, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 18}}, {"id": 41, "type": "identifier", "text": "size", "parent": 38, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 22}}, {"id": 42, "type": "update_expression", "text": "i++", "parent": 31, "children": [43, 44], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 27}}, {"id": 43, "type": "identifier", "text": "i", "parent": 42, "children": [], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 25}}, {"id": 44, "type": "++", "text": "++", "parent": 42, "children": [], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 27}}, {"id": 45, "type": "call_expression", "text": "scanf(\"%d\", &a[i])", "parent": 31, "children": [46, 47], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 20}}, {"id": 46, "type": "identifier", "text": "scanf", "parent": 45, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 7}}, {"id": 47, "type": "argument_list", "text": "(\"%d\", &a[i])", "parent": 45, "children": [48, 49], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 20}}, {"id": 48, "type": "string_literal", "text": "\"%d\"", "parent": 47, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 12}}, {"id": 49, "type": "pointer_expression", "text": "&a[i]", "parent": 47, "children": [50], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 19}}, {"id": 50, "type": "subscript_expression", "text": "a[i]", "parent": 49, "children": [51, 52], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 19}}, {"id": 51, "type": "identifier", "text": "a", "parent": 50, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 16}}, {"id": 52, "type": "identifier", "text": "i", "parent": 50, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 18}}, {"id": 53, "type": "call_expression", "text": "printf(\"\\nThe numbers entered are: \")", "parent": 3, "children": [54, 55], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 41}}, {"id": 54, "type": "identifier", "text": "printf", "parent": 53, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 10}}, {"id": 55, "type": "argument_list", "text": "(\"\\nThe numbers entered are: \")", "parent": 53, "children": [56], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 41}}, {"id": 56, "type": "string_literal", "text": "\"\\nThe numbers entered are: \"", "parent": 55, "children": [57], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 40}}, {"id": 57, "type": "escape_sequence", "text": "\\n", "parent": 56, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 14}}, {"id": 58, "type": "for_statement", "text": "for(int i = 0; i<size; i++) {\n\t\tprintf(\"%d \", a[i]);\n\t}", "parent": 3, "children": [59, 65, 69], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 18, "column": 2}}, {"id": 59, "type": "declaration", "text": "int i = 0;", "parent": 58, "children": [60, 61], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 15}}, {"id": 60, "type": "primitive_type", "text": "int", "parent": 59, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 8}}, {"id": 61, "type": "init_declarator", "text": "i = 0", "parent": 59, "children": [62, 63, 64], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 14}}, {"id": 62, "type": "identifier", "text": "i", "parent": 61, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 10}}, {"id": 63, "type": "=", "text": "=", "parent": 61, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 12}}, {"id": 64, "type": "number_literal", "text": "0", "parent": 61, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 14}}, {"id": 65, "type": "binary_expression", "text": "i<size", "parent": 58, "children": [66, 67, 68], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 22}}, {"id": 66, "type": "identifier", "text": "i", "parent": 65, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 17}}, {"id": 67, "type": "<", "text": "<", "parent": 65, "children": [], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 18}}, {"id": 68, "type": "identifier", "text": "size", "parent": 65, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 22}}, {"id": 69, "type": "update_expression", "text": "i++", "parent": 58, "children": [70, 71], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 27}}, {"id": 70, "type": "identifier", "text": "i", "parent": 69, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 25}}, {"id": 71, "type": "++", "text": "++", "parent": 69, "children": [], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 27}}, {"id": 72, "type": "call_expression", "text": "printf(\"%d \", a[i])", "parent": 58, "children": [73, 74], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 21}}, {"id": 73, "type": "identifier", "text": "printf", "parent": 72, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 8}}, {"id": 74, "type": "argument_list", "text": "(\"%d \", a[i])", "parent": 72, "children": [75, 76], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 21}}, {"id": 75, "type": "string_literal", "text": "\"%d \"", "parent": 74, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 14}}, {"id": 76, "type": "subscript_expression", "text": "a[i]", "parent": 74, "children": [77, 78], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 20}}, {"id": 77, "type": "identifier", "text": "a", "parent": 76, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 17}}, {"id": 78, "type": "identifier", "text": "i", "parent": 76, "children": [], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 19}}, {"id": 79, "type": "declaration", "text": "int max = a[0];", "parent": 3, "children": [80, 81], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 16}}, {"id": 80, "type": "primitive_type", "text": "int", "parent": 79, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 4}}, {"id": 81, "type": "init_declarator", "text": "max = a[0]", "parent": 79, "children": [82, 83, 84], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 15}}, {"id": 82, "type": "identifier", "text": "max", "parent": 81, "children": [], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 8}}, {"id": 83, "type": "=", "text": "=", "parent": 81, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 10}}, {"id": 84, "type": "subscript_expression", "text": "a[0]", "parent": 81, "children": [85, 86], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 15}}, {"id": 85, "type": "identifier", "text": "a", "parent": 84, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 12}}, {"id": 86, "type": "number_literal", "text": "0", "parent": 84, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 14}}, {"id": 87, "type": "for_statement", "text": "for(int i = 0; i<size; i++) {\n\t\tif(a[i]>max){\n\t\t\tmax = a[i];\n\t\t}\n\t}", "parent": 3, "children": [88, 94, 98], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 25, "column": 2}}, {"id": 88, "type": "declaration", "text": "int i = 0;", "parent": 87, "children": [89, 90], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 15}}, {"id": 89, "type": "primitive_type", "text": "int", "parent": 88, "children": [], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 8}}, {"id": 90, "type": "init_declarator", "text": "i = 0", "parent": 88, "children": [91, 92, 93], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 14}}, {"id": 91, "type": "identifier", "text": "i", "parent": 90, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 10}}, {"id": 92, "type": "=", "text": "=", "parent": 90, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 12}}, {"id": 93, "type": "number_literal", "text": "0", "parent": 90, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 14}}, {"id": 94, "type": "binary_expression", "text": "i<size", "parent": 87, "children": [95, 96, 97], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 22}}, {"id": 95, "type": "identifier", "text": "i", "parent": 94, "children": [], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 17}}, {"id": 96, "type": "<", "text": "<", "parent": 94, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 18}}, {"id": 97, "type": "identifier", "text": "size", "parent": 94, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 22}}, {"id": 98, "type": "update_expression", "text": "i++", "parent": 87, "children": [99, 100], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 27}}, {"id": 99, "type": "identifier", "text": "i", "parent": 98, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 25}}, {"id": 100, "type": "++", "text": "++", "parent": 98, "children": [], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 27}}, {"id": 101, "type": "if_statement", "text": "if(a[i]>max){\n\t\t\tmax = a[i];\n\t\t}", "parent": 87, "children": [102], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 24, "column": 3}}, {"id": 102, "type": "parenthesized_expression", "text": "(a[i]>max)", "parent": 101, "children": [103], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 14}}, {"id": 103, "type": "binary_expression", "text": "a[i]>max", "parent": 102, "children": [104, 107, 108], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 13}}, {"id": 104, "type": "subscript_expression", "text": "a[i]", "parent": 103, "children": [105, 106], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 9}}, {"id": 105, "type": "identifier", "text": "a", "parent": 104, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 6}}, {"id": 106, "type": "identifier", "text": "i", "parent": 104, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 8}}, {"id": 107, "type": ">", "text": ">", "parent": 103, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 10}}, {"id": 108, "type": "identifier", "text": "max", "parent": 103, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 13}}, {"id": 109, "type": "assignment_expression", "text": "max = a[i]", "parent": 101, "children": [110, 111, 112], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 13}}, {"id": 110, "type": "identifier", "text": "max", "parent": 109, "children": [], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 6}}, {"id": 111, "type": "=", "text": "=", "parent": 109, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 8}}, {"id": 112, "type": "subscript_expression", "text": "a[i]", "parent": 109, "children": [113, 114], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 13}}, {"id": 113, "type": "identifier", "text": "a", "parent": 112, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 10}}, {"id": 114, "type": "identifier", "text": "i", "parent": 112, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 12}}, {"id": 115, "type": "call_expression", "text": "printf(\"\\nThe biggest number is: %d\", max)", "parent": 3, "children": [116, 117], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 43}}, {"id": 116, "type": "identifier", "text": "printf", "parent": 115, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 7}}, {"id": 117, "type": "argument_list", "text": "(\"\\nThe biggest number is: %d\", max)", "parent": 115, "children": [118, 120], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 43}}, {"id": 118, "type": "string_literal", "text": "\"\\nThe biggest number is: %d\"", "parent": 117, "children": [119], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 37}}, {"id": 119, "type": "escape_sequence", "text": "\\n", "parent": 118, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 11}}, {"id": 120, "type": "identifier", "text": "max", "parent": 117, "children": [], "start_point": {"row": 26, "column": 39}, "end_point": {"row": 26, "column": 42}}]}, "node_categories": {"declarations": {"functions": [3, 5], "variables": [8, 21, 32, 59, 79, 88], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [11, 15, 19, 26, 38, 42, 45, 49, 50, 53, 65, 69, 72, 76, 84, 94, 98, 102, 103, 104, 112, 115], "assignments": [109], "loops": [31, 58, 87], "conditionals": [6, 10, 12, 16, 20, 24, 25, 27, 30, 35, 39, 41, 43, 46, 51, 52, 54, 62, 66, 68, 70, 73, 77, 78, 82, 85, 91, 95, 97, 99, 101, 105, 106, 108, 110, 113, 114, 116, 120], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 14, 18, 29, 37, 48, 56, 64, 75, 86, 93, 118], "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\n\tint size;\t\n\tprintf(\"Enter a number: \");\n\t\n\tscanf(\"%d\", &size);\n\n\tint a[size];\n\tprintf"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n\nint main() {\n\n\tint size;\t\n\tprintf(\"Enter a number: \");\n\t\n\tscanf(\"%d\", &size);\n\n\tint a[size];\n\tprintf(\"Enter %d numbers: \", size);\n\tfor(int i = 0; i<size; i++) {\n\t\tscanf(\"%d\", &a[i]);\n\t}\n\n printf(\"\\nThe numbers entered are: \");\n\tfor(int i = 0; i<size; i++) {\n\t\tprintf(\"%d \", a[i]);\n\t}\n\n\tint max = a[0];\n\tfor(int i = 0; i<size; i++) {\n\t\tif(a[i]>max){\n\t\t\tmax = a[i];\n\t\t}\n\t}\n\tprintf(\"\\nThe biggest number is: %d\", max);\n}"}
365
c
// // AliyunCoverPickView.h // qusdk // // Created by Worthy on 2017/11/7. // Copyright © 2017年 Alibaba Group Holding Limited. All rights reserved. // #import <UIKit/UIKit.h> @protocol AliyunCoverPickViewDelegate - (void)pickViewDidUpdateImage:(UIImage *)image; @end @interface AliyunCoverPickView : UIView @property (nonatomic, weak) id<AliyunCoverPickViewDelegate> delegate; @property (nonatomic, strong) NSString *videoPath; @property (nonatomic, assign) CGSize outputSize; @property (nonatomic, strong) UIImage *selectedImage; - (void)loadThumbnailData; @end
30.5
18
(translation_unit) "//\n// AliyunCoverPickView.h\n// qusdk\n//\n// Created by Worthy on 2017/11/7.\n// Copyright © 2017年 Alibaba Group Holding Limited. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n@protocol AliyunCoverPickViewDelegate\n- (void)pickViewDidUpdateImage:(UIImage *)image;\n@end\n\n@interface AliyunCoverPickView : UIView\n@property (nonatomic, weak) id<AliyunCoverPickViewDelegate> delegate;\n@property (nonatomic, strong) NSString *videoPath;\n@property (nonatomic, assign) CGSize outputSize;\n@property (nonatomic, strong) UIImage *selectedImage;\n- (void)loadThumbnailData;\n@end\n" (comment) "//" (comment) "// AliyunCoverPickView.h" (comment) "// qusdk" (comment) "//" (comment) "// Created by Worthy on 2017/11/7." (comment) "// Copyright © 2017年 Alibaba Group Holding Limited. All rights reserved.\n//" (comment) "\n#" (preproc_call) "port <UIKit/UIKit.h>\n@pr" (preproc_directive) "port <U" (preproc_arg) "Kit/UIKit.h>\n@p" (ERROR) "otocol AliyunCoverPickViewDelegate\n- (void)pickViewDidUpdateImage:(UIImage *)image;\n@end\n\n@interface AliyunCoverPickView : UIView\n@property (nonatomic, weak) id<AliyunCoverPickViewDelegate> delegate;\n@property (nonatomic, strong) NSString *videoPath;\n@property (nonatomic, assign) CGSize outputSize;\n@property (nonatomic, strong) UIImage *selectedImage;\n- (void)loadThumbnailData;\n@end\n" (ERROR) "o" (type_identifier) "tocol Al" (ERROR) "yunCoverPickViewDelegate\n- (void)pickViewDidUpdateImage:(UIImage *)image;\n@end\n\n@interface AliyunCoverPickView : UIView\n@pro" (function_declarator) "yunCoverPickViewDelegate\n- (void)pickViewDidUpdateImage:(UIImage *)image;\n@" (identifier) "yunCoverPickViewDelegate\n- " (ERROR) "v" (-) "v" (parameter_list) "id)pic" (() "i" (parameter_declaration) "d)pi" (primitive_type) "d)pi" ()) "c" (identifier) "kViewDidUpdateImage:(U" (ERROR) "II" (:) "I" (() "I" (identifier) "mage *)" (ERROR) "ma" (*) "m" ()) "a" (identifier) "ge;\n@" (;) "e" (ERROR) "d" (identifier) "\n\n@" (ERROR) "t" (identifier) "erface Al" (identifier) "yunCoverPickView : " (:) "I" (identifier) "iew\n@p" (ERROR) "o" (function_declarator) "perty (nonatomic, weak) id" (identifier) "perty (n" (parameter_list) "natomic, weak) id" (() "n" (identifier) "atomic, w" (,) "e" (identifier) "k) i" ()) "d" (declaration) "AliyunCoverPickViewDelegate> delegate;\n@p" (type_identifier) "Al" (ERROR) "iyunCoverPickViewDelegate> de" (<) "i" (identifier) "yunCoverPickViewDelegate> d" (>) "e" (identifier) "egate;\n@" (;) "p" (ERROR) "o" (ERROR) "o" (declaration) "perty (nonatomic, strong) NSString *videoPath;\n@p" (macro_type_specifier) "perty (nonatomic, strong) NS" (identifier) "perty (n" (() "n" (type_descriptor) "atomic, s" (type_identifier) "atomic, s" (ERROR) "trong) N" (,) "t" (identifier) "ong) N" ()) "S" (ERROR) "tring *v" (identifier) "tring *v" (pointer_declarator) "deoPath;\n@" (*) "d" (identifier) "eoPath;\n@" (;) "p" (ERROR) "o" (ERROR) "o" (declaration) "perty (nonatomic, assign) CGSize outputSize;\n@p" (macro_type_specifier) "perty (nonatomic, assign) CG" (identifier) "perty (n" (() "n" (type_descriptor) "atomic, a" (type_identifier) "atomic, a" (ERROR) "ssign) C" (,) "s" (identifier) "ign) C" ()) "G" (ERROR) "ize ou" (identifier) "ize ou" (identifier) "putSize;\n@" (;) "p" (ERROR) "o" (ERROR) "o" (declaration) "perty (nonatomic, strong) UIImage *selectedImage;\n- " (macro_type_specifier) "perty (nonatomic, strong) UI" (identifier) "perty (n" (() "n" (type_descriptor) "atomic, s" (type_identifier) "atomic, s" (ERROR) "trong) U" (,) "t" (identifier) "ong) U" ()) "I" (ERROR) "mage *s" (identifier) "mage *s" (pointer_declarator) "lectedImage;\n-" (*) "l" (identifier) "ectedImage;\n-" (;) " " (ERROR) "voi" (-) "v" (() "i" (declaration) "d)loadThumbnailData;\n@e" (primitive_type) "d)lo" (ERROR) "a" ()) "a" (identifier) "dThumbnailData;\n@" (;) "e" (ERROR) "d" (ERROR) "d" (identifier) "\n"
122
26
{"language": "c", "success": true, "metadata": {"lines": 18, "avg_line_length": 30.5, "nodes": 88, "errors": 0, "source_hash": "efc936353e7d30e72d7915db9a62c432cfbb09a3653464feac62cb7e6d4883a5", "categorized_nodes": 44}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "port <UIKit/UIKit.h>\n@pr", "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@p", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "ERROR", "text": "otocol AliyunCoverPickViewDelegate\n- (void)pickViewDidUpdateImage:(UIImage *)image;\n@end\n\n@interface AliyunCoverPickView : UIView\n@property (nonatomic, weak) id<AliyunCoverPickViewDelegate> delegate;\n@property (nonatomic, strong) NSString *videoPath;\n@property (nonatomic, assign) CGSize outputSize;\n@property (nonatomic, strong) UIImage *selectedImage;\n- (void)loadThumbnailData;\n@end\n", "parent": null, "children": [4, 5, 6, 27, 32, 39, 41, 53, 55, 65, 67, 79, 81, 85, 87], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 19, "column": 4}}, {"id": 4, "type": "ERROR", "text": "o", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "tocol Al", "parent": 3, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 9}}, {"id": 6, "type": "ERROR", "text": "yunCoverPickViewDelegate\n- (void)pickViewDidUpdateImage:(UIImage *)image;\n@end\n\n@interface AliyunCoverPickView : UIView\n@pro", "parent": 3, "children": [7, 20, 21, 22, 23, 24, 25, 26], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 14, "column": 1}}, {"id": 7, "type": "function_declarator", "text": "yunCoverPickViewDelegate\n- (void)pickViewDidUpdateImage:(UIImage *)image;\n@", "parent": 6, "children": [8, 9, 11, 14, 15, 16, 17, 19], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 10, "column": 47}}, {"id": 8, "type": "identifier", "text": "yunCoverPickViewDelegate\n- ", "parent": 7, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 37}}, {"id": 9, "type": "ERROR", "text": "v", "parent": 7, "children": [10], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 10, "type": "-", "text": "v", "parent": 9, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 11, "type": "parameter_list", "text": "id)pic", "parent": 7, "children": [12], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 8}}, {"id": 12, "type": "parameter_declaration", "text": "d)pi", "parent": 11, "children": [13], "start_point": {"row": 10, "column": 3}, "end_point": {"row": 10, "column": 7}}, {"id": 13, "type": "primitive_type", "text": "d)pi", "parent": 12, "children": [], "start_point": {"row": 10, "column": 3}, "end_point": {"row": 10, "column": 7}}, {"id": 14, "type": "identifier", "text": "kViewDidUpdateImage:(U", "parent": 7, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 30}}, {"id": 15, "type": "ERROR", "text": "II", "parent": 7, "children": [], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 32}}, {"id": 16, "type": "identifier", "text": "mage *)", "parent": 7, "children": [], "start_point": {"row": 10, "column": 32}, "end_point": {"row": 10, "column": 39}}, {"id": 17, "type": "ERROR", "text": "ma", "parent": 7, "children": [18], "start_point": {"row": 10, "column": 40}, "end_point": {"row": 10, "column": 42}}, {"id": 18, "type": "*", "text": "m", "parent": 17, "children": [], "start_point": {"row": 10, "column": 40}, "end_point": {"row": 10, "column": 41}}, {"id": 19, "type": "identifier", "text": "ge;\n@", "parent": 7, "children": [], "start_point": {"row": 10, "column": 42}, "end_point": {"row": 10, "column": 47}}, {"id": 20, "type": "ERROR", "text": "d", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 21, "type": "identifier", "text": "\n\n@", "parent": 6, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 4}}, {"id": 22, "type": "ERROR", "text": "t", "parent": 6, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 23, "type": "identifier", "text": "erface Al", "parent": 6, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 10}}, {"id": 24, "type": "identifier", "text": "yunCoverPickView : ", "parent": 6, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 30}}, {"id": 25, "type": "identifier", "text": "iew\n@p", "parent": 6, "children": [], "start_point": {"row": 13, "column": 33}, "end_point": {"row": 13, "column": 39}}, {"id": 26, "type": "ERROR", "text": "o", "parent": 6, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 27, "type": "function_declarator", "text": "perty (nonatomic, weak) id", "parent": 3, "children": [28, 29], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 27}}, {"id": 28, "type": "identifier", "text": "perty (n", "parent": 27, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 29, "type": "parameter_list", "text": "natomic, weak) id", "parent": 27, "children": [30, 31], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 27}}, {"id": 30, "type": "identifier", "text": "atomic, w", "parent": 29, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 20}}, {"id": 31, "type": "identifier", "text": "k) i", "parent": 29, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 26}}, {"id": 32, "type": "declaration", "text": "AliyunCoverPickViewDelegate> delegate;\n@p", "parent": 3, "children": [33, 34, 38], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 69}}, {"id": 33, "type": "type_identifier", "text": "Al", "parent": 32, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 30}}, {"id": 34, "type": "ERROR", "text": "iyunCoverPickViewDelegate> de", "parent": 32, "children": [35, 36, 37], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 59}}, {"id": 35, "type": "<", "text": "i", "parent": 34, "children": [], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 31}}, {"id": 36, "type": "identifier", "text": "yunCoverPickViewDelegate> d", "parent": 34, "children": [], "start_point": {"row": 14, "column": 31}, "end_point": {"row": 14, "column": 58}}, {"id": 37, "type": ">", "text": "e", "parent": 34, "children": [], "start_point": {"row": 14, "column": 58}, "end_point": {"row": 14, "column": 59}}, {"id": 38, "type": "identifier", "text": "egate;\n@", "parent": 32, "children": [], "start_point": {"row": 14, "column": 60}, "end_point": {"row": 14, "column": 68}}, {"id": 39, "type": "ERROR", "text": "o", "parent": 3, "children": [40], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 40, "type": "ERROR", "text": "o", "parent": 39, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 41, "type": "declaration", "text": "perty (nonatomic, strong) NSString *videoPath;\n@p", "parent": 3, "children": [42, 48, 50], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 50}}, {"id": 42, "type": "macro_type_specifier", "text": "perty (nonatomic, strong) NS", "parent": 41, "children": [43, 44, 46], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 29}}, {"id": 43, "type": "identifier", "text": "perty (n", "parent": 42, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 44, "type": "type_descriptor", "text": "atomic, s", "parent": 42, "children": [45], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 45, "type": "type_identifier", "text": "atomic, s", "parent": 44, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 46, "type": "ERROR", "text": "trong) N", "parent": 42, "children": [47], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 28}}, {"id": 47, "type": "identifier", "text": "ong) N", "parent": 46, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 28}}, {"id": 48, "type": "ERROR", "text": "tring *v", "parent": 41, "children": [49], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 38}}, {"id": 49, "type": "identifier", "text": "tring *v", "parent": 48, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 38}}, {"id": 50, "type": "pointer_declarator", "text": "deoPath;\n@", "parent": 41, "children": [51, 52], "start_point": {"row": 15, "column": 39}, "end_point": {"row": 15, "column": 49}}, {"id": 51, "type": "*", "text": "d", "parent": 50, "children": [], "start_point": {"row": 15, "column": 39}, "end_point": {"row": 15, "column": 40}}, {"id": 52, "type": "identifier", "text": "eoPath;\n@", "parent": 50, "children": [], "start_point": {"row": 15, "column": 40}, "end_point": {"row": 15, "column": 49}}, {"id": 53, "type": "ERROR", "text": "o", "parent": 3, "children": [54], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 54, "type": "ERROR", "text": "o", "parent": 53, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 55, "type": "declaration", "text": "perty (nonatomic, assign) CGSize outputSize;\n@p", "parent": 3, "children": [56, 62, 64], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 48}}, {"id": 56, "type": "macro_type_specifier", "text": "perty (nonatomic, assign) CG", "parent": 55, "children": [57, 58, 60], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 29}}, {"id": 57, "type": "identifier", "text": "perty (n", "parent": 56, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 9}}, {"id": 58, "type": "type_descriptor", "text": "atomic, a", "parent": 56, "children": [59], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 20}}, {"id": 59, "type": "type_identifier", "text": "atomic, a", "parent": 58, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 20}}, {"id": 60, "type": "ERROR", "text": "ssign) C", "parent": 56, "children": [61], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 28}}, {"id": 61, "type": "identifier", "text": "ign) C", "parent": 60, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 28}}, {"id": 62, "type": "ERROR", "text": "ize ou", "parent": 55, "children": [63], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 36}}, {"id": 63, "type": "identifier", "text": "ize ou", "parent": 62, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 36}}, {"id": 64, "type": "identifier", "text": "putSize;\n@", "parent": 55, "children": [], "start_point": {"row": 16, "column": 37}, "end_point": {"row": 16, "column": 47}}, {"id": 65, "type": "ERROR", "text": "o", "parent": 3, "children": [66], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 66, "type": "ERROR", "text": "o", "parent": 65, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 67, "type": "declaration", "text": "perty (nonatomic, strong) UIImage *selectedImage;\n- ", "parent": 3, "children": [68, 74, 76], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 53}}, {"id": 68, "type": "macro_type_specifier", "text": "perty (nonatomic, strong) UI", "parent": 67, "children": [69, 70, 72], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 29}}, {"id": 69, "type": "identifier", "text": "perty (n", "parent": 68, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 9}}, {"id": 70, "type": "type_descriptor", "text": "atomic, s", "parent": 68, "children": [71], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 20}}, {"id": 71, "type": "type_identifier", "text": "atomic, s", "parent": 70, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 20}}, {"id": 72, "type": "ERROR", "text": "trong) U", "parent": 68, "children": [73], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 28}}, {"id": 73, "type": "identifier", "text": "ong) U", "parent": 72, "children": [], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 28}}, {"id": 74, "type": "ERROR", "text": "mage *s", "parent": 67, "children": [75], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 37}}, {"id": 75, "type": "identifier", "text": "mage *s", "parent": 74, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 37}}, {"id": 76, "type": "pointer_declarator", "text": "lectedImage;\n-", "parent": 67, "children": [77, 78], "start_point": {"row": 17, "column": 38}, "end_point": {"row": 17, "column": 52}}, {"id": 77, "type": "*", "text": "l", "parent": 76, "children": [], "start_point": {"row": 17, "column": 38}, "end_point": {"row": 17, "column": 39}}, {"id": 78, "type": "identifier", "text": "ectedImage;\n-", "parent": 76, "children": [], "start_point": {"row": 17, "column": 39}, "end_point": {"row": 17, "column": 52}}, {"id": 79, "type": "ERROR", "text": "voi", "parent": 3, "children": [80], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 3}}, {"id": 80, "type": "-", "text": "v", "parent": 79, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 81, "type": "declaration", "text": "d)loadThumbnailData;\n@e", "parent": 3, "children": [82, 83, 84], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 26}}, {"id": 82, "type": "primitive_type", "text": "d)lo", "parent": 81, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 7}}, {"id": 83, "type": "ERROR", "text": "a", "parent": 81, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 8}}, {"id": 84, "type": "identifier", "text": "dThumbnailData;\n@", "parent": 81, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 25}}, {"id": 85, "type": "ERROR", "text": "d", "parent": 3, "children": [86], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 86, "type": "ERROR", "text": "d", "parent": 85, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 87, "type": "identifier", "text": "\n", "parent": 3, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 4}}]}, "node_categories": {"declarations": {"functions": [7, 27], "variables": [12, 32, 41, 55, 67, 81], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 8, 14, 16, 19, 21, 23, 24, 25, 28, 30, 31, 33, 36, 38, 42, 43, 45, 47, 49, 52, 56, 57, 59, 61, 63, 64, 68, 69, 71, 73, 75, 78, 84, 87], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 7, "universal_type": "function", "name": "unknown", "text_snippet": "yunCoverPickViewDelegate\n- (void)pickViewDidUpdateImage:(UIImage *)image;\n@"}, {"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "perty (nonatomic, weak) id"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// AliyunCoverPickView.h\n// qusdk\n//\n// Created by Worthy on 2017/11/7.\n// Copyright \u00a9 2017\u5e74 Alibaba Group Holding Limited. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n@protocol AliyunCoverPickViewDelegate\n- (void)pickViewDidUpdateImage:(UIImage *)image;\n@end\n\n@interface AliyunCoverPickView : UIView\n@property (nonatomic, weak) id<AliyunCoverPickViewDelegate> delegate;\n@property (nonatomic, strong) NSString *videoPath;\n@property (nonatomic, assign) CGSize outputSize;\n@property (nonatomic, strong) UIImage *selectedImage;\n- (void)loadThumbnailData;\n@end\n"}
366
c
#pragma once #include <iostream> #include <string> #define GLFW_INCLUDE_NONE #include <GLFW/glfw3.h> #include <GL/glew.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> class Variant_t { private: int flag; union { unsigned int _u; int _i; glm::vec3 _vf3; glm::mat4 _mf4; }; std::string s; std::string get_flag_string(void); public: static const int FLAG_uint = 0; static const int FLAG_int = 1; static const int FLAG_str = 2; static const int FLAG_vf3 = 3; static const int FLAG_mf4 = 4; Variant_t(unsigned int d); Variant_t(int d); Variant_t(std::string s); Variant_t(glm::vec3 v3); Variant_t(glm::mat4 m4); unsigned int& getUint(void); int& getInt(void); glm::vec3& getVec3(void); glm::mat4& getMat4(void); std::string& getString(void); }; std::string Variant_t::get_flag_string(void) { switch(this->flag) { case FLAG_uint: return "uint"; break; case FLAG_int: return "int"; break; case FLAG_str: return "str"; break; case FLAG_vf3: return "vf3"; break; case FLAG_mf4: return "mf4"; break; default: throw std::runtime_error("Variant_t : unknown inner type"); } } Variant_t::Variant_t(unsigned int d) { this->flag = FLAG_uint; this->_u = d; } Variant_t::Variant_t(int d) { this->flag = FLAG_int; this->_i = d; } Variant_t::Variant_t(std::string s) { this->flag = FLAG_str; this->s = s; } Variant_t::Variant_t(glm::vec3 v3) { this->flag = FLAG_vf3; this->_vf3 = v3; } Variant_t::Variant_t(glm::mat4 m4) { this->flag = FLAG_mf4; this->_mf4 = m4; } unsigned int& Variant_t::getUint(void) { if(this->flag != FLAG_uint) throw std::runtime_error( "Variant_t : requested type 'uint' does " "not match actual type '" + this->get_flag_string() + "'"); } int& Variant_t::getInt(void) { if(this->flag != FLAG_uint) throw std::runtime_error( "Variant_t : requested type 'int' does " "not match actual type '" + this->get_flag_string() + "'"); } glm::vec3& Variant_t::getVec3(void) { if(this->flag != FLAG_uint) throw std::runtime_error( "Variant_t : requested type 'vf3' does " "not match actual type '" + this->get_flag_string() + "'"); } glm::mat4& Variant_t::getMat4(void) { if(this->flag != FLAG_uint) throw std::runtime_error( "Variant_t : requested type 'mf4' does " "not match actual type '" + this->get_flag_string() + "'"); } std::string& Variant_t::getString(void) { if(this->flag != FLAG_uint) throw std::runtime_error( "Variant_t : requested type 'str' does " "not match actual type '" + this->get_flag_string() + "'"); }
28.79
97
(translation_unit) "#pragma once\n\n#include <iostream>\n#include <string>\n\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n#include <GL/glew.h>\n#include <glm/glm.hpp>\n#include <glm/gtc/matrix_transform.hpp>\n\nclass Variant_t {\nprivate:\n\n int flag;\n\n union {\n unsigned int _u;\n int _i;\n glm::vec3 _vf3;\n glm::mat4 _mf4;\n };\n\n std::string s;\n\n std::string get_flag_string(void);\n\npublic:\n\n static const int FLAG_uint = 0;\n static const int FLAG_int = 1;\n static const int FLAG_str = 2;\n static const int FLAG_vf3 = 3;\n static const int FLAG_mf4 = 4;\n\n Variant_t(unsigned int d);\n Variant_t(int d);\n Variant_t(std::string s);\n Variant_t(glm::vec3 v3);\n Variant_t(glm::mat4 m4);\n\n unsigned int& getUint(void);\n int& getInt(void);\n glm::vec3& getVec3(void);\n glm::mat4& getMat4(void);\n std::string& getString(void);\n\n};\n\nstd::string Variant_t::get_flag_string(void) {\n switch(this->flag) {\n case FLAG_uint: return "uint"; break;\n case FLAG_int: return "int"; break;\n case FLAG_str: return "str"; break;\n case FLAG_vf3: return "vf3"; break;\n case FLAG_mf4: return "mf4"; break;\n default:\n throw std::runtime_error("Variant_t : unknown inner type"); \n }\n}\n\nVariant_t::Variant_t(unsigned int d) {\n this->flag = FLAG_uint;\n this->_u = d;\n}\n\nVariant_t::Variant_t(int d) {\n this->flag = FLAG_int;\n this->_i = d;\n}\n\nVariant_t::Variant_t(std::string s) {\n this->flag = FLAG_str;\n this->s = s;\n}\n\nVariant_t::Variant_t(glm::vec3 v3) {\n this->flag = FLAG_vf3;\n this->_vf3 = v3;\n}\n\nVariant_t::Variant_t(glm::mat4 m4) {\n this->flag = FLAG_mf4;\n this->_mf4 = m4;\n}\n\nunsigned int& Variant_t::getUint(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'uint' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}\n\nint& Variant_t::getInt(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'int' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}\n\nglm::vec3& Variant_t::getVec3(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'vf3' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}\n\nglm::mat4& Variant_t::getMat4(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'mf4' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}\n\nstd::string& Variant_t::getString(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'str' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <iostream>\n" (#include) "#include" (system_lib_string) "<iostream>" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (preproc_def) "#define GLFW_INCLUDE_NONE\n" (#define) "#define" (identifier) "GLFW_INCLUDE_NONE" (preproc_include) "#include <GLFW/glfw3.h>\n" (#include) "#include" (system_lib_string) "<GLFW/glfw3.h>" (preproc_include) "#include <GL/glew.h>\n" (#include) "#include" (system_lib_string) "<GL/glew.h>" (preproc_include) "#include <glm/glm.hpp>\n" (#include) "#include" (system_lib_string) "<glm/glm.hpp>" (preproc_include) "#include <glm/gtc/matrix_transform.hpp>\n" (#include) "#include" (system_lib_string) "<glm/gtc/matrix_transform.hpp>" (function_definition) "class Variant_t {\nprivate:\n\n int flag;\n\n union {\n unsigned int _u;\n int _i;\n glm::vec3 _vf3;\n glm::mat4 _mf4;\n };\n\n std::string s;\n\n std::string get_flag_string(void);\n\npublic:\n\n static const int FLAG_uint = 0;\n static const int FLAG_int = 1;\n static const int FLAG_str = 2;\n static const int FLAG_vf3 = 3;\n static const int FLAG_mf4 = 4;\n\n Variant_t(unsigned int d);\n Variant_t(int d);\n Variant_t(std::string s);\n Variant_t(glm::vec3 v3);\n Variant_t(glm::mat4 m4);\n\n unsigned int& getUint(void);\n int& getInt(void);\n glm::vec3& getVec3(void);\n glm::mat4& getMat4(void);\n std::string& getString(void);\n\n}" (type_identifier) "class" (identifier) "Variant_t" (compound_statement) "{\nprivate:\n\n int flag;\n\n union {\n unsigned int _u;\n int _i;\n glm::vec3 _vf3;\n glm::mat4 _mf4;\n };\n\n std::string s;\n\n std::string get_flag_string(void);\n\npublic:\n\n static const int FLAG_uint = 0;\n static const int FLAG_int = 1;\n static const int FLAG_str = 2;\n static const int FLAG_vf3 = 3;\n static const int FLAG_mf4 = 4;\n\n Variant_t(unsigned int d);\n Variant_t(int d);\n Variant_t(std::string s);\n Variant_t(glm::vec3 v3);\n Variant_t(glm::mat4 m4);\n\n unsigned int& getUint(void);\n int& getInt(void);\n glm::vec3& getVec3(void);\n glm::mat4& getMat4(void);\n std::string& getString(void);\n\n}" ({) "{" (labeled_statement) "private:\n\n int flag;" (statement_identifier) "private" (:) ":" (declaration) "int flag;" (primitive_type) "int" (identifier) "flag" (;) ";" (union_specifier) "union {\n unsigned int _u;\n int _i;\n glm::vec3 _vf3;\n glm::mat4 _mf4;\n }" (union) "union" (field_declaration_list) "{\n unsigned int _u;\n int _i;\n glm::vec3 _vf3;\n glm::mat4 _mf4;\n }" ({) "{" (field_declaration) "unsigned int _u;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (field_identifier) "_u" (;) ";" (field_declaration) "int _i;" (primitive_type) "int" (field_identifier) "_i" (;) ";" (field_declaration) "glm::vec3 _vf3;" (type_identifier) "glm" (ERROR) "::vec3" (:) ":" (:) ":" (field_identifier) "vec3" (field_identifier) "_vf3" (;) ";" (field_declaration) "glm::mat4 _mf4;" (type_identifier) "glm" (ERROR) "::mat4" (:) ":" (:) ":" (field_identifier) "mat4" (field_identifier) "_mf4" (;) ";" (}) "}" (;) ";" (labeled_statement) "std::string s;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string s;" (type_identifier) "string" (identifier) "s" (;) ";" (labeled_statement) "std::string get_flag_string(void);" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string get_flag_string(void);" (type_identifier) "string" (function_declarator) "get_flag_string(void)" (identifier) "get_flag_string" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (labeled_statement) "public:\n\n static const int FLAG_uint = 0;" (statement_identifier) "public" (:) ":" (declaration) "static const int FLAG_uint = 0;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "FLAG_uint = 0" (identifier) "FLAG_uint" (=) "=" (number_literal) "0" (;) ";" (declaration) "static const int FLAG_int = 1;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "FLAG_int = 1" (identifier) "FLAG_int" (=) "=" (number_literal) "1" (;) ";" (declaration) "static const int FLAG_str = 2;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "FLAG_str = 2" (identifier) "FLAG_str" (=) "=" (number_literal) "2" (;) ";" (declaration) "static const int FLAG_vf3 = 3;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "FLAG_vf3 = 3" (identifier) "FLAG_vf3" (=) "=" (number_literal) "3" (;) ";" (declaration) "static const int FLAG_mf4 = 4;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "FLAG_mf4 = 4" (identifier) "FLAG_mf4" (=) "=" (number_literal) "4" (;) ";" (macro_type_specifier) "Variant_t(unsigned int d)" (identifier) "Variant_t" (() "(" (type_descriptor) "unsigned int" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (ERROR) "d" (identifier) "d" ()) ")" (;) ";" (macro_type_specifier) "Variant_t(int d)" (identifier) "Variant_t" (() "(" (ERROR) "int" (primitive_type) "int" (type_descriptor) "d" (type_identifier) "d" ()) ")" (;) ";" (labeled_statement) "Variant_t(std::string s);" (statement_identifier) "Variant_t" (ERROR) "(std:" (() "(" (type_descriptor) "std" (type_identifier) "std" (:) ":" (:) ":" (declaration) "string s);" (type_identifier) "string" (identifier) "s" (ERROR) ")" ()) ")" (;) ";" (labeled_statement) "Variant_t(glm::vec3 v3);" (statement_identifier) "Variant_t" (ERROR) "(glm:" (() "(" (type_descriptor) "glm" (type_identifier) "glm" (:) ":" (:) ":" (declaration) "vec3 v3);" (type_identifier) "vec3" (identifier) "v3" (ERROR) ")" ()) ")" (;) ";" (labeled_statement) "Variant_t(glm::mat4 m4);" (statement_identifier) "Variant_t" (ERROR) "(glm:" (() "(" (type_descriptor) "glm" (type_identifier) "glm" (:) ":" (:) ":" (declaration) "mat4 m4);" (type_identifier) "mat4" (identifier) "m4" (ERROR) ")" ()) ")" (;) ";" (declaration) "unsigned int& getUint(void);" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (ERROR) "&" (&) "&" (function_declarator) "getUint(void)" (identifier) "getUint" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "int& getInt(void);" (primitive_type) "int" (ERROR) "&" (&) "&" (function_declarator) "getInt(void)" (identifier) "getInt" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (labeled_statement) "glm::vec3& getVec3(void);" (statement_identifier) "glm" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "vec3& getVec3(void);" (binary_expression) "vec3& getVec3(void)" (identifier) "vec3" (&) "&" (call_expression) "getVec3(void)" (identifier) "getVec3" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (labeled_statement) "glm::mat4& getMat4(void);" (statement_identifier) "glm" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "mat4& getMat4(void);" (binary_expression) "mat4& getMat4(void)" (identifier) "mat4" (&) "&" (call_expression) "getMat4(void)" (identifier) "getMat4" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (labeled_statement) "std::string& getString(void);" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "string& getString(void);" (binary_expression) "string& getString(void)" (identifier) "string" (&) "&" (call_expression) "getString(void)" (identifier) "getString" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (labeled_statement) "std::string Variant_t::get_flag_string(void) {\n switch(this->flag) {\n case FLAG_uint: return "uint"; break;\n case FLAG_int: return "int"; break;\n case FLAG_str: return "str"; break;\n case FLAG_vf3: return "vf3"; break;\n case FLAG_mf4: return "mf4"; break;\n default:\n throw std::runtime_error("Variant_t : unknown inner type"); \n }\n}" (statement_identifier) "std" (ERROR) "::string Variant_t:" (:) ":" (:) ":" (type_identifier) "string" (identifier) "Variant_t" (:) ":" (:) ":" (ERROR) "get_flag_string(void)" (macro_type_specifier) "get_flag_string(void)" (identifier) "get_flag_string" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n switch(this->flag) {\n case FLAG_uint: return "uint"; break;\n case FLAG_int: return "int"; break;\n case FLAG_str: return "str"; break;\n case FLAG_vf3: return "vf3"; break;\n case FLAG_mf4: return "mf4"; break;\n default:\n throw std::runtime_error("Variant_t : unknown inner type"); \n }\n}" ({) "{" (switch_statement) "switch(this->flag) {\n case FLAG_uint: return "uint"; break;\n case FLAG_int: return "int"; break;\n case FLAG_str: return "str"; break;\n case FLAG_vf3: return "vf3"; break;\n case FLAG_mf4: return "mf4"; break;\n default:\n throw std::runtime_error("Variant_t : unknown inner type"); \n }" (switch) "switch" (parenthesized_expression) "(this->flag)" (() "(" (field_expression) "this->flag" (identifier) "this" (->) "->" (field_identifier) "flag" ()) ")" (compound_statement) "{\n case FLAG_uint: return "uint"; break;\n case FLAG_int: return "int"; break;\n case FLAG_str: return "str"; break;\n case FLAG_vf3: return "vf3"; break;\n case FLAG_mf4: return "mf4"; break;\n default:\n throw std::runtime_error("Variant_t : unknown inner type"); \n }" ({) "{" (case_statement) "case FLAG_uint: return "uint"; break;" (case) "case" (identifier) "FLAG_uint" (:) ":" (return_statement) "return "uint";" (return) "return" (string_literal) ""uint"" (") """ (string_content) "uint" (") """ (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case FLAG_int: return "int"; break;" (case) "case" (identifier) "FLAG_int" (:) ":" (return_statement) "return "int";" (return) "return" (string_literal) ""int"" (") """ (string_content) "int" (") """ (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case FLAG_str: return "str"; break;" (case) "case" (identifier) "FLAG_str" (:) ":" (return_statement) "return "str";" (return) "return" (string_literal) ""str"" (") """ (string_content) "str" (") """ (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case FLAG_vf3: return "vf3"; break;" (case) "case" (identifier) "FLAG_vf3" (:) ":" (return_statement) "return "vf3";" (return) "return" (string_literal) ""vf3"" (") """ (string_content) "vf3" (") """ (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case FLAG_mf4: return "mf4"; break;" (case) "case" (identifier) "FLAG_mf4" (:) ":" (return_statement) "return "mf4";" (return) "return" (string_literal) ""mf4"" (") """ (string_content) "mf4" (") """ (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n throw std::runtime_error("Variant_t : unknown inner type");" (default) "default" (ERROR) ":\n throw std:" (:) ":" (type_identifier) "throw" (identifier) "std" (:) ":" (:) ":" (expression_statement) "runtime_error("Variant_t : unknown inner type");" (call_expression) "runtime_error("Variant_t : unknown inner type")" (identifier) "runtime_error" (argument_list) "("Variant_t : unknown inner type")" (() "(" (string_literal) ""Variant_t : unknown inner type"" (") """ (string_content) "Variant_t : unknown inner type" (") """ ()) ")" (;) ";" (}) "}" (}) "}" (labeled_statement) "Variant_t::Variant_t(unsigned int d) {\n this->flag = FLAG_uint;\n this->_u = d;\n}" (statement_identifier) "Variant_t" (:) ":" (ERROR) ":Variant_t(unsigned int d)" (:) ":" (macro_type_specifier) "Variant_t(unsigned int d)" (identifier) "Variant_t" (() "(" (type_descriptor) "unsigned int" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (ERROR) "d" (identifier) "d" ()) ")" (compound_statement) "{\n this->flag = FLAG_uint;\n this->_u = d;\n}" ({) "{" (expression_statement) "this->flag = FLAG_uint;" (assignment_expression) "this->flag = FLAG_uint" (field_expression) "this->flag" (identifier) "this" (->) "->" (field_identifier) "flag" (=) "=" (identifier) "FLAG_uint" (;) ";" (expression_statement) "this->_u = d;" (assignment_expression) "this->_u = d" (field_expression) "this->_u" (identifier) "this" (->) "->" (field_identifier) "_u" (=) "=" (identifier) "d" (;) ";" (}) "}" (labeled_statement) "Variant_t::Variant_t(int d) {\n this->flag = FLAG_int;\n this->_i = d;\n}" (statement_identifier) "Variant_t" (:) ":" (ERROR) ":Variant_t(int d)" (:) ":" (macro_type_specifier) "Variant_t(int d)" (identifier) "Variant_t" (() "(" (type_descriptor) "int" (primitive_type) "int" (ERROR) "d" (identifier) "d" ()) ")" (compound_statement) "{\n this->flag = FLAG_int;\n this->_i = d;\n}" ({) "{" (expression_statement) "this->flag = FLAG_int;" (assignment_expression) "this->flag = FLAG_int" (field_expression) "this->flag" (identifier) "this" (->) "->" (field_identifier) "flag" (=) "=" (identifier) "FLAG_int" (;) ";" (expression_statement) "this->_i = d;" (assignment_expression) "this->_i = d" (field_expression) "this->_i" (identifier) "this" (->) "->" (field_identifier) "_i" (=) "=" (identifier) "d" (;) ";" (}) "}" (labeled_statement) "Variant_t::Variant_t(std::string s) {\n this->flag = FLAG_str;\n this->s = s;\n}" (statement_identifier) "Variant_t" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "Variant_t(std::string s) {\n this->flag = FLAG_str;\n this->s = s;\n}" (statement_identifier) "Variant_t" (ERROR) "(std:" (() "(" (type_descriptor) "std" (type_identifier) "std" (:) ":" (:) ":" (ERROR) "string s)" (type_identifier) "string" (identifier) "s" ()) ")" (compound_statement) "{\n this->flag = FLAG_str;\n this->s = s;\n}" ({) "{" (expression_statement) "this->flag = FLAG_str;" (assignment_expression) "this->flag = FLAG_str" (field_expression) "this->flag" (identifier) "this" (->) "->" (field_identifier) "flag" (=) "=" (identifier) "FLAG_str" (;) ";" (expression_statement) "this->s = s;" (assignment_expression) "this->s = s" (field_expression) "this->s" (identifier) "this" (->) "->" (field_identifier) "s" (=) "=" (identifier) "s" (;) ";" (}) "}" (labeled_statement) "Variant_t::Variant_t(glm::vec3 v3) {\n this->flag = FLAG_vf3;\n this->_vf3 = v3;\n}" (statement_identifier) "Variant_t" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "Variant_t(glm::vec3 v3) {\n this->flag = FLAG_vf3;\n this->_vf3 = v3;\n}" (statement_identifier) "Variant_t" (ERROR) "(glm:" (() "(" (type_descriptor) "glm" (type_identifier) "glm" (:) ":" (:) ":" (ERROR) "vec3 v3)" (type_identifier) "vec3" (identifier) "v3" ()) ")" (compound_statement) "{\n this->flag = FLAG_vf3;\n this->_vf3 = v3;\n}" ({) "{" (expression_statement) "this->flag = FLAG_vf3;" (assignment_expression) "this->flag = FLAG_vf3" (field_expression) "this->flag" (identifier) "this" (->) "->" (field_identifier) "flag" (=) "=" (identifier) "FLAG_vf3" (;) ";" (expression_statement) "this->_vf3 = v3;" (assignment_expression) "this->_vf3 = v3" (field_expression) "this->_vf3" (identifier) "this" (->) "->" (field_identifier) "_vf3" (=) "=" (identifier) "v3" (;) ";" (}) "}" (labeled_statement) "Variant_t::Variant_t(glm::mat4 m4) {\n this->flag = FLAG_mf4;\n this->_mf4 = m4;\n}" (statement_identifier) "Variant_t" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "Variant_t(glm::mat4 m4) {\n this->flag = FLAG_mf4;\n this->_mf4 = m4;\n}" (statement_identifier) "Variant_t" (ERROR) "(glm:" (() "(" (type_descriptor) "glm" (type_identifier) "glm" (:) ":" (:) ":" (ERROR) "mat4 m4)" (type_identifier) "mat4" (identifier) "m4" ()) ")" (compound_statement) "{\n this->flag = FLAG_mf4;\n this->_mf4 = m4;\n}" ({) "{" (expression_statement) "this->flag = FLAG_mf4;" (assignment_expression) "this->flag = FLAG_mf4" (field_expression) "this->flag" (identifier) "this" (->) "->" (field_identifier) "flag" (=) "=" (identifier) "FLAG_mf4" (;) ";" (expression_statement) "this->_mf4 = m4;" (assignment_expression) "this->_mf4 = m4" (field_expression) "this->_mf4" (identifier) "this" (->) "->" (field_identifier) "_mf4" (=) "=" (identifier) "m4" (;) ";" (}) "}" (function_definition) "unsigned int& Variant_t::getUint(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'uint' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (ERROR) "& Variant_t::" (&) "&" (identifier) "Variant_t" (:) ":" (:) ":" (function_declarator) "getUint(void)" (identifier) "getUint" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'uint' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}" ({) "{" (if_statement) "if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'uint' does "\n "not match actual type '" + this->get_flag_string() + "'");" (if) "if" (parenthesized_expression) "(this->flag != FLAG_uint)" (() "(" (binary_expression) "this->flag != FLAG_uint" (field_expression) "this->flag" (identifier) "this" (->) "->" (field_identifier) "flag" (!=) "!=" (identifier) "FLAG_uint" ()) ")" (labeled_statement) "throw std::runtime_error(\n "Variant_t : requested type 'uint' does "\n "not match actual type '" + this->get_flag_string() + "'");" (statement_identifier) "throw" (ERROR) "std:" (identifier) "std" (:) ":" (:) ":" (expression_statement) "runtime_error(\n "Variant_t : requested type 'uint' does "\n "not match actual type '" + this->get_flag_string() + "'");" (call_expression) "runtime_error(\n "Variant_t : requested type 'uint' does "\n "not match actual type '" + this->get_flag_string() + "'")" (identifier) "runtime_error" (argument_list) "(\n "Variant_t : requested type 'uint' does "\n "not match actual type '" + this->get_flag_string() + "'")" (() "(" (binary_expression) ""Variant_t : requested type 'uint' does "\n "not match actual type '" + this->get_flag_string() + "'"" (binary_expression) ""Variant_t : requested type 'uint' does "\n "not match actual type '" + this->get_flag_string()" (concatenated_string) ""Variant_t : requested type 'uint' does "\n "not match actual type '"" (string_literal) ""Variant_t : requested type 'uint' does "" (") """ (string_content) "Variant_t : requested type 'uint' does " (") """ (string_literal) ""not match actual type '"" (") """ (string_content) "not match actual type '" (") """ (+) "+" (call_expression) "this->get_flag_string()" (field_expression) "this->get_flag_string" (identifier) "this" (->) "->" (field_identifier) "get_flag_string" (argument_list) "()" (() "(" ()) ")" (+) "+" (string_literal) ""'"" (") """ (string_content) "'" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "int& Variant_t::getInt(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'int' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}" (primitive_type) "int" (ERROR) "& Variant_t::" (&) "&" (identifier) "Variant_t" (:) ":" (:) ":" (function_declarator) "getInt(void)" (identifier) "getInt" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'int' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}" ({) "{" (if_statement) "if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'int' does "\n "not match actual type '" + this->get_flag_string() + "'");" (if) "if" (parenthesized_expression) "(this->flag != FLAG_uint)" (() "(" (binary_expression) "this->flag != FLAG_uint" (field_expression) "this->flag" (identifier) "this" (->) "->" (field_identifier) "flag" (!=) "!=" (identifier) "FLAG_uint" ()) ")" (labeled_statement) "throw std::runtime_error(\n "Variant_t : requested type 'int' does "\n "not match actual type '" + this->get_flag_string() + "'");" (statement_identifier) "throw" (ERROR) "std:" (identifier) "std" (:) ":" (:) ":" (expression_statement) "runtime_error(\n "Variant_t : requested type 'int' does "\n "not match actual type '" + this->get_flag_string() + "'");" (call_expression) "runtime_error(\n "Variant_t : requested type 'int' does "\n "not match actual type '" + this->get_flag_string() + "'")" (identifier) "runtime_error" (argument_list) "(\n "Variant_t : requested type 'int' does "\n "not match actual type '" + this->get_flag_string() + "'")" (() "(" (binary_expression) ""Variant_t : requested type 'int' does "\n "not match actual type '" + this->get_flag_string() + "'"" (binary_expression) ""Variant_t : requested type 'int' does "\n "not match actual type '" + this->get_flag_string()" (concatenated_string) ""Variant_t : requested type 'int' does "\n "not match actual type '"" (string_literal) ""Variant_t : requested type 'int' does "" (") """ (string_content) "Variant_t : requested type 'int' does " (") """ (string_literal) ""not match actual type '"" (") """ (string_content) "not match actual type '" (") """ (+) "+" (call_expression) "this->get_flag_string()" (field_expression) "this->get_flag_string" (identifier) "this" (->) "->" (field_identifier) "get_flag_string" (argument_list) "()" (() "(" ()) ")" (+) "+" (string_literal) ""'"" (") """ (string_content) "'" (") """ ()) ")" (;) ";" (}) "}" (labeled_statement) "glm::vec3& Variant_t::getVec3(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'vf3' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}" (statement_identifier) "glm" (ERROR) "::vec3& Variant_t:" (:) ":" (:) ":" (binary_expression) "vec3& Variant_t" (identifier) "vec3" (&) "&" (identifier) "Variant_t" (:) ":" (:) ":" (ERROR) "getVec3(void)" (macro_type_specifier) "getVec3(void)" (identifier) "getVec3" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'vf3' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}" ({) "{" (if_statement) "if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'vf3' does "\n "not match actual type '" + this->get_flag_string() + "'");" (if) "if" (parenthesized_expression) "(this->flag != FLAG_uint)" (() "(" (binary_expression) "this->flag != FLAG_uint" (field_expression) "this->flag" (identifier) "this" (->) "->" (field_identifier) "flag" (!=) "!=" (identifier) "FLAG_uint" ()) ")" (labeled_statement) "throw std::runtime_error(\n "Variant_t : requested type 'vf3' does "\n "not match actual type '" + this->get_flag_string() + "'");" (statement_identifier) "throw" (ERROR) "std:" (identifier) "std" (:) ":" (:) ":" (expression_statement) "runtime_error(\n "Variant_t : requested type 'vf3' does "\n "not match actual type '" + this->get_flag_string() + "'");" (call_expression) "runtime_error(\n "Variant_t : requested type 'vf3' does "\n "not match actual type '" + this->get_flag_string() + "'")" (identifier) "runtime_error" (argument_list) "(\n "Variant_t : requested type 'vf3' does "\n "not match actual type '" + this->get_flag_string() + "'")" (() "(" (binary_expression) ""Variant_t : requested type 'vf3' does "\n "not match actual type '" + this->get_flag_string() + "'"" (binary_expression) ""Variant_t : requested type 'vf3' does "\n "not match actual type '" + this->get_flag_string()" (concatenated_string) ""Variant_t : requested type 'vf3' does "\n "not match actual type '"" (string_literal) ""Variant_t : requested type 'vf3' does "" (") """ (string_content) "Variant_t : requested type 'vf3' does " (") """ (string_literal) ""not match actual type '"" (") """ (string_content) "not match actual type '" (") """ (+) "+" (call_expression) "this->get_flag_string()" (field_expression) "this->get_flag_string" (identifier) "this" (->) "->" (field_identifier) "get_flag_string" (argument_list) "()" (() "(" ()) ")" (+) "+" (string_literal) ""'"" (") """ (string_content) "'" (") """ ()) ")" (;) ";" (}) "}" (labeled_statement) "glm::mat4& Variant_t::getMat4(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'mf4' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}" (statement_identifier) "glm" (ERROR) "::mat4& Variant_t:" (:) ":" (:) ":" (binary_expression) "mat4& Variant_t" (identifier) "mat4" (&) "&" (identifier) "Variant_t" (:) ":" (:) ":" (ERROR) "getMat4(void)" (macro_type_specifier) "getMat4(void)" (identifier) "getMat4" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'mf4' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}" ({) "{" (if_statement) "if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'mf4' does "\n "not match actual type '" + this->get_flag_string() + "'");" (if) "if" (parenthesized_expression) "(this->flag != FLAG_uint)" (() "(" (binary_expression) "this->flag != FLAG_uint" (field_expression) "this->flag" (identifier) "this" (->) "->" (field_identifier) "flag" (!=) "!=" (identifier) "FLAG_uint" ()) ")" (labeled_statement) "throw std::runtime_error(\n "Variant_t : requested type 'mf4' does "\n "not match actual type '" + this->get_flag_string() + "'");" (statement_identifier) "throw" (ERROR) "std:" (identifier) "std" (:) ":" (:) ":" (expression_statement) "runtime_error(\n "Variant_t : requested type 'mf4' does "\n "not match actual type '" + this->get_flag_string() + "'");" (call_expression) "runtime_error(\n "Variant_t : requested type 'mf4' does "\n "not match actual type '" + this->get_flag_string() + "'")" (identifier) "runtime_error" (argument_list) "(\n "Variant_t : requested type 'mf4' does "\n "not match actual type '" + this->get_flag_string() + "'")" (() "(" (binary_expression) ""Variant_t : requested type 'mf4' does "\n "not match actual type '" + this->get_flag_string() + "'"" (binary_expression) ""Variant_t : requested type 'mf4' does "\n "not match actual type '" + this->get_flag_string()" (concatenated_string) ""Variant_t : requested type 'mf4' does "\n "not match actual type '"" (string_literal) ""Variant_t : requested type 'mf4' does "" (") """ (string_content) "Variant_t : requested type 'mf4' does " (") """ (string_literal) ""not match actual type '"" (") """ (string_content) "not match actual type '" (") """ (+) "+" (call_expression) "this->get_flag_string()" (field_expression) "this->get_flag_string" (identifier) "this" (->) "->" (field_identifier) "get_flag_string" (argument_list) "()" (() "(" ()) ")" (+) "+" (string_literal) ""'"" (") """ (string_content) "'" (") """ ()) ")" (;) ";" (}) "}" (labeled_statement) "std::string& Variant_t::getString(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'str' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}" (statement_identifier) "std" (ERROR) "::string& Variant_t:" (:) ":" (:) ":" (binary_expression) "string& Variant_t" (identifier) "string" (&) "&" (identifier) "Variant_t" (:) ":" (:) ":" (ERROR) "getString(void)" (macro_type_specifier) "getString(void)" (identifier) "getString" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'str' does "\n "not match actual type '" + this->get_flag_string() + "'");\n}" ({) "{" (if_statement) "if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "Variant_t : requested type 'str' does "\n "not match actual type '" + this->get_flag_string() + "'");" (if) "if" (parenthesized_expression) "(this->flag != FLAG_uint)" (() "(" (binary_expression) "this->flag != FLAG_uint" (field_expression) "this->flag" (identifier) "this" (->) "->" (field_identifier) "flag" (!=) "!=" (identifier) "FLAG_uint" ()) ")" (labeled_statement) "throw std::runtime_error(\n "Variant_t : requested type 'str' does "\n "not match actual type '" + this->get_flag_string() + "'");" (statement_identifier) "throw" (ERROR) "std:" (identifier) "std" (:) ":" (:) ":" (expression_statement) "runtime_error(\n "Variant_t : requested type 'str' does "\n "not match actual type '" + this->get_flag_string() + "'");" (call_expression) "runtime_error(\n "Variant_t : requested type 'str' does "\n "not match actual type '" + this->get_flag_string() + "'")" (identifier) "runtime_error" (argument_list) "(\n "Variant_t : requested type 'str' does "\n "not match actual type '" + this->get_flag_string() + "'")" (() "(" (binary_expression) ""Variant_t : requested type 'str' does "\n "not match actual type '" + this->get_flag_string() + "'"" (binary_expression) ""Variant_t : requested type 'str' does "\n "not match actual type '" + this->get_flag_string()" (concatenated_string) ""Variant_t : requested type 'str' does "\n "not match actual type '"" (string_literal) ""Variant_t : requested type 'str' does "" (") """ (string_content) "Variant_t : requested type 'str' does " (") """ (string_literal) ""not match actual type '"" (") """ (string_content) "not match actual type '" (") """ (+) "+" (call_expression) "this->get_flag_string()" (field_expression) "this->get_flag_string" (identifier) "this" (->) "->" (field_identifier) "get_flag_string" (argument_list) "()" (() "(" ()) ")" (+) "+" (string_literal) ""'"" (") """ (string_content) "'" (") """ ()) ")" (;) ";" (}) "}"
943
46
{"language": "c", "success": true, "metadata": {"lines": 97, "avg_line_length": 28.79, "nodes": 530, "errors": 0, "source_hash": "0f7b70d4e1c031832f99f31434cfe264612c342c405b178ae8795983d26ca7a9", "categorized_nodes": 357}, "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 <iostream>\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": "<iostream>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 19}}, {"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": "preproc_def", "text": "#define GLFW_INCLUDE_NONE\n", "parent": null, "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": "GLFW_INCLUDE_NONE", "parent": 9, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 25}}, {"id": 12, "type": "preproc_include", "text": "#include <GLFW/glfw3.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<GLFW/glfw3.h>", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 23}}, {"id": 15, "type": "preproc_include", "text": "#include <GL/glew.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<GL/glew.h>", "parent": 15, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 20}}, {"id": 18, "type": "preproc_include", "text": "#include <glm/glm.hpp>\n", "parent": null, "children": [19, 20], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<glm/glm.hpp>", "parent": 18, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 22}}, {"id": 21, "type": "preproc_include", "text": "#include <glm/gtc/matrix_transform.hpp>\n", "parent": null, "children": [22, 23], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<glm/gtc/matrix_transform.hpp>", "parent": 21, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 39}}, {"id": 24, "type": "function_definition", "text": "class Variant_t {\nprivate:\n\n int flag;\n\n union {\n unsigned int _u;\n int _i;\n glm::vec3 _vf3;\n glm::mat4 _mf4;\n };\n\n std::string s;\n\n std::string get_flag_string(void);\n\npublic:\n\n static const int FLAG_uint = 0;\n static const int FLAG_int = 1;\n static const int FLAG_str = 2;\n static const int FLAG_vf3 = 3;\n static const int FLAG_mf4 = 4;\n\n Variant_t(unsigned int d);\n Variant_t(int d);\n Variant_t(std::string s);\n Variant_t(glm::vec3 v3);\n Variant_t(glm::mat4 m4);\n\n unsigned int& getUint(void);\n int& getInt(void);\n glm::vec3& getVec3(void);\n glm::mat4& getMat4(void);\n std::string& getString(void);\n\n}", "parent": null, "children": [25], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 25, "type": "identifier", "text": "Variant_t", "parent": 24, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 15}}, {"id": 26, "type": "labeled_statement", "text": "private:\n\n int flag;", "parent": 24, "children": [27], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 14, "column": 13}}, {"id": 27, "type": "declaration", "text": "int flag;", "parent": 26, "children": [28, 29], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 13}}, {"id": 28, "type": "primitive_type", "text": "int", "parent": 27, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 7}}, {"id": 29, "type": "identifier", "text": "flag", "parent": 27, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 12}}, {"id": 30, "type": "union_specifier", "text": "union {\n unsigned int _u;\n int _i;\n glm::vec3 _vf3;\n glm::mat4 _mf4;\n }", "parent": 24, "children": [31], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 21, "column": 5}}, {"id": 31, "type": "union", "text": "union", "parent": 30, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 9}}, {"id": 32, "type": "field_declaration", "text": "unsigned int _u;", "parent": 30, "children": [33, 36], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 24}}, {"id": 33, "type": "sized_type_specifier", "text": "unsigned int", "parent": 32, "children": [34, 35], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 20}}, {"id": 34, "type": "unsigned", "text": "unsigned", "parent": 33, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 16}}, {"id": 35, "type": "primitive_type", "text": "int", "parent": 33, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 20}}, {"id": 36, "type": "field_identifier", "text": "_u", "parent": 32, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 23}}, {"id": 37, "type": "field_declaration", "text": "int _i;", "parent": 30, "children": [38, 39], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 24}}, {"id": 38, "type": "primitive_type", "text": "int", "parent": 37, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 11}}, {"id": 39, "type": "field_identifier", "text": "_i", "parent": 37, "children": [], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 23}}, {"id": 40, "type": "field_declaration", "text": "glm::vec3 _vf3;", "parent": 30, "children": [41, 42, 44], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 26}}, {"id": 41, "type": "type_identifier", "text": "glm", "parent": 40, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 11}}, {"id": 42, "type": "ERROR", "text": "::vec3", "parent": 40, "children": [43], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 17}}, {"id": 43, "type": "field_identifier", "text": "vec3", "parent": 42, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 17}}, {"id": 44, "type": "field_identifier", "text": "_vf3", "parent": 40, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 25}}, {"id": 45, "type": "field_declaration", "text": "glm::mat4 _mf4;", "parent": 30, "children": [46, 47, 49], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 26}}, {"id": 46, "type": "type_identifier", "text": "glm", "parent": 45, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 11}}, {"id": 47, "type": "ERROR", "text": "::mat4", "parent": 45, "children": [48], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 17}}, {"id": 48, "type": "field_identifier", "text": "mat4", "parent": 47, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 17}}, {"id": 49, "type": "field_identifier", "text": "_mf4", "parent": 45, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 25}}, {"id": 50, "type": "labeled_statement", "text": "std::string s;", "parent": 24, "children": [51, 52], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 18}}, {"id": 51, "type": "statement_identifier", "text": "std", "parent": 50, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 7}}, {"id": 52, "type": "declaration", "text": "string s;", "parent": 50, "children": [53, 54], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 18}}, {"id": 53, "type": "type_identifier", "text": "string", "parent": 52, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 15}}, {"id": 54, "type": "identifier", "text": "s", "parent": 52, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 17}}, {"id": 55, "type": "labeled_statement", "text": "std::string get_flag_string(void);", "parent": 24, "children": [56, 57], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 38}}, {"id": 56, "type": "statement_identifier", "text": "std", "parent": 55, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 7}}, {"id": 57, "type": "declaration", "text": "string get_flag_string(void);", "parent": 55, "children": [58, 59], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 38}}, {"id": 58, "type": "type_identifier", "text": "string", "parent": 57, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 15}}, {"id": 59, "type": "function_declarator", "text": "get_flag_string(void)", "parent": 57, "children": [60, 61], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 37}}, {"id": 60, "type": "identifier", "text": "get_flag_string", "parent": 59, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 31}}, {"id": 61, "type": "parameter_list", "text": "(void)", "parent": 59, "children": [62], "start_point": {"row": 25, "column": 31}, "end_point": {"row": 25, "column": 37}}, {"id": 62, "type": "parameter_declaration", "text": "void", "parent": 61, "children": [63], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 36}}, {"id": 63, "type": "primitive_type", "text": "void", "parent": 62, "children": [], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 36}}, {"id": 64, "type": "labeled_statement", "text": "public:\n\n static const int FLAG_uint = 0;", "parent": 24, "children": [65], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 29, "column": 35}}, {"id": 65, "type": "declaration", "text": "static const int FLAG_uint = 0;", "parent": 64, "children": [66, 67], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 35}}, {"id": 66, "type": "primitive_type", "text": "int", "parent": 65, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 20}}, {"id": 67, "type": "init_declarator", "text": "FLAG_uint = 0", "parent": 65, "children": [68, 69, 70], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 34}}, {"id": 68, "type": "identifier", "text": "FLAG_uint", "parent": 67, "children": [], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 30}}, {"id": 69, "type": "=", "text": "=", "parent": 67, "children": [], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 32}}, {"id": 70, "type": "number_literal", "text": "0", "parent": 67, "children": [], "start_point": {"row": 29, "column": 33}, "end_point": {"row": 29, "column": 34}}, {"id": 71, "type": "declaration", "text": "static const int FLAG_int = 1;", "parent": 24, "children": [72, 73], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 35}}, {"id": 72, "type": "primitive_type", "text": "int", "parent": 71, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 20}}, {"id": 73, "type": "init_declarator", "text": "FLAG_int = 1", "parent": 71, "children": [74, 75, 76], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 34}}, {"id": 74, "type": "identifier", "text": "FLAG_int", "parent": 73, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 29}}, {"id": 75, "type": "=", "text": "=", "parent": 73, "children": [], "start_point": {"row": 30, "column": 31}, "end_point": {"row": 30, "column": 32}}, {"id": 76, "type": "number_literal", "text": "1", "parent": 73, "children": [], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 34}}, {"id": 77, "type": "declaration", "text": "static const int FLAG_str = 2;", "parent": 24, "children": [78, 79], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 35}}, {"id": 78, "type": "primitive_type", "text": "int", "parent": 77, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 20}}, {"id": 79, "type": "init_declarator", "text": "FLAG_str = 2", "parent": 77, "children": [80, 81, 82], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 34}}, {"id": 80, "type": "identifier", "text": "FLAG_str", "parent": 79, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 29}}, {"id": 81, "type": "=", "text": "=", "parent": 79, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 32}}, {"id": 82, "type": "number_literal", "text": "2", "parent": 79, "children": [], "start_point": {"row": 31, "column": 33}, "end_point": {"row": 31, "column": 34}}, {"id": 83, "type": "declaration", "text": "static const int FLAG_vf3 = 3;", "parent": 24, "children": [84, 85], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 35}}, {"id": 84, "type": "primitive_type", "text": "int", "parent": 83, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 20}}, {"id": 85, "type": "init_declarator", "text": "FLAG_vf3 = 3", "parent": 83, "children": [86, 87, 88], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 34}}, {"id": 86, "type": "identifier", "text": "FLAG_vf3", "parent": 85, "children": [], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 29}}, {"id": 87, "type": "=", "text": "=", "parent": 85, "children": [], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 32}}, {"id": 88, "type": "number_literal", "text": "3", "parent": 85, "children": [], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 34}}, {"id": 89, "type": "declaration", "text": "static const int FLAG_mf4 = 4;", "parent": 24, "children": [90, 91], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 35}}, {"id": 90, "type": "primitive_type", "text": "int", "parent": 89, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 20}}, {"id": 91, "type": "init_declarator", "text": "FLAG_mf4 = 4", "parent": 89, "children": [92, 93, 94], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 34}}, {"id": 92, "type": "identifier", "text": "FLAG_mf4", "parent": 91, "children": [], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 29}}, {"id": 93, "type": "=", "text": "=", "parent": 91, "children": [], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 32}}, {"id": 94, "type": "number_literal", "text": "4", "parent": 91, "children": [], "start_point": {"row": 33, "column": 33}, "end_point": {"row": 33, "column": 34}}, {"id": 95, "type": "macro_type_specifier", "text": "Variant_t(unsigned int d)", "parent": 24, "children": [96, 97, 101], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 29}}, {"id": 96, "type": "identifier", "text": "Variant_t", "parent": 95, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 13}}, {"id": 97, "type": "type_descriptor", "text": "unsigned int", "parent": 95, "children": [98], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 26}}, {"id": 98, "type": "sized_type_specifier", "text": "unsigned int", "parent": 97, "children": [99, 100], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 26}}, {"id": 99, "type": "unsigned", "text": "unsigned", "parent": 98, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 22}}, {"id": 100, "type": "primitive_type", "text": "int", "parent": 98, "children": [], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 26}}, {"id": 101, "type": "ERROR", "text": "d", "parent": 95, "children": [102], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 28}}, {"id": 102, "type": "identifier", "text": "d", "parent": 101, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 28}}, {"id": 103, "type": "macro_type_specifier", "text": "Variant_t(int d)", "parent": 24, "children": [104, 105, 107], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 29}}, {"id": 104, "type": "identifier", "text": "Variant_t", "parent": 103, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 13}}, {"id": 105, "type": "ERROR", "text": "int", "parent": 103, "children": [106], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 17}}, {"id": 106, "type": "primitive_type", "text": "int", "parent": 105, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 17}}, {"id": 107, "type": "type_descriptor", "text": "d", "parent": 103, "children": [108], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 28}}, {"id": 108, "type": "type_identifier", "text": "d", "parent": 107, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 28}}, {"id": 109, "type": "labeled_statement", "text": "Variant_t(std::string s);", "parent": 24, "children": [110, 111, 114], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 30}}, {"id": 110, "type": "statement_identifier", "text": "Variant_t", "parent": 109, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 13}}, {"id": 111, "type": "ERROR", "text": "(std:", "parent": 109, "children": [112], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 18}}, {"id": 112, "type": "type_descriptor", "text": "std", "parent": 111, "children": [113], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 17}}, {"id": 113, "type": "type_identifier", "text": "std", "parent": 112, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 17}}, {"id": 114, "type": "declaration", "text": "string s);", "parent": 109, "children": [115, 116], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 30}}, {"id": 115, "type": "type_identifier", "text": "string", "parent": 114, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 25}}, {"id": 116, "type": "identifier", "text": "s", "parent": 114, "children": [], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 28}}, {"id": 117, "type": "labeled_statement", "text": "Variant_t(glm::vec3 v3);", "parent": 24, "children": [118, 119, 122], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 31}}, {"id": 118, "type": "statement_identifier", "text": "Variant_t", "parent": 117, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 13}}, {"id": 119, "type": "ERROR", "text": "(glm:", "parent": 117, "children": [120], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 18}}, {"id": 120, "type": "type_descriptor", "text": "glm", "parent": 119, "children": [121], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 17}}, {"id": 121, "type": "type_identifier", "text": "glm", "parent": 120, "children": [], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 17}}, {"id": 122, "type": "declaration", "text": "vec3 v3);", "parent": 117, "children": [123, 124], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 31}}, {"id": 123, "type": "type_identifier", "text": "vec3", "parent": 122, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 23}}, {"id": 124, "type": "identifier", "text": "v3", "parent": 122, "children": [], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 29}}, {"id": 125, "type": "labeled_statement", "text": "Variant_t(glm::mat4 m4);", "parent": 24, "children": [126, 127, 130], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 31}}, {"id": 126, "type": "statement_identifier", "text": "Variant_t", "parent": 125, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 13}}, {"id": 127, "type": "ERROR", "text": "(glm:", "parent": 125, "children": [128], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 18}}, {"id": 128, "type": "type_descriptor", "text": "glm", "parent": 127, "children": [129], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 17}}, {"id": 129, "type": "type_identifier", "text": "glm", "parent": 128, "children": [], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 17}}, {"id": 130, "type": "declaration", "text": "mat4 m4);", "parent": 125, "children": [131, 132], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 31}}, {"id": 131, "type": "type_identifier", "text": "mat4", "parent": 130, "children": [], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 23}}, {"id": 132, "type": "identifier", "text": "m4", "parent": 130, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 29}}, {"id": 133, "type": "declaration", "text": "unsigned int& getUint(void);", "parent": 24, "children": [134, 137], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 32}}, {"id": 134, "type": "sized_type_specifier", "text": "unsigned int", "parent": 133, "children": [135, 136], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 16}}, {"id": 135, "type": "unsigned", "text": "unsigned", "parent": 134, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 12}}, {"id": 136, "type": "primitive_type", "text": "int", "parent": 134, "children": [], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 16}}, {"id": 137, "type": "function_declarator", "text": "getUint(void)", "parent": 133, "children": [138, 139], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 31}}, {"id": 138, "type": "identifier", "text": "getUint", "parent": 137, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 25}}, {"id": 139, "type": "parameter_list", "text": "(void)", "parent": 137, "children": [140], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 31}}, {"id": 140, "type": "parameter_declaration", "text": "void", "parent": 139, "children": [141], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 30}}, {"id": 141, "type": "primitive_type", "text": "void", "parent": 140, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 30}}, {"id": 142, "type": "declaration", "text": "int& getInt(void);", "parent": 24, "children": [143, 144], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 22}}, {"id": 143, "type": "primitive_type", "text": "int", "parent": 142, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 7}}, {"id": 144, "type": "function_declarator", "text": "getInt(void)", "parent": 142, "children": [145, 146], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 21}}, {"id": 145, "type": "identifier", "text": "getInt", "parent": 144, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 15}}, {"id": 146, "type": "parameter_list", "text": "(void)", "parent": 144, "children": [147], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 21}}, {"id": 147, "type": "parameter_declaration", "text": "void", "parent": 146, "children": [148], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 20}}, {"id": 148, "type": "primitive_type", "text": "void", "parent": 147, "children": [], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 20}}, {"id": 149, "type": "labeled_statement", "text": "glm::vec3& getVec3(void);", "parent": 24, "children": [150], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 29}}, {"id": 150, "type": "statement_identifier", "text": "glm", "parent": 149, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 7}}, {"id": 151, "type": "binary_expression", "text": "vec3& getVec3(void)", "parent": 149, "children": [152, 153], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 28}}, {"id": 152, "type": "identifier", "text": "vec3", "parent": 151, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 13}}, {"id": 153, "type": "call_expression", "text": "getVec3(void)", "parent": 151, "children": [154, 155], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 28}}, {"id": 154, "type": "identifier", "text": "getVec3", "parent": 153, "children": [], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 22}}, {"id": 155, "type": "argument_list", "text": "(void)", "parent": 153, "children": [156], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 28}}, {"id": 156, "type": "identifier", "text": "void", "parent": 155, "children": [], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 27}}, {"id": 157, "type": "labeled_statement", "text": "glm::mat4& getMat4(void);", "parent": 24, "children": [158], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 29}}, {"id": 158, "type": "statement_identifier", "text": "glm", "parent": 157, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 7}}, {"id": 159, "type": "binary_expression", "text": "mat4& getMat4(void)", "parent": 157, "children": [160, 161], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 28}}, {"id": 160, "type": "identifier", "text": "mat4", "parent": 159, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 13}}, {"id": 161, "type": "call_expression", "text": "getMat4(void)", "parent": 159, "children": [162, 163], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 28}}, {"id": 162, "type": "identifier", "text": "getMat4", "parent": 161, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 22}}, {"id": 163, "type": "argument_list", "text": "(void)", "parent": 161, "children": [164], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 28}}, {"id": 164, "type": "identifier", "text": "void", "parent": 163, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 27}}, {"id": 165, "type": "labeled_statement", "text": "std::string& getString(void);", "parent": 24, "children": [166], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 33}}, {"id": 166, "type": "statement_identifier", "text": "std", "parent": 165, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 7}}, {"id": 167, "type": "binary_expression", "text": "string& getString(void)", "parent": 165, "children": [168, 169], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 32}}, {"id": 168, "type": "identifier", "text": "string", "parent": 167, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 15}}, {"id": 169, "type": "call_expression", "text": "getString(void)", "parent": 167, "children": [170, 171], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 32}}, {"id": 170, "type": "identifier", "text": "getString", "parent": 169, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 26}}, {"id": 171, "type": "argument_list", "text": "(void)", "parent": 169, "children": [172], "start_point": {"row": 45, "column": 26}, "end_point": {"row": 45, "column": 32}}, {"id": 172, "type": "identifier", "text": "void", "parent": 171, "children": [], "start_point": {"row": 45, "column": 27}, "end_point": {"row": 45, "column": 31}}, {"id": 173, "type": "labeled_statement", "text": "std::string Variant_t::get_flag_string(void) {\n switch(this->flag) {\n case FLAG_uint: return \"uint\"; break;\n case FLAG_int: return \"int\"; break;\n case FLAG_str: return \"str\"; break;\n case FLAG_vf3: return \"vf3\"; break;\n case FLAG_mf4: return \"mf4\"; break;\n default:\n throw std::runtime_error(\"Variant_t : unknown inner type\"); \n }\n}", "parent": null, "children": [174, 175, 178], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 174, "type": "statement_identifier", "text": "std", "parent": 173, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 3}}, {"id": 175, "type": "ERROR", "text": "::string Variant_t:", "parent": 173, "children": [176, 177], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 22}}, {"id": 176, "type": "type_identifier", "text": "string", "parent": 175, "children": [], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 11}}, {"id": 177, "type": "identifier", "text": "Variant_t", "parent": 175, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 21}}, {"id": 178, "type": "ERROR", "text": "get_flag_string(void)", "parent": 173, "children": [179], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 44}}, {"id": 179, "type": "macro_type_specifier", "text": "get_flag_string(void)", "parent": 178, "children": [180, 181], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 44}}, {"id": 180, "type": "identifier", "text": "get_flag_string", "parent": 179, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 38}}, {"id": 181, "type": "type_descriptor", "text": "void", "parent": 179, "children": [182], "start_point": {"row": 49, "column": 39}, "end_point": {"row": 49, "column": 43}}, {"id": 182, "type": "primitive_type", "text": "void", "parent": 181, "children": [], "start_point": {"row": 49, "column": 39}, "end_point": {"row": 49, "column": 43}}, {"id": 183, "type": "switch_statement", "text": "switch(this->flag) {\n case FLAG_uint: return \"uint\"; break;\n case FLAG_int: return \"int\"; break;\n case FLAG_str: return \"str\"; break;\n case FLAG_vf3: return \"vf3\"; break;\n case FLAG_mf4: return \"mf4\"; break;\n default:\n throw std::runtime_error(\"Variant_t : unknown inner type\"); \n }", "parent": 173, "children": [184, 185], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 58, "column": 5}}, {"id": 184, "type": "switch", "text": "switch", "parent": 183, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 10}}, {"id": 185, "type": "parenthesized_expression", "text": "(this->flag)", "parent": 183, "children": [186], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 22}}, {"id": 186, "type": "field_expression", "text": "this->flag", "parent": 185, "children": [187, 188], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 21}}, {"id": 187, "type": "identifier", "text": "this", "parent": 186, "children": [], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 15}}, {"id": 188, "type": "field_identifier", "text": "flag", "parent": 186, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 21}}, {"id": 189, "type": "case_statement", "text": "case FLAG_uint: return \"uint\"; break;", "parent": 183, "children": [190, 191, 192, 194], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 45}}, {"id": 190, "type": "case", "text": "case", "parent": 189, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 12}}, {"id": 191, "type": "identifier", "text": "FLAG_uint", "parent": 189, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 22}}, {"id": 192, "type": "return_statement", "text": "return \"uint\";", "parent": 189, "children": [193], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 38}}, {"id": 193, "type": "string_literal", "text": "\"uint\"", "parent": 192, "children": [], "start_point": {"row": 51, "column": 31}, "end_point": {"row": 51, "column": 37}}, {"id": 194, "type": "break_statement", "text": "break;", "parent": 189, "children": [195], "start_point": {"row": 51, "column": 39}, "end_point": {"row": 51, "column": 45}}, {"id": 195, "type": "break", "text": "break", "parent": 194, "children": [], "start_point": {"row": 51, "column": 39}, "end_point": {"row": 51, "column": 44}}, {"id": 196, "type": "case_statement", "text": "case FLAG_int: return \"int\"; break;", "parent": 183, "children": [197, 198, 199, 201], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 45}}, {"id": 197, "type": "case", "text": "case", "parent": 196, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 12}}, {"id": 198, "type": "identifier", "text": "FLAG_int", "parent": 196, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 21}}, {"id": 199, "type": "return_statement", "text": "return \"int\";", "parent": 196, "children": [200], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 37}}, {"id": 200, "type": "string_literal", "text": "\"int\"", "parent": 199, "children": [], "start_point": {"row": 52, "column": 31}, "end_point": {"row": 52, "column": 36}}, {"id": 201, "type": "break_statement", "text": "break;", "parent": 196, "children": [202], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 45}}, {"id": 202, "type": "break", "text": "break", "parent": 201, "children": [], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 44}}, {"id": 203, "type": "case_statement", "text": "case FLAG_str: return \"str\"; break;", "parent": 183, "children": [204, 205, 206, 208], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 45}}, {"id": 204, "type": "case", "text": "case", "parent": 203, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 12}}, {"id": 205, "type": "identifier", "text": "FLAG_str", "parent": 203, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 21}}, {"id": 206, "type": "return_statement", "text": "return \"str\";", "parent": 203, "children": [207], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 37}}, {"id": 207, "type": "string_literal", "text": "\"str\"", "parent": 206, "children": [], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 36}}, {"id": 208, "type": "break_statement", "text": "break;", "parent": 203, "children": [209], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 45}}, {"id": 209, "type": "break", "text": "break", "parent": 208, "children": [], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 44}}, {"id": 210, "type": "case_statement", "text": "case FLAG_vf3: return \"vf3\"; break;", "parent": 183, "children": [211, 212, 213, 215], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 45}}, {"id": 211, "type": "case", "text": "case", "parent": 210, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 12}}, {"id": 212, "type": "identifier", "text": "FLAG_vf3", "parent": 210, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 21}}, {"id": 213, "type": "return_statement", "text": "return \"vf3\";", "parent": 210, "children": [214], "start_point": {"row": 54, "column": 24}, "end_point": {"row": 54, "column": 37}}, {"id": 214, "type": "string_literal", "text": "\"vf3\"", "parent": 213, "children": [], "start_point": {"row": 54, "column": 31}, "end_point": {"row": 54, "column": 36}}, {"id": 215, "type": "break_statement", "text": "break;", "parent": 210, "children": [216], "start_point": {"row": 54, "column": 39}, "end_point": {"row": 54, "column": 45}}, {"id": 216, "type": "break", "text": "break", "parent": 215, "children": [], "start_point": {"row": 54, "column": 39}, "end_point": {"row": 54, "column": 44}}, {"id": 217, "type": "case_statement", "text": "case FLAG_mf4: return \"mf4\"; break;", "parent": 183, "children": [218, 219, 220, 222], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 45}}, {"id": 218, "type": "case", "text": "case", "parent": 217, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 12}}, {"id": 219, "type": "identifier", "text": "FLAG_mf4", "parent": 217, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 21}}, {"id": 220, "type": "return_statement", "text": "return \"mf4\";", "parent": 217, "children": [221], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 37}}, {"id": 221, "type": "string_literal", "text": "\"mf4\"", "parent": 220, "children": [], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 36}}, {"id": 222, "type": "break_statement", "text": "break;", "parent": 217, "children": [223], "start_point": {"row": 55, "column": 39}, "end_point": {"row": 55, "column": 45}}, {"id": 223, "type": "break", "text": "break", "parent": 222, "children": [], "start_point": {"row": 55, "column": 39}, "end_point": {"row": 55, "column": 44}}, {"id": 224, "type": "case_statement", "text": "default:\n throw std::runtime_error(\"Variant_t : unknown inner type\");", "parent": 183, "children": [225, 226], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 57, "column": 71}}, {"id": 225, "type": "default", "text": "default", "parent": 224, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 15}}, {"id": 226, "type": "ERROR", "text": ":\n throw std:", "parent": 224, "children": [227], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 57, "column": 22}}, {"id": 227, "type": "identifier", "text": "std", "parent": 226, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 21}}, {"id": 228, "type": "call_expression", "text": "runtime_error(\"Variant_t : unknown inner type\")", "parent": 224, "children": [229, 230], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 70}}, {"id": 229, "type": "identifier", "text": "runtime_error", "parent": 228, "children": [], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 36}}, {"id": 230, "type": "argument_list", "text": "(\"Variant_t : unknown inner type\")", "parent": 228, "children": [231], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 70}}, {"id": 231, "type": "string_literal", "text": "\"Variant_t : unknown inner type\"", "parent": 230, "children": [], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 69}}, {"id": 232, "type": "labeled_statement", "text": "Variant_t::Variant_t(unsigned int d) {\n this->flag = FLAG_uint;\n this->_u = d;\n}", "parent": null, "children": [233, 234], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 233, "type": "statement_identifier", "text": "Variant_t", "parent": 232, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 9}}, {"id": 234, "type": "ERROR", "text": ":Variant_t(unsigned int d)", "parent": 232, "children": [235], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 36}}, {"id": 235, "type": "macro_type_specifier", "text": "Variant_t(unsigned int d)", "parent": 234, "children": [236, 237, 241], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 36}}, {"id": 236, "type": "identifier", "text": "Variant_t", "parent": 235, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 20}}, {"id": 237, "type": "type_descriptor", "text": "unsigned int", "parent": 235, "children": [238], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 33}}, {"id": 238, "type": "sized_type_specifier", "text": "unsigned int", "parent": 237, "children": [239, 240], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 33}}, {"id": 239, "type": "unsigned", "text": "unsigned", "parent": 238, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 29}}, {"id": 240, "type": "primitive_type", "text": "int", "parent": 238, "children": [], "start_point": {"row": 61, "column": 30}, "end_point": {"row": 61, "column": 33}}, {"id": 241, "type": "ERROR", "text": "d", "parent": 235, "children": [242], "start_point": {"row": 61, "column": 34}, "end_point": {"row": 61, "column": 35}}, {"id": 242, "type": "identifier", "text": "d", "parent": 241, "children": [], "start_point": {"row": 61, "column": 34}, "end_point": {"row": 61, "column": 35}}, {"id": 243, "type": "assignment_expression", "text": "this->flag = FLAG_uint", "parent": 232, "children": [244, 247, 248], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 26}}, {"id": 244, "type": "field_expression", "text": "this->flag", "parent": 243, "children": [245, 246], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 14}}, {"id": 245, "type": "identifier", "text": "this", "parent": 244, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 8}}, {"id": 246, "type": "field_identifier", "text": "flag", "parent": 244, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 14}}, {"id": 247, "type": "=", "text": "=", "parent": 243, "children": [], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 16}}, {"id": 248, "type": "identifier", "text": "FLAG_uint", "parent": 243, "children": [], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 26}}, {"id": 249, "type": "assignment_expression", "text": "this->_u = d", "parent": 232, "children": [250, 253, 254], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 16}}, {"id": 250, "type": "field_expression", "text": "this->_u", "parent": 249, "children": [251, 252], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 12}}, {"id": 251, "type": "identifier", "text": "this", "parent": 250, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 8}}, {"id": 252, "type": "field_identifier", "text": "_u", "parent": 250, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 12}}, {"id": 253, "type": "=", "text": "=", "parent": 249, "children": [], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 63, "column": 14}}, {"id": 254, "type": "identifier", "text": "d", "parent": 249, "children": [], "start_point": {"row": 63, "column": 15}, "end_point": {"row": 63, "column": 16}}, {"id": 255, "type": "labeled_statement", "text": "Variant_t::Variant_t(int d) {\n this->flag = FLAG_int;\n this->_i = d;\n}", "parent": null, "children": [256, 257], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 69, "column": 1}}, {"id": 256, "type": "statement_identifier", "text": "Variant_t", "parent": 255, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 9}}, {"id": 257, "type": "ERROR", "text": ":Variant_t(int d)", "parent": 255, "children": [258], "start_point": {"row": 66, "column": 10}, "end_point": {"row": 66, "column": 27}}, {"id": 258, "type": "macro_type_specifier", "text": "Variant_t(int d)", "parent": 257, "children": [259, 260, 262], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 27}}, {"id": 259, "type": "identifier", "text": "Variant_t", "parent": 258, "children": [], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 20}}, {"id": 260, "type": "type_descriptor", "text": "int", "parent": 258, "children": [261], "start_point": {"row": 66, "column": 21}, "end_point": {"row": 66, "column": 24}}, {"id": 261, "type": "primitive_type", "text": "int", "parent": 260, "children": [], "start_point": {"row": 66, "column": 21}, "end_point": {"row": 66, "column": 24}}, {"id": 262, "type": "ERROR", "text": "d", "parent": 258, "children": [263], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 26}}, {"id": 263, "type": "identifier", "text": "d", "parent": 262, "children": [], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 26}}, {"id": 264, "type": "assignment_expression", "text": "this->flag = FLAG_int", "parent": 255, "children": [265, 268, 269], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 25}}, {"id": 265, "type": "field_expression", "text": "this->flag", "parent": 264, "children": [266, 267], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 14}}, {"id": 266, "type": "identifier", "text": "this", "parent": 265, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 8}}, {"id": 267, "type": "field_identifier", "text": "flag", "parent": 265, "children": [], "start_point": {"row": 67, "column": 10}, "end_point": {"row": 67, "column": 14}}, {"id": 268, "type": "=", "text": "=", "parent": 264, "children": [], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 16}}, {"id": 269, "type": "identifier", "text": "FLAG_int", "parent": 264, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 25}}, {"id": 270, "type": "assignment_expression", "text": "this->_i = d", "parent": 255, "children": [271, 274, 275], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 16}}, {"id": 271, "type": "field_expression", "text": "this->_i", "parent": 270, "children": [272, 273], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 12}}, {"id": 272, "type": "identifier", "text": "this", "parent": 271, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 8}}, {"id": 273, "type": "field_identifier", "text": "_i", "parent": 271, "children": [], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 12}}, {"id": 274, "type": "=", "text": "=", "parent": 270, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 14}}, {"id": 275, "type": "identifier", "text": "d", "parent": 270, "children": [], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 16}}, {"id": 276, "type": "labeled_statement", "text": "Variant_t::Variant_t(std::string s) {\n this->flag = FLAG_str;\n this->s = s;\n}", "parent": null, "children": [277, 278], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 74, "column": 1}}, {"id": 277, "type": "statement_identifier", "text": "Variant_t", "parent": 276, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 9}}, {"id": 278, "type": "labeled_statement", "text": "Variant_t(std::string s) {\n this->flag = FLAG_str;\n this->s = s;\n}", "parent": 276, "children": [279, 280, 283], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 74, "column": 1}}, {"id": 279, "type": "statement_identifier", "text": "Variant_t", "parent": 278, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 20}}, {"id": 280, "type": "ERROR", "text": "(std:", "parent": 278, "children": [281], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 25}}, {"id": 281, "type": "type_descriptor", "text": "std", "parent": 280, "children": [282], "start_point": {"row": 71, "column": 21}, "end_point": {"row": 71, "column": 24}}, {"id": 282, "type": "type_identifier", "text": "std", "parent": 281, "children": [], "start_point": {"row": 71, "column": 21}, "end_point": {"row": 71, "column": 24}}, {"id": 283, "type": "ERROR", "text": "string s)", "parent": 278, "children": [284, 285], "start_point": {"row": 71, "column": 26}, "end_point": {"row": 71, "column": 35}}, {"id": 284, "type": "type_identifier", "text": "string", "parent": 283, "children": [], "start_point": {"row": 71, "column": 26}, "end_point": {"row": 71, "column": 32}}, {"id": 285, "type": "identifier", "text": "s", "parent": 283, "children": [], "start_point": {"row": 71, "column": 33}, "end_point": {"row": 71, "column": 34}}, {"id": 286, "type": "assignment_expression", "text": "this->flag = FLAG_str", "parent": 278, "children": [287, 290, 291], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 25}}, {"id": 287, "type": "field_expression", "text": "this->flag", "parent": 286, "children": [288, 289], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 14}}, {"id": 288, "type": "identifier", "text": "this", "parent": 287, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 8}}, {"id": 289, "type": "field_identifier", "text": "flag", "parent": 287, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 14}}, {"id": 290, "type": "=", "text": "=", "parent": 286, "children": [], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 16}}, {"id": 291, "type": "identifier", "text": "FLAG_str", "parent": 286, "children": [], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 25}}, {"id": 292, "type": "assignment_expression", "text": "this->s = s", "parent": 278, "children": [293, 296, 297], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 15}}, {"id": 293, "type": "field_expression", "text": "this->s", "parent": 292, "children": [294, 295], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 11}}, {"id": 294, "type": "identifier", "text": "this", "parent": 293, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 8}}, {"id": 295, "type": "field_identifier", "text": "s", "parent": 293, "children": [], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 11}}, {"id": 296, "type": "=", "text": "=", "parent": 292, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 13}}, {"id": 297, "type": "identifier", "text": "s", "parent": 292, "children": [], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 15}}, {"id": 298, "type": "labeled_statement", "text": "Variant_t::Variant_t(glm::vec3 v3) {\n this->flag = FLAG_vf3;\n this->_vf3 = v3;\n}", "parent": null, "children": [299, 300], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 79, "column": 1}}, {"id": 299, "type": "statement_identifier", "text": "Variant_t", "parent": 298, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 9}}, {"id": 300, "type": "labeled_statement", "text": "Variant_t(glm::vec3 v3) {\n this->flag = FLAG_vf3;\n this->_vf3 = v3;\n}", "parent": 298, "children": [301, 302, 305], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 79, "column": 1}}, {"id": 301, "type": "statement_identifier", "text": "Variant_t", "parent": 300, "children": [], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 20}}, {"id": 302, "type": "ERROR", "text": "(glm:", "parent": 300, "children": [303], "start_point": {"row": 76, "column": 20}, "end_point": {"row": 76, "column": 25}}, {"id": 303, "type": "type_descriptor", "text": "glm", "parent": 302, "children": [304], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 24}}, {"id": 304, "type": "type_identifier", "text": "glm", "parent": 303, "children": [], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 24}}, {"id": 305, "type": "ERROR", "text": "vec3 v3)", "parent": 300, "children": [306, 307], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 34}}, {"id": 306, "type": "type_identifier", "text": "vec3", "parent": 305, "children": [], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 30}}, {"id": 307, "type": "identifier", "text": "v3", "parent": 305, "children": [], "start_point": {"row": 76, "column": 31}, "end_point": {"row": 76, "column": 33}}, {"id": 308, "type": "assignment_expression", "text": "this->flag = FLAG_vf3", "parent": 300, "children": [309, 312, 313], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 25}}, {"id": 309, "type": "field_expression", "text": "this->flag", "parent": 308, "children": [310, 311], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 14}}, {"id": 310, "type": "identifier", "text": "this", "parent": 309, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 8}}, {"id": 311, "type": "field_identifier", "text": "flag", "parent": 309, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 14}}, {"id": 312, "type": "=", "text": "=", "parent": 308, "children": [], "start_point": {"row": 77, "column": 15}, "end_point": {"row": 77, "column": 16}}, {"id": 313, "type": "identifier", "text": "FLAG_vf3", "parent": 308, "children": [], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 25}}, {"id": 314, "type": "assignment_expression", "text": "this->_vf3 = v3", "parent": 300, "children": [315, 318, 319], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 19}}, {"id": 315, "type": "field_expression", "text": "this->_vf3", "parent": 314, "children": [316, 317], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 14}}, {"id": 316, "type": "identifier", "text": "this", "parent": 315, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 8}}, {"id": 317, "type": "field_identifier", "text": "_vf3", "parent": 315, "children": [], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 14}}, {"id": 318, "type": "=", "text": "=", "parent": 314, "children": [], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 16}}, {"id": 319, "type": "identifier", "text": "v3", "parent": 314, "children": [], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 19}}, {"id": 320, "type": "labeled_statement", "text": "Variant_t::Variant_t(glm::mat4 m4) {\n this->flag = FLAG_mf4;\n this->_mf4 = m4;\n}", "parent": null, "children": [321, 322], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 84, "column": 1}}, {"id": 321, "type": "statement_identifier", "text": "Variant_t", "parent": 320, "children": [], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 9}}, {"id": 322, "type": "labeled_statement", "text": "Variant_t(glm::mat4 m4) {\n this->flag = FLAG_mf4;\n this->_mf4 = m4;\n}", "parent": 320, "children": [323, 324, 327], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 84, "column": 1}}, {"id": 323, "type": "statement_identifier", "text": "Variant_t", "parent": 322, "children": [], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 81, "column": 20}}, {"id": 324, "type": "ERROR", "text": "(glm:", "parent": 322, "children": [325], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 25}}, {"id": 325, "type": "type_descriptor", "text": "glm", "parent": 324, "children": [326], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 24}}, {"id": 326, "type": "type_identifier", "text": "glm", "parent": 325, "children": [], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 24}}, {"id": 327, "type": "ERROR", "text": "mat4 m4)", "parent": 322, "children": [328, 329], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 34}}, {"id": 328, "type": "type_identifier", "text": "mat4", "parent": 327, "children": [], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 30}}, {"id": 329, "type": "identifier", "text": "m4", "parent": 327, "children": [], "start_point": {"row": 81, "column": 31}, "end_point": {"row": 81, "column": 33}}, {"id": 330, "type": "assignment_expression", "text": "this->flag = FLAG_mf4", "parent": 322, "children": [331, 334, 335], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 25}}, {"id": 331, "type": "field_expression", "text": "this->flag", "parent": 330, "children": [332, 333], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 14}}, {"id": 332, "type": "identifier", "text": "this", "parent": 331, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 8}}, {"id": 333, "type": "field_identifier", "text": "flag", "parent": 331, "children": [], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 14}}, {"id": 334, "type": "=", "text": "=", "parent": 330, "children": [], "start_point": {"row": 82, "column": 15}, "end_point": {"row": 82, "column": 16}}, {"id": 335, "type": "identifier", "text": "FLAG_mf4", "parent": 330, "children": [], "start_point": {"row": 82, "column": 17}, "end_point": {"row": 82, "column": 25}}, {"id": 336, "type": "assignment_expression", "text": "this->_mf4 = m4", "parent": 322, "children": [337, 340, 341], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 19}}, {"id": 337, "type": "field_expression", "text": "this->_mf4", "parent": 336, "children": [338, 339], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 14}}, {"id": 338, "type": "identifier", "text": "this", "parent": 337, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 8}}, {"id": 339, "type": "field_identifier", "text": "_mf4", "parent": 337, "children": [], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 14}}, {"id": 340, "type": "=", "text": "=", "parent": 336, "children": [], "start_point": {"row": 83, "column": 15}, "end_point": {"row": 83, "column": 16}}, {"id": 341, "type": "identifier", "text": "m4", "parent": 336, "children": [], "start_point": {"row": 83, "column": 17}, "end_point": {"row": 83, "column": 19}}, {"id": 342, "type": "function_definition", "text": "unsigned int& Variant_t::getUint(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'uint' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");\n}", "parent": null, "children": [343, 346, 348], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 91, "column": 1}}, {"id": 343, "type": "sized_type_specifier", "text": "unsigned int", "parent": 342, "children": [344, 345], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 12}}, {"id": 344, "type": "unsigned", "text": "unsigned", "parent": 343, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 8}}, {"id": 345, "type": "primitive_type", "text": "int", "parent": 343, "children": [], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 12}}, {"id": 346, "type": "ERROR", "text": "& Variant_t::", "parent": 342, "children": [347], "start_point": {"row": 86, "column": 12}, "end_point": {"row": 86, "column": 25}}, {"id": 347, "type": "identifier", "text": "Variant_t", "parent": 346, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 23}}, {"id": 348, "type": "function_declarator", "text": "getUint(void)", "parent": 342, "children": [349, 350], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 38}}, {"id": 349, "type": "identifier", "text": "getUint", "parent": 348, "children": [], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 32}}, {"id": 350, "type": "parameter_list", "text": "(void)", "parent": 348, "children": [351], "start_point": {"row": 86, "column": 32}, "end_point": {"row": 86, "column": 38}}, {"id": 351, "type": "parameter_declaration", "text": "void", "parent": 350, "children": [352], "start_point": {"row": 86, "column": 33}, "end_point": {"row": 86, "column": 37}}, {"id": 352, "type": "primitive_type", "text": "void", "parent": 351, "children": [], "start_point": {"row": 86, "column": 33}, "end_point": {"row": 86, "column": 37}}, {"id": 353, "type": "if_statement", "text": "if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'uint' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");", "parent": 342, "children": [354, 361], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 90, "column": 71}}, {"id": 354, "type": "parenthesized_expression", "text": "(this->flag != FLAG_uint)", "parent": 353, "children": [355], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 31}}, {"id": 355, "type": "binary_expression", "text": "this->flag != FLAG_uint", "parent": 354, "children": [356, 359, 360], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 30}}, {"id": 356, "type": "field_expression", "text": "this->flag", "parent": 355, "children": [357, 358], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 17}}, {"id": 357, "type": "identifier", "text": "this", "parent": 356, "children": [], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 11}}, {"id": 358, "type": "field_identifier", "text": "flag", "parent": 356, "children": [], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 17}}, {"id": 359, "type": "!=", "text": "!=", "parent": 355, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 20}}, {"id": 360, "type": "identifier", "text": "FLAG_uint", "parent": 355, "children": [], "start_point": {"row": 87, "column": 21}, "end_point": {"row": 87, "column": 30}}, {"id": 361, "type": "labeled_statement", "text": "throw std::runtime_error(\n \"Variant_t : requested type 'uint' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");", "parent": 353, "children": [362], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 90, "column": 71}}, {"id": 362, "type": "ERROR", "text": "std:", "parent": 361, "children": [363], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 18}}, {"id": 363, "type": "identifier", "text": "std", "parent": 362, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 17}}, {"id": 364, "type": "call_expression", "text": "runtime_error(\n \"Variant_t : requested type 'uint' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\")", "parent": 361, "children": [365, 366], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 90, "column": 70}}, {"id": 365, "type": "identifier", "text": "runtime_error", "parent": 364, "children": [], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 32}}, {"id": 366, "type": "argument_list", "text": "(\n \"Variant_t : requested type 'uint' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\")", "parent": 364, "children": [367], "start_point": {"row": 88, "column": 32}, "end_point": {"row": 90, "column": 70}}, {"id": 367, "type": "binary_expression", "text": "\"Variant_t : requested type 'uint' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\"", "parent": 366, "children": [368, 378, 379], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 90, "column": 69}}, {"id": 368, "type": "binary_expression", "text": "\"Variant_t : requested type 'uint' does \"\n \"not match actual type '\" + this->get_flag_string()", "parent": 367, "children": [369, 372, 373], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 90, "column": 63}}, {"id": 369, "type": "concatenated_string", "text": "\"Variant_t : requested type 'uint' does \"\n \"not match actual type '\"", "parent": 368, "children": [370, 371], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 90, "column": 37}}, {"id": 370, "type": "string_literal", "text": "\"Variant_t : requested type 'uint' does \"", "parent": 369, "children": [], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 53}}, {"id": 371, "type": "string_literal", "text": "\"not match actual type '\"", "parent": 369, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 37}}, {"id": 372, "type": "+", "text": "+", "parent": 368, "children": [], "start_point": {"row": 90, "column": 38}, "end_point": {"row": 90, "column": 39}}, {"id": 373, "type": "call_expression", "text": "this->get_flag_string()", "parent": 368, "children": [374, 377], "start_point": {"row": 90, "column": 40}, "end_point": {"row": 90, "column": 63}}, {"id": 374, "type": "field_expression", "text": "this->get_flag_string", "parent": 373, "children": [375, 376], "start_point": {"row": 90, "column": 40}, "end_point": {"row": 90, "column": 61}}, {"id": 375, "type": "identifier", "text": "this", "parent": 374, "children": [], "start_point": {"row": 90, "column": 40}, "end_point": {"row": 90, "column": 44}}, {"id": 376, "type": "field_identifier", "text": "get_flag_string", "parent": 374, "children": [], "start_point": {"row": 90, "column": 46}, "end_point": {"row": 90, "column": 61}}, {"id": 377, "type": "argument_list", "text": "()", "parent": 373, "children": [], "start_point": {"row": 90, "column": 61}, "end_point": {"row": 90, "column": 63}}, {"id": 378, "type": "+", "text": "+", "parent": 367, "children": [], "start_point": {"row": 90, "column": 64}, "end_point": {"row": 90, "column": 65}}, {"id": 379, "type": "string_literal", "text": "\"'\"", "parent": 367, "children": [], "start_point": {"row": 90, "column": 66}, "end_point": {"row": 90, "column": 69}}, {"id": 380, "type": "function_definition", "text": "int& Variant_t::getInt(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'int' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");\n}", "parent": null, "children": [381, 382, 384], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 98, "column": 1}}, {"id": 381, "type": "primitive_type", "text": "int", "parent": 380, "children": [], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 3}}, {"id": 382, "type": "ERROR", "text": "& Variant_t::", "parent": 380, "children": [383], "start_point": {"row": 93, "column": 3}, "end_point": {"row": 93, "column": 16}}, {"id": 383, "type": "identifier", "text": "Variant_t", "parent": 382, "children": [], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 14}}, {"id": 384, "type": "function_declarator", "text": "getInt(void)", "parent": 380, "children": [385, 386], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 28}}, {"id": 385, "type": "identifier", "text": "getInt", "parent": 384, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 22}}, {"id": 386, "type": "parameter_list", "text": "(void)", "parent": 384, "children": [387], "start_point": {"row": 93, "column": 22}, "end_point": {"row": 93, "column": 28}}, {"id": 387, "type": "parameter_declaration", "text": "void", "parent": 386, "children": [388], "start_point": {"row": 93, "column": 23}, "end_point": {"row": 93, "column": 27}}, {"id": 388, "type": "primitive_type", "text": "void", "parent": 387, "children": [], "start_point": {"row": 93, "column": 23}, "end_point": {"row": 93, "column": 27}}, {"id": 389, "type": "if_statement", "text": "if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'int' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");", "parent": 380, "children": [390, 397], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 97, "column": 71}}, {"id": 390, "type": "parenthesized_expression", "text": "(this->flag != FLAG_uint)", "parent": 389, "children": [391], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 31}}, {"id": 391, "type": "binary_expression", "text": "this->flag != FLAG_uint", "parent": 390, "children": [392, 395, 396], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 30}}, {"id": 392, "type": "field_expression", "text": "this->flag", "parent": 391, "children": [393, 394], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 17}}, {"id": 393, "type": "identifier", "text": "this", "parent": 392, "children": [], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 11}}, {"id": 394, "type": "field_identifier", "text": "flag", "parent": 392, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 17}}, {"id": 395, "type": "!=", "text": "!=", "parent": 391, "children": [], "start_point": {"row": 94, "column": 18}, "end_point": {"row": 94, "column": 20}}, {"id": 396, "type": "identifier", "text": "FLAG_uint", "parent": 391, "children": [], "start_point": {"row": 94, "column": 21}, "end_point": {"row": 94, "column": 30}}, {"id": 397, "type": "labeled_statement", "text": "throw std::runtime_error(\n \"Variant_t : requested type 'int' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");", "parent": 389, "children": [398], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 97, "column": 71}}, {"id": 398, "type": "ERROR", "text": "std:", "parent": 397, "children": [399], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 18}}, {"id": 399, "type": "identifier", "text": "std", "parent": 398, "children": [], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 17}}, {"id": 400, "type": "call_expression", "text": "runtime_error(\n \"Variant_t : requested type 'int' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\")", "parent": 397, "children": [401, 402], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 97, "column": 70}}, {"id": 401, "type": "identifier", "text": "runtime_error", "parent": 400, "children": [], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 32}}, {"id": 402, "type": "argument_list", "text": "(\n \"Variant_t : requested type 'int' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\")", "parent": 400, "children": [403], "start_point": {"row": 95, "column": 32}, "end_point": {"row": 97, "column": 70}}, {"id": 403, "type": "binary_expression", "text": "\"Variant_t : requested type 'int' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\"", "parent": 402, "children": [404, 414, 415], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 97, "column": 69}}, {"id": 404, "type": "binary_expression", "text": "\"Variant_t : requested type 'int' does \"\n \"not match actual type '\" + this->get_flag_string()", "parent": 403, "children": [405, 408, 409], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 97, "column": 63}}, {"id": 405, "type": "concatenated_string", "text": "\"Variant_t : requested type 'int' does \"\n \"not match actual type '\"", "parent": 404, "children": [406, 407], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 97, "column": 37}}, {"id": 406, "type": "string_literal", "text": "\"Variant_t : requested type 'int' does \"", "parent": 405, "children": [], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 52}}, {"id": 407, "type": "string_literal", "text": "\"not match actual type '\"", "parent": 405, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 37}}, {"id": 408, "type": "+", "text": "+", "parent": 404, "children": [], "start_point": {"row": 97, "column": 38}, "end_point": {"row": 97, "column": 39}}, {"id": 409, "type": "call_expression", "text": "this->get_flag_string()", "parent": 404, "children": [410, 413], "start_point": {"row": 97, "column": 40}, "end_point": {"row": 97, "column": 63}}, {"id": 410, "type": "field_expression", "text": "this->get_flag_string", "parent": 409, "children": [411, 412], "start_point": {"row": 97, "column": 40}, "end_point": {"row": 97, "column": 61}}, {"id": 411, "type": "identifier", "text": "this", "parent": 410, "children": [], "start_point": {"row": 97, "column": 40}, "end_point": {"row": 97, "column": 44}}, {"id": 412, "type": "field_identifier", "text": "get_flag_string", "parent": 410, "children": [], "start_point": {"row": 97, "column": 46}, "end_point": {"row": 97, "column": 61}}, {"id": 413, "type": "argument_list", "text": "()", "parent": 409, "children": [], "start_point": {"row": 97, "column": 61}, "end_point": {"row": 97, "column": 63}}, {"id": 414, "type": "+", "text": "+", "parent": 403, "children": [], "start_point": {"row": 97, "column": 64}, "end_point": {"row": 97, "column": 65}}, {"id": 415, "type": "string_literal", "text": "\"'\"", "parent": 403, "children": [], "start_point": {"row": 97, "column": 66}, "end_point": {"row": 97, "column": 69}}, {"id": 416, "type": "labeled_statement", "text": "glm::vec3& Variant_t::getVec3(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'vf3' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");\n}", "parent": null, "children": [417, 418, 422], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 105, "column": 1}}, {"id": 417, "type": "statement_identifier", "text": "glm", "parent": 416, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 3}}, {"id": 418, "type": "ERROR", "text": "::vec3& Variant_t:", "parent": 416, "children": [419], "start_point": {"row": 100, "column": 3}, "end_point": {"row": 100, "column": 21}}, {"id": 419, "type": "binary_expression", "text": "vec3& Variant_t", "parent": 418, "children": [420, 421], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 20}}, {"id": 420, "type": "identifier", "text": "vec3", "parent": 419, "children": [], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 9}}, {"id": 421, "type": "identifier", "text": "Variant_t", "parent": 419, "children": [], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 100, "column": 20}}, {"id": 422, "type": "ERROR", "text": "getVec3(void)", "parent": 416, "children": [423], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 35}}, {"id": 423, "type": "macro_type_specifier", "text": "getVec3(void)", "parent": 422, "children": [424, 425], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 35}}, {"id": 424, "type": "identifier", "text": "getVec3", "parent": 423, "children": [], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 29}}, {"id": 425, "type": "type_descriptor", "text": "void", "parent": 423, "children": [426], "start_point": {"row": 100, "column": 30}, "end_point": {"row": 100, "column": 34}}, {"id": 426, "type": "primitive_type", "text": "void", "parent": 425, "children": [], "start_point": {"row": 100, "column": 30}, "end_point": {"row": 100, "column": 34}}, {"id": 427, "type": "if_statement", "text": "if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'vf3' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");", "parent": 416, "children": [428, 435], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 104, "column": 71}}, {"id": 428, "type": "parenthesized_expression", "text": "(this->flag != FLAG_uint)", "parent": 427, "children": [429], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 31}}, {"id": 429, "type": "binary_expression", "text": "this->flag != FLAG_uint", "parent": 428, "children": [430, 433, 434], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 30}}, {"id": 430, "type": "field_expression", "text": "this->flag", "parent": 429, "children": [431, 432], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 17}}, {"id": 431, "type": "identifier", "text": "this", "parent": 430, "children": [], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 11}}, {"id": 432, "type": "field_identifier", "text": "flag", "parent": 430, "children": [], "start_point": {"row": 101, "column": 13}, "end_point": {"row": 101, "column": 17}}, {"id": 433, "type": "!=", "text": "!=", "parent": 429, "children": [], "start_point": {"row": 101, "column": 18}, "end_point": {"row": 101, "column": 20}}, {"id": 434, "type": "identifier", "text": "FLAG_uint", "parent": 429, "children": [], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 30}}, {"id": 435, "type": "labeled_statement", "text": "throw std::runtime_error(\n \"Variant_t : requested type 'vf3' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");", "parent": 427, "children": [436], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 104, "column": 71}}, {"id": 436, "type": "ERROR", "text": "std:", "parent": 435, "children": [437], "start_point": {"row": 102, "column": 14}, "end_point": {"row": 102, "column": 18}}, {"id": 437, "type": "identifier", "text": "std", "parent": 436, "children": [], "start_point": {"row": 102, "column": 14}, "end_point": {"row": 102, "column": 17}}, {"id": 438, "type": "call_expression", "text": "runtime_error(\n \"Variant_t : requested type 'vf3' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\")", "parent": 435, "children": [439, 440], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 104, "column": 70}}, {"id": 439, "type": "identifier", "text": "runtime_error", "parent": 438, "children": [], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 32}}, {"id": 440, "type": "argument_list", "text": "(\n \"Variant_t : requested type 'vf3' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\")", "parent": 438, "children": [441], "start_point": {"row": 102, "column": 32}, "end_point": {"row": 104, "column": 70}}, {"id": 441, "type": "binary_expression", "text": "\"Variant_t : requested type 'vf3' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\"", "parent": 440, "children": [442, 452, 453], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 104, "column": 69}}, {"id": 442, "type": "binary_expression", "text": "\"Variant_t : requested type 'vf3' does \"\n \"not match actual type '\" + this->get_flag_string()", "parent": 441, "children": [443, 446, 447], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 104, "column": 63}}, {"id": 443, "type": "concatenated_string", "text": "\"Variant_t : requested type 'vf3' does \"\n \"not match actual type '\"", "parent": 442, "children": [444, 445], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 104, "column": 37}}, {"id": 444, "type": "string_literal", "text": "\"Variant_t : requested type 'vf3' does \"", "parent": 443, "children": [], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 103, "column": 52}}, {"id": 445, "type": "string_literal", "text": "\"not match actual type '\"", "parent": 443, "children": [], "start_point": {"row": 104, "column": 12}, "end_point": {"row": 104, "column": 37}}, {"id": 446, "type": "+", "text": "+", "parent": 442, "children": [], "start_point": {"row": 104, "column": 38}, "end_point": {"row": 104, "column": 39}}, {"id": 447, "type": "call_expression", "text": "this->get_flag_string()", "parent": 442, "children": [448, 451], "start_point": {"row": 104, "column": 40}, "end_point": {"row": 104, "column": 63}}, {"id": 448, "type": "field_expression", "text": "this->get_flag_string", "parent": 447, "children": [449, 450], "start_point": {"row": 104, "column": 40}, "end_point": {"row": 104, "column": 61}}, {"id": 449, "type": "identifier", "text": "this", "parent": 448, "children": [], "start_point": {"row": 104, "column": 40}, "end_point": {"row": 104, "column": 44}}, {"id": 450, "type": "field_identifier", "text": "get_flag_string", "parent": 448, "children": [], "start_point": {"row": 104, "column": 46}, "end_point": {"row": 104, "column": 61}}, {"id": 451, "type": "argument_list", "text": "()", "parent": 447, "children": [], "start_point": {"row": 104, "column": 61}, "end_point": {"row": 104, "column": 63}}, {"id": 452, "type": "+", "text": "+", "parent": 441, "children": [], "start_point": {"row": 104, "column": 64}, "end_point": {"row": 104, "column": 65}}, {"id": 453, "type": "string_literal", "text": "\"'\"", "parent": 441, "children": [], "start_point": {"row": 104, "column": 66}, "end_point": {"row": 104, "column": 69}}, {"id": 454, "type": "labeled_statement", "text": "glm::mat4& Variant_t::getMat4(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'mf4' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");\n}", "parent": null, "children": [455, 456, 460], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 112, "column": 1}}, {"id": 455, "type": "statement_identifier", "text": "glm", "parent": 454, "children": [], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 3}}, {"id": 456, "type": "ERROR", "text": "::mat4& Variant_t:", "parent": 454, "children": [457], "start_point": {"row": 107, "column": 3}, "end_point": {"row": 107, "column": 21}}, {"id": 457, "type": "binary_expression", "text": "mat4& Variant_t", "parent": 456, "children": [458, 459], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 20}}, {"id": 458, "type": "identifier", "text": "mat4", "parent": 457, "children": [], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 9}}, {"id": 459, "type": "identifier", "text": "Variant_t", "parent": 457, "children": [], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 20}}, {"id": 460, "type": "ERROR", "text": "getMat4(void)", "parent": 454, "children": [461], "start_point": {"row": 107, "column": 22}, "end_point": {"row": 107, "column": 35}}, {"id": 461, "type": "macro_type_specifier", "text": "getMat4(void)", "parent": 460, "children": [462, 463], "start_point": {"row": 107, "column": 22}, "end_point": {"row": 107, "column": 35}}, {"id": 462, "type": "identifier", "text": "getMat4", "parent": 461, "children": [], "start_point": {"row": 107, "column": 22}, "end_point": {"row": 107, "column": 29}}, {"id": 463, "type": "type_descriptor", "text": "void", "parent": 461, "children": [464], "start_point": {"row": 107, "column": 30}, "end_point": {"row": 107, "column": 34}}, {"id": 464, "type": "primitive_type", "text": "void", "parent": 463, "children": [], "start_point": {"row": 107, "column": 30}, "end_point": {"row": 107, "column": 34}}, {"id": 465, "type": "if_statement", "text": "if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'mf4' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");", "parent": 454, "children": [466, 473], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 111, "column": 71}}, {"id": 466, "type": "parenthesized_expression", "text": "(this->flag != FLAG_uint)", "parent": 465, "children": [467], "start_point": {"row": 108, "column": 6}, "end_point": {"row": 108, "column": 31}}, {"id": 467, "type": "binary_expression", "text": "this->flag != FLAG_uint", "parent": 466, "children": [468, 471, 472], "start_point": {"row": 108, "column": 7}, "end_point": {"row": 108, "column": 30}}, {"id": 468, "type": "field_expression", "text": "this->flag", "parent": 467, "children": [469, 470], "start_point": {"row": 108, "column": 7}, "end_point": {"row": 108, "column": 17}}, {"id": 469, "type": "identifier", "text": "this", "parent": 468, "children": [], "start_point": {"row": 108, "column": 7}, "end_point": {"row": 108, "column": 11}}, {"id": 470, "type": "field_identifier", "text": "flag", "parent": 468, "children": [], "start_point": {"row": 108, "column": 13}, "end_point": {"row": 108, "column": 17}}, {"id": 471, "type": "!=", "text": "!=", "parent": 467, "children": [], "start_point": {"row": 108, "column": 18}, "end_point": {"row": 108, "column": 20}}, {"id": 472, "type": "identifier", "text": "FLAG_uint", "parent": 467, "children": [], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 30}}, {"id": 473, "type": "labeled_statement", "text": "throw std::runtime_error(\n \"Variant_t : requested type 'mf4' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");", "parent": 465, "children": [474], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 111, "column": 71}}, {"id": 474, "type": "ERROR", "text": "std:", "parent": 473, "children": [475], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 18}}, {"id": 475, "type": "identifier", "text": "std", "parent": 474, "children": [], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 17}}, {"id": 476, "type": "call_expression", "text": "runtime_error(\n \"Variant_t : requested type 'mf4' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\")", "parent": 473, "children": [477, 478], "start_point": {"row": 109, "column": 19}, "end_point": {"row": 111, "column": 70}}, {"id": 477, "type": "identifier", "text": "runtime_error", "parent": 476, "children": [], "start_point": {"row": 109, "column": 19}, "end_point": {"row": 109, "column": 32}}, {"id": 478, "type": "argument_list", "text": "(\n \"Variant_t : requested type 'mf4' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\")", "parent": 476, "children": [479], "start_point": {"row": 109, "column": 32}, "end_point": {"row": 111, "column": 70}}, {"id": 479, "type": "binary_expression", "text": "\"Variant_t : requested type 'mf4' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\"", "parent": 478, "children": [480, 490, 491], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 111, "column": 69}}, {"id": 480, "type": "binary_expression", "text": "\"Variant_t : requested type 'mf4' does \"\n \"not match actual type '\" + this->get_flag_string()", "parent": 479, "children": [481, 484, 485], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 111, "column": 63}}, {"id": 481, "type": "concatenated_string", "text": "\"Variant_t : requested type 'mf4' does \"\n \"not match actual type '\"", "parent": 480, "children": [482, 483], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 111, "column": 37}}, {"id": 482, "type": "string_literal", "text": "\"Variant_t : requested type 'mf4' does \"", "parent": 481, "children": [], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 110, "column": 52}}, {"id": 483, "type": "string_literal", "text": "\"not match actual type '\"", "parent": 481, "children": [], "start_point": {"row": 111, "column": 12}, "end_point": {"row": 111, "column": 37}}, {"id": 484, "type": "+", "text": "+", "parent": 480, "children": [], "start_point": {"row": 111, "column": 38}, "end_point": {"row": 111, "column": 39}}, {"id": 485, "type": "call_expression", "text": "this->get_flag_string()", "parent": 480, "children": [486, 489], "start_point": {"row": 111, "column": 40}, "end_point": {"row": 111, "column": 63}}, {"id": 486, "type": "field_expression", "text": "this->get_flag_string", "parent": 485, "children": [487, 488], "start_point": {"row": 111, "column": 40}, "end_point": {"row": 111, "column": 61}}, {"id": 487, "type": "identifier", "text": "this", "parent": 486, "children": [], "start_point": {"row": 111, "column": 40}, "end_point": {"row": 111, "column": 44}}, {"id": 488, "type": "field_identifier", "text": "get_flag_string", "parent": 486, "children": [], "start_point": {"row": 111, "column": 46}, "end_point": {"row": 111, "column": 61}}, {"id": 489, "type": "argument_list", "text": "()", "parent": 485, "children": [], "start_point": {"row": 111, "column": 61}, "end_point": {"row": 111, "column": 63}}, {"id": 490, "type": "+", "text": "+", "parent": 479, "children": [], "start_point": {"row": 111, "column": 64}, "end_point": {"row": 111, "column": 65}}, {"id": 491, "type": "string_literal", "text": "\"'\"", "parent": 479, "children": [], "start_point": {"row": 111, "column": 66}, "end_point": {"row": 111, "column": 69}}, {"id": 492, "type": "labeled_statement", "text": "std::string& Variant_t::getString(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'str' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");\n}", "parent": null, "children": [493, 494, 498], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 119, "column": 1}}, {"id": 493, "type": "statement_identifier", "text": "std", "parent": 492, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 3}}, {"id": 494, "type": "ERROR", "text": "::string& Variant_t:", "parent": 492, "children": [495], "start_point": {"row": 114, "column": 3}, "end_point": {"row": 114, "column": 23}}, {"id": 495, "type": "binary_expression", "text": "string& Variant_t", "parent": 494, "children": [496, 497], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 22}}, {"id": 496, "type": "identifier", "text": "string", "parent": 495, "children": [], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 11}}, {"id": 497, "type": "identifier", "text": "Variant_t", "parent": 495, "children": [], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 22}}, {"id": 498, "type": "ERROR", "text": "getString(void)", "parent": 492, "children": [499], "start_point": {"row": 114, "column": 24}, "end_point": {"row": 114, "column": 39}}, {"id": 499, "type": "macro_type_specifier", "text": "getString(void)", "parent": 498, "children": [500, 501], "start_point": {"row": 114, "column": 24}, "end_point": {"row": 114, "column": 39}}, {"id": 500, "type": "identifier", "text": "getString", "parent": 499, "children": [], "start_point": {"row": 114, "column": 24}, "end_point": {"row": 114, "column": 33}}, {"id": 501, "type": "type_descriptor", "text": "void", "parent": 499, "children": [502], "start_point": {"row": 114, "column": 34}, "end_point": {"row": 114, "column": 38}}, {"id": 502, "type": "primitive_type", "text": "void", "parent": 501, "children": [], "start_point": {"row": 114, "column": 34}, "end_point": {"row": 114, "column": 38}}, {"id": 503, "type": "if_statement", "text": "if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'str' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");", "parent": 492, "children": [504, 511], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 118, "column": 71}}, {"id": 504, "type": "parenthesized_expression", "text": "(this->flag != FLAG_uint)", "parent": 503, "children": [505], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 31}}, {"id": 505, "type": "binary_expression", "text": "this->flag != FLAG_uint", "parent": 504, "children": [506, 509, 510], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 30}}, {"id": 506, "type": "field_expression", "text": "this->flag", "parent": 505, "children": [507, 508], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 17}}, {"id": 507, "type": "identifier", "text": "this", "parent": 506, "children": [], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 11}}, {"id": 508, "type": "field_identifier", "text": "flag", "parent": 506, "children": [], "start_point": {"row": 115, "column": 13}, "end_point": {"row": 115, "column": 17}}, {"id": 509, "type": "!=", "text": "!=", "parent": 505, "children": [], "start_point": {"row": 115, "column": 18}, "end_point": {"row": 115, "column": 20}}, {"id": 510, "type": "identifier", "text": "FLAG_uint", "parent": 505, "children": [], "start_point": {"row": 115, "column": 21}, "end_point": {"row": 115, "column": 30}}, {"id": 511, "type": "labeled_statement", "text": "throw std::runtime_error(\n \"Variant_t : requested type 'str' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");", "parent": 503, "children": [512], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 118, "column": 71}}, {"id": 512, "type": "ERROR", "text": "std:", "parent": 511, "children": [513], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 18}}, {"id": 513, "type": "identifier", "text": "std", "parent": 512, "children": [], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 17}}, {"id": 514, "type": "call_expression", "text": "runtime_error(\n \"Variant_t : requested type 'str' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\")", "parent": 511, "children": [515, 516], "start_point": {"row": 116, "column": 19}, "end_point": {"row": 118, "column": 70}}, {"id": 515, "type": "identifier", "text": "runtime_error", "parent": 514, "children": [], "start_point": {"row": 116, "column": 19}, "end_point": {"row": 116, "column": 32}}, {"id": 516, "type": "argument_list", "text": "(\n \"Variant_t : requested type 'str' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\")", "parent": 514, "children": [517], "start_point": {"row": 116, "column": 32}, "end_point": {"row": 118, "column": 70}}, {"id": 517, "type": "binary_expression", "text": "\"Variant_t : requested type 'str' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\"", "parent": 516, "children": [518, 528, 529], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 118, "column": 69}}, {"id": 518, "type": "binary_expression", "text": "\"Variant_t : requested type 'str' does \"\n \"not match actual type '\" + this->get_flag_string()", "parent": 517, "children": [519, 522, 523], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 118, "column": 63}}, {"id": 519, "type": "concatenated_string", "text": "\"Variant_t : requested type 'str' does \"\n \"not match actual type '\"", "parent": 518, "children": [520, 521], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 118, "column": 37}}, {"id": 520, "type": "string_literal", "text": "\"Variant_t : requested type 'str' does \"", "parent": 519, "children": [], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 52}}, {"id": 521, "type": "string_literal", "text": "\"not match actual type '\"", "parent": 519, "children": [], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 37}}, {"id": 522, "type": "+", "text": "+", "parent": 518, "children": [], "start_point": {"row": 118, "column": 38}, "end_point": {"row": 118, "column": 39}}, {"id": 523, "type": "call_expression", "text": "this->get_flag_string()", "parent": 518, "children": [524, 527], "start_point": {"row": 118, "column": 40}, "end_point": {"row": 118, "column": 63}}, {"id": 524, "type": "field_expression", "text": "this->get_flag_string", "parent": 523, "children": [525, 526], "start_point": {"row": 118, "column": 40}, "end_point": {"row": 118, "column": 61}}, {"id": 525, "type": "identifier", "text": "this", "parent": 524, "children": [], "start_point": {"row": 118, "column": 40}, "end_point": {"row": 118, "column": 44}}, {"id": 526, "type": "field_identifier", "text": "get_flag_string", "parent": 524, "children": [], "start_point": {"row": 118, "column": 46}, "end_point": {"row": 118, "column": 61}}, {"id": 527, "type": "argument_list", "text": "()", "parent": 523, "children": [], "start_point": {"row": 118, "column": 61}, "end_point": {"row": 118, "column": 63}}, {"id": 528, "type": "+", "text": "+", "parent": 517, "children": [], "start_point": {"row": 118, "column": 64}, "end_point": {"row": 118, "column": 65}}, {"id": 529, "type": "string_literal", "text": "\"'\"", "parent": 517, "children": [], "start_point": {"row": 118, "column": 66}, "end_point": {"row": 118, "column": 69}}]}, "node_categories": {"declarations": {"functions": [24, 59, 137, 144, 342, 348, 380, 384], "variables": [27, 32, 37, 40, 45, 52, 57, 62, 65, 71, 77, 83, 89, 114, 122, 130, 133, 140, 142, 147, 351, 387], "classes": [30, 31], "imports": [3, 4, 6, 7, 12, 13, 15, 16, 18, 19, 21, 22], "modules": [], "enums": []}, "statements": {"expressions": [151, 153, 159, 161, 167, 169, 185, 186, 228, 244, 250, 265, 271, 287, 293, 309, 315, 331, 337, 354, 355, 356, 364, 367, 368, 373, 374, 390, 391, 392, 400, 403, 404, 409, 410, 419, 428, 429, 430, 438, 441, 442, 447, 448, 457, 466, 467, 468, 476, 479, 480, 485, 486, 495, 504, 505, 506, 514, 517, 518, 523, 524], "assignments": [243, 249, 264, 270, 286, 292, 308, 314, 330, 336], "loops": [], "conditionals": [11, 25, 29, 33, 36, 39, 41, 43, 44, 46, 48, 49, 51, 53, 54, 56, 58, 60, 68, 74, 80, 86, 92, 95, 96, 98, 102, 103, 104, 108, 110, 113, 115, 116, 118, 121, 123, 124, 126, 129, 131, 132, 134, 138, 145, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 177, 179, 180, 183, 184, 187, 188, 189, 190, 191, 196, 197, 198, 203, 204, 205, 210, 211, 212, 217, 218, 219, 224, 227, 229, 233, 235, 236, 238, 242, 245, 246, 248, 251, 252, 254, 256, 258, 259, 263, 266, 267, 269, 272, 273, 275, 277, 279, 282, 284, 285, 288, 289, 291, 294, 295, 297, 299, 301, 304, 306, 307, 310, 311, 313, 316, 317, 319, 321, 323, 326, 328, 329, 332, 333, 335, 338, 339, 341, 343, 347, 349, 353, 357, 358, 360, 363, 365, 375, 376, 383, 385, 389, 393, 394, 396, 399, 401, 411, 412, 417, 420, 421, 423, 424, 427, 431, 432, 434, 437, 439, 449, 450, 455, 458, 459, 461, 462, 465, 469, 470, 472, 475, 477, 487, 488, 493, 496, 497, 499, 500, 503, 507, 508, 510, 513, 515, 525, 526], "returns": [192, 199, 206, 213, 220], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 14, 17, 20, 23, 70, 76, 82, 88, 94, 193, 200, 207, 214, 221, 231, 369, 370, 371, 379, 405, 406, 407, 415, 443, 444, 445, 453, 481, 482, 483, 491, 519, 520, 521, 529], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 24, "universal_type": "function", "name": "Variant_t", "text_snippet": "class Variant_t {\nprivate:\n\n int flag;\n\n union {\n unsigned int _u;\n int "}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "get_flag_string(void)"}, {"node_id": 137, "universal_type": "function", "name": "unknown", "text_snippet": "getUint(void)"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "getInt(void)"}, {"node_id": 342, "universal_type": "function", "name": "unknown", "text_snippet": "unsigned int& Variant_t::getUint(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_"}, {"node_id": 348, "universal_type": "function", "name": "unknown", "text_snippet": "getUint(void)"}, {"node_id": 380, "universal_type": "function", "name": "unknown", "text_snippet": "int& Variant_t::getInt(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n "}, {"node_id": 384, "universal_type": "function", "name": "unknown", "text_snippet": "getInt(void)"}], "class_declarations": [{"node_id": 30, "universal_type": "class", "name": "{", "text_snippet": "union {\n unsigned int _u;\n int _i;\n glm::vec3 _vf3;\n glm::ma"}, {"node_id": 31, "universal_type": "class", "name": "unknown", "text_snippet": "union"}], "import_statements": [{"node_id": 3, "text": "#include <iostream>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <string>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 12, "text": "#include <GLFW/glfw3.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <GL/glew.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <glm/glm.hpp>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <glm/gtc/matrix_transform.hpp>\n"}, {"node_id": 22, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <iostream>\n#include <string>\n\n#define GLFW_INCLUDE_NONE\n#include <GLFW/glfw3.h>\n#include <GL/glew.h>\n#include <glm/glm.hpp>\n#include <glm/gtc/matrix_transform.hpp>\n\nclass Variant_t {\nprivate:\n\n int flag;\n\n union {\n unsigned int _u;\n int _i;\n glm::vec3 _vf3;\n glm::mat4 _mf4;\n };\n\n std::string s;\n\n std::string get_flag_string(void);\n\npublic:\n\n static const int FLAG_uint = 0;\n static const int FLAG_int = 1;\n static const int FLAG_str = 2;\n static const int FLAG_vf3 = 3;\n static const int FLAG_mf4 = 4;\n\n Variant_t(unsigned int d);\n Variant_t(int d);\n Variant_t(std::string s);\n Variant_t(glm::vec3 v3);\n Variant_t(glm::mat4 m4);\n\n unsigned int& getUint(void);\n int& getInt(void);\n glm::vec3& getVec3(void);\n glm::mat4& getMat4(void);\n std::string& getString(void);\n\n};\n\nstd::string Variant_t::get_flag_string(void) {\n switch(this->flag) {\n case FLAG_uint: return \"uint\"; break;\n case FLAG_int: return \"int\"; break;\n case FLAG_str: return \"str\"; break;\n case FLAG_vf3: return \"vf3\"; break;\n case FLAG_mf4: return \"mf4\"; break;\n default:\n throw std::runtime_error(\"Variant_t : unknown inner type\"); \n }\n}\n\nVariant_t::Variant_t(unsigned int d) {\n this->flag = FLAG_uint;\n this->_u = d;\n}\n\nVariant_t::Variant_t(int d) {\n this->flag = FLAG_int;\n this->_i = d;\n}\n\nVariant_t::Variant_t(std::string s) {\n this->flag = FLAG_str;\n this->s = s;\n}\n\nVariant_t::Variant_t(glm::vec3 v3) {\n this->flag = FLAG_vf3;\n this->_vf3 = v3;\n}\n\nVariant_t::Variant_t(glm::mat4 m4) {\n this->flag = FLAG_mf4;\n this->_mf4 = m4;\n}\n\nunsigned int& Variant_t::getUint(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'uint' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");\n}\n\nint& Variant_t::getInt(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'int' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");\n}\n\nglm::vec3& Variant_t::getVec3(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'vf3' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");\n}\n\nglm::mat4& Variant_t::getMat4(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'mf4' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");\n}\n\nstd::string& Variant_t::getString(void) {\n if(this->flag != FLAG_uint)\n throw std::runtime_error(\n \"Variant_t : requested type 'str' does \"\n \"not match actual type '\" + this->get_flag_string() + \"'\");\n}\n"}
367
c
//----------------------------------------------------------------------------- // Copyright (c) 2013 GarageGames, LLC // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- #ifndef _WINDIRECTINPUT_H_ #define _WINDIRECTINPUT_H_ #ifndef _PLATFORMWIN32_H_ #include "platformWin32/platformWin32.h" #endif #ifndef _PLATFORMINPUT_H_ #include "platform/platformInput.h" #endif #ifndef _WINDINPUTDEVICE_H_ #include "platformWin32/winDInputDevice.h" #endif #define DIRECTINPUT_VERSION 0x0800 #include <dinput.h> struct InputEvent; //------------------------------------------------------------------------------ class DInputManager : public InputManager { private: typedef SimGroup Parent; HMODULE mDInputLib; LPDIRECTINPUT8 mDInputInterface; static bool smKeyboardEnabled; static bool smMouseEnabled; static bool smJoystickEnabled; bool mKeyboardActive; bool mMouseActive; bool mJoystickActive; void enumerateDevices(); static BOOL CALLBACK EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef ); bool acquire( U8 deviceType, U8 deviceID ); void unacquire( U8 deviceType, U8 deviceID ); public: DInputManager(); bool enable(); void disable(); void onDeleteNotify( SimObject* object ); bool onAdd(); void onRemove(); void process(); // DirectInput functions: static void init(); static bool enableKeyboard(); static void disableKeyboard(); static bool isKeyboardEnabled(); bool activateKeyboard(); void deactivateKeyboard(); bool isKeyboardActive() { return( mKeyboardActive ); } static bool enableMouse(); static void disableMouse(); static bool isMouseEnabled(); bool activateMouse(); void deactivateMouse(); bool isMouseActive() { return( mMouseActive ); } static bool enableJoystick(); static void disableJoystick(); static bool isJoystickEnabled(); bool activateJoystick(); void deactivateJoystick(); bool isJoystickActive() { return( mJoystickActive ); } // Console interface: const char* getJoystickAxesString( U32 deviceID ); }; #endif // _H_WINDIRECTINPUT_
32.12
105
(translation_unit) "//----------------------------------------------------------------------------- \n// Copyright (c) 2013 GarageGames, LLC \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 \n// deal in the Software without restriction, including without limitation the \n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or \n// sell copies of the Software, and to permit persons to whom the Software is \n// furnished to do so, subject to the following conditions: \n// \n// The above copyright notice and this permission notice shall be included in \n// all copies or substantial portions of the Software. \n// \n// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING \n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS \n// IN THE SOFTWARE. \n//----------------------------------------------------------------------------- \n \n#ifndef _WINDIRECTINPUT_H_ \n#define _WINDIRECTINPUT_H_ \n \n#ifndef _PLATFORMWIN32_H_ \n#include "platformWin32/platformWin32.h" \n#endif \n#ifndef _PLATFORMINPUT_H_ \n#include "platform/platformInput.h" \n#endif \n#ifndef _WINDINPUTDEVICE_H_ \n#include "platformWin32/winDInputDevice.h" \n#endif \n \n#define DIRECTINPUT_VERSION 0x0800 \n#include <dinput.h> \n \nstruct InputEvent; \n \n//------------------------------------------------------------------------------ \nclass DInputManager : public InputManager \n{ \n private: \n typedef SimGroup Parent; \n \n HMODULE mDInputLib; \n LPDIRECTINPUT8 mDInputInterface; \n \n static bool smKeyboardEnabled; \n static bool smMouseEnabled; \n static bool smJoystickEnabled; \n \n bool mKeyboardActive; \n bool mMouseActive; \n bool mJoystickActive; \n \n void enumerateDevices(); \n \n static BOOL CALLBACK EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef ); \n \n bool acquire( U8 deviceType, U8 deviceID ); \n void unacquire( U8 deviceType, U8 deviceID ); \n \n public: \n DInputManager(); \n \n bool enable(); \n void disable(); \n \n void onDeleteNotify( SimObject* object ); \n bool onAdd(); \n void onRemove(); \n \n void process(); \n \n // DirectInput functions: \n static void init(); \n \n static bool enableKeyboard(); \n static void disableKeyboard(); \n static bool isKeyboardEnabled(); \n bool activateKeyboard(); \n void deactivateKeyboard(); \n bool isKeyboardActive() { return( mKeyboardActive ); } \n \n static bool enableMouse(); \n static void disableMouse(); \n static bool isMouseEnabled(); \n bool activateMouse(); \n void deactivateMouse(); \n bool isMouseActive() { return( mMouseActive ); } \n \n static bool enableJoystick(); \n static void disableJoystick(); \n static bool isJoystickEnabled(); \n bool activateJoystick(); \n void deactivateJoystick(); \n bool isJoystickActive() { return( mJoystickActive ); } \n \n // Console interface: \n const char* getJoystickAxesString( U32 deviceID ); \n}; \n \n#endif // _H_WINDIRECTINPUT_ \n" (comment) "//----------------------------------------------------------------------------- " (comment) "// Copyright (c) 2013 GarageGames, LLC " (comment) "// " (comment) "// Permission is hereby granted, free of charge, to any person obtaining a copy " (comment) "// of this software and associated documentation files (the "Software"), to " (comment) "// deal in the Software without restriction, including without limitation the " (comment) "// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or " (comment) "// sell copies of the Software, and to permit persons to whom the Software is " (comment) "// furnished to do so, subject to the following conditions: " (comment) "// " (comment) "// The above copyright notice and this permission notice shall be included in " (comment) "// all copies or substantial portions of the Software. " (comment) "// " (comment) "// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR " (comment) "// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, " (comment) "// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE " (comment) "// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER " (comment) "// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING " (comment) "// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS " (comment) "// IN THE SOFTWARE. " (comment) "//----------------------------------------------------------------------------- " (preproc_ifdef) "#ifndef _WINDIRECTINPUT_H_ \n#define _WINDIRECTINPUT_H_ \n \n#ifndef _PLATFORMWIN32_H_ \n#include "platformWin32/platformWin32.h" \n#endif \n#ifndef _PLATFORMINPUT_H_ \n#include "platform/platformInput.h" \n#endif \n#ifndef _WINDINPUTDEVICE_H_ \n#include "platformWin32/winDInputDevice.h" \n#endif \n \n#define DIRECTINPUT_VERSION 0x0800 \n#include <dinput.h> \n \nstruct InputEvent; \n \n//------------------------------------------------------------------------------ \nclass DInputManager : public InputManager \n{ \n private: \n typedef SimGroup Parent; \n \n HMODULE mDInputLib; \n LPDIRECTINPUT8 mDInputInterface; \n \n static bool smKeyboardEnabled; \n static bool smMouseEnabled; \n static bool smJoystickEnabled; \n \n bool mKeyboardActive; \n bool mMouseActive; \n bool mJoystickActive; \n \n void enumerateDevices(); \n \n static BOOL CALLBACK EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef ); \n \n bool acquire( U8 deviceType, U8 deviceID ); \n void unacquire( U8 deviceType, U8 deviceID ); \n \n public: \n DInputManager(); \n \n bool enable(); \n void disable(); \n \n void onDeleteNotify( SimObject* object ); \n bool onAdd(); \n void onRemove(); \n \n void process(); \n \n // DirectInput functions: \n static void init(); \n \n static bool enableKeyboard(); \n static void disableKeyboard(); \n static bool isKeyboardEnabled(); \n bool activateKeyboard(); \n void deactivateKeyboard(); \n bool isKeyboardActive() { return( mKeyboardActive ); } \n \n static bool enableMouse(); \n static void disableMouse(); \n static bool isMouseEnabled(); \n bool activateMouse(); \n void deactivateMouse(); \n bool isMouseActive() { return( mMouseActive ); } \n \n static bool enableJoystick(); \n static void disableJoystick(); \n static bool isJoystickEnabled(); \n bool activateJoystick(); \n void deactivateJoystick(); \n bool isJoystickActive() { return( mJoystickActive ); } \n \n // Console interface: \n const char* getJoystickAxesString( U32 deviceID ); \n}; \n \n#endif" (#ifndef) "#ifndef" (identifier) "_WINDIRECTINPUT_H_" (preproc_def) "#define _WINDIRECTINPUT_H_ \n" (#define) "#define" (identifier) "_WINDIRECTINPUT_H_" (preproc_ifdef) "#ifndef _PLATFORMWIN32_H_ \n#include "platformWin32/platformWin32.h" \n#endif" (#ifndef) "#ifndef" (identifier) "_PLATFORMWIN32_H_" (preproc_include) "#include "platformWin32/platformWin32.h" \n" (#include) "#include" (string_literal) ""platformWin32/platformWin32.h"" (") """ (string_content) "platformWin32/platformWin32.h" (") """ (#endif) "#endif" (preproc_ifdef) "#ifndef _PLATFORMINPUT_H_ \n#include "platform/platformInput.h" \n#endif" (#ifndef) "#ifndef" (identifier) "_PLATFORMINPUT_H_" (preproc_include) "#include "platform/platformInput.h" \n" (#include) "#include" (string_literal) ""platform/platformInput.h"" (") """ (string_content) "platform/platformInput.h" (") """ (#endif) "#endif" (preproc_ifdef) "#ifndef _WINDINPUTDEVICE_H_ \n#include "platformWin32/winDInputDevice.h" \n#endif" (#ifndef) "#ifndef" (identifier) "_WINDINPUTDEVICE_H_" (preproc_include) "#include "platformWin32/winDInputDevice.h" \n" (#include) "#include" (string_literal) ""platformWin32/winDInputDevice.h"" (") """ (string_content) "platformWin32/winDInputDevice.h" (") """ (#endif) "#endif" (preproc_def) "#define DIRECTINPUT_VERSION 0x0800 \n" (#define) "#define" (identifier) "DIRECTINPUT_VERSION" (preproc_arg) "0x0800 " (preproc_include) "#include <dinput.h> \n" (#include) "#include" (system_lib_string) "<dinput.h>" (struct_specifier) "struct InputEvent" (struct) "struct" (type_identifier) "InputEvent" (;) ";" (comment) "//------------------------------------------------------------------------------ " (function_definition) "class DInputManager : public InputManager \n{ \n private: \n typedef SimGroup Parent; \n \n HMODULE mDInputLib; \n LPDIRECTINPUT8 mDInputInterface; \n \n static bool smKeyboardEnabled; \n static bool smMouseEnabled; \n static bool smJoystickEnabled; \n \n bool mKeyboardActive; \n bool mMouseActive; \n bool mJoystickActive; \n \n void enumerateDevices(); \n \n static BOOL CALLBACK EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef ); \n \n bool acquire( U8 deviceType, U8 deviceID ); \n void unacquire( U8 deviceType, U8 deviceID ); \n \n public: \n DInputManager(); \n \n bool enable(); \n void disable(); \n \n void onDeleteNotify( SimObject* object ); \n bool onAdd(); \n void onRemove(); \n \n void process(); \n \n // DirectInput functions: \n static void init(); \n \n static bool enableKeyboard(); \n static void disableKeyboard(); \n static bool isKeyboardEnabled(); \n bool activateKeyboard(); \n void deactivateKeyboard(); \n bool isKeyboardActive() { return( mKeyboardActive ); } \n \n static bool enableMouse(); \n static void disableMouse(); \n static bool isMouseEnabled(); \n bool activateMouse(); \n void deactivateMouse(); \n bool isMouseActive() { return( mMouseActive ); } \n \n static bool enableJoystick(); \n static void disableJoystick(); \n static bool isJoystickEnabled(); \n bool activateJoystick(); \n void deactivateJoystick(); \n bool isJoystickActive() { return( mJoystickActive ); } \n \n // Console interface: \n const char* getJoystickAxesString( U32 deviceID ); \n}" (type_identifier) "class" (identifier) "DInputManager" (ERROR) ": public InputManager" (:) ":" (identifier) "public" (identifier) "InputManager" (compound_statement) "{ \n private: \n typedef SimGroup Parent; \n \n HMODULE mDInputLib; \n LPDIRECTINPUT8 mDInputInterface; \n \n static bool smKeyboardEnabled; \n static bool smMouseEnabled; \n static bool smJoystickEnabled; \n \n bool mKeyboardActive; \n bool mMouseActive; \n bool mJoystickActive; \n \n void enumerateDevices(); \n \n static BOOL CALLBACK EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef ); \n \n bool acquire( U8 deviceType, U8 deviceID ); \n void unacquire( U8 deviceType, U8 deviceID ); \n \n public: \n DInputManager(); \n \n bool enable(); \n void disable(); \n \n void onDeleteNotify( SimObject* object ); \n bool onAdd(); \n void onRemove(); \n \n void process(); \n \n // DirectInput functions: \n static void init(); \n \n static bool enableKeyboard(); \n static void disableKeyboard(); \n static bool isKeyboardEnabled(); \n bool activateKeyboard(); \n void deactivateKeyboard(); \n bool isKeyboardActive() { return( mKeyboardActive ); } \n \n static bool enableMouse(); \n static void disableMouse(); \n static bool isMouseEnabled(); \n bool activateMouse(); \n void deactivateMouse(); \n bool isMouseActive() { return( mMouseActive ); } \n \n static bool enableJoystick(); \n static void disableJoystick(); \n static bool isJoystickEnabled(); \n bool activateJoystick(); \n void deactivateJoystick(); \n bool isJoystickActive() { return( mJoystickActive ); } \n \n // Console interface: \n const char* getJoystickAxesString( U32 deviceID ); \n}" ({) "{" (labeled_statement) "private: \n typedef SimGroup Parent;" (statement_identifier) "private" (:) ":" (declaration) "typedef SimGroup Parent;" (type_identifier) "typedef" (identifier) "SimGroup" (ERROR) "Parent" (identifier) "Parent" (;) ";" (declaration) "HMODULE mDInputLib;" (type_identifier) "HMODULE" (identifier) "mDInputLib" (;) ";" (declaration) "LPDIRECTINPUT8 mDInputInterface;" (type_identifier) "LPDIRECTINPUT8" (identifier) "mDInputInterface" (;) ";" (declaration) "static bool smKeyboardEnabled;" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (identifier) "smKeyboardEnabled" (;) ";" (declaration) "static bool smMouseEnabled;" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (identifier) "smMouseEnabled" (;) ";" (declaration) "static bool smJoystickEnabled;" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (identifier) "smJoystickEnabled" (;) ";" (declaration) "bool mKeyboardActive;" (primitive_type) "bool" (identifier) "mKeyboardActive" (;) ";" (declaration) "bool mMouseActive;" (primitive_type) "bool" (identifier) "mMouseActive" (;) ";" (declaration) "bool mJoystickActive;" (primitive_type) "bool" (identifier) "mJoystickActive" (;) ";" (declaration) "void enumerateDevices();" (primitive_type) "void" (function_declarator) "enumerateDevices()" (identifier) "enumerateDevices" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static BOOL CALLBACK EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef );" (storage_class_specifier) "static" (static) "static" (type_identifier) "BOOL" (ERROR) "CALLBACK" (identifier) "CALLBACK" (function_declarator) "EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef )" (identifier) "EnumDevicesProc" (parameter_list) "( const DIDEVICEINSTANCE *pddi, LPVOID pvRef )" (() "(" (parameter_declaration) "const DIDEVICEINSTANCE *pddi" (type_qualifier) "const" (const) "const" (type_identifier) "DIDEVICEINSTANCE" (pointer_declarator) "*pddi" (*) "*" (identifier) "pddi" (,) "," (parameter_declaration) "LPVOID pvRef" (type_identifier) "LPVOID" (identifier) "pvRef" ()) ")" (;) ";" (declaration) "bool acquire( U8 deviceType, U8 deviceID );" (primitive_type) "bool" (function_declarator) "acquire( U8 deviceType, U8 deviceID )" (identifier) "acquire" (parameter_list) "( U8 deviceType, U8 deviceID )" (() "(" (parameter_declaration) "U8 deviceType" (type_identifier) "U8" (identifier) "deviceType" (,) "," (parameter_declaration) "U8 deviceID" (type_identifier) "U8" (identifier) "deviceID" ()) ")" (;) ";" (declaration) "void unacquire( U8 deviceType, U8 deviceID );" (primitive_type) "void" (function_declarator) "unacquire( U8 deviceType, U8 deviceID )" (identifier) "unacquire" (parameter_list) "( U8 deviceType, U8 deviceID )" (() "(" (parameter_declaration) "U8 deviceType" (type_identifier) "U8" (identifier) "deviceType" (,) "," (parameter_declaration) "U8 deviceID" (type_identifier) "U8" (identifier) "deviceID" ()) ")" (;) ";" (labeled_statement) "public: \n DInputManager();" (statement_identifier) "public" (:) ":" (expression_statement) "DInputManager();" (call_expression) "DInputManager()" (identifier) "DInputManager" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool enable();" (primitive_type) "bool" (function_declarator) "enable()" (identifier) "enable" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void disable();" (primitive_type) "void" (function_declarator) "disable()" (identifier) "disable" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void onDeleteNotify( SimObject* object );" (primitive_type) "void" (function_declarator) "onDeleteNotify( SimObject* object )" (identifier) "onDeleteNotify" (parameter_list) "( SimObject* object )" (() "(" (parameter_declaration) "SimObject* object" (type_identifier) "SimObject" (pointer_declarator) "* object" (*) "*" (identifier) "object" ()) ")" (;) ";" (declaration) "bool onAdd();" (primitive_type) "bool" (function_declarator) "onAdd()" (identifier) "onAdd" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void onRemove();" (primitive_type) "void" (function_declarator) "onRemove()" (identifier) "onRemove" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void process();" (primitive_type) "void" (function_declarator) "process()" (identifier) "process" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// DirectInput functions: " (declaration) "static void init();" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "init()" (identifier) "init" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static bool enableKeyboard();" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "enableKeyboard()" (identifier) "enableKeyboard" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static void disableKeyboard();" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "disableKeyboard()" (identifier) "disableKeyboard" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static bool isKeyboardEnabled();" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "isKeyboardEnabled()" (identifier) "isKeyboardEnabled" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool activateKeyboard();" (primitive_type) "bool" (function_declarator) "activateKeyboard()" (identifier) "activateKeyboard" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void deactivateKeyboard();" (primitive_type) "void" (function_declarator) "deactivateKeyboard()" (identifier) "deactivateKeyboard" (parameter_list) "()" (() "(" ()) ")" (;) ";" (function_definition) "bool isKeyboardActive() { return( mKeyboardActive ); }" (primitive_type) "bool" (function_declarator) "isKeyboardActive()" (identifier) "isKeyboardActive" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return( mKeyboardActive ); }" ({) "{" (return_statement) "return( mKeyboardActive );" (return) "return" (parenthesized_expression) "( mKeyboardActive )" (() "(" (identifier) "mKeyboardActive" ()) ")" (;) ";" (}) "}" (declaration) "static bool enableMouse();" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "enableMouse()" (identifier) "enableMouse" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static void disableMouse();" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "disableMouse()" (identifier) "disableMouse" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static bool isMouseEnabled();" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "isMouseEnabled()" (identifier) "isMouseEnabled" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool activateMouse();" (primitive_type) "bool" (function_declarator) "activateMouse()" (identifier) "activateMouse" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void deactivateMouse();" (primitive_type) "void" (function_declarator) "deactivateMouse()" (identifier) "deactivateMouse" (parameter_list) "()" (() "(" ()) ")" (;) ";" (function_definition) "bool isMouseActive() { return( mMouseActive ); }" (primitive_type) "bool" (function_declarator) "isMouseActive()" (identifier) "isMouseActive" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return( mMouseActive ); }" ({) "{" (return_statement) "return( mMouseActive );" (return) "return" (parenthesized_expression) "( mMouseActive )" (() "(" (identifier) "mMouseActive" ()) ")" (;) ";" (}) "}" (declaration) "static bool enableJoystick();" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "enableJoystick()" (identifier) "enableJoystick" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static void disableJoystick();" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "disableJoystick()" (identifier) "disableJoystick" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static bool isJoystickEnabled();" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "isJoystickEnabled()" (identifier) "isJoystickEnabled" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool activateJoystick();" (primitive_type) "bool" (function_declarator) "activateJoystick()" (identifier) "activateJoystick" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void deactivateJoystick();" (primitive_type) "void" (function_declarator) "deactivateJoystick()" (identifier) "deactivateJoystick" (parameter_list) "()" (() "(" ()) ")" (;) ";" (function_definition) "bool isJoystickActive() { return( mJoystickActive ); }" (primitive_type) "bool" (function_declarator) "isJoystickActive()" (identifier) "isJoystickActive" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return( mJoystickActive ); }" ({) "{" (return_statement) "return( mJoystickActive );" (return) "return" (parenthesized_expression) "( mJoystickActive )" (() "(" (identifier) "mJoystickActive" ()) ")" (;) ";" (}) "}" (comment) "// Console interface: " (declaration) "const char* getJoystickAxesString( U32 deviceID );" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* getJoystickAxesString( U32 deviceID )" (*) "*" (function_declarator) "getJoystickAxesString( U32 deviceID )" (identifier) "getJoystickAxesString" (parameter_list) "( U32 deviceID )" (() "(" (parameter_declaration) "U32 deviceID" (type_identifier) "U32" (identifier) "deviceID" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// _H_WINDIRECTINPUT_ "
471
3
{"language": "c", "success": true, "metadata": {"lines": 105, "avg_line_length": 32.12, "nodes": 267, "errors": 0, "source_hash": "94f76ec99fbf11585df0f6fe9ebe68a98180385370a84450e177dfae79efa251", "categorized_nodes": 185}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _WINDIRECTINPUT_H_\r\n#define _WINDIRECTINPUT_H_\r\n\r\n#ifndef _PLATFORMWIN32_H_\r\n#include \"platformWin32/platformWin32.h\"\r\n#endif\r\n#ifndef _PLATFORMINPUT_H_\r\n#include \"platform/platformInput.h\"\r\n#endif\r\n#ifndef _WINDINPUTDEVICE_H_\r\n#include \"platformWin32/winDInputDevice.h\"\r\n#endif\r\n\r\n#define DIRECTINPUT_VERSION 0x0800\r\n#include <dinput.h>\r\n\r\nstruct InputEvent;\r\n\r\n//------------------------------------------------------------------------------\r\nclass DInputManager : public InputManager\r\n{\r\n private:\r\n typedef SimGroup Parent;\r\n\r\n HMODULE mDInputLib;\r\n LPDIRECTINPUT8 mDInputInterface;\r\n\r\n static bool smKeyboardEnabled;\r\n static bool smMouseEnabled;\r\n static bool smJoystickEnabled;\r\n\r\n bool mKeyboardActive;\r\n bool mMouseActive;\r\n bool mJoystickActive;\r\n\r\n void enumerateDevices();\r\n\r\n static BOOL CALLBACK EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef );\r\n\r\n bool acquire( U8 deviceType, U8 deviceID );\r\n void unacquire( U8 deviceType, U8 deviceID );\r\n\r\n public:\r\n DInputManager();\r\n\r\n bool enable();\r\n void disable();\r\n\r\n void onDeleteNotify( SimObject* object );\r\n bool onAdd();\r\n void onRemove();\r\n\r\n void process();\r\n\r\n // DirectInput functions:\r\n static void init();\r\n\r\n static bool enableKeyboard();\r\n static void disableKeyboard();\r\n static bool isKeyboardEnabled();\r\n bool activateKeyboard();\r\n void deactivateKeyboard();\r\n bool isKeyboardActive() { return( mKeyboardActive ); }\r\n\r\n static bool enableMouse();\r\n static void disableMouse();\r\n static bool isMouseEnabled();\r\n bool activateMouse();\r\n void deactivateMouse();\r\n bool isMouseActive() { return( mMouseActive ); }\r\n\r\n static bool enableJoystick();\r\n static void disableJoystick();\r\n static bool isJoystickEnabled();\r\n bool activateJoystick();\r\n void deactivateJoystick();\r\n bool isJoystickActive() { return( mJoystickActive ); }\r\n\r\n // Console interface:\r\n const char* getJoystickAxesString( U32 deviceID );\r\n};\r\n\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 13, 20, 27, 31, 34, 37, 266], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 104, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 2, "type": "identifier", "text": "_WINDIRECTINPUT_H_", "parent": 0, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 26}}, {"id": 3, "type": "preproc_def", "text": "#define _WINDIRECTINPUT_H_\r\n", "parent": 0, "children": [4, 5], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 5, "type": "identifier", "text": "_WINDIRECTINPUT_H_", "parent": 3, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 26}}, {"id": 6, "type": "preproc_ifdef", "text": "#ifndef _PLATFORMWIN32_H_\r\n#include \"platformWin32/platformWin32.h\"\r\n#endif", "parent": 0, "children": [7, 8, 9, 12], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 7, "type": "#ifndef", "text": "#ifndef", "parent": 6, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 8, "type": "identifier", "text": "_PLATFORMWIN32_H_", "parent": 6, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 25}}, {"id": 9, "type": "preproc_include", "text": "#include \"platformWin32/platformWin32.h\"\r\n", "parent": 6, "children": [10, 11], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"platformWin32/platformWin32.h\"", "parent": 9, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 40}}, {"id": 12, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 13, "type": "preproc_ifdef", "text": "#ifndef _PLATFORMINPUT_H_\r\n#include \"platform/platformInput.h\"\r\n#endif", "parent": 0, "children": [14, 15, 16, 19], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 14, "type": "#ifndef", "text": "#ifndef", "parent": 13, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 15, "type": "identifier", "text": "_PLATFORMINPUT_H_", "parent": 13, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 25}}, {"id": 16, "type": "preproc_include", "text": "#include \"platform/platformInput.h\"\r\n", "parent": 13, "children": [17, 18], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 17, "type": "#include", "text": "#include", "parent": 16, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 18, "type": "string_literal", "text": "\"platform/platformInput.h\"", "parent": 16, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 35}}, {"id": 19, "type": "#endif", "text": "#endif", "parent": 13, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 20, "type": "preproc_ifdef", "text": "#ifndef _WINDINPUTDEVICE_H_\r\n#include \"platformWin32/winDInputDevice.h\"\r\n#endif", "parent": 0, "children": [21, 22, 23, 26], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 21, "type": "#ifndef", "text": "#ifndef", "parent": 20, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 22, "type": "identifier", "text": "_WINDINPUTDEVICE_H_", "parent": 20, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 27}}, {"id": 23, "type": "preproc_include", "text": "#include \"platformWin32/winDInputDevice.h\"\r\n", "parent": 20, "children": [24, 25], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 24, "type": "#include", "text": "#include", "parent": 23, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 25, "type": "string_literal", "text": "\"platformWin32/winDInputDevice.h\"", "parent": 23, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 42}}, {"id": 26, "type": "#endif", "text": "#endif", "parent": 20, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 27, "type": "preproc_def", "text": "#define DIRECTINPUT_VERSION 0x0800\r\n", "parent": 0, "children": [28, 29, 30], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 28, "type": "#define", "text": "#define", "parent": 27, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 29, "type": "identifier", "text": "DIRECTINPUT_VERSION", "parent": 27, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 27}}, {"id": 30, "type": "preproc_arg", "text": "0x0800\r", "parent": 27, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 35}}, {"id": 31, "type": "preproc_include", "text": "#include <dinput.h>\r\n", "parent": 0, "children": [32, 33], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 32, "type": "#include", "text": "#include", "parent": 31, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 33, "type": "system_lib_string", "text": "<dinput.h>", "parent": 31, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 19}}, {"id": 34, "type": "struct_specifier", "text": "struct InputEvent", "parent": 0, "children": [35, 36], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 17}}, {"id": 35, "type": "struct", "text": "struct", "parent": 34, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 36, "type": "type_identifier", "text": "InputEvent", "parent": 34, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 17}}, {"id": 37, "type": "function_definition", "text": "class DInputManager : public InputManager\r\n{\r\n private:\r\n typedef SimGroup Parent;\r\n\r\n HMODULE mDInputLib;\r\n LPDIRECTINPUT8 mDInputInterface;\r\n\r\n static bool smKeyboardEnabled;\r\n static bool smMouseEnabled;\r\n static bool smJoystickEnabled;\r\n\r\n bool mKeyboardActive;\r\n bool mMouseActive;\r\n bool mJoystickActive;\r\n\r\n void enumerateDevices();\r\n\r\n static BOOL CALLBACK EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef );\r\n\r\n bool acquire( U8 deviceType, U8 deviceID );\r\n void unacquire( U8 deviceType, U8 deviceID );\r\n\r\n public:\r\n DInputManager();\r\n\r\n bool enable();\r\n void disable();\r\n\r\n void onDeleteNotify( SimObject* object );\r\n bool onAdd();\r\n void onRemove();\r\n\r\n void process();\r\n\r\n // DirectInput functions:\r\n static void init();\r\n\r\n static bool enableKeyboard();\r\n static void disableKeyboard();\r\n static bool isKeyboardEnabled();\r\n bool activateKeyboard();\r\n void deactivateKeyboard();\r\n bool isKeyboardActive() { return( mKeyboardActive ); }\r\n\r\n static bool enableMouse();\r\n static void disableMouse();\r\n static bool isMouseEnabled();\r\n bool activateMouse();\r\n void deactivateMouse();\r\n bool isMouseActive() { return( mMouseActive ); }\r\n\r\n static bool enableJoystick();\r\n static void disableJoystick();\r\n static bool isJoystickEnabled();\r\n bool activateJoystick();\r\n void deactivateJoystick();\r\n bool isJoystickActive() { return( mJoystickActive ); }\r\n\r\n // Console interface:\r\n const char* getJoystickAxesString( U32 deviceID );\r\n}", "parent": 0, "children": [38, 39], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 102, "column": 1}}, {"id": 38, "type": "identifier", "text": "DInputManager", "parent": 37, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 19}}, {"id": 39, "type": "ERROR", "text": ": public InputManager", "parent": 37, "children": [40], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 41}}, {"id": 40, "type": "identifier", "text": "InputManager", "parent": 39, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 41}}, {"id": 41, "type": "labeled_statement", "text": "private:\r\n typedef SimGroup Parent;", "parent": 37, "children": [42], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 44, "column": 30}}, {"id": 42, "type": "declaration", "text": "typedef SimGroup Parent;", "parent": 41, "children": [43, 44, 45], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 30}}, {"id": 43, "type": "type_identifier", "text": "typedef", "parent": 42, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 13}}, {"id": 44, "type": "identifier", "text": "SimGroup", "parent": 42, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 22}}, {"id": 45, "type": "ERROR", "text": "Parent", "parent": 42, "children": [46], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 29}}, {"id": 46, "type": "identifier", "text": "Parent", "parent": 45, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 29}}, {"id": 47, "type": "declaration", "text": "HMODULE mDInputLib;", "parent": 37, "children": [48, 49], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 32}}, {"id": 48, "type": "type_identifier", "text": "HMODULE", "parent": 47, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 13}}, {"id": 49, "type": "identifier", "text": "mDInputLib", "parent": 47, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 31}}, {"id": 50, "type": "declaration", "text": "LPDIRECTINPUT8 mDInputInterface;", "parent": 37, "children": [51, 52], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 38}}, {"id": 51, "type": "type_identifier", "text": "LPDIRECTINPUT8", "parent": 50, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 20}}, {"id": 52, "type": "identifier", "text": "mDInputInterface", "parent": 50, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 37}}, {"id": 53, "type": "declaration", "text": "static bool smKeyboardEnabled;", "parent": 37, "children": [54, 55], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 36}}, {"id": 54, "type": "primitive_type", "text": "bool", "parent": 53, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 17}}, {"id": 55, "type": "identifier", "text": "smKeyboardEnabled", "parent": 53, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 35}}, {"id": 56, "type": "declaration", "text": "static bool smMouseEnabled;", "parent": 37, "children": [57, 58], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 33}}, {"id": 57, "type": "primitive_type", "text": "bool", "parent": 56, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 17}}, {"id": 58, "type": "identifier", "text": "smMouseEnabled", "parent": 56, "children": [], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 32}}, {"id": 59, "type": "declaration", "text": "static bool smJoystickEnabled;", "parent": 37, "children": [60, 61], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 36}}, {"id": 60, "type": "primitive_type", "text": "bool", "parent": 59, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 17}}, {"id": 61, "type": "identifier", "text": "smJoystickEnabled", "parent": 59, "children": [], "start_point": {"row": 51, "column": 18}, "end_point": {"row": 51, "column": 35}}, {"id": 62, "type": "declaration", "text": "bool mKeyboardActive;", "parent": 37, "children": [63, 64], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 27}}, {"id": 63, "type": "primitive_type", "text": "bool", "parent": 62, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 10}}, {"id": 64, "type": "identifier", "text": "mKeyboardActive", "parent": 62, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 26}}, {"id": 65, "type": "declaration", "text": "bool mMouseActive;", "parent": 37, "children": [66, 67], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 24}}, {"id": 66, "type": "primitive_type", "text": "bool", "parent": 65, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 10}}, {"id": 67, "type": "identifier", "text": "mMouseActive", "parent": 65, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 23}}, {"id": 68, "type": "declaration", "text": "bool mJoystickActive;", "parent": 37, "children": [69, 70], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 27}}, {"id": 69, "type": "primitive_type", "text": "bool", "parent": 68, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 10}}, {"id": 70, "type": "identifier", "text": "mJoystickActive", "parent": 68, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 26}}, {"id": 71, "type": "declaration", "text": "void enumerateDevices();", "parent": 37, "children": [72, 73], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 31}}, {"id": 72, "type": "primitive_type", "text": "void", "parent": 71, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 10}}, {"id": 73, "type": "function_declarator", "text": "enumerateDevices()", "parent": 71, "children": [74, 75], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 30}}, {"id": 74, "type": "identifier", "text": "enumerateDevices", "parent": 73, "children": [], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 28}}, {"id": 75, "type": "parameter_list", "text": "()", "parent": 73, "children": [], "start_point": {"row": 57, "column": 28}, "end_point": {"row": 57, "column": 30}}, {"id": 76, "type": "declaration", "text": "static BOOL CALLBACK EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef );", "parent": 37, "children": [77, 78, 80], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 89}}, {"id": 77, "type": "type_identifier", "text": "BOOL", "parent": 76, "children": [], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 17}}, {"id": 78, "type": "ERROR", "text": "CALLBACK", "parent": 76, "children": [79], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 26}}, {"id": 79, "type": "identifier", "text": "CALLBACK", "parent": 78, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 26}}, {"id": 80, "type": "function_declarator", "text": "EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef )", "parent": 76, "children": [81, 82], "start_point": {"row": 59, "column": 27}, "end_point": {"row": 59, "column": 88}}, {"id": 81, "type": "identifier", "text": "EnumDevicesProc", "parent": 80, "children": [], "start_point": {"row": 59, "column": 27}, "end_point": {"row": 59, "column": 42}}, {"id": 82, "type": "parameter_list", "text": "( const DIDEVICEINSTANCE *pddi, LPVOID pvRef )", "parent": 80, "children": [83, 88], "start_point": {"row": 59, "column": 42}, "end_point": {"row": 59, "column": 88}}, {"id": 83, "type": "parameter_declaration", "text": "const DIDEVICEINSTANCE *pddi", "parent": 82, "children": [84, 85], "start_point": {"row": 59, "column": 44}, "end_point": {"row": 59, "column": 72}}, {"id": 84, "type": "type_identifier", "text": "DIDEVICEINSTANCE", "parent": 83, "children": [], "start_point": {"row": 59, "column": 50}, "end_point": {"row": 59, "column": 66}}, {"id": 85, "type": "pointer_declarator", "text": "*pddi", "parent": 83, "children": [86, 87], "start_point": {"row": 59, "column": 67}, "end_point": {"row": 59, "column": 72}}, {"id": 86, "type": "*", "text": "*", "parent": 85, "children": [], "start_point": {"row": 59, "column": 67}, "end_point": {"row": 59, "column": 68}}, {"id": 87, "type": "identifier", "text": "pddi", "parent": 85, "children": [], "start_point": {"row": 59, "column": 68}, "end_point": {"row": 59, "column": 72}}, {"id": 88, "type": "parameter_declaration", "text": "LPVOID pvRef", "parent": 82, "children": [89, 90], "start_point": {"row": 59, "column": 74}, "end_point": {"row": 59, "column": 86}}, {"id": 89, "type": "type_identifier", "text": "LPVOID", "parent": 88, "children": [], "start_point": {"row": 59, "column": 74}, "end_point": {"row": 59, "column": 80}}, {"id": 90, "type": "identifier", "text": "pvRef", "parent": 88, "children": [], "start_point": {"row": 59, "column": 81}, "end_point": {"row": 59, "column": 86}}, {"id": 91, "type": "declaration", "text": "bool acquire( U8 deviceType, U8 deviceID );", "parent": 37, "children": [92, 93], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 49}}, {"id": 92, "type": "primitive_type", "text": "bool", "parent": 91, "children": [], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 10}}, {"id": 93, "type": "function_declarator", "text": "acquire( U8 deviceType, U8 deviceID )", "parent": 91, "children": [94, 95], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 48}}, {"id": 94, "type": "identifier", "text": "acquire", "parent": 93, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 18}}, {"id": 95, "type": "parameter_list", "text": "( U8 deviceType, U8 deviceID )", "parent": 93, "children": [96, 99], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 48}}, {"id": 96, "type": "parameter_declaration", "text": "U8 deviceType", "parent": 95, "children": [97, 98], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 33}}, {"id": 97, "type": "type_identifier", "text": "U8", "parent": 96, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 22}}, {"id": 98, "type": "identifier", "text": "deviceType", "parent": 96, "children": [], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 33}}, {"id": 99, "type": "parameter_declaration", "text": "U8 deviceID", "parent": 95, "children": [100, 101], "start_point": {"row": 61, "column": 35}, "end_point": {"row": 61, "column": 46}}, {"id": 100, "type": "type_identifier", "text": "U8", "parent": 99, "children": [], "start_point": {"row": 61, "column": 35}, "end_point": {"row": 61, "column": 37}}, {"id": 101, "type": "identifier", "text": "deviceID", "parent": 99, "children": [], "start_point": {"row": 61, "column": 38}, "end_point": {"row": 61, "column": 46}}, {"id": 102, "type": "declaration", "text": "void unacquire( U8 deviceType, U8 deviceID );", "parent": 37, "children": [103, 104], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 51}}, {"id": 103, "type": "primitive_type", "text": "void", "parent": 102, "children": [], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 10}}, {"id": 104, "type": "function_declarator", "text": "unacquire( U8 deviceType, U8 deviceID )", "parent": 102, "children": [105, 106], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 50}}, {"id": 105, "type": "identifier", "text": "unacquire", "parent": 104, "children": [], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 20}}, {"id": 106, "type": "parameter_list", "text": "( U8 deviceType, U8 deviceID )", "parent": 104, "children": [107, 110], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 50}}, {"id": 107, "type": "parameter_declaration", "text": "U8 deviceType", "parent": 106, "children": [108, 109], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 35}}, {"id": 108, "type": "type_identifier", "text": "U8", "parent": 107, "children": [], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 24}}, {"id": 109, "type": "identifier", "text": "deviceType", "parent": 107, "children": [], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 35}}, {"id": 110, "type": "parameter_declaration", "text": "U8 deviceID", "parent": 106, "children": [111, 112], "start_point": {"row": 62, "column": 37}, "end_point": {"row": 62, "column": 48}}, {"id": 111, "type": "type_identifier", "text": "U8", "parent": 110, "children": [], "start_point": {"row": 62, "column": 37}, "end_point": {"row": 62, "column": 39}}, {"id": 112, "type": "identifier", "text": "deviceID", "parent": 110, "children": [], "start_point": {"row": 62, "column": 40}, "end_point": {"row": 62, "column": 48}}, {"id": 113, "type": "labeled_statement", "text": "public:\r\n DInputManager();", "parent": 37, "children": [], "start_point": {"row": 64, "column": 3}, "end_point": {"row": 65, "column": 22}}, {"id": 114, "type": "call_expression", "text": "DInputManager()", "parent": 113, "children": [115, 116], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 21}}, {"id": 115, "type": "identifier", "text": "DInputManager", "parent": 114, "children": [], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 19}}, {"id": 116, "type": "argument_list", "text": "()", "parent": 114, "children": [], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 21}}, {"id": 117, "type": "declaration", "text": "bool enable();", "parent": 37, "children": [118, 119], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 20}}, {"id": 118, "type": "primitive_type", "text": "bool", "parent": 117, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 10}}, {"id": 119, "type": "function_declarator", "text": "enable()", "parent": 117, "children": [120, 121], "start_point": {"row": 67, "column": 11}, "end_point": {"row": 67, "column": 19}}, {"id": 120, "type": "identifier", "text": "enable", "parent": 119, "children": [], "start_point": {"row": 67, "column": 11}, "end_point": {"row": 67, "column": 17}}, {"id": 121, "type": "parameter_list", "text": "()", "parent": 119, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 19}}, {"id": 122, "type": "declaration", "text": "void disable();", "parent": 37, "children": [123, 124], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 21}}, {"id": 123, "type": "primitive_type", "text": "void", "parent": 122, "children": [], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 10}}, {"id": 124, "type": "function_declarator", "text": "disable()", "parent": 122, "children": [125, 126], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 20}}, {"id": 125, "type": "identifier", "text": "disable", "parent": 124, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 18}}, {"id": 126, "type": "parameter_list", "text": "()", "parent": 124, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 20}}, {"id": 127, "type": "declaration", "text": "void onDeleteNotify( SimObject* object );", "parent": 37, "children": [128, 129], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 47}}, {"id": 128, "type": "primitive_type", "text": "void", "parent": 127, "children": [], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 10}}, {"id": 129, "type": "function_declarator", "text": "onDeleteNotify( SimObject* object )", "parent": 127, "children": [130, 131], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 46}}, {"id": 130, "type": "identifier", "text": "onDeleteNotify", "parent": 129, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 25}}, {"id": 131, "type": "parameter_list", "text": "( SimObject* object )", "parent": 129, "children": [132], "start_point": {"row": 70, "column": 25}, "end_point": {"row": 70, "column": 46}}, {"id": 132, "type": "parameter_declaration", "text": "SimObject* object", "parent": 131, "children": [133, 134], "start_point": {"row": 70, "column": 27}, "end_point": {"row": 70, "column": 44}}, {"id": 133, "type": "type_identifier", "text": "SimObject", "parent": 132, "children": [], "start_point": {"row": 70, "column": 27}, "end_point": {"row": 70, "column": 36}}, {"id": 134, "type": "pointer_declarator", "text": "* object", "parent": 132, "children": [135, 136], "start_point": {"row": 70, "column": 36}, "end_point": {"row": 70, "column": 44}}, {"id": 135, "type": "*", "text": "*", "parent": 134, "children": [], "start_point": {"row": 70, "column": 36}, "end_point": {"row": 70, "column": 37}}, {"id": 136, "type": "identifier", "text": "object", "parent": 134, "children": [], "start_point": {"row": 70, "column": 38}, "end_point": {"row": 70, "column": 44}}, {"id": 137, "type": "declaration", "text": "bool onAdd();", "parent": 37, "children": [138, 139], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 19}}, {"id": 138, "type": "primitive_type", "text": "bool", "parent": 137, "children": [], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 10}}, {"id": 139, "type": "function_declarator", "text": "onAdd()", "parent": 137, "children": [140, 141], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 18}}, {"id": 140, "type": "identifier", "text": "onAdd", "parent": 139, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 16}}, {"id": 141, "type": "parameter_list", "text": "()", "parent": 139, "children": [], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 18}}, {"id": 142, "type": "declaration", "text": "void onRemove();", "parent": 37, "children": [143, 144], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 22}}, {"id": 143, "type": "primitive_type", "text": "void", "parent": 142, "children": [], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 10}}, {"id": 144, "type": "function_declarator", "text": "onRemove()", "parent": 142, "children": [145, 146], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 21}}, {"id": 145, "type": "identifier", "text": "onRemove", "parent": 144, "children": [], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 19}}, {"id": 146, "type": "parameter_list", "text": "()", "parent": 144, "children": [], "start_point": {"row": 72, "column": 19}, "end_point": {"row": 72, "column": 21}}, {"id": 147, "type": "declaration", "text": "void process();", "parent": 37, "children": [148, 149], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 21}}, {"id": 148, "type": "primitive_type", "text": "void", "parent": 147, "children": [], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 10}}, {"id": 149, "type": "function_declarator", "text": "process()", "parent": 147, "children": [150, 151], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 20}}, {"id": 150, "type": "identifier", "text": "process", "parent": 149, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 18}}, {"id": 151, "type": "parameter_list", "text": "()", "parent": 149, "children": [], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 20}}, {"id": 152, "type": "declaration", "text": "static void init();", "parent": 37, "children": [153, 154], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 25}}, {"id": 153, "type": "primitive_type", "text": "void", "parent": 152, "children": [], "start_point": {"row": 77, "column": 13}, "end_point": {"row": 77, "column": 17}}, {"id": 154, "type": "function_declarator", "text": "init()", "parent": 152, "children": [155, 156], "start_point": {"row": 77, "column": 18}, "end_point": {"row": 77, "column": 24}}, {"id": 155, "type": "identifier", "text": "init", "parent": 154, "children": [], "start_point": {"row": 77, "column": 18}, "end_point": {"row": 77, "column": 22}}, {"id": 156, "type": "parameter_list", "text": "()", "parent": 154, "children": [], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 24}}, {"id": 157, "type": "declaration", "text": "static bool enableKeyboard();", "parent": 37, "children": [158, 159], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 79, "column": 35}}, {"id": 158, "type": "primitive_type", "text": "bool", "parent": 157, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 17}}, {"id": 159, "type": "function_declarator", "text": "enableKeyboard()", "parent": 157, "children": [160, 161], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 34}}, {"id": 160, "type": "identifier", "text": "enableKeyboard", "parent": 159, "children": [], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 32}}, {"id": 161, "type": "parameter_list", "text": "()", "parent": 159, "children": [], "start_point": {"row": 79, "column": 32}, "end_point": {"row": 79, "column": 34}}, {"id": 162, "type": "declaration", "text": "static void disableKeyboard();", "parent": 37, "children": [163, 164], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 36}}, {"id": 163, "type": "primitive_type", "text": "void", "parent": 162, "children": [], "start_point": {"row": 80, "column": 13}, "end_point": {"row": 80, "column": 17}}, {"id": 164, "type": "function_declarator", "text": "disableKeyboard()", "parent": 162, "children": [165, 166], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 35}}, {"id": 165, "type": "identifier", "text": "disableKeyboard", "parent": 164, "children": [], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 33}}, {"id": 166, "type": "parameter_list", "text": "()", "parent": 164, "children": [], "start_point": {"row": 80, "column": 33}, "end_point": {"row": 80, "column": 35}}, {"id": 167, "type": "declaration", "text": "static bool isKeyboardEnabled();", "parent": 37, "children": [168, 169], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 38}}, {"id": 168, "type": "primitive_type", "text": "bool", "parent": 167, "children": [], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 17}}, {"id": 169, "type": "function_declarator", "text": "isKeyboardEnabled()", "parent": 167, "children": [170, 171], "start_point": {"row": 81, "column": 18}, "end_point": {"row": 81, "column": 37}}, {"id": 170, "type": "identifier", "text": "isKeyboardEnabled", "parent": 169, "children": [], "start_point": {"row": 81, "column": 18}, "end_point": {"row": 81, "column": 35}}, {"id": 171, "type": "parameter_list", "text": "()", "parent": 169, "children": [], "start_point": {"row": 81, "column": 35}, "end_point": {"row": 81, "column": 37}}, {"id": 172, "type": "declaration", "text": "bool activateKeyboard();", "parent": 37, "children": [173, 174], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 30}}, {"id": 173, "type": "primitive_type", "text": "bool", "parent": 172, "children": [], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 10}}, {"id": 174, "type": "function_declarator", "text": "activateKeyboard()", "parent": 172, "children": [175, 176], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 29}}, {"id": 175, "type": "identifier", "text": "activateKeyboard", "parent": 174, "children": [], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 27}}, {"id": 176, "type": "parameter_list", "text": "()", "parent": 174, "children": [], "start_point": {"row": 82, "column": 27}, "end_point": {"row": 82, "column": 29}}, {"id": 177, "type": "declaration", "text": "void deactivateKeyboard();", "parent": 37, "children": [178, 179], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 32}}, {"id": 178, "type": "primitive_type", "text": "void", "parent": 177, "children": [], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 10}}, {"id": 179, "type": "function_declarator", "text": "deactivateKeyboard()", "parent": 177, "children": [180, 181], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 31}}, {"id": 180, "type": "identifier", "text": "deactivateKeyboard", "parent": 179, "children": [], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 29}}, {"id": 181, "type": "parameter_list", "text": "()", "parent": 179, "children": [], "start_point": {"row": 83, "column": 29}, "end_point": {"row": 83, "column": 31}}, {"id": 182, "type": "function_definition", "text": "bool isKeyboardActive() { return( mKeyboardActive ); }", "parent": 37, "children": [183, 184], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 66}}, {"id": 183, "type": "primitive_type", "text": "bool", "parent": 182, "children": [], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 10}}, {"id": 184, "type": "function_declarator", "text": "isKeyboardActive()", "parent": 182, "children": [185, 186], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 29}}, {"id": 185, "type": "identifier", "text": "isKeyboardActive", "parent": 184, "children": [], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 27}}, {"id": 186, "type": "parameter_list", "text": "()", "parent": 184, "children": [], "start_point": {"row": 84, "column": 27}, "end_point": {"row": 84, "column": 29}}, {"id": 187, "type": "return_statement", "text": "return( mKeyboardActive );", "parent": 182, "children": [188], "start_point": {"row": 84, "column": 38}, "end_point": {"row": 84, "column": 64}}, {"id": 188, "type": "parenthesized_expression", "text": "( mKeyboardActive )", "parent": 187, "children": [189], "start_point": {"row": 84, "column": 44}, "end_point": {"row": 84, "column": 63}}, {"id": 189, "type": "identifier", "text": "mKeyboardActive", "parent": 188, "children": [], "start_point": {"row": 84, "column": 46}, "end_point": {"row": 84, "column": 61}}, {"id": 190, "type": "declaration", "text": "static bool enableMouse();", "parent": 37, "children": [191, 192], "start_point": {"row": 86, "column": 6}, "end_point": {"row": 86, "column": 32}}, {"id": 191, "type": "primitive_type", "text": "bool", "parent": 190, "children": [], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 17}}, {"id": 192, "type": "function_declarator", "text": "enableMouse()", "parent": 190, "children": [193, 194], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 31}}, {"id": 193, "type": "identifier", "text": "enableMouse", "parent": 192, "children": [], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 29}}, {"id": 194, "type": "parameter_list", "text": "()", "parent": 192, "children": [], "start_point": {"row": 86, "column": 29}, "end_point": {"row": 86, "column": 31}}, {"id": 195, "type": "declaration", "text": "static void disableMouse();", "parent": 37, "children": [196, 197], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 33}}, {"id": 196, "type": "primitive_type", "text": "void", "parent": 195, "children": [], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 17}}, {"id": 197, "type": "function_declarator", "text": "disableMouse()", "parent": 195, "children": [198, 199], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 32}}, {"id": 198, "type": "identifier", "text": "disableMouse", "parent": 197, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 30}}, {"id": 199, "type": "parameter_list", "text": "()", "parent": 197, "children": [], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 32}}, {"id": 200, "type": "declaration", "text": "static bool isMouseEnabled();", "parent": 37, "children": [201, 202], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 35}}, {"id": 201, "type": "primitive_type", "text": "bool", "parent": 200, "children": [], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 17}}, {"id": 202, "type": "function_declarator", "text": "isMouseEnabled()", "parent": 200, "children": [203, 204], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 34}}, {"id": 203, "type": "identifier", "text": "isMouseEnabled", "parent": 202, "children": [], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 32}}, {"id": 204, "type": "parameter_list", "text": "()", "parent": 202, "children": [], "start_point": {"row": 88, "column": 32}, "end_point": {"row": 88, "column": 34}}, {"id": 205, "type": "declaration", "text": "bool activateMouse();", "parent": 37, "children": [206, 207], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 27}}, {"id": 206, "type": "primitive_type", "text": "bool", "parent": 205, "children": [], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 10}}, {"id": 207, "type": "function_declarator", "text": "activateMouse()", "parent": 205, "children": [208, 209], "start_point": {"row": 89, "column": 11}, "end_point": {"row": 89, "column": 26}}, {"id": 208, "type": "identifier", "text": "activateMouse", "parent": 207, "children": [], "start_point": {"row": 89, "column": 11}, "end_point": {"row": 89, "column": 24}}, {"id": 209, "type": "parameter_list", "text": "()", "parent": 207, "children": [], "start_point": {"row": 89, "column": 24}, "end_point": {"row": 89, "column": 26}}, {"id": 210, "type": "declaration", "text": "void deactivateMouse();", "parent": 37, "children": [211, 212], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 29}}, {"id": 211, "type": "primitive_type", "text": "void", "parent": 210, "children": [], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 10}}, {"id": 212, "type": "function_declarator", "text": "deactivateMouse()", "parent": 210, "children": [213, 214], "start_point": {"row": 90, "column": 11}, "end_point": {"row": 90, "column": 28}}, {"id": 213, "type": "identifier", "text": "deactivateMouse", "parent": 212, "children": [], "start_point": {"row": 90, "column": 11}, "end_point": {"row": 90, "column": 26}}, {"id": 214, "type": "parameter_list", "text": "()", "parent": 212, "children": [], "start_point": {"row": 90, "column": 26}, "end_point": {"row": 90, "column": 28}}, {"id": 215, "type": "function_definition", "text": "bool isMouseActive() { return( mMouseActive ); }", "parent": 37, "children": [216, 217], "start_point": {"row": 91, "column": 6}, "end_point": {"row": 91, "column": 63}}, {"id": 216, "type": "primitive_type", "text": "bool", "parent": 215, "children": [], "start_point": {"row": 91, "column": 6}, "end_point": {"row": 91, "column": 10}}, {"id": 217, "type": "function_declarator", "text": "isMouseActive()", "parent": 215, "children": [218, 219], "start_point": {"row": 91, "column": 11}, "end_point": {"row": 91, "column": 26}}, {"id": 218, "type": "identifier", "text": "isMouseActive", "parent": 217, "children": [], "start_point": {"row": 91, "column": 11}, "end_point": {"row": 91, "column": 24}}, {"id": 219, "type": "parameter_list", "text": "()", "parent": 217, "children": [], "start_point": {"row": 91, "column": 24}, "end_point": {"row": 91, "column": 26}}, {"id": 220, "type": "return_statement", "text": "return( mMouseActive );", "parent": 215, "children": [221], "start_point": {"row": 91, "column": 38}, "end_point": {"row": 91, "column": 61}}, {"id": 221, "type": "parenthesized_expression", "text": "( mMouseActive )", "parent": 220, "children": [222], "start_point": {"row": 91, "column": 44}, "end_point": {"row": 91, "column": 60}}, {"id": 222, "type": "identifier", "text": "mMouseActive", "parent": 221, "children": [], "start_point": {"row": 91, "column": 46}, "end_point": {"row": 91, "column": 58}}, {"id": 223, "type": "declaration", "text": "static bool enableJoystick();", "parent": 37, "children": [224, 225], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 35}}, {"id": 224, "type": "primitive_type", "text": "bool", "parent": 223, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 17}}, {"id": 225, "type": "function_declarator", "text": "enableJoystick()", "parent": 223, "children": [226, 227], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 34}}, {"id": 226, "type": "identifier", "text": "enableJoystick", "parent": 225, "children": [], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 32}}, {"id": 227, "type": "parameter_list", "text": "()", "parent": 225, "children": [], "start_point": {"row": 93, "column": 32}, "end_point": {"row": 93, "column": 34}}, {"id": 228, "type": "declaration", "text": "static void disableJoystick();", "parent": 37, "children": [229, 230], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 36}}, {"id": 229, "type": "primitive_type", "text": "void", "parent": 228, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 17}}, {"id": 230, "type": "function_declarator", "text": "disableJoystick()", "parent": 228, "children": [231, 232], "start_point": {"row": 94, "column": 18}, "end_point": {"row": 94, "column": 35}}, {"id": 231, "type": "identifier", "text": "disableJoystick", "parent": 230, "children": [], "start_point": {"row": 94, "column": 18}, "end_point": {"row": 94, "column": 33}}, {"id": 232, "type": "parameter_list", "text": "()", "parent": 230, "children": [], "start_point": {"row": 94, "column": 33}, "end_point": {"row": 94, "column": 35}}, {"id": 233, "type": "declaration", "text": "static bool isJoystickEnabled();", "parent": 37, "children": [234, 235], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 38}}, {"id": 234, "type": "primitive_type", "text": "bool", "parent": 233, "children": [], "start_point": {"row": 95, "column": 13}, "end_point": {"row": 95, "column": 17}}, {"id": 235, "type": "function_declarator", "text": "isJoystickEnabled()", "parent": 233, "children": [236, 237], "start_point": {"row": 95, "column": 18}, "end_point": {"row": 95, "column": 37}}, {"id": 236, "type": "identifier", "text": "isJoystickEnabled", "parent": 235, "children": [], "start_point": {"row": 95, "column": 18}, "end_point": {"row": 95, "column": 35}}, {"id": 237, "type": "parameter_list", "text": "()", "parent": 235, "children": [], "start_point": {"row": 95, "column": 35}, "end_point": {"row": 95, "column": 37}}, {"id": 238, "type": "declaration", "text": "bool activateJoystick();", "parent": 37, "children": [239, 240], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 30}}, {"id": 239, "type": "primitive_type", "text": "bool", "parent": 238, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 10}}, {"id": 240, "type": "function_declarator", "text": "activateJoystick()", "parent": 238, "children": [241, 242], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 29}}, {"id": 241, "type": "identifier", "text": "activateJoystick", "parent": 240, "children": [], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 27}}, {"id": 242, "type": "parameter_list", "text": "()", "parent": 240, "children": [], "start_point": {"row": 96, "column": 27}, "end_point": {"row": 96, "column": 29}}, {"id": 243, "type": "declaration", "text": "void deactivateJoystick();", "parent": 37, "children": [244, 245], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 32}}, {"id": 244, "type": "primitive_type", "text": "void", "parent": 243, "children": [], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 10}}, {"id": 245, "type": "function_declarator", "text": "deactivateJoystick()", "parent": 243, "children": [246, 247], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 31}}, {"id": 246, "type": "identifier", "text": "deactivateJoystick", "parent": 245, "children": [], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 29}}, {"id": 247, "type": "parameter_list", "text": "()", "parent": 245, "children": [], "start_point": {"row": 97, "column": 29}, "end_point": {"row": 97, "column": 31}}, {"id": 248, "type": "function_definition", "text": "bool isJoystickActive() { return( mJoystickActive ); }", "parent": 37, "children": [249, 250], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 66}}, {"id": 249, "type": "primitive_type", "text": "bool", "parent": 248, "children": [], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 10}}, {"id": 250, "type": "function_declarator", "text": "isJoystickActive()", "parent": 248, "children": [251, 252], "start_point": {"row": 98, "column": 11}, "end_point": {"row": 98, "column": 29}}, {"id": 251, "type": "identifier", "text": "isJoystickActive", "parent": 250, "children": [], "start_point": {"row": 98, "column": 11}, "end_point": {"row": 98, "column": 27}}, {"id": 252, "type": "parameter_list", "text": "()", "parent": 250, "children": [], "start_point": {"row": 98, "column": 27}, "end_point": {"row": 98, "column": 29}}, {"id": 253, "type": "return_statement", "text": "return( mJoystickActive );", "parent": 248, "children": [254], "start_point": {"row": 98, "column": 38}, "end_point": {"row": 98, "column": 64}}, {"id": 254, "type": "parenthesized_expression", "text": "( mJoystickActive )", "parent": 253, "children": [255], "start_point": {"row": 98, "column": 44}, "end_point": {"row": 98, "column": 63}}, {"id": 255, "type": "identifier", "text": "mJoystickActive", "parent": 254, "children": [], "start_point": {"row": 98, "column": 46}, "end_point": {"row": 98, "column": 61}}, {"id": 256, "type": "declaration", "text": "const char* getJoystickAxesString( U32 deviceID );", "parent": 37, "children": [257, 258], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 56}}, {"id": 257, "type": "primitive_type", "text": "char", "parent": 256, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 16}}, {"id": 258, "type": "pointer_declarator", "text": "* getJoystickAxesString( U32 deviceID )", "parent": 256, "children": [259, 260], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 55}}, {"id": 259, "type": "*", "text": "*", "parent": 258, "children": [], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 17}}, {"id": 260, "type": "function_declarator", "text": "getJoystickAxesString( U32 deviceID )", "parent": 258, "children": [261, 262], "start_point": {"row": 101, "column": 18}, "end_point": {"row": 101, "column": 55}}, {"id": 261, "type": "identifier", "text": "getJoystickAxesString", "parent": 260, "children": [], "start_point": {"row": 101, "column": 18}, "end_point": {"row": 101, "column": 39}}, {"id": 262, "type": "parameter_list", "text": "( U32 deviceID )", "parent": 260, "children": [263], "start_point": {"row": 101, "column": 39}, "end_point": {"row": 101, "column": 55}}, {"id": 263, "type": "parameter_declaration", "text": "U32 deviceID", "parent": 262, "children": [264, 265], "start_point": {"row": 101, "column": 41}, "end_point": {"row": 101, "column": 53}}, {"id": 264, "type": "type_identifier", "text": "U32", "parent": 263, "children": [], "start_point": {"row": 101, "column": 41}, "end_point": {"row": 101, "column": 44}}, {"id": 265, "type": "identifier", "text": "deviceID", "parent": 263, "children": [], "start_point": {"row": 101, "column": 45}, "end_point": {"row": 101, "column": 53}}, {"id": 266, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 6}}]}, "node_categories": {"declarations": {"functions": [37, 73, 80, 93, 104, 119, 124, 129, 139, 144, 149, 154, 159, 164, 169, 174, 179, 182, 184, 192, 197, 202, 207, 212, 215, 217, 225, 230, 235, 240, 245, 248, 250, 260], "variables": [42, 47, 50, 53, 56, 59, 62, 65, 68, 71, 76, 83, 88, 91, 96, 99, 102, 107, 110, 117, 122, 127, 132, 137, 142, 147, 152, 157, 162, 167, 172, 177, 190, 195, 200, 205, 210, 223, 228, 233, 238, 243, 256, 263], "classes": [34, 35], "imports": [9, 10, 16, 17, 23, 24, 31, 32], "modules": [], "enums": []}, "statements": {"expressions": [114, 188, 221, 254], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 8, 12, 13, 14, 15, 19, 20, 21, 22, 26, 29, 36, 38, 40, 43, 44, 46, 48, 49, 51, 52, 55, 58, 61, 64, 67, 70, 74, 77, 79, 81, 84, 87, 89, 90, 94, 97, 98, 100, 101, 105, 108, 109, 111, 112, 115, 120, 125, 130, 133, 136, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 189, 193, 198, 203, 208, 213, 218, 222, 226, 231, 236, 241, 246, 251, 255, 261, 264, 265, 266], "returns": [187, 220, 253], "exceptions": []}, "expressions": {"calls": [], "literals": [11, 18, 25, 33], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 37, "universal_type": "function", "name": "DInputManager", "text_snippet": "class DInputManager : public InputManager\r\n{\r\n private:\r\n typedef SimGroup Parent;\r\n\r\n H"}, {"node_id": 73, "universal_type": "function", "name": "unknown", "text_snippet": "enumerateDevices()"}, {"node_id": 80, "universal_type": "function", "name": "unknown", "text_snippet": "EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef )"}, {"node_id": 93, "universal_type": "function", "name": "unknown", "text_snippet": "acquire( U8 deviceType, U8 deviceID )"}, {"node_id": 104, "universal_type": "function", "name": "unknown", "text_snippet": "unacquire( U8 deviceType, U8 deviceID )"}, {"node_id": 119, "universal_type": "function", "name": "unknown", "text_snippet": "enable()"}, {"node_id": 124, "universal_type": "function", "name": "unknown", "text_snippet": "disable()"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "onDeleteNotify( SimObject* object )"}, {"node_id": 139, "universal_type": "function", "name": "unknown", "text_snippet": "onAdd()"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "onRemove()"}, {"node_id": 149, "universal_type": "function", "name": "unknown", "text_snippet": "process()"}, {"node_id": 154, "universal_type": "function", "name": "unknown", "text_snippet": "init()"}, {"node_id": 159, "universal_type": "function", "name": "unknown", "text_snippet": "enableKeyboard()"}, {"node_id": 164, "universal_type": "function", "name": "unknown", "text_snippet": "disableKeyboard()"}, {"node_id": 169, "universal_type": "function", "name": "unknown", "text_snippet": "isKeyboardEnabled()"}, {"node_id": 174, "universal_type": "function", "name": "unknown", "text_snippet": "activateKeyboard()"}, {"node_id": 179, "universal_type": "function", "name": "unknown", "text_snippet": "deactivateKeyboard()"}, {"node_id": 182, "universal_type": "function", "name": "isKeyboardActive", "text_snippet": "bool isKeyboardActive() { return( mKeyboardActive ); }"}, {"node_id": 184, "universal_type": "function", "name": "unknown", "text_snippet": "isKeyboardActive()"}, {"node_id": 192, "universal_type": "function", "name": "unknown", "text_snippet": "enableMouse()"}, {"node_id": 197, "universal_type": "function", "name": "unknown", "text_snippet": "disableMouse()"}, {"node_id": 202, "universal_type": "function", "name": "unknown", "text_snippet": "isMouseEnabled()"}, {"node_id": 207, "universal_type": "function", "name": "unknown", "text_snippet": "activateMouse()"}, {"node_id": 212, "universal_type": "function", "name": "unknown", "text_snippet": "deactivateMouse()"}, {"node_id": 215, "universal_type": "function", "name": "isMouseActive", "text_snippet": "bool isMouseActive() { return( mMouseActive ); }"}, {"node_id": 217, "universal_type": "function", "name": "unknown", "text_snippet": "isMouseActive()"}, {"node_id": 225, "universal_type": "function", "name": "unknown", "text_snippet": "enableJoystick()"}, {"node_id": 230, "universal_type": "function", "name": "unknown", "text_snippet": "disableJoystick()"}, {"node_id": 235, "universal_type": "function", "name": "unknown", "text_snippet": "isJoystickEnabled()"}, {"node_id": 240, "universal_type": "function", "name": "unknown", "text_snippet": "activateJoystick()"}, {"node_id": 245, "universal_type": "function", "name": "unknown", "text_snippet": "deactivateJoystick()"}, {"node_id": 248, "universal_type": "function", "name": "isJoystickActive", "text_snippet": "bool isJoystickActive() { return( mJoystickActive ); }"}, {"node_id": 250, "universal_type": "function", "name": "unknown", "text_snippet": "isJoystickActive()"}, {"node_id": 260, "universal_type": "function", "name": "unknown", "text_snippet": "getJoystickAxesString( U32 deviceID )"}], "class_declarations": [{"node_id": 34, "universal_type": "class", "name": "InputEvent", "text_snippet": "struct InputEvent"}, {"node_id": 35, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 9, "text": "#include \"platformWin32/platformWin32.h\"\r\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 16, "text": "#include \"platform/platformInput.h\"\r\n"}, {"node_id": 17, "text": "#include"}, {"node_id": 23, "text": "#include \"platformWin32/winDInputDevice.h\"\r\n"}, {"node_id": 24, "text": "#include"}, {"node_id": 31, "text": "#include <dinput.h>\r\n"}, {"node_id": 32, "text": "#include"}]}, "original_source_code": "//-----------------------------------------------------------------------------\r\n// Copyright (c) 2013 GarageGames, LLC\r\n//\r\n// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n// of this software and associated documentation files (the \"Software\"), to\r\n// deal in the Software without restriction, including without limitation the\r\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\r\n// sell copies of the Software, and to permit persons to whom the Software is\r\n// furnished to do so, subject to the following conditions:\r\n//\r\n// The above copyright notice and this permission notice shall be included in\r\n// all copies or substantial portions of the Software.\r\n//\r\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\r\n// IN THE SOFTWARE.\r\n//-----------------------------------------------------------------------------\r\n\r\n#ifndef _WINDIRECTINPUT_H_\r\n#define _WINDIRECTINPUT_H_\r\n\r\n#ifndef _PLATFORMWIN32_H_\r\n#include \"platformWin32/platformWin32.h\"\r\n#endif\r\n#ifndef _PLATFORMINPUT_H_\r\n#include \"platform/platformInput.h\"\r\n#endif\r\n#ifndef _WINDINPUTDEVICE_H_\r\n#include \"platformWin32/winDInputDevice.h\"\r\n#endif\r\n\r\n#define DIRECTINPUT_VERSION 0x0800\r\n#include <dinput.h>\r\n\r\nstruct InputEvent;\r\n\r\n//------------------------------------------------------------------------------\r\nclass DInputManager : public InputManager\r\n{\r\n private:\r\n typedef SimGroup Parent;\r\n\r\n HMODULE mDInputLib;\r\n LPDIRECTINPUT8 mDInputInterface;\r\n\r\n static bool smKeyboardEnabled;\r\n static bool smMouseEnabled;\r\n static bool smJoystickEnabled;\r\n\r\n bool mKeyboardActive;\r\n bool mMouseActive;\r\n bool mJoystickActive;\r\n\r\n void enumerateDevices();\r\n\r\n static BOOL CALLBACK EnumDevicesProc( const DIDEVICEINSTANCE *pddi, LPVOID pvRef );\r\n\r\n bool acquire( U8 deviceType, U8 deviceID );\r\n void unacquire( U8 deviceType, U8 deviceID );\r\n\r\n public:\r\n DInputManager();\r\n\r\n bool enable();\r\n void disable();\r\n\r\n void onDeleteNotify( SimObject* object );\r\n bool onAdd();\r\n void onRemove();\r\n\r\n void process();\r\n\r\n // DirectInput functions:\r\n static void init();\r\n\r\n static bool enableKeyboard();\r\n static void disableKeyboard();\r\n static bool isKeyboardEnabled();\r\n bool activateKeyboard();\r\n void deactivateKeyboard();\r\n bool isKeyboardActive() { return( mKeyboardActive ); }\r\n\r\n static bool enableMouse();\r\n static void disableMouse();\r\n static bool isMouseEnabled();\r\n bool activateMouse();\r\n void deactivateMouse();\r\n bool isMouseActive() { return( mMouseActive ); }\r\n\r\n static bool enableJoystick();\r\n static void disableJoystick();\r\n static bool isJoystickEnabled();\r\n bool activateJoystick();\r\n void deactivateJoystick();\r\n bool isJoystickActive() { return( mJoystickActive ); }\r\n\r\n // Console interface:\r\n const char* getJoystickAxesString( U32 deviceID );\r\n};\r\n\r\n#endif // _H_WINDIRECTINPUT_\r\n"}
368
c
/* * Reed Solomon Encoder/Decoder * * Copyright <NAME> (<EMAIL>) 1991-2009 * * This software library is licensed under terms of the GNU GENERAL * PUBLIC LICENSE * * RSCODE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * RSCODE 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 Rscode. If not, see <http://www.gnu.org/licenses/>. * * <NAME>: * <NAME> grants the users of the JPEG Embedding Library a * royalty-free license to modify and redistribute the software package * "rscode error-correction coding library", in binary or source * form. Authors who wish to use the rscode error correction source code * in any substantially different software application than the JPEG * Embedding Library may contact the author for other license terms. * * Commercial licensing is available under a separate license, please * contact author for details. * * Source code is available at http://rscode.sourceforge.net */ #include <stdio.h> #include <ctype.h> #include "ecc.h" /* Encoder parity bytes */ int pBytes[MAXDEG]; /* Decoder syndrome bytes */ int synBytes[MAXDEG]; /* generator polynomial */ int genPoly[MAXDEG*2]; int DEBUG = FALSE; static void compute_genpoly (int nbytes, int genpoly[]); /* Initialize lookup tables, polynomials, etc. */ void initialize_ecc () { /* Initialize the galois field arithmetic tables */ init_galois_tables(); /* Compute the encoder generator polynomial */ compute_genpoly(NPAR, genPoly); } void zero_fill_from (unsigned char buf[], int from, int to) { int i; for (i = from; i < to; i++) buf[i] = 0; } /* debugging routines */ void print_parity (void) { int i; printf("Parity Bytes: "); for (i = 0; i < NPAR; i++) printf("[%d]:%x, ",i,pBytes[i]); printf("\n"); } void print_syndrome (void) { int i; printf("Syndrome Bytes: "); for (i = 0; i < NPAR; i++) printf("[%d]:%x, ",i,synBytes[i]); printf("\n"); } /* Append the parity bytes onto the end of the message */ void build_codeword (unsigned char msg[], int nbytes, unsigned char dst[]) { int i; for (i = 0; i < nbytes; i++) dst[i] = msg[i]; for (i = 0; i < NPAR; i++) { dst[i+nbytes] = pBytes[NPAR-1-i]; } } /********************************************************** * Reed Solomon Decoder * * Computes the syndrome of a codeword. Puts the results * into the synBytes[] array. */ void decode_data(unsigned char data[], int nbytes) { int i, j, sum; for (j = 0; j < NPAR; j++) { sum = 0; for (i = 0; i < nbytes; i++) { sum = data[i] ^ gmult(gexp[j+1], sum); } synBytes[j] = sum; } } /* Check if the syndrome is zero */ int check_syndrome (void) { int i, nz = 0; for (i =0 ; i < NPAR; i++) { if (synBytes[i] != 0) { nz = 1; break; } } return nz; } void debug_check_syndrome (void) { int i; for (i = 0; i < 3; i++) { printf(" inv log S[%d]/S[%d] = %d\n", i, i+1, glog[gmult(synBytes[i], ginv(synBytes[i+1]))]); } } /* Create a generator polynomial for an n byte RS code. * The coefficients are returned in the genPoly arg. * Make sure that the genPoly array which is passed in is * at least n+1 bytes long. */ static void compute_genpoly (int nbytes, int genpoly[]) { int i, tp[256], tp1[256]; /* multiply (x + a^n) for n = 1 to nbytes */ zero_poly(tp1); tp1[0] = 1; for (i = 1; i <= nbytes; i++) { zero_poly(tp); tp[0] = gexp[i]; /* set up x+a^n */ tp[1] = 1; mult_polys(genpoly, tp, tp1); copy_poly(tp1, genpoly); } } /* Simulate a LFSR with generator polynomial for n byte RS code. * Pass in a pointer to the data array, and amount of data. * * The parity bytes are deposited into pBytes[], and the whole message * and parity are copied to dest to make a codeword. * */ void encode_data (unsigned char msg[], int nbytes, unsigned char dst[]) { int i, LFSR[NPAR+1],dbyte, j; for(i=0; i < NPAR+1; i++) LFSR[i]=0; for (i = 0; i < nbytes; i++) { dbyte = msg[i] ^ LFSR[NPAR-1]; for (j = NPAR-1; j > 0; j--) { LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte); } LFSR[0] = gmult(genPoly[0], dbyte); } for (i = 0; i < NPAR; i++) pBytes[i] = LFSR[i]; build_codeword(msg, nbytes, dst); }
24.2
186
(translation_unit) "/* \n * Reed Solomon Encoder/Decoder \n *\n * Copyright <NAME> (<EMAIL>) 1991-2009\n *\n * This software library is licensed under terms of the GNU GENERAL\n * PUBLIC LICENSE\n *\n * RSCODE is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * RSCODE 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 Rscode. If not, see <http://www.gnu.org/licenses/>.\n * \n * <NAME>:\n * <NAME> grants the users of the JPEG Embedding Library a\n * royalty-free license to modify and redistribute the software package\n * "rscode error-correction coding library", in binary or source\n * form. Authors who wish to use the rscode error correction source code\n * in any substantially different software application than the JPEG\n * Embedding Library may contact the author for other license terms.\n *\n * Commercial licensing is available under a separate license, please\n * contact author for details.\n *\n * Source code is available at http://rscode.sourceforge.net\n */\n\n#include <stdio.h>\n#include <ctype.h>\n#include "ecc.h"\n\n/* Encoder parity bytes */\nint pBytes[MAXDEG];\n\n/* Decoder syndrome bytes */\nint synBytes[MAXDEG];\n\n/* generator polynomial */\nint genPoly[MAXDEG*2];\n\nint DEBUG = FALSE;\n\nstatic void\ncompute_genpoly (int nbytes, int genpoly[]);\n\n/* Initialize lookup tables, polynomials, etc. */\nvoid\ninitialize_ecc ()\n{\n /* Initialize the galois field arithmetic tables */\n init_galois_tables();\n\n /* Compute the encoder generator polynomial */\n compute_genpoly(NPAR, genPoly);\n}\n\nvoid\nzero_fill_from (unsigned char buf[], int from, int to)\n{\n int i;\n for (i = from; i < to; i++) buf[i] = 0;\n}\n\n/* debugging routines */\nvoid\nprint_parity (void)\n{ \n int i;\n printf("Parity Bytes: ");\n for (i = 0; i < NPAR; i++) \n printf("[%d]:%x, ",i,pBytes[i]);\n printf("\n");\n}\n\n\nvoid\nprint_syndrome (void)\n{ \n int i;\n printf("Syndrome Bytes: ");\n for (i = 0; i < NPAR; i++) \n printf("[%d]:%x, ",i,synBytes[i]);\n printf("\n");\n}\n\n/* Append the parity bytes onto the end of the message */\nvoid\nbuild_codeword (unsigned char msg[], int nbytes, unsigned char dst[])\n{\n int i;\n \n for (i = 0; i < nbytes; i++) dst[i] = msg[i];\n \n for (i = 0; i < NPAR; i++) {\n dst[i+nbytes] = pBytes[NPAR-1-i];\n }\n}\n \n/**********************************************************\n * Reed Solomon Decoder \n *\n * Computes the syndrome of a codeword. Puts the results\n * into the synBytes[] array.\n */\n \nvoid\ndecode_data(unsigned char data[], int nbytes)\n{\n int i, j, sum;\n for (j = 0; j < NPAR; j++) {\n sum = 0;\n for (i = 0; i < nbytes; i++) {\n sum = data[i] ^ gmult(gexp[j+1], sum);\n }\n synBytes[j] = sum;\n }\n}\n\n\n/* Check if the syndrome is zero */\nint\ncheck_syndrome (void)\n{\n int i, nz = 0;\n for (i =0 ; i < NPAR; i++) {\n if (synBytes[i] != 0) {\n nz = 1;\n break;\n }\n }\n return nz;\n}\n\n\nvoid\ndebug_check_syndrome (void)\n{ \n int i;\n \n for (i = 0; i < 3; i++) {\n printf(" inv log S[%d]/S[%d] = %d\n", i, i+1, \n glog[gmult(synBytes[i], ginv(synBytes[i+1]))]);\n }\n}\n\n\n/* Create a generator polynomial for an n byte RS code. \n * The coefficients are returned in the genPoly arg.\n * Make sure that the genPoly array which is passed in is \n * at least n+1 bytes long.\n */\n\nstatic void\ncompute_genpoly (int nbytes, int genpoly[])\n{\n int i, tp[256], tp1[256];\n \n /* multiply (x + a^n) for n = 1 to nbytes */\n\n zero_poly(tp1);\n tp1[0] = 1;\n\n for (i = 1; i <= nbytes; i++) {\n zero_poly(tp);\n tp[0] = gexp[i]; /* set up x+a^n */\n tp[1] = 1;\n \n mult_polys(genpoly, tp, tp1);\n copy_poly(tp1, genpoly);\n }\n}\n\n/* Simulate a LFSR with generator polynomial for n byte RS code. \n * Pass in a pointer to the data array, and amount of data. \n *\n * The parity bytes are deposited into pBytes[], and the whole message\n * and parity are copied to dest to make a codeword.\n * \n */\n\nvoid\nencode_data (unsigned char msg[], int nbytes, unsigned char dst[])\n{\n int i, LFSR[NPAR+1],dbyte, j;\n \n for(i=0; i < NPAR+1; i++) LFSR[i]=0;\n\n for (i = 0; i < nbytes; i++) {\n dbyte = msg[i] ^ LFSR[NPAR-1];\n for (j = NPAR-1; j > 0; j--) {\n LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);\n }\n LFSR[0] = gmult(genPoly[0], dbyte);\n }\n\n for (i = 0; i < NPAR; i++) \n pBytes[i] = LFSR[i];\n \n build_codeword(msg, nbytes, dst);\n}\n\n" (comment) "/* \n * Reed Solomon Encoder/Decoder \n *\n * Copyright <NAME> (<EMAIL>) 1991-2009\n *\n * This software library is licensed under terms of the GNU GENERAL\n * PUBLIC LICENSE\n *\n * RSCODE is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * RSCODE 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 Rscode. If not, see <http://www.gnu.org/licenses/>.\n * \n * <NAME>:\n * <NAME> grants the users of the JPEG Embedding Library a\n * royalty-free license to modify and redistribute the software package\n * "rscode error-correction coding library", in binary or source\n * form. Authors who wish to use the rscode error correction source code\n * in any substantially different software application than the JPEG\n * Embedding Library may contact the author for other license terms.\n *\n * Commercial licensing is available under a separate license, please\n * contact author for details.\n *\n * Source code is available at http://rscode.sourceforge.net\n */" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <ctype.h>\n" (#include) "#include" (system_lib_string) "<ctype.h>" (preproc_include) "#include "ecc.h"\n" (#include) "#include" (string_literal) ""ecc.h"" (") """ (string_content) "ecc.h" (") """ (comment) "/* Encoder parity bytes */" (declaration) "int pBytes[MAXDEG];" (primitive_type) "int" (array_declarator) "pBytes[MAXDEG]" (identifier) "pBytes" ([) "[" (identifier) "MAXDEG" (]) "]" (;) ";" (comment) "/* Decoder syndrome bytes */" (declaration) "int synBytes[MAXDEG];" (primitive_type) "int" (array_declarator) "synBytes[MAXDEG]" (identifier) "synBytes" ([) "[" (identifier) "MAXDEG" (]) "]" (;) ";" (comment) "/* generator polynomial */" (declaration) "int genPoly[MAXDEG*2];" (primitive_type) "int" (array_declarator) "genPoly[MAXDEG*2]" (identifier) "genPoly" ([) "[" (binary_expression) "MAXDEG*2" (identifier) "MAXDEG" (*) "*" (number_literal) "2" (]) "]" (;) ";" (declaration) "int DEBUG = FALSE;" (primitive_type) "int" (init_declarator) "DEBUG = FALSE" (identifier) "DEBUG" (=) "=" (false) "FALSE" (;) ";" (declaration) "static void\ncompute_genpoly (int nbytes, int genpoly[]);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "compute_genpoly (int nbytes, int genpoly[])" (identifier) "compute_genpoly" (parameter_list) "(int nbytes, int genpoly[])" (() "(" (parameter_declaration) "int nbytes" (primitive_type) "int" (identifier) "nbytes" (,) "," (parameter_declaration) "int genpoly[]" (primitive_type) "int" (array_declarator) "genpoly[]" (identifier) "genpoly" ([) "[" (]) "]" ()) ")" (;) ";" (comment) "/* Initialize lookup tables, polynomials, etc. */" (function_definition) "void\ninitialize_ecc ()\n{\n /* Initialize the galois field arithmetic tables */\n init_galois_tables();\n\n /* Compute the encoder generator polynomial */\n compute_genpoly(NPAR, genPoly);\n}" (primitive_type) "void" (function_declarator) "initialize_ecc ()" (identifier) "initialize_ecc" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n /* Initialize the galois field arithmetic tables */\n init_galois_tables();\n\n /* Compute the encoder generator polynomial */\n compute_genpoly(NPAR, genPoly);\n}" ({) "{" (comment) "/* Initialize the galois field arithmetic tables */" (expression_statement) "init_galois_tables();" (call_expression) "init_galois_tables()" (identifier) "init_galois_tables" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/* Compute the encoder generator polynomial */" (expression_statement) "compute_genpoly(NPAR, genPoly);" (call_expression) "compute_genpoly(NPAR, genPoly)" (identifier) "compute_genpoly" (argument_list) "(NPAR, genPoly)" (() "(" (identifier) "NPAR" (,) "," (identifier) "genPoly" ()) ")" (;) ";" (}) "}" (function_definition) "void\nzero_fill_from (unsigned char buf[], int from, int to)\n{\n int i;\n for (i = from; i < to; i++) buf[i] = 0;\n}" (primitive_type) "void" (function_declarator) "zero_fill_from (unsigned char buf[], int from, int to)" (identifier) "zero_fill_from" (parameter_list) "(unsigned char buf[], int from, int to)" (() "(" (parameter_declaration) "unsigned char buf[]" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (array_declarator) "buf[]" (identifier) "buf" ([) "[" (]) "]" (,) "," (parameter_declaration) "int from" (primitive_type) "int" (identifier) "from" (,) "," (parameter_declaration) "int to" (primitive_type) "int" (identifier) "to" ()) ")" (compound_statement) "{\n int i;\n for (i = from; i < to; i++) buf[i] = 0;\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (for_statement) "for (i = from; i < to; i++) buf[i] = 0;" (for) "for" (() "(" (assignment_expression) "i = from" (identifier) "i" (=) "=" (identifier) "from" (;) ";" (binary_expression) "i < to" (identifier) "i" (<) "<" (identifier) "to" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "buf[i] = 0;" (assignment_expression) "buf[i] = 0" (subscript_expression) "buf[i]" (identifier) "buf" ([) "[" (identifier) "i" (]) "]" (=) "=" (number_literal) "0" (;) ";" (}) "}" (comment) "/* debugging routines */" (function_definition) "void\nprint_parity (void)\n{ \n int i;\n printf("Parity Bytes: ");\n for (i = 0; i < NPAR; i++) \n printf("[%d]:%x, ",i,pBytes[i]);\n printf("\n");\n}" (primitive_type) "void" (function_declarator) "print_parity (void)" (identifier) "print_parity" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ \n int i;\n printf("Parity Bytes: ");\n for (i = 0; i < NPAR; i++) \n printf("[%d]:%x, ",i,pBytes[i]);\n printf("\n");\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (expression_statement) "printf("Parity Bytes: ");" (call_expression) "printf("Parity Bytes: ")" (identifier) "printf" (argument_list) "("Parity Bytes: ")" (() "(" (string_literal) ""Parity Bytes: "" (") """ (string_content) "Parity Bytes: " (") """ ()) ")" (;) ";" (for_statement) "for (i = 0; i < NPAR; i++) \n printf("[%d]:%x, ",i,pBytes[i]);" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < NPAR" (identifier) "i" (<) "<" (identifier) "NPAR" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "printf("[%d]:%x, ",i,pBytes[i]);" (call_expression) "printf("[%d]:%x, ",i,pBytes[i])" (identifier) "printf" (argument_list) "("[%d]:%x, ",i,pBytes[i])" (() "(" (string_literal) ""[%d]:%x, "" (") """ (string_content) "[%d]:%x, " (") """ (,) "," (identifier) "i" (,) "," (subscript_expression) "pBytes[i]" (identifier) "pBytes" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "void\nprint_syndrome (void)\n{ \n int i;\n printf("Syndrome Bytes: ");\n for (i = 0; i < NPAR; i++) \n printf("[%d]:%x, ",i,synBytes[i]);\n printf("\n");\n}" (primitive_type) "void" (function_declarator) "print_syndrome (void)" (identifier) "print_syndrome" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ \n int i;\n printf("Syndrome Bytes: ");\n for (i = 0; i < NPAR; i++) \n printf("[%d]:%x, ",i,synBytes[i]);\n printf("\n");\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (expression_statement) "printf("Syndrome Bytes: ");" (call_expression) "printf("Syndrome Bytes: ")" (identifier) "printf" (argument_list) "("Syndrome Bytes: ")" (() "(" (string_literal) ""Syndrome Bytes: "" (") """ (string_content) "Syndrome Bytes: " (") """ ()) ")" (;) ";" (for_statement) "for (i = 0; i < NPAR; i++) \n printf("[%d]:%x, ",i,synBytes[i]);" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < NPAR" (identifier) "i" (<) "<" (identifier) "NPAR" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "printf("[%d]:%x, ",i,synBytes[i]);" (call_expression) "printf("[%d]:%x, ",i,synBytes[i])" (identifier) "printf" (argument_list) "("[%d]:%x, ",i,synBytes[i])" (() "(" (string_literal) ""[%d]:%x, "" (") """ (string_content) "[%d]:%x, " (") """ (,) "," (identifier) "i" (,) "," (subscript_expression) "synBytes[i]" (identifier) "synBytes" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}" (comment) "/* Append the parity bytes onto the end of the message */" (function_definition) "void\nbuild_codeword (unsigned char msg[], int nbytes, unsigned char dst[])\n{\n int i;\n \n for (i = 0; i < nbytes; i++) dst[i] = msg[i];\n \n for (i = 0; i < NPAR; i++) {\n dst[i+nbytes] = pBytes[NPAR-1-i];\n }\n}" (primitive_type) "void" (function_declarator) "build_codeword (unsigned char msg[], int nbytes, unsigned char dst[])" (identifier) "build_codeword" (parameter_list) "(unsigned char msg[], int nbytes, unsigned char dst[])" (() "(" (parameter_declaration) "unsigned char msg[]" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (array_declarator) "msg[]" (identifier) "msg" ([) "[" (]) "]" (,) "," (parameter_declaration) "int nbytes" (primitive_type) "int" (identifier) "nbytes" (,) "," (parameter_declaration) "unsigned char dst[]" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (array_declarator) "dst[]" (identifier) "dst" ([) "[" (]) "]" ()) ")" (compound_statement) "{\n int i;\n \n for (i = 0; i < nbytes; i++) dst[i] = msg[i];\n \n for (i = 0; i < NPAR; i++) {\n dst[i+nbytes] = pBytes[NPAR-1-i];\n }\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (for_statement) "for (i = 0; i < nbytes; i++) dst[i] = msg[i];" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < nbytes" (identifier) "i" (<) "<" (identifier) "nbytes" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "dst[i] = msg[i];" (assignment_expression) "dst[i] = msg[i]" (subscript_expression) "dst[i]" (identifier) "dst" ([) "[" (identifier) "i" (]) "]" (=) "=" (subscript_expression) "msg[i]" (identifier) "msg" ([) "[" (identifier) "i" (]) "]" (;) ";" (for_statement) "for (i = 0; i < NPAR; i++) {\n dst[i+nbytes] = pBytes[NPAR-1-i];\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < NPAR" (identifier) "i" (<) "<" (identifier) "NPAR" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n dst[i+nbytes] = pBytes[NPAR-1-i];\n }" ({) "{" (expression_statement) "dst[i+nbytes] = pBytes[NPAR-1-i];" (assignment_expression) "dst[i+nbytes] = pBytes[NPAR-1-i]" (subscript_expression) "dst[i+nbytes]" (identifier) "dst" ([) "[" (binary_expression) "i+nbytes" (identifier) "i" (+) "+" (identifier) "nbytes" (]) "]" (=) "=" (subscript_expression) "pBytes[NPAR-1-i]" (identifier) "pBytes" ([) "[" (binary_expression) "NPAR-1-i" (binary_expression) "NPAR-1" (identifier) "NPAR" (-) "-" (number_literal) "1" (-) "-" (identifier) "i" (]) "]" (;) ";" (}) "}" (}) "}" (comment) "/**********************************************************\n * Reed Solomon Decoder \n *\n * Computes the syndrome of a codeword. Puts the results\n * into the synBytes[] array.\n */" (function_definition) "void\ndecode_data(unsigned char data[], int nbytes)\n{\n int i, j, sum;\n for (j = 0; j < NPAR; j++) {\n sum = 0;\n for (i = 0; i < nbytes; i++) {\n sum = data[i] ^ gmult(gexp[j+1], sum);\n }\n synBytes[j] = sum;\n }\n}" (primitive_type) "void" (function_declarator) "decode_data(unsigned char data[], int nbytes)" (identifier) "decode_data" (parameter_list) "(unsigned char data[], int nbytes)" (() "(" (parameter_declaration) "unsigned char data[]" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (array_declarator) "data[]" (identifier) "data" ([) "[" (]) "]" (,) "," (parameter_declaration) "int nbytes" (primitive_type) "int" (identifier) "nbytes" ()) ")" (compound_statement) "{\n int i, j, sum;\n for (j = 0; j < NPAR; j++) {\n sum = 0;\n for (i = 0; i < nbytes; i++) {\n sum = data[i] ^ gmult(gexp[j+1], sum);\n }\n synBytes[j] = sum;\n }\n}" ({) "{" (declaration) "int i, j, sum;" (primitive_type) "int" (identifier) "i" (,) "," (identifier) "j" (,) "," (identifier) "sum" (;) ";" (for_statement) "for (j = 0; j < NPAR; j++) {\n sum = 0;\n for (i = 0; i < nbytes; i++) {\n sum = data[i] ^ gmult(gexp[j+1], sum);\n }\n synBytes[j] = sum;\n }" (for) "for" (() "(" (assignment_expression) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j < NPAR" (identifier) "j" (<) "<" (identifier) "NPAR" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n sum = 0;\n for (i = 0; i < nbytes; i++) {\n sum = data[i] ^ gmult(gexp[j+1], sum);\n }\n synBytes[j] = sum;\n }" ({) "{" (expression_statement) "sum = 0;" (assignment_expression) "sum = 0" (identifier) "sum" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for (i = 0; i < nbytes; i++) {\n sum = data[i] ^ gmult(gexp[j+1], sum);\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < nbytes" (identifier) "i" (<) "<" (identifier) "nbytes" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n sum = data[i] ^ gmult(gexp[j+1], sum);\n }" ({) "{" (expression_statement) "sum = data[i] ^ gmult(gexp[j+1], sum);" (assignment_expression) "sum = data[i] ^ gmult(gexp[j+1], sum)" (identifier) "sum" (=) "=" (binary_expression) "data[i] ^ gmult(gexp[j+1], sum)" (subscript_expression) "data[i]" (identifier) "data" ([) "[" (identifier) "i" (]) "]" (^) "^" (call_expression) "gmult(gexp[j+1], sum)" (identifier) "gmult" (argument_list) "(gexp[j+1], sum)" (() "(" (subscript_expression) "gexp[j+1]" (identifier) "gexp" ([) "[" (binary_expression) "j+1" (identifier) "j" (+) "+" (number_literal) "1" (]) "]" (,) "," (identifier) "sum" ()) ")" (;) ";" (}) "}" (expression_statement) "synBytes[j] = sum;" (assignment_expression) "synBytes[j] = sum" (subscript_expression) "synBytes[j]" (identifier) "synBytes" ([) "[" (identifier) "j" (]) "]" (=) "=" (identifier) "sum" (;) ";" (}) "}" (}) "}" (comment) "/* Check if the syndrome is zero */" (function_definition) "int\ncheck_syndrome (void)\n{\n int i, nz = 0;\n for (i =0 ; i < NPAR; i++) {\n if (synBytes[i] != 0) {\n nz = 1;\n break;\n }\n }\n return nz;\n}" (primitive_type) "int" (function_declarator) "check_syndrome (void)" (identifier) "check_syndrome" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n int i, nz = 0;\n for (i =0 ; i < NPAR; i++) {\n if (synBytes[i] != 0) {\n nz = 1;\n break;\n }\n }\n return nz;\n}" ({) "{" (declaration) "int i, nz = 0;" (primitive_type) "int" (identifier) "i" (,) "," (init_declarator) "nz = 0" (identifier) "nz" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for (i =0 ; i < NPAR; i++) {\n if (synBytes[i] != 0) {\n nz = 1;\n break;\n }\n }" (for) "for" (() "(" (assignment_expression) "i =0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < NPAR" (identifier) "i" (<) "<" (identifier) "NPAR" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n if (synBytes[i] != 0) {\n nz = 1;\n break;\n }\n }" ({) "{" (if_statement) "if (synBytes[i] != 0) {\n nz = 1;\n break;\n }" (if) "if" (parenthesized_expression) "(synBytes[i] != 0)" (() "(" (binary_expression) "synBytes[i] != 0" (subscript_expression) "synBytes[i]" (identifier) "synBytes" ([) "[" (identifier) "i" (]) "]" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n nz = 1;\n break;\n }" ({) "{" (expression_statement) "nz = 1;" (assignment_expression) "nz = 1" (identifier) "nz" (=) "=" (number_literal) "1" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (return_statement) "return nz;" (return) "return" (identifier) "nz" (;) ";" (}) "}" (function_definition) "void\ndebug_check_syndrome (void)\n{ \n int i;\n \n for (i = 0; i < 3; i++) {\n printf(" inv log S[%d]/S[%d] = %d\n", i, i+1, \n glog[gmult(synBytes[i], ginv(synBytes[i+1]))]);\n }\n}" (primitive_type) "void" (function_declarator) "debug_check_syndrome (void)" (identifier) "debug_check_syndrome" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ \n int i;\n \n for (i = 0; i < 3; i++) {\n printf(" inv log S[%d]/S[%d] = %d\n", i, i+1, \n glog[gmult(synBytes[i], ginv(synBytes[i+1]))]);\n }\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (for_statement) "for (i = 0; i < 3; i++) {\n printf(" inv log S[%d]/S[%d] = %d\n", i, i+1, \n glog[gmult(synBytes[i], ginv(synBytes[i+1]))]);\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < 3" (identifier) "i" (<) "<" (number_literal) "3" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n printf(" inv log S[%d]/S[%d] = %d\n", i, i+1, \n glog[gmult(synBytes[i], ginv(synBytes[i+1]))]);\n }" ({) "{" (expression_statement) "printf(" inv log S[%d]/S[%d] = %d\n", i, i+1, \n glog[gmult(synBytes[i], ginv(synBytes[i+1]))]);" (call_expression) "printf(" inv log S[%d]/S[%d] = %d\n", i, i+1, \n glog[gmult(synBytes[i], ginv(synBytes[i+1]))])" (identifier) "printf" (argument_list) "(" inv log S[%d]/S[%d] = %d\n", i, i+1, \n glog[gmult(synBytes[i], ginv(synBytes[i+1]))])" (() "(" (string_literal) "" inv log S[%d]/S[%d] = %d\n"" (") """ (string_content) " inv log S[%d]/S[%d] = %d" (escape_sequence) "\n" (") """ (,) "," (identifier) "i" (,) "," (binary_expression) "i+1" (identifier) "i" (+) "+" (number_literal) "1" (,) "," (subscript_expression) "glog[gmult(synBytes[i], ginv(synBytes[i+1]))]" (identifier) "glog" ([) "[" (call_expression) "gmult(synBytes[i], ginv(synBytes[i+1]))" (identifier) "gmult" (argument_list) "(synBytes[i], ginv(synBytes[i+1]))" (() "(" (subscript_expression) "synBytes[i]" (identifier) "synBytes" ([) "[" (identifier) "i" (]) "]" (,) "," (call_expression) "ginv(synBytes[i+1])" (identifier) "ginv" (argument_list) "(synBytes[i+1])" (() "(" (subscript_expression) "synBytes[i+1]" (identifier) "synBytes" ([) "[" (binary_expression) "i+1" (identifier) "i" (+) "+" (number_literal) "1" (]) "]" ()) ")" ()) ")" (]) "]" ()) ")" (;) ";" (}) "}" (}) "}" (comment) "/* Create a generator polynomial for an n byte RS code. \n * The coefficients are returned in the genPoly arg.\n * Make sure that the genPoly array which is passed in is \n * at least n+1 bytes long.\n */" (function_definition) "static void\ncompute_genpoly (int nbytes, int genpoly[])\n{\n int i, tp[256], tp1[256];\n \n /* multiply (x + a^n) for n = 1 to nbytes */\n\n zero_poly(tp1);\n tp1[0] = 1;\n\n for (i = 1; i <= nbytes; i++) {\n zero_poly(tp);\n tp[0] = gexp[i]; /* set up x+a^n */\n tp[1] = 1;\n \n mult_polys(genpoly, tp, tp1);\n copy_poly(tp1, genpoly);\n }\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "compute_genpoly (int nbytes, int genpoly[])" (identifier) "compute_genpoly" (parameter_list) "(int nbytes, int genpoly[])" (() "(" (parameter_declaration) "int nbytes" (primitive_type) "int" (identifier) "nbytes" (,) "," (parameter_declaration) "int genpoly[]" (primitive_type) "int" (array_declarator) "genpoly[]" (identifier) "genpoly" ([) "[" (]) "]" ()) ")" (compound_statement) "{\n int i, tp[256], tp1[256];\n \n /* multiply (x + a^n) for n = 1 to nbytes */\n\n zero_poly(tp1);\n tp1[0] = 1;\n\n for (i = 1; i <= nbytes; i++) {\n zero_poly(tp);\n tp[0] = gexp[i]; /* set up x+a^n */\n tp[1] = 1;\n \n mult_polys(genpoly, tp, tp1);\n copy_poly(tp1, genpoly);\n }\n}" ({) "{" (declaration) "int i, tp[256], tp1[256];" (primitive_type) "int" (identifier) "i" (,) "," (array_declarator) "tp[256]" (identifier) "tp" ([) "[" (number_literal) "256" (]) "]" (,) "," (array_declarator) "tp1[256]" (identifier) "tp1" ([) "[" (number_literal) "256" (]) "]" (;) ";" (comment) "/* multiply (x + a^n) for n = 1 to nbytes */" (expression_statement) "zero_poly(tp1);" (call_expression) "zero_poly(tp1)" (identifier) "zero_poly" (argument_list) "(tp1)" (() "(" (identifier) "tp1" ()) ")" (;) ";" (expression_statement) "tp1[0] = 1;" (assignment_expression) "tp1[0] = 1" (subscript_expression) "tp1[0]" (identifier) "tp1" ([) "[" (number_literal) "0" (]) "]" (=) "=" (number_literal) "1" (;) ";" (for_statement) "for (i = 1; i <= nbytes; i++) {\n zero_poly(tp);\n tp[0] = gexp[i]; /* set up x+a^n */\n tp[1] = 1;\n \n mult_polys(genpoly, tp, tp1);\n copy_poly(tp1, genpoly);\n }" (for) "for" (() "(" (assignment_expression) "i = 1" (identifier) "i" (=) "=" (number_literal) "1" (;) ";" (binary_expression) "i <= nbytes" (identifier) "i" (<=) "<=" (identifier) "nbytes" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n zero_poly(tp);\n tp[0] = gexp[i]; /* set up x+a^n */\n tp[1] = 1;\n \n mult_polys(genpoly, tp, tp1);\n copy_poly(tp1, genpoly);\n }" ({) "{" (expression_statement) "zero_poly(tp);" (call_expression) "zero_poly(tp)" (identifier) "zero_poly" (argument_list) "(tp)" (() "(" (identifier) "tp" ()) ")" (;) ";" (expression_statement) "tp[0] = gexp[i];" (assignment_expression) "tp[0] = gexp[i]" (subscript_expression) "tp[0]" (identifier) "tp" ([) "[" (number_literal) "0" (]) "]" (=) "=" (subscript_expression) "gexp[i]" (identifier) "gexp" ([) "[" (identifier) "i" (]) "]" (;) ";" (comment) "/* set up x+a^n */" (expression_statement) "tp[1] = 1;" (assignment_expression) "tp[1] = 1" (subscript_expression) "tp[1]" (identifier) "tp" ([) "[" (number_literal) "1" (]) "]" (=) "=" (number_literal) "1" (;) ";" (expression_statement) "mult_polys(genpoly, tp, tp1);" (call_expression) "mult_polys(genpoly, tp, tp1)" (identifier) "mult_polys" (argument_list) "(genpoly, tp, tp1)" (() "(" (identifier) "genpoly" (,) "," (identifier) "tp" (,) "," (identifier) "tp1" ()) ")" (;) ";" (expression_statement) "copy_poly(tp1, genpoly);" (call_expression) "copy_poly(tp1, genpoly)" (identifier) "copy_poly" (argument_list) "(tp1, genpoly)" (() "(" (identifier) "tp1" (,) "," (identifier) "genpoly" ()) ")" (;) ";" (}) "}" (}) "}" (comment) "/* Simulate a LFSR with generator polynomial for n byte RS code. \n * Pass in a pointer to the data array, and amount of data. \n *\n * The parity bytes are deposited into pBytes[], and the whole message\n * and parity are copied to dest to make a codeword.\n * \n */" (function_definition) "void\nencode_data (unsigned char msg[], int nbytes, unsigned char dst[])\n{\n int i, LFSR[NPAR+1],dbyte, j;\n \n for(i=0; i < NPAR+1; i++) LFSR[i]=0;\n\n for (i = 0; i < nbytes; i++) {\n dbyte = msg[i] ^ LFSR[NPAR-1];\n for (j = NPAR-1; j > 0; j--) {\n LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);\n }\n LFSR[0] = gmult(genPoly[0], dbyte);\n }\n\n for (i = 0; i < NPAR; i++) \n pBytes[i] = LFSR[i];\n \n build_codeword(msg, nbytes, dst);\n}" (primitive_type) "void" (function_declarator) "encode_data (unsigned char msg[], int nbytes, unsigned char dst[])" (identifier) "encode_data" (parameter_list) "(unsigned char msg[], int nbytes, unsigned char dst[])" (() "(" (parameter_declaration) "unsigned char msg[]" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (array_declarator) "msg[]" (identifier) "msg" ([) "[" (]) "]" (,) "," (parameter_declaration) "int nbytes" (primitive_type) "int" (identifier) "nbytes" (,) "," (parameter_declaration) "unsigned char dst[]" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (array_declarator) "dst[]" (identifier) "dst" ([) "[" (]) "]" ()) ")" (compound_statement) "{\n int i, LFSR[NPAR+1],dbyte, j;\n \n for(i=0; i < NPAR+1; i++) LFSR[i]=0;\n\n for (i = 0; i < nbytes; i++) {\n dbyte = msg[i] ^ LFSR[NPAR-1];\n for (j = NPAR-1; j > 0; j--) {\n LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);\n }\n LFSR[0] = gmult(genPoly[0], dbyte);\n }\n\n for (i = 0; i < NPAR; i++) \n pBytes[i] = LFSR[i];\n \n build_codeword(msg, nbytes, dst);\n}" ({) "{" (declaration) "int i, LFSR[NPAR+1],dbyte, j;" (primitive_type) "int" (identifier) "i" (,) "," (array_declarator) "LFSR[NPAR+1]" (identifier) "LFSR" ([) "[" (binary_expression) "NPAR+1" (identifier) "NPAR" (+) "+" (number_literal) "1" (]) "]" (,) "," (identifier) "dbyte" (,) "," (identifier) "j" (;) ";" (for_statement) "for(i=0; i < NPAR+1; i++) LFSR[i]=0;" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < NPAR+1" (identifier) "i" (<) "<" (binary_expression) "NPAR+1" (identifier) "NPAR" (+) "+" (number_literal) "1" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "LFSR[i]=0;" (assignment_expression) "LFSR[i]=0" (subscript_expression) "LFSR[i]" (identifier) "LFSR" ([) "[" (identifier) "i" (]) "]" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for (i = 0; i < nbytes; i++) {\n dbyte = msg[i] ^ LFSR[NPAR-1];\n for (j = NPAR-1; j > 0; j--) {\n LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);\n }\n LFSR[0] = gmult(genPoly[0], dbyte);\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < nbytes" (identifier) "i" (<) "<" (identifier) "nbytes" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n dbyte = msg[i] ^ LFSR[NPAR-1];\n for (j = NPAR-1; j > 0; j--) {\n LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);\n }\n LFSR[0] = gmult(genPoly[0], dbyte);\n }" ({) "{" (expression_statement) "dbyte = msg[i] ^ LFSR[NPAR-1];" (assignment_expression) "dbyte = msg[i] ^ LFSR[NPAR-1]" (identifier) "dbyte" (=) "=" (binary_expression) "msg[i] ^ LFSR[NPAR-1]" (subscript_expression) "msg[i]" (identifier) "msg" ([) "[" (identifier) "i" (]) "]" (^) "^" (subscript_expression) "LFSR[NPAR-1]" (identifier) "LFSR" ([) "[" (binary_expression) "NPAR-1" (identifier) "NPAR" (-) "-" (number_literal) "1" (]) "]" (;) ";" (for_statement) "for (j = NPAR-1; j > 0; j--) {\n LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);\n }" (for) "for" (() "(" (assignment_expression) "j = NPAR-1" (identifier) "j" (=) "=" (binary_expression) "NPAR-1" (identifier) "NPAR" (-) "-" (number_literal) "1" (;) ";" (binary_expression) "j > 0" (identifier) "j" (>) ">" (number_literal) "0" (;) ";" (update_expression) "j--" (identifier) "j" (--) "--" ()) ")" (compound_statement) "{\n LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);\n }" ({) "{" (expression_statement) "LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);" (assignment_expression) "LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte)" (subscript_expression) "LFSR[j]" (identifier) "LFSR" ([) "[" (identifier) "j" (]) "]" (=) "=" (binary_expression) "LFSR[j-1] ^ gmult(genPoly[j], dbyte)" (subscript_expression) "LFSR[j-1]" (identifier) "LFSR" ([) "[" (binary_expression) "j-1" (identifier) "j" (-) "-" (number_literal) "1" (]) "]" (^) "^" (call_expression) "gmult(genPoly[j], dbyte)" (identifier) "gmult" (argument_list) "(genPoly[j], dbyte)" (() "(" (subscript_expression) "genPoly[j]" (identifier) "genPoly" ([) "[" (identifier) "j" (]) "]" (,) "," (identifier) "dbyte" ()) ")" (;) ";" (}) "}" (expression_statement) "LFSR[0] = gmult(genPoly[0], dbyte);" (assignment_expression) "LFSR[0] = gmult(genPoly[0], dbyte)" (subscript_expression) "LFSR[0]" (identifier) "LFSR" ([) "[" (number_literal) "0" (]) "]" (=) "=" (call_expression) "gmult(genPoly[0], dbyte)" (identifier) "gmult" (argument_list) "(genPoly[0], dbyte)" (() "(" (subscript_expression) "genPoly[0]" (identifier) "genPoly" ([) "[" (number_literal) "0" (]) "]" (,) "," (identifier) "dbyte" ()) ")" (;) ";" (}) "}" (for_statement) "for (i = 0; i < NPAR; i++) \n pBytes[i] = LFSR[i];" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < NPAR" (identifier) "i" (<) "<" (identifier) "NPAR" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "pBytes[i] = LFSR[i];" (assignment_expression) "pBytes[i] = LFSR[i]" (subscript_expression) "pBytes[i]" (identifier) "pBytes" ([) "[" (identifier) "i" (]) "]" (=) "=" (subscript_expression) "LFSR[i]" (identifier) "LFSR" ([) "[" (identifier) "i" (]) "]" (;) ";" (expression_statement) "build_codeword(msg, nbytes, dst);" (call_expression) "build_codeword(msg, nbytes, dst)" (identifier) "build_codeword" (argument_list) "(msg, nbytes, dst)" (() "(" (identifier) "msg" (,) "," (identifier) "nbytes" (,) "," (identifier) "dst" ()) ")" (;) ";" (}) "}"
1,056
0
{"language": "c", "success": true, "metadata": {"lines": 186, "avg_line_length": 24.2, "nodes": 629, "errors": 0, "source_hash": "5507a1c33975d326c81a81ad06a6205dcf93b4480dd39bc319d21d0756fa8518", "categorized_nodes": 453}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <ctype.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<ctype.h>", "parent": 3, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include \"ecc.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"ecc.h\"", "parent": 6, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 16}}, {"id": 9, "type": "declaration", "text": "int pBytes[MAXDEG];", "parent": null, "children": [10, 11], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 19}}, {"id": 10, "type": "primitive_type", "text": "int", "parent": 9, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 3}}, {"id": 11, "type": "array_declarator", "text": "pBytes[MAXDEG]", "parent": 9, "children": [12, 13], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 18}}, {"id": 12, "type": "identifier", "text": "pBytes", "parent": 11, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 10}}, {"id": 13, "type": "identifier", "text": "MAXDEG", "parent": 11, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 17}}, {"id": 14, "type": "declaration", "text": "int synBytes[MAXDEG];", "parent": null, "children": [15, 16], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 21}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 3}}, {"id": 16, "type": "array_declarator", "text": "synBytes[MAXDEG]", "parent": 14, "children": [17, 18], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 20}}, {"id": 17, "type": "identifier", "text": "synBytes", "parent": 16, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 12}}, {"id": 18, "type": "identifier", "text": "MAXDEG", "parent": 16, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 19}}, {"id": 19, "type": "declaration", "text": "int genPoly[MAXDEG*2];", "parent": null, "children": [20, 21], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 22}}, {"id": 20, "type": "primitive_type", "text": "int", "parent": 19, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 3}}, {"id": 21, "type": "array_declarator", "text": "genPoly[MAXDEG*2]", "parent": 19, "children": [22, 23], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 21}}, {"id": 22, "type": "identifier", "text": "genPoly", "parent": 21, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 11}}, {"id": 23, "type": "binary_expression", "text": "MAXDEG*2", "parent": 21, "children": [24, 25, 26], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 20}}, {"id": 24, "type": "identifier", "text": "MAXDEG", "parent": 23, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 18}}, {"id": 25, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 19}}, {"id": 26, "type": "number_literal", "text": "2", "parent": 23, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 20}}, {"id": 27, "type": "declaration", "text": "int DEBUG = FALSE;", "parent": null, "children": [28, 29], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 18}}, {"id": 28, "type": "primitive_type", "text": "int", "parent": 27, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 3}}, {"id": 29, "type": "init_declarator", "text": "DEBUG = FALSE", "parent": 27, "children": [30, 31, 32], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 17}}, {"id": 30, "type": "identifier", "text": "DEBUG", "parent": 29, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 9}}, {"id": 31, "type": "=", "text": "=", "parent": 29, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 11}}, {"id": 32, "type": "false", "text": "FALSE", "parent": 29, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 17}}, {"id": 33, "type": "declaration", "text": "static void\ncompute_genpoly (int nbytes, int genpoly[]);", "parent": null, "children": [34, 35], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 44}}, {"id": 34, "type": "primitive_type", "text": "void", "parent": 33, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 11}}, {"id": 35, "type": "function_declarator", "text": "compute_genpoly (int nbytes, int genpoly[])", "parent": 33, "children": [36, 37], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 43}}, {"id": 36, "type": "identifier", "text": "compute_genpoly", "parent": 35, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 15}}, {"id": 37, "type": "parameter_list", "text": "(int nbytes, int genpoly[])", "parent": 35, "children": [38, 41], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 43}}, {"id": 38, "type": "parameter_declaration", "text": "int nbytes", "parent": 37, "children": [39, 40], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 27}}, {"id": 39, "type": "primitive_type", "text": "int", "parent": 38, "children": [], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 20}}, {"id": 40, "type": "identifier", "text": "nbytes", "parent": 38, "children": [], "start_point": {"row": 51, "column": 21}, "end_point": {"row": 51, "column": 27}}, {"id": 41, "type": "parameter_declaration", "text": "int genpoly[]", "parent": 37, "children": [42, 43], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 42}}, {"id": 42, "type": "primitive_type", "text": "int", "parent": 41, "children": [], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 32}}, {"id": 43, "type": "array_declarator", "text": "genpoly[]", "parent": 41, "children": [44], "start_point": {"row": 51, "column": 33}, "end_point": {"row": 51, "column": 42}}, {"id": 44, "type": "identifier", "text": "genpoly", "parent": 43, "children": [], "start_point": {"row": 51, "column": 33}, "end_point": {"row": 51, "column": 40}}, {"id": 45, "type": "function_definition", "text": "void\ninitialize_ecc ()\n{\n /* Initialize the galois field arithmetic tables */\n init_galois_tables();\n\n /* Compute the encoder generator polynomial */\n compute_genpoly(NPAR, genPoly);\n}", "parent": null, "children": [46, 47], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 46, "type": "primitive_type", "text": "void", "parent": 45, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 4}}, {"id": 47, "type": "function_declarator", "text": "initialize_ecc ()", "parent": 45, "children": [48, 49], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 17}}, {"id": 48, "type": "identifier", "text": "initialize_ecc", "parent": 47, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 14}}, {"id": 49, "type": "parameter_list", "text": "()", "parent": 47, "children": [], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 17}}, {"id": 50, "type": "call_expression", "text": "init_galois_tables()", "parent": 45, "children": [51, 52], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 24}}, {"id": 51, "type": "identifier", "text": "init_galois_tables", "parent": 50, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 22}}, {"id": 52, "type": "argument_list", "text": "()", "parent": 50, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 24}}, {"id": 53, "type": "call_expression", "text": "compute_genpoly(NPAR, genPoly)", "parent": 45, "children": [54, 55], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 34}}, {"id": 54, "type": "identifier", "text": "compute_genpoly", "parent": 53, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 19}}, {"id": 55, "type": "argument_list", "text": "(NPAR, genPoly)", "parent": 53, "children": [56, 57], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 34}}, {"id": 56, "type": "identifier", "text": "NPAR", "parent": 55, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 24}}, {"id": 57, "type": "identifier", "text": "genPoly", "parent": 55, "children": [], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 33}}, {"id": 58, "type": "function_definition", "text": "void\nzero_fill_from (unsigned char buf[], int from, int to)\n{\n int i;\n for (i = from; i < to; i++) buf[i] = 0;\n}", "parent": null, "children": [59, 60], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 69, "column": 1}}, {"id": 59, "type": "primitive_type", "text": "void", "parent": 58, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 4}}, {"id": 60, "type": "function_declarator", "text": "zero_fill_from (unsigned char buf[], int from, int to)", "parent": 58, "children": [61, 62], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 54}}, {"id": 61, "type": "identifier", "text": "zero_fill_from", "parent": 60, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 14}}, {"id": 62, "type": "parameter_list", "text": "(unsigned char buf[], int from, int to)", "parent": 60, "children": [63, 69, 71], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 54}}, {"id": 63, "type": "parameter_declaration", "text": "unsigned char buf[]", "parent": 62, "children": [64, 67], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 35}}, {"id": 64, "type": "sized_type_specifier", "text": "unsigned char", "parent": 63, "children": [65, 66], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 29}}, {"id": 65, "type": "unsigned", "text": "unsigned", "parent": 64, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 24}}, {"id": 66, "type": "primitive_type", "text": "char", "parent": 64, "children": [], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 29}}, {"id": 67, "type": "array_declarator", "text": "buf[]", "parent": 63, "children": [68], "start_point": {"row": 65, "column": 30}, "end_point": {"row": 65, "column": 35}}, {"id": 68, "type": "identifier", "text": "buf", "parent": 67, "children": [], "start_point": {"row": 65, "column": 30}, "end_point": {"row": 65, "column": 33}}, {"id": 69, "type": "parameter_declaration", "text": "int from", "parent": 62, "children": [70], "start_point": {"row": 65, "column": 37}, "end_point": {"row": 65, "column": 45}}, {"id": 70, "type": "primitive_type", "text": "int", "parent": 69, "children": [], "start_point": {"row": 65, "column": 37}, "end_point": {"row": 65, "column": 40}}, {"id": 71, "type": "parameter_declaration", "text": "int to", "parent": 62, "children": [72, 73], "start_point": {"row": 65, "column": 47}, "end_point": {"row": 65, "column": 53}}, {"id": 72, "type": "primitive_type", "text": "int", "parent": 71, "children": [], "start_point": {"row": 65, "column": 47}, "end_point": {"row": 65, "column": 50}}, {"id": 73, "type": "identifier", "text": "to", "parent": 71, "children": [], "start_point": {"row": 65, "column": 51}, "end_point": {"row": 65, "column": 53}}, {"id": 74, "type": "declaration", "text": "int i;", "parent": 58, "children": [75, 76], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 8}}, {"id": 75, "type": "primitive_type", "text": "int", "parent": 74, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 5}}, {"id": 76, "type": "identifier", "text": "i", "parent": 74, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 7}}, {"id": 77, "type": "for_statement", "text": "for (i = from; i < to; i++) buf[i] = 0;", "parent": 58, "children": [78, 81, 85], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 41}}, {"id": 78, "type": "assignment_expression", "text": "i = from", "parent": 77, "children": [79, 80], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 15}}, {"id": 79, "type": "identifier", "text": "i", "parent": 78, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 8}}, {"id": 80, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 10}}, {"id": 81, "type": "binary_expression", "text": "i < to", "parent": 77, "children": [82, 83, 84], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 23}}, {"id": 82, "type": "identifier", "text": "i", "parent": 81, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 18}}, {"id": 83, "type": "<", "text": "<", "parent": 81, "children": [], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 20}}, {"id": 84, "type": "identifier", "text": "to", "parent": 81, "children": [], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 23}}, {"id": 85, "type": "update_expression", "text": "i++", "parent": 77, "children": [86, 87], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 28}}, {"id": 86, "type": "identifier", "text": "i", "parent": 85, "children": [], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 26}}, {"id": 87, "type": "++", "text": "++", "parent": 85, "children": [], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 28}}, {"id": 88, "type": "assignment_expression", "text": "buf[i] = 0", "parent": 77, "children": [89, 92, 93], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 40}}, {"id": 89, "type": "subscript_expression", "text": "buf[i]", "parent": 88, "children": [90, 91], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 36}}, {"id": 90, "type": "identifier", "text": "buf", "parent": 89, "children": [], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 33}}, {"id": 91, "type": "identifier", "text": "i", "parent": 89, "children": [], "start_point": {"row": 68, "column": 34}, "end_point": {"row": 68, "column": 35}}, {"id": 92, "type": "=", "text": "=", "parent": 88, "children": [], "start_point": {"row": 68, "column": 37}, "end_point": {"row": 68, "column": 38}}, {"id": 93, "type": "number_literal", "text": "0", "parent": 88, "children": [], "start_point": {"row": 68, "column": 39}, "end_point": {"row": 68, "column": 40}}, {"id": 94, "type": "function_definition", "text": "void\nprint_parity (void)\n{ \n int i;\n printf(\"Parity Bytes: \");\n for (i = 0; i < NPAR; i++) \n printf(\"[%d]:%x, \",i,pBytes[i]);\n printf(\"\\n\");\n}", "parent": null, "children": [95, 96], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 95, "type": "primitive_type", "text": "void", "parent": 94, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 4}}, {"id": 96, "type": "function_declarator", "text": "print_parity (void)", "parent": 94, "children": [97, 98], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 19}}, {"id": 97, "type": "identifier", "text": "print_parity", "parent": 96, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 12}}, {"id": 98, "type": "parameter_list", "text": "(void)", "parent": 96, "children": [99], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 19}}, {"id": 99, "type": "parameter_declaration", "text": "void", "parent": 98, "children": [100], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 18}}, {"id": 100, "type": "primitive_type", "text": "void", "parent": 99, "children": [], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 18}}, {"id": 101, "type": "declaration", "text": "int i;", "parent": 94, "children": [102, 103], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 8}}, {"id": 102, "type": "primitive_type", "text": "int", "parent": 101, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 5}}, {"id": 103, "type": "identifier", "text": "i", "parent": 101, "children": [], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 7}}, {"id": 104, "type": "call_expression", "text": "printf(\"Parity Bytes: \")", "parent": 94, "children": [105, 106], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 26}}, {"id": 105, "type": "identifier", "text": "printf", "parent": 104, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 8}}, {"id": 106, "type": "argument_list", "text": "(\"Parity Bytes: \")", "parent": 104, "children": [107], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 26}}, {"id": 107, "type": "string_literal", "text": "\"Parity Bytes: \"", "parent": 106, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 25}}, {"id": 108, "type": "for_statement", "text": "for (i = 0; i < NPAR; i++) \n printf(\"[%d]:%x, \",i,pBytes[i]);", "parent": 94, "children": [109, 113, 117], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 78, "column": 36}}, {"id": 109, "type": "assignment_expression", "text": "i = 0", "parent": 108, "children": [110, 111, 112], "start_point": {"row": 77, "column": 7}, "end_point": {"row": 77, "column": 12}}, {"id": 110, "type": "identifier", "text": "i", "parent": 109, "children": [], "start_point": {"row": 77, "column": 7}, "end_point": {"row": 77, "column": 8}}, {"id": 111, "type": "=", "text": "=", "parent": 109, "children": [], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 10}}, {"id": 112, "type": "number_literal", "text": "0", "parent": 109, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 12}}, {"id": 113, "type": "binary_expression", "text": "i < NPAR", "parent": 108, "children": [114, 115, 116], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 22}}, {"id": 114, "type": "identifier", "text": "i", "parent": 113, "children": [], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 15}}, {"id": 115, "type": "<", "text": "<", "parent": 113, "children": [], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 17}}, {"id": 116, "type": "identifier", "text": "NPAR", "parent": 113, "children": [], "start_point": {"row": 77, "column": 18}, "end_point": {"row": 77, "column": 22}}, {"id": 117, "type": "update_expression", "text": "i++", "parent": 108, "children": [118, 119], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 77, "column": 27}}, {"id": 118, "type": "identifier", "text": "i", "parent": 117, "children": [], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 77, "column": 25}}, {"id": 119, "type": "++", "text": "++", "parent": 117, "children": [], "start_point": {"row": 77, "column": 25}, "end_point": {"row": 77, "column": 27}}, {"id": 120, "type": "call_expression", "text": "printf(\"[%d]:%x, \",i,pBytes[i])", "parent": 108, "children": [121, 122], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 35}}, {"id": 121, "type": "identifier", "text": "printf", "parent": 120, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 10}}, {"id": 122, "type": "argument_list", "text": "(\"[%d]:%x, \",i,pBytes[i])", "parent": 120, "children": [123, 124, 125], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 35}}, {"id": 123, "type": "string_literal", "text": "\"[%d]:%x, \"", "parent": 122, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 22}}, {"id": 124, "type": "identifier", "text": "i", "parent": 122, "children": [], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 78, "column": 24}}, {"id": 125, "type": "subscript_expression", "text": "pBytes[i]", "parent": 122, "children": [126, 127], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 34}}, {"id": 126, "type": "identifier", "text": "pBytes", "parent": 125, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 31}}, {"id": 127, "type": "identifier", "text": "i", "parent": 125, "children": [], "start_point": {"row": 78, "column": 32}, "end_point": {"row": 78, "column": 33}}, {"id": 128, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 94, "children": [129, 130], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 14}}, {"id": 129, "type": "identifier", "text": "printf", "parent": 128, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 8}}, {"id": 130, "type": "argument_list", "text": "(\"\\n\")", "parent": 128, "children": [131], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 14}}, {"id": 131, "type": "string_literal", "text": "\"\\n\"", "parent": 130, "children": [132], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 13}}, {"id": 132, "type": "escape_sequence", "text": "\\n", "parent": 131, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 12}}, {"id": 133, "type": "function_definition", "text": "void\nprint_syndrome (void)\n{ \n int i;\n printf(\"Syndrome Bytes: \");\n for (i = 0; i < NPAR; i++) \n printf(\"[%d]:%x, \",i,synBytes[i]);\n printf(\"\\n\");\n}", "parent": null, "children": [134, 135], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 91, "column": 1}}, {"id": 134, "type": "primitive_type", "text": "void", "parent": 133, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 4}}, {"id": 135, "type": "function_declarator", "text": "print_syndrome (void)", "parent": 133, "children": [136, 137], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 21}}, {"id": 136, "type": "identifier", "text": "print_syndrome", "parent": 135, "children": [], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 14}}, {"id": 137, "type": "parameter_list", "text": "(void)", "parent": 135, "children": [138], "start_point": {"row": 84, "column": 15}, "end_point": {"row": 84, "column": 21}}, {"id": 138, "type": "parameter_declaration", "text": "void", "parent": 137, "children": [139], "start_point": {"row": 84, "column": 16}, "end_point": {"row": 84, "column": 20}}, {"id": 139, "type": "primitive_type", "text": "void", "parent": 138, "children": [], "start_point": {"row": 84, "column": 16}, "end_point": {"row": 84, "column": 20}}, {"id": 140, "type": "declaration", "text": "int i;", "parent": 133, "children": [141, 142], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 8}}, {"id": 141, "type": "primitive_type", "text": "int", "parent": 140, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 5}}, {"id": 142, "type": "identifier", "text": "i", "parent": 140, "children": [], "start_point": {"row": 86, "column": 6}, "end_point": {"row": 86, "column": 7}}, {"id": 143, "type": "call_expression", "text": "printf(\"Syndrome Bytes: \")", "parent": 133, "children": [144, 145], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 28}}, {"id": 144, "type": "identifier", "text": "printf", "parent": 143, "children": [], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 8}}, {"id": 145, "type": "argument_list", "text": "(\"Syndrome Bytes: \")", "parent": 143, "children": [146], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 28}}, {"id": 146, "type": "string_literal", "text": "\"Syndrome Bytes: \"", "parent": 145, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 27}}, {"id": 147, "type": "for_statement", "text": "for (i = 0; i < NPAR; i++) \n printf(\"[%d]:%x, \",i,synBytes[i]);", "parent": 133, "children": [148, 152, 156], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 89, "column": 38}}, {"id": 148, "type": "assignment_expression", "text": "i = 0", "parent": 147, "children": [149, 150, 151], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 12}}, {"id": 149, "type": "identifier", "text": "i", "parent": 148, "children": [], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 8}}, {"id": 150, "type": "=", "text": "=", "parent": 148, "children": [], "start_point": {"row": 88, "column": 9}, "end_point": {"row": 88, "column": 10}}, {"id": 151, "type": "number_literal", "text": "0", "parent": 148, "children": [], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 12}}, {"id": 152, "type": "binary_expression", "text": "i < NPAR", "parent": 147, "children": [153, 154, 155], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 22}}, {"id": 153, "type": "identifier", "text": "i", "parent": 152, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 15}}, {"id": 154, "type": "<", "text": "<", "parent": 152, "children": [], "start_point": {"row": 88, "column": 16}, "end_point": {"row": 88, "column": 17}}, {"id": 155, "type": "identifier", "text": "NPAR", "parent": 152, "children": [], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 22}}, {"id": 156, "type": "update_expression", "text": "i++", "parent": 147, "children": [157, 158], "start_point": {"row": 88, "column": 24}, "end_point": {"row": 88, "column": 27}}, {"id": 157, "type": "identifier", "text": "i", "parent": 156, "children": [], "start_point": {"row": 88, "column": 24}, "end_point": {"row": 88, "column": 25}}, {"id": 158, "type": "++", "text": "++", "parent": 156, "children": [], "start_point": {"row": 88, "column": 25}, "end_point": {"row": 88, "column": 27}}, {"id": 159, "type": "call_expression", "text": "printf(\"[%d]:%x, \",i,synBytes[i])", "parent": 147, "children": [160, 161], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 37}}, {"id": 160, "type": "identifier", "text": "printf", "parent": 159, "children": [], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 10}}, {"id": 161, "type": "argument_list", "text": "(\"[%d]:%x, \",i,synBytes[i])", "parent": 159, "children": [162, 163, 164], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 37}}, {"id": 162, "type": "string_literal", "text": "\"[%d]:%x, \"", "parent": 161, "children": [], "start_point": {"row": 89, "column": 11}, "end_point": {"row": 89, "column": 22}}, {"id": 163, "type": "identifier", "text": "i", "parent": 161, "children": [], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 24}}, {"id": 164, "type": "subscript_expression", "text": "synBytes[i]", "parent": 161, "children": [165, 166], "start_point": {"row": 89, "column": 25}, "end_point": {"row": 89, "column": 36}}, {"id": 165, "type": "identifier", "text": "synBytes", "parent": 164, "children": [], "start_point": {"row": 89, "column": 25}, "end_point": {"row": 89, "column": 33}}, {"id": 166, "type": "identifier", "text": "i", "parent": 164, "children": [], "start_point": {"row": 89, "column": 34}, "end_point": {"row": 89, "column": 35}}, {"id": 167, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 133, "children": [168, 169], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 14}}, {"id": 168, "type": "identifier", "text": "printf", "parent": 167, "children": [], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 8}}, {"id": 169, "type": "argument_list", "text": "(\"\\n\")", "parent": 167, "children": [170], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 14}}, {"id": 170, "type": "string_literal", "text": "\"\\n\"", "parent": 169, "children": [171], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 13}}, {"id": 171, "type": "escape_sequence", "text": "\\n", "parent": 170, "children": [], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 12}}, {"id": 172, "type": "function_definition", "text": "void\nbuild_codeword (unsigned char msg[], int nbytes, unsigned char dst[])\n{\n int i;\n\t\n for (i = 0; i < nbytes; i++) dst[i] = msg[i];\n\t\n for (i = 0; i < NPAR; i++) {\n dst[i+nbytes] = pBytes[NPAR-1-i];\n }\n}", "parent": null, "children": [173, 174], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 104, "column": 1}}, {"id": 173, "type": "primitive_type", "text": "void", "parent": 172, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 4}}, {"id": 174, "type": "function_declarator", "text": "build_codeword (unsigned char msg[], int nbytes, unsigned char dst[])", "parent": 172, "children": [175, 176], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 69}}, {"id": 175, "type": "identifier", "text": "build_codeword", "parent": 174, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 14}}, {"id": 176, "type": "parameter_list", "text": "(unsigned char msg[], int nbytes, unsigned char dst[])", "parent": 174, "children": [177, 183, 186], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 95, "column": 69}}, {"id": 177, "type": "parameter_declaration", "text": "unsigned char msg[]", "parent": 176, "children": [178, 181], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 35}}, {"id": 178, "type": "sized_type_specifier", "text": "unsigned char", "parent": 177, "children": [179, 180], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 29}}, {"id": 179, "type": "unsigned", "text": "unsigned", "parent": 178, "children": [], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 24}}, {"id": 180, "type": "primitive_type", "text": "char", "parent": 178, "children": [], "start_point": {"row": 95, "column": 25}, "end_point": {"row": 95, "column": 29}}, {"id": 181, "type": "array_declarator", "text": "msg[]", "parent": 177, "children": [182], "start_point": {"row": 95, "column": 30}, "end_point": {"row": 95, "column": 35}}, {"id": 182, "type": "identifier", "text": "msg", "parent": 181, "children": [], "start_point": {"row": 95, "column": 30}, "end_point": {"row": 95, "column": 33}}, {"id": 183, "type": "parameter_declaration", "text": "int nbytes", "parent": 176, "children": [184, 185], "start_point": {"row": 95, "column": 37}, "end_point": {"row": 95, "column": 47}}, {"id": 184, "type": "primitive_type", "text": "int", "parent": 183, "children": [], "start_point": {"row": 95, "column": 37}, "end_point": {"row": 95, "column": 40}}, {"id": 185, "type": "identifier", "text": "nbytes", "parent": 183, "children": [], "start_point": {"row": 95, "column": 41}, "end_point": {"row": 95, "column": 47}}, {"id": 186, "type": "parameter_declaration", "text": "unsigned char dst[]", "parent": 176, "children": [187, 190], "start_point": {"row": 95, "column": 49}, "end_point": {"row": 95, "column": 68}}, {"id": 187, "type": "sized_type_specifier", "text": "unsigned char", "parent": 186, "children": [188, 189], "start_point": {"row": 95, "column": 49}, "end_point": {"row": 95, "column": 62}}, {"id": 188, "type": "unsigned", "text": "unsigned", "parent": 187, "children": [], "start_point": {"row": 95, "column": 49}, "end_point": {"row": 95, "column": 57}}, {"id": 189, "type": "primitive_type", "text": "char", "parent": 187, "children": [], "start_point": {"row": 95, "column": 58}, "end_point": {"row": 95, "column": 62}}, {"id": 190, "type": "array_declarator", "text": "dst[]", "parent": 186, "children": [191], "start_point": {"row": 95, "column": 63}, "end_point": {"row": 95, "column": 68}}, {"id": 191, "type": "identifier", "text": "dst", "parent": 190, "children": [], "start_point": {"row": 95, "column": 63}, "end_point": {"row": 95, "column": 66}}, {"id": 192, "type": "declaration", "text": "int i;", "parent": 172, "children": [193, 194], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 8}}, {"id": 193, "type": "primitive_type", "text": "int", "parent": 192, "children": [], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 5}}, {"id": 194, "type": "identifier", "text": "i", "parent": 192, "children": [], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 7}}, {"id": 195, "type": "for_statement", "text": "for (i = 0; i < nbytes; i++) dst[i] = msg[i];", "parent": 172, "children": [196, 200, 204], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 47}}, {"id": 196, "type": "assignment_expression", "text": "i = 0", "parent": 195, "children": [197, 198, 199], "start_point": {"row": 99, "column": 7}, "end_point": {"row": 99, "column": 12}}, {"id": 197, "type": "identifier", "text": "i", "parent": 196, "children": [], "start_point": {"row": 99, "column": 7}, "end_point": {"row": 99, "column": 8}}, {"id": 198, "type": "=", "text": "=", "parent": 196, "children": [], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 99, "column": 10}}, {"id": 199, "type": "number_literal", "text": "0", "parent": 196, "children": [], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 12}}, {"id": 200, "type": "binary_expression", "text": "i < nbytes", "parent": 195, "children": [201, 202, 203], "start_point": {"row": 99, "column": 14}, "end_point": {"row": 99, "column": 24}}, {"id": 201, "type": "identifier", "text": "i", "parent": 200, "children": [], "start_point": {"row": 99, "column": 14}, "end_point": {"row": 99, "column": 15}}, {"id": 202, "type": "<", "text": "<", "parent": 200, "children": [], "start_point": {"row": 99, "column": 16}, "end_point": {"row": 99, "column": 17}}, {"id": 203, "type": "identifier", "text": "nbytes", "parent": 200, "children": [], "start_point": {"row": 99, "column": 18}, "end_point": {"row": 99, "column": 24}}, {"id": 204, "type": "update_expression", "text": "i++", "parent": 195, "children": [205, 206], "start_point": {"row": 99, "column": 26}, "end_point": {"row": 99, "column": 29}}, {"id": 205, "type": "identifier", "text": "i", "parent": 204, "children": [], "start_point": {"row": 99, "column": 26}, "end_point": {"row": 99, "column": 27}}, {"id": 206, "type": "++", "text": "++", "parent": 204, "children": [], "start_point": {"row": 99, "column": 27}, "end_point": {"row": 99, "column": 29}}, {"id": 207, "type": "assignment_expression", "text": "dst[i] = msg[i]", "parent": 195, "children": [208, 211, 212], "start_point": {"row": 99, "column": 31}, "end_point": {"row": 99, "column": 46}}, {"id": 208, "type": "subscript_expression", "text": "dst[i]", "parent": 207, "children": [209, 210], "start_point": {"row": 99, "column": 31}, "end_point": {"row": 99, "column": 37}}, {"id": 209, "type": "identifier", "text": "dst", "parent": 208, "children": [], "start_point": {"row": 99, "column": 31}, "end_point": {"row": 99, "column": 34}}, {"id": 210, "type": "identifier", "text": "i", "parent": 208, "children": [], "start_point": {"row": 99, "column": 35}, "end_point": {"row": 99, "column": 36}}, {"id": 211, "type": "=", "text": "=", "parent": 207, "children": [], "start_point": {"row": 99, "column": 38}, "end_point": {"row": 99, "column": 39}}, {"id": 212, "type": "subscript_expression", "text": "msg[i]", "parent": 207, "children": [213, 214], "start_point": {"row": 99, "column": 40}, "end_point": {"row": 99, "column": 46}}, {"id": 213, "type": "identifier", "text": "msg", "parent": 212, "children": [], "start_point": {"row": 99, "column": 40}, "end_point": {"row": 99, "column": 43}}, {"id": 214, "type": "identifier", "text": "i", "parent": 212, "children": [], "start_point": {"row": 99, "column": 44}, "end_point": {"row": 99, "column": 45}}, {"id": 215, "type": "for_statement", "text": "for (i = 0; i < NPAR; i++) {\n dst[i+nbytes] = pBytes[NPAR-1-i];\n }", "parent": 172, "children": [216, 220, 224], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 103, "column": 3}}, {"id": 216, "type": "assignment_expression", "text": "i = 0", "parent": 215, "children": [217, 218, 219], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 12}}, {"id": 217, "type": "identifier", "text": "i", "parent": 216, "children": [], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 8}}, {"id": 218, "type": "=", "text": "=", "parent": 216, "children": [], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 10}}, {"id": 219, "type": "number_literal", "text": "0", "parent": 216, "children": [], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 12}}, {"id": 220, "type": "binary_expression", "text": "i < NPAR", "parent": 215, "children": [221, 222, 223], "start_point": {"row": 101, "column": 14}, "end_point": {"row": 101, "column": 22}}, {"id": 221, "type": "identifier", "text": "i", "parent": 220, "children": [], "start_point": {"row": 101, "column": 14}, "end_point": {"row": 101, "column": 15}}, {"id": 222, "type": "<", "text": "<", "parent": 220, "children": [], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 17}}, {"id": 223, "type": "identifier", "text": "NPAR", "parent": 220, "children": [], "start_point": {"row": 101, "column": 18}, "end_point": {"row": 101, "column": 22}}, {"id": 224, "type": "update_expression", "text": "i++", "parent": 215, "children": [225, 226], "start_point": {"row": 101, "column": 24}, "end_point": {"row": 101, "column": 27}}, {"id": 225, "type": "identifier", "text": "i", "parent": 224, "children": [], "start_point": {"row": 101, "column": 24}, "end_point": {"row": 101, "column": 25}}, {"id": 226, "type": "++", "text": "++", "parent": 224, "children": [], "start_point": {"row": 101, "column": 25}, "end_point": {"row": 101, "column": 27}}, {"id": 227, "type": "assignment_expression", "text": "dst[i+nbytes] = pBytes[NPAR-1-i]", "parent": 215, "children": [228, 234, 235], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 36}}, {"id": 228, "type": "subscript_expression", "text": "dst[i+nbytes]", "parent": 227, "children": [229, 230], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 17}}, {"id": 229, "type": "identifier", "text": "dst", "parent": 228, "children": [], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 7}}, {"id": 230, "type": "binary_expression", "text": "i+nbytes", "parent": 228, "children": [231, 232, 233], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 16}}, {"id": 231, "type": "identifier", "text": "i", "parent": 230, "children": [], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 9}}, {"id": 232, "type": "+", "text": "+", "parent": 230, "children": [], "start_point": {"row": 102, "column": 9}, "end_point": {"row": 102, "column": 10}}, {"id": 233, "type": "identifier", "text": "nbytes", "parent": 230, "children": [], "start_point": {"row": 102, "column": 10}, "end_point": {"row": 102, "column": 16}}, {"id": 234, "type": "=", "text": "=", "parent": 227, "children": [], "start_point": {"row": 102, "column": 18}, "end_point": {"row": 102, "column": 19}}, {"id": 235, "type": "subscript_expression", "text": "pBytes[NPAR-1-i]", "parent": 227, "children": [236, 237], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 36}}, {"id": 236, "type": "identifier", "text": "pBytes", "parent": 235, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 26}}, {"id": 237, "type": "binary_expression", "text": "NPAR-1-i", "parent": 235, "children": [238, 242, 243], "start_point": {"row": 102, "column": 27}, "end_point": {"row": 102, "column": 35}}, {"id": 238, "type": "binary_expression", "text": "NPAR-1", "parent": 237, "children": [239, 240, 241], "start_point": {"row": 102, "column": 27}, "end_point": {"row": 102, "column": 33}}, {"id": 239, "type": "identifier", "text": "NPAR", "parent": 238, "children": [], "start_point": {"row": 102, "column": 27}, "end_point": {"row": 102, "column": 31}}, {"id": 240, "type": "-", "text": "-", "parent": 238, "children": [], "start_point": {"row": 102, "column": 31}, "end_point": {"row": 102, "column": 32}}, {"id": 241, "type": "number_literal", "text": "1", "parent": 238, "children": [], "start_point": {"row": 102, "column": 32}, "end_point": {"row": 102, "column": 33}}, {"id": 242, "type": "-", "text": "-", "parent": 237, "children": [], "start_point": {"row": 102, "column": 33}, "end_point": {"row": 102, "column": 34}}, {"id": 243, "type": "identifier", "text": "i", "parent": 237, "children": [], "start_point": {"row": 102, "column": 34}, "end_point": {"row": 102, "column": 35}}, {"id": 244, "type": "function_definition", "text": "void\ndecode_data(unsigned char data[], int nbytes)\n{\n int i, j, sum;\n for (j = 0; j < NPAR; j++) {\n sum\t= 0;\n for (i = 0; i < nbytes; i++) {\n sum = data[i] ^ gmult(gexp[j+1], sum);\n }\n synBytes[j] = sum;\n }\n}", "parent": null, "children": [245, 246], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 124, "column": 1}}, {"id": 245, "type": "primitive_type", "text": "void", "parent": 244, "children": [], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 4}}, {"id": 246, "type": "function_declarator", "text": "decode_data(unsigned char data[], int nbytes)", "parent": 244, "children": [247, 248], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 45}}, {"id": 247, "type": "identifier", "text": "decode_data", "parent": 246, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 11}}, {"id": 248, "type": "parameter_list", "text": "(unsigned char data[], int nbytes)", "parent": 246, "children": [249, 255], "start_point": {"row": 114, "column": 11}, "end_point": {"row": 114, "column": 45}}, {"id": 249, "type": "parameter_declaration", "text": "unsigned char data[]", "parent": 248, "children": [250, 253], "start_point": {"row": 114, "column": 12}, "end_point": {"row": 114, "column": 32}}, {"id": 250, "type": "sized_type_specifier", "text": "unsigned char", "parent": 249, "children": [251, 252], "start_point": {"row": 114, "column": 12}, "end_point": {"row": 114, "column": 25}}, {"id": 251, "type": "unsigned", "text": "unsigned", "parent": 250, "children": [], "start_point": {"row": 114, "column": 12}, "end_point": {"row": 114, "column": 20}}, {"id": 252, "type": "primitive_type", "text": "char", "parent": 250, "children": [], "start_point": {"row": 114, "column": 21}, "end_point": {"row": 114, "column": 25}}, {"id": 253, "type": "array_declarator", "text": "data[]", "parent": 249, "children": [254], "start_point": {"row": 114, "column": 26}, "end_point": {"row": 114, "column": 32}}, {"id": 254, "type": "identifier", "text": "data", "parent": 253, "children": [], "start_point": {"row": 114, "column": 26}, "end_point": {"row": 114, "column": 30}}, {"id": 255, "type": "parameter_declaration", "text": "int nbytes", "parent": 248, "children": [256, 257], "start_point": {"row": 114, "column": 34}, "end_point": {"row": 114, "column": 44}}, {"id": 256, "type": "primitive_type", "text": "int", "parent": 255, "children": [], "start_point": {"row": 114, "column": 34}, "end_point": {"row": 114, "column": 37}}, {"id": 257, "type": "identifier", "text": "nbytes", "parent": 255, "children": [], "start_point": {"row": 114, "column": 38}, "end_point": {"row": 114, "column": 44}}, {"id": 258, "type": "declaration", "text": "int i, j, sum;", "parent": 244, "children": [259, 260, 261, 262], "start_point": {"row": 116, "column": 2}, "end_point": {"row": 116, "column": 16}}, {"id": 259, "type": "primitive_type", "text": "int", "parent": 258, "children": [], "start_point": {"row": 116, "column": 2}, "end_point": {"row": 116, "column": 5}}, {"id": 260, "type": "identifier", "text": "i", "parent": 258, "children": [], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 7}}, {"id": 261, "type": "identifier", "text": "j", "parent": 258, "children": [], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 10}}, {"id": 262, "type": "identifier", "text": "sum", "parent": 258, "children": [], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 15}}, {"id": 263, "type": "for_statement", "text": "for (j = 0; j < NPAR; j++) {\n sum\t= 0;\n for (i = 0; i < nbytes; i++) {\n sum = data[i] ^ gmult(gexp[j+1], sum);\n }\n synBytes[j] = sum;\n }", "parent": 244, "children": [264, 268, 272], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 123, "column": 3}}, {"id": 264, "type": "assignment_expression", "text": "j = 0", "parent": 263, "children": [265, 266, 267], "start_point": {"row": 117, "column": 7}, "end_point": {"row": 117, "column": 12}}, {"id": 265, "type": "identifier", "text": "j", "parent": 264, "children": [], "start_point": {"row": 117, "column": 7}, "end_point": {"row": 117, "column": 8}}, {"id": 266, "type": "=", "text": "=", "parent": 264, "children": [], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 10}}, {"id": 267, "type": "number_literal", "text": "0", "parent": 264, "children": [], "start_point": {"row": 117, "column": 11}, "end_point": {"row": 117, "column": 12}}, {"id": 268, "type": "binary_expression", "text": "j < NPAR", "parent": 263, "children": [269, 270, 271], "start_point": {"row": 117, "column": 14}, "end_point": {"row": 117, "column": 22}}, {"id": 269, "type": "identifier", "text": "j", "parent": 268, "children": [], "start_point": {"row": 117, "column": 14}, "end_point": {"row": 117, "column": 15}}, {"id": 270, "type": "<", "text": "<", "parent": 268, "children": [], "start_point": {"row": 117, "column": 16}, "end_point": {"row": 117, "column": 17}}, {"id": 271, "type": "identifier", "text": "NPAR", "parent": 268, "children": [], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 22}}, {"id": 272, "type": "update_expression", "text": "j++", "parent": 263, "children": [273, 274], "start_point": {"row": 117, "column": 25}, "end_point": {"row": 117, "column": 28}}, {"id": 273, "type": "identifier", "text": "j", "parent": 272, "children": [], "start_point": {"row": 117, "column": 25}, "end_point": {"row": 117, "column": 26}}, {"id": 274, "type": "++", "text": "++", "parent": 272, "children": [], "start_point": {"row": 117, "column": 26}, "end_point": {"row": 117, "column": 28}}, {"id": 275, "type": "assignment_expression", "text": "sum\t= 0", "parent": 263, "children": [276, 277, 278], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 11}}, {"id": 276, "type": "identifier", "text": "sum", "parent": 275, "children": [], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 7}}, {"id": 277, "type": "=", "text": "=", "parent": 275, "children": [], "start_point": {"row": 118, "column": 8}, "end_point": {"row": 118, "column": 9}}, {"id": 278, "type": "number_literal", "text": "0", "parent": 275, "children": [], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 11}}, {"id": 279, "type": "for_statement", "text": "for (i = 0; i < nbytes; i++) {\n sum = data[i] ^ gmult(gexp[j+1], sum);\n }", "parent": 263, "children": [280, 284, 288], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 121, "column": 5}}, {"id": 280, "type": "assignment_expression", "text": "i = 0", "parent": 279, "children": [281, 282, 283], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 14}}, {"id": 281, "type": "identifier", "text": "i", "parent": 280, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 10}}, {"id": 282, "type": "=", "text": "=", "parent": 280, "children": [], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 12}}, {"id": 283, "type": "number_literal", "text": "0", "parent": 280, "children": [], "start_point": {"row": 119, "column": 13}, "end_point": {"row": 119, "column": 14}}, {"id": 284, "type": "binary_expression", "text": "i < nbytes", "parent": 279, "children": [285, 286, 287], "start_point": {"row": 119, "column": 16}, "end_point": {"row": 119, "column": 26}}, {"id": 285, "type": "identifier", "text": "i", "parent": 284, "children": [], "start_point": {"row": 119, "column": 16}, "end_point": {"row": 119, "column": 17}}, {"id": 286, "type": "<", "text": "<", "parent": 284, "children": [], "start_point": {"row": 119, "column": 18}, "end_point": {"row": 119, "column": 19}}, {"id": 287, "type": "identifier", "text": "nbytes", "parent": 284, "children": [], "start_point": {"row": 119, "column": 20}, "end_point": {"row": 119, "column": 26}}, {"id": 288, "type": "update_expression", "text": "i++", "parent": 279, "children": [289, 290], "start_point": {"row": 119, "column": 28}, "end_point": {"row": 119, "column": 31}}, {"id": 289, "type": "identifier", "text": "i", "parent": 288, "children": [], "start_point": {"row": 119, "column": 28}, "end_point": {"row": 119, "column": 29}}, {"id": 290, "type": "++", "text": "++", "parent": 288, "children": [], "start_point": {"row": 119, "column": 29}, "end_point": {"row": 119, "column": 31}}, {"id": 291, "type": "assignment_expression", "text": "sum = data[i] ^ gmult(gexp[j+1], sum)", "parent": 279, "children": [292, 293, 294], "start_point": {"row": 120, "column": 6}, "end_point": {"row": 120, "column": 43}}, {"id": 292, "type": "identifier", "text": "sum", "parent": 291, "children": [], "start_point": {"row": 120, "column": 6}, "end_point": {"row": 120, "column": 9}}, {"id": 293, "type": "=", "text": "=", "parent": 291, "children": [], "start_point": {"row": 120, "column": 10}, "end_point": {"row": 120, "column": 11}}, {"id": 294, "type": "binary_expression", "text": "data[i] ^ gmult(gexp[j+1], sum)", "parent": 291, "children": [295, 298, 299], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 43}}, {"id": 295, "type": "subscript_expression", "text": "data[i]", "parent": 294, "children": [296, 297], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 19}}, {"id": 296, "type": "identifier", "text": "data", "parent": 295, "children": [], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 16}}, {"id": 297, "type": "identifier", "text": "i", "parent": 295, "children": [], "start_point": {"row": 120, "column": 17}, "end_point": {"row": 120, "column": 18}}, {"id": 298, "type": "^", "text": "^", "parent": 294, "children": [], "start_point": {"row": 120, "column": 20}, "end_point": {"row": 120, "column": 21}}, {"id": 299, "type": "call_expression", "text": "gmult(gexp[j+1], sum)", "parent": 294, "children": [300, 301], "start_point": {"row": 120, "column": 22}, "end_point": {"row": 120, "column": 43}}, {"id": 300, "type": "identifier", "text": "gmult", "parent": 299, "children": [], "start_point": {"row": 120, "column": 22}, "end_point": {"row": 120, "column": 27}}, {"id": 301, "type": "argument_list", "text": "(gexp[j+1], sum)", "parent": 299, "children": [302, 308], "start_point": {"row": 120, "column": 27}, "end_point": {"row": 120, "column": 43}}, {"id": 302, "type": "subscript_expression", "text": "gexp[j+1]", "parent": 301, "children": [303, 304], "start_point": {"row": 120, "column": 28}, "end_point": {"row": 120, "column": 37}}, {"id": 303, "type": "identifier", "text": "gexp", "parent": 302, "children": [], "start_point": {"row": 120, "column": 28}, "end_point": {"row": 120, "column": 32}}, {"id": 304, "type": "binary_expression", "text": "j+1", "parent": 302, "children": [305, 306, 307], "start_point": {"row": 120, "column": 33}, "end_point": {"row": 120, "column": 36}}, {"id": 305, "type": "identifier", "text": "j", "parent": 304, "children": [], "start_point": {"row": 120, "column": 33}, "end_point": {"row": 120, "column": 34}}, {"id": 306, "type": "+", "text": "+", "parent": 304, "children": [], "start_point": {"row": 120, "column": 34}, "end_point": {"row": 120, "column": 35}}, {"id": 307, "type": "number_literal", "text": "1", "parent": 304, "children": [], "start_point": {"row": 120, "column": 35}, "end_point": {"row": 120, "column": 36}}, {"id": 308, "type": "identifier", "text": "sum", "parent": 301, "children": [], "start_point": {"row": 120, "column": 39}, "end_point": {"row": 120, "column": 42}}, {"id": 309, "type": "assignment_expression", "text": "synBytes[j] = sum", "parent": 263, "children": [310, 313, 314], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 22}}, {"id": 310, "type": "subscript_expression", "text": "synBytes[j]", "parent": 309, "children": [311, 312], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 15}}, {"id": 311, "type": "identifier", "text": "synBytes", "parent": 310, "children": [], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 12}}, {"id": 312, "type": "identifier", "text": "j", "parent": 310, "children": [], "start_point": {"row": 122, "column": 13}, "end_point": {"row": 122, "column": 14}}, {"id": 313, "type": "=", "text": "=", "parent": 309, "children": [], "start_point": {"row": 122, "column": 17}, "end_point": {"row": 122, "column": 18}}, {"id": 314, "type": "identifier", "text": "sum", "parent": 309, "children": [], "start_point": {"row": 122, "column": 19}, "end_point": {"row": 122, "column": 22}}, {"id": 315, "type": "function_definition", "text": "int\ncheck_syndrome (void)\n{\n int i, nz = 0;\n for (i =0 ; i < NPAR; i++) {\n if (synBytes[i] != 0) {\n nz = 1;\n break;\n }\n }\n return nz;\n}", "parent": null, "children": [316, 317], "start_point": {"row": 128, "column": 0}, "end_point": {"row": 139, "column": 1}}, {"id": 316, "type": "primitive_type", "text": "int", "parent": 315, "children": [], "start_point": {"row": 128, "column": 0}, "end_point": {"row": 128, "column": 3}}, {"id": 317, "type": "function_declarator", "text": "check_syndrome (void)", "parent": 315, "children": [318, 319], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 129, "column": 21}}, {"id": 318, "type": "identifier", "text": "check_syndrome", "parent": 317, "children": [], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 129, "column": 14}}, {"id": 319, "type": "parameter_list", "text": "(void)", "parent": 317, "children": [320], "start_point": {"row": 129, "column": 15}, "end_point": {"row": 129, "column": 21}}, {"id": 320, "type": "parameter_declaration", "text": "void", "parent": 319, "children": [321], "start_point": {"row": 129, "column": 16}, "end_point": {"row": 129, "column": 20}}, {"id": 321, "type": "primitive_type", "text": "void", "parent": 320, "children": [], "start_point": {"row": 129, "column": 16}, "end_point": {"row": 129, "column": 20}}, {"id": 322, "type": "declaration", "text": "int i, nz = 0;", "parent": 315, "children": [323, 324, 325], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 15}}, {"id": 323, "type": "primitive_type", "text": "int", "parent": 322, "children": [], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 4}}, {"id": 324, "type": "identifier", "text": "i", "parent": 322, "children": [], "start_point": {"row": 131, "column": 5}, "end_point": {"row": 131, "column": 6}}, {"id": 325, "type": "init_declarator", "text": "nz = 0", "parent": 322, "children": [326, 327, 328], "start_point": {"row": 131, "column": 8}, "end_point": {"row": 131, "column": 14}}, {"id": 326, "type": "identifier", "text": "nz", "parent": 325, "children": [], "start_point": {"row": 131, "column": 8}, "end_point": {"row": 131, "column": 10}}, {"id": 327, "type": "=", "text": "=", "parent": 325, "children": [], "start_point": {"row": 131, "column": 11}, "end_point": {"row": 131, "column": 12}}, {"id": 328, "type": "number_literal", "text": "0", "parent": 325, "children": [], "start_point": {"row": 131, "column": 13}, "end_point": {"row": 131, "column": 14}}, {"id": 329, "type": "for_statement", "text": "for (i =0 ; i < NPAR; i++) {\n if (synBytes[i] != 0) {\n nz = 1;\n break;\n }\n }", "parent": 315, "children": [330, 334, 338], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 137, "column": 2}}, {"id": 330, "type": "assignment_expression", "text": "i =0", "parent": 329, "children": [331, 332, 333], "start_point": {"row": 132, "column": 6}, "end_point": {"row": 132, "column": 10}}, {"id": 331, "type": "identifier", "text": "i", "parent": 330, "children": [], "start_point": {"row": 132, "column": 6}, "end_point": {"row": 132, "column": 7}}, {"id": 332, "type": "=", "text": "=", "parent": 330, "children": [], "start_point": {"row": 132, "column": 8}, "end_point": {"row": 132, "column": 9}}, {"id": 333, "type": "number_literal", "text": "0", "parent": 330, "children": [], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 10}}, {"id": 334, "type": "binary_expression", "text": "i < NPAR", "parent": 329, "children": [335, 336, 337], "start_point": {"row": 132, "column": 13}, "end_point": {"row": 132, "column": 21}}, {"id": 335, "type": "identifier", "text": "i", "parent": 334, "children": [], "start_point": {"row": 132, "column": 13}, "end_point": {"row": 132, "column": 14}}, {"id": 336, "type": "<", "text": "<", "parent": 334, "children": [], "start_point": {"row": 132, "column": 15}, "end_point": {"row": 132, "column": 16}}, {"id": 337, "type": "identifier", "text": "NPAR", "parent": 334, "children": [], "start_point": {"row": 132, "column": 17}, "end_point": {"row": 132, "column": 21}}, {"id": 338, "type": "update_expression", "text": "i++", "parent": 329, "children": [339, 340], "start_point": {"row": 132, "column": 23}, "end_point": {"row": 132, "column": 26}}, {"id": 339, "type": "identifier", "text": "i", "parent": 338, "children": [], "start_point": {"row": 132, "column": 23}, "end_point": {"row": 132, "column": 24}}, {"id": 340, "type": "++", "text": "++", "parent": 338, "children": [], "start_point": {"row": 132, "column": 24}, "end_point": {"row": 132, "column": 26}}, {"id": 341, "type": "if_statement", "text": "if (synBytes[i] != 0) {\n nz = 1;\n break;\n }", "parent": 329, "children": [342], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 136, "column": 3}}, {"id": 342, "type": "parenthesized_expression", "text": "(synBytes[i] != 0)", "parent": 341, "children": [343], "start_point": {"row": 133, "column": 5}, "end_point": {"row": 133, "column": 23}}, {"id": 343, "type": "binary_expression", "text": "synBytes[i] != 0", "parent": 342, "children": [344, 347, 348], "start_point": {"row": 133, "column": 6}, "end_point": {"row": 133, "column": 22}}, {"id": 344, "type": "subscript_expression", "text": "synBytes[i]", "parent": 343, "children": [345, 346], "start_point": {"row": 133, "column": 6}, "end_point": {"row": 133, "column": 17}}, {"id": 345, "type": "identifier", "text": "synBytes", "parent": 344, "children": [], "start_point": {"row": 133, "column": 6}, "end_point": {"row": 133, "column": 14}}, {"id": 346, "type": "identifier", "text": "i", "parent": 344, "children": [], "start_point": {"row": 133, "column": 15}, "end_point": {"row": 133, "column": 16}}, {"id": 347, "type": "!=", "text": "!=", "parent": 343, "children": [], "start_point": {"row": 133, "column": 18}, "end_point": {"row": 133, "column": 20}}, {"id": 348, "type": "number_literal", "text": "0", "parent": 343, "children": [], "start_point": {"row": 133, "column": 21}, "end_point": {"row": 133, "column": 22}}, {"id": 349, "type": "assignment_expression", "text": "nz = 1", "parent": 341, "children": [350, 351, 352], "start_point": {"row": 134, "column": 6}, "end_point": {"row": 134, "column": 12}}, {"id": 350, "type": "identifier", "text": "nz", "parent": 349, "children": [], "start_point": {"row": 134, "column": 6}, "end_point": {"row": 134, "column": 8}}, {"id": 351, "type": "=", "text": "=", "parent": 349, "children": [], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 10}}, {"id": 352, "type": "number_literal", "text": "1", "parent": 349, "children": [], "start_point": {"row": 134, "column": 11}, "end_point": {"row": 134, "column": 12}}, {"id": 353, "type": "break_statement", "text": "break;", "parent": 341, "children": [354], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 135, "column": 12}}, {"id": 354, "type": "break", "text": "break", "parent": 353, "children": [], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 135, "column": 11}}, {"id": 355, "type": "return_statement", "text": "return nz;", "parent": 315, "children": [356], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 11}}, {"id": 356, "type": "identifier", "text": "nz", "parent": 355, "children": [], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 10}}, {"id": 357, "type": "function_definition", "text": "void\ndebug_check_syndrome (void)\n{\t\n int i;\n\t\n for (i = 0; i < 3; i++) {\n printf(\" inv log S[%d]/S[%d] = %d\\n\", i, i+1, \n\t glog[gmult(synBytes[i], ginv(synBytes[i+1]))]);\n }\n}", "parent": null, "children": [358, 359], "start_point": {"row": 142, "column": 0}, "end_point": {"row": 151, "column": 1}}, {"id": 358, "type": "primitive_type", "text": "void", "parent": 357, "children": [], "start_point": {"row": 142, "column": 0}, "end_point": {"row": 142, "column": 4}}, {"id": 359, "type": "function_declarator", "text": "debug_check_syndrome (void)", "parent": 357, "children": [360, 361], "start_point": {"row": 143, "column": 0}, "end_point": {"row": 143, "column": 27}}, {"id": 360, "type": "identifier", "text": "debug_check_syndrome", "parent": 359, "children": [], "start_point": {"row": 143, "column": 0}, "end_point": {"row": 143, "column": 20}}, {"id": 361, "type": "parameter_list", "text": "(void)", "parent": 359, "children": [362], "start_point": {"row": 143, "column": 21}, "end_point": {"row": 143, "column": 27}}, {"id": 362, "type": "parameter_declaration", "text": "void", "parent": 361, "children": [363], "start_point": {"row": 143, "column": 22}, "end_point": {"row": 143, "column": 26}}, {"id": 363, "type": "primitive_type", "text": "void", "parent": 362, "children": [], "start_point": {"row": 143, "column": 22}, "end_point": {"row": 143, "column": 26}}, {"id": 364, "type": "declaration", "text": "int i;", "parent": 357, "children": [365, 366], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 145, "column": 8}}, {"id": 365, "type": "primitive_type", "text": "int", "parent": 364, "children": [], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 145, "column": 5}}, {"id": 366, "type": "identifier", "text": "i", "parent": 364, "children": [], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 7}}, {"id": 367, "type": "for_statement", "text": "for (i = 0; i < 3; i++) {\n printf(\" inv log S[%d]/S[%d] = %d\\n\", i, i+1, \n\t glog[gmult(synBytes[i], ginv(synBytes[i+1]))]);\n }", "parent": 357, "children": [368, 372, 376], "start_point": {"row": 147, "column": 2}, "end_point": {"row": 150, "column": 3}}, {"id": 368, "type": "assignment_expression", "text": "i = 0", "parent": 367, "children": [369, 370, 371], "start_point": {"row": 147, "column": 7}, "end_point": {"row": 147, "column": 12}}, {"id": 369, "type": "identifier", "text": "i", "parent": 368, "children": [], "start_point": {"row": 147, "column": 7}, "end_point": {"row": 147, "column": 8}}, {"id": 370, "type": "=", "text": "=", "parent": 368, "children": [], "start_point": {"row": 147, "column": 9}, "end_point": {"row": 147, "column": 10}}, {"id": 371, "type": "number_literal", "text": "0", "parent": 368, "children": [], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 12}}, {"id": 372, "type": "binary_expression", "text": "i < 3", "parent": 367, "children": [373, 374, 375], "start_point": {"row": 147, "column": 14}, "end_point": {"row": 147, "column": 19}}, {"id": 373, "type": "identifier", "text": "i", "parent": 372, "children": [], "start_point": {"row": 147, "column": 14}, "end_point": {"row": 147, "column": 15}}, {"id": 374, "type": "<", "text": "<", "parent": 372, "children": [], "start_point": {"row": 147, "column": 16}, "end_point": {"row": 147, "column": 17}}, {"id": 375, "type": "number_literal", "text": "3", "parent": 372, "children": [], "start_point": {"row": 147, "column": 18}, "end_point": {"row": 147, "column": 19}}, {"id": 376, "type": "update_expression", "text": "i++", "parent": 367, "children": [377, 378], "start_point": {"row": 147, "column": 21}, "end_point": {"row": 147, "column": 24}}, {"id": 377, "type": "identifier", "text": "i", "parent": 376, "children": [], "start_point": {"row": 147, "column": 21}, "end_point": {"row": 147, "column": 22}}, {"id": 378, "type": "++", "text": "++", "parent": 376, "children": [], "start_point": {"row": 147, "column": 22}, "end_point": {"row": 147, "column": 24}}, {"id": 379, "type": "call_expression", "text": "printf(\" inv log S[%d]/S[%d] = %d\\n\", i, i+1, \n\t glog[gmult(synBytes[i], ginv(synBytes[i+1]))])", "parent": 367, "children": [380, 381], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 149, "column": 50}}, {"id": 380, "type": "identifier", "text": "printf", "parent": 379, "children": [], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 10}}, {"id": 381, "type": "argument_list", "text": "(\" inv log S[%d]/S[%d] = %d\\n\", i, i+1, \n\t glog[gmult(synBytes[i], ginv(synBytes[i+1]))])", "parent": 379, "children": [382, 384, 385, 389], "start_point": {"row": 148, "column": 10}, "end_point": {"row": 149, "column": 50}}, {"id": 382, "type": "string_literal", "text": "\" inv log S[%d]/S[%d] = %d\\n\"", "parent": 381, "children": [383], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 40}}, {"id": 383, "type": "escape_sequence", "text": "\\n", "parent": 382, "children": [], "start_point": {"row": 148, "column": 37}, "end_point": {"row": 148, "column": 39}}, {"id": 384, "type": "identifier", "text": "i", "parent": 381, "children": [], "start_point": {"row": 148, "column": 42}, "end_point": {"row": 148, "column": 43}}, {"id": 385, "type": "binary_expression", "text": "i+1", "parent": 381, "children": [386, 387, 388], "start_point": {"row": 148, "column": 45}, "end_point": {"row": 148, "column": 48}}, {"id": 386, "type": "identifier", "text": "i", "parent": 385, "children": [], "start_point": {"row": 148, "column": 45}, "end_point": {"row": 148, "column": 46}}, {"id": 387, "type": "+", "text": "+", "parent": 385, "children": [], "start_point": {"row": 148, "column": 46}, "end_point": {"row": 148, "column": 47}}, {"id": 388, "type": "number_literal", "text": "1", "parent": 385, "children": [], "start_point": {"row": 148, "column": 47}, "end_point": {"row": 148, "column": 48}}, {"id": 389, "type": "subscript_expression", "text": "glog[gmult(synBytes[i], ginv(synBytes[i+1]))]", "parent": 381, "children": [390, 391], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 49}}, {"id": 390, "type": "identifier", "text": "glog", "parent": 389, "children": [], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 8}}, {"id": 391, "type": "call_expression", "text": "gmult(synBytes[i], ginv(synBytes[i+1]))", "parent": 389, "children": [392, 393], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 48}}, {"id": 392, "type": "identifier", "text": "gmult", "parent": 391, "children": [], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 14}}, {"id": 393, "type": "argument_list", "text": "(synBytes[i], ginv(synBytes[i+1]))", "parent": 391, "children": [394, 397], "start_point": {"row": 149, "column": 14}, "end_point": {"row": 149, "column": 48}}, {"id": 394, "type": "subscript_expression", "text": "synBytes[i]", "parent": 393, "children": [395, 396], "start_point": {"row": 149, "column": 15}, "end_point": {"row": 149, "column": 26}}, {"id": 395, "type": "identifier", "text": "synBytes", "parent": 394, "children": [], "start_point": {"row": 149, "column": 15}, "end_point": {"row": 149, "column": 23}}, {"id": 396, "type": "identifier", "text": "i", "parent": 394, "children": [], "start_point": {"row": 149, "column": 24}, "end_point": {"row": 149, "column": 25}}, {"id": 397, "type": "call_expression", "text": "ginv(synBytes[i+1])", "parent": 393, "children": [398, 399], "start_point": {"row": 149, "column": 28}, "end_point": {"row": 149, "column": 47}}, {"id": 398, "type": "identifier", "text": "ginv", "parent": 397, "children": [], "start_point": {"row": 149, "column": 28}, "end_point": {"row": 149, "column": 32}}, {"id": 399, "type": "argument_list", "text": "(synBytes[i+1])", "parent": 397, "children": [400], "start_point": {"row": 149, "column": 32}, "end_point": {"row": 149, "column": 47}}, {"id": 400, "type": "subscript_expression", "text": "synBytes[i+1]", "parent": 399, "children": [401, 402], "start_point": {"row": 149, "column": 33}, "end_point": {"row": 149, "column": 46}}, {"id": 401, "type": "identifier", "text": "synBytes", "parent": 400, "children": [], "start_point": {"row": 149, "column": 33}, "end_point": {"row": 149, "column": 41}}, {"id": 402, "type": "binary_expression", "text": "i+1", "parent": 400, "children": [403, 404, 405], "start_point": {"row": 149, "column": 42}, "end_point": {"row": 149, "column": 45}}, {"id": 403, "type": "identifier", "text": "i", "parent": 402, "children": [], "start_point": {"row": 149, "column": 42}, "end_point": {"row": 149, "column": 43}}, {"id": 404, "type": "+", "text": "+", "parent": 402, "children": [], "start_point": {"row": 149, "column": 43}, "end_point": {"row": 149, "column": 44}}, {"id": 405, "type": "number_literal", "text": "1", "parent": 402, "children": [], "start_point": {"row": 149, "column": 44}, "end_point": {"row": 149, "column": 45}}, {"id": 406, "type": "function_definition", "text": "static void\ncompute_genpoly (int nbytes, int genpoly[])\n{\n int i, tp[256], tp1[256];\n\t\n /* multiply (x + a^n) for n = 1 to nbytes */\n\n zero_poly(tp1);\n tp1[0] = 1;\n\n for (i = 1; i <= nbytes; i++) {\n zero_poly(tp);\n tp[0] = gexp[i];\t\t/* set up x+a^n */\n tp[1] = 1;\n\t \n mult_polys(genpoly, tp, tp1);\n copy_poly(tp1, genpoly);\n }\n}", "parent": null, "children": [407, 408], "start_point": {"row": 160, "column": 0}, "end_point": {"row": 178, "column": 1}}, {"id": 407, "type": "primitive_type", "text": "void", "parent": 406, "children": [], "start_point": {"row": 160, "column": 7}, "end_point": {"row": 160, "column": 11}}, {"id": 408, "type": "function_declarator", "text": "compute_genpoly (int nbytes, int genpoly[])", "parent": 406, "children": [409, 410], "start_point": {"row": 161, "column": 0}, "end_point": {"row": 161, "column": 43}}, {"id": 409, "type": "identifier", "text": "compute_genpoly", "parent": 408, "children": [], "start_point": {"row": 161, "column": 0}, "end_point": {"row": 161, "column": 15}}, {"id": 410, "type": "parameter_list", "text": "(int nbytes, int genpoly[])", "parent": 408, "children": [411, 414], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 43}}, {"id": 411, "type": "parameter_declaration", "text": "int nbytes", "parent": 410, "children": [412, 413], "start_point": {"row": 161, "column": 17}, "end_point": {"row": 161, "column": 27}}, {"id": 412, "type": "primitive_type", "text": "int", "parent": 411, "children": [], "start_point": {"row": 161, "column": 17}, "end_point": {"row": 161, "column": 20}}, {"id": 413, "type": "identifier", "text": "nbytes", "parent": 411, "children": [], "start_point": {"row": 161, "column": 21}, "end_point": {"row": 161, "column": 27}}, {"id": 414, "type": "parameter_declaration", "text": "int genpoly[]", "parent": 410, "children": [415, 416], "start_point": {"row": 161, "column": 29}, "end_point": {"row": 161, "column": 42}}, {"id": 415, "type": "primitive_type", "text": "int", "parent": 414, "children": [], "start_point": {"row": 161, "column": 29}, "end_point": {"row": 161, "column": 32}}, {"id": 416, "type": "array_declarator", "text": "genpoly[]", "parent": 414, "children": [417], "start_point": {"row": 161, "column": 33}, "end_point": {"row": 161, "column": 42}}, {"id": 417, "type": "identifier", "text": "genpoly", "parent": 416, "children": [], "start_point": {"row": 161, "column": 33}, "end_point": {"row": 161, "column": 40}}, {"id": 418, "type": "declaration", "text": "int i, tp[256], tp1[256];", "parent": 406, "children": [419, 420, 421, 424], "start_point": {"row": 163, "column": 2}, "end_point": {"row": 163, "column": 27}}, {"id": 419, "type": "primitive_type", "text": "int", "parent": 418, "children": [], "start_point": {"row": 163, "column": 2}, "end_point": {"row": 163, "column": 5}}, {"id": 420, "type": "identifier", "text": "i", "parent": 418, "children": [], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 7}}, {"id": 421, "type": "array_declarator", "text": "tp[256]", "parent": 418, "children": [422, 423], "start_point": {"row": 163, "column": 9}, "end_point": {"row": 163, "column": 16}}, {"id": 422, "type": "identifier", "text": "tp", "parent": 421, "children": [], "start_point": {"row": 163, "column": 9}, "end_point": {"row": 163, "column": 11}}, {"id": 423, "type": "number_literal", "text": "256", "parent": 421, "children": [], "start_point": {"row": 163, "column": 12}, "end_point": {"row": 163, "column": 15}}, {"id": 424, "type": "array_declarator", "text": "tp1[256]", "parent": 418, "children": [425, 426], "start_point": {"row": 163, "column": 18}, "end_point": {"row": 163, "column": 26}}, {"id": 425, "type": "identifier", "text": "tp1", "parent": 424, "children": [], "start_point": {"row": 163, "column": 18}, "end_point": {"row": 163, "column": 21}}, {"id": 426, "type": "number_literal", "text": "256", "parent": 424, "children": [], "start_point": {"row": 163, "column": 22}, "end_point": {"row": 163, "column": 25}}, {"id": 427, "type": "call_expression", "text": "zero_poly(tp1)", "parent": 406, "children": [428, 429], "start_point": {"row": 167, "column": 2}, "end_point": {"row": 167, "column": 16}}, {"id": 428, "type": "identifier", "text": "zero_poly", "parent": 427, "children": [], "start_point": {"row": 167, "column": 2}, "end_point": {"row": 167, "column": 11}}, {"id": 429, "type": "argument_list", "text": "(tp1)", "parent": 427, "children": [430], "start_point": {"row": 167, "column": 11}, "end_point": {"row": 167, "column": 16}}, {"id": 430, "type": "identifier", "text": "tp1", "parent": 429, "children": [], "start_point": {"row": 167, "column": 12}, "end_point": {"row": 167, "column": 15}}, {"id": 431, "type": "assignment_expression", "text": "tp1[0] = 1", "parent": 406, "children": [432, 435, 436], "start_point": {"row": 168, "column": 2}, "end_point": {"row": 168, "column": 12}}, {"id": 432, "type": "subscript_expression", "text": "tp1[0]", "parent": 431, "children": [433, 434], "start_point": {"row": 168, "column": 2}, "end_point": {"row": 168, "column": 8}}, {"id": 433, "type": "identifier", "text": "tp1", "parent": 432, "children": [], "start_point": {"row": 168, "column": 2}, "end_point": {"row": 168, "column": 5}}, {"id": 434, "type": "number_literal", "text": "0", "parent": 432, "children": [], "start_point": {"row": 168, "column": 6}, "end_point": {"row": 168, "column": 7}}, {"id": 435, "type": "=", "text": "=", "parent": 431, "children": [], "start_point": {"row": 168, "column": 9}, "end_point": {"row": 168, "column": 10}}, {"id": 436, "type": "number_literal", "text": "1", "parent": 431, "children": [], "start_point": {"row": 168, "column": 11}, "end_point": {"row": 168, "column": 12}}, {"id": 437, "type": "for_statement", "text": "for (i = 1; i <= nbytes; i++) {\n zero_poly(tp);\n tp[0] = gexp[i];\t\t/* set up x+a^n */\n tp[1] = 1;\n\t \n mult_polys(genpoly, tp, tp1);\n copy_poly(tp1, genpoly);\n }", "parent": 406, "children": [438, 442, 446], "start_point": {"row": 170, "column": 2}, "end_point": {"row": 177, "column": 3}}, {"id": 438, "type": "assignment_expression", "text": "i = 1", "parent": 437, "children": [439, 440, 441], "start_point": {"row": 170, "column": 7}, "end_point": {"row": 170, "column": 12}}, {"id": 439, "type": "identifier", "text": "i", "parent": 438, "children": [], "start_point": {"row": 170, "column": 7}, "end_point": {"row": 170, "column": 8}}, {"id": 440, "type": "=", "text": "=", "parent": 438, "children": [], "start_point": {"row": 170, "column": 9}, "end_point": {"row": 170, "column": 10}}, {"id": 441, "type": "number_literal", "text": "1", "parent": 438, "children": [], "start_point": {"row": 170, "column": 11}, "end_point": {"row": 170, "column": 12}}, {"id": 442, "type": "binary_expression", "text": "i <= nbytes", "parent": 437, "children": [443, 444, 445], "start_point": {"row": 170, "column": 14}, "end_point": {"row": 170, "column": 25}}, {"id": 443, "type": "identifier", "text": "i", "parent": 442, "children": [], "start_point": {"row": 170, "column": 14}, "end_point": {"row": 170, "column": 15}}, {"id": 444, "type": "<=", "text": "<=", "parent": 442, "children": [], "start_point": {"row": 170, "column": 16}, "end_point": {"row": 170, "column": 18}}, {"id": 445, "type": "identifier", "text": "nbytes", "parent": 442, "children": [], "start_point": {"row": 170, "column": 19}, "end_point": {"row": 170, "column": 25}}, {"id": 446, "type": "update_expression", "text": "i++", "parent": 437, "children": [447, 448], "start_point": {"row": 170, "column": 27}, "end_point": {"row": 170, "column": 30}}, {"id": 447, "type": "identifier", "text": "i", "parent": 446, "children": [], "start_point": {"row": 170, "column": 27}, "end_point": {"row": 170, "column": 28}}, {"id": 448, "type": "++", "text": "++", "parent": 446, "children": [], "start_point": {"row": 170, "column": 28}, "end_point": {"row": 170, "column": 30}}, {"id": 449, "type": "call_expression", "text": "zero_poly(tp)", "parent": 437, "children": [450, 451], "start_point": {"row": 171, "column": 4}, "end_point": {"row": 171, "column": 17}}, {"id": 450, "type": "identifier", "text": "zero_poly", "parent": 449, "children": [], "start_point": {"row": 171, "column": 4}, "end_point": {"row": 171, "column": 13}}, {"id": 451, "type": "argument_list", "text": "(tp)", "parent": 449, "children": [452], "start_point": {"row": 171, "column": 13}, "end_point": {"row": 171, "column": 17}}, {"id": 452, "type": "identifier", "text": "tp", "parent": 451, "children": [], "start_point": {"row": 171, "column": 14}, "end_point": {"row": 171, "column": 16}}, {"id": 453, "type": "assignment_expression", "text": "tp[0] = gexp[i]", "parent": 437, "children": [454, 457, 458], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 19}}, {"id": 454, "type": "subscript_expression", "text": "tp[0]", "parent": 453, "children": [455, 456], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 9}}, {"id": 455, "type": "identifier", "text": "tp", "parent": 454, "children": [], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 6}}, {"id": 456, "type": "number_literal", "text": "0", "parent": 454, "children": [], "start_point": {"row": 172, "column": 7}, "end_point": {"row": 172, "column": 8}}, {"id": 457, "type": "=", "text": "=", "parent": 453, "children": [], "start_point": {"row": 172, "column": 10}, "end_point": {"row": 172, "column": 11}}, {"id": 458, "type": "subscript_expression", "text": "gexp[i]", "parent": 453, "children": [459, 460], "start_point": {"row": 172, "column": 12}, "end_point": {"row": 172, "column": 19}}, {"id": 459, "type": "identifier", "text": "gexp", "parent": 458, "children": [], "start_point": {"row": 172, "column": 12}, "end_point": {"row": 172, "column": 16}}, {"id": 460, "type": "identifier", "text": "i", "parent": 458, "children": [], "start_point": {"row": 172, "column": 17}, "end_point": {"row": 172, "column": 18}}, {"id": 461, "type": "assignment_expression", "text": "tp[1] = 1", "parent": 437, "children": [462, 465, 466], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 13}}, {"id": 462, "type": "subscript_expression", "text": "tp[1]", "parent": 461, "children": [463, 464], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 9}}, {"id": 463, "type": "identifier", "text": "tp", "parent": 462, "children": [], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 6}}, {"id": 464, "type": "number_literal", "text": "1", "parent": 462, "children": [], "start_point": {"row": 173, "column": 7}, "end_point": {"row": 173, "column": 8}}, {"id": 465, "type": "=", "text": "=", "parent": 461, "children": [], "start_point": {"row": 173, "column": 10}, "end_point": {"row": 173, "column": 11}}, {"id": 466, "type": "number_literal", "text": "1", "parent": 461, "children": [], "start_point": {"row": 173, "column": 12}, "end_point": {"row": 173, "column": 13}}, {"id": 467, "type": "call_expression", "text": "mult_polys(genpoly, tp, tp1)", "parent": 437, "children": [468, 469], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 32}}, {"id": 468, "type": "identifier", "text": "mult_polys", "parent": 467, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 14}}, {"id": 469, "type": "argument_list", "text": "(genpoly, tp, tp1)", "parent": 467, "children": [470, 471, 472], "start_point": {"row": 175, "column": 14}, "end_point": {"row": 175, "column": 32}}, {"id": 470, "type": "identifier", "text": "genpoly", "parent": 469, "children": [], "start_point": {"row": 175, "column": 15}, "end_point": {"row": 175, "column": 22}}, {"id": 471, "type": "identifier", "text": "tp", "parent": 469, "children": [], "start_point": {"row": 175, "column": 24}, "end_point": {"row": 175, "column": 26}}, {"id": 472, "type": "identifier", "text": "tp1", "parent": 469, "children": [], "start_point": {"row": 175, "column": 28}, "end_point": {"row": 175, "column": 31}}, {"id": 473, "type": "call_expression", "text": "copy_poly(tp1, genpoly)", "parent": 437, "children": [474, 475], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 27}}, {"id": 474, "type": "identifier", "text": "copy_poly", "parent": 473, "children": [], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 13}}, {"id": 475, "type": "argument_list", "text": "(tp1, genpoly)", "parent": 473, "children": [476, 477], "start_point": {"row": 176, "column": 13}, "end_point": {"row": 176, "column": 27}}, {"id": 476, "type": "identifier", "text": "tp1", "parent": 475, "children": [], "start_point": {"row": 176, "column": 14}, "end_point": {"row": 176, "column": 17}}, {"id": 477, "type": "identifier", "text": "genpoly", "parent": 475, "children": [], "start_point": {"row": 176, "column": 19}, "end_point": {"row": 176, "column": 26}}, {"id": 478, "type": "function_definition", "text": "void\nencode_data (unsigned char msg[], int nbytes, unsigned char dst[])\n{\n int i, LFSR[NPAR+1],dbyte, j;\n\t\n for(i=0; i < NPAR+1; i++) LFSR[i]=0;\n\n for (i = 0; i < nbytes; i++) {\n dbyte = msg[i] ^ LFSR[NPAR-1];\n for (j = NPAR-1; j > 0; j--) {\n LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);\n }\n LFSR[0] = gmult(genPoly[0], dbyte);\n }\n\n for (i = 0; i < NPAR; i++) \n pBytes[i] = LFSR[i];\n\t\n build_codeword(msg, nbytes, dst);\n}", "parent": null, "children": [479, 480], "start_point": {"row": 188, "column": 0}, "end_point": {"row": 207, "column": 1}}, {"id": 479, "type": "primitive_type", "text": "void", "parent": 478, "children": [], "start_point": {"row": 188, "column": 0}, "end_point": {"row": 188, "column": 4}}, {"id": 480, "type": "function_declarator", "text": "encode_data (unsigned char msg[], int nbytes, unsigned char dst[])", "parent": 478, "children": [481, 482], "start_point": {"row": 189, "column": 0}, "end_point": {"row": 189, "column": 66}}, {"id": 481, "type": "identifier", "text": "encode_data", "parent": 480, "children": [], "start_point": {"row": 189, "column": 0}, "end_point": {"row": 189, "column": 11}}, {"id": 482, "type": "parameter_list", "text": "(unsigned char msg[], int nbytes, unsigned char dst[])", "parent": 480, "children": [483, 489, 492], "start_point": {"row": 189, "column": 12}, "end_point": {"row": 189, "column": 66}}, {"id": 483, "type": "parameter_declaration", "text": "unsigned char msg[]", "parent": 482, "children": [484, 487], "start_point": {"row": 189, "column": 13}, "end_point": {"row": 189, "column": 32}}, {"id": 484, "type": "sized_type_specifier", "text": "unsigned char", "parent": 483, "children": [485, 486], "start_point": {"row": 189, "column": 13}, "end_point": {"row": 189, "column": 26}}, {"id": 485, "type": "unsigned", "text": "unsigned", "parent": 484, "children": [], "start_point": {"row": 189, "column": 13}, "end_point": {"row": 189, "column": 21}}, {"id": 486, "type": "primitive_type", "text": "char", "parent": 484, "children": [], "start_point": {"row": 189, "column": 22}, "end_point": {"row": 189, "column": 26}}, {"id": 487, "type": "array_declarator", "text": "msg[]", "parent": 483, "children": [488], "start_point": {"row": 189, "column": 27}, "end_point": {"row": 189, "column": 32}}, {"id": 488, "type": "identifier", "text": "msg", "parent": 487, "children": [], "start_point": {"row": 189, "column": 27}, "end_point": {"row": 189, "column": 30}}, {"id": 489, "type": "parameter_declaration", "text": "int nbytes", "parent": 482, "children": [490, 491], "start_point": {"row": 189, "column": 34}, "end_point": {"row": 189, "column": 44}}, {"id": 490, "type": "primitive_type", "text": "int", "parent": 489, "children": [], "start_point": {"row": 189, "column": 34}, "end_point": {"row": 189, "column": 37}}, {"id": 491, "type": "identifier", "text": "nbytes", "parent": 489, "children": [], "start_point": {"row": 189, "column": 38}, "end_point": {"row": 189, "column": 44}}, {"id": 492, "type": "parameter_declaration", "text": "unsigned char dst[]", "parent": 482, "children": [493, 496], "start_point": {"row": 189, "column": 46}, "end_point": {"row": 189, "column": 65}}, {"id": 493, "type": "sized_type_specifier", "text": "unsigned char", "parent": 492, "children": [494, 495], "start_point": {"row": 189, "column": 46}, "end_point": {"row": 189, "column": 59}}, {"id": 494, "type": "unsigned", "text": "unsigned", "parent": 493, "children": [], "start_point": {"row": 189, "column": 46}, "end_point": {"row": 189, "column": 54}}, {"id": 495, "type": "primitive_type", "text": "char", "parent": 493, "children": [], "start_point": {"row": 189, "column": 55}, "end_point": {"row": 189, "column": 59}}, {"id": 496, "type": "array_declarator", "text": "dst[]", "parent": 492, "children": [497], "start_point": {"row": 189, "column": 60}, "end_point": {"row": 189, "column": 65}}, {"id": 497, "type": "identifier", "text": "dst", "parent": 496, "children": [], "start_point": {"row": 189, "column": 60}, "end_point": {"row": 189, "column": 63}}, {"id": 498, "type": "declaration", "text": "int i, LFSR[NPAR+1],dbyte, j;", "parent": 478, "children": [499, 500, 501, 507, 508], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 31}}, {"id": 499, "type": "primitive_type", "text": "int", "parent": 498, "children": [], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 5}}, {"id": 500, "type": "identifier", "text": "i", "parent": 498, "children": [], "start_point": {"row": 191, "column": 6}, "end_point": {"row": 191, "column": 7}}, {"id": 501, "type": "array_declarator", "text": "LFSR[NPAR+1]", "parent": 498, "children": [502, 503], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 21}}, {"id": 502, "type": "identifier", "text": "LFSR", "parent": 501, "children": [], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 13}}, {"id": 503, "type": "binary_expression", "text": "NPAR+1", "parent": 501, "children": [504, 505, 506], "start_point": {"row": 191, "column": 14}, "end_point": {"row": 191, "column": 20}}, {"id": 504, "type": "identifier", "text": "NPAR", "parent": 503, "children": [], "start_point": {"row": 191, "column": 14}, "end_point": {"row": 191, "column": 18}}, {"id": 505, "type": "+", "text": "+", "parent": 503, "children": [], "start_point": {"row": 191, "column": 18}, "end_point": {"row": 191, "column": 19}}, {"id": 506, "type": "number_literal", "text": "1", "parent": 503, "children": [], "start_point": {"row": 191, "column": 19}, "end_point": {"row": 191, "column": 20}}, {"id": 507, "type": "identifier", "text": "dbyte", "parent": 498, "children": [], "start_point": {"row": 191, "column": 22}, "end_point": {"row": 191, "column": 27}}, {"id": 508, "type": "identifier", "text": "j", "parent": 498, "children": [], "start_point": {"row": 191, "column": 29}, "end_point": {"row": 191, "column": 30}}, {"id": 509, "type": "for_statement", "text": "for(i=0; i < NPAR+1; i++) LFSR[i]=0;", "parent": 478, "children": [510, 514, 521], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 38}}, {"id": 510, "type": "assignment_expression", "text": "i=0", "parent": 509, "children": [511, 512, 513], "start_point": {"row": 193, "column": 6}, "end_point": {"row": 193, "column": 9}}, {"id": 511, "type": "identifier", "text": "i", "parent": 510, "children": [], "start_point": {"row": 193, "column": 6}, "end_point": {"row": 193, "column": 7}}, {"id": 512, "type": "=", "text": "=", "parent": 510, "children": [], "start_point": {"row": 193, "column": 7}, "end_point": {"row": 193, "column": 8}}, {"id": 513, "type": "number_literal", "text": "0", "parent": 510, "children": [], "start_point": {"row": 193, "column": 8}, "end_point": {"row": 193, "column": 9}}, {"id": 514, "type": "binary_expression", "text": "i < NPAR+1", "parent": 509, "children": [515, 516, 517], "start_point": {"row": 193, "column": 11}, "end_point": {"row": 193, "column": 21}}, {"id": 515, "type": "identifier", "text": "i", "parent": 514, "children": [], "start_point": {"row": 193, "column": 11}, "end_point": {"row": 193, "column": 12}}, {"id": 516, "type": "<", "text": "<", "parent": 514, "children": [], "start_point": {"row": 193, "column": 13}, "end_point": {"row": 193, "column": 14}}, {"id": 517, "type": "binary_expression", "text": "NPAR+1", "parent": 514, "children": [518, 519, 520], "start_point": {"row": 193, "column": 15}, "end_point": {"row": 193, "column": 21}}, {"id": 518, "type": "identifier", "text": "NPAR", "parent": 517, "children": [], "start_point": {"row": 193, "column": 15}, "end_point": {"row": 193, "column": 19}}, {"id": 519, "type": "+", "text": "+", "parent": 517, "children": [], "start_point": {"row": 193, "column": 19}, "end_point": {"row": 193, "column": 20}}, {"id": 520, "type": "number_literal", "text": "1", "parent": 517, "children": [], "start_point": {"row": 193, "column": 20}, "end_point": {"row": 193, "column": 21}}, {"id": 521, "type": "update_expression", "text": "i++", "parent": 509, "children": [522, 523], "start_point": {"row": 193, "column": 23}, "end_point": {"row": 193, "column": 26}}, {"id": 522, "type": "identifier", "text": "i", "parent": 521, "children": [], "start_point": {"row": 193, "column": 23}, "end_point": {"row": 193, "column": 24}}, {"id": 523, "type": "++", "text": "++", "parent": 521, "children": [], "start_point": {"row": 193, "column": 24}, "end_point": {"row": 193, "column": 26}}, {"id": 524, "type": "assignment_expression", "text": "LFSR[i]=0", "parent": 509, "children": [525, 528, 529], "start_point": {"row": 193, "column": 28}, "end_point": {"row": 193, "column": 37}}, {"id": 525, "type": "subscript_expression", "text": "LFSR[i]", "parent": 524, "children": [526, 527], "start_point": {"row": 193, "column": 28}, "end_point": {"row": 193, "column": 35}}, {"id": 526, "type": "identifier", "text": "LFSR", "parent": 525, "children": [], "start_point": {"row": 193, "column": 28}, "end_point": {"row": 193, "column": 32}}, {"id": 527, "type": "identifier", "text": "i", "parent": 525, "children": [], "start_point": {"row": 193, "column": 33}, "end_point": {"row": 193, "column": 34}}, {"id": 528, "type": "=", "text": "=", "parent": 524, "children": [], "start_point": {"row": 193, "column": 35}, "end_point": {"row": 193, "column": 36}}, {"id": 529, "type": "number_literal", "text": "0", "parent": 524, "children": [], "start_point": {"row": 193, "column": 36}, "end_point": {"row": 193, "column": 37}}, {"id": 530, "type": "for_statement", "text": "for (i = 0; i < nbytes; i++) {\n dbyte = msg[i] ^ LFSR[NPAR-1];\n for (j = NPAR-1; j > 0; j--) {\n LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);\n }\n LFSR[0] = gmult(genPoly[0], dbyte);\n }", "parent": 478, "children": [531, 535, 539], "start_point": {"row": 195, "column": 2}, "end_point": {"row": 201, "column": 3}}, {"id": 531, "type": "assignment_expression", "text": "i = 0", "parent": 530, "children": [532, 533, 534], "start_point": {"row": 195, "column": 7}, "end_point": {"row": 195, "column": 12}}, {"id": 532, "type": "identifier", "text": "i", "parent": 531, "children": [], "start_point": {"row": 195, "column": 7}, "end_point": {"row": 195, "column": 8}}, {"id": 533, "type": "=", "text": "=", "parent": 531, "children": [], "start_point": {"row": 195, "column": 9}, "end_point": {"row": 195, "column": 10}}, {"id": 534, "type": "number_literal", "text": "0", "parent": 531, "children": [], "start_point": {"row": 195, "column": 11}, "end_point": {"row": 195, "column": 12}}, {"id": 535, "type": "binary_expression", "text": "i < nbytes", "parent": 530, "children": [536, 537, 538], "start_point": {"row": 195, "column": 14}, "end_point": {"row": 195, "column": 24}}, {"id": 536, "type": "identifier", "text": "i", "parent": 535, "children": [], "start_point": {"row": 195, "column": 14}, "end_point": {"row": 195, "column": 15}}, {"id": 537, "type": "<", "text": "<", "parent": 535, "children": [], "start_point": {"row": 195, "column": 16}, "end_point": {"row": 195, "column": 17}}, {"id": 538, "type": "identifier", "text": "nbytes", "parent": 535, "children": [], "start_point": {"row": 195, "column": 18}, "end_point": {"row": 195, "column": 24}}, {"id": 539, "type": "update_expression", "text": "i++", "parent": 530, "children": [540, 541], "start_point": {"row": 195, "column": 26}, "end_point": {"row": 195, "column": 29}}, {"id": 540, "type": "identifier", "text": "i", "parent": 539, "children": [], "start_point": {"row": 195, "column": 26}, "end_point": {"row": 195, "column": 27}}, {"id": 541, "type": "++", "text": "++", "parent": 539, "children": [], "start_point": {"row": 195, "column": 27}, "end_point": {"row": 195, "column": 29}}, {"id": 542, "type": "assignment_expression", "text": "dbyte = msg[i] ^ LFSR[NPAR-1]", "parent": 530, "children": [543, 544, 545], "start_point": {"row": 196, "column": 4}, "end_point": {"row": 196, "column": 33}}, {"id": 543, "type": "identifier", "text": "dbyte", "parent": 542, "children": [], "start_point": {"row": 196, "column": 4}, "end_point": {"row": 196, "column": 9}}, {"id": 544, "type": "=", "text": "=", "parent": 542, "children": [], "start_point": {"row": 196, "column": 10}, "end_point": {"row": 196, "column": 11}}, {"id": 545, "type": "binary_expression", "text": "msg[i] ^ LFSR[NPAR-1]", "parent": 542, "children": [546, 549, 550], "start_point": {"row": 196, "column": 12}, "end_point": {"row": 196, "column": 33}}, {"id": 546, "type": "subscript_expression", "text": "msg[i]", "parent": 545, "children": [547, 548], "start_point": {"row": 196, "column": 12}, "end_point": {"row": 196, "column": 18}}, {"id": 547, "type": "identifier", "text": "msg", "parent": 546, "children": [], "start_point": {"row": 196, "column": 12}, "end_point": {"row": 196, "column": 15}}, {"id": 548, "type": "identifier", "text": "i", "parent": 546, "children": [], "start_point": {"row": 196, "column": 16}, "end_point": {"row": 196, "column": 17}}, {"id": 549, "type": "^", "text": "^", "parent": 545, "children": [], "start_point": {"row": 196, "column": 19}, "end_point": {"row": 196, "column": 20}}, {"id": 550, "type": "subscript_expression", "text": "LFSR[NPAR-1]", "parent": 545, "children": [551, 552], "start_point": {"row": 196, "column": 21}, "end_point": {"row": 196, "column": 33}}, {"id": 551, "type": "identifier", "text": "LFSR", "parent": 550, "children": [], "start_point": {"row": 196, "column": 21}, "end_point": {"row": 196, "column": 25}}, {"id": 552, "type": "binary_expression", "text": "NPAR-1", "parent": 550, "children": [553, 554, 555], "start_point": {"row": 196, "column": 26}, "end_point": {"row": 196, "column": 32}}, {"id": 553, "type": "identifier", "text": "NPAR", "parent": 552, "children": [], "start_point": {"row": 196, "column": 26}, "end_point": {"row": 196, "column": 30}}, {"id": 554, "type": "-", "text": "-", "parent": 552, "children": [], "start_point": {"row": 196, "column": 30}, "end_point": {"row": 196, "column": 31}}, {"id": 555, "type": "number_literal", "text": "1", "parent": 552, "children": [], "start_point": {"row": 196, "column": 31}, "end_point": {"row": 196, "column": 32}}, {"id": 556, "type": "for_statement", "text": "for (j = NPAR-1; j > 0; j--) {\n LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);\n }", "parent": 530, "children": [557, 564, 568], "start_point": {"row": 197, "column": 4}, "end_point": {"row": 199, "column": 5}}, {"id": 557, "type": "assignment_expression", "text": "j = NPAR-1", "parent": 556, "children": [558, 559, 560], "start_point": {"row": 197, "column": 9}, "end_point": {"row": 197, "column": 19}}, {"id": 558, "type": "identifier", "text": "j", "parent": 557, "children": [], "start_point": {"row": 197, "column": 9}, "end_point": {"row": 197, "column": 10}}, {"id": 559, "type": "=", "text": "=", "parent": 557, "children": [], "start_point": {"row": 197, "column": 11}, "end_point": {"row": 197, "column": 12}}, {"id": 560, "type": "binary_expression", "text": "NPAR-1", "parent": 557, "children": [561, 562, 563], "start_point": {"row": 197, "column": 13}, "end_point": {"row": 197, "column": 19}}, {"id": 561, "type": "identifier", "text": "NPAR", "parent": 560, "children": [], "start_point": {"row": 197, "column": 13}, "end_point": {"row": 197, "column": 17}}, {"id": 562, "type": "-", "text": "-", "parent": 560, "children": [], "start_point": {"row": 197, "column": 17}, "end_point": {"row": 197, "column": 18}}, {"id": 563, "type": "number_literal", "text": "1", "parent": 560, "children": [], "start_point": {"row": 197, "column": 18}, "end_point": {"row": 197, "column": 19}}, {"id": 564, "type": "binary_expression", "text": "j > 0", "parent": 556, "children": [565, 566, 567], "start_point": {"row": 197, "column": 21}, "end_point": {"row": 197, "column": 26}}, {"id": 565, "type": "identifier", "text": "j", "parent": 564, "children": [], "start_point": {"row": 197, "column": 21}, "end_point": {"row": 197, "column": 22}}, {"id": 566, "type": ">", "text": ">", "parent": 564, "children": [], "start_point": {"row": 197, "column": 23}, "end_point": {"row": 197, "column": 24}}, {"id": 567, "type": "number_literal", "text": "0", "parent": 564, "children": [], "start_point": {"row": 197, "column": 25}, "end_point": {"row": 197, "column": 26}}, {"id": 568, "type": "update_expression", "text": "j--", "parent": 556, "children": [569, 570], "start_point": {"row": 197, "column": 28}, "end_point": {"row": 197, "column": 31}}, {"id": 569, "type": "identifier", "text": "j", "parent": 568, "children": [], "start_point": {"row": 197, "column": 28}, "end_point": {"row": 197, "column": 29}}, {"id": 570, "type": "--", "text": "--", "parent": 568, "children": [], "start_point": {"row": 197, "column": 29}, "end_point": {"row": 197, "column": 31}}, {"id": 571, "type": "assignment_expression", "text": "LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte)", "parent": 556, "children": [572, 575, 576], "start_point": {"row": 198, "column": 6}, "end_point": {"row": 198, "column": 52}}, {"id": 572, "type": "subscript_expression", "text": "LFSR[j]", "parent": 571, "children": [573, 574], "start_point": {"row": 198, "column": 6}, "end_point": {"row": 198, "column": 13}}, {"id": 573, "type": "identifier", "text": "LFSR", "parent": 572, "children": [], "start_point": {"row": 198, "column": 6}, "end_point": {"row": 198, "column": 10}}, {"id": 574, "type": "identifier", "text": "j", "parent": 572, "children": [], "start_point": {"row": 198, "column": 11}, "end_point": {"row": 198, "column": 12}}, {"id": 575, "type": "=", "text": "=", "parent": 571, "children": [], "start_point": {"row": 198, "column": 14}, "end_point": {"row": 198, "column": 15}}, {"id": 576, "type": "binary_expression", "text": "LFSR[j-1] ^ gmult(genPoly[j], dbyte)", "parent": 571, "children": [577, 583, 584], "start_point": {"row": 198, "column": 16}, "end_point": {"row": 198, "column": 52}}, {"id": 577, "type": "subscript_expression", "text": "LFSR[j-1]", "parent": 576, "children": [578, 579], "start_point": {"row": 198, "column": 16}, "end_point": {"row": 198, "column": 25}}, {"id": 578, "type": "identifier", "text": "LFSR", "parent": 577, "children": [], "start_point": {"row": 198, "column": 16}, "end_point": {"row": 198, "column": 20}}, {"id": 579, "type": "binary_expression", "text": "j-1", "parent": 577, "children": [580, 581, 582], "start_point": {"row": 198, "column": 21}, "end_point": {"row": 198, "column": 24}}, {"id": 580, "type": "identifier", "text": "j", "parent": 579, "children": [], "start_point": {"row": 198, "column": 21}, "end_point": {"row": 198, "column": 22}}, {"id": 581, "type": "-", "text": "-", "parent": 579, "children": [], "start_point": {"row": 198, "column": 22}, "end_point": {"row": 198, "column": 23}}, {"id": 582, "type": "number_literal", "text": "1", "parent": 579, "children": [], "start_point": {"row": 198, "column": 23}, "end_point": {"row": 198, "column": 24}}, {"id": 583, "type": "^", "text": "^", "parent": 576, "children": [], "start_point": {"row": 198, "column": 26}, "end_point": {"row": 198, "column": 27}}, {"id": 584, "type": "call_expression", "text": "gmult(genPoly[j], dbyte)", "parent": 576, "children": [585, 586], "start_point": {"row": 198, "column": 28}, "end_point": {"row": 198, "column": 52}}, {"id": 585, "type": "identifier", "text": "gmult", "parent": 584, "children": [], "start_point": {"row": 198, "column": 28}, "end_point": {"row": 198, "column": 33}}, {"id": 586, "type": "argument_list", "text": "(genPoly[j], dbyte)", "parent": 584, "children": [587, 590], "start_point": {"row": 198, "column": 33}, "end_point": {"row": 198, "column": 52}}, {"id": 587, "type": "subscript_expression", "text": "genPoly[j]", "parent": 586, "children": [588, 589], "start_point": {"row": 198, "column": 34}, "end_point": {"row": 198, "column": 44}}, {"id": 588, "type": "identifier", "text": "genPoly", "parent": 587, "children": [], "start_point": {"row": 198, "column": 34}, "end_point": {"row": 198, "column": 41}}, {"id": 589, "type": "identifier", "text": "j", "parent": 587, "children": [], "start_point": {"row": 198, "column": 42}, "end_point": {"row": 198, "column": 43}}, {"id": 590, "type": "identifier", "text": "dbyte", "parent": 586, "children": [], "start_point": {"row": 198, "column": 46}, "end_point": {"row": 198, "column": 51}}, {"id": 591, "type": "assignment_expression", "text": "LFSR[0] = gmult(genPoly[0], dbyte)", "parent": 530, "children": [592, 595, 596], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 38}}, {"id": 592, "type": "subscript_expression", "text": "LFSR[0]", "parent": 591, "children": [593, 594], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 11}}, {"id": 593, "type": "identifier", "text": "LFSR", "parent": 592, "children": [], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 8}}, {"id": 594, "type": "number_literal", "text": "0", "parent": 592, "children": [], "start_point": {"row": 200, "column": 9}, "end_point": {"row": 200, "column": 10}}, {"id": 595, "type": "=", "text": "=", "parent": 591, "children": [], "start_point": {"row": 200, "column": 12}, "end_point": {"row": 200, "column": 13}}, {"id": 596, "type": "call_expression", "text": "gmult(genPoly[0], dbyte)", "parent": 591, "children": [597, 598], "start_point": {"row": 200, "column": 14}, "end_point": {"row": 200, "column": 38}}, {"id": 597, "type": "identifier", "text": "gmult", "parent": 596, "children": [], "start_point": {"row": 200, "column": 14}, "end_point": {"row": 200, "column": 19}}, {"id": 598, "type": "argument_list", "text": "(genPoly[0], dbyte)", "parent": 596, "children": [599, 602], "start_point": {"row": 200, "column": 19}, "end_point": {"row": 200, "column": 38}}, {"id": 599, "type": "subscript_expression", "text": "genPoly[0]", "parent": 598, "children": [600, 601], "start_point": {"row": 200, "column": 20}, "end_point": {"row": 200, "column": 30}}, {"id": 600, "type": "identifier", "text": "genPoly", "parent": 599, "children": [], "start_point": {"row": 200, "column": 20}, "end_point": {"row": 200, "column": 27}}, {"id": 601, "type": "number_literal", "text": "0", "parent": 599, "children": [], "start_point": {"row": 200, "column": 28}, "end_point": {"row": 200, "column": 29}}, {"id": 602, "type": "identifier", "text": "dbyte", "parent": 598, "children": [], "start_point": {"row": 200, "column": 32}, "end_point": {"row": 200, "column": 37}}, {"id": 603, "type": "for_statement", "text": "for (i = 0; i < NPAR; i++) \n pBytes[i] = LFSR[i];", "parent": 478, "children": [604, 608, 612], "start_point": {"row": 203, "column": 2}, "end_point": {"row": 204, "column": 24}}, {"id": 604, "type": "assignment_expression", "text": "i = 0", "parent": 603, "children": [605, 606, 607], "start_point": {"row": 203, "column": 7}, "end_point": {"row": 203, "column": 12}}, {"id": 605, "type": "identifier", "text": "i", "parent": 604, "children": [], "start_point": {"row": 203, "column": 7}, "end_point": {"row": 203, "column": 8}}, {"id": 606, "type": "=", "text": "=", "parent": 604, "children": [], "start_point": {"row": 203, "column": 9}, "end_point": {"row": 203, "column": 10}}, {"id": 607, "type": "number_literal", "text": "0", "parent": 604, "children": [], "start_point": {"row": 203, "column": 11}, "end_point": {"row": 203, "column": 12}}, {"id": 608, "type": "binary_expression", "text": "i < NPAR", "parent": 603, "children": [609, 610, 611], "start_point": {"row": 203, "column": 14}, "end_point": {"row": 203, "column": 22}}, {"id": 609, "type": "identifier", "text": "i", "parent": 608, "children": [], "start_point": {"row": 203, "column": 14}, "end_point": {"row": 203, "column": 15}}, {"id": 610, "type": "<", "text": "<", "parent": 608, "children": [], "start_point": {"row": 203, "column": 16}, "end_point": {"row": 203, "column": 17}}, {"id": 611, "type": "identifier", "text": "NPAR", "parent": 608, "children": [], "start_point": {"row": 203, "column": 18}, "end_point": {"row": 203, "column": 22}}, {"id": 612, "type": "update_expression", "text": "i++", "parent": 603, "children": [613, 614], "start_point": {"row": 203, "column": 24}, "end_point": {"row": 203, "column": 27}}, {"id": 613, "type": "identifier", "text": "i", "parent": 612, "children": [], "start_point": {"row": 203, "column": 24}, "end_point": {"row": 203, "column": 25}}, {"id": 614, "type": "++", "text": "++", "parent": 612, "children": [], "start_point": {"row": 203, "column": 25}, "end_point": {"row": 203, "column": 27}}, {"id": 615, "type": "assignment_expression", "text": "pBytes[i] = LFSR[i]", "parent": 603, "children": [616, 619, 620], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 23}}, {"id": 616, "type": "subscript_expression", "text": "pBytes[i]", "parent": 615, "children": [617, 618], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 13}}, {"id": 617, "type": "identifier", "text": "pBytes", "parent": 616, "children": [], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 10}}, {"id": 618, "type": "identifier", "text": "i", "parent": 616, "children": [], "start_point": {"row": 204, "column": 11}, "end_point": {"row": 204, "column": 12}}, {"id": 619, "type": "=", "text": "=", "parent": 615, "children": [], "start_point": {"row": 204, "column": 14}, "end_point": {"row": 204, "column": 15}}, {"id": 620, "type": "subscript_expression", "text": "LFSR[i]", "parent": 615, "children": [621, 622], "start_point": {"row": 204, "column": 16}, "end_point": {"row": 204, "column": 23}}, {"id": 621, "type": "identifier", "text": "LFSR", "parent": 620, "children": [], "start_point": {"row": 204, "column": 16}, "end_point": {"row": 204, "column": 20}}, {"id": 622, "type": "identifier", "text": "i", "parent": 620, "children": [], "start_point": {"row": 204, "column": 21}, "end_point": {"row": 204, "column": 22}}, {"id": 623, "type": "call_expression", "text": "build_codeword(msg, nbytes, dst)", "parent": 478, "children": [624, 625], "start_point": {"row": 206, "column": 2}, "end_point": {"row": 206, "column": 34}}, {"id": 624, "type": "identifier", "text": "build_codeword", "parent": 623, "children": [], "start_point": {"row": 206, "column": 2}, "end_point": {"row": 206, "column": 16}}, {"id": 625, "type": "argument_list", "text": "(msg, nbytes, dst)", "parent": 623, "children": [626, 627, 628], "start_point": {"row": 206, "column": 16}, "end_point": {"row": 206, "column": 34}}, {"id": 626, "type": "identifier", "text": "msg", "parent": 625, "children": [], "start_point": {"row": 206, "column": 17}, "end_point": {"row": 206, "column": 20}}, {"id": 627, "type": "identifier", "text": "nbytes", "parent": 625, "children": [], "start_point": {"row": 206, "column": 22}, "end_point": {"row": 206, "column": 28}}, {"id": 628, "type": "identifier", "text": "dst", "parent": 625, "children": [], "start_point": {"row": 206, "column": 30}, "end_point": {"row": 206, "column": 33}}]}, "node_categories": {"declarations": {"functions": [35, 45, 47, 58, 60, 94, 96, 133, 135, 172, 174, 244, 246, 315, 317, 357, 359, 406, 408, 478, 480], "variables": [9, 14, 19, 27, 33, 38, 41, 63, 69, 71, 74, 99, 101, 138, 140, 177, 183, 186, 192, 249, 255, 258, 320, 322, 362, 364, 411, 414, 418, 483, 489, 492, 498], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [23, 50, 53, 81, 85, 89, 104, 113, 117, 120, 125, 128, 143, 152, 156, 159, 164, 167, 200, 204, 208, 212, 220, 224, 228, 230, 235, 237, 238, 268, 272, 284, 288, 294, 295, 299, 302, 304, 310, 334, 338, 342, 343, 344, 372, 376, 379, 385, 389, 391, 394, 397, 400, 402, 427, 432, 442, 446, 449, 454, 458, 462, 467, 473, 503, 514, 517, 521, 525, 535, 539, 545, 546, 550, 552, 560, 564, 568, 572, 576, 577, 579, 584, 587, 592, 596, 599, 608, 612, 616, 620, 623], "assignments": [78, 88, 109, 148, 196, 207, 216, 227, 264, 275, 280, 291, 309, 330, 349, 368, 431, 438, 453, 461, 510, 524, 531, 542, 557, 571, 591, 604, 615], "loops": [77, 108, 147, 195, 215, 263, 279, 329, 367, 437, 509, 530, 556, 603], "conditionals": [12, 13, 17, 18, 22, 24, 30, 36, 40, 44, 48, 51, 54, 56, 57, 61, 64, 68, 73, 76, 79, 82, 84, 86, 90, 91, 97, 103, 105, 110, 114, 116, 118, 121, 124, 126, 127, 129, 136, 142, 144, 149, 153, 155, 157, 160, 163, 165, 166, 168, 175, 178, 182, 185, 187, 191, 194, 197, 201, 203, 205, 209, 210, 213, 214, 217, 221, 223, 225, 229, 231, 233, 236, 239, 243, 247, 250, 254, 257, 260, 261, 262, 265, 269, 271, 273, 276, 281, 285, 287, 289, 292, 296, 297, 300, 303, 305, 308, 311, 312, 314, 318, 324, 326, 331, 335, 337, 339, 341, 345, 346, 350, 356, 360, 366, 369, 373, 377, 380, 384, 386, 390, 392, 395, 396, 398, 401, 403, 409, 413, 417, 420, 422, 425, 428, 430, 433, 439, 443, 445, 447, 450, 452, 455, 459, 460, 463, 468, 470, 471, 472, 474, 476, 477, 481, 484, 488, 491, 493, 497, 500, 502, 504, 507, 508, 511, 515, 518, 522, 526, 527, 532, 536, 538, 540, 543, 547, 548, 551, 553, 558, 561, 565, 569, 573, 574, 578, 580, 585, 588, 589, 590, 593, 597, 600, 602, 605, 609, 611, 613, 617, 618, 621, 622, 624, 626, 627, 628], "returns": [355], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 26, 93, 107, 112, 123, 131, 146, 151, 162, 170, 199, 219, 241, 267, 278, 283, 307, 328, 333, 348, 352, 371, 375, 382, 388, 405, 423, 426, 434, 436, 441, 456, 464, 466, 506, 513, 520, 529, 534, 555, 563, 567, 582, 594, 601, 607], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 35, "universal_type": "function", "name": "genpoly[])", "text_snippet": "compute_genpoly (int nbytes, int genpoly[])"}, {"node_id": 45, "universal_type": "function", "name": "initialize_ecc", "text_snippet": "void\ninitialize_ecc ()\n{\n /* Initialize the galois field arithmetic tables */\n init_galois_table"}, {"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "initialize_ecc ()"}, {"node_id": 58, "universal_type": "function", "name": "zero_fill_from", "text_snippet": "void\nzero_fill_from (unsigned char buf[], int from, int to)\n{\n int i;\n for (i = from; i < to; i++)"}, {"node_id": 60, "universal_type": "function", "name": "from,", "text_snippet": "zero_fill_from (unsigned char buf[], int from, int to)"}, {"node_id": 94, "universal_type": "function", "name": "print_parity", "text_snippet": "void\nprint_parity (void)\n{ \n int i;\n printf(\"Parity Bytes: \");\n for (i = 0; i < NPAR; i++) \n p"}, {"node_id": 96, "universal_type": "function", "name": "unknown", "text_snippet": "print_parity (void)"}, {"node_id": 133, "universal_type": "function", "name": "print_syndrome", "text_snippet": "void\nprint_syndrome (void)\n{ \n int i;\n printf(\"Syndrome Bytes: \");\n for (i = 0; i < NPAR; i++) \n "}, {"node_id": 135, "universal_type": "function", "name": "unknown", "text_snippet": "print_syndrome (void)"}, {"node_id": 172, "universal_type": "function", "name": "build_codeword", "text_snippet": "void\nbuild_codeword (unsigned char msg[], int nbytes, unsigned char dst[])\n{\n int i;\n\t\n for (i = 0"}, {"node_id": 174, "universal_type": "function", "name": "nbytes,", "text_snippet": "build_codeword (unsigned char msg[], int nbytes, unsigned char dst[])"}, {"node_id": 244, "universal_type": "function", "name": "decode_data", "text_snippet": "void\ndecode_data(unsigned char data[], int nbytes)\n{\n int i, j, sum;\n for (j = 0; j < NPAR; j++) "}, {"node_id": 246, "universal_type": "function", "name": "nbytes)", "text_snippet": "decode_data(unsigned char data[], int nbytes)"}, {"node_id": 315, "universal_type": "function", "name": "check_syndrome", "text_snippet": "int\ncheck_syndrome (void)\n{\n int i, nz = 0;\n for (i =0 ; i < NPAR; i++) {\n if (synBytes[i] != 0) {\n"}, {"node_id": 317, "universal_type": "function", "name": "unknown", "text_snippet": "check_syndrome (void)"}, {"node_id": 357, "universal_type": "function", "name": "debug_check_syndrome", "text_snippet": "void\ndebug_check_syndrome (void)\n{\t\n int i;\n\t\n for (i = 0; i < 3; i++) {\n printf(\" inv log S[%d"}, {"node_id": 359, "universal_type": "function", "name": "unknown", "text_snippet": "debug_check_syndrome (void)"}, {"node_id": 406, "universal_type": "function", "name": "compute_genpoly", "text_snippet": "static void\ncompute_genpoly (int nbytes, int genpoly[])\n{\n int i, tp[256], tp1[256];\n\t\n /* multipl"}, {"node_id": 408, "universal_type": "function", "name": "genpoly[])", "text_snippet": "compute_genpoly (int nbytes, int genpoly[])"}, {"node_id": 478, "universal_type": "function", "name": "encode_data", "text_snippet": "void\nencode_data (unsigned char msg[], int nbytes, unsigned char dst[])\n{\n int i, LFSR[NPAR+1],dbyt"}, {"node_id": 480, "universal_type": "function", "name": "nbytes,", "text_snippet": "encode_data (unsigned char msg[], int nbytes, unsigned char dst[])"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <ctype.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"ecc.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/* \n * Reed Solomon Encoder/Decoder \n *\n * Copyright <NAME> (<EMAIL>) 1991-2009\n *\n * This software library is licensed under terms of the GNU GENERAL\n * PUBLIC LICENSE\n *\n * RSCODE is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * RSCODE 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 Rscode. If not, see <http://www.gnu.org/licenses/>.\n * \n * <NAME>:\n * <NAME> grants the users of the JPEG Embedding Library a\n * royalty-free license to modify and redistribute the software package\n * \"rscode error-correction coding library\", in binary or source\n * form. Authors who wish to use the rscode error correction source code\n * in any substantially different software application than the JPEG\n * Embedding Library may contact the author for other license terms.\n *\n * Commercial licensing is available under a separate license, please\n * contact author for details.\n *\n * Source code is available at http://rscode.sourceforge.net\n */\n\n#include <stdio.h>\n#include <ctype.h>\n#include \"ecc.h\"\n\n/* Encoder parity bytes */\nint pBytes[MAXDEG];\n\n/* Decoder syndrome bytes */\nint synBytes[MAXDEG];\n\n/* generator polynomial */\nint genPoly[MAXDEG*2];\n\nint DEBUG = FALSE;\n\nstatic void\ncompute_genpoly (int nbytes, int genpoly[]);\n\n/* Initialize lookup tables, polynomials, etc. */\nvoid\ninitialize_ecc ()\n{\n /* Initialize the galois field arithmetic tables */\n init_galois_tables();\n\n /* Compute the encoder generator polynomial */\n compute_genpoly(NPAR, genPoly);\n}\n\nvoid\nzero_fill_from (unsigned char buf[], int from, int to)\n{\n int i;\n for (i = from; i < to; i++) buf[i] = 0;\n}\n\n/* debugging routines */\nvoid\nprint_parity (void)\n{ \n int i;\n printf(\"Parity Bytes: \");\n for (i = 0; i < NPAR; i++) \n printf(\"[%d]:%x, \",i,pBytes[i]);\n printf(\"\\n\");\n}\n\n\nvoid\nprint_syndrome (void)\n{ \n int i;\n printf(\"Syndrome Bytes: \");\n for (i = 0; i < NPAR; i++) \n printf(\"[%d]:%x, \",i,synBytes[i]);\n printf(\"\\n\");\n}\n\n/* Append the parity bytes onto the end of the message */\nvoid\nbuild_codeword (unsigned char msg[], int nbytes, unsigned char dst[])\n{\n int i;\n\t\n for (i = 0; i < nbytes; i++) dst[i] = msg[i];\n\t\n for (i = 0; i < NPAR; i++) {\n dst[i+nbytes] = pBytes[NPAR-1-i];\n }\n}\n\t\n/**********************************************************\n * Reed Solomon Decoder \n *\n * Computes the syndrome of a codeword. Puts the results\n * into the synBytes[] array.\n */\n \nvoid\ndecode_data(unsigned char data[], int nbytes)\n{\n int i, j, sum;\n for (j = 0; j < NPAR; j++) {\n sum\t= 0;\n for (i = 0; i < nbytes; i++) {\n sum = data[i] ^ gmult(gexp[j+1], sum);\n }\n synBytes[j] = sum;\n }\n}\n\n\n/* Check if the syndrome is zero */\nint\ncheck_syndrome (void)\n{\n int i, nz = 0;\n for (i =0 ; i < NPAR; i++) {\n if (synBytes[i] != 0) {\n nz = 1;\n break;\n }\n }\n return nz;\n}\n\n\nvoid\ndebug_check_syndrome (void)\n{\t\n int i;\n\t\n for (i = 0; i < 3; i++) {\n printf(\" inv log S[%d]/S[%d] = %d\\n\", i, i+1, \n\t glog[gmult(synBytes[i], ginv(synBytes[i+1]))]);\n }\n}\n\n\n/* Create a generator polynomial for an n byte RS code. \n * The coefficients are returned in the genPoly arg.\n * Make sure that the genPoly array which is passed in is \n * at least n+1 bytes long.\n */\n\nstatic void\ncompute_genpoly (int nbytes, int genpoly[])\n{\n int i, tp[256], tp1[256];\n\t\n /* multiply (x + a^n) for n = 1 to nbytes */\n\n zero_poly(tp1);\n tp1[0] = 1;\n\n for (i = 1; i <= nbytes; i++) {\n zero_poly(tp);\n tp[0] = gexp[i];\t\t/* set up x+a^n */\n tp[1] = 1;\n\t \n mult_polys(genpoly, tp, tp1);\n copy_poly(tp1, genpoly);\n }\n}\n\n/* Simulate a LFSR with generator polynomial for n byte RS code. \n * Pass in a pointer to the data array, and amount of data. \n *\n * The parity bytes are deposited into pBytes[], and the whole message\n * and parity are copied to dest to make a codeword.\n * \n */\n\nvoid\nencode_data (unsigned char msg[], int nbytes, unsigned char dst[])\n{\n int i, LFSR[NPAR+1],dbyte, j;\n\t\n for(i=0; i < NPAR+1; i++) LFSR[i]=0;\n\n for (i = 0; i < nbytes; i++) {\n dbyte = msg[i] ^ LFSR[NPAR-1];\n for (j = NPAR-1; j > 0; j--) {\n LFSR[j] = LFSR[j-1] ^ gmult(genPoly[j], dbyte);\n }\n LFSR[0] = gmult(genPoly[0], dbyte);\n }\n\n for (i = 0; i < NPAR; i++) \n pBytes[i] = LFSR[i];\n\t\n build_codeword(msg, nbytes, dst);\n}\n\n"}
369
c
#import <Foundation/Foundation.h> /** * Some time-consuming operations, usually the network request. * The JobManager will do its best to make sure job executing successfully. * So, assume it had executed successfully before it really executes, * update the UI according to the success hypothesis. */ @interface RTJob : NSObject <NSCoding> //任务的主类型,相反的任务通过type来区分 @property (strong, nonatomic) NSString *type; //任务标识, 相反的任务或相同的任务都应该有相同的identifier @property (strong, nonatomic) NSString *identifier; //创建任务的时间,单位:秒 @property (assign, nonatomic) NSTimeInterval createdTime; //错误码,当遇到该错误码时,取消任务 @property (assign, nonatomic) int errorCode; //剩余重试次数,超过次数,取消任务,次数为0,只能等待下一次重启运行循环才能重试 @property (assign, nonatomic) int retryTimes; //APP退出时,是否保存任务 @property (assign, nonatomic) BOOL shouldSaved; //是否可以取消,是否存在存在相反的操作,如点赞,取消点赞,点赞....相邻两个任务是可抵消的 //相反的两种任务都可取消 @property (assign, nonatomic) BOOL cancellable; //是否可重复,如果为NO,此时队列中存在相同的任务,则删除队列中原来的任务,以最新的任务为主 //如对于同一张照片:点赞->点赞 = 点赞(虽然一般不会发生的,但点击速度快于状态改变速度,还是有可能的) @property (assign, nonatomic) BOOL repeative; //执行该任务需要的环境,状态,条件,参数等 @property (strong, nonatomic) NSDictionary *parameters; //是否在执行 @property (assign, nonatomic) BOOL executing; //比较两个任务是否相等 - (BOOL) isEqual:(RTJob*)job; /** 比较两个任务,判断它们是否可以相互抵消 */ - (BOOL) isInverse:(RTJob*)job; /*****************************************************************\ 子类必须重载以下方法: 1.[executeInQueue:withBlock:] 2.[inverseJob] > 存在相反的任务,且必须通过执行相反的动作来达到取消的目的的时候 > 一般不用考虑 \*****************************************************************/ /** 执行任务 status:任务执行结束的状态 0表示成功,其他的表示失败 如果status与errorCode相等,取消任务 子类重载方式: - (void) executeInQueue:(dispatch_queue_t)queue withBlock:(void(^)(int status))block{ [super executeInQueue:queue withBlock:^(int sta) { if(sta == 0) { sta = [self action...]; } dispatch_async(queue, ^{ block(sta); ]); }]; } */ - (void) executeInQueue:(dispatch_queue_t)queue withBlock:(void(^)(int status))block; /** 如果在执行的时候取消,则会遇到以下几种情况: 1. 必须忽略取消操作 2. 必须等到当前执行结束,才能执行取消操作 2.1 执行成功,则执行相反任务 2.2 执行失败,删除任务 3. 可在执行过程中取消 (不考虑这种情况,一般不会出现这种情况) 没在执行状态,直接删除 */ //- (void) cancel; //cancel operation execute by manager /** 返回一个作用相反的任务 */ - (RTJob*) inverseJob; @end
29.44
77
(translation_unit) "#import <Foundation/Foundation.h>\n\n/**\n * Some time-consuming operations, usually the network request.\n * The JobManager will do its best to make sure job executing successfully.\n * So, assume it had executed successfully before it really executes, \n * update the UI according to the success hypothesis.\n */\n@interface RTJob : NSObject <NSCoding>\n\n//任务的主类型,相反的任务通过type来区分\n@property (strong, nonatomic) NSString *type;\n\n//任务标识, 相反的任务或相同的任务都应该有相同的identifier\n@property (strong, nonatomic) NSString *identifier;\n\n//创建任务的时间,单位:秒\n@property (assign, nonatomic) NSTimeInterval createdTime;\n\n//错误码,当遇到该错误码时,取消任务\n@property (assign, nonatomic) int errorCode;\n\n//剩余重试次数,超过次数,取消任务,次数为0,只能等待下一次重启运行循环才能重试\n@property (assign, nonatomic) int retryTimes;\n\n//APP退出时,是否保存任务\n@property (assign, nonatomic) BOOL shouldSaved;\n\n//是否可以取消,是否存在存在相反的操作,如点赞,取消点赞,点赞....相邻两个任务是可抵消的\n//相反的两种任务都可取消\n@property (assign, nonatomic) BOOL cancellable;\n\n//是否可重复,如果为NO,此时队列中存在相同的任务,则删除队列中原来的任务,以最新的任务为主\n//如对于同一张照片:点赞->点赞 = 点赞(虽然一般不会发生的,但点击速度快于状态改变速度,还是有可能的)\n@property (assign, nonatomic) BOOL repeative;\n\n//执行该任务需要的环境,状态,条件,参数等\n@property (strong, nonatomic) NSDictionary *parameters;\n\n//是否在执行\n@property (assign, nonatomic) BOOL executing;\n\n//比较两个任务是否相等\n- (BOOL) isEqual:(RTJob*)job;\n\n/**\n 比较两个任务,判断它们是否可以相互抵消\n */\n- (BOOL) isInverse:(RTJob*)job;\n\n\n/*****************************************************************\\n 子类必须重载以下方法:\n 1.[executeInQueue:withBlock:]\n 2.[inverseJob]\n > 存在相反的任务,且必须通过执行相反的动作来达到取消的目的的时候\n > 一般不用考虑\n\*****************************************************************/\n\n/**\n 执行任务\n status:任务执行结束的状态\n 0表示成功,其他的表示失败\n 如果status与errorCode相等,取消任务\n 子类重载方式:\n - (void) executeInQueue:(dispatch_queue_t)queue withBlock:(void(^)(int status))block{\n [super executeInQueue:queue withBlock:^(int sta) {\n if(sta == 0) {\n sta = [self action...];\n }\n dispatch_async(queue, ^{\n block(sta);\n ]);\n }];\n }\n */\n- (void) executeInQueue:(dispatch_queue_t)queue withBlock:(void(^)(int status))block;\n\n/**\n 如果在执行的时候取消,则会遇到以下几种情况:\n 1. 必须忽略取消操作\n 2. 必须等到当前执行结束,才能执行取消操作\n 2.1 执行成功,则执行相反任务\n 2.2 执行失败,删除任务\n 3. 可在执行过程中取消 (不考虑这种情况,一般不会出现这种情况)\n 没在执行状态,直接删除\n */\n//- (void) cancel; //cancel operation execute by manager\n\n/**\n 返回一个作用相反的任务\n */\n- (RTJob*) inverseJob;\n\n\n@end\n" (preproc_call) "#import <Foundation/Foundation.h>\n" (preproc_directive) "#import" (preproc_arg) "<Foundation/Foundation.h>" (comment) "/**\n * Some time-consuming operations, usually the network request.\n * The JobManager will do its best to make sure job executing successfully.\n * So, assume it had executed successfully before it really executes, \n * update the UI according to the success hypothesis.\n */" (ERROR) "@interface RTJob : NSObject <NSCoding>\n\n//任务的主类型,相反的任务通过type来区分\n@property (strong, nonatomic) NSString *type;\n\n//任务标识, 相反的任务或相同的任务都应该有相同的identifier\n@property (strong, nonatomic) NSString *identifier;\n\n//创建任务的时间,单位:秒\n@property (assign, nonatomic) NSTimeInterval createdTime;\n\n//错误码,当遇到该错误码时,取消任务\n@property (assign, nonatomic) int errorCode;\n\n//剩余重试次数,超过次数,取消任务,次数为0,只能等待下一次重启运行循环才能重试\n@property (assign, nonatomic) int retryTimes;\n\n//APP退出时,是否保存任务\n@property (assign, nonatomic) BOOL shouldSaved;\n\n//是否可以取消,是否存在存在相反的操作,如点赞,取消点赞,点赞....相邻两个任务是可抵消的\n//相反的两种任务都可取消\n@property (assign, nonatomic) BOOL cancellable;\n\n//是否可重复,如果为NO,此时队列中存在相同的任务,则删除队列中原来的任务,以最新的任务为主\n//如对于同一张照片:点赞->点赞 = 点赞(虽然一般不会发生的,但点击速度快于状态改变速度,还是有可能的)\n@property (assign, nonatomic) BOOL repeative;\n\n//执行该任务需要的环境,状态,条件,参数等\n@property (strong, nonatomic) NSDictionary *parameters;\n\n//是否在执行\n@property (assign, nonatomic) BOOL executing;\n\n//比较两个任务是否相等\n- (BOOL) isEqual:(RTJob*)job;\n\n/**\n 比较两个任务,判断它们是否可以相互抵消\n */\n- (BOOL) isInverse:(RTJob*)job;\n\n\n/*****************************************************************\\n 子类必须重载以下方法:\n 1.[executeInQueue:withBlock:]\n 2.[inverseJob]\n > 存在相反的任务,且必须通过执行相反的动作来达到取消的目的的时候\n > 一般不用考虑\n\*****************************************************************/\n\n/**\n 执行任务\n status:任务执行结束的状态\n 0表示成功,其他的表示失败\n 如果status与errorCode相等,取消任务\n 子类重载方式:\n - (void) executeInQueue:(dispatch_queue_t)queue withBlock:(void(^)(int status))block{\n [super executeInQueue:queue withBlock:^(int sta) {\n if(sta == 0) {\n sta = [self action...];\n }\n dispatch_async(queue, ^{\n block(sta);\n ]);\n }];\n }\n */\n- (void) executeInQueue:(dispatch_queue_t)queue withBlock:(void(^)(int status))block;\n\n/**\n 如果在执行的时候取消,则会遇到以下几种情况:\n 1. 必须忽略取消操作\n 2. 必须等到当前执行结束,才能执行取消操作\n 2.1 执行成功,则执行相反任务\n 2.2 执行失败,删除任务\n 3. 可在执行过程中取消 (不考虑这种情况,一般不会出现这种情况)\n 没在执行状态,直接删除\n */\n//- (void) cancel; //cancel operation execute by manager\n\n/**\n 返回一个作用相反的任务\n */\n- (RTJob*) inverseJob;\n\n\n@end\n" (ERROR) "@" (type_identifier) "interface" (ERROR) "RTJob : NSObject <NSCoding>\n\n//任务的主类型,相反的任务通过type来区分\n@property (strong, nonatomic) NSStr" (identifier) "RTJob" (:) ":" (identifier) "NSObject" (<) "<" (identifier) "NSCoding" (>) ">" (comment) "//任务的主类型,相反的任务通过type来区分\n@property (strong, nonatomic) NSS" (ERROR) "r" (function_declarator) "ing *type;\n\n//任务标识, 相反的任务或相同" (identifier) "ing *typ" (parameter_list) ";\n\n//任务标识, 相反的任务或相同" (() ";" (identifier) "\n\n//任务" (,) "标" (identifier) ", 相反的任务或相" ()) "同" (declaration) "任务都应该有相同的identi" (type_identifier) "任务都应该有相同" (pointer_declarator) "ident" (*) "i" (identifier) "dent" (;) "i" (comment) "er\n@property (strong, nonatomic) NSString *identifier;\n\n//创建任务的时间,单位:秒\n@property" (ERROR) "(" (ERROR) "(" (declaration) "assign, nonatomic) NSTimeInterval createdTime;\n\n//" (macro_type_specifier) "assign, nonatomic) NSTimeInt" (identifier) "assign, " (() "o" (ERROR) "natomic" (type_descriptor) "natomi" (type_identifier) "natomi" (,) "c" (type_descriptor) " NSTimeIn" (type_identifier) " NSTimeIn" ()) "t" (ERROR) "rval cre" (identifier) "rval cre" (pointer_declarator) "tedTime;\n\n/" (*) "t" (identifier) "edTime;\n\n/" (;) "/" (comment) "码,当遇到该错误码时,取消任务\n@property (assign, non" (ERROR) "t" (ERROR) "t" (declaration) "omic) int errorCode;\n\n//剩余重试次数,超过次数,取消任务,次数为0,只能等待下一次重启运" (macro_type_specifier) "omic) int errorCode;\n\n//剩余重试" (identifier) "omic) in" (() " " (ERROR) "errorCo" (type_descriptor) "errorC" (type_identifier) "errorC" (,) "o" (type_descriptor) "e;\n\n//剩余重" (type_identifier) "e;\n\n//剩余重" ()) "试" (identifier) "数,超过次数,取消任务,次数" (ERROR) "0,只能等待下一次重启" (identifier) "0,只能等待下一次重启" (;) "运" (comment) "环才能重试\n@property (assign, nonatomic) int retryTimes;\n\n" (ERROR) "/" (ERROR) "/" (declaration) "APP退出时,是否保存任务\n@property (assign, nonatomic)" (macro_type_specifier) "APP退出时,是否保存任务\n@property (ass" (identifier) "APP退出时,是" (() "保" (ERROR) "存任务\n@pr" (type_descriptor) "存任务\n@p" (type_identifier) "存任务\n@p" (,) "r" (type_descriptor) "perty (as" (type_identifier) "perty (as" ()) "s" (ERROR) "gn," (identifier) "gn," (identifier) "nonatomic" (;) ")" (comment) "OOL shouldSaved;\n\n//是否可以取消,是否存在存在相反的操作,如点赞,取消点赞,点赞....相邻两个任务是可抵消的\n//相反的两种任务都可取消\n@property (assign, nonatomic) BOOL ca" (ERROR) "c" (ERROR) "c" (declaration) "ellable;\n\n//是否可重复,如果为NO,此时队列中存在相同的任务,则删除队列中原" (macro_type_specifier) "ellable;\n\n//是否可重复,如果为NO,此时队列" (identifier) "ellable;" (() "\n" (ERROR) "//是否可重复" (type_descriptor) "//是否可重" (type_identifier) "//是否可重" (,) "复" (type_descriptor) "如果为NO,此时队" (type_identifier) "如果为NO,此时队" ()) "列" (ERROR) "存在相" (identifier) "存在相" (identifier) "的任务,则删除队列中" (;) "原" (comment) "任务,以最新的任务为主\n//如对于同一张照片:点赞->点赞 = 点赞(" (ERROR) "然" (ERROR) "然" (declaration) "一般不会发生的,但点击速度快于状态改变速度,还是有可能的)\n@property (assig" (macro_type_specifier) "一般不会发生的,但点击速度快于状态改变速度,还是有可能的" (identifier) "一般不会发生的," (() "点" (ERROR) "击速度快于状态" (type_descriptor) "击速度快于状" (type_identifier) "击速度快于状" (,) "态" (type_descriptor) "变速度,还是有可能" (type_identifier) "变速度,还是有可能" ()) "的" (ERROR) "\n@pr" (identifier) "\n@pr" (identifier) "perty (assi" (;) "g" (comment) " nonatomic) BOOL repeative;\n\n//执行该任务需要的环境,状态,条件,参数等\n@property (strong, nonatomic) NSDictionary *parameters;\n\n//是否在执行\n@property " (comment) "assign, nonatomic) BOOL executing;\n" (ERROR) "/" (ERROR) "/" (declaration) "/比较两个任务是否相等\n- (BOOL) isEqual:(RTJob*)job;\n\n/**" (macro_type_specifier) "/比较两个任务是否相等\n- (BOOL) isEqual" (identifier) "/比较两个任务是" (() "相" (ERROR) "等\n- (BO" (type_descriptor) "等\n- (B" (type_identifier) "等\n- (B" (,) "O" (type_descriptor) "L) isEqua" (type_identifier) "L) isEqua" ()) "l" (ERROR) "(RTJ" (identifier) "(RTJ" (identifier) "b*)job;\n\n/*" (;) "*" (comment) "比较两个任务,判断它们是否可以相互抵消\n */\n- (BOOL) isInverse:(RTJob*)job;\n\n\n/*****************************************************************\\n 子类必须重载" (comment) "下方法:\n 1.[executeInQueue:withBlock:]\n 2.[inverseJob]\n > 存在相反的任务,且必须通过执行相反的动作来达到取消的目的的时候\n > 一般不用考虑\n\************************************************" (ERROR) "*" (ERROR) "*" (declaration) "***************/\n\n/**\n 执行任务\n status:任务执行结束的状" (macro_type_specifier) "***************/\n\n/**\n 执行任务\n" (identifier) "********" (() "*" (ERROR) "*****/\n" (type_descriptor) "*****/" (type_identifier) "*****/" (,) "\n" (type_descriptor) "/**\n 执行任务" (type_identifier) "/**\n 执行任务" ()) "\n" (ERROR) "stat" (identifier) "stat" (identifier) "s:任务执行结束的" (;) "状" (comment) " 0表示成功,其他的表示失败\n 如果status与errorCode相等,取消任务\n 子类重载方式:\n - (void) e" (ERROR) "e" (ERROR) "e" (declaration) "cuteInQueue:(dispatch_queue_t)queue withBlock:(void(^)" (macro_type_specifier) "cuteInQueue:(dispatch_queue_" (identifier) "cuteInQu" (() "u" (ERROR) "e:(disp" (type_descriptor) "e:(dis" (type_identifier) "e:(dis" (,) "p" (type_descriptor) "tch_queue" (type_identifier) "tch_queue" ()) "_" (ERROR) ")queue withB" (identifier) ")queue withB" (pointer_declarator) "ock:(void(^" (*) "o" (identifier) "ck:(void(^" (;) ")" (comment) "nt status))block{" (ERROR) " " (ERROR) " " (declaration) " [super executeInQueue:queue withBlock:^(i" (macro_type_specifier) " [super executeInQueue:que" (identifier) " [supe" (() " " (ERROR) "execute" (type_descriptor) "execut" (type_identifier) "execut" (,) "e" (type_descriptor) "nQueue:qu" (type_identifier) "nQueue:qu" ()) "e" (ERROR) "e wi" (identifier) "e wi" (identifier) "hBlock:^(" (;) "i" (comment) " sta) {\n if(sta == 0) {\n " (ERROR) " " (-) " " (() " " (declaration) " sta = [self action." (type_identifier) " " (ERROR) " sta = [self act" ()) " " (identifier) " sta = " (:) "[" (() "s" (identifier) "elf a" (*) "c" ()) "t" (identifier) "ion" (;) "." (comment) "];\n }\n dispatch_async(queue, ^{\n block(st" (ERROR) ");\n" (-) ")" (() "\n" (declaration) " ]);\n }];\n }\n */\n-" (type_identifier) " " (ERROR) " ]);\n }];\n }\n " ()) " " (identifier) " ]);\n " (:) " " (() "}" (identifier) "];\n }" (*) "\n" ()) " " (identifier) "*/\n" (;) "-" (comment) "oid) executeInQueue:(dispatch_queue_t)queue withBlock:(void(^)(int status))block;\n\n/**\n 如果在执行的时候取消,则会遇到以下几种情况:\n 1. 必须忽略取消操作\n 2. 必须等到当前执行结束,才能执行取消操作\n 2.1 执行成功,则执行相反任务\n 2.2 执行失败,删除任务\n 3. 可在执行过程中取消 (不考虑这种情况,一般不会出现这种情况)\n 没在执行状态,直接删除\n */\n//- (void) cancel; //cancel operation execute by manager\n\n/**\n 返回一个作用相反的任务\n */\n- (RTJo" (comment) ") inverseJob;\n\n\n@end\n" (ERROR) "" (-) "" (() "" (primitive_type) "" (ERROR) "" ()) "" (identifier) "" (:) "" (() "" (identifier) "" ()) "" (identifier) "" (identifier) "" (:) "" (() "" (primitive_type) "" (() "" (^) "" ()) "" (() "" (declaration) "" (primitive_type) "" (identifier) "" (ERROR) "" ()) "" ()) "" (identifier) "" (;) "" (comment) "" (comment) "" (comment) "" (ERROR) "" (-) "" (() "" (declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (ERROR) "" ()) "" (identifier) "" (;) "" (ERROR) "" (ERROR) "" (identifier) ""
278
51
{"language": "c", "success": true, "metadata": {"lines": 77, "avg_line_length": 29.44, "nodes": 185, "errors": 0, "source_hash": "d607273478a6fb83793d9d4ab1b5ec82ae4cb940835035af0b7422dda13a4c6b", "categorized_nodes": 96}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <Foundation/Foundation.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "<Foundation/Foundation.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 33}}, {"id": 3, "type": "ERROR", "text": "@interface RTJob : NSObject <NSCoding>\n\n//\u4efb\u52a1\u7684\u4e3b\u7c7b\u578b\uff0c\u76f8\u53cd\u7684\u4efb\u52a1\u901a\u8fc7type\u6765\u533a\u5206\n@property (strong, nonatomic) NSString *type;\n\n//\u4efb\u52a1\u6807\u8bc6, \u76f8\u53cd\u7684\u4efb\u52a1\u6216\u76f8\u540c\u7684\u4efb\u52a1\u90fd\u5e94\u8be5\u6709\u76f8\u540c\u7684identifier\n@property (strong, nonatomic) NSString *identifier;\n\n//\u521b\u5efa\u4efb\u52a1\u7684\u65f6\u95f4\uff0c\u5355\u4f4d\uff1a\u79d2\n@property (assign, nonatomic) NSTimeInterval createdTime;\n\n//\u9519\u8bef\u7801\uff0c\u5f53\u9047\u5230\u8be5\u9519\u8bef\u7801\u65f6\uff0c\u53d6\u6d88\u4efb\u52a1\n@property (assign, nonatomic) int errorCode;\n\n//\u5269\u4f59\u91cd\u8bd5\u6b21\u6570\uff0c\u8d85\u8fc7\u6b21\u6570\uff0c\u53d6\u6d88\u4efb\u52a1\uff0c\u6b21\u6570\u4e3a0\uff0c\u53ea\u80fd\u7b49\u5f85\u4e0b\u4e00\u6b21\u91cd\u542f\u8fd0\u884c\u5faa\u73af\u624d\u80fd\u91cd\u8bd5\n@property (assign, nonatomic) int retryTimes;\n\n//APP\u9000\u51fa\u65f6\uff0c\u662f\u5426\u4fdd\u5b58\u4efb\u52a1\n@property (assign, nonatomic) BOOL shouldSaved;\n\n//\u662f\u5426\u53ef\u4ee5\u53d6\u6d88\uff0c\u662f\u5426\u5b58\u5728\u5b58\u5728\u76f8\u53cd\u7684\u64cd\u4f5c,\u5982\u70b9\u8d5e\uff0c\u53d6\u6d88\u70b9\u8d5e\uff0c\u70b9\u8d5e....\u76f8\u90bb\u4e24\u4e2a\u4efb\u52a1\u662f\u53ef\u62b5\u6d88\u7684\n//\u76f8\u53cd\u7684\u4e24\u79cd\u4efb\u52a1\u90fd\u53ef\u53d6\u6d88\n@property (assign, nonatomic) BOOL cancellable;\n\n//\u662f\u5426\u53ef\u91cd\u590d\uff0c\u5982\u679c\u4e3aNO\uff0c\u6b64\u65f6\u961f\u5217\u4e2d\u5b58\u5728\u76f8\u540c\u7684\u4efb\u52a1\uff0c\u5219\u5220\u9664\u961f\u5217\u4e2d\u539f\u6765\u7684\u4efb\u52a1\uff0c\u4ee5\u6700\u65b0\u7684\u4efb\u52a1\u4e3a\u4e3b\n//\u5982\u5bf9\u4e8e\u540c\u4e00\u5f20\u7167\u7247\uff1a\u70b9\u8d5e\uff0d>\u70b9\u8d5e \uff1d \u70b9\u8d5e\uff08\u867d\u7136\u4e00\u822c\u4e0d\u4f1a\u53d1\u751f\u7684\uff0c\u4f46\u70b9\u51fb\u901f\u5ea6\u5feb\u4e8e\u72b6\u6001\u6539\u53d8\u901f\u5ea6\uff0c\u8fd8\u662f\u6709\u53ef\u80fd\u7684\uff09\n@property (assign, nonatomic) BOOL repeative;\n\n//\u6267\u884c\u8be5\u4efb\u52a1\u9700\u8981\u7684\u73af\u5883\uff0c\u72b6\u6001\uff0c\u6761\u4ef6\uff0c\u53c2\u6570\u7b49\n@property (strong, nonatomic) NSDictionary *parameters;\n\n//\u662f\u5426\u5728\u6267\u884c\n@property (assign, nonatomic) BOOL executing;\n\n//\u6bd4\u8f83\u4e24\u4e2a\u4efb\u52a1\u662f\u5426\u76f8\u7b49\n- (BOOL) isEqual:(RTJob*)job;\n\n/**\n \u6bd4\u8f83\u4e24\u4e2a\u4efb\u52a1\uff0c\u5224\u65ad\u5b83\u4eec\u662f\u5426\u53ef\u4ee5\u76f8\u4e92\u62b5\u6d88\n */\n- (BOOL) isInverse:(RTJob*)job;\n\n\n/*****************************************************************\\\n \u5b50\u7c7b\u5fc5\u987b\u91cd\u8f7d\u4ee5\u4e0b\u65b9\u6cd5\uff1a\n 1.[executeInQueue:withBlock:]\n 2.[inverseJob]\n > \u5b58\u5728\u76f8\u53cd\u7684\u4efb\u52a1\uff0c\u4e14\u5fc5\u987b\u901a\u8fc7\u6267\u884c\u76f8\u53cd\u7684\u52a8\u4f5c\u6765\u8fbe\u5230\u53d6\u6d88\u7684\u76ee\u7684\u7684\u65f6\u5019\n > \u4e00\u822c\u4e0d\u7528\u8003\u8651\n\\*****************************************************************/\n\n/**\n \u6267\u884c\u4efb\u52a1\n status\uff1a\u4efb\u52a1\u6267\u884c\u7ed3\u675f\u7684\u72b6\u6001\n 0\u8868\u793a\u6210\u529f\uff0c\u5176\u4ed6\u7684\u8868\u793a\u5931\u8d25\n \u5982\u679cstatus\u4e0eerrorCode\u76f8\u7b49\uff0c\u53d6\u6d88\u4efb\u52a1\n \u5b50\u7c7b\u91cd\u8f7d\u65b9\u5f0f\uff1a\n - (void) executeInQueue:(dispatch_queue_t)queue withBlock:(void(^)(int status))block{\n [super executeInQueue:queue withBlock:^(int sta) {\n if(sta == 0) {\n sta = [self action...];\n }\n dispatch_async(queue, ^{\n block(sta);\n ]);\n }];\n }\n */\n- (void) executeInQueue:(dispatch_queue_t)queue withBlock:(void(^)(int status))block;\n\n/**\n \u5982\u679c\u5728\u6267\u884c\u7684\u65f6\u5019\u53d6\u6d88\uff0c\u5219\u4f1a\u9047\u5230\u4ee5\u4e0b\u51e0\u79cd\u60c5\u51b5\uff1a\n 1. \u5fc5\u987b\u5ffd\u7565\u53d6\u6d88\u64cd\u4f5c\n 2. \u5fc5\u987b\u7b49\u5230\u5f53\u524d\u6267\u884c\u7ed3\u675f\uff0c\u624d\u80fd\u6267\u884c\u53d6\u6d88\u64cd\u4f5c\n 2.1 \u6267\u884c\u6210\u529f\uff0c\u5219\u6267\u884c\u76f8\u53cd\u4efb\u52a1\n 2.2 \u6267\u884c\u5931\u8d25\uff0c\u5220\u9664\u4efb\u52a1\n 3. \u53ef\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u53d6\u6d88 (\u4e0d\u8003\u8651\u8fd9\u79cd\u60c5\u51b5\uff0c\u4e00\u822c\u4e0d\u4f1a\u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5)\n \u6ca1\u5728\u6267\u884c\u72b6\u6001\uff0c\u76f4\u63a5\u5220\u9664\n */\n//- (void) cancel; //cancel operation execute by manager\n\n/**\n \u8fd4\u56de\u4e00\u4e2a\u4f5c\u7528\u76f8\u53cd\u7684\u4efb\u52a1\n */\n- (RTJob*) inverseJob;\n\n\n@end\n", "parent": null, "children": [4, 5, 6, 13, 18, 23, 36, 38, 49, 51, 62, 64, 75, 77, 88, 90, 101, 103, 114, 116, 129, 131, 142, 144, 151, 152, 159, 169, 174, 176, 182, 184], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 95, "column": 4}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "interface", "parent": 3, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 10}}, {"id": 6, "type": "ERROR", "text": "RTJob : NSObject <NSCoding>\n\n//\u4efb\u52a1\u7684\u4e3b\u7c7b\u578b\uff0c\u76f8\u53cd\u7684\u4efb\u52a1\u901a\u8fc7type\u6765\u533a\u5206\n@property (strong, nonatomic) NSStr", "parent": 3, "children": [7, 8, 9, 10, 11, 12], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 11, "column": 1}}, {"id": 7, "type": "identifier", "text": "RTJob", "parent": 6, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 16}}, {"id": 8, "type": "identifier", "text": "NSObject", "parent": 6, "children": [], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 27}}, {"id": 9, "type": "<", "text": "<", "parent": 6, "children": [], "start_point": {"row": 8, "column": 28}, "end_point": {"row": 8, "column": 29}}, {"id": 10, "type": "identifier", "text": "NSCoding", "parent": 6, "children": [], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 37}}, {"id": 11, "type": ">", "text": ">", "parent": 6, "children": [], "start_point": {"row": 8, "column": 37}, "end_point": {"row": 8, "column": 38}}, {"id": 12, "type": "ERROR", "text": "r", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 13, "type": "function_declarator", "text": "ing *type;\n\n//\u4efb\u52a1\u6807\u8bc6, \u76f8\u53cd\u7684\u4efb\u52a1\u6216\u76f8\u540c", "parent": 3, "children": [14, 15], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 29}}, {"id": 14, "type": "identifier", "text": "ing *typ", "parent": 13, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 9}}, {"id": 15, "type": "parameter_list", "text": ";\n\n//\u4efb\u52a1\u6807\u8bc6, \u76f8\u53cd\u7684\u4efb\u52a1\u6216\u76f8\u540c", "parent": 13, "children": [16, 17], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 29}}, {"id": 16, "type": "identifier", "text": "\n\n//\u4efb\u52a1", "parent": 15, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 17}}, {"id": 17, "type": "identifier", "text": ", \u76f8\u53cd\u7684\u4efb\u52a1\u6216\u76f8", "parent": 15, "children": [], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 28}}, {"id": 18, "type": "declaration", "text": "\u4efb\u52a1\u90fd\u5e94\u8be5\u6709\u76f8\u540c\u7684identi", "parent": 3, "children": [19, 20], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 45}}, {"id": 19, "type": "type_identifier", "text": "\u4efb\u52a1\u90fd\u5e94\u8be5\u6709\u76f8\u540c", "parent": 18, "children": [], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 38}}, {"id": 20, "type": "pointer_declarator", "text": "ident", "parent": 18, "children": [21, 22], "start_point": {"row": 11, "column": 39}, "end_point": {"row": 11, "column": 44}}, {"id": 21, "type": "*", "text": "i", "parent": 20, "children": [], "start_point": {"row": 11, "column": 39}, "end_point": {"row": 11, "column": 40}}, {"id": 22, "type": "identifier", "text": "dent", "parent": 20, "children": [], "start_point": {"row": 11, "column": 40}, "end_point": {"row": 11, "column": 44}}, {"id": 23, "type": "declaration", "text": "assign, nonatomic) NSTimeInterval createdTime;\n\n//", "parent": 3, "children": [24, 31, 33], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 51}}, {"id": 24, "type": "macro_type_specifier", "text": "assign, nonatomic) NSTimeInt", "parent": 23, "children": [25, 26, 29], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 29}}, {"id": 25, "type": "identifier", "text": "assign, ", "parent": 24, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 26, "type": "ERROR", "text": "natomic", "parent": 24, "children": [27], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 18}}, {"id": 27, "type": "type_descriptor", "text": "natomi", "parent": 26, "children": [28], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 17}}, {"id": 28, "type": "type_identifier", "text": "natomi", "parent": 27, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 17}}, {"id": 29, "type": "type_descriptor", "text": " NSTimeIn", "parent": 24, "children": [30], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 28}}, {"id": 30, "type": "type_identifier", "text": " NSTimeIn", "parent": 29, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 28}}, {"id": 31, "type": "ERROR", "text": "rval cre", "parent": 23, "children": [32], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 38}}, {"id": 32, "type": "identifier", "text": "rval cre", "parent": 31, "children": [], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 38}}, {"id": 33, "type": "pointer_declarator", "text": "tedTime;\n\n/", "parent": 23, "children": [34, 35], "start_point": {"row": 14, "column": 39}, "end_point": {"row": 14, "column": 50}}, {"id": 34, "type": "*", "text": "t", "parent": 33, "children": [], "start_point": {"row": 14, "column": 39}, "end_point": {"row": 14, "column": 40}}, {"id": 35, "type": "identifier", "text": "edTime;\n\n/", "parent": 33, "children": [], "start_point": {"row": 14, "column": 40}, "end_point": {"row": 14, "column": 50}}, {"id": 36, "type": "ERROR", "text": "t", "parent": 3, "children": [37], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 37, "type": "ERROR", "text": "t", "parent": 36, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 38, "type": "declaration", "text": "omic) int errorCode;\n\n//\u5269\u4f59\u91cd\u8bd5\u6b21\u6570\uff0c\u8d85\u8fc7\u6b21\u6570\uff0c\u53d6\u6d88\u4efb\u52a1\uff0c\u6b21\u6570\u4e3a0\uff0c\u53ea\u80fd\u7b49\u5f85\u4e0b\u4e00\u6b21\u91cd\u542f\u8fd0", "parent": 3, "children": [39, 46, 47], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 57}}, {"id": 39, "type": "macro_type_specifier", "text": "omic) int errorCode;\n\n//\u5269\u4f59\u91cd\u8bd5", "parent": 38, "children": [40, 41, 44], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 29}}, {"id": 40, "type": "identifier", "text": "omic) in", "parent": 39, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 9}}, {"id": 41, "type": "ERROR", "text": "errorCo", "parent": 39, "children": [42], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 18}}, {"id": 42, "type": "type_descriptor", "text": "errorC", "parent": 41, "children": [43], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 17}}, {"id": 43, "type": "type_identifier", "text": "errorC", "parent": 42, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 17}}, {"id": 44, "type": "type_descriptor", "text": "e;\n\n//\u5269\u4f59\u91cd", "parent": 39, "children": [45], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 28}}, {"id": 45, "type": "type_identifier", "text": "e;\n\n//\u5269\u4f59\u91cd", "parent": 44, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 28}}, {"id": 46, "type": "identifier", "text": "\u6570\uff0c\u8d85\u8fc7\u6b21\u6570\uff0c\u53d6\u6d88\u4efb\u52a1\uff0c\u6b21\u6570", "parent": 38, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 44}}, {"id": 47, "type": "ERROR", "text": "0\uff0c\u53ea\u80fd\u7b49\u5f85\u4e0b\u4e00\u6b21\u91cd\u542f", "parent": 38, "children": [48], "start_point": {"row": 17, "column": 45}, "end_point": {"row": 17, "column": 56}}, {"id": 48, "type": "identifier", "text": "0\uff0c\u53ea\u80fd\u7b49\u5f85\u4e0b\u4e00\u6b21\u91cd\u542f", "parent": 47, "children": [], "start_point": {"row": 17, "column": 45}, "end_point": {"row": 17, "column": 56}}, {"id": 49, "type": "ERROR", "text": "/", "parent": 3, "children": [50], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 50, "type": "ERROR", "text": "/", "parent": 49, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 51, "type": "declaration", "text": "APP\u9000\u51fa\u65f6\uff0c\u662f\u5426\u4fdd\u5b58\u4efb\u52a1\n@property (assign, nonatomic)", "parent": 3, "children": [52, 59, 61], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 44}}, {"id": 52, "type": "macro_type_specifier", "text": "APP\u9000\u51fa\u65f6\uff0c\u662f\u5426\u4fdd\u5b58\u4efb\u52a1\n@property (ass", "parent": 51, "children": [53, 54, 57], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 29}}, {"id": 53, "type": "identifier", "text": "APP\u9000\u51fa\u65f6\uff0c\u662f", "parent": 52, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 54, "type": "ERROR", "text": "\u5b58\u4efb\u52a1\n@pr", "parent": 52, "children": [55], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 18}}, {"id": 55, "type": "type_descriptor", "text": "\u5b58\u4efb\u52a1\n@p", "parent": 54, "children": [56], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 17}}, {"id": 56, "type": "type_identifier", "text": "\u5b58\u4efb\u52a1\n@p", "parent": 55, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 17}}, {"id": 57, "type": "type_descriptor", "text": "perty (as", "parent": 52, "children": [58], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 28}}, {"id": 58, "type": "type_identifier", "text": "perty (as", "parent": 57, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 28}}, {"id": 59, "type": "ERROR", "text": "gn,", "parent": 51, "children": [60], "start_point": {"row": 20, "column": 30}, "end_point": {"row": 20, "column": 33}}, {"id": 60, "type": "identifier", "text": "gn,", "parent": 59, "children": [], "start_point": {"row": 20, "column": 30}, "end_point": {"row": 20, "column": 33}}, {"id": 61, "type": "identifier", "text": "nonatomic", "parent": 51, "children": [], "start_point": {"row": 20, "column": 34}, "end_point": {"row": 20, "column": 43}}, {"id": 62, "type": "ERROR", "text": "c", "parent": 3, "children": [63], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 63, "type": "ERROR", "text": "c", "parent": 62, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 64, "type": "declaration", "text": "ellable;\n\n//\u662f\u5426\u53ef\u91cd\u590d\uff0c\u5982\u679c\u4e3aNO\uff0c\u6b64\u65f6\u961f\u5217\u4e2d\u5b58\u5728\u76f8\u540c\u7684\u4efb\u52a1\uff0c\u5219\u5220\u9664\u961f\u5217\u4e2d\u539f", "parent": 3, "children": [65, 72, 74], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 45}}, {"id": 65, "type": "macro_type_specifier", "text": "ellable;\n\n//\u662f\u5426\u53ef\u91cd\u590d\uff0c\u5982\u679c\u4e3aNO\uff0c\u6b64\u65f6\u961f\u5217", "parent": 64, "children": [66, 67, 70], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 29}}, {"id": 66, "type": "identifier", "text": "ellable;", "parent": 65, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 67, "type": "ERROR", "text": "//\u662f\u5426\u53ef\u91cd\u590d", "parent": 65, "children": [68], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 18}}, {"id": 68, "type": "type_descriptor", "text": "//\u662f\u5426\u53ef\u91cd", "parent": 67, "children": [69], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 17}}, {"id": 69, "type": "type_identifier", "text": "//\u662f\u5426\u53ef\u91cd", "parent": 68, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 17}}, {"id": 70, "type": "type_descriptor", "text": "\u5982\u679c\u4e3aNO\uff0c\u6b64\u65f6\u961f", "parent": 65, "children": [71], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 28}}, {"id": 71, "type": "type_identifier", "text": "\u5982\u679c\u4e3aNO\uff0c\u6b64\u65f6\u961f", "parent": 70, "children": [], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 28}}, {"id": 72, "type": "ERROR", "text": "\u5b58\u5728\u76f8", "parent": 64, "children": [73], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 33}}, {"id": 73, "type": "identifier", "text": "\u5b58\u5728\u76f8", "parent": 72, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 33}}, {"id": 74, "type": "identifier", "text": "\u7684\u4efb\u52a1\uff0c\u5219\u5220\u9664\u961f\u5217\u4e2d", "parent": 64, "children": [], "start_point": {"row": 23, "column": 34}, "end_point": {"row": 23, "column": 44}}, {"id": 75, "type": "ERROR", "text": "\u7136", "parent": 3, "children": [76], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 76, "type": "ERROR", "text": "\u7136", "parent": 75, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 77, "type": "declaration", "text": "\u4e00\u822c\u4e0d\u4f1a\u53d1\u751f\u7684\uff0c\u4f46\u70b9\u51fb\u901f\u5ea6\u5feb\u4e8e\u72b6\u6001\u6539\u53d8\u901f\u5ea6\uff0c\u8fd8\u662f\u6709\u53ef\u80fd\u7684\uff09\n@property (assig", "parent": 3, "children": [78, 85, 87], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 47}}, {"id": 78, "type": "macro_type_specifier", "text": "\u4e00\u822c\u4e0d\u4f1a\u53d1\u751f\u7684\uff0c\u4f46\u70b9\u51fb\u901f\u5ea6\u5feb\u4e8e\u72b6\u6001\u6539\u53d8\u901f\u5ea6\uff0c\u8fd8\u662f\u6709\u53ef\u80fd\u7684", "parent": 77, "children": [79, 80, 83], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 29}}, {"id": 79, "type": "identifier", "text": "\u4e00\u822c\u4e0d\u4f1a\u53d1\u751f\u7684\uff0c", "parent": 78, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 9}}, {"id": 80, "type": "ERROR", "text": "\u51fb\u901f\u5ea6\u5feb\u4e8e\u72b6\u6001", "parent": 78, "children": [81], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 18}}, {"id": 81, "type": "type_descriptor", "text": "\u51fb\u901f\u5ea6\u5feb\u4e8e\u72b6", "parent": 80, "children": [82], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 17}}, {"id": 82, "type": "type_identifier", "text": "\u51fb\u901f\u5ea6\u5feb\u4e8e\u72b6", "parent": 81, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 17}}, {"id": 83, "type": "type_descriptor", "text": "\u53d8\u901f\u5ea6\uff0c\u8fd8\u662f\u6709\u53ef\u80fd", "parent": 78, "children": [84], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 28}}, {"id": 84, "type": "type_identifier", "text": "\u53d8\u901f\u5ea6\uff0c\u8fd8\u662f\u6709\u53ef\u80fd", "parent": 83, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 28}}, {"id": 85, "type": "ERROR", "text": "\n@pr", "parent": 77, "children": [86], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 34}}, {"id": 86, "type": "identifier", "text": "\n@pr", "parent": 85, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 34}}, {"id": 87, "type": "identifier", "text": "perty (assi", "parent": 77, "children": [], "start_point": {"row": 26, "column": 35}, "end_point": {"row": 26, "column": 46}}, {"id": 88, "type": "ERROR", "text": "/", "parent": 3, "children": [89], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 89, "type": "ERROR", "text": "/", "parent": 88, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 90, "type": "declaration", "text": "/\u6bd4\u8f83\u4e24\u4e2a\u4efb\u52a1\u662f\u5426\u76f8\u7b49\n- (BOOL) isEqual:(RTJob*)job;\n\n/**", "parent": 3, "children": [91, 98, 100], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 47}}, {"id": 91, "type": "macro_type_specifier", "text": "/\u6bd4\u8f83\u4e24\u4e2a\u4efb\u52a1\u662f\u5426\u76f8\u7b49\n- (BOOL) isEqual", "parent": 90, "children": [92, 93, 96], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 29}}, {"id": 92, "type": "identifier", "text": "/\u6bd4\u8f83\u4e24\u4e2a\u4efb\u52a1\u662f", "parent": 91, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 9}}, {"id": 93, "type": "ERROR", "text": "\u7b49\n- (BO", "parent": 91, "children": [94], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 18}}, {"id": 94, "type": "type_descriptor", "text": "\u7b49\n- (B", "parent": 93, "children": [95], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 17}}, {"id": 95, "type": "type_identifier", "text": "\u7b49\n- (B", "parent": 94, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 17}}, {"id": 96, "type": "type_descriptor", "text": "L) isEqua", "parent": 91, "children": [97], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 28}}, {"id": 97, "type": "type_identifier", "text": "L) isEqua", "parent": 96, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 28}}, {"id": 98, "type": "ERROR", "text": "(RTJ", "parent": 90, "children": [99], "start_point": {"row": 30, "column": 30}, "end_point": {"row": 30, "column": 34}}, {"id": 99, "type": "identifier", "text": "(RTJ", "parent": 98, "children": [], "start_point": {"row": 30, "column": 30}, "end_point": {"row": 30, "column": 34}}, {"id": 100, "type": "identifier", "text": "b*)job;\n\n/*", "parent": 90, "children": [], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 46}}, {"id": 101, "type": "ERROR", "text": "*", "parent": 3, "children": [102], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 102, "type": "ERROR", "text": "*", "parent": 101, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 103, "type": "declaration", "text": "***************/\n\n/**\n \u6267\u884c\u4efb\u52a1\n status\uff1a\u4efb\u52a1\u6267\u884c\u7ed3\u675f\u7684\u72b6", "parent": 3, "children": [104, 111, 113], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 45}}, {"id": 104, "type": "macro_type_specifier", "text": "***************/\n\n/**\n \u6267\u884c\u4efb\u52a1\n", "parent": 103, "children": [105, 106, 109], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 29}}, {"id": 105, "type": "identifier", "text": "********", "parent": 104, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 9}}, {"id": 106, "type": "ERROR", "text": "*****/\n", "parent": 104, "children": [107], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 18}}, {"id": 107, "type": "type_descriptor", "text": "*****/", "parent": 106, "children": [108], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 17}}, {"id": 108, "type": "type_identifier", "text": "*****/", "parent": 107, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 17}}, {"id": 109, "type": "type_descriptor", "text": "/**\n \u6267\u884c\u4efb\u52a1", "parent": 104, "children": [110], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 28}}, {"id": 110, "type": "type_identifier", "text": "/**\n \u6267\u884c\u4efb\u52a1", "parent": 109, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 28}}, {"id": 111, "type": "ERROR", "text": "stat", "parent": 103, "children": [112], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 34}}, {"id": 112, "type": "identifier", "text": "stat", "parent": 111, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 34}}, {"id": 113, "type": "identifier", "text": "s\uff1a\u4efb\u52a1\u6267\u884c\u7ed3\u675f\u7684", "parent": 103, "children": [], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 44}}, {"id": 114, "type": "ERROR", "text": "e", "parent": 3, "children": [115], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 115, "type": "ERROR", "text": "e", "parent": 114, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 116, "type": "declaration", "text": "cuteInQueue:(dispatch_queue_t)queue withBlock:(void(^)", "parent": 3, "children": [117, 124, 126], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 55}}, {"id": 117, "type": "macro_type_specifier", "text": "cuteInQueue:(dispatch_queue_", "parent": 116, "children": [118, 119, 122], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 29}}, {"id": 118, "type": "identifier", "text": "cuteInQu", "parent": 117, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 9}}, {"id": 119, "type": "ERROR", "text": "e:(disp", "parent": 117, "children": [120], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 18}}, {"id": 120, "type": "type_descriptor", "text": "e:(dis", "parent": 119, "children": [121], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 17}}, {"id": 121, "type": "type_identifier", "text": "e:(dis", "parent": 120, "children": [], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 17}}, {"id": 122, "type": "type_descriptor", "text": "tch_queue", "parent": 117, "children": [123], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 28}}, {"id": 123, "type": "type_identifier", "text": "tch_queue", "parent": 122, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 28}}, {"id": 124, "type": "ERROR", "text": ")queue withB", "parent": 116, "children": [125], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 42}}, {"id": 125, "type": "identifier", "text": ")queue withB", "parent": 124, "children": [], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 42}}, {"id": 126, "type": "pointer_declarator", "text": "ock:(void(^", "parent": 116, "children": [127, 128], "start_point": {"row": 37, "column": 43}, "end_point": {"row": 37, "column": 54}}, {"id": 127, "type": "*", "text": "o", "parent": 126, "children": [], "start_point": {"row": 37, "column": 43}, "end_point": {"row": 37, "column": 44}}, {"id": 128, "type": "identifier", "text": "ck:(void(^", "parent": 126, "children": [], "start_point": {"row": 37, "column": 44}, "end_point": {"row": 37, "column": 54}}, {"id": 129, "type": "ERROR", "text": " ", "parent": 3, "children": [130], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 130, "type": "ERROR", "text": " ", "parent": 129, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 131, "type": "declaration", "text": " [super executeInQueue:queue withBlock:^(i", "parent": 3, "children": [132, 139, 141], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 45}}, {"id": 132, "type": "macro_type_specifier", "text": " [super executeInQueue:que", "parent": 131, "children": [133, 134, 137], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 29}}, {"id": 133, "type": "identifier", "text": " [supe", "parent": 132, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 9}}, {"id": 134, "type": "ERROR", "text": "execute", "parent": 132, "children": [135], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 18}}, {"id": 135, "type": "type_descriptor", "text": "execut", "parent": 134, "children": [136], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 17}}, {"id": 136, "type": "type_identifier", "text": "execut", "parent": 135, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 17}}, {"id": 137, "type": "type_descriptor", "text": "nQueue:qu", "parent": 132, "children": [138], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 28}}, {"id": 138, "type": "type_identifier", "text": "nQueue:qu", "parent": 137, "children": [], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 28}}, {"id": 139, "type": "ERROR", "text": "e wi", "parent": 131, "children": [140], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 34}}, {"id": 140, "type": "identifier", "text": "e wi", "parent": 139, "children": [], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 34}}, {"id": 141, "type": "identifier", "text": "hBlock:^(", "parent": 131, "children": [], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 44}}, {"id": 142, "type": "ERROR", "text": " ", "parent": 3, "children": [143], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 3}}, {"id": 143, "type": "-", "text": " ", "parent": 142, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 144, "type": "declaration", "text": " sta = [self action.", "parent": 3, "children": [145, 146, 150], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 29}}, {"id": 145, "type": "type_identifier", "text": " ", "parent": 144, "children": [], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 7}}, {"id": 146, "type": "ERROR", "text": " sta = [self act", "parent": 144, "children": [147, 148, 149], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 25}}, {"id": 147, "type": "identifier", "text": " sta = ", "parent": 146, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 16}}, {"id": 148, "type": "identifier", "text": "elf a", "parent": 146, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 23}}, {"id": 149, "type": "*", "text": "c", "parent": 146, "children": [], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 24}}, {"id": 150, "type": "identifier", "text": "ion", "parent": 144, "children": [], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 28}}, {"id": 151, "type": "ERROR", "text": ");\n", "parent": 3, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 3}}, {"id": 152, "type": "declaration", "text": " ]);\n }];\n }\n */\n-", "parent": 3, "children": [153, 154, 158], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 31}}, {"id": 153, "type": "type_identifier", "text": " ", "parent": 152, "children": [], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 7}}, {"id": 154, "type": "ERROR", "text": " ]);\n }];\n }\n ", "parent": 152, "children": [155, 156, 157], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 27}}, {"id": 155, "type": "identifier", "text": " ]);\n ", "parent": 154, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 18}}, {"id": 156, "type": "identifier", "text": "];\n }", "parent": 154, "children": [], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 25}}, {"id": 157, "type": "*", "text": "\n", "parent": 154, "children": [], "start_point": {"row": 48, "column": 25}, "end_point": {"row": 48, "column": 26}}, {"id": 158, "type": "identifier", "text": "*/\n", "parent": 152, "children": [], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 30}}, {"id": 159, "type": "ERROR", "text": "", "parent": 3, "children": [160, 161, 162, 166, 167, 168], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 67}}, {"id": 160, "type": "-", "text": "", "parent": 159, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 1}}, {"id": 161, "type": "primitive_type", "text": "", "parent": 159, "children": [], "start_point": {"row": 76, "column": 3}, "end_point": {"row": 76, "column": 7}}, {"id": 162, "type": "ERROR", "text": "", "parent": 159, "children": [163, 164, 165], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 47}}, {"id": 163, "type": "identifier", "text": "", "parent": 162, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 23}}, {"id": 164, "type": "identifier", "text": "", "parent": 162, "children": [], "start_point": {"row": 76, "column": 25}, "end_point": {"row": 76, "column": 41}}, {"id": 165, "type": "identifier", "text": "", "parent": 162, "children": [], "start_point": {"row": 76, "column": 42}, "end_point": {"row": 76, "column": 47}}, {"id": 166, "type": "identifier", "text": "", "parent": 159, "children": [], "start_point": {"row": 76, "column": 48}, "end_point": {"row": 76, "column": 57}}, {"id": 167, "type": "primitive_type", "text": "", "parent": 159, "children": [], "start_point": {"row": 76, "column": 59}, "end_point": {"row": 76, "column": 63}}, {"id": 168, "type": "^", "text": "", "parent": 159, "children": [], "start_point": {"row": 76, "column": 64}, "end_point": {"row": 76, "column": 65}}, {"id": 169, "type": "declaration", "text": "", "parent": 3, "children": [170, 171, 172], "start_point": {"row": 76, "column": 67}, "end_point": {"row": 76, "column": 85}}, {"id": 170, "type": "primitive_type", "text": "", "parent": 169, "children": [], "start_point": {"row": 76, "column": 67}, "end_point": {"row": 76, "column": 70}}, {"id": 171, "type": "identifier", "text": "", "parent": 169, "children": [], "start_point": {"row": 76, "column": 71}, "end_point": {"row": 76, "column": 77}}, {"id": 172, "type": "ERROR", "text": "", "parent": 169, "children": [173], "start_point": {"row": 76, "column": 77}, "end_point": {"row": 76, "column": 84}}, {"id": 173, "type": "identifier", "text": "", "parent": 172, "children": [], "start_point": {"row": 76, "column": 79}, "end_point": {"row": 76, "column": 84}}, {"id": 174, "type": "ERROR", "text": "", "parent": 3, "children": [175], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 3}}, {"id": 175, "type": "-", "text": "", "parent": 174, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 1}}, {"id": 176, "type": "declaration", "text": "", "parent": 3, "children": [177, 178], "start_point": {"row": 92, "column": 3}, "end_point": {"row": 92, "column": 22}}, {"id": 177, "type": "type_identifier", "text": "", "parent": 176, "children": [], "start_point": {"row": 92, "column": 3}, "end_point": {"row": 92, "column": 8}}, {"id": 178, "type": "pointer_declarator", "text": "", "parent": 176, "children": [179, 180, 181], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 21}}, {"id": 179, "type": "*", "text": "", "parent": 178, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 9}}, {"id": 180, "type": "ERROR", "text": "", "parent": 178, "children": [], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 10}}, {"id": 181, "type": "identifier", "text": "", "parent": 178, "children": [], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 21}}, {"id": 182, "type": "ERROR", "text": "", "parent": 3, "children": [183], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 1}}, {"id": 183, "type": "ERROR", "text": "", "parent": 182, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 1}}, {"id": 184, "type": "identifier", "text": "", "parent": 3, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 4}}]}, "node_categories": {"declarations": {"functions": [13], "variables": [18, 23, 38, 51, 64, 77, 90, 103, 116, 131, 144, 152, 169, 176], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 7, 8, 10, 14, 16, 17, 19, 22, 24, 25, 28, 30, 32, 35, 39, 40, 43, 45, 46, 48, 52, 53, 56, 58, 60, 61, 65, 66, 69, 71, 73, 74, 78, 79, 82, 84, 86, 87, 91, 92, 95, 97, 99, 100, 104, 105, 108, 110, 112, 113, 117, 118, 121, 123, 125, 128, 132, 133, 136, 138, 140, 141, 145, 147, 148, 150, 153, 155, 156, 158, 163, 164, 165, 166, 171, 173, 177, 181, 184], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 13, "universal_type": "function", "name": "unknown", "text_snippet": "ing *type;\n\n//\u4efb\u52a1\u6807\u8bc6, \u76f8\u53cd\u7684\u4efb\u52a1\u6216\u76f8\u540c"}], "class_declarations": [], "import_statements": []}, "original_source_code": "#import <Foundation/Foundation.h>\n\n/**\n * Some time-consuming operations, usually the network request.\n * The JobManager will do its best to make sure job executing successfully.\n * So, assume it had executed successfully before it really executes, \n * update the UI according to the success hypothesis.\n */\n@interface RTJob : NSObject <NSCoding>\n\n//\u4efb\u52a1\u7684\u4e3b\u7c7b\u578b\uff0c\u76f8\u53cd\u7684\u4efb\u52a1\u901a\u8fc7type\u6765\u533a\u5206\n@property (strong, nonatomic) NSString *type;\n\n//\u4efb\u52a1\u6807\u8bc6, \u76f8\u53cd\u7684\u4efb\u52a1\u6216\u76f8\u540c\u7684\u4efb\u52a1\u90fd\u5e94\u8be5\u6709\u76f8\u540c\u7684identifier\n@property (strong, nonatomic) NSString *identifier;\n\n//\u521b\u5efa\u4efb\u52a1\u7684\u65f6\u95f4\uff0c\u5355\u4f4d\uff1a\u79d2\n@property (assign, nonatomic) NSTimeInterval createdTime;\n\n//\u9519\u8bef\u7801\uff0c\u5f53\u9047\u5230\u8be5\u9519\u8bef\u7801\u65f6\uff0c\u53d6\u6d88\u4efb\u52a1\n@property (assign, nonatomic) int errorCode;\n\n//\u5269\u4f59\u91cd\u8bd5\u6b21\u6570\uff0c\u8d85\u8fc7\u6b21\u6570\uff0c\u53d6\u6d88\u4efb\u52a1\uff0c\u6b21\u6570\u4e3a0\uff0c\u53ea\u80fd\u7b49\u5f85\u4e0b\u4e00\u6b21\u91cd\u542f\u8fd0\u884c\u5faa\u73af\u624d\u80fd\u91cd\u8bd5\n@property (assign, nonatomic) int retryTimes;\n\n//APP\u9000\u51fa\u65f6\uff0c\u662f\u5426\u4fdd\u5b58\u4efb\u52a1\n@property (assign, nonatomic) BOOL shouldSaved;\n\n//\u662f\u5426\u53ef\u4ee5\u53d6\u6d88\uff0c\u662f\u5426\u5b58\u5728\u5b58\u5728\u76f8\u53cd\u7684\u64cd\u4f5c,\u5982\u70b9\u8d5e\uff0c\u53d6\u6d88\u70b9\u8d5e\uff0c\u70b9\u8d5e....\u76f8\u90bb\u4e24\u4e2a\u4efb\u52a1\u662f\u53ef\u62b5\u6d88\u7684\n//\u76f8\u53cd\u7684\u4e24\u79cd\u4efb\u52a1\u90fd\u53ef\u53d6\u6d88\n@property (assign, nonatomic) BOOL cancellable;\n\n//\u662f\u5426\u53ef\u91cd\u590d\uff0c\u5982\u679c\u4e3aNO\uff0c\u6b64\u65f6\u961f\u5217\u4e2d\u5b58\u5728\u76f8\u540c\u7684\u4efb\u52a1\uff0c\u5219\u5220\u9664\u961f\u5217\u4e2d\u539f\u6765\u7684\u4efb\u52a1\uff0c\u4ee5\u6700\u65b0\u7684\u4efb\u52a1\u4e3a\u4e3b\n//\u5982\u5bf9\u4e8e\u540c\u4e00\u5f20\u7167\u7247\uff1a\u70b9\u8d5e\uff0d>\u70b9\u8d5e \uff1d \u70b9\u8d5e\uff08\u867d\u7136\u4e00\u822c\u4e0d\u4f1a\u53d1\u751f\u7684\uff0c\u4f46\u70b9\u51fb\u901f\u5ea6\u5feb\u4e8e\u72b6\u6001\u6539\u53d8\u901f\u5ea6\uff0c\u8fd8\u662f\u6709\u53ef\u80fd\u7684\uff09\n@property (assign, nonatomic) BOOL repeative;\n\n//\u6267\u884c\u8be5\u4efb\u52a1\u9700\u8981\u7684\u73af\u5883\uff0c\u72b6\u6001\uff0c\u6761\u4ef6\uff0c\u53c2\u6570\u7b49\n@property (strong, nonatomic) NSDictionary *parameters;\n\n//\u662f\u5426\u5728\u6267\u884c\n@property (assign, nonatomic) BOOL executing;\n\n//\u6bd4\u8f83\u4e24\u4e2a\u4efb\u52a1\u662f\u5426\u76f8\u7b49\n- (BOOL) isEqual:(RTJob*)job;\n\n/**\n \u6bd4\u8f83\u4e24\u4e2a\u4efb\u52a1\uff0c\u5224\u65ad\u5b83\u4eec\u662f\u5426\u53ef\u4ee5\u76f8\u4e92\u62b5\u6d88\n */\n- (BOOL) isInverse:(RTJob*)job;\n\n\n/*****************************************************************\\\n \u5b50\u7c7b\u5fc5\u987b\u91cd\u8f7d\u4ee5\u4e0b\u65b9\u6cd5\uff1a\n 1.[executeInQueue:withBlock:]\n 2.[inverseJob]\n > \u5b58\u5728\u76f8\u53cd\u7684\u4efb\u52a1\uff0c\u4e14\u5fc5\u987b\u901a\u8fc7\u6267\u884c\u76f8\u53cd\u7684\u52a8\u4f5c\u6765\u8fbe\u5230\u53d6\u6d88\u7684\u76ee\u7684\u7684\u65f6\u5019\n > \u4e00\u822c\u4e0d\u7528\u8003\u8651\n\\*****************************************************************/\n\n/**\n \u6267\u884c\u4efb\u52a1\n status\uff1a\u4efb\u52a1\u6267\u884c\u7ed3\u675f\u7684\u72b6\u6001\n 0\u8868\u793a\u6210\u529f\uff0c\u5176\u4ed6\u7684\u8868\u793a\u5931\u8d25\n \u5982\u679cstatus\u4e0eerrorCode\u76f8\u7b49\uff0c\u53d6\u6d88\u4efb\u52a1\n \u5b50\u7c7b\u91cd\u8f7d\u65b9\u5f0f\uff1a\n - (void) executeInQueue:(dispatch_queue_t)queue withBlock:(void(^)(int status))block{\n [super executeInQueue:queue withBlock:^(int sta) {\n if(sta == 0) {\n sta = [self action...];\n }\n dispatch_async(queue, ^{\n block(sta);\n ]);\n }];\n }\n */\n- (void) executeInQueue:(dispatch_queue_t)queue withBlock:(void(^)(int status))block;\n\n/**\n \u5982\u679c\u5728\u6267\u884c\u7684\u65f6\u5019\u53d6\u6d88\uff0c\u5219\u4f1a\u9047\u5230\u4ee5\u4e0b\u51e0\u79cd\u60c5\u51b5\uff1a\n 1. \u5fc5\u987b\u5ffd\u7565\u53d6\u6d88\u64cd\u4f5c\n 2. \u5fc5\u987b\u7b49\u5230\u5f53\u524d\u6267\u884c\u7ed3\u675f\uff0c\u624d\u80fd\u6267\u884c\u53d6\u6d88\u64cd\u4f5c\n 2.1 \u6267\u884c\u6210\u529f\uff0c\u5219\u6267\u884c\u76f8\u53cd\u4efb\u52a1\n 2.2 \u6267\u884c\u5931\u8d25\uff0c\u5220\u9664\u4efb\u52a1\n 3. \u53ef\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u53d6\u6d88 (\u4e0d\u8003\u8651\u8fd9\u79cd\u60c5\u51b5\uff0c\u4e00\u822c\u4e0d\u4f1a\u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5)\n \u6ca1\u5728\u6267\u884c\u72b6\u6001\uff0c\u76f4\u63a5\u5220\u9664\n */\n//- (void) cancel; //cancel operation execute by manager\n\n/**\n \u8fd4\u56de\u4e00\u4e2a\u4f5c\u7528\u76f8\u53cd\u7684\u4efb\u52a1\n */\n- (RTJob*) inverseJob;\n\n\n@end\n"}
370
c
#pragma once #include <Windows.h> #include "PEAnalyser.h" #include "GALS.h" typedef FARPROC (WINAPI *GETPROCADDRESS)(HMODULE, LPCSTR); typedef HMODULE (WINAPI *LOADLIBRARY)(LPCSTR); enum { PEI_STR_KERNEL32, PEI_STR_VIRTUAL_ALLOC, PEI_STR_VIRTUAL_FREE, PEI_STR_VIRTUAL_PROTECT, }; typedef struct { unsigned int Magic; unsigned int ImageBase; unsigned int OEP; LOADLIBRARY LoadLibraryPtr; GETPROCADDRESS GetProcAddressPtr; unsigned int GALSChecksum; unsigned int GALSKey[8]; char Strings[4][16]; } PEInjectHeader; class PEInject { public: PEInject(); ~PEInject(); int InjectFile(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize); private: CPELibrary inputPE; GALS dllGALS; void DoInjection(void *extraData, DWORD extraDataSize); };
21.14
35
(translation_unit) "#pragma once\n\n#include <Windows.h>\n#include "PEAnalyser.h"\n#include "GALS.h"\n\ntypedef FARPROC (WINAPI *GETPROCADDRESS)(HMODULE, LPCSTR);\ntypedef HMODULE (WINAPI *LOADLIBRARY)(LPCSTR);\n\nenum\n{\n PEI_STR_KERNEL32,\n PEI_STR_VIRTUAL_ALLOC,\n PEI_STR_VIRTUAL_FREE,\n PEI_STR_VIRTUAL_PROTECT,\n};\n\ntypedef struct \n{\n unsigned int Magic;\n unsigned int ImageBase;\n unsigned int OEP;\n\n LOADLIBRARY LoadLibraryPtr;\n GETPROCADDRESS GetProcAddressPtr;\n\n unsigned int GALSChecksum;\n unsigned int GALSKey[8];\n char Strings[4][16];\n} PEInjectHeader;\n\nclass PEInject\n{\npublic:\n PEInject();\n ~PEInject();\n\n int InjectFile(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize);\n\nprivate:\n CPELibrary inputPE;\n GALS dllGALS;\n\n void DoInjection(void *extraData, DWORD extraDataSize);\n};\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <Windows.h>\n" (#include) "#include" (system_lib_string) "<Windows.h>" (preproc_include) "#include "PEAnalyser.h"\n" (#include) "#include" (string_literal) ""PEAnalyser.h"" (") """ (string_content) "PEAnalyser.h" (") """ (preproc_include) "#include "GALS.h"\n" (#include) "#include" (string_literal) ""GALS.h"" (") """ (string_content) "GALS.h" (") """ (type_definition) "typedef FARPROC (WINAPI *GETPROCADDRESS)(HMODULE, LPCSTR);" (typedef) "typedef" (macro_type_specifier) "FARPROC (WINAPI *GETPROCADDRESS)" (identifier) "FARPROC" (() "(" (ERROR) "WINAPI *" (type_descriptor) "WINAPI *" (type_identifier) "WINAPI" (abstract_pointer_declarator) "*" (*) "*" (type_descriptor) "GETPROCADDRESS" (type_identifier) "GETPROCADDRESS" ()) ")" (parenthesized_declarator) "(HMODULE, LPCSTR)" (() "(" (ERROR) "HMODULE," (type_identifier) "HMODULE" (,) "," (type_identifier) "LPCSTR" ()) ")" (;) ";" (type_definition) "typedef HMODULE (WINAPI *LOADLIBRARY)(LPCSTR);" (typedef) "typedef" (macro_type_specifier) "HMODULE (WINAPI *LOADLIBRARY)" (identifier) "HMODULE" (() "(" (ERROR) "WINAPI *" (type_descriptor) "WINAPI *" (type_identifier) "WINAPI" (abstract_pointer_declarator) "*" (*) "*" (type_descriptor) "LOADLIBRARY" (type_identifier) "LOADLIBRARY" ()) ")" (parenthesized_declarator) "(LPCSTR)" (() "(" (type_identifier) "LPCSTR" ()) ")" (;) ";" (enum_specifier) "enum\n{\n PEI_STR_KERNEL32,\n PEI_STR_VIRTUAL_ALLOC,\n PEI_STR_VIRTUAL_FREE,\n PEI_STR_VIRTUAL_PROTECT,\n}" (enum) "enum" (enumerator_list) "{\n PEI_STR_KERNEL32,\n PEI_STR_VIRTUAL_ALLOC,\n PEI_STR_VIRTUAL_FREE,\n PEI_STR_VIRTUAL_PROTECT,\n}" ({) "{" (enumerator) "PEI_STR_KERNEL32" (identifier) "PEI_STR_KERNEL32" (,) "," (enumerator) "PEI_STR_VIRTUAL_ALLOC" (identifier) "PEI_STR_VIRTUAL_ALLOC" (,) "," (enumerator) "PEI_STR_VIRTUAL_FREE" (identifier) "PEI_STR_VIRTUAL_FREE" (,) "," (enumerator) "PEI_STR_VIRTUAL_PROTECT" (identifier) "PEI_STR_VIRTUAL_PROTECT" (,) "," (}) "}" (;) ";" (type_definition) "typedef struct \n{\n unsigned int Magic;\n unsigned int ImageBase;\n unsigned int OEP;\n\n LOADLIBRARY LoadLibraryPtr;\n GETPROCADDRESS GetProcAddressPtr;\n\n unsigned int GALSChecksum;\n unsigned int GALSKey[8];\n char Strings[4][16];\n} PEInjectHeader;" (typedef) "typedef" (struct_specifier) "struct \n{\n unsigned int Magic;\n unsigned int ImageBase;\n unsigned int OEP;\n\n LOADLIBRARY LoadLibraryPtr;\n GETPROCADDRESS GetProcAddressPtr;\n\n unsigned int GALSChecksum;\n unsigned int GALSKey[8];\n char Strings[4][16];\n}" (struct) "struct" (field_declaration_list) "{\n unsigned int Magic;\n unsigned int ImageBase;\n unsigned int OEP;\n\n LOADLIBRARY LoadLibraryPtr;\n GETPROCADDRESS GetProcAddressPtr;\n\n unsigned int GALSChecksum;\n unsigned int GALSKey[8];\n char Strings[4][16];\n}" ({) "{" (field_declaration) "unsigned int Magic;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (field_identifier) "Magic" (;) ";" (field_declaration) "unsigned int ImageBase;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (field_identifier) "ImageBase" (;) ";" (field_declaration) "unsigned int OEP;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (field_identifier) "OEP" (;) ";" (field_declaration) "LOADLIBRARY LoadLibraryPtr;" (type_identifier) "LOADLIBRARY" (field_identifier) "LoadLibraryPtr" (;) ";" (field_declaration) "GETPROCADDRESS GetProcAddressPtr;" (type_identifier) "GETPROCADDRESS" (field_identifier) "GetProcAddressPtr" (;) ";" (field_declaration) "unsigned int GALSChecksum;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (field_identifier) "GALSChecksum" (;) ";" (field_declaration) "unsigned int GALSKey[8];" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (array_declarator) "GALSKey[8]" (field_identifier) "GALSKey" ([) "[" (number_literal) "8" (]) "]" (;) ";" (field_declaration) "char Strings[4][16];" (primitive_type) "char" (array_declarator) "Strings[4][16]" (array_declarator) "Strings[4]" (field_identifier) "Strings" ([) "[" (number_literal) "4" (]) "]" ([) "[" (number_literal) "16" (]) "]" (;) ";" (}) "}" (type_identifier) "PEInjectHeader" (;) ";" (function_definition) "class PEInject\n{\npublic:\n PEInject();\n ~PEInject();\n\n int InjectFile(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize);\n\nprivate:\n CPELibrary inputPE;\n GALS dllGALS;\n\n void DoInjection(void *extraData, DWORD extraDataSize);\n}" (type_identifier) "class" (identifier) "PEInject" (compound_statement) "{\npublic:\n PEInject();\n ~PEInject();\n\n int InjectFile(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize);\n\nprivate:\n CPELibrary inputPE;\n GALS dllGALS;\n\n void DoInjection(void *extraData, DWORD extraDataSize);\n}" ({) "{" (labeled_statement) "public:\n PEInject();" (statement_identifier) "public" (:) ":" (expression_statement) "PEInject();" (call_expression) "PEInject()" (identifier) "PEInject" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "~PEInject();" (unary_expression) "~PEInject()" (~) "~" (call_expression) "PEInject()" (identifier) "PEInject" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int InjectFile(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize);" (primitive_type) "int" (function_declarator) "InjectFile(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize)" (identifier) "InjectFile" (parameter_list) "(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize)" (() "(" (parameter_declaration) "char *input" (primitive_type) "char" (pointer_declarator) "*input" (*) "*" (identifier) "input" (,) "," (parameter_declaration) "char *output" (primitive_type) "char" (pointer_declarator) "*output" (*) "*" (identifier) "output" (,) "," (parameter_declaration) "char *dll" (primitive_type) "char" (pointer_declarator) "*dll" (*) "*" (identifier) "dll" (,) "," (parameter_declaration) "void *extraData" (primitive_type) "void" (pointer_declarator) "*extraData" (*) "*" (identifier) "extraData" (,) "," (parameter_declaration) "DWORD extraDataSize" (type_identifier) "DWORD" (identifier) "extraDataSize" ()) ")" (;) ";" (labeled_statement) "private:\n CPELibrary inputPE;" (statement_identifier) "private" (:) ":" (declaration) "CPELibrary inputPE;" (type_identifier) "CPELibrary" (identifier) "inputPE" (;) ";" (declaration) "GALS dllGALS;" (type_identifier) "GALS" (identifier) "dllGALS" (;) ";" (declaration) "void DoInjection(void *extraData, DWORD extraDataSize);" (primitive_type) "void" (function_declarator) "DoInjection(void *extraData, DWORD extraDataSize)" (identifier) "DoInjection" (parameter_list) "(void *extraData, DWORD extraDataSize)" (() "(" (parameter_declaration) "void *extraData" (primitive_type) "void" (pointer_declarator) "*extraData" (*) "*" (identifier) "extraData" (,) "," (parameter_declaration) "DWORD extraDataSize" (type_identifier) "DWORD" (identifier) "extraDataSize" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
229
3
{"language": "c", "success": true, "metadata": {"lines": 35, "avg_line_length": 21.14, "nodes": 155, "errors": 0, "source_hash": "941be639c6ef4b80cdaccd2e37dfc0c8352cc83d3f1bcabb4927555c93a6539d", "categorized_nodes": 99}, "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 <Windows.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": "<Windows.h>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include \"PEAnalyser.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": "\"PEAnalyser.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 23}}, {"id": 9, "type": "preproc_include", "text": "#include \"GALS.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": "\"GALS.h\"", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 17}}, {"id": 12, "type": "type_definition", "text": "typedef FARPROC (WINAPI *GETPROCADDRESS)(HMODULE, LPCSTR);", "parent": null, "children": [13, 14, 23], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 58}}, {"id": 13, "type": "typedef", "text": "typedef", "parent": 12, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 14, "type": "macro_type_specifier", "text": "FARPROC (WINAPI *GETPROCADDRESS)", "parent": 12, "children": [15, 16, 21], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 40}}, {"id": 15, "type": "identifier", "text": "FARPROC", "parent": 14, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 15}}, {"id": 16, "type": "ERROR", "text": "WINAPI *", "parent": 14, "children": [17], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 25}}, {"id": 17, "type": "type_descriptor", "text": "WINAPI *", "parent": 16, "children": [18, 19], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 25}}, {"id": 18, "type": "type_identifier", "text": "WINAPI", "parent": 17, "children": [], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 23}}, {"id": 19, "type": "abstract_pointer_declarator", "text": "*", "parent": 17, "children": [20], "start_point": {"row": 6, "column": 24}, "end_point": {"row": 6, "column": 25}}, {"id": 20, "type": "*", "text": "*", "parent": 19, "children": [], "start_point": {"row": 6, "column": 24}, "end_point": {"row": 6, "column": 25}}, {"id": 21, "type": "type_descriptor", "text": "GETPROCADDRESS", "parent": 14, "children": [22], "start_point": {"row": 6, "column": 25}, "end_point": {"row": 6, "column": 39}}, {"id": 22, "type": "type_identifier", "text": "GETPROCADDRESS", "parent": 21, "children": [], "start_point": {"row": 6, "column": 25}, "end_point": {"row": 6, "column": 39}}, {"id": 23, "type": "parenthesized_declarator", "text": "(HMODULE, LPCSTR)", "parent": 12, "children": [24, 26], "start_point": {"row": 6, "column": 40}, "end_point": {"row": 6, "column": 57}}, {"id": 24, "type": "ERROR", "text": "HMODULE,", "parent": 23, "children": [25], "start_point": {"row": 6, "column": 41}, "end_point": {"row": 6, "column": 49}}, {"id": 25, "type": "type_identifier", "text": "HMODULE", "parent": 24, "children": [], "start_point": {"row": 6, "column": 41}, "end_point": {"row": 6, "column": 48}}, {"id": 26, "type": "type_identifier", "text": "LPCSTR", "parent": 23, "children": [], "start_point": {"row": 6, "column": 50}, "end_point": {"row": 6, "column": 56}}, {"id": 27, "type": "type_definition", "text": "typedef HMODULE (WINAPI *LOADLIBRARY)(LPCSTR);", "parent": null, "children": [28, 29, 38], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 46}}, {"id": 28, "type": "typedef", "text": "typedef", "parent": 27, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 29, "type": "macro_type_specifier", "text": "HMODULE (WINAPI *LOADLIBRARY)", "parent": 27, "children": [30, 31, 36], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 37}}, {"id": 30, "type": "identifier", "text": "HMODULE", "parent": 29, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 15}}, {"id": 31, "type": "ERROR", "text": "WINAPI *", "parent": 29, "children": [32], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 25}}, {"id": 32, "type": "type_descriptor", "text": "WINAPI *", "parent": 31, "children": [33, 34], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 25}}, {"id": 33, "type": "type_identifier", "text": "WINAPI", "parent": 32, "children": [], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 23}}, {"id": 34, "type": "abstract_pointer_declarator", "text": "*", "parent": 32, "children": [35], "start_point": {"row": 7, "column": 24}, "end_point": {"row": 7, "column": 25}}, {"id": 35, "type": "*", "text": "*", "parent": 34, "children": [], "start_point": {"row": 7, "column": 24}, "end_point": {"row": 7, "column": 25}}, {"id": 36, "type": "type_descriptor", "text": "LOADLIBRARY", "parent": 29, "children": [37], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 36}}, {"id": 37, "type": "type_identifier", "text": "LOADLIBRARY", "parent": 36, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 36}}, {"id": 38, "type": "parenthesized_declarator", "text": "(LPCSTR)", "parent": 27, "children": [39], "start_point": {"row": 7, "column": 37}, "end_point": {"row": 7, "column": 45}}, {"id": 39, "type": "type_identifier", "text": "LPCSTR", "parent": 38, "children": [], "start_point": {"row": 7, "column": 38}, "end_point": {"row": 7, "column": 44}}, {"id": 40, "type": "enum_specifier", "text": "enum\n{\n\tPEI_STR_KERNEL32,\n\tPEI_STR_VIRTUAL_ALLOC,\n\tPEI_STR_VIRTUAL_FREE,\n\tPEI_STR_VIRTUAL_PROTECT,\n}", "parent": null, "children": [41, 42], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 41, "type": "enum", "text": "enum", "parent": 40, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 4}}, {"id": 42, "type": "enumerator_list", "text": "{\n\tPEI_STR_KERNEL32,\n\tPEI_STR_VIRTUAL_ALLOC,\n\tPEI_STR_VIRTUAL_FREE,\n\tPEI_STR_VIRTUAL_PROTECT,\n}", "parent": 40, "children": [43, 45, 47, 49], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 43, "type": "enumerator", "text": "PEI_STR_KERNEL32", "parent": 42, "children": [44], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 17}}, {"id": 44, "type": "identifier", "text": "PEI_STR_KERNEL32", "parent": 43, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 17}}, {"id": 45, "type": "enumerator", "text": "PEI_STR_VIRTUAL_ALLOC", "parent": 42, "children": [46], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 22}}, {"id": 46, "type": "identifier", "text": "PEI_STR_VIRTUAL_ALLOC", "parent": 45, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 22}}, {"id": 47, "type": "enumerator", "text": "PEI_STR_VIRTUAL_FREE", "parent": 42, "children": [48], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 21}}, {"id": 48, "type": "identifier", "text": "PEI_STR_VIRTUAL_FREE", "parent": 47, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 21}}, {"id": 49, "type": "enumerator", "text": "PEI_STR_VIRTUAL_PROTECT", "parent": 42, "children": [50], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 24}}, {"id": 50, "type": "identifier", "text": "PEI_STR_VIRTUAL_PROTECT", "parent": 49, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 24}}, {"id": 51, "type": "type_definition", "text": "typedef struct \n{\n\tunsigned int Magic;\n\tunsigned int ImageBase;\n\tunsigned int OEP;\n\n\tLOADLIBRARY LoadLibraryPtr;\n\tGETPROCADDRESS GetProcAddressPtr;\n\n\tunsigned int GALSChecksum;\n\tunsigned int GALSKey[8];\n\tchar Strings[4][16];\n} PEInjectHeader;", "parent": null, "children": [52, 53, 95], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 29, "column": 17}}, {"id": 52, "type": "typedef", "text": "typedef", "parent": 51, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 53, "type": "struct_specifier", "text": "struct \n{\n\tunsigned int Magic;\n\tunsigned int ImageBase;\n\tunsigned int OEP;\n\n\tLOADLIBRARY LoadLibraryPtr;\n\tGETPROCADDRESS GetProcAddressPtr;\n\n\tunsigned int GALSChecksum;\n\tunsigned int GALSKey[8];\n\tchar Strings[4][16];\n}", "parent": 51, "children": [54], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 29, "column": 1}}, {"id": 54, "type": "struct", "text": "struct", "parent": 53, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 14}}, {"id": 55, "type": "field_declaration", "text": "unsigned int Magic;", "parent": 53, "children": [56, 59], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 20}}, {"id": 56, "type": "sized_type_specifier", "text": "unsigned int", "parent": 55, "children": [57, 58], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 13}}, {"id": 57, "type": "unsigned", "text": "unsigned", "parent": 56, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 9}}, {"id": 58, "type": "primitive_type", "text": "int", "parent": 56, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 13}}, {"id": 59, "type": "field_identifier", "text": "Magic", "parent": 55, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 19}}, {"id": 60, "type": "field_declaration", "text": "unsigned int ImageBase;", "parent": 53, "children": [61, 64], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 24}}, {"id": 61, "type": "sized_type_specifier", "text": "unsigned int", "parent": 60, "children": [62, 63], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 13}}, {"id": 62, "type": "unsigned", "text": "unsigned", "parent": 61, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 63, "type": "primitive_type", "text": "int", "parent": 61, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 13}}, {"id": 64, "type": "field_identifier", "text": "ImageBase", "parent": 60, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 23}}, {"id": 65, "type": "field_declaration", "text": "unsigned int OEP;", "parent": 53, "children": [66, 69], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 18}}, {"id": 66, "type": "sized_type_specifier", "text": "unsigned int", "parent": 65, "children": [67, 68], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 13}}, {"id": 67, "type": "unsigned", "text": "unsigned", "parent": 66, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 9}}, {"id": 68, "type": "primitive_type", "text": "int", "parent": 66, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 13}}, {"id": 69, "type": "field_identifier", "text": "OEP", "parent": 65, "children": [], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 17}}, {"id": 70, "type": "field_declaration", "text": "LOADLIBRARY LoadLibraryPtr;", "parent": 53, "children": [71, 72], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 28}}, {"id": 71, "type": "type_identifier", "text": "LOADLIBRARY", "parent": 70, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 12}}, {"id": 72, "type": "field_identifier", "text": "LoadLibraryPtr", "parent": 70, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 27}}, {"id": 73, "type": "field_declaration", "text": "GETPROCADDRESS GetProcAddressPtr;", "parent": 53, "children": [74, 75], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 34}}, {"id": 74, "type": "type_identifier", "text": "GETPROCADDRESS", "parent": 73, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 15}}, {"id": 75, "type": "field_identifier", "text": "GetProcAddressPtr", "parent": 73, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 33}}, {"id": 76, "type": "field_declaration", "text": "unsigned int GALSChecksum;", "parent": 53, "children": [77, 80], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 27}}, {"id": 77, "type": "sized_type_specifier", "text": "unsigned int", "parent": 76, "children": [78, 79], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 13}}, {"id": 78, "type": "unsigned", "text": "unsigned", "parent": 77, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 9}}, {"id": 79, "type": "primitive_type", "text": "int", "parent": 77, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 13}}, {"id": 80, "type": "field_identifier", "text": "GALSChecksum", "parent": 76, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 26}}, {"id": 81, "type": "field_declaration", "text": "unsigned int GALSKey[8];", "parent": 53, "children": [82, 85], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 25}}, {"id": 82, "type": "sized_type_specifier", "text": "unsigned int", "parent": 81, "children": [83, 84], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 13}}, {"id": 83, "type": "unsigned", "text": "unsigned", "parent": 82, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 9}}, {"id": 84, "type": "primitive_type", "text": "int", "parent": 82, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 13}}, {"id": 85, "type": "array_declarator", "text": "GALSKey[8]", "parent": 81, "children": [86, 87], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 24}}, {"id": 86, "type": "field_identifier", "text": "GALSKey", "parent": 85, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 21}}, {"id": 87, "type": "number_literal", "text": "8", "parent": 85, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 23}}, {"id": 88, "type": "field_declaration", "text": "char Strings[4][16];", "parent": 53, "children": [89, 90], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 21}}, {"id": 89, "type": "primitive_type", "text": "char", "parent": 88, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 5}}, {"id": 90, "type": "array_declarator", "text": "Strings[4][16]", "parent": 88, "children": [91, 94], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 20}}, {"id": 91, "type": "array_declarator", "text": "Strings[4]", "parent": 90, "children": [92, 93], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 16}}, {"id": 92, "type": "field_identifier", "text": "Strings", "parent": 91, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 13}}, {"id": 93, "type": "number_literal", "text": "4", "parent": 91, "children": [], "start_point": {"row": 28, "column": 14}, "end_point": {"row": 28, "column": 15}}, {"id": 94, "type": "number_literal", "text": "16", "parent": 90, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 19}}, {"id": 95, "type": "type_identifier", "text": "PEInjectHeader", "parent": 51, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 16}}, {"id": 96, "type": "function_definition", "text": "class PEInject\n{\npublic:\n\tPEInject();\n\t~PEInject();\n\n\tint InjectFile(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize);\n\nprivate:\n\tCPELibrary inputPE;\n\tGALS dllGALS;\n\n\tvoid DoInjection(void *extraData, DWORD extraDataSize);\n}", "parent": null, "children": [97], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 97, "type": "identifier", "text": "PEInject", "parent": 96, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 14}}, {"id": 98, "type": "labeled_statement", "text": "public:\n\tPEInject();", "parent": 96, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 12}}, {"id": 99, "type": "call_expression", "text": "PEInject()", "parent": 98, "children": [100, 101], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 11}}, {"id": 100, "type": "identifier", "text": "PEInject", "parent": 99, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 9}}, {"id": 101, "type": "argument_list", "text": "()", "parent": 99, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 11}}, {"id": 102, "type": "unary_expression", "text": "~PEInject()", "parent": 96, "children": [103, 104], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 12}}, {"id": 103, "type": "~", "text": "~", "parent": 102, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 2}}, {"id": 104, "type": "call_expression", "text": "PEInject()", "parent": 102, "children": [105, 106], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 12}}, {"id": 105, "type": "identifier", "text": "PEInject", "parent": 104, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 10}}, {"id": 106, "type": "argument_list", "text": "()", "parent": 104, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 12}}, {"id": 107, "type": "declaration", "text": "int InjectFile(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize);", "parent": 96, "children": [108, 109], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 92}}, {"id": 108, "type": "primitive_type", "text": "int", "parent": 107, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 4}}, {"id": 109, "type": "function_declarator", "text": "InjectFile(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize)", "parent": 107, "children": [110, 111], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 91}}, {"id": 110, "type": "identifier", "text": "InjectFile", "parent": 109, "children": [], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 15}}, {"id": 111, "type": "parameter_list", "text": "(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize)", "parent": 109, "children": [112, 117, 122, 127, 132], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 91}}, {"id": 112, "type": "parameter_declaration", "text": "char *input", "parent": 111, "children": [113, 114], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 27}}, {"id": 113, "type": "primitive_type", "text": "char", "parent": 112, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 20}}, {"id": 114, "type": "pointer_declarator", "text": "*input", "parent": 112, "children": [115, 116], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 27}}, {"id": 115, "type": "*", "text": "*", "parent": 114, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 22}}, {"id": 116, "type": "identifier", "text": "input", "parent": 114, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 27}}, {"id": 117, "type": "parameter_declaration", "text": "char *output", "parent": 111, "children": [118, 119], "start_point": {"row": 37, "column": 29}, "end_point": {"row": 37, "column": 41}}, {"id": 118, "type": "primitive_type", "text": "char", "parent": 117, "children": [], "start_point": {"row": 37, "column": 29}, "end_point": {"row": 37, "column": 33}}, {"id": 119, "type": "pointer_declarator", "text": "*output", "parent": 117, "children": [120, 121], "start_point": {"row": 37, "column": 34}, "end_point": {"row": 37, "column": 41}}, {"id": 120, "type": "*", "text": "*", "parent": 119, "children": [], "start_point": {"row": 37, "column": 34}, "end_point": {"row": 37, "column": 35}}, {"id": 121, "type": "identifier", "text": "output", "parent": 119, "children": [], "start_point": {"row": 37, "column": 35}, "end_point": {"row": 37, "column": 41}}, {"id": 122, "type": "parameter_declaration", "text": "char *dll", "parent": 111, "children": [123, 124], "start_point": {"row": 37, "column": 43}, "end_point": {"row": 37, "column": 52}}, {"id": 123, "type": "primitive_type", "text": "char", "parent": 122, "children": [], "start_point": {"row": 37, "column": 43}, "end_point": {"row": 37, "column": 47}}, {"id": 124, "type": "pointer_declarator", "text": "*dll", "parent": 122, "children": [125, 126], "start_point": {"row": 37, "column": 48}, "end_point": {"row": 37, "column": 52}}, {"id": 125, "type": "*", "text": "*", "parent": 124, "children": [], "start_point": {"row": 37, "column": 48}, "end_point": {"row": 37, "column": 49}}, {"id": 126, "type": "identifier", "text": "dll", "parent": 124, "children": [], "start_point": {"row": 37, "column": 49}, "end_point": {"row": 37, "column": 52}}, {"id": 127, "type": "parameter_declaration", "text": "void *extraData", "parent": 111, "children": [128, 129], "start_point": {"row": 37, "column": 54}, "end_point": {"row": 37, "column": 69}}, {"id": 128, "type": "primitive_type", "text": "void", "parent": 127, "children": [], "start_point": {"row": 37, "column": 54}, "end_point": {"row": 37, "column": 58}}, {"id": 129, "type": "pointer_declarator", "text": "*extraData", "parent": 127, "children": [130, 131], "start_point": {"row": 37, "column": 59}, "end_point": {"row": 37, "column": 69}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 37, "column": 59}, "end_point": {"row": 37, "column": 60}}, {"id": 131, "type": "identifier", "text": "extraData", "parent": 129, "children": [], "start_point": {"row": 37, "column": 60}, "end_point": {"row": 37, "column": 69}}, {"id": 132, "type": "parameter_declaration", "text": "DWORD extraDataSize", "parent": 111, "children": [133, 134], "start_point": {"row": 37, "column": 71}, "end_point": {"row": 37, "column": 90}}, {"id": 133, "type": "type_identifier", "text": "DWORD", "parent": 132, "children": [], "start_point": {"row": 37, "column": 71}, "end_point": {"row": 37, "column": 76}}, {"id": 134, "type": "identifier", "text": "extraDataSize", "parent": 132, "children": [], "start_point": {"row": 37, "column": 77}, "end_point": {"row": 37, "column": 90}}, {"id": 135, "type": "labeled_statement", "text": "private:\n\tCPELibrary inputPE;", "parent": 96, "children": [136], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 20}}, {"id": 136, "type": "declaration", "text": "CPELibrary inputPE;", "parent": 135, "children": [137, 138], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 20}}, {"id": 137, "type": "type_identifier", "text": "CPELibrary", "parent": 136, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 11}}, {"id": 138, "type": "identifier", "text": "inputPE", "parent": 136, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 19}}, {"id": 139, "type": "declaration", "text": "GALS dllGALS;", "parent": 96, "children": [140, 141], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 14}}, {"id": 140, "type": "type_identifier", "text": "GALS", "parent": 139, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 5}}, {"id": 141, "type": "identifier", "text": "dllGALS", "parent": 139, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 13}}, {"id": 142, "type": "declaration", "text": "void DoInjection(void *extraData, DWORD extraDataSize);", "parent": 96, "children": [143, 144], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 56}}, {"id": 143, "type": "primitive_type", "text": "void", "parent": 142, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 5}}, {"id": 144, "type": "function_declarator", "text": "DoInjection(void *extraData, DWORD extraDataSize)", "parent": 142, "children": [145, 146], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 55}}, {"id": 145, "type": "identifier", "text": "DoInjection", "parent": 144, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 17}}, {"id": 146, "type": "parameter_list", "text": "(void *extraData, DWORD extraDataSize)", "parent": 144, "children": [147, 152], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 55}}, {"id": 147, "type": "parameter_declaration", "text": "void *extraData", "parent": 146, "children": [148, 149], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 33}}, {"id": 148, "type": "primitive_type", "text": "void", "parent": 147, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 22}}, {"id": 149, "type": "pointer_declarator", "text": "*extraData", "parent": 147, "children": [150, 151], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 33}}, {"id": 150, "type": "*", "text": "*", "parent": 149, "children": [], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 24}}, {"id": 151, "type": "identifier", "text": "extraData", "parent": 149, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 33}}, {"id": 152, "type": "parameter_declaration", "text": "DWORD extraDataSize", "parent": 146, "children": [153, 154], "start_point": {"row": 43, "column": 35}, "end_point": {"row": 43, "column": 54}}, {"id": 153, "type": "type_identifier", "text": "DWORD", "parent": 152, "children": [], "start_point": {"row": 43, "column": 35}, "end_point": {"row": 43, "column": 40}}, {"id": 154, "type": "identifier", "text": "extraDataSize", "parent": 152, "children": [], "start_point": {"row": 43, "column": 41}, "end_point": {"row": 43, "column": 54}}]}, "node_categories": {"declarations": {"functions": [96, 109, 144], "variables": [12, 27, 51, 55, 60, 65, 70, 73, 76, 81, 88, 107, 112, 117, 122, 127, 132, 136, 139, 142, 147, 152], "classes": [53, 54], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": [40, 41, 42, 43, 45, 47, 49]}, "statements": {"expressions": [99, 102, 104], "assignments": [], "loops": [], "conditionals": [14, 15, 18, 22, 25, 26, 29, 30, 33, 37, 39, 44, 46, 48, 50, 56, 59, 61, 64, 66, 69, 71, 72, 74, 75, 77, 80, 82, 86, 92, 95, 97, 100, 105, 110, 116, 121, 126, 131, 133, 134, 137, 138, 140, 141, 145, 151, 153, 154], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 87, 93, 94], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 96, "universal_type": "function", "name": "PEInject", "text_snippet": "class PEInject\n{\npublic:\n\tPEInject();\n\t~PEInject();\n\n\tint InjectFile(char *input, char *output, char"}, {"node_id": 109, "universal_type": "function", "name": "*extraData,", "text_snippet": "InjectFile(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize)"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "DoInjection(void *extraData, DWORD extraDataSize)"}], "class_declarations": [{"node_id": 53, "universal_type": "class", "name": "{", "text_snippet": "struct \n{\n\tunsigned int Magic;\n\tunsigned int ImageBase;\n\tunsigned int OEP;\n\n\tLOADLIBRARY LoadLibrary"}, {"node_id": 54, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include <Windows.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"PEAnalyser.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"GALS.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <Windows.h>\n#include \"PEAnalyser.h\"\n#include \"GALS.h\"\n\ntypedef FARPROC (WINAPI *GETPROCADDRESS)(HMODULE, LPCSTR);\ntypedef HMODULE (WINAPI *LOADLIBRARY)(LPCSTR);\n\nenum\n{\n\tPEI_STR_KERNEL32,\n\tPEI_STR_VIRTUAL_ALLOC,\n\tPEI_STR_VIRTUAL_FREE,\n\tPEI_STR_VIRTUAL_PROTECT,\n};\n\ntypedef struct \n{\n\tunsigned int Magic;\n\tunsigned int ImageBase;\n\tunsigned int OEP;\n\n\tLOADLIBRARY LoadLibraryPtr;\n\tGETPROCADDRESS GetProcAddressPtr;\n\n\tunsigned int GALSChecksum;\n\tunsigned int GALSKey[8];\n\tchar Strings[4][16];\n} PEInjectHeader;\n\nclass PEInject\n{\npublic:\n\tPEInject();\n\t~PEInject();\n\n\tint InjectFile(char *input, char *output, char *dll, void *extraData, DWORD extraDataSize);\n\nprivate:\n\tCPELibrary inputPE;\n\tGALS dllGALS;\n\n\tvoid DoInjection(void *extraData, DWORD extraDataSize);\n};\n"}
371
c
/* * Mach Operating System * Copyright (c) 1993 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or <EMAIL> * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ /* * HISTORY * $Log: min_io.h,v $ * Revision 2.2 93/02/05 08:01:01 danner * Adapted for alpha. * [93/02/04 af] * */ /* * File: min_io.h * Author: <NAME>, Carnegie Mellon University * Date: 12/90 * * Minimalistic I/O package */ typedef struct file *open_file_t; int open( char *, int, open_file_t *); int close( open_file_t ); int read( open_file_t, char *, unsigned int); int lseek( open_file_t, unsigned int, int ); void exec( open_file_t, long );
30.7
47
(translation_unit) "/* \n * Mach Operating System\n * Copyright (c) 1993 Carnegie Mellon University\n * All Rights Reserved.\n * \n * Permission to use, copy, modify and distribute this software and its\n * documentation is hereby granted, provided that both the copyright\n * notice and this permission notice appear in all copies of the\n * software, derivative works or modified versions, and any portions\n * thereof, and that both notices appear in supporting documentation.\n * \n * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"\n * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR\n * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.\n * \n * Carnegie Mellon requests users of this software to return to\n * \n * Software Distribution Coordinator or <EMAIL>\n * School of Computer Science\n * Carnegie Mellon University\n * Pittsburgh PA 15213-3890\n * \n * any improvements or extensions that they make and grant Carnegie Mellon\n * the rights to redistribute these changes.\n */\n/* \n * HISTORY\n * $Log: min_io.h,v $\n * Revision 2.2 93/02/05 08:01:01 danner\n * Adapted for alpha.\n * [93/02/04 af]\n * \n */\n/*\n * File: min_io.h\n * Author: <NAME>, Carnegie Mellon University\n * Date: 12/90\n *\n * Minimalistic I/O package\n */\n\n\ntypedef struct file *open_file_t;\n\nint open( char *, int, open_file_t *);\nint close( open_file_t );\nint read( open_file_t, char *, unsigned int);\nint lseek( open_file_t, unsigned int, int );\n\nvoid exec( open_file_t, long );\n\n" (comment) "/* \n * Mach Operating System\n * Copyright (c) 1993 Carnegie Mellon University\n * All Rights Reserved.\n * \n * Permission to use, copy, modify and distribute this software and its\n * documentation is hereby granted, provided that both the copyright\n * notice and this permission notice appear in all copies of the\n * software, derivative works or modified versions, and any portions\n * thereof, and that both notices appear in supporting documentation.\n * \n * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"\n * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR\n * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.\n * \n * Carnegie Mellon requests users of this software to return to\n * \n * Software Distribution Coordinator or <EMAIL>\n * School of Computer Science\n * Carnegie Mellon University\n * Pittsburgh PA 15213-3890\n * \n * any improvements or extensions that they make and grant Carnegie Mellon\n * the rights to redistribute these changes.\n */" (comment) "/* \n * HISTORY\n * $Log: min_io.h,v $\n * Revision 2.2 93/02/05 08:01:01 danner\n * Adapted for alpha.\n * [93/02/04 af]\n * \n */" (comment) "/*\n * File: min_io.h\n * Author: <NAME>, Carnegie Mellon University\n * Date: 12/90\n *\n * Minimalistic I/O package\n */" (type_definition) "typedef struct file *open_file_t;" (typedef) "typedef" (struct_specifier) "struct file" (struct) "struct" (type_identifier) "file" (pointer_declarator) "*open_file_t" (*) "*" (type_identifier) "open_file_t" (;) ";" (declaration) "int open( char *, int, open_file_t *);" (primitive_type) "int" (function_declarator) "open( char *, int, open_file_t *)" (identifier) "open" (parameter_list) "( char *, int, open_file_t *)" (() "(" (parameter_declaration) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "int" (primitive_type) "int" (,) "," (parameter_declaration) "open_file_t *" (type_identifier) "open_file_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (declaration) "int close( open_file_t );" (primitive_type) "int" (function_declarator) "close( open_file_t )" (identifier) "close" (parameter_list) "( open_file_t )" (() "(" (parameter_declaration) "open_file_t" (type_identifier) "open_file_t" ()) ")" (;) ";" (declaration) "int read( open_file_t, char *, unsigned int);" (primitive_type) "int" (function_declarator) "read( open_file_t, char *, unsigned int)" (identifier) "read" (parameter_list) "( open_file_t, char *, unsigned int)" (() "(" (parameter_declaration) "open_file_t" (type_identifier) "open_file_t" (,) "," (parameter_declaration) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "unsigned int" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" ()) ")" (;) ";" (declaration) "int lseek( open_file_t, unsigned int, int );" (primitive_type) "int" (function_declarator) "lseek( open_file_t, unsigned int, int )" (identifier) "lseek" (parameter_list) "( open_file_t, unsigned int, int )" (() "(" (parameter_declaration) "open_file_t" (type_identifier) "open_file_t" (,) "," (parameter_declaration) "unsigned int" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (,) "," (parameter_declaration) "int" (primitive_type) "int" ()) ")" (;) ";" (declaration) "void exec( open_file_t, long );" (primitive_type) "void" (function_declarator) "exec( open_file_t, long )" (identifier) "exec" (parameter_list) "( open_file_t, long )" (() "(" (parameter_declaration) "open_file_t" (type_identifier) "open_file_t" (,) "," (parameter_declaration) "long" (sized_type_specifier) "long" (long) "long" ()) ")" (;) ";"
95
0
{"language": "c", "success": true, "metadata": {"lines": 47, "avg_line_length": 30.7, "nodes": 68, "errors": 0, "source_hash": "3d86da1fc78a403d512db6a56a68f22780e25d482505d23d173d4b50eea26fb5", "categorized_nodes": 40}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "type_definition", "text": "typedef struct file *open_file_t;", "parent": null, "children": [1, 2, 5], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 33}}, {"id": 1, "type": "typedef", "text": "typedef", "parent": 0, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 7}}, {"id": 2, "type": "struct_specifier", "text": "struct file", "parent": 0, "children": [3, 4], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 19}}, {"id": 3, "type": "struct", "text": "struct", "parent": 2, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 14}}, {"id": 4, "type": "type_identifier", "text": "file", "parent": 2, "children": [], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 19}}, {"id": 5, "type": "pointer_declarator", "text": "*open_file_t", "parent": 0, "children": [6, 7], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 32}}, {"id": 6, "type": "*", "text": "*", "parent": 5, "children": [], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 21}}, {"id": 7, "type": "type_identifier", "text": "open_file_t", "parent": 5, "children": [], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 32}}, {"id": 8, "type": "declaration", "text": "int\t\topen( char *, int, open_file_t *);", "parent": null, "children": [9, 10], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 39}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 3}}, {"id": 10, "type": "function_declarator", "text": "open( char *, int, open_file_t *)", "parent": 8, "children": [11, 12], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 38}}, {"id": 11, "type": "identifier", "text": "open", "parent": 10, "children": [], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 9}}, {"id": 12, "type": "parameter_list", "text": "( char *, int, open_file_t *)", "parent": 10, "children": [13, 17, 19], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 38}}, {"id": 13, "type": "parameter_declaration", "text": "char *", "parent": 12, "children": [14, 15], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 17}}, {"id": 14, "type": "primitive_type", "text": "char", "parent": 13, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 15}}, {"id": 15, "type": "abstract_pointer_declarator", "text": "*", "parent": 13, "children": [16], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 17}}, {"id": 16, "type": "*", "text": "*", "parent": 15, "children": [], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 17}}, {"id": 17, "type": "parameter_declaration", "text": "int", "parent": 12, "children": [18], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 22}}, {"id": 18, "type": "primitive_type", "text": "int", "parent": 17, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 22}}, {"id": 19, "type": "parameter_declaration", "text": "open_file_t *", "parent": 12, "children": [20, 21], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 37}}, {"id": 20, "type": "type_identifier", "text": "open_file_t", "parent": 19, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 35}}, {"id": 21, "type": "abstract_pointer_declarator", "text": "*", "parent": 19, "children": [22], "start_point": {"row": 44, "column": 36}, "end_point": {"row": 44, "column": 37}}, {"id": 22, "type": "*", "text": "*", "parent": 21, "children": [], "start_point": {"row": 44, "column": 36}, "end_point": {"row": 44, "column": 37}}, {"id": 23, "type": "declaration", "text": "int\t\tclose( open_file_t );", "parent": null, "children": [24, 25], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 26}}, {"id": 24, "type": "primitive_type", "text": "int", "parent": 23, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 3}}, {"id": 25, "type": "function_declarator", "text": "close( open_file_t )", "parent": 23, "children": [26, 27], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 25}}, {"id": 26, "type": "identifier", "text": "close", "parent": 25, "children": [], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 10}}, {"id": 27, "type": "parameter_list", "text": "( open_file_t )", "parent": 25, "children": [28], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 25}}, {"id": 28, "type": "parameter_declaration", "text": "open_file_t", "parent": 27, "children": [29], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 23}}, {"id": 29, "type": "type_identifier", "text": "open_file_t", "parent": 28, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 23}}, {"id": 30, "type": "declaration", "text": "int\t\tread( open_file_t, char *, unsigned int);", "parent": null, "children": [31, 32], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 46}}, {"id": 31, "type": "primitive_type", "text": "int", "parent": 30, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 3}}, {"id": 32, "type": "function_declarator", "text": "read( open_file_t, char *, unsigned int)", "parent": 30, "children": [33, 34], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 45}}, {"id": 33, "type": "identifier", "text": "read", "parent": 32, "children": [], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 9}}, {"id": 34, "type": "parameter_list", "text": "( open_file_t, char *, unsigned int)", "parent": 32, "children": [35, 37, 41], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 45}}, {"id": 35, "type": "parameter_declaration", "text": "open_file_t", "parent": 34, "children": [36], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 22}}, {"id": 36, "type": "type_identifier", "text": "open_file_t", "parent": 35, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 22}}, {"id": 37, "type": "parameter_declaration", "text": "char *", "parent": 34, "children": [38, 39], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 46, "column": 30}}, {"id": 38, "type": "primitive_type", "text": "char", "parent": 37, "children": [], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 46, "column": 28}}, {"id": 39, "type": "abstract_pointer_declarator", "text": "*", "parent": 37, "children": [40], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 30}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 30}}, {"id": 41, "type": "parameter_declaration", "text": "unsigned int", "parent": 34, "children": [42], "start_point": {"row": 46, "column": 32}, "end_point": {"row": 46, "column": 44}}, {"id": 42, "type": "sized_type_specifier", "text": "unsigned int", "parent": 41, "children": [43, 44], "start_point": {"row": 46, "column": 32}, "end_point": {"row": 46, "column": 44}}, {"id": 43, "type": "unsigned", "text": "unsigned", "parent": 42, "children": [], "start_point": {"row": 46, "column": 32}, "end_point": {"row": 46, "column": 40}}, {"id": 44, "type": "primitive_type", "text": "int", "parent": 42, "children": [], "start_point": {"row": 46, "column": 41}, "end_point": {"row": 46, "column": 44}}, {"id": 45, "type": "declaration", "text": "int\t\tlseek( open_file_t, unsigned int, int );", "parent": null, "children": [46, 47], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 45}}, {"id": 46, "type": "primitive_type", "text": "int", "parent": 45, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 3}}, {"id": 47, "type": "function_declarator", "text": "lseek( open_file_t, unsigned int, int )", "parent": 45, "children": [48, 49], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 44}}, {"id": 48, "type": "identifier", "text": "lseek", "parent": 47, "children": [], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 10}}, {"id": 49, "type": "parameter_list", "text": "( open_file_t, unsigned int, int )", "parent": 47, "children": [50, 52, 56], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 44}}, {"id": 50, "type": "parameter_declaration", "text": "open_file_t", "parent": 49, "children": [51], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 23}}, {"id": 51, "type": "type_identifier", "text": "open_file_t", "parent": 50, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 23}}, {"id": 52, "type": "parameter_declaration", "text": "unsigned int", "parent": 49, "children": [53], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 37}}, {"id": 53, "type": "sized_type_specifier", "text": "unsigned int", "parent": 52, "children": [54, 55], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 37}}, {"id": 54, "type": "unsigned", "text": "unsigned", "parent": 53, "children": [], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 33}}, {"id": 55, "type": "primitive_type", "text": "int", "parent": 53, "children": [], "start_point": {"row": 47, "column": 34}, "end_point": {"row": 47, "column": 37}}, {"id": 56, "type": "parameter_declaration", "text": "int", "parent": 49, "children": [57], "start_point": {"row": 47, "column": 39}, "end_point": {"row": 47, "column": 42}}, {"id": 57, "type": "primitive_type", "text": "int", "parent": 56, "children": [], "start_point": {"row": 47, "column": 39}, "end_point": {"row": 47, "column": 42}}, {"id": 58, "type": "declaration", "text": "void\t\texec( open_file_t, long );", "parent": null, "children": [59, 60], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 32}}, {"id": 59, "type": "primitive_type", "text": "void", "parent": 58, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 4}}, {"id": 60, "type": "function_declarator", "text": "exec( open_file_t, long )", "parent": 58, "children": [61, 62], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 31}}, {"id": 61, "type": "identifier", "text": "exec", "parent": 60, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 10}}, {"id": 62, "type": "parameter_list", "text": "( open_file_t, long )", "parent": 60, "children": [63, 65], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 31}}, {"id": 63, "type": "parameter_declaration", "text": "open_file_t", "parent": 62, "children": [64], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 23}}, {"id": 64, "type": "type_identifier", "text": "open_file_t", "parent": 63, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 23}}, {"id": 65, "type": "parameter_declaration", "text": "long", "parent": 62, "children": [66], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 29}}, {"id": 66, "type": "sized_type_specifier", "text": "long", "parent": 65, "children": [67], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 29}}, {"id": 67, "type": "long", "text": "long", "parent": 66, "children": [], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 29}}]}, "node_categories": {"declarations": {"functions": [10, 25, 32, 47, 60], "variables": [0, 8, 13, 17, 19, 23, 28, 30, 35, 37, 41, 45, 50, 52, 56, 58, 63, 65], "classes": [2, 3], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [4, 7, 11, 20, 26, 29, 33, 36, 42, 48, 51, 53, 61, 64, 66], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 10, "universal_type": "function", "name": "unknown", "text_snippet": "open( char *, int, open_file_t *)"}, {"node_id": 25, "universal_type": "function", "name": "unknown", "text_snippet": "close( open_file_t )"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "read( open_file_t, char *, unsigned int)"}, {"node_id": 47, "universal_type": "function", "name": ")", "text_snippet": "lseek( open_file_t, unsigned int, int )"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "exec( open_file_t, long )"}], "class_declarations": [{"node_id": 2, "universal_type": "class", "name": "file", "text_snippet": "struct file"}, {"node_id": 3, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": []}, "original_source_code": "/* \n * Mach Operating System\n * Copyright (c) 1993 Carnegie Mellon University\n * All Rights Reserved.\n * \n * Permission to use, copy, modify and distribute this software and its\n * documentation is hereby granted, provided that both the copyright\n * notice and this permission notice appear in all copies of the\n * software, derivative works or modified versions, and any portions\n * thereof, and that both notices appear in supporting documentation.\n * \n * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS \"AS IS\"\n * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR\n * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.\n * \n * Carnegie Mellon requests users of this software to return to\n * \n * Software Distribution Coordinator or <EMAIL>\n * School of Computer Science\n * Carnegie Mellon University\n * Pittsburgh PA 15213-3890\n * \n * any improvements or extensions that they make and grant Carnegie Mellon\n * the rights to redistribute these changes.\n */\n/* \n * HISTORY\n * $Log:\tmin_io.h,v $\n * Revision 2.2 93/02/05 08:01:01 danner\n * \tAdapted for alpha.\n * \t[93/02/04 af]\n * \n */\n/*\n *\tFile: min_io.h\n * \tAuthor: <NAME>, Carnegie Mellon University\n *\tDate:\t12/90\n *\n *\tMinimalistic I/O package\n */\n\n\ntypedef struct file *open_file_t;\n\nint\t\topen( char *, int, open_file_t *);\nint\t\tclose( open_file_t );\nint\t\tread( open_file_t, char *, unsigned int);\nint\t\tlseek( open_file_t, unsigned int, int );\n\nvoid\t\texec( open_file_t, long );\n\n"}
372
c
/******************************************************************************* * PROJECT: gLib * * AUTHORS: <NAME>, <NAME>, <NAME>, <NAME> * * DATE CREATED: 01/16/2019 * * Copyright (c) 2019 <NAME> (@Astropilot). All rights reserved. * * Licensed under the MIT License. See LICENSE file in the project root for full * license information. *******************************************************************************/ /** * @file button.h * @brief Header file of the button component of GLib. * * The button component allows you to create a graphical button that can * be manipulated by GLib. * */ #ifndef GLIB_BUTTON_H_ #define GLIB_BUTTON_H_ #include <SDL2/SDL.h> #include "scene.h" #include "sprite.h" typedef struct TScene TScene; /** * @brief Constants of the states of a button. * * TButton_State is a series of predefined constants for the different * states of a button. */ typedef enum TButton_State { BUTTON_NORMAL, /*!< The normal state of the button. */ BUTTON_HOVER /*!< The hover state of the button. */ } TButton_State ; /** * @brief Object oriented structure representing a button. * * TButton is an object that allows you to create and display a button. */ typedef struct TButton { void(*Draw)(struct TButton*, TScene*); /*!< Draw method. */ void(*Free)(struct TButton*); /*!< Free (ressources) method. */ unsigned int is_visible; /*!< Boolean to know if the drawable can be drawed automatically. */ void(*On_Click)(struct TButton*, TScene*); /*!< Callback called when a click event occurs. */ void(*Event_Handler)(struct TButton*, TScene*, SDL_Event); /*!< Method call for processing SDL event */ TSprite *btn_sprite; /*!< A sprite for the button in normal state. */ TSprite *btn_hover_sprite; /*!< A sprite for the button in hover state. */ TButton_State state; /*!< The actual state of the button. */ SDL_Rect pos; /*!< The position and size of the button. */ } TButton ; /** * @brief The constructor for create a TButton object. * * @param scene A pointer to the scene object. * @param btn_s The path of an image file for the button in normal state. * @param btn_hs The path of an image file for the button in hover state. * @param pos The position and size of the button. * @return A memory allocated object of the button. */ TButton* New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos); /** * @brief Method for drawing the button in the interface. * * @param this A pointer to the button object to draw. * @param scene A pointer to the scene object. * * You do not have to call this method directly. You must use the * Draw method of the TButton structure like this: * my_button->Draw(my_button, scene); */ void TButton_Draw(TButton *this, TScene *scene); /** * @brief Method to process an SDL event and change the status of the button or manage clicks. * * @param this A pointer to the button object. * @param scene A pointer to the scene object. * @param event A SDL event. * * You do not have to call this method directly. You must use the * Event_Handler method of the TButton structure like this: * my_button->Event_Handler(my_button, scene, event); */ void TButton_Event_Handler(TButton *this, TScene *scene, SDL_Event event); /** * @brief Method to free all ressources take by the button. * * @param this A pointer to the button object to free. * * You do not have to call this method directly. You must use the * Free method of the TButton structure like this: * my_button->Free(my_button); */ void TButton_New_Free(TButton *this); #endif
38.06
96
(translation_unit) "/*******************************************************************************\n* PROJECT: gLib\n*\n* AUTHORS: <NAME>, <NAME>, <NAME>, <NAME>\n*\n* DATE CREATED: 01/16/2019\n*\n* Copyright (c) 2019 <NAME> (@Astropilot). All rights reserved.\n*\n* Licensed under the MIT License. See LICENSE file in the project root for full\n* license information.\n*******************************************************************************/\n\n/**\n * @file button.h\n * @brief Header file of the button component of GLib.\n *\n * The button component allows you to create a graphical button that can\n * be manipulated by GLib.\n *\n */\n\n#ifndef GLIB_BUTTON_H_\n#define GLIB_BUTTON_H_\n\n#include <SDL2/SDL.h>\n\n#include "scene.h"\n#include "sprite.h"\n\ntypedef struct TScene TScene;\n\n/**\n * @brief Constants of the states of a button.\n *\n * TButton_State is a series of predefined constants for the different\n * states of a button.\n */\ntypedef enum TButton_State {\n BUTTON_NORMAL, /*!< The normal state of the button. */\n BUTTON_HOVER /*!< The hover state of the button. */\n} TButton_State ;\n\n/**\n * @brief Object oriented structure representing a button.\n *\n * TButton is an object that allows you to create and display a button.\n */\ntypedef struct TButton {\n\n void(*Draw)(struct TButton*, TScene*); /*!< Draw method. */\n\n void(*Free)(struct TButton*); /*!< Free (ressources) method. */\n\n unsigned int is_visible; /*!< Boolean to know if the drawable can be drawed automatically. */\n\n void(*On_Click)(struct TButton*, TScene*); /*!< Callback called when a click event occurs. */\n\n void(*Event_Handler)(struct TButton*, TScene*, SDL_Event); /*!< Method call for processing SDL event */\n\n TSprite *btn_sprite; /*!< A sprite for the button in normal state. */\n TSprite *btn_hover_sprite; /*!< A sprite for the button in hover state. */\n TButton_State state; /*!< The actual state of the button. */\n SDL_Rect pos; /*!< The position and size of the button. */\n\n} TButton ;\n\n/**\n * @brief The constructor for create a TButton object.\n *\n * @param scene A pointer to the scene object.\n * @param btn_s The path of an image file for the button in normal state.\n * @param btn_hs The path of an image file for the button in hover state.\n * @param pos The position and size of the button.\n * @return A memory allocated object of the button.\n */\nTButton* New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos);\n\n/**\n * @brief Method for drawing the button in the interface.\n *\n * @param this A pointer to the button object to draw.\n * @param scene A pointer to the scene object.\n *\n * You do not have to call this method directly. You must use the\n * Draw method of the TButton structure like this:\n * my_button->Draw(my_button, scene);\n */\nvoid TButton_Draw(TButton *this, TScene *scene);\n\n/**\n * @brief Method to process an SDL event and change the status of the button or manage clicks.\n *\n * @param this A pointer to the button object.\n * @param scene A pointer to the scene object.\n * @param event A SDL event.\n *\n * You do not have to call this method directly. You must use the\n * Event_Handler method of the TButton structure like this:\n * my_button->Event_Handler(my_button, scene, event);\n */\nvoid TButton_Event_Handler(TButton *this, TScene *scene, SDL_Event event);\n\n/**\n * @brief Method to free all ressources take by the button.\n *\n * @param this A pointer to the button object to free.\n *\n * You do not have to call this method directly. You must use the\n * Free method of the TButton structure like this:\n * my_button->Free(my_button);\n */\nvoid TButton_New_Free(TButton *this);\n\n#endif\n" (comment) "/*******************************************************************************\n* PROJECT: gLib\n*\n* AUTHORS: <NAME>, <NAME>, <NAME>, <NAME>\n*\n* DATE CREATED: 01/16/2019\n*\n* Copyright (c) 2019 <NAME> (@Astropilot). All rights reserved.\n*\n* Licensed under the MIT License. See LICENSE file in the project root for full\n* license information.\n*******************************************************************************/" (comment) "/**\n * @file button.h\n * @brief Header file of the button component of GLib.\n *\n * The button component allows you to create a graphical button that can\n * be manipulated by GLib.\n *\n */" (preproc_ifdef) "#ifndef GLIB_BUTTON_H_\n#define GLIB_BUTTON_H_\n\n#include <SDL2/SDL.h>\n\n#include "scene.h"\n#include "sprite.h"\n\ntypedef struct TScene TScene;\n\n/**\n * @brief Constants of the states of a button.\n *\n * TButton_State is a series of predefined constants for the different\n * states of a button.\n */\ntypedef enum TButton_State {\n BUTTON_NORMAL, /*!< The normal state of the button. */\n BUTTON_HOVER /*!< The hover state of the button. */\n} TButton_State ;\n\n/**\n * @brief Object oriented structure representing a button.\n *\n * TButton is an object that allows you to create and display a button.\n */\ntypedef struct TButton {\n\n void(*Draw)(struct TButton*, TScene*); /*!< Draw method. */\n\n void(*Free)(struct TButton*); /*!< Free (ressources) method. */\n\n unsigned int is_visible; /*!< Boolean to know if the drawable can be drawed automatically. */\n\n void(*On_Click)(struct TButton*, TScene*); /*!< Callback called when a click event occurs. */\n\n void(*Event_Handler)(struct TButton*, TScene*, SDL_Event); /*!< Method call for processing SDL event */\n\n TSprite *btn_sprite; /*!< A sprite for the button in normal state. */\n TSprite *btn_hover_sprite; /*!< A sprite for the button in hover state. */\n TButton_State state; /*!< The actual state of the button. */\n SDL_Rect pos; /*!< The position and size of the button. */\n\n} TButton ;\n\n/**\n * @brief The constructor for create a TButton object.\n *\n * @param scene A pointer to the scene object.\n * @param btn_s The path of an image file for the button in normal state.\n * @param btn_hs The path of an image file for the button in hover state.\n * @param pos The position and size of the button.\n * @return A memory allocated object of the button.\n */\nTButton* New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos);\n\n/**\n * @brief Method for drawing the button in the interface.\n *\n * @param this A pointer to the button object to draw.\n * @param scene A pointer to the scene object.\n *\n * You do not have to call this method directly. You must use the\n * Draw method of the TButton structure like this:\n * my_button->Draw(my_button, scene);\n */\nvoid TButton_Draw(TButton *this, TScene *scene);\n\n/**\n * @brief Method to process an SDL event and change the status of the button or manage clicks.\n *\n * @param this A pointer to the button object.\n * @param scene A pointer to the scene object.\n * @param event A SDL event.\n *\n * You do not have to call this method directly. You must use the\n * Event_Handler method of the TButton structure like this:\n * my_button->Event_Handler(my_button, scene, event);\n */\nvoid TButton_Event_Handler(TButton *this, TScene *scene, SDL_Event event);\n\n/**\n * @brief Method to free all ressources take by the button.\n *\n * @param this A pointer to the button object to free.\n *\n * You do not have to call this method directly. You must use the\n * Free method of the TButton structure like this:\n * my_button->Free(my_button);\n */\nvoid TButton_New_Free(TButton *this);\n\n#endif" (#ifndef) "#ifndef" (identifier) "GLIB_BUTTON_H_" (preproc_def) "#define GLIB_BUTTON_H_\n" (#define) "#define" (identifier) "GLIB_BUTTON_H_" (preproc_include) "#include <SDL2/SDL.h>\n" (#include) "#include" (system_lib_string) "<SDL2/SDL.h>" (preproc_include) "#include "scene.h"\n" (#include) "#include" (string_literal) ""scene.h"" (") """ (string_content) "scene.h" (") """ (preproc_include) "#include "sprite.h"\n" (#include) "#include" (string_literal) ""sprite.h"" (") """ (string_content) "sprite.h" (") """ (type_definition) "typedef struct TScene TScene;" (typedef) "typedef" (struct_specifier) "struct TScene" (struct) "struct" (type_identifier) "TScene" (type_identifier) "TScene" (;) ";" (comment) "/**\n * @brief Constants of the states of a button.\n *\n * TButton_State is a series of predefined constants for the different\n * states of a button.\n */" (type_definition) "typedef enum TButton_State {\n BUTTON_NORMAL, /*!< The normal state of the button. */\n BUTTON_HOVER /*!< The hover state of the button. */\n} TButton_State ;" (typedef) "typedef" (enum_specifier) "enum TButton_State {\n BUTTON_NORMAL, /*!< The normal state of the button. */\n BUTTON_HOVER /*!< The hover state of the button. */\n}" (enum) "enum" (type_identifier) "TButton_State" (enumerator_list) "{\n BUTTON_NORMAL, /*!< The normal state of the button. */\n BUTTON_HOVER /*!< The hover state of the button. */\n}" ({) "{" (enumerator) "BUTTON_NORMAL" (identifier) "BUTTON_NORMAL" (,) "," (comment) "/*!< The normal state of the button. */" (enumerator) "BUTTON_HOVER" (identifier) "BUTTON_HOVER" (comment) "/*!< The hover state of the button. */" (}) "}" (type_identifier) "TButton_State" (;) ";" (comment) "/**\n * @brief Object oriented structure representing a button.\n *\n * TButton is an object that allows you to create and display a button.\n */" (type_definition) "typedef struct TButton {\n\n void(*Draw)(struct TButton*, TScene*); /*!< Draw method. */\n\n void(*Free)(struct TButton*); /*!< Free (ressources) method. */\n\n unsigned int is_visible; /*!< Boolean to know if the drawable can be drawed automatically. */\n\n void(*On_Click)(struct TButton*, TScene*); /*!< Callback called when a click event occurs. */\n\n void(*Event_Handler)(struct TButton*, TScene*, SDL_Event); /*!< Method call for processing SDL event */\n\n TSprite *btn_sprite; /*!< A sprite for the button in normal state. */\n TSprite *btn_hover_sprite; /*!< A sprite for the button in hover state. */\n TButton_State state; /*!< The actual state of the button. */\n SDL_Rect pos; /*!< The position and size of the button. */\n\n} TButton ;" (typedef) "typedef" (struct_specifier) "struct TButton {\n\n void(*Draw)(struct TButton*, TScene*); /*!< Draw method. */\n\n void(*Free)(struct TButton*); /*!< Free (ressources) method. */\n\n unsigned int is_visible; /*!< Boolean to know if the drawable can be drawed automatically. */\n\n void(*On_Click)(struct TButton*, TScene*); /*!< Callback called when a click event occurs. */\n\n void(*Event_Handler)(struct TButton*, TScene*, SDL_Event); /*!< Method call for processing SDL event */\n\n TSprite *btn_sprite; /*!< A sprite for the button in normal state. */\n TSprite *btn_hover_sprite; /*!< A sprite for the button in hover state. */\n TButton_State state; /*!< The actual state of the button. */\n SDL_Rect pos; /*!< The position and size of the button. */\n\n}" (struct) "struct" (type_identifier) "TButton" (field_declaration_list) "{\n\n void(*Draw)(struct TButton*, TScene*); /*!< Draw method. */\n\n void(*Free)(struct TButton*); /*!< Free (ressources) method. */\n\n unsigned int is_visible; /*!< Boolean to know if the drawable can be drawed automatically. */\n\n void(*On_Click)(struct TButton*, TScene*); /*!< Callback called when a click event occurs. */\n\n void(*Event_Handler)(struct TButton*, TScene*, SDL_Event); /*!< Method call for processing SDL event */\n\n TSprite *btn_sprite; /*!< A sprite for the button in normal state. */\n TSprite *btn_hover_sprite; /*!< A sprite for the button in hover state. */\n TButton_State state; /*!< The actual state of the button. */\n SDL_Rect pos; /*!< The position and size of the button. */\n\n}" ({) "{" (field_declaration) "void(*Draw)(struct TButton*, TScene*);" (primitive_type) "void" (function_declarator) "(*Draw)(struct TButton*, TScene*)" (parenthesized_declarator) "(*Draw)" (() "(" (pointer_declarator) "*Draw" (*) "*" (field_identifier) "Draw" ()) ")" (parameter_list) "(struct TButton*, TScene*)" (() "(" (parameter_declaration) "struct TButton*" (struct_specifier) "struct TButton" (struct) "struct" (type_identifier) "TButton" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "TScene*" (type_identifier) "TScene" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (comment) "/*!< Draw method. */" (field_declaration) "void(*Free)(struct TButton*);" (primitive_type) "void" (function_declarator) "(*Free)(struct TButton*)" (parenthesized_declarator) "(*Free)" (() "(" (pointer_declarator) "*Free" (*) "*" (field_identifier) "Free" ()) ")" (parameter_list) "(struct TButton*)" (() "(" (parameter_declaration) "struct TButton*" (struct_specifier) "struct TButton" (struct) "struct" (type_identifier) "TButton" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (comment) "/*!< Free (ressources) method. */" (field_declaration) "unsigned int is_visible;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (field_identifier) "is_visible" (;) ";" (comment) "/*!< Boolean to know if the drawable can be drawed automatically. */" (field_declaration) "void(*On_Click)(struct TButton*, TScene*);" (primitive_type) "void" (function_declarator) "(*On_Click)(struct TButton*, TScene*)" (parenthesized_declarator) "(*On_Click)" (() "(" (pointer_declarator) "*On_Click" (*) "*" (field_identifier) "On_Click" ()) ")" (parameter_list) "(struct TButton*, TScene*)" (() "(" (parameter_declaration) "struct TButton*" (struct_specifier) "struct TButton" (struct) "struct" (type_identifier) "TButton" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "TScene*" (type_identifier) "TScene" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (comment) "/*!< Callback called when a click event occurs. */" (field_declaration) "void(*Event_Handler)(struct TButton*, TScene*, SDL_Event);" (primitive_type) "void" (function_declarator) "(*Event_Handler)(struct TButton*, TScene*, SDL_Event)" (parenthesized_declarator) "(*Event_Handler)" (() "(" (pointer_declarator) "*Event_Handler" (*) "*" (field_identifier) "Event_Handler" ()) ")" (parameter_list) "(struct TButton*, TScene*, SDL_Event)" (() "(" (parameter_declaration) "struct TButton*" (struct_specifier) "struct TButton" (struct) "struct" (type_identifier) "TButton" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "TScene*" (type_identifier) "TScene" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "SDL_Event" (type_identifier) "SDL_Event" ()) ")" (;) ";" (comment) "/*!< Method call for processing SDL event */" (field_declaration) "TSprite *btn_sprite;" (type_identifier) "TSprite" (pointer_declarator) "*btn_sprite" (*) "*" (field_identifier) "btn_sprite" (;) ";" (comment) "/*!< A sprite for the button in normal state. */" (field_declaration) "TSprite *btn_hover_sprite;" (type_identifier) "TSprite" (pointer_declarator) "*btn_hover_sprite" (*) "*" (field_identifier) "btn_hover_sprite" (;) ";" (comment) "/*!< A sprite for the button in hover state. */" (field_declaration) "TButton_State state;" (type_identifier) "TButton_State" (field_identifier) "state" (;) ";" (comment) "/*!< The actual state of the button. */" (field_declaration) "SDL_Rect pos;" (type_identifier) "SDL_Rect" (field_identifier) "pos" (;) ";" (comment) "/*!< The position and size of the button. */" (}) "}" (type_identifier) "TButton" (;) ";" (comment) "/**\n * @brief The constructor for create a TButton object.\n *\n * @param scene A pointer to the scene object.\n * @param btn_s The path of an image file for the button in normal state.\n * @param btn_hs The path of an image file for the button in hover state.\n * @param pos The position and size of the button.\n * @return A memory allocated object of the button.\n */" (declaration) "TButton* New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos);" (type_identifier) "TButton" (pointer_declarator) "* New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos)" (*) "*" (function_declarator) "New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos)" (identifier) "New_TButton" (parameter_list) "(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos)" (() "(" (parameter_declaration) "TScene *scene" (type_identifier) "TScene" (pointer_declarator) "*scene" (*) "*" (identifier) "scene" (,) "," (parameter_declaration) "const char *btn_s" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*btn_s" (*) "*" (identifier) "btn_s" (,) "," (parameter_declaration) "const char *btn_hs" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*btn_hs" (*) "*" (identifier) "btn_hs" (,) "," (parameter_declaration) "SDL_Rect pos" (type_identifier) "SDL_Rect" (identifier) "pos" ()) ")" (;) ";" (comment) "/**\n * @brief Method for drawing the button in the interface.\n *\n * @param this A pointer to the button object to draw.\n * @param scene A pointer to the scene object.\n *\n * You do not have to call this method directly. You must use the\n * Draw method of the TButton structure like this:\n * my_button->Draw(my_button, scene);\n */" (declaration) "void TButton_Draw(TButton *this, TScene *scene);" (primitive_type) "void" (function_declarator) "TButton_Draw(TButton *this, TScene *scene)" (identifier) "TButton_Draw" (parameter_list) "(TButton *this, TScene *scene)" (() "(" (parameter_declaration) "TButton *this" (type_identifier) "TButton" (pointer_declarator) "*this" (*) "*" (identifier) "this" (,) "," (parameter_declaration) "TScene *scene" (type_identifier) "TScene" (pointer_declarator) "*scene" (*) "*" (identifier) "scene" ()) ")" (;) ";" (comment) "/**\n * @brief Method to process an SDL event and change the status of the button or manage clicks.\n *\n * @param this A pointer to the button object.\n * @param scene A pointer to the scene object.\n * @param event A SDL event.\n *\n * You do not have to call this method directly. You must use the\n * Event_Handler method of the TButton structure like this:\n * my_button->Event_Handler(my_button, scene, event);\n */" (declaration) "void TButton_Event_Handler(TButton *this, TScene *scene, SDL_Event event);" (primitive_type) "void" (function_declarator) "TButton_Event_Handler(TButton *this, TScene *scene, SDL_Event event)" (identifier) "TButton_Event_Handler" (parameter_list) "(TButton *this, TScene *scene, SDL_Event event)" (() "(" (parameter_declaration) "TButton *this" (type_identifier) "TButton" (pointer_declarator) "*this" (*) "*" (identifier) "this" (,) "," (parameter_declaration) "TScene *scene" (type_identifier) "TScene" (pointer_declarator) "*scene" (*) "*" (identifier) "scene" (,) "," (parameter_declaration) "SDL_Event event" (type_identifier) "SDL_Event" (identifier) "event" ()) ")" (;) ";" (comment) "/**\n * @brief Method to free all ressources take by the button.\n *\n * @param this A pointer to the button object to free.\n *\n * You do not have to call this method directly. You must use the\n * Free method of the TButton structure like this:\n * my_button->Free(my_button);\n */" (declaration) "void TButton_New_Free(TButton *this);" (primitive_type) "void" (function_declarator) "TButton_New_Free(TButton *this)" (identifier) "TButton_New_Free" (parameter_list) "(TButton *this)" (() "(" (parameter_declaration) "TButton *this" (type_identifier) "TButton" (pointer_declarator) "*this" (*) "*" (identifier) "this" ()) ")" (;) ";" (#endif) "#endif"
284
0
{"language": "c", "success": true, "metadata": {"lines": 96, "avg_line_length": 38.06, "nodes": 198, "errors": 0, "source_hash": "974b541b7529511bd8fa63159ac784854cac94b0b65593ae33863bc443aabb62", "categorized_nodes": 126}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef GLIB_BUTTON_H_\n#define GLIB_BUTTON_H_\n\n#include <SDL2/SDL.h>\n\n#include \"scene.h\"\n#include \"sprite.h\"\n\ntypedef struct TScene TScene;\n\n/**\n * @brief Constants of the states of a button.\n *\n * TButton_State is a series of predefined constants for the different\n * states of a button.\n */\ntypedef enum TButton_State {\n BUTTON_NORMAL, /*!< The normal state of the button. */\n BUTTON_HOVER /*!< The hover state of the button. */\n} TButton_State ;\n\n/**\n * @brief Object oriented structure representing a button.\n *\n * TButton is an object that allows you to create and display a button.\n */\ntypedef struct TButton {\n\n void(*Draw)(struct TButton*, TScene*); /*!< Draw method. */\n\n void(*Free)(struct TButton*); /*!< Free (ressources) method. */\n\n unsigned int is_visible; /*!< Boolean to know if the drawable can be drawed automatically. */\n\n void(*On_Click)(struct TButton*, TScene*); /*!< Callback called when a click event occurs. */\n\n void(*Event_Handler)(struct TButton*, TScene*, SDL_Event); /*!< Method call for processing SDL event */\n\n TSprite *btn_sprite; /*!< A sprite for the button in normal state. */\n TSprite *btn_hover_sprite; /*!< A sprite for the button in hover state. */\n TButton_State state; /*!< The actual state of the button. */\n SDL_Rect pos; /*!< The position and size of the button. */\n\n} TButton ;\n\n/**\n * @brief The constructor for create a TButton object.\n *\n * @param scene A pointer to the scene object.\n * @param btn_s The path of an image file for the button in normal state.\n * @param btn_hs The path of an image file for the button in hover state.\n * @param pos The position and size of the button.\n * @return A memory allocated object of the button.\n */\nTButton* New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos);\n\n/**\n * @brief Method for drawing the button in the interface.\n *\n * @param this A pointer to the button object to draw.\n * @param scene A pointer to the scene object.\n *\n * You do not have to call this method directly. You must use the\n * Draw method of the TButton structure like this:\n * my_button->Draw(my_button, scene);\n */\nvoid TButton_Draw(TButton *this, TScene *scene);\n\n/**\n * @brief Method to process an SDL event and change the status of the button or manage clicks.\n *\n * @param this A pointer to the button object.\n * @param scene A pointer to the scene object.\n * @param event A SDL event.\n *\n * You do not have to call this method directly. You must use the\n * Event_Handler method of the TButton structure like this:\n * my_button->Event_Handler(my_button, scene, event);\n */\nvoid TButton_Event_Handler(TButton *this, TScene *scene, SDL_Event event);\n\n/**\n * @brief Method to free all ressources take by the button.\n *\n * @param this A pointer to the button object to free.\n *\n * You do not have to call this method directly. You must use the\n * Free method of the TButton structure like this:\n * my_button->Free(my_button);\n */\nvoid TButton_New_Free(TButton *this);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 21, 32, 129, 154, 169, 187, 197], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 114, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 2, "type": "identifier", "text": "GLIB_BUTTON_H_", "parent": 0, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define GLIB_BUTTON_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 5, "type": "identifier", "text": "GLIB_BUTTON_H_", "parent": 3, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include <SDL2/SDL.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<SDL2/SDL.h>", "parent": 6, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 21}}, {"id": 9, "type": "preproc_include", "text": "#include \"scene.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"scene.h\"", "parent": 9, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include \"sprite.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"sprite.h\"", "parent": 12, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 19}}, {"id": 15, "type": "type_definition", "text": "typedef struct TScene TScene;", "parent": 0, "children": [16, 17, 20], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 29}}, {"id": 16, "type": "typedef", "text": "typedef", "parent": 15, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 17, "type": "struct_specifier", "text": "struct TScene", "parent": 15, "children": [18, 19], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 21}}, {"id": 18, "type": "struct", "text": "struct", "parent": 17, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 14}}, {"id": 19, "type": "type_identifier", "text": "TScene", "parent": 17, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 21}}, {"id": 20, "type": "type_identifier", "text": "TScene", "parent": 15, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 28}}, {"id": 21, "type": "type_definition", "text": "typedef enum TButton_State {\n BUTTON_NORMAL, /*!< The normal state of the button. */\n BUTTON_HOVER /*!< The hover state of the button. */\n} TButton_State ;", "parent": 0, "children": [22, 23, 31], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 41, "column": 17}}, {"id": 22, "type": "typedef", "text": "typedef", "parent": 21, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 23, "type": "enum_specifier", "text": "enum TButton_State {\n BUTTON_NORMAL, /*!< The normal state of the button. */\n BUTTON_HOVER /*!< The hover state of the button. */\n}", "parent": 21, "children": [24, 25, 26], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 41, "column": 1}}, {"id": 24, "type": "enum", "text": "enum", "parent": 23, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 12}}, {"id": 25, "type": "type_identifier", "text": "TButton_State", "parent": 23, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 26}}, {"id": 26, "type": "enumerator_list", "text": "{\n BUTTON_NORMAL, /*!< The normal state of the button. */\n BUTTON_HOVER /*!< The hover state of the button. */\n}", "parent": 23, "children": [27, 29], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 41, "column": 1}}, {"id": 27, "type": "enumerator", "text": "BUTTON_NORMAL", "parent": 26, "children": [28], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 17}}, {"id": 28, "type": "identifier", "text": "BUTTON_NORMAL", "parent": 27, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 17}}, {"id": 29, "type": "enumerator", "text": "BUTTON_HOVER", "parent": 26, "children": [30], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 16}}, {"id": 30, "type": "identifier", "text": "BUTTON_HOVER", "parent": 29, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 16}}, {"id": 31, "type": "type_identifier", "text": "TButton_State", "parent": 21, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 15}}, {"id": 32, "type": "type_definition", "text": "typedef struct TButton {\n\n void(*Draw)(struct TButton*, TScene*); /*!< Draw method. */\n\n void(*Free)(struct TButton*); /*!< Free (ressources) method. */\n\n unsigned int is_visible; /*!< Boolean to know if the drawable can be drawed automatically. */\n\n void(*On_Click)(struct TButton*, TScene*); /*!< Callback called when a click event occurs. */\n\n void(*Event_Handler)(struct TButton*, TScene*, SDL_Event); /*!< Method call for processing SDL event */\n\n TSprite *btn_sprite; /*!< A sprite for the button in normal state. */\n TSprite *btn_hover_sprite; /*!< A sprite for the button in hover state. */\n TButton_State state; /*!< The actual state of the button. */\n SDL_Rect pos; /*!< The position and size of the button. */\n\n} TButton ;", "parent": 0, "children": [33, 34, 128], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 65, "column": 11}}, {"id": 33, "type": "typedef", "text": "typedef", "parent": 32, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 7}}, {"id": 34, "type": "struct_specifier", "text": "struct TButton {\n\n void(*Draw)(struct TButton*, TScene*); /*!< Draw method. */\n\n void(*Free)(struct TButton*); /*!< Free (ressources) method. */\n\n unsigned int is_visible; /*!< Boolean to know if the drawable can be drawed automatically. */\n\n void(*On_Click)(struct TButton*, TScene*); /*!< Callback called when a click event occurs. */\n\n void(*Event_Handler)(struct TButton*, TScene*, SDL_Event); /*!< Method call for processing SDL event */\n\n TSprite *btn_sprite; /*!< A sprite for the button in normal state. */\n TSprite *btn_hover_sprite; /*!< A sprite for the button in hover state. */\n TButton_State state; /*!< The actual state of the button. */\n SDL_Rect pos; /*!< The position and size of the button. */\n\n}", "parent": 32, "children": [35, 36], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 65, "column": 1}}, {"id": 35, "type": "struct", "text": "struct", "parent": 34, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 14}}, {"id": 36, "type": "type_identifier", "text": "TButton", "parent": 34, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 22}}, {"id": 37, "type": "field_declaration", "text": "void(*Draw)(struct TButton*, TScene*);", "parent": 34, "children": [38, 39], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 42}}, {"id": 38, "type": "primitive_type", "text": "void", "parent": 37, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 8}}, {"id": 39, "type": "function_declarator", "text": "(*Draw)(struct TButton*, TScene*)", "parent": 37, "children": [40, 44], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 41}}, {"id": 40, "type": "parenthesized_declarator", "text": "(*Draw)", "parent": 39, "children": [41], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 15}}, {"id": 41, "type": "pointer_declarator", "text": "*Draw", "parent": 40, "children": [42, 43], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 14}}, {"id": 42, "type": "*", "text": "*", "parent": 41, "children": [], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 10}}, {"id": 43, "type": "field_identifier", "text": "Draw", "parent": 41, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 14}}, {"id": 44, "type": "parameter_list", "text": "(struct TButton*, TScene*)", "parent": 39, "children": [45, 51], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 41}}, {"id": 45, "type": "parameter_declaration", "text": "struct TButton*", "parent": 44, "children": [46, 49], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 31}}, {"id": 46, "type": "struct_specifier", "text": "struct TButton", "parent": 45, "children": [47, 48], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 30}}, {"id": 47, "type": "struct", "text": "struct", "parent": 46, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 22}}, {"id": 48, "type": "type_identifier", "text": "TButton", "parent": 46, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 30}}, {"id": 49, "type": "abstract_pointer_declarator", "text": "*", "parent": 45, "children": [50], "start_point": {"row": 50, "column": 30}, "end_point": {"row": 50, "column": 31}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 50, "column": 30}, "end_point": {"row": 50, "column": 31}}, {"id": 51, "type": "parameter_declaration", "text": "TScene*", "parent": 44, "children": [52, 53], "start_point": {"row": 50, "column": 33}, "end_point": {"row": 50, "column": 40}}, {"id": 52, "type": "type_identifier", "text": "TScene", "parent": 51, "children": [], "start_point": {"row": 50, "column": 33}, "end_point": {"row": 50, "column": 39}}, {"id": 53, "type": "abstract_pointer_declarator", "text": "*", "parent": 51, "children": [54], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 40}}, {"id": 54, "type": "*", "text": "*", "parent": 53, "children": [], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 40}}, {"id": 55, "type": "field_declaration", "text": "void(*Free)(struct TButton*);", "parent": 34, "children": [56, 57], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 33}}, {"id": 56, "type": "primitive_type", "text": "void", "parent": 55, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 8}}, {"id": 57, "type": "function_declarator", "text": "(*Free)(struct TButton*)", "parent": 55, "children": [58, 62], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 32}}, {"id": 58, "type": "parenthesized_declarator", "text": "(*Free)", "parent": 57, "children": [59], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 15}}, {"id": 59, "type": "pointer_declarator", "text": "*Free", "parent": 58, "children": [60, 61], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 14}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 10}}, {"id": 61, "type": "field_identifier", "text": "Free", "parent": 59, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 14}}, {"id": 62, "type": "parameter_list", "text": "(struct TButton*)", "parent": 57, "children": [63], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 32}}, {"id": 63, "type": "parameter_declaration", "text": "struct TButton*", "parent": 62, "children": [64, 67], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 31}}, {"id": 64, "type": "struct_specifier", "text": "struct TButton", "parent": 63, "children": [65, 66], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 30}}, {"id": 65, "type": "struct", "text": "struct", "parent": 64, "children": [], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 22}}, {"id": 66, "type": "type_identifier", "text": "TButton", "parent": 64, "children": [], "start_point": {"row": 52, "column": 23}, "end_point": {"row": 52, "column": 30}}, {"id": 67, "type": "abstract_pointer_declarator", "text": "*", "parent": 63, "children": [68], "start_point": {"row": 52, "column": 30}, "end_point": {"row": 52, "column": 31}}, {"id": 68, "type": "*", "text": "*", "parent": 67, "children": [], "start_point": {"row": 52, "column": 30}, "end_point": {"row": 52, "column": 31}}, {"id": 69, "type": "field_declaration", "text": "unsigned int is_visible;", "parent": 34, "children": [70, 73], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 28}}, {"id": 70, "type": "sized_type_specifier", "text": "unsigned int", "parent": 69, "children": [71, 72], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 16}}, {"id": 71, "type": "unsigned", "text": "unsigned", "parent": 70, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 12}}, {"id": 72, "type": "primitive_type", "text": "int", "parent": 70, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 16}}, {"id": 73, "type": "field_identifier", "text": "is_visible", "parent": 69, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 27}}, {"id": 74, "type": "field_declaration", "text": "void(*On_Click)(struct TButton*, TScene*);", "parent": 34, "children": [75, 76], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 46}}, {"id": 75, "type": "primitive_type", "text": "void", "parent": 74, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 8}}, {"id": 76, "type": "function_declarator", "text": "(*On_Click)(struct TButton*, TScene*)", "parent": 74, "children": [77, 81], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 45}}, {"id": 77, "type": "parenthesized_declarator", "text": "(*On_Click)", "parent": 76, "children": [78], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 19}}, {"id": 78, "type": "pointer_declarator", "text": "*On_Click", "parent": 77, "children": [79, 80], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 18}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 10}}, {"id": 80, "type": "field_identifier", "text": "On_Click", "parent": 78, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 18}}, {"id": 81, "type": "parameter_list", "text": "(struct TButton*, TScene*)", "parent": 76, "children": [82, 88], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 45}}, {"id": 82, "type": "parameter_declaration", "text": "struct TButton*", "parent": 81, "children": [83, 86], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 35}}, {"id": 83, "type": "struct_specifier", "text": "struct TButton", "parent": 82, "children": [84, 85], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 34}}, {"id": 84, "type": "struct", "text": "struct", "parent": 83, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 26}}, {"id": 85, "type": "type_identifier", "text": "TButton", "parent": 83, "children": [], "start_point": {"row": 56, "column": 27}, "end_point": {"row": 56, "column": 34}}, {"id": 86, "type": "abstract_pointer_declarator", "text": "*", "parent": 82, "children": [87], "start_point": {"row": 56, "column": 34}, "end_point": {"row": 56, "column": 35}}, {"id": 87, "type": "*", "text": "*", "parent": 86, "children": [], "start_point": {"row": 56, "column": 34}, "end_point": {"row": 56, "column": 35}}, {"id": 88, "type": "parameter_declaration", "text": "TScene*", "parent": 81, "children": [89, 90], "start_point": {"row": 56, "column": 37}, "end_point": {"row": 56, "column": 44}}, {"id": 89, "type": "type_identifier", "text": "TScene", "parent": 88, "children": [], "start_point": {"row": 56, "column": 37}, "end_point": {"row": 56, "column": 43}}, {"id": 90, "type": "abstract_pointer_declarator", "text": "*", "parent": 88, "children": [91], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 44}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 44}}, {"id": 92, "type": "field_declaration", "text": "void(*Event_Handler)(struct TButton*, TScene*, SDL_Event);", "parent": 34, "children": [93, 94], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 62}}, {"id": 93, "type": "primitive_type", "text": "void", "parent": 92, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 8}}, {"id": 94, "type": "function_declarator", "text": "(*Event_Handler)(struct TButton*, TScene*, SDL_Event)", "parent": 92, "children": [95, 99], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 61}}, {"id": 95, "type": "parenthesized_declarator", "text": "(*Event_Handler)", "parent": 94, "children": [96], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 24}}, {"id": 96, "type": "pointer_declarator", "text": "*Event_Handler", "parent": 95, "children": [97, 98], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 23}}, {"id": 97, "type": "*", "text": "*", "parent": 96, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 10}}, {"id": 98, "type": "field_identifier", "text": "Event_Handler", "parent": 96, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 23}}, {"id": 99, "type": "parameter_list", "text": "(struct TButton*, TScene*, SDL_Event)", "parent": 94, "children": [100, 106, 110], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 61}}, {"id": 100, "type": "parameter_declaration", "text": "struct TButton*", "parent": 99, "children": [101, 104], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 40}}, {"id": 101, "type": "struct_specifier", "text": "struct TButton", "parent": 100, "children": [102, 103], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 39}}, {"id": 102, "type": "struct", "text": "struct", "parent": 101, "children": [], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 31}}, {"id": 103, "type": "type_identifier", "text": "TButton", "parent": 101, "children": [], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 39}}, {"id": 104, "type": "abstract_pointer_declarator", "text": "*", "parent": 100, "children": [105], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 40}}, {"id": 105, "type": "*", "text": "*", "parent": 104, "children": [], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 40}}, {"id": 106, "type": "parameter_declaration", "text": "TScene*", "parent": 99, "children": [107, 108], "start_point": {"row": 58, "column": 42}, "end_point": {"row": 58, "column": 49}}, {"id": 107, "type": "type_identifier", "text": "TScene", "parent": 106, "children": [], "start_point": {"row": 58, "column": 42}, "end_point": {"row": 58, "column": 48}}, {"id": 108, "type": "abstract_pointer_declarator", "text": "*", "parent": 106, "children": [109], "start_point": {"row": 58, "column": 48}, "end_point": {"row": 58, "column": 49}}, {"id": 109, "type": "*", "text": "*", "parent": 108, "children": [], "start_point": {"row": 58, "column": 48}, "end_point": {"row": 58, "column": 49}}, {"id": 110, "type": "parameter_declaration", "text": "SDL_Event", "parent": 99, "children": [111], "start_point": {"row": 58, "column": 51}, "end_point": {"row": 58, "column": 60}}, {"id": 111, "type": "type_identifier", "text": "SDL_Event", "parent": 110, "children": [], "start_point": {"row": 58, "column": 51}, "end_point": {"row": 58, "column": 60}}, {"id": 112, "type": "field_declaration", "text": "TSprite *btn_sprite;", "parent": 34, "children": [113, 114], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 24}}, {"id": 113, "type": "type_identifier", "text": "TSprite", "parent": 112, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 11}}, {"id": 114, "type": "pointer_declarator", "text": "*btn_sprite", "parent": 112, "children": [115, 116], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 23}}, {"id": 115, "type": "*", "text": "*", "parent": 114, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 13}}, {"id": 116, "type": "field_identifier", "text": "btn_sprite", "parent": 114, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 23}}, {"id": 117, "type": "field_declaration", "text": "TSprite *btn_hover_sprite;", "parent": 34, "children": [118, 119], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 30}}, {"id": 118, "type": "type_identifier", "text": "TSprite", "parent": 117, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 11}}, {"id": 119, "type": "pointer_declarator", "text": "*btn_hover_sprite", "parent": 117, "children": [120, 121], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 29}}, {"id": 120, "type": "*", "text": "*", "parent": 119, "children": [], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 13}}, {"id": 121, "type": "field_identifier", "text": "btn_hover_sprite", "parent": 119, "children": [], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 29}}, {"id": 122, "type": "field_declaration", "text": "TButton_State state;", "parent": 34, "children": [123, 124], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 24}}, {"id": 123, "type": "type_identifier", "text": "TButton_State", "parent": 122, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 17}}, {"id": 124, "type": "field_identifier", "text": "state", "parent": 122, "children": [], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 23}}, {"id": 125, "type": "field_declaration", "text": "SDL_Rect pos;", "parent": 34, "children": [126, 127], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 17}}, {"id": 126, "type": "type_identifier", "text": "SDL_Rect", "parent": 125, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 12}}, {"id": 127, "type": "field_identifier", "text": "pos", "parent": 125, "children": [], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 63, "column": 16}}, {"id": 128, "type": "type_identifier", "text": "TButton", "parent": 32, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 9}}, {"id": 129, "type": "declaration", "text": "TButton* New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos);", "parent": 0, "children": [130, 131], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 89}}, {"id": 130, "type": "type_identifier", "text": "TButton", "parent": 129, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 7}}, {"id": 131, "type": "pointer_declarator", "text": "* New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos)", "parent": 129, "children": [132, 133], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 88}}, {"id": 132, "type": "*", "text": "*", "parent": 131, "children": [], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 8}}, {"id": 133, "type": "function_declarator", "text": "New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos)", "parent": 131, "children": [134, 135], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 88}}, {"id": 134, "type": "identifier", "text": "New_TButton", "parent": 133, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 20}}, {"id": 135, "type": "parameter_list", "text": "(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos)", "parent": 133, "children": [136, 141, 146, 151], "start_point": {"row": 76, "column": 20}, "end_point": {"row": 76, "column": 88}}, {"id": 136, "type": "parameter_declaration", "text": "TScene *scene", "parent": 135, "children": [137, 138], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 34}}, {"id": 137, "type": "type_identifier", "text": "TScene", "parent": 136, "children": [], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 27}}, {"id": 138, "type": "pointer_declarator", "text": "*scene", "parent": 136, "children": [139, 140], "start_point": {"row": 76, "column": 28}, "end_point": {"row": 76, "column": 34}}, {"id": 139, "type": "*", "text": "*", "parent": 138, "children": [], "start_point": {"row": 76, "column": 28}, "end_point": {"row": 76, "column": 29}}, {"id": 140, "type": "identifier", "text": "scene", "parent": 138, "children": [], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 76, "column": 34}}, {"id": 141, "type": "parameter_declaration", "text": "const char *btn_s", "parent": 135, "children": [142, 143], "start_point": {"row": 76, "column": 36}, "end_point": {"row": 76, "column": 53}}, {"id": 142, "type": "primitive_type", "text": "char", "parent": 141, "children": [], "start_point": {"row": 76, "column": 42}, "end_point": {"row": 76, "column": 46}}, {"id": 143, "type": "pointer_declarator", "text": "*btn_s", "parent": 141, "children": [144, 145], "start_point": {"row": 76, "column": 47}, "end_point": {"row": 76, "column": 53}}, {"id": 144, "type": "*", "text": "*", "parent": 143, "children": [], "start_point": {"row": 76, "column": 47}, "end_point": {"row": 76, "column": 48}}, {"id": 145, "type": "identifier", "text": "btn_s", "parent": 143, "children": [], "start_point": {"row": 76, "column": 48}, "end_point": {"row": 76, "column": 53}}, {"id": 146, "type": "parameter_declaration", "text": "const char *btn_hs", "parent": 135, "children": [147, 148], "start_point": {"row": 76, "column": 55}, "end_point": {"row": 76, "column": 73}}, {"id": 147, "type": "primitive_type", "text": "char", "parent": 146, "children": [], "start_point": {"row": 76, "column": 61}, "end_point": {"row": 76, "column": 65}}, {"id": 148, "type": "pointer_declarator", "text": "*btn_hs", "parent": 146, "children": [149, 150], "start_point": {"row": 76, "column": 66}, "end_point": {"row": 76, "column": 73}}, {"id": 149, "type": "*", "text": "*", "parent": 148, "children": [], "start_point": {"row": 76, "column": 66}, "end_point": {"row": 76, "column": 67}}, {"id": 150, "type": "identifier", "text": "btn_hs", "parent": 148, "children": [], "start_point": {"row": 76, "column": 67}, "end_point": {"row": 76, "column": 73}}, {"id": 151, "type": "parameter_declaration", "text": "SDL_Rect pos", "parent": 135, "children": [152, 153], "start_point": {"row": 76, "column": 75}, "end_point": {"row": 76, "column": 87}}, {"id": 152, "type": "type_identifier", "text": "SDL_Rect", "parent": 151, "children": [], "start_point": {"row": 76, "column": 75}, "end_point": {"row": 76, "column": 83}}, {"id": 153, "type": "identifier", "text": "pos", "parent": 151, "children": [], "start_point": {"row": 76, "column": 84}, "end_point": {"row": 76, "column": 87}}, {"id": 154, "type": "declaration", "text": "void TButton_Draw(TButton *this, TScene *scene);", "parent": 0, "children": [155, 156], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 48}}, {"id": 155, "type": "primitive_type", "text": "void", "parent": 154, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 4}}, {"id": 156, "type": "function_declarator", "text": "TButton_Draw(TButton *this, TScene *scene)", "parent": 154, "children": [157, 158], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 47}}, {"id": 157, "type": "identifier", "text": "TButton_Draw", "parent": 156, "children": [], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 17}}, {"id": 158, "type": "parameter_list", "text": "(TButton *this, TScene *scene)", "parent": 156, "children": [159, 164], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 47}}, {"id": 159, "type": "parameter_declaration", "text": "TButton *this", "parent": 158, "children": [160, 161], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 31}}, {"id": 160, "type": "type_identifier", "text": "TButton", "parent": 159, "children": [], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 25}}, {"id": 161, "type": "pointer_declarator", "text": "*this", "parent": 159, "children": [162, 163], "start_point": {"row": 88, "column": 26}, "end_point": {"row": 88, "column": 31}}, {"id": 162, "type": "*", "text": "*", "parent": 161, "children": [], "start_point": {"row": 88, "column": 26}, "end_point": {"row": 88, "column": 27}}, {"id": 163, "type": "identifier", "text": "this", "parent": 161, "children": [], "start_point": {"row": 88, "column": 27}, "end_point": {"row": 88, "column": 31}}, {"id": 164, "type": "parameter_declaration", "text": "TScene *scene", "parent": 158, "children": [165, 166], "start_point": {"row": 88, "column": 33}, "end_point": {"row": 88, "column": 46}}, {"id": 165, "type": "type_identifier", "text": "TScene", "parent": 164, "children": [], "start_point": {"row": 88, "column": 33}, "end_point": {"row": 88, "column": 39}}, {"id": 166, "type": "pointer_declarator", "text": "*scene", "parent": 164, "children": [167, 168], "start_point": {"row": 88, "column": 40}, "end_point": {"row": 88, "column": 46}}, {"id": 167, "type": "*", "text": "*", "parent": 166, "children": [], "start_point": {"row": 88, "column": 40}, "end_point": {"row": 88, "column": 41}}, {"id": 168, "type": "identifier", "text": "scene", "parent": 166, "children": [], "start_point": {"row": 88, "column": 41}, "end_point": {"row": 88, "column": 46}}, {"id": 169, "type": "declaration", "text": "void TButton_Event_Handler(TButton *this, TScene *scene, SDL_Event event);", "parent": 0, "children": [170, 171], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 74}}, {"id": 170, "type": "primitive_type", "text": "void", "parent": 169, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 4}}, {"id": 171, "type": "function_declarator", "text": "TButton_Event_Handler(TButton *this, TScene *scene, SDL_Event event)", "parent": 169, "children": [172, 173], "start_point": {"row": 101, "column": 5}, "end_point": {"row": 101, "column": 73}}, {"id": 172, "type": "identifier", "text": "TButton_Event_Handler", "parent": 171, "children": [], "start_point": {"row": 101, "column": 5}, "end_point": {"row": 101, "column": 26}}, {"id": 173, "type": "parameter_list", "text": "(TButton *this, TScene *scene, SDL_Event event)", "parent": 171, "children": [174, 179, 184], "start_point": {"row": 101, "column": 26}, "end_point": {"row": 101, "column": 73}}, {"id": 174, "type": "parameter_declaration", "text": "TButton *this", "parent": 173, "children": [175, 176], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 101, "column": 40}}, {"id": 175, "type": "type_identifier", "text": "TButton", "parent": 174, "children": [], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 101, "column": 34}}, {"id": 176, "type": "pointer_declarator", "text": "*this", "parent": 174, "children": [177, 178], "start_point": {"row": 101, "column": 35}, "end_point": {"row": 101, "column": 40}}, {"id": 177, "type": "*", "text": "*", "parent": 176, "children": [], "start_point": {"row": 101, "column": 35}, "end_point": {"row": 101, "column": 36}}, {"id": 178, "type": "identifier", "text": "this", "parent": 176, "children": [], "start_point": {"row": 101, "column": 36}, "end_point": {"row": 101, "column": 40}}, {"id": 179, "type": "parameter_declaration", "text": "TScene *scene", "parent": 173, "children": [180, 181], "start_point": {"row": 101, "column": 42}, "end_point": {"row": 101, "column": 55}}, {"id": 180, "type": "type_identifier", "text": "TScene", "parent": 179, "children": [], "start_point": {"row": 101, "column": 42}, "end_point": {"row": 101, "column": 48}}, {"id": 181, "type": "pointer_declarator", "text": "*scene", "parent": 179, "children": [182, 183], "start_point": {"row": 101, "column": 49}, "end_point": {"row": 101, "column": 55}}, {"id": 182, "type": "*", "text": "*", "parent": 181, "children": [], "start_point": {"row": 101, "column": 49}, "end_point": {"row": 101, "column": 50}}, {"id": 183, "type": "identifier", "text": "scene", "parent": 181, "children": [], "start_point": {"row": 101, "column": 50}, "end_point": {"row": 101, "column": 55}}, {"id": 184, "type": "parameter_declaration", "text": "SDL_Event event", "parent": 173, "children": [185, 186], "start_point": {"row": 101, "column": 57}, "end_point": {"row": 101, "column": 72}}, {"id": 185, "type": "type_identifier", "text": "SDL_Event", "parent": 184, "children": [], "start_point": {"row": 101, "column": 57}, "end_point": {"row": 101, "column": 66}}, {"id": 186, "type": "identifier", "text": "event", "parent": 184, "children": [], "start_point": {"row": 101, "column": 67}, "end_point": {"row": 101, "column": 72}}, {"id": 187, "type": "declaration", "text": "void TButton_New_Free(TButton *this);", "parent": 0, "children": [188, 189], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 112, "column": 37}}, {"id": 188, "type": "primitive_type", "text": "void", "parent": 187, "children": [], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 112, "column": 4}}, {"id": 189, "type": "function_declarator", "text": "TButton_New_Free(TButton *this)", "parent": 187, "children": [190, 191], "start_point": {"row": 112, "column": 5}, "end_point": {"row": 112, "column": 36}}, {"id": 190, "type": "identifier", "text": "TButton_New_Free", "parent": 189, "children": [], "start_point": {"row": 112, "column": 5}, "end_point": {"row": 112, "column": 21}}, {"id": 191, "type": "parameter_list", "text": "(TButton *this)", "parent": 189, "children": [192], "start_point": {"row": 112, "column": 21}, "end_point": {"row": 112, "column": 36}}, {"id": 192, "type": "parameter_declaration", "text": "TButton *this", "parent": 191, "children": [193, 194], "start_point": {"row": 112, "column": 22}, "end_point": {"row": 112, "column": 35}}, {"id": 193, "type": "type_identifier", "text": "TButton", "parent": 192, "children": [], "start_point": {"row": 112, "column": 22}, "end_point": {"row": 112, "column": 29}}, {"id": 194, "type": "pointer_declarator", "text": "*this", "parent": 192, "children": [195, 196], "start_point": {"row": 112, "column": 30}, "end_point": {"row": 112, "column": 35}}, {"id": 195, "type": "*", "text": "*", "parent": 194, "children": [], "start_point": {"row": 112, "column": 30}, "end_point": {"row": 112, "column": 31}}, {"id": 196, "type": "identifier", "text": "this", "parent": 194, "children": [], "start_point": {"row": 112, "column": 31}, "end_point": {"row": 112, "column": 35}}, {"id": 197, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 6}}]}, "node_categories": {"declarations": {"functions": [39, 57, 76, 94, 133, 156, 171, 189], "variables": [15, 21, 32, 37, 45, 51, 55, 63, 69, 74, 82, 88, 92, 100, 106, 110, 112, 117, 122, 125, 129, 136, 141, 146, 151, 154, 159, 164, 169, 174, 179, 184, 187, 192], "classes": [17, 18, 34, 35, 46, 47, 64, 65, 83, 84, 101, 102], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": [23, 24, 26, 27, 29]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 19, 20, 25, 28, 30, 31, 36, 43, 48, 52, 61, 66, 70, 73, 80, 85, 89, 98, 103, 107, 111, 113, 116, 118, 121, 123, 124, 126, 127, 128, 130, 134, 137, 140, 145, 150, 152, 153, 157, 160, 163, 165, 168, 172, 175, 178, 180, 183, 185, 186, 190, 193, 196, 197], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "(*Draw)(struct TButton*, TScene*)"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "(*Free)(struct TButton*)"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "(*On_Click)(struct TButton*, TScene*)"}, {"node_id": 94, "universal_type": "function", "name": "unknown", "text_snippet": "(*Event_Handler)(struct TButton*, TScene*, SDL_Event)"}, {"node_id": 133, "universal_type": "function", "name": "unknown", "text_snippet": "New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos)"}, {"node_id": 156, "universal_type": "function", "name": "unknown", "text_snippet": "TButton_Draw(TButton *this, TScene *scene)"}, {"node_id": 171, "universal_type": "function", "name": "unknown", "text_snippet": "TButton_Event_Handler(TButton *this, TScene *scene, SDL_Event event)"}, {"node_id": 189, "universal_type": "function", "name": "unknown", "text_snippet": "TButton_New_Free(TButton *this)"}], "class_declarations": [{"node_id": 17, "universal_type": "class", "name": "TScene", "text_snippet": "struct TScene"}, {"node_id": 18, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 34, "universal_type": "class", "name": "TButton", "text_snippet": "struct TButton {\n\n void(*Draw)(struct TButton*, TScene*); /*!< Draw method. "}, {"node_id": 35, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 46, "universal_type": "class", "name": "TButton", "text_snippet": "struct TButton"}, {"node_id": 47, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 64, "universal_type": "class", "name": "TButton", "text_snippet": "struct TButton"}, {"node_id": 65, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 83, "universal_type": "class", "name": "TButton", "text_snippet": "struct TButton"}, {"node_id": 84, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 101, "universal_type": "class", "name": "TButton", "text_snippet": "struct TButton"}, {"node_id": 102, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <SDL2/SDL.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"scene.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"sprite.h\"\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "/*******************************************************************************\n* PROJECT: gLib\n*\n* AUTHORS: <NAME>, <NAME>, <NAME>, <NAME>\n*\n* DATE CREATED: 01/16/2019\n*\n* Copyright (c) 2019 <NAME> (@Astropilot). All rights reserved.\n*\n* Licensed under the MIT License. See LICENSE file in the project root for full\n* license information.\n*******************************************************************************/\n\n/**\n * @file button.h\n * @brief Header file of the button component of GLib.\n *\n * The button component allows you to create a graphical button that can\n * be manipulated by GLib.\n *\n */\n\n#ifndef GLIB_BUTTON_H_\n#define GLIB_BUTTON_H_\n\n#include <SDL2/SDL.h>\n\n#include \"scene.h\"\n#include \"sprite.h\"\n\ntypedef struct TScene TScene;\n\n/**\n * @brief Constants of the states of a button.\n *\n * TButton_State is a series of predefined constants for the different\n * states of a button.\n */\ntypedef enum TButton_State {\n BUTTON_NORMAL, /*!< The normal state of the button. */\n BUTTON_HOVER /*!< The hover state of the button. */\n} TButton_State ;\n\n/**\n * @brief Object oriented structure representing a button.\n *\n * TButton is an object that allows you to create and display a button.\n */\ntypedef struct TButton {\n\n void(*Draw)(struct TButton*, TScene*); /*!< Draw method. */\n\n void(*Free)(struct TButton*); /*!< Free (ressources) method. */\n\n unsigned int is_visible; /*!< Boolean to know if the drawable can be drawed automatically. */\n\n void(*On_Click)(struct TButton*, TScene*); /*!< Callback called when a click event occurs. */\n\n void(*Event_Handler)(struct TButton*, TScene*, SDL_Event); /*!< Method call for processing SDL event */\n\n TSprite *btn_sprite; /*!< A sprite for the button in normal state. */\n TSprite *btn_hover_sprite; /*!< A sprite for the button in hover state. */\n TButton_State state; /*!< The actual state of the button. */\n SDL_Rect pos; /*!< The position and size of the button. */\n\n} TButton ;\n\n/**\n * @brief The constructor for create a TButton object.\n *\n * @param scene A pointer to the scene object.\n * @param btn_s The path of an image file for the button in normal state.\n * @param btn_hs The path of an image file for the button in hover state.\n * @param pos The position and size of the button.\n * @return A memory allocated object of the button.\n */\nTButton* New_TButton(TScene *scene, const char *btn_s, const char *btn_hs, SDL_Rect pos);\n\n/**\n * @brief Method for drawing the button in the interface.\n *\n * @param this A pointer to the button object to draw.\n * @param scene A pointer to the scene object.\n *\n * You do not have to call this method directly. You must use the\n * Draw method of the TButton structure like this:\n * my_button->Draw(my_button, scene);\n */\nvoid TButton_Draw(TButton *this, TScene *scene);\n\n/**\n * @brief Method to process an SDL event and change the status of the button or manage clicks.\n *\n * @param this A pointer to the button object.\n * @param scene A pointer to the scene object.\n * @param event A SDL event.\n *\n * You do not have to call this method directly. You must use the\n * Event_Handler method of the TButton structure like this:\n * my_button->Event_Handler(my_button, scene, event);\n */\nvoid TButton_Event_Handler(TButton *this, TScene *scene, SDL_Event event);\n\n/**\n * @brief Method to free all ressources take by the button.\n *\n * @param this A pointer to the button object to free.\n *\n * You do not have to call this method directly. You must use the\n * Free method of the TButton structure like this:\n * my_button->Free(my_button);\n */\nvoid TButton_New_Free(TButton *this);\n\n#endif\n"}
373
c
#include "pe12-2a.h" #include <stdio.h> static int g_mode; static float g_distance; static float g_fuel; static char* modes[2] = { "metric", "US" }; void set_mode(int mode) { if (0 != mode && 1 != mode) { printf("Invalie mode specified. Mode %d (%s) used.\n", g_mode, modes[g_mode]); return ; } g_mode = mode; } void get_info() { if (0 == g_mode) { printf("Enter distance traveldd in kilometers: "); scanf("%f", &g_distance); printf("Enter fuel consumed in liters:"); scanf("%f", &g_fuel); } else if (1 == g_mode) { printf("Enter distance traveldd in miles: "); scanf("%f", &g_distance); printf("Enter fuel consumed in gallons:"); scanf("%f", &g_fuel); } } void show_info() { if (0 == g_mode) { printf("Fuel consumption is %.2f liters per 100 km.\n", g_fuel * 100 / g_distance); } else if (1 == g_mode) { printf("Fuel consumption is %.1f miles per gallon.\n", g_distance / g_fuel); } }
25.33
39
(translation_unit) "#include "pe12-2a.h"\n#include <stdio.h>\n\nstatic int g_mode;\nstatic float g_distance;\nstatic float g_fuel;\nstatic char* modes[2] = {\n "metric",\n "US"\n};\n\nvoid set_mode(int mode)\n{\n if (0 != mode && 1 != mode) {\n printf("Invalie mode specified. Mode %d (%s) used.\n", g_mode, modes[g_mode]);\n return ;\n }\n\n g_mode = mode;\n}\n\nvoid get_info()\n{\n if (0 == g_mode) {\n printf("Enter distance traveldd in kilometers: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in liters:");\n scanf("%f", &g_fuel);\n } else if (1 == g_mode) {\n printf("Enter distance traveldd in miles: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in gallons:");\n scanf("%f", &g_fuel);\n } \n}\n\nvoid show_info()\n{\n if (0 == g_mode) {\n printf("Fuel consumption is %.2f liters per 100 km.\n", g_fuel * 100 / g_distance);\n } else if (1 == g_mode) {\n printf("Fuel consumption is %.1f miles per gallon.\n", g_distance / g_fuel);\n }\n}" (preproc_include) "#include "pe12-2a.h"\n" (#include) "#include" (string_literal) ""pe12-2a.h"" (") """ (string_content) "pe12-2a.h" (") """ (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (declaration) "static int g_mode;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (identifier) "g_mode" (;) ";" (declaration) "static float g_distance;" (storage_class_specifier) "static" (static) "static" (primitive_type) "float" (identifier) "g_distance" (;) ";" (declaration) "static float g_fuel;" (storage_class_specifier) "static" (static) "static" (primitive_type) "float" (identifier) "g_fuel" (;) ";" (declaration) "static char* modes[2] = {\n "metric",\n "US"\n};" (storage_class_specifier) "static" (static) "static" (primitive_type) "char" (init_declarator) "* modes[2] = {\n "metric",\n "US"\n}" (pointer_declarator) "* modes[2]" (*) "*" (array_declarator) "modes[2]" (identifier) "modes" ([) "[" (number_literal) "2" (]) "]" (=) "=" (initializer_list) "{\n "metric",\n "US"\n}" ({) "{" (string_literal) ""metric"" (") """ (string_content) "metric" (") """ (,) "," (string_literal) ""US"" (") """ (string_content) "US" (") """ (}) "}" (;) ";" (function_definition) "void set_mode(int mode)\n{\n if (0 != mode && 1 != mode) {\n printf("Invalie mode specified. Mode %d (%s) used.\n", g_mode, modes[g_mode]);\n return ;\n }\n\n g_mode = mode;\n}" (primitive_type) "void" (function_declarator) "set_mode(int mode)" (identifier) "set_mode" (parameter_list) "(int mode)" (() "(" (parameter_declaration) "int mode" (primitive_type) "int" (identifier) "mode" ()) ")" (compound_statement) "{\n if (0 != mode && 1 != mode) {\n printf("Invalie mode specified. Mode %d (%s) used.\n", g_mode, modes[g_mode]);\n return ;\n }\n\n g_mode = mode;\n}" ({) "{" (if_statement) "if (0 != mode && 1 != mode) {\n printf("Invalie mode specified. Mode %d (%s) used.\n", g_mode, modes[g_mode]);\n return ;\n }" (if) "if" (parenthesized_expression) "(0 != mode && 1 != mode)" (() "(" (binary_expression) "0 != mode && 1 != mode" (binary_expression) "0 != mode" (number_literal) "0" (!=) "!=" (identifier) "mode" (&&) "&&" (binary_expression) "1 != mode" (number_literal) "1" (!=) "!=" (identifier) "mode" ()) ")" (compound_statement) "{\n printf("Invalie mode specified. Mode %d (%s) used.\n", g_mode, modes[g_mode]);\n return ;\n }" ({) "{" (expression_statement) "printf("Invalie mode specified. Mode %d (%s) used.\n", g_mode, modes[g_mode]);" (call_expression) "printf("Invalie mode specified. Mode %d (%s) used.\n", g_mode, modes[g_mode])" (identifier) "printf" (argument_list) "("Invalie mode specified. Mode %d (%s) used.\n", g_mode, modes[g_mode])" (() "(" (string_literal) ""Invalie mode specified. Mode %d (%s) used.\n"" (") """ (string_content) "Invalie mode specified. Mode %d (%s) used." (escape_sequence) "\n" (") """ (,) "," (identifier) "g_mode" (,) "," (subscript_expression) "modes[g_mode]" (identifier) "modes" ([) "[" (identifier) "g_mode" (]) "]" ()) ")" (;) ";" (return_statement) "return ;" (return) "return" (;) ";" (}) "}" (expression_statement) "g_mode = mode;" (assignment_expression) "g_mode = mode" (identifier) "g_mode" (=) "=" (identifier) "mode" (;) ";" (}) "}" (function_definition) "void get_info()\n{\n if (0 == g_mode) {\n printf("Enter distance traveldd in kilometers: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in liters:");\n scanf("%f", &g_fuel);\n } else if (1 == g_mode) {\n printf("Enter distance traveldd in miles: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in gallons:");\n scanf("%f", &g_fuel);\n } \n}" (primitive_type) "void" (function_declarator) "get_info()" (identifier) "get_info" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n if (0 == g_mode) {\n printf("Enter distance traveldd in kilometers: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in liters:");\n scanf("%f", &g_fuel);\n } else if (1 == g_mode) {\n printf("Enter distance traveldd in miles: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in gallons:");\n scanf("%f", &g_fuel);\n } \n}" ({) "{" (if_statement) "if (0 == g_mode) {\n printf("Enter distance traveldd in kilometers: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in liters:");\n scanf("%f", &g_fuel);\n } else if (1 == g_mode) {\n printf("Enter distance traveldd in miles: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in gallons:");\n scanf("%f", &g_fuel);\n }" (if) "if" (parenthesized_expression) "(0 == g_mode)" (() "(" (binary_expression) "0 == g_mode" (number_literal) "0" (==) "==" (identifier) "g_mode" ()) ")" (compound_statement) "{\n printf("Enter distance traveldd in kilometers: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in liters:");\n scanf("%f", &g_fuel);\n }" ({) "{" (expression_statement) "printf("Enter distance traveldd in kilometers: ");" (call_expression) "printf("Enter distance traveldd in kilometers: ")" (identifier) "printf" (argument_list) "("Enter distance traveldd in kilometers: ")" (() "(" (string_literal) ""Enter distance traveldd in kilometers: "" (") """ (string_content) "Enter distance traveldd in kilometers: " (") """ ()) ")" (;) ";" (expression_statement) "scanf("%f", &g_distance);" (call_expression) "scanf("%f", &g_distance)" (identifier) "scanf" (argument_list) "("%f", &g_distance)" (() "(" (string_literal) ""%f"" (") """ (string_content) "%f" (") """ (,) "," (pointer_expression) "&g_distance" (&) "&" (identifier) "g_distance" ()) ")" (;) ";" (expression_statement) "printf("Enter fuel consumed in liters:");" (call_expression) "printf("Enter fuel consumed in liters:")" (identifier) "printf" (argument_list) "("Enter fuel consumed in liters:")" (() "(" (string_literal) ""Enter fuel consumed in liters:"" (") """ (string_content) "Enter fuel consumed in liters:" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%f", &g_fuel);" (call_expression) "scanf("%f", &g_fuel)" (identifier) "scanf" (argument_list) "("%f", &g_fuel)" (() "(" (string_literal) ""%f"" (") """ (string_content) "%f" (") """ (,) "," (pointer_expression) "&g_fuel" (&) "&" (identifier) "g_fuel" ()) ")" (;) ";" (}) "}" (else_clause) "else if (1 == g_mode) {\n printf("Enter distance traveldd in miles: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in gallons:");\n scanf("%f", &g_fuel);\n }" (else) "else" (if_statement) "if (1 == g_mode) {\n printf("Enter distance traveldd in miles: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in gallons:");\n scanf("%f", &g_fuel);\n }" (if) "if" (parenthesized_expression) "(1 == g_mode)" (() "(" (binary_expression) "1 == g_mode" (number_literal) "1" (==) "==" (identifier) "g_mode" ()) ")" (compound_statement) "{\n printf("Enter distance traveldd in miles: ");\n scanf("%f", &g_distance);\n printf("Enter fuel consumed in gallons:");\n scanf("%f", &g_fuel);\n }" ({) "{" (expression_statement) "printf("Enter distance traveldd in miles: ");" (call_expression) "printf("Enter distance traveldd in miles: ")" (identifier) "printf" (argument_list) "("Enter distance traveldd in miles: ")" (() "(" (string_literal) ""Enter distance traveldd in miles: "" (") """ (string_content) "Enter distance traveldd in miles: " (") """ ()) ")" (;) ";" (expression_statement) "scanf("%f", &g_distance);" (call_expression) "scanf("%f", &g_distance)" (identifier) "scanf" (argument_list) "("%f", &g_distance)" (() "(" (string_literal) ""%f"" (") """ (string_content) "%f" (") """ (,) "," (pointer_expression) "&g_distance" (&) "&" (identifier) "g_distance" ()) ")" (;) ";" (expression_statement) "printf("Enter fuel consumed in gallons:");" (call_expression) "printf("Enter fuel consumed in gallons:")" (identifier) "printf" (argument_list) "("Enter fuel consumed in gallons:")" (() "(" (string_literal) ""Enter fuel consumed in gallons:"" (") """ (string_content) "Enter fuel consumed in gallons:" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%f", &g_fuel);" (call_expression) "scanf("%f", &g_fuel)" (identifier) "scanf" (argument_list) "("%f", &g_fuel)" (() "(" (string_literal) ""%f"" (") """ (string_content) "%f" (") """ (,) "," (pointer_expression) "&g_fuel" (&) "&" (identifier) "g_fuel" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "void show_info()\n{\n if (0 == g_mode) {\n printf("Fuel consumption is %.2f liters per 100 km.\n", g_fuel * 100 / g_distance);\n } else if (1 == g_mode) {\n printf("Fuel consumption is %.1f miles per gallon.\n", g_distance / g_fuel);\n }\n}" (primitive_type) "void" (function_declarator) "show_info()" (identifier) "show_info" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n if (0 == g_mode) {\n printf("Fuel consumption is %.2f liters per 100 km.\n", g_fuel * 100 / g_distance);\n } else if (1 == g_mode) {\n printf("Fuel consumption is %.1f miles per gallon.\n", g_distance / g_fuel);\n }\n}" ({) "{" (if_statement) "if (0 == g_mode) {\n printf("Fuel consumption is %.2f liters per 100 km.\n", g_fuel * 100 / g_distance);\n } else if (1 == g_mode) {\n printf("Fuel consumption is %.1f miles per gallon.\n", g_distance / g_fuel);\n }" (if) "if" (parenthesized_expression) "(0 == g_mode)" (() "(" (binary_expression) "0 == g_mode" (number_literal) "0" (==) "==" (identifier) "g_mode" ()) ")" (compound_statement) "{\n printf("Fuel consumption is %.2f liters per 100 km.\n", g_fuel * 100 / g_distance);\n }" ({) "{" (expression_statement) "printf("Fuel consumption is %.2f liters per 100 km.\n", g_fuel * 100 / g_distance);" (call_expression) "printf("Fuel consumption is %.2f liters per 100 km.\n", g_fuel * 100 / g_distance)" (identifier) "printf" (argument_list) "("Fuel consumption is %.2f liters per 100 km.\n", g_fuel * 100 / g_distance)" (() "(" (string_literal) ""Fuel consumption is %.2f liters per 100 km.\n"" (") """ (string_content) "Fuel consumption is %.2f liters per 100 km." (escape_sequence) "\n" (") """ (,) "," (binary_expression) "g_fuel * 100 / g_distance" (binary_expression) "g_fuel * 100" (identifier) "g_fuel" (*) "*" (number_literal) "100" (/) "/" (identifier) "g_distance" ()) ")" (;) ";" (}) "}" (else_clause) "else if (1 == g_mode) {\n printf("Fuel consumption is %.1f miles per gallon.\n", g_distance / g_fuel);\n }" (else) "else" (if_statement) "if (1 == g_mode) {\n printf("Fuel consumption is %.1f miles per gallon.\n", g_distance / g_fuel);\n }" (if) "if" (parenthesized_expression) "(1 == g_mode)" (() "(" (binary_expression) "1 == g_mode" (number_literal) "1" (==) "==" (identifier) "g_mode" ()) ")" (compound_statement) "{\n printf("Fuel consumption is %.1f miles per gallon.\n", g_distance / g_fuel);\n }" ({) "{" (expression_statement) "printf("Fuel consumption is %.1f miles per gallon.\n", g_distance / g_fuel);" (call_expression) "printf("Fuel consumption is %.1f miles per gallon.\n", g_distance / g_fuel)" (identifier) "printf" (argument_list) "("Fuel consumption is %.1f miles per gallon.\n", g_distance / g_fuel)" (() "(" (string_literal) ""Fuel consumption is %.1f miles per gallon.\n"" (") """ (string_content) "Fuel consumption is %.1f miles per gallon." (escape_sequence) "\n" (") """ (,) "," (binary_expression) "g_distance / g_fuel" (identifier) "g_distance" (/) "/" (identifier) "g_fuel" ()) ")" (;) ";" (}) "}" (}) "}"
327
0
{"language": "c", "success": true, "metadata": {"lines": 39, "avg_line_length": 25.33, "nodes": 158, "errors": 0, "source_hash": "d1e182501bdf8b9602005d3d2102771909907b39f1c4296eee1ae77f1d05e406", "categorized_nodes": 114}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"pe12-2a.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": "\"pe12-2a.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdio.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 18}}, {"id": 6, "type": "declaration", "text": "static int g_mode;", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 18}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 10}}, {"id": 8, "type": "identifier", "text": "g_mode", "parent": 6, "children": [], "start_point": {"row": 3, "column": 11}, "end_point": {"row": 3, "column": 17}}, {"id": 9, "type": "declaration", "text": "static float g_distance;", "parent": null, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 24}}, {"id": 10, "type": "primitive_type", "text": "float", "parent": 9, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 12}}, {"id": 11, "type": "identifier", "text": "g_distance", "parent": 9, "children": [], "start_point": {"row": 4, "column": 13}, "end_point": {"row": 4, "column": 23}}, {"id": 12, "type": "declaration", "text": "static float g_fuel;", "parent": null, "children": [13, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 20}}, {"id": 13, "type": "primitive_type", "text": "float", "parent": 12, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 12}}, {"id": 14, "type": "identifier", "text": "g_fuel", "parent": 12, "children": [], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 19}}, {"id": 15, "type": "declaration", "text": "static char* modes[2] = {\n \"metric\",\n \"US\"\n};", "parent": null, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 9, "column": 2}}, {"id": 16, "type": "primitive_type", "text": "char", "parent": 15, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 11}}, {"id": 17, "type": "init_declarator", "text": "* modes[2] = {\n \"metric\",\n \"US\"\n}", "parent": 15, "children": [18, 23, 24], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 9, "column": 1}}, {"id": 18, "type": "pointer_declarator", "text": "* modes[2]", "parent": 17, "children": [19, 20], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 21}}, {"id": 19, "type": "*", "text": "*", "parent": 18, "children": [], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 12}}, {"id": 20, "type": "array_declarator", "text": "modes[2]", "parent": 18, "children": [21, 22], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 21}}, {"id": 21, "type": "identifier", "text": "modes", "parent": 20, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 18}}, {"id": 22, "type": "number_literal", "text": "2", "parent": 20, "children": [], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 20}}, {"id": 23, "type": "=", "text": "=", "parent": 17, "children": [], "start_point": {"row": 6, "column": 22}, "end_point": {"row": 6, "column": 23}}, {"id": 24, "type": "initializer_list", "text": "{\n \"metric\",\n \"US\"\n}", "parent": 17, "children": [25, 26], "start_point": {"row": 6, "column": 24}, "end_point": {"row": 9, "column": 1}}, {"id": 25, "type": "string_literal", "text": "\"metric\"", "parent": 24, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 12}}, {"id": 26, "type": "string_literal", "text": "\"US\"", "parent": 24, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 8}}, {"id": 27, "type": "function_definition", "text": "void set_mode(int mode)\n{\n if (0 != mode && 1 != mode) {\n printf(\"Invalie mode specified. Mode %d (%s) used.\\n\", g_mode, modes[g_mode]);\n return ;\n }\n\n g_mode = mode;\n}", "parent": null, "children": [28, 29], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 28, "type": "primitive_type", "text": "void", "parent": 27, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 4}}, {"id": 29, "type": "function_declarator", "text": "set_mode(int mode)", "parent": 27, "children": [30, 31], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 23}}, {"id": 30, "type": "identifier", "text": "set_mode", "parent": 29, "children": [], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 13}}, {"id": 31, "type": "parameter_list", "text": "(int mode)", "parent": 29, "children": [32], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 23}}, {"id": 32, "type": "parameter_declaration", "text": "int mode", "parent": 31, "children": [33, 34], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 22}}, {"id": 33, "type": "primitive_type", "text": "int", "parent": 32, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 17}}, {"id": 34, "type": "identifier", "text": "mode", "parent": 32, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 22}}, {"id": 35, "type": "if_statement", "text": "if (0 != mode && 1 != mode) {\n printf(\"Invalie mode specified. Mode %d (%s) used.\\n\", g_mode, modes[g_mode]);\n return ;\n }", "parent": 27, "children": [36], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 16, "column": 5}}, {"id": 36, "type": "parenthesized_expression", "text": "(0 != mode && 1 != mode)", "parent": 35, "children": [37], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 31}}, {"id": 37, "type": "binary_expression", "text": "0 != mode && 1 != mode", "parent": 36, "children": [38, 42, 43], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 30}}, {"id": 38, "type": "binary_expression", "text": "0 != mode", "parent": 37, "children": [39, 40, 41], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 17}}, {"id": 39, "type": "number_literal", "text": "0", "parent": 38, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 9}}, {"id": 40, "type": "!=", "text": "!=", "parent": 38, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 12}}, {"id": 41, "type": "identifier", "text": "mode", "parent": 38, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 17}}, {"id": 42, "type": "&&", "text": "&&", "parent": 37, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 20}}, {"id": 43, "type": "binary_expression", "text": "1 != mode", "parent": 37, "children": [44, 45, 46], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 30}}, {"id": 44, "type": "number_literal", "text": "1", "parent": 43, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 22}}, {"id": 45, "type": "!=", "text": "!=", "parent": 43, "children": [], "start_point": {"row": 13, "column": 23}, "end_point": {"row": 13, "column": 25}}, {"id": 46, "type": "identifier", "text": "mode", "parent": 43, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 30}}, {"id": 47, "type": "call_expression", "text": "printf(\"Invalie mode specified. Mode %d (%s) used.\\n\", g_mode, modes[g_mode])", "parent": 35, "children": [48, 49], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 85}}, {"id": 48, "type": "identifier", "text": "printf", "parent": 47, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 14}}, {"id": 49, "type": "argument_list", "text": "(\"Invalie mode specified. Mode %d (%s) used.\\n\", g_mode, modes[g_mode])", "parent": 47, "children": [50, 52, 53], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 85}}, {"id": 50, "type": "string_literal", "text": "\"Invalie mode specified. Mode %d (%s) used.\\n\"", "parent": 49, "children": [51], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 61}}, {"id": 51, "type": "escape_sequence", "text": "\\n", "parent": 50, "children": [], "start_point": {"row": 14, "column": 58}, "end_point": {"row": 14, "column": 60}}, {"id": 52, "type": "identifier", "text": "g_mode", "parent": 49, "children": [], "start_point": {"row": 14, "column": 63}, "end_point": {"row": 14, "column": 69}}, {"id": 53, "type": "subscript_expression", "text": "modes[g_mode]", "parent": 49, "children": [54, 55], "start_point": {"row": 14, "column": 71}, "end_point": {"row": 14, "column": 84}}, {"id": 54, "type": "identifier", "text": "modes", "parent": 53, "children": [], "start_point": {"row": 14, "column": 71}, "end_point": {"row": 14, "column": 76}}, {"id": 55, "type": "identifier", "text": "g_mode", "parent": 53, "children": [], "start_point": {"row": 14, "column": 77}, "end_point": {"row": 14, "column": 83}}, {"id": 56, "type": "return_statement", "text": "return ;", "parent": 35, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 16}}, {"id": 57, "type": "assignment_expression", "text": "g_mode = mode", "parent": 27, "children": [58, 59, 60], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 17}}, {"id": 58, "type": "identifier", "text": "g_mode", "parent": 57, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 10}}, {"id": 59, "type": "=", "text": "=", "parent": 57, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 12}}, {"id": 60, "type": "identifier", "text": "mode", "parent": 57, "children": [], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 17}}, {"id": 61, "type": "function_definition", "text": "void get_info()\n{\n if (0 == g_mode) {\n printf(\"Enter distance traveldd in kilometers: \");\n scanf(\"%f\", &g_distance);\n printf(\"Enter fuel consumed in liters:\");\n scanf(\"%f\", &g_fuel);\n } else if (1 == g_mode) {\n printf(\"Enter distance traveldd in miles: \");\n scanf(\"%f\", &g_distance);\n printf(\"Enter fuel consumed in gallons:\");\n scanf(\"%f\", &g_fuel);\n } \n}", "parent": null, "children": [62, 63], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 62, "type": "primitive_type", "text": "void", "parent": 61, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 4}}, {"id": 63, "type": "function_declarator", "text": "get_info()", "parent": 61, "children": [64, 65], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 15}}, {"id": 64, "type": "identifier", "text": "get_info", "parent": 63, "children": [], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 13}}, {"id": 65, "type": "parameter_list", "text": "()", "parent": 63, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 15}}, {"id": 66, "type": "if_statement", "text": "if (0 == g_mode) {\n printf(\"Enter distance traveldd in kilometers: \");\n scanf(\"%f\", &g_distance);\n printf(\"Enter fuel consumed in liters:\");\n scanf(\"%f\", &g_fuel);\n } else if (1 == g_mode) {\n printf(\"Enter distance traveldd in miles: \");\n scanf(\"%f\", &g_distance);\n printf(\"Enter fuel consumed in gallons:\");\n scanf(\"%f\", &g_fuel);\n }", "parent": 61, "children": [67, 92], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 33, "column": 5}}, {"id": 67, "type": "parenthesized_expression", "text": "(0 == g_mode)", "parent": 66, "children": [68], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 20}}, {"id": 68, "type": "binary_expression", "text": "0 == g_mode", "parent": 67, "children": [69, 70, 71], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 19}}, {"id": 69, "type": "number_literal", "text": "0", "parent": 68, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 9}}, {"id": 70, "type": "==", "text": "==", "parent": 68, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 12}}, {"id": 71, "type": "identifier", "text": "g_mode", "parent": 68, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 19}}, {"id": 72, "type": "call_expression", "text": "printf(\"Enter distance traveldd in kilometers: \")", "parent": 66, "children": [73, 74], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 57}}, {"id": 73, "type": "identifier", "text": "printf", "parent": 72, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 14}}, {"id": 74, "type": "argument_list", "text": "(\"Enter distance traveldd in kilometers: \")", "parent": 72, "children": [75], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 57}}, {"id": 75, "type": "string_literal", "text": "\"Enter distance traveldd in kilometers: \"", "parent": 74, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 56}}, {"id": 76, "type": "call_expression", "text": "scanf(\"%f\", &g_distance)", "parent": 66, "children": [77, 78], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 32}}, {"id": 77, "type": "identifier", "text": "scanf", "parent": 76, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 13}}, {"id": 78, "type": "argument_list", "text": "(\"%f\", &g_distance)", "parent": 76, "children": [79, 80], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 32}}, {"id": 79, "type": "string_literal", "text": "\"%f\"", "parent": 78, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 18}}, {"id": 80, "type": "pointer_expression", "text": "&g_distance", "parent": 78, "children": [81], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 31}}, {"id": 81, "type": "identifier", "text": "g_distance", "parent": 80, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 31}}, {"id": 82, "type": "call_expression", "text": "printf(\"Enter fuel consumed in liters:\")", "parent": 66, "children": [83, 84], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 48}}, {"id": 83, "type": "identifier", "text": "printf", "parent": 82, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 14}}, {"id": 84, "type": "argument_list", "text": "(\"Enter fuel consumed in liters:\")", "parent": 82, "children": [85], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 48}}, {"id": 85, "type": "string_literal", "text": "\"Enter fuel consumed in liters:\"", "parent": 84, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 47}}, {"id": 86, "type": "call_expression", "text": "scanf(\"%f\", &g_fuel)", "parent": 66, "children": [87, 88], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 28}}, {"id": 87, "type": "identifier", "text": "scanf", "parent": 86, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 13}}, {"id": 88, "type": "argument_list", "text": "(\"%f\", &g_fuel)", "parent": 86, "children": [89, 90], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 28}}, {"id": 89, "type": "string_literal", "text": "\"%f\"", "parent": 88, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 18}}, {"id": 90, "type": "pointer_expression", "text": "&g_fuel", "parent": 88, "children": [91], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 27}}, {"id": 91, "type": "identifier", "text": "g_fuel", "parent": 90, "children": [], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 27}}, {"id": 92, "type": "else_clause", "text": "else if (1 == g_mode) {\n printf(\"Enter distance traveldd in miles: \");\n scanf(\"%f\", &g_distance);\n printf(\"Enter fuel consumed in gallons:\");\n scanf(\"%f\", &g_fuel);\n }", "parent": 66, "children": [93], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 33, "column": 5}}, {"id": 93, "type": "if_statement", "text": "if (1 == g_mode) {\n printf(\"Enter distance traveldd in miles: \");\n scanf(\"%f\", &g_distance);\n printf(\"Enter fuel consumed in gallons:\");\n scanf(\"%f\", &g_fuel);\n }", "parent": 92, "children": [94], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 33, "column": 5}}, {"id": 94, "type": "parenthesized_expression", "text": "(1 == g_mode)", "parent": 93, "children": [95], "start_point": {"row": 28, "column": 14}, "end_point": {"row": 28, "column": 27}}, {"id": 95, "type": "binary_expression", "text": "1 == g_mode", "parent": 94, "children": [96, 97, 98], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 26}}, {"id": 96, "type": "number_literal", "text": "1", "parent": 95, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 16}}, {"id": 97, "type": "==", "text": "==", "parent": 95, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 19}}, {"id": 98, "type": "identifier", "text": "g_mode", "parent": 95, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 26}}, {"id": 99, "type": "call_expression", "text": "printf(\"Enter distance traveldd in miles: \")", "parent": 93, "children": [100, 101], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 52}}, {"id": 100, "type": "identifier", "text": "printf", "parent": 99, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 14}}, {"id": 101, "type": "argument_list", "text": "(\"Enter distance traveldd in miles: \")", "parent": 99, "children": [102], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 52}}, {"id": 102, "type": "string_literal", "text": "\"Enter distance traveldd in miles: \"", "parent": 101, "children": [], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 51}}, {"id": 103, "type": "call_expression", "text": "scanf(\"%f\", &g_distance)", "parent": 93, "children": [104, 105], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 32}}, {"id": 104, "type": "identifier", "text": "scanf", "parent": 103, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 13}}, {"id": 105, "type": "argument_list", "text": "(\"%f\", &g_distance)", "parent": 103, "children": [106, 107], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 32}}, {"id": 106, "type": "string_literal", "text": "\"%f\"", "parent": 105, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 18}}, {"id": 107, "type": "pointer_expression", "text": "&g_distance", "parent": 105, "children": [108], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 31}}, {"id": 108, "type": "identifier", "text": "g_distance", "parent": 107, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 31}}, {"id": 109, "type": "call_expression", "text": "printf(\"Enter fuel consumed in gallons:\")", "parent": 93, "children": [110, 111], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 49}}, {"id": 110, "type": "identifier", "text": "printf", "parent": 109, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 14}}, {"id": 111, "type": "argument_list", "text": "(\"Enter fuel consumed in gallons:\")", "parent": 109, "children": [112], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 49}}, {"id": 112, "type": "string_literal", "text": "\"Enter fuel consumed in gallons:\"", "parent": 111, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 48}}, {"id": 113, "type": "call_expression", "text": "scanf(\"%f\", &g_fuel)", "parent": 93, "children": [114, 115], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 28}}, {"id": 114, "type": "identifier", "text": "scanf", "parent": 113, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 13}}, {"id": 115, "type": "argument_list", "text": "(\"%f\", &g_fuel)", "parent": 113, "children": [116, 117], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 28}}, {"id": 116, "type": "string_literal", "text": "\"%f\"", "parent": 115, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 18}}, {"id": 117, "type": "pointer_expression", "text": "&g_fuel", "parent": 115, "children": [118], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 27}}, {"id": 118, "type": "identifier", "text": "g_fuel", "parent": 117, "children": [], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 27}}, {"id": 119, "type": "function_definition", "text": "void show_info()\n{\n if (0 == g_mode) {\n printf(\"Fuel consumption is %.2f liters per 100 km.\\n\", g_fuel * 100 / g_distance);\n } else if (1 == g_mode) {\n printf(\"Fuel consumption is %.1f miles per gallon.\\n\", g_distance / g_fuel);\n }\n}", "parent": null, "children": [120, 121], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 120, "type": "primitive_type", "text": "void", "parent": 119, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 4}}, {"id": 121, "type": "function_declarator", "text": "show_info()", "parent": 119, "children": [122, 123], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 16}}, {"id": 122, "type": "identifier", "text": "show_info", "parent": 121, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 14}}, {"id": 123, "type": "parameter_list", "text": "()", "parent": 121, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 16}}, {"id": 124, "type": "if_statement", "text": "if (0 == g_mode) {\n printf(\"Fuel consumption is %.2f liters per 100 km.\\n\", g_fuel * 100 / g_distance);\n } else if (1 == g_mode) {\n printf(\"Fuel consumption is %.1f miles per gallon.\\n\", g_distance / g_fuel);\n }", "parent": 119, "children": [125, 142], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 42, "column": 5}}, {"id": 125, "type": "parenthesized_expression", "text": "(0 == g_mode)", "parent": 124, "children": [126], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 20}}, {"id": 126, "type": "binary_expression", "text": "0 == g_mode", "parent": 125, "children": [127, 128, 129], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 19}}, {"id": 127, "type": "number_literal", "text": "0", "parent": 126, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 9}}, {"id": 128, "type": "==", "text": "==", "parent": 126, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 12}}, {"id": 129, "type": "identifier", "text": "g_mode", "parent": 126, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 19}}, {"id": 130, "type": "call_expression", "text": "printf(\"Fuel consumption is %.2f liters per 100 km.\\n\", g_fuel * 100 / g_distance)", "parent": 124, "children": [131, 132], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 90}}, {"id": 131, "type": "identifier", "text": "printf", "parent": 130, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 14}}, {"id": 132, "type": "argument_list", "text": "(\"Fuel consumption is %.2f liters per 100 km.\\n\", g_fuel * 100 / g_distance)", "parent": 130, "children": [133, 135], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 90}}, {"id": 133, "type": "string_literal", "text": "\"Fuel consumption is %.2f liters per 100 km.\\n\"", "parent": 132, "children": [134], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 62}}, {"id": 134, "type": "escape_sequence", "text": "\\n", "parent": 133, "children": [], "start_point": {"row": 39, "column": 59}, "end_point": {"row": 39, "column": 61}}, {"id": 135, "type": "binary_expression", "text": "g_fuel * 100 / g_distance", "parent": 132, "children": [136, 140, 141], "start_point": {"row": 39, "column": 64}, "end_point": {"row": 39, "column": 89}}, {"id": 136, "type": "binary_expression", "text": "g_fuel * 100", "parent": 135, "children": [137, 138, 139], "start_point": {"row": 39, "column": 64}, "end_point": {"row": 39, "column": 76}}, {"id": 137, "type": "identifier", "text": "g_fuel", "parent": 136, "children": [], "start_point": {"row": 39, "column": 64}, "end_point": {"row": 39, "column": 70}}, {"id": 138, "type": "*", "text": "*", "parent": 136, "children": [], "start_point": {"row": 39, "column": 71}, "end_point": {"row": 39, "column": 72}}, {"id": 139, "type": "number_literal", "text": "100", "parent": 136, "children": [], "start_point": {"row": 39, "column": 73}, "end_point": {"row": 39, "column": 76}}, {"id": 140, "type": "/", "text": "/", "parent": 135, "children": [], "start_point": {"row": 39, "column": 77}, "end_point": {"row": 39, "column": 78}}, {"id": 141, "type": "identifier", "text": "g_distance", "parent": 135, "children": [], "start_point": {"row": 39, "column": 79}, "end_point": {"row": 39, "column": 89}}, {"id": 142, "type": "else_clause", "text": "else if (1 == g_mode) {\n printf(\"Fuel consumption is %.1f miles per gallon.\\n\", g_distance / g_fuel);\n }", "parent": 124, "children": [143], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 42, "column": 5}}, {"id": 143, "type": "if_statement", "text": "if (1 == g_mode) {\n printf(\"Fuel consumption is %.1f miles per gallon.\\n\", g_distance / g_fuel);\n }", "parent": 142, "children": [144], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 42, "column": 5}}, {"id": 144, "type": "parenthesized_expression", "text": "(1 == g_mode)", "parent": 143, "children": [145], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 27}}, {"id": 145, "type": "binary_expression", "text": "1 == g_mode", "parent": 144, "children": [146, 147, 148], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 26}}, {"id": 146, "type": "number_literal", "text": "1", "parent": 145, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 16}}, {"id": 147, "type": "==", "text": "==", "parent": 145, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 19}}, {"id": 148, "type": "identifier", "text": "g_mode", "parent": 145, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 26}}, {"id": 149, "type": "call_expression", "text": "printf(\"Fuel consumption is %.1f miles per gallon.\\n\", g_distance / g_fuel)", "parent": 143, "children": [150, 151], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 83}}, {"id": 150, "type": "identifier", "text": "printf", "parent": 149, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 14}}, {"id": 151, "type": "argument_list", "text": "(\"Fuel consumption is %.1f miles per gallon.\\n\", g_distance / g_fuel)", "parent": 149, "children": [152, 154], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 83}}, {"id": 152, "type": "string_literal", "text": "\"Fuel consumption is %.1f miles per gallon.\\n\"", "parent": 151, "children": [153], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 61}}, {"id": 153, "type": "escape_sequence", "text": "\\n", "parent": 152, "children": [], "start_point": {"row": 41, "column": 58}, "end_point": {"row": 41, "column": 60}}, {"id": 154, "type": "binary_expression", "text": "g_distance / g_fuel", "parent": 151, "children": [155, 156, 157], "start_point": {"row": 41, "column": 63}, "end_point": {"row": 41, "column": 82}}, {"id": 155, "type": "identifier", "text": "g_distance", "parent": 154, "children": [], "start_point": {"row": 41, "column": 63}, "end_point": {"row": 41, "column": 73}}, {"id": 156, "type": "/", "text": "/", "parent": 154, "children": [], "start_point": {"row": 41, "column": 74}, "end_point": {"row": 41, "column": 75}}, {"id": 157, "type": "identifier", "text": "g_fuel", "parent": 154, "children": [], "start_point": {"row": 41, "column": 76}, "end_point": {"row": 41, "column": 82}}]}, "node_categories": {"declarations": {"functions": [27, 29, 61, 63, 119, 121], "variables": [6, 9, 12, 15, 32], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [36, 37, 38, 43, 47, 53, 67, 68, 72, 76, 80, 82, 86, 90, 94, 95, 99, 103, 107, 109, 113, 117, 125, 126, 130, 135, 136, 144, 145, 149, 154], "assignments": [57], "loops": [], "conditionals": [8, 11, 14, 21, 30, 34, 35, 41, 46, 48, 52, 54, 55, 58, 60, 64, 66, 71, 73, 77, 81, 83, 87, 91, 93, 98, 100, 104, 108, 110, 114, 118, 122, 124, 129, 131, 137, 141, 143, 148, 150, 155, 157], "returns": [56], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 22, 25, 26, 39, 44, 50, 69, 75, 79, 85, 89, 96, 102, 106, 112, 116, 127, 133, 139, 146, 152], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 27, "universal_type": "function", "name": "set_mode", "text_snippet": "void set_mode(int mode)\n{\n if (0 != mode && 1 != mode) {\n printf(\"Invalie mode specified. "}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "set_mode(int mode)"}, {"node_id": 61, "universal_type": "function", "name": "get_info", "text_snippet": "void get_info()\n{\n if (0 == g_mode) {\n printf(\"Enter distance traveldd in kilometers: \");\n"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "get_info()"}, {"node_id": 119, "universal_type": "function", "name": "show_info", "text_snippet": "void show_info()\n{\n if (0 == g_mode) {\n printf(\"Fuel consumption is %.2f liters per 100 km"}, {"node_id": 121, "universal_type": "function", "name": "unknown", "text_snippet": "show_info()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"pe12-2a.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdio.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include \"pe12-2a.h\"\n#include <stdio.h>\n\nstatic int g_mode;\nstatic float g_distance;\nstatic float g_fuel;\nstatic char* modes[2] = {\n \"metric\",\n \"US\"\n};\n\nvoid set_mode(int mode)\n{\n if (0 != mode && 1 != mode) {\n printf(\"Invalie mode specified. Mode %d (%s) used.\\n\", g_mode, modes[g_mode]);\n return ;\n }\n\n g_mode = mode;\n}\n\nvoid get_info()\n{\n if (0 == g_mode) {\n printf(\"Enter distance traveldd in kilometers: \");\n scanf(\"%f\", &g_distance);\n printf(\"Enter fuel consumed in liters:\");\n scanf(\"%f\", &g_fuel);\n } else if (1 == g_mode) {\n printf(\"Enter distance traveldd in miles: \");\n scanf(\"%f\", &g_distance);\n printf(\"Enter fuel consumed in gallons:\");\n scanf(\"%f\", &g_fuel);\n } \n}\n\nvoid show_info()\n{\n if (0 == g_mode) {\n printf(\"Fuel consumption is %.2f liters per 100 km.\\n\", g_fuel * 100 / g_distance);\n } else if (1 == g_mode) {\n printf(\"Fuel consumption is %.1f miles per gallon.\\n\", g_distance / g_fuel);\n }\n}"}
374
c
/* CentipedeSegment.h - <NAME>, October 2017 */ #ifndef _CentipedeSegment #define _CentipedeSegment #include "Centipede.h" class CentipedeSegment : public Centipede { public: /* BIG FOUR */ CentipedeSegment(); CentipedeSegment(const CentipedeSegment &) = default; CentipedeSegment & operator =(const CentipedeSegment &) = default; ~CentipedeSegment() = default; /* INITIALIZER */ void Initialize(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body); /* METHODS */ virtual void Update(); virtual void Draw(); virtual void Destroy(); virtual void Delete(); virtual void PlaceShroom(); virtual void Split(); virtual const HeadMoveState * GetNextState() override; virtual Tile* getTile() override; virtual CentipedeSegment * getNext() { return pNext; }; virtual Centipede * getPrev() { return pPrev; }; virtual Centipede * setNext(CentipedeSegment * centi) override { pNext = centi; return 0; } virtual Centipede * setPrev(Centipede * centi) { pPrev = centi; return 0; } virtual sf::Vector2f getPos() { return Pos; }; virtual int GetIndex() override; virtual void ReportHeadRecall() override {}; // Does nothing /* COLLISIONS */ virtual void Collision(GameObject *go) {}; virtual void Collision(Bullet *bullet); private: CentipedeSegment *pNext; Centipede *pPrev; Tile *pTile; Tile *pNextTile; const HeadMoveState *pCurrentState; const HeadMoveState *pNextState; const Score SCORE; const int MAX_HEALTH; int health; int index; sf::Vector2f Pos; sf::Sound snd; AnimatedSprite MainSprite; CollisionTools::TextureBitmap bitmap; }; #endif _CentipedeSegment
31.52
50
(translation_unit) "/* CentipedeSegment.h - <NAME>, October 2017 */\n\n#ifndef _CentipedeSegment\n#define _CentipedeSegment\n\n#include "Centipede.h"\n\nclass CentipedeSegment : public Centipede\n{\npublic:\n /* BIG FOUR */\n CentipedeSegment();\n CentipedeSegment(const CentipedeSegment &) = default;\n CentipedeSegment & operator =(const CentipedeSegment &) = default;\n ~CentipedeSegment() = default;\n\n /* INITIALIZER */\n void Initialize(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body);\n\n /* METHODS */\n virtual void Update();\n virtual void Draw();\n virtual void Destroy();\n virtual void Delete();\n virtual void PlaceShroom();\n virtual void Split();\n\n virtual const HeadMoveState * GetNextState() override;\n virtual Tile* getTile() override;\n\n virtual CentipedeSegment * getNext() { return pNext; };\n virtual Centipede * getPrev() { return pPrev; };\n\n virtual Centipede * setNext(CentipedeSegment * centi) override { pNext = centi; return 0; }\n virtual Centipede * setPrev(Centipede * centi) { pPrev = centi; return 0; }\n\n virtual sf::Vector2f getPos() { return Pos; };\n\n virtual int GetIndex() override;\n virtual void ReportHeadRecall() override {}; // Does nothing\n\n /* COLLISIONS */\n virtual void Collision(GameObject *go) {};\n virtual void Collision(Bullet *bullet);\n\nprivate:\n CentipedeSegment *pNext;\n Centipede *pPrev;\n\n Tile *pTile;\n Tile *pNextTile;\n\n const HeadMoveState *pCurrentState;\n const HeadMoveState *pNextState;\n const Score SCORE;\n\n const int MAX_HEALTH;\n\n int health;\n int index;\n\n sf::Vector2f Pos;\n sf::Sound snd;\n\n AnimatedSprite MainSprite;\n CollisionTools::TextureBitmap bitmap;\n};\n\n#endif _CentipedeSegment" (comment) "/* CentipedeSegment.h - <NAME>, October 2017 */" (preproc_ifdef) "#ifndef _CentipedeSegment\n#define _CentipedeSegment\n\n#include "Centipede.h"\n\nclass CentipedeSegment : public Centipede\n{\npublic:\n /* BIG FOUR */\n CentipedeSegment();\n CentipedeSegment(const CentipedeSegment &) = default;\n CentipedeSegment & operator =(const CentipedeSegment &) = default;\n ~CentipedeSegment() = default;\n\n /* INITIALIZER */\n void Initialize(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body);\n\n /* METHODS */\n virtual void Update();\n virtual void Draw();\n virtual void Destroy();\n virtual void Delete();\n virtual void PlaceShroom();\n virtual void Split();\n\n virtual const HeadMoveState * GetNextState() override;\n virtual Tile* getTile() override;\n\n virtual CentipedeSegment * getNext() { return pNext; };\n virtual Centipede * getPrev() { return pPrev; };\n\n virtual Centipede * setNext(CentipedeSegment * centi) override { pNext = centi; return 0; }\n virtual Centipede * setPrev(Centipede * centi) { pPrev = centi; return 0; }\n\n virtual sf::Vector2f getPos() { return Pos; };\n\n virtual int GetIndex() override;\n virtual void ReportHeadRecall() override {}; // Does nothing\n\n /* COLLISIONS */\n virtual void Collision(GameObject *go) {};\n virtual void Collision(Bullet *bullet);\n\nprivate:\n CentipedeSegment *pNext;\n Centipede *pPrev;\n\n Tile *pTile;\n Tile *pNextTile;\n\n const HeadMoveState *pCurrentState;\n const HeadMoveState *pNextState;\n const Score SCORE;\n\n const int MAX_HEALTH;\n\n int health;\n int index;\n\n sf::Vector2f Pos;\n sf::Sound snd;\n\n AnimatedSprite MainSprite;\n CollisionTools::TextureBitmap bitmap;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "_CentipedeSegment" (preproc_def) "#define _CentipedeSegment\n" (#define) "#define" (identifier) "_CentipedeSegment" (preproc_include) "#include "Centipede.h"\n" (#include) "#include" (string_literal) ""Centipede.h"" (") """ (string_content) "Centipede.h" (") """ (declaration) "class CentipedeSegment : public Centipede\n{\npublic:\n /* BIG FOUR */\n CentipedeSegment();\n CentipedeSegment(const CentipedeSegment &) = default;" (type_identifier) "class" (init_declarator) "CentipedeSegment : public Centipede\n{\npublic:\n /* BIG FOUR */\n CentipedeSegment();\n CentipedeSegment(const CentipedeSegment &) = default" (identifier) "CentipedeSegment" (ERROR) ": public Centipede\n{\npublic:\n /* BIG FOUR */\n CentipedeSegment();\n CentipedeSegment(const CentipedeSegment &)" (:) ":" (identifier) "public" (identifier) "Centipede" ({) "{" (labeled_statement) "public:\n /* BIG FOUR */\n CentipedeSegment();" (statement_identifier) "public" (:) ":" (comment) "/* BIG FOUR */" (expression_statement) "CentipedeSegment();" (call_expression) "CentipedeSegment()" (identifier) "CentipedeSegment" (argument_list) "()" (() "(" ()) ")" (;) ";" (macro_type_specifier) "CentipedeSegment(const CentipedeSegment &)" (identifier) "CentipedeSegment" (() "(" (type_descriptor) "const CentipedeSegment" (type_qualifier) "const" (const) "const" (type_identifier) "CentipedeSegment" (ERROR) "&" (&) "&" ()) ")" (=) "=" (identifier) "default" (;) ";" (expression_statement) "CentipedeSegment & operator =(const CentipedeSegment &) = default;\n ~CentipedeSegment() = default;" (binary_expression) "CentipedeSegment & operator =(const CentipedeSegment &) = default;\n ~CentipedeSegment() = default" (identifier) "CentipedeSegment" (&) "&" (assignment_expression) "operator =(const CentipedeSegment &) = default;\n ~CentipedeSegment() = default" (identifier) "operator" (=) "=" (cast_expression) "(const CentipedeSegment &) = default;\n ~CentipedeSegment() = default" (() "(" (type_descriptor) "const CentipedeSegment" (type_qualifier) "const" (const) "const" (type_identifier) "CentipedeSegment" (ERROR) "&" (&) "&" ()) ")" (ERROR) "= default;" (=) "=" (default) "default" (;) ";" (unary_expression) "~CentipedeSegment() = default" (~) "~" (assignment_expression) "CentipedeSegment() = default" (call_expression) "CentipedeSegment()" (identifier) "CentipedeSegment" (argument_list) "()" (() "(" ()) ")" (=) "=" (identifier) "default" (;) ";" (comment) "/* INITIALIZER */" (declaration) "void Initialize(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body);" (primitive_type) "void" (function_declarator) "Initialize(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body)" (identifier) "Initialize" (parameter_list) "(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body)" (() "(" (parameter_declaration) "Tile* pTile" (type_identifier) "Tile" (pointer_declarator) "* pTile" (*) "*" (identifier) "pTile" (,) "," (parameter_declaration) "sf::Vector2f pos" (type_identifier) "sf" (ERROR) "::Vector2f" (:) ":" (:) ":" (identifier) "Vector2f" (identifier) "pos" (,) "," (parameter_declaration) "int index" (primitive_type) "int" (identifier) "index" (,) "," (parameter_declaration) "const HeadMoveState* state" (type_qualifier) "const" (const) "const" (type_identifier) "HeadMoveState" (pointer_declarator) "* state" (*) "*" (identifier) "state" (,) "," (parameter_declaration) "Centipede* body" (type_identifier) "Centipede" (pointer_declarator) "* body" (*) "*" (identifier) "body" ()) ")" (;) ";" (comment) "/* METHODS */" (declaration) "virtual void Update();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "Update()" (identifier) "Update" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual void Draw();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "Draw()" (identifier) "Draw" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual void Destroy();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "Destroy()" (identifier) "Destroy" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual void Delete();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "Delete()" (identifier) "Delete" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual void PlaceShroom();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "PlaceShroom()" (identifier) "PlaceShroom" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual void Split();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "Split()" (identifier) "Split" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual const HeadMoveState * GetNextState() override;" (type_identifier) "virtual" (type_qualifier) "const" (const) "const" (ERROR) "HeadMoveState" (identifier) "HeadMoveState" (pointer_declarator) "* GetNextState() override" (*) "*" (function_declarator) "GetNextState() override" (identifier) "GetNextState" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (declaration) "virtual Tile* getTile() override;" (type_identifier) "virtual" (ERROR) "Tile" (identifier) "Tile" (pointer_declarator) "* getTile() override" (*) "*" (function_declarator) "getTile() override" (identifier) "getTile" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (function_definition) "virtual CentipedeSegment * getNext() { return pNext; }" (type_identifier) "virtual" (ERROR) "CentipedeSegment" (identifier) "CentipedeSegment" (pointer_declarator) "* getNext()" (*) "*" (function_declarator) "getNext()" (identifier) "getNext" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return pNext; }" ({) "{" (return_statement) "return pNext;" (return) "return" (identifier) "pNext" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "virtual Centipede * getPrev() { return pPrev; }" (type_identifier) "virtual" (ERROR) "Centipede" (identifier) "Centipede" (pointer_declarator) "* getPrev()" (*) "*" (function_declarator) "getPrev()" (identifier) "getPrev" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return pPrev; }" ({) "{" (return_statement) "return pPrev;" (return) "return" (identifier) "pPrev" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "virtual Centipede * setNext(CentipedeSegment * centi) override { pNext = centi; return 0; }" (type_identifier) "virtual" (ERROR) "Centipede" (identifier) "Centipede" (pointer_declarator) "* setNext(CentipedeSegment * centi) override" (*) "*" (function_declarator) "setNext(CentipedeSegment * centi) override" (identifier) "setNext" (parameter_list) "(CentipedeSegment * centi)" (() "(" (parameter_declaration) "CentipedeSegment * centi" (type_identifier) "CentipedeSegment" (pointer_declarator) "* centi" (*) "*" (identifier) "centi" ()) ")" (identifier) "override" (compound_statement) "{ pNext = centi; return 0; }" ({) "{" (expression_statement) "pNext = centi;" (assignment_expression) "pNext = centi" (identifier) "pNext" (=) "=" (identifier) "centi" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "virtual Centipede * setPrev(Centipede * centi) { pPrev = centi; return 0; }" (type_identifier) "virtual" (ERROR) "Centipede" (identifier) "Centipede" (pointer_declarator) "* setPrev(Centipede * centi)" (*) "*" (function_declarator) "setPrev(Centipede * centi)" (identifier) "setPrev" (parameter_list) "(Centipede * centi)" (() "(" (parameter_declaration) "Centipede * centi" (type_identifier) "Centipede" (pointer_declarator) "* centi" (*) "*" (identifier) "centi" ()) ")" (compound_statement) "{ pPrev = centi; return 0; }" ({) "{" (expression_statement) "pPrev = centi;" (assignment_expression) "pPrev = centi" (identifier) "pPrev" (=) "=" (identifier) "centi" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "virtual sf::Vector2f getPos() { return Pos; }" (type_identifier) "virtual" (ERROR) "sf::Vector2f" (identifier) "sf" (:) ":" (:) ":" (identifier) "Vector2f" (function_declarator) "getPos()" (identifier) "getPos" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return Pos; }" ({) "{" (return_statement) "return Pos;" (return) "return" (identifier) "Pos" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "virtual int GetIndex() override;\n virtual void ReportHeadRecall() override {}" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (function_declarator) "GetIndex()" (identifier) "GetIndex" (parameter_list) "()" (() "(" ()) ")" (declaration) "override;" (type_identifier) "override" (identifier) "" (;) ";" (ERROR) "virtual void ReportHeadRecall() override" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "ReportHeadRecall() override" (identifier) "ReportHeadRecall" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (comment) "// Does nothing" (comment) "/* COLLISIONS */" (function_definition) "virtual void Collision(GameObject *go) {}" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "Collision(GameObject *go)" (identifier) "Collision" (parameter_list) "(GameObject *go)" (() "(" (parameter_declaration) "GameObject *go" (type_identifier) "GameObject" (pointer_declarator) "*go" (*) "*" (identifier) "go" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (declaration) "virtual void Collision(Bullet *bullet);" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "Collision(Bullet *bullet)" (identifier) "Collision" (parameter_list) "(Bullet *bullet)" (() "(" (parameter_declaration) "Bullet *bullet" (type_identifier) "Bullet" (pointer_declarator) "*bullet" (*) "*" (identifier) "bullet" ()) ")" (;) ";" (labeled_statement) "private:\n CentipedeSegment *pNext;" (statement_identifier) "private" (:) ":" (declaration) "CentipedeSegment *pNext;" (type_identifier) "CentipedeSegment" (pointer_declarator) "*pNext" (*) "*" (identifier) "pNext" (;) ";" (declaration) "Centipede *pPrev;" (type_identifier) "Centipede" (pointer_declarator) "*pPrev" (*) "*" (identifier) "pPrev" (;) ";" (declaration) "Tile *pTile;" (type_identifier) "Tile" (pointer_declarator) "*pTile" (*) "*" (identifier) "pTile" (;) ";" (declaration) "Tile *pNextTile;" (type_identifier) "Tile" (pointer_declarator) "*pNextTile" (*) "*" (identifier) "pNextTile" (;) ";" (declaration) "const HeadMoveState *pCurrentState;" (type_qualifier) "const" (const) "const" (type_identifier) "HeadMoveState" (pointer_declarator) "*pCurrentState" (*) "*" (identifier) "pCurrentState" (;) ";" (declaration) "const HeadMoveState *pNextState;" (type_qualifier) "const" (const) "const" (type_identifier) "HeadMoveState" (pointer_declarator) "*pNextState" (*) "*" (identifier) "pNextState" (;) ";" (declaration) "const Score SCORE;" (type_qualifier) "const" (const) "const" (type_identifier) "Score" (identifier) "SCORE" (;) ";" (declaration) "const int MAX_HEALTH;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (identifier) "MAX_HEALTH" (;) ";" (declaration) "int health;" (primitive_type) "int" (identifier) "health" (;) ";" (declaration) "int index;" (primitive_type) "int" (identifier) "index" (;) ";" (labeled_statement) "sf::Vector2f Pos;" (statement_identifier) "sf" (:) ":" (ERROR) ":" (:) ":" (declaration) "Vector2f Pos;" (type_identifier) "Vector2f" (identifier) "Pos" (;) ";" (labeled_statement) "sf::Sound snd;" (statement_identifier) "sf" (:) ":" (ERROR) ":" (:) ":" (declaration) "Sound snd;" (type_identifier) "Sound" (identifier) "snd" (;) ";" (declaration) "AnimatedSprite MainSprite;" (type_identifier) "AnimatedSprite" (identifier) "MainSprite" (;) ";" (labeled_statement) "CollisionTools::TextureBitmap bitmap;" (statement_identifier) "CollisionTools" (:) ":" (ERROR) ":" (:) ":" (declaration) "TextureBitmap bitmap;" (type_identifier) "TextureBitmap" (identifier) "bitmap" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (expression_statement) "_CentipedeSegment" (identifier) "_CentipedeSegment" (;) ""
493
27
{"language": "c", "success": true, "metadata": {"lines": 50, "avg_line_length": 31.52, "nodes": 311, "errors": 0, "source_hash": "fdee9663f86e4ea12d511f0c5cd0c39ee69c1342184879036cf4f98cfa3efff0", "categorized_nodes": 209}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _CentipedeSegment\n#define _CentipedeSegment\n\n#include \"Centipede.h\"\n\nclass CentipedeSegment : public Centipede\n{\npublic:\n\t/* BIG FOUR */\n\tCentipedeSegment();\n\tCentipedeSegment(const CentipedeSegment &) = default;\n\tCentipedeSegment & operator =(const CentipedeSegment &) = default;\n\t~CentipedeSegment() = default;\n\n\t/* INITIALIZER */\n\tvoid Initialize(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body);\n\n\t/* METHODS */\n\tvirtual void Update();\n\tvirtual void Draw();\n\tvirtual void Destroy();\n\tvirtual void Delete();\n\tvirtual void PlaceShroom();\n\tvirtual void Split();\n\n\tvirtual const HeadMoveState * GetNextState() override;\n\tvirtual Tile* getTile() override;\n\n\tvirtual CentipedeSegment * getNext() { return pNext; };\n\tvirtual Centipede * getPrev()\t\t { return pPrev; };\n\n\tvirtual Centipede * setNext(CentipedeSegment * centi) override { pNext = centi; return 0; }\n\tvirtual Centipede * setPrev(Centipede * centi) { pPrev = centi; return 0; }\n\n\tvirtual sf::Vector2f getPos() { return Pos; };\n\n\tvirtual int GetIndex() override;\n\tvirtual void ReportHeadRecall() override {}; // Does nothing\n\n\t/* COLLISIONS */\n\tvirtual void Collision(GameObject *go) {};\n\tvirtual void Collision(Bullet *bullet);\n\nprivate:\n\tCentipedeSegment *pNext;\n\tCentipede *pPrev;\n\n\tTile *pTile;\n\tTile *pNextTile;\n\n\tconst HeadMoveState *pCurrentState;\n\tconst HeadMoveState *pNextState;\n\tconst Score SCORE;\n\n\tconst int MAX_HEALTH;\n\n\tint health;\n\tint index;\n\n\tsf::Vector2f Pos;\n\tsf::Sound snd;\n\n\tAnimatedSprite MainSprite;\n\tCollisionTools::TextureBitmap bitmap;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 43, 71, 78, 85, 92, 99, 106, 113, 123, 133, 144, 155, 176, 196, 206, 224, 236, 248, 254, 259, 264, 269, 274, 279, 282, 285, 288, 291, 296, 301, 304, 309], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 68, "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": "_CentipedeSegment", "parent": 0, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define _CentipedeSegment\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": "_CentipedeSegment", "parent": 3, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include \"Centipede.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": "\"Centipede.h\"", "parent": 6, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 22}}, {"id": 9, "type": "declaration", "text": "class CentipedeSegment : public Centipede\n{\npublic:\n\t/* BIG FOUR */\n\tCentipedeSegment();\n\tCentipedeSegment(const CentipedeSegment &) = default;", "parent": 0, "children": [10], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 12, "column": 54}}, {"id": 10, "type": "init_declarator", "text": "CentipedeSegment : public Centipede\n{\npublic:\n\t/* BIG FOUR */\n\tCentipedeSegment();\n\tCentipedeSegment(const CentipedeSegment &) = default", "parent": 9, "children": [11, 12, 22, 23], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 12, "column": 53}}, {"id": 11, "type": "identifier", "text": "CentipedeSegment", "parent": 10, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 22}}, {"id": 12, "type": "ERROR", "text": ": public Centipede\n{\npublic:\n\t/* BIG FOUR */\n\tCentipedeSegment();\n\tCentipedeSegment(const CentipedeSegment &)", "parent": 10, "children": [13, 14, 18], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 12, "column": 43}}, {"id": 13, "type": "identifier", "text": "Centipede", "parent": 12, "children": [], "start_point": {"row": 7, "column": 32}, "end_point": {"row": 7, "column": 41}}, {"id": 14, "type": "labeled_statement", "text": "public:\n\t/* BIG FOUR */\n\tCentipedeSegment();", "parent": 12, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 11, "column": 20}}, {"id": 15, "type": "call_expression", "text": "CentipedeSegment()", "parent": 14, "children": [16, 17], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 19}}, {"id": 16, "type": "identifier", "text": "CentipedeSegment", "parent": 15, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 17}}, {"id": 17, "type": "argument_list", "text": "()", "parent": 15, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 19}}, {"id": 18, "type": "macro_type_specifier", "text": "CentipedeSegment(const CentipedeSegment &)", "parent": 12, "children": [19, 20], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 43}}, {"id": 19, "type": "identifier", "text": "CentipedeSegment", "parent": 18, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 17}}, {"id": 20, "type": "type_descriptor", "text": "const CentipedeSegment", "parent": 18, "children": [21], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 40}}, {"id": 21, "type": "type_identifier", "text": "CentipedeSegment", "parent": 20, "children": [], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 40}}, {"id": 22, "type": "=", "text": "=", "parent": 10, "children": [], "start_point": {"row": 12, "column": 44}, "end_point": {"row": 12, "column": 45}}, {"id": 23, "type": "identifier", "text": "default", "parent": 10, "children": [], "start_point": {"row": 12, "column": 46}, "end_point": {"row": 12, "column": 53}}, {"id": 24, "type": "binary_expression", "text": "CentipedeSegment & operator =(const CentipedeSegment &) = default;\n\t~CentipedeSegment() = default", "parent": 0, "children": [25, 26], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 14, "column": 30}}, {"id": 25, "type": "identifier", "text": "CentipedeSegment", "parent": 24, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 17}}, {"id": 26, "type": "assignment_expression", "text": "operator =(const CentipedeSegment &) = default;\n\t~CentipedeSegment() = default", "parent": 24, "children": [27, 28, 29], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 14, "column": 30}}, {"id": 27, "type": "identifier", "text": "operator", "parent": 26, "children": [], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 28}}, {"id": 28, "type": "=", "text": "=", "parent": 26, "children": [], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 30}}, {"id": 29, "type": "cast_expression", "text": "(const CentipedeSegment &) = default;\n\t~CentipedeSegment() = default", "parent": 26, "children": [30, 32, 35], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 14, "column": 30}}, {"id": 30, "type": "type_descriptor", "text": "const CentipedeSegment", "parent": 29, "children": [31], "start_point": {"row": 13, "column": 31}, "end_point": {"row": 13, "column": 53}}, {"id": 31, "type": "type_identifier", "text": "CentipedeSegment", "parent": 30, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 53}}, {"id": 32, "type": "ERROR", "text": "= default;", "parent": 29, "children": [33, 34], "start_point": {"row": 13, "column": 57}, "end_point": {"row": 13, "column": 67}}, {"id": 33, "type": "=", "text": "=", "parent": 32, "children": [], "start_point": {"row": 13, "column": 57}, "end_point": {"row": 13, "column": 58}}, {"id": 34, "type": "default", "text": "default", "parent": 32, "children": [], "start_point": {"row": 13, "column": 59}, "end_point": {"row": 13, "column": 66}}, {"id": 35, "type": "unary_expression", "text": "~CentipedeSegment() = default", "parent": 29, "children": [36, 37], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 30}}, {"id": 36, "type": "~", "text": "~", "parent": 35, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 2}}, {"id": 37, "type": "assignment_expression", "text": "CentipedeSegment() = default", "parent": 35, "children": [38, 41, 42], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 30}}, {"id": 38, "type": "call_expression", "text": "CentipedeSegment()", "parent": 37, "children": [39, 40], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 20}}, {"id": 39, "type": "identifier", "text": "CentipedeSegment", "parent": 38, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 18}}, {"id": 40, "type": "argument_list", "text": "()", "parent": 38, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 20}}, {"id": 41, "type": "=", "text": "=", "parent": 37, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 22}}, {"id": 42, "type": "identifier", "text": "default", "parent": 37, "children": [], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 30}}, {"id": 43, "type": "declaration", "text": "void Initialize(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body);", "parent": 0, "children": [44, 45], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 104}}, {"id": 44, "type": "primitive_type", "text": "void", "parent": 43, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 5}}, {"id": 45, "type": "function_declarator", "text": "Initialize(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body)", "parent": 43, "children": [46, 47], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 103}}, {"id": 46, "type": "identifier", "text": "Initialize", "parent": 45, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 16}}, {"id": 47, "type": "parameter_list", "text": "(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body)", "parent": 45, "children": [48, 53, 58, 61, 66], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 103}}, {"id": 48, "type": "parameter_declaration", "text": "Tile* pTile", "parent": 47, "children": [49, 50], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 28}}, {"id": 49, "type": "type_identifier", "text": "Tile", "parent": 48, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 21}}, {"id": 50, "type": "pointer_declarator", "text": "* pTile", "parent": 48, "children": [51, 52], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 28}}, {"id": 51, "type": "*", "text": "*", "parent": 50, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 22}}, {"id": 52, "type": "identifier", "text": "pTile", "parent": 50, "children": [], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 28}}, {"id": 53, "type": "parameter_declaration", "text": "sf::Vector2f pos", "parent": 47, "children": [54, 55, 57], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 46}}, {"id": 54, "type": "type_identifier", "text": "sf", "parent": 53, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 32}}, {"id": 55, "type": "ERROR", "text": "::Vector2f", "parent": 53, "children": [56], "start_point": {"row": 17, "column": 32}, "end_point": {"row": 17, "column": 42}}, {"id": 56, "type": "identifier", "text": "Vector2f", "parent": 55, "children": [], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 42}}, {"id": 57, "type": "identifier", "text": "pos", "parent": 53, "children": [], "start_point": {"row": 17, "column": 43}, "end_point": {"row": 17, "column": 46}}, {"id": 58, "type": "parameter_declaration", "text": "int index", "parent": 47, "children": [59, 60], "start_point": {"row": 17, "column": 48}, "end_point": {"row": 17, "column": 57}}, {"id": 59, "type": "primitive_type", "text": "int", "parent": 58, "children": [], "start_point": {"row": 17, "column": 48}, "end_point": {"row": 17, "column": 51}}, {"id": 60, "type": "identifier", "text": "index", "parent": 58, "children": [], "start_point": {"row": 17, "column": 52}, "end_point": {"row": 17, "column": 57}}, {"id": 61, "type": "parameter_declaration", "text": "const HeadMoveState* state", "parent": 47, "children": [62, 63], "start_point": {"row": 17, "column": 59}, "end_point": {"row": 17, "column": 85}}, {"id": 62, "type": "type_identifier", "text": "HeadMoveState", "parent": 61, "children": [], "start_point": {"row": 17, "column": 65}, "end_point": {"row": 17, "column": 78}}, {"id": 63, "type": "pointer_declarator", "text": "* state", "parent": 61, "children": [64, 65], "start_point": {"row": 17, "column": 78}, "end_point": {"row": 17, "column": 85}}, {"id": 64, "type": "*", "text": "*", "parent": 63, "children": [], "start_point": {"row": 17, "column": 78}, "end_point": {"row": 17, "column": 79}}, {"id": 65, "type": "identifier", "text": "state", "parent": 63, "children": [], "start_point": {"row": 17, "column": 80}, "end_point": {"row": 17, "column": 85}}, {"id": 66, "type": "parameter_declaration", "text": "Centipede* body", "parent": 47, "children": [67, 68], "start_point": {"row": 17, "column": 87}, "end_point": {"row": 17, "column": 102}}, {"id": 67, "type": "type_identifier", "text": "Centipede", "parent": 66, "children": [], "start_point": {"row": 17, "column": 87}, "end_point": {"row": 17, "column": 96}}, {"id": 68, "type": "pointer_declarator", "text": "* body", "parent": 66, "children": [69, 70], "start_point": {"row": 17, "column": 96}, "end_point": {"row": 17, "column": 102}}, {"id": 69, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 17, "column": 96}, "end_point": {"row": 17, "column": 97}}, {"id": 70, "type": "identifier", "text": "body", "parent": 68, "children": [], "start_point": {"row": 17, "column": 98}, "end_point": {"row": 17, "column": 102}}, {"id": 71, "type": "declaration", "text": "virtual void Update();", "parent": 0, "children": [72, 73, 75], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 23}}, {"id": 72, "type": "type_identifier", "text": "virtual", "parent": 71, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 8}}, {"id": 73, "type": "ERROR", "text": "void", "parent": 71, "children": [74], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 13}}, {"id": 74, "type": "identifier", "text": "void", "parent": 73, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 13}}, {"id": 75, "type": "function_declarator", "text": "Update()", "parent": 71, "children": [76, 77], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 22}}, {"id": 76, "type": "identifier", "text": "Update", "parent": 75, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 20}}, {"id": 77, "type": "parameter_list", "text": "()", "parent": 75, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 22}}, {"id": 78, "type": "declaration", "text": "virtual void Draw();", "parent": 0, "children": [79, 80, 82], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 21}}, {"id": 79, "type": "type_identifier", "text": "virtual", "parent": 78, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 8}}, {"id": 80, "type": "ERROR", "text": "void", "parent": 78, "children": [81], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 81, "type": "identifier", "text": "void", "parent": 80, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 82, "type": "function_declarator", "text": "Draw()", "parent": 78, "children": [83, 84], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 20}}, {"id": 83, "type": "identifier", "text": "Draw", "parent": 82, "children": [], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 18}}, {"id": 84, "type": "parameter_list", "text": "()", "parent": 82, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 20}}, {"id": 85, "type": "declaration", "text": "virtual void Destroy();", "parent": 0, "children": [86, 87, 89], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 24}}, {"id": 86, "type": "type_identifier", "text": "virtual", "parent": 85, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 8}}, {"id": 87, "type": "ERROR", "text": "void", "parent": 85, "children": [88], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 13}}, {"id": 88, "type": "identifier", "text": "void", "parent": 87, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 13}}, {"id": 89, "type": "function_declarator", "text": "Destroy()", "parent": 85, "children": [90, 91], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 23}}, {"id": 90, "type": "identifier", "text": "Destroy", "parent": 89, "children": [], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 21}}, {"id": 91, "type": "parameter_list", "text": "()", "parent": 89, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 23}}, {"id": 92, "type": "declaration", "text": "virtual void Delete();", "parent": 0, "children": [93, 94, 96], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 23}}, {"id": 93, "type": "type_identifier", "text": "virtual", "parent": 92, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 8}}, {"id": 94, "type": "ERROR", "text": "void", "parent": 92, "children": [95], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 13}}, {"id": 95, "type": "identifier", "text": "void", "parent": 94, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 13}}, {"id": 96, "type": "function_declarator", "text": "Delete()", "parent": 92, "children": [97, 98], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 22}}, {"id": 97, "type": "identifier", "text": "Delete", "parent": 96, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 20}}, {"id": 98, "type": "parameter_list", "text": "()", "parent": 96, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 22}}, {"id": 99, "type": "declaration", "text": "virtual void PlaceShroom();", "parent": 0, "children": [100, 101, 103], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 28}}, {"id": 100, "type": "type_identifier", "text": "virtual", "parent": 99, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 8}}, {"id": 101, "type": "ERROR", "text": "void", "parent": 99, "children": [102], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 13}}, {"id": 102, "type": "identifier", "text": "void", "parent": 101, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 13}}, {"id": 103, "type": "function_declarator", "text": "PlaceShroom()", "parent": 99, "children": [104, 105], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 27}}, {"id": 104, "type": "identifier", "text": "PlaceShroom", "parent": 103, "children": [], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 25}}, {"id": 105, "type": "parameter_list", "text": "()", "parent": 103, "children": [], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 27}}, {"id": 106, "type": "declaration", "text": "virtual void Split();", "parent": 0, "children": [107, 108, 110], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 22}}, {"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": "void", "parent": 106, "children": [109], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 13}}, {"id": 109, "type": "identifier", "text": "void", "parent": 108, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 13}}, {"id": 110, "type": "function_declarator", "text": "Split()", "parent": 106, "children": [111, 112], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 21}}, {"id": 111, "type": "identifier", "text": "Split", "parent": 110, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 19}}, {"id": 112, "type": "parameter_list", "text": "()", "parent": 110, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 21}}, {"id": 113, "type": "declaration", "text": "virtual const HeadMoveState * GetNextState() override;", "parent": 0, "children": [114, 115, 117], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 55}}, {"id": 114, "type": "type_identifier", "text": "virtual", "parent": 113, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 8}}, {"id": 115, "type": "ERROR", "text": "HeadMoveState", "parent": 113, "children": [116], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 28}}, {"id": 116, "type": "identifier", "text": "HeadMoveState", "parent": 115, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 28}}, {"id": 117, "type": "pointer_declarator", "text": "* GetNextState() override", "parent": 113, "children": [118, 119], "start_point": {"row": 27, "column": 29}, "end_point": {"row": 27, "column": 54}}, {"id": 118, "type": "*", "text": "*", "parent": 117, "children": [], "start_point": {"row": 27, "column": 29}, "end_point": {"row": 27, "column": 30}}, {"id": 119, "type": "function_declarator", "text": "GetNextState() override", "parent": 117, "children": [120, 121, 122], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 54}}, {"id": 120, "type": "identifier", "text": "GetNextState", "parent": 119, "children": [], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 43}}, {"id": 121, "type": "parameter_list", "text": "()", "parent": 119, "children": [], "start_point": {"row": 27, "column": 43}, "end_point": {"row": 27, "column": 45}}, {"id": 122, "type": "identifier", "text": "override", "parent": 119, "children": [], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 54}}, {"id": 123, "type": "declaration", "text": "virtual Tile* getTile() override;", "parent": 0, "children": [124, 125, 127], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 34}}, {"id": 124, "type": "type_identifier", "text": "virtual", "parent": 123, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 8}}, {"id": 125, "type": "ERROR", "text": "Tile", "parent": 123, "children": [126], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 13}}, {"id": 126, "type": "identifier", "text": "Tile", "parent": 125, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 13}}, {"id": 127, "type": "pointer_declarator", "text": "* getTile() override", "parent": 123, "children": [128, 129], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 33}}, {"id": 128, "type": "*", "text": "*", "parent": 127, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 14}}, {"id": 129, "type": "function_declarator", "text": "getTile() override", "parent": 127, "children": [130, 131, 132], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 33}}, {"id": 130, "type": "identifier", "text": "getTile", "parent": 129, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 22}}, {"id": 131, "type": "parameter_list", "text": "()", "parent": 129, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 24}}, {"id": 132, "type": "identifier", "text": "override", "parent": 129, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 33}}, {"id": 133, "type": "function_definition", "text": "virtual CentipedeSegment * getNext() { return pNext; }", "parent": 0, "children": [134, 135, 137], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 55}}, {"id": 134, "type": "type_identifier", "text": "virtual", "parent": 133, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 8}}, {"id": 135, "type": "ERROR", "text": "CentipedeSegment", "parent": 133, "children": [136], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 25}}, {"id": 136, "type": "identifier", "text": "CentipedeSegment", "parent": 135, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 25}}, {"id": 137, "type": "pointer_declarator", "text": "* getNext()", "parent": 133, "children": [138, 139], "start_point": {"row": 30, "column": 26}, "end_point": {"row": 30, "column": 37}}, {"id": 138, "type": "*", "text": "*", "parent": 137, "children": [], "start_point": {"row": 30, "column": 26}, "end_point": {"row": 30, "column": 27}}, {"id": 139, "type": "function_declarator", "text": "getNext()", "parent": 137, "children": [140, 141], "start_point": {"row": 30, "column": 28}, "end_point": {"row": 30, "column": 37}}, {"id": 140, "type": "identifier", "text": "getNext", "parent": 139, "children": [], "start_point": {"row": 30, "column": 28}, "end_point": {"row": 30, "column": 35}}, {"id": 141, "type": "parameter_list", "text": "()", "parent": 139, "children": [], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 37}}, {"id": 142, "type": "return_statement", "text": "return pNext;", "parent": 133, "children": [143], "start_point": {"row": 30, "column": 40}, "end_point": {"row": 30, "column": 53}}, {"id": 143, "type": "identifier", "text": "pNext", "parent": 142, "children": [], "start_point": {"row": 30, "column": 47}, "end_point": {"row": 30, "column": 52}}, {"id": 144, "type": "function_definition", "text": "virtual Centipede * getPrev()\t\t { return pPrev; }", "parent": 0, "children": [145, 146, 148], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 50}}, {"id": 145, "type": "type_identifier", "text": "virtual", "parent": 144, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 8}}, {"id": 146, "type": "ERROR", "text": "Centipede", "parent": 144, "children": [147], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 18}}, {"id": 147, "type": "identifier", "text": "Centipede", "parent": 146, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 18}}, {"id": 148, "type": "pointer_declarator", "text": "* getPrev()", "parent": 144, "children": [149, 150], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 30}}, {"id": 149, "type": "*", "text": "*", "parent": 148, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 20}}, {"id": 150, "type": "function_declarator", "text": "getPrev()", "parent": 148, "children": [151, 152], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 30}}, {"id": 151, "type": "identifier", "text": "getPrev", "parent": 150, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 28}}, {"id": 152, "type": "parameter_list", "text": "()", "parent": 150, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 30}}, {"id": 153, "type": "return_statement", "text": "return pPrev;", "parent": 144, "children": [154], "start_point": {"row": 31, "column": 35}, "end_point": {"row": 31, "column": 48}}, {"id": 154, "type": "identifier", "text": "pPrev", "parent": 153, "children": [], "start_point": {"row": 31, "column": 42}, "end_point": {"row": 31, "column": 47}}, {"id": 155, "type": "function_definition", "text": "virtual Centipede * setNext(CentipedeSegment * centi) override { pNext = centi; return 0; }", "parent": 0, "children": [156, 157, 159], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 92}}, {"id": 156, "type": "type_identifier", "text": "virtual", "parent": 155, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 8}}, {"id": 157, "type": "ERROR", "text": "Centipede", "parent": 155, "children": [158], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 18}}, {"id": 158, "type": "identifier", "text": "Centipede", "parent": 157, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 18}}, {"id": 159, "type": "pointer_declarator", "text": "* setNext(CentipedeSegment * centi) override", "parent": 155, "children": [160, 161], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 63}}, {"id": 160, "type": "*", "text": "*", "parent": 159, "children": [], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 20}}, {"id": 161, "type": "function_declarator", "text": "setNext(CentipedeSegment * centi) override", "parent": 159, "children": [162, 163, 169], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 63}}, {"id": 162, "type": "identifier", "text": "setNext", "parent": 161, "children": [], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 28}}, {"id": 163, "type": "parameter_list", "text": "(CentipedeSegment * centi)", "parent": 161, "children": [164], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 54}}, {"id": 164, "type": "parameter_declaration", "text": "CentipedeSegment * centi", "parent": 163, "children": [165, 166], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 53}}, {"id": 165, "type": "type_identifier", "text": "CentipedeSegment", "parent": 164, "children": [], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 45}}, {"id": 166, "type": "pointer_declarator", "text": "* centi", "parent": 164, "children": [167, 168], "start_point": {"row": 33, "column": 46}, "end_point": {"row": 33, "column": 53}}, {"id": 167, "type": "*", "text": "*", "parent": 166, "children": [], "start_point": {"row": 33, "column": 46}, "end_point": {"row": 33, "column": 47}}, {"id": 168, "type": "identifier", "text": "centi", "parent": 166, "children": [], "start_point": {"row": 33, "column": 48}, "end_point": {"row": 33, "column": 53}}, {"id": 169, "type": "identifier", "text": "override", "parent": 161, "children": [], "start_point": {"row": 33, "column": 55}, "end_point": {"row": 33, "column": 63}}, {"id": 170, "type": "assignment_expression", "text": "pNext = centi", "parent": 155, "children": [171, 172, 173], "start_point": {"row": 33, "column": 66}, "end_point": {"row": 33, "column": 79}}, {"id": 171, "type": "identifier", "text": "pNext", "parent": 170, "children": [], "start_point": {"row": 33, "column": 66}, "end_point": {"row": 33, "column": 71}}, {"id": 172, "type": "=", "text": "=", "parent": 170, "children": [], "start_point": {"row": 33, "column": 72}, "end_point": {"row": 33, "column": 73}}, {"id": 173, "type": "identifier", "text": "centi", "parent": 170, "children": [], "start_point": {"row": 33, "column": 74}, "end_point": {"row": 33, "column": 79}}, {"id": 174, "type": "return_statement", "text": "return 0;", "parent": 155, "children": [175], "start_point": {"row": 33, "column": 81}, "end_point": {"row": 33, "column": 90}}, {"id": 175, "type": "number_literal", "text": "0", "parent": 174, "children": [], "start_point": {"row": 33, "column": 88}, "end_point": {"row": 33, "column": 89}}, {"id": 176, "type": "function_definition", "text": "virtual Centipede * setPrev(Centipede * centi) { pPrev = centi; return 0; }", "parent": 0, "children": [177, 178, 180], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 77}}, {"id": 177, "type": "type_identifier", "text": "virtual", "parent": 176, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 8}}, {"id": 178, "type": "ERROR", "text": "Centipede", "parent": 176, "children": [179], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 18}}, {"id": 179, "type": "identifier", "text": "Centipede", "parent": 178, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 18}}, {"id": 180, "type": "pointer_declarator", "text": "* setPrev(Centipede * centi)", "parent": 176, "children": [181, 182], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 47}}, {"id": 181, "type": "*", "text": "*", "parent": 180, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 20}}, {"id": 182, "type": "function_declarator", "text": "setPrev(Centipede * centi)", "parent": 180, "children": [183, 184], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 47}}, {"id": 183, "type": "identifier", "text": "setPrev", "parent": 182, "children": [], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 28}}, {"id": 184, "type": "parameter_list", "text": "(Centipede * centi)", "parent": 182, "children": [185], "start_point": {"row": 34, "column": 28}, "end_point": {"row": 34, "column": 47}}, {"id": 185, "type": "parameter_declaration", "text": "Centipede * centi", "parent": 184, "children": [186, 187], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 46}}, {"id": 186, "type": "type_identifier", "text": "Centipede", "parent": 185, "children": [], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 38}}, {"id": 187, "type": "pointer_declarator", "text": "* centi", "parent": 185, "children": [188, 189], "start_point": {"row": 34, "column": 39}, "end_point": {"row": 34, "column": 46}}, {"id": 188, "type": "*", "text": "*", "parent": 187, "children": [], "start_point": {"row": 34, "column": 39}, "end_point": {"row": 34, "column": 40}}, {"id": 189, "type": "identifier", "text": "centi", "parent": 187, "children": [], "start_point": {"row": 34, "column": 41}, "end_point": {"row": 34, "column": 46}}, {"id": 190, "type": "assignment_expression", "text": "pPrev = centi", "parent": 176, "children": [191, 192, 193], "start_point": {"row": 34, "column": 51}, "end_point": {"row": 34, "column": 64}}, {"id": 191, "type": "identifier", "text": "pPrev", "parent": 190, "children": [], "start_point": {"row": 34, "column": 51}, "end_point": {"row": 34, "column": 56}}, {"id": 192, "type": "=", "text": "=", "parent": 190, "children": [], "start_point": {"row": 34, "column": 57}, "end_point": {"row": 34, "column": 58}}, {"id": 193, "type": "identifier", "text": "centi", "parent": 190, "children": [], "start_point": {"row": 34, "column": 59}, "end_point": {"row": 34, "column": 64}}, {"id": 194, "type": "return_statement", "text": "return 0;", "parent": 176, "children": [195], "start_point": {"row": 34, "column": 66}, "end_point": {"row": 34, "column": 75}}, {"id": 195, "type": "number_literal", "text": "0", "parent": 194, "children": [], "start_point": {"row": 34, "column": 73}, "end_point": {"row": 34, "column": 74}}, {"id": 196, "type": "function_definition", "text": "virtual sf::Vector2f getPos() { return Pos; }", "parent": 0, "children": [197, 198, 201], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 46}}, {"id": 197, "type": "type_identifier", "text": "virtual", "parent": 196, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 8}}, {"id": 198, "type": "ERROR", "text": "sf::Vector2f", "parent": 196, "children": [199, 200], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 21}}, {"id": 199, "type": "identifier", "text": "sf", "parent": 198, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 11}}, {"id": 200, "type": "identifier", "text": "Vector2f", "parent": 198, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 21}}, {"id": 201, "type": "function_declarator", "text": "getPos()", "parent": 196, "children": [202, 203], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 30}}, {"id": 202, "type": "identifier", "text": "getPos", "parent": 201, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 28}}, {"id": 203, "type": "parameter_list", "text": "()", "parent": 201, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 30}}, {"id": 204, "type": "return_statement", "text": "return Pos;", "parent": 196, "children": [205], "start_point": {"row": 36, "column": 33}, "end_point": {"row": 36, "column": 44}}, {"id": 205, "type": "identifier", "text": "Pos", "parent": 204, "children": [], "start_point": {"row": 36, "column": 40}, "end_point": {"row": 36, "column": 43}}, {"id": 206, "type": "function_definition", "text": "virtual int GetIndex() override;\n\tvirtual void ReportHeadRecall() override {}", "parent": 0, "children": [207, 208, 210, 213, 216], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 39, "column": 44}}, {"id": 207, "type": "type_identifier", "text": "virtual", "parent": 206, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 8}}, {"id": 208, "type": "ERROR", "text": "int", "parent": 206, "children": [209], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 12}}, {"id": 209, "type": "identifier", "text": "int", "parent": 208, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 12}}, {"id": 210, "type": "function_declarator", "text": "GetIndex()", "parent": 206, "children": [211, 212], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 23}}, {"id": 211, "type": "identifier", "text": "GetIndex", "parent": 210, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 21}}, {"id": 212, "type": "parameter_list", "text": "()", "parent": 210, "children": [], "start_point": {"row": 38, "column": 21}, "end_point": {"row": 38, "column": 23}}, {"id": 213, "type": "declaration", "text": "override;", "parent": 206, "children": [214, 215], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 33}}, {"id": 214, "type": "type_identifier", "text": "override", "parent": 213, "children": [], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 32}}, {"id": 215, "type": "identifier", "text": "", "parent": 213, "children": [], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 32}}, {"id": 216, "type": "ERROR", "text": "virtual void ReportHeadRecall() override", "parent": 206, "children": [217, 218, 220], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 41}}, {"id": 217, "type": "type_identifier", "text": "virtual", "parent": 216, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 8}}, {"id": 218, "type": "ERROR", "text": "void", "parent": 216, "children": [219], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 13}}, {"id": 219, "type": "identifier", "text": "void", "parent": 218, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 13}}, {"id": 220, "type": "function_declarator", "text": "ReportHeadRecall() override", "parent": 216, "children": [221, 222, 223], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 41}}, {"id": 221, "type": "identifier", "text": "ReportHeadRecall", "parent": 220, "children": [], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 30}}, {"id": 222, "type": "parameter_list", "text": "()", "parent": 220, "children": [], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 32}}, {"id": 223, "type": "identifier", "text": "override", "parent": 220, "children": [], "start_point": {"row": 39, "column": 33}, "end_point": {"row": 39, "column": 41}}, {"id": 224, "type": "function_definition", "text": "virtual void Collision(GameObject *go) {}", "parent": 0, "children": [225, 226, 228], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 42}}, {"id": 225, "type": "type_identifier", "text": "virtual", "parent": 224, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 8}}, {"id": 226, "type": "ERROR", "text": "void", "parent": 224, "children": [227], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 13}}, {"id": 227, "type": "identifier", "text": "void", "parent": 226, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 13}}, {"id": 228, "type": "function_declarator", "text": "Collision(GameObject *go)", "parent": 224, "children": [229, 230], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 39}}, {"id": 229, "type": "identifier", "text": "Collision", "parent": 228, "children": [], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 23}}, {"id": 230, "type": "parameter_list", "text": "(GameObject *go)", "parent": 228, "children": [231], "start_point": {"row": 42, "column": 23}, "end_point": {"row": 42, "column": 39}}, {"id": 231, "type": "parameter_declaration", "text": "GameObject *go", "parent": 230, "children": [232, 233], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 38}}, {"id": 232, "type": "type_identifier", "text": "GameObject", "parent": 231, "children": [], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 34}}, {"id": 233, "type": "pointer_declarator", "text": "*go", "parent": 231, "children": [234, 235], "start_point": {"row": 42, "column": 35}, "end_point": {"row": 42, "column": 38}}, {"id": 234, "type": "*", "text": "*", "parent": 233, "children": [], "start_point": {"row": 42, "column": 35}, "end_point": {"row": 42, "column": 36}}, {"id": 235, "type": "identifier", "text": "go", "parent": 233, "children": [], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 38}}, {"id": 236, "type": "declaration", "text": "virtual void Collision(Bullet *bullet);", "parent": 0, "children": [237, 238, 240], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 40}}, {"id": 237, "type": "type_identifier", "text": "virtual", "parent": 236, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 8}}, {"id": 238, "type": "ERROR", "text": "void", "parent": 236, "children": [239], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 13}}, {"id": 239, "type": "identifier", "text": "void", "parent": 238, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 13}}, {"id": 240, "type": "function_declarator", "text": "Collision(Bullet *bullet)", "parent": 236, "children": [241, 242], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 39}}, {"id": 241, "type": "identifier", "text": "Collision", "parent": 240, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 23}}, {"id": 242, "type": "parameter_list", "text": "(Bullet *bullet)", "parent": 240, "children": [243], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 39}}, {"id": 243, "type": "parameter_declaration", "text": "Bullet *bullet", "parent": 242, "children": [244, 245], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 38}}, {"id": 244, "type": "type_identifier", "text": "Bullet", "parent": 243, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 30}}, {"id": 245, "type": "pointer_declarator", "text": "*bullet", "parent": 243, "children": [246, 247], "start_point": {"row": 43, "column": 31}, "end_point": {"row": 43, "column": 38}}, {"id": 246, "type": "*", "text": "*", "parent": 245, "children": [], "start_point": {"row": 43, "column": 31}, "end_point": {"row": 43, "column": 32}}, {"id": 247, "type": "identifier", "text": "bullet", "parent": 245, "children": [], "start_point": {"row": 43, "column": 32}, "end_point": {"row": 43, "column": 38}}, {"id": 248, "type": "labeled_statement", "text": "private:\n\tCentipedeSegment *pNext;", "parent": 0, "children": [249], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 46, "column": 25}}, {"id": 249, "type": "declaration", "text": "CentipedeSegment *pNext;", "parent": 248, "children": [250, 251], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 25}}, {"id": 250, "type": "type_identifier", "text": "CentipedeSegment", "parent": 249, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 17}}, {"id": 251, "type": "pointer_declarator", "text": "*pNext", "parent": 249, "children": [252, 253], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 24}}, {"id": 252, "type": "*", "text": "*", "parent": 251, "children": [], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 19}}, {"id": 253, "type": "identifier", "text": "pNext", "parent": 251, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 24}}, {"id": 254, "type": "declaration", "text": "Centipede *pPrev;", "parent": 0, "children": [255, 256], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 18}}, {"id": 255, "type": "type_identifier", "text": "Centipede", "parent": 254, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 10}}, {"id": 256, "type": "pointer_declarator", "text": "*pPrev", "parent": 254, "children": [257, 258], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 17}}, {"id": 257, "type": "*", "text": "*", "parent": 256, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 12}}, {"id": 258, "type": "identifier", "text": "pPrev", "parent": 256, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 17}}, {"id": 259, "type": "declaration", "text": "Tile *pTile;", "parent": 0, "children": [260, 261], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 13}}, {"id": 260, "type": "type_identifier", "text": "Tile", "parent": 259, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 5}}, {"id": 261, "type": "pointer_declarator", "text": "*pTile", "parent": 259, "children": [262, 263], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 12}}, {"id": 262, "type": "*", "text": "*", "parent": 261, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 7}}, {"id": 263, "type": "identifier", "text": "pTile", "parent": 261, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 12}}, {"id": 264, "type": "declaration", "text": "Tile *pNextTile;", "parent": 0, "children": [265, 266], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 17}}, {"id": 265, "type": "type_identifier", "text": "Tile", "parent": 264, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 5}}, {"id": 266, "type": "pointer_declarator", "text": "*pNextTile", "parent": 264, "children": [267, 268], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 16}}, {"id": 267, "type": "*", "text": "*", "parent": 266, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 7}}, {"id": 268, "type": "identifier", "text": "pNextTile", "parent": 266, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 16}}, {"id": 269, "type": "declaration", "text": "const HeadMoveState *pCurrentState;", "parent": 0, "children": [270, 271], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 36}}, {"id": 270, "type": "type_identifier", "text": "HeadMoveState", "parent": 269, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 20}}, {"id": 271, "type": "pointer_declarator", "text": "*pCurrentState", "parent": 269, "children": [272, 273], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 35}}, {"id": 272, "type": "*", "text": "*", "parent": 271, "children": [], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 22}}, {"id": 273, "type": "identifier", "text": "pCurrentState", "parent": 271, "children": [], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 35}}, {"id": 274, "type": "declaration", "text": "const HeadMoveState *pNextState;", "parent": 0, "children": [275, 276], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 33}}, {"id": 275, "type": "type_identifier", "text": "HeadMoveState", "parent": 274, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 20}}, {"id": 276, "type": "pointer_declarator", "text": "*pNextState", "parent": 274, "children": [277, 278], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 32}}, {"id": 277, "type": "*", "text": "*", "parent": 276, "children": [], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 22}}, {"id": 278, "type": "identifier", "text": "pNextState", "parent": 276, "children": [], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 32}}, {"id": 279, "type": "declaration", "text": "const Score SCORE;", "parent": 0, "children": [280, 281], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 19}}, {"id": 280, "type": "type_identifier", "text": "Score", "parent": 279, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 12}}, {"id": 281, "type": "identifier", "text": "SCORE", "parent": 279, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 18}}, {"id": 282, "type": "declaration", "text": "const int MAX_HEALTH;", "parent": 0, "children": [283, 284], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 22}}, {"id": 283, "type": "primitive_type", "text": "int", "parent": 282, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 10}}, {"id": 284, "type": "identifier", "text": "MAX_HEALTH", "parent": 282, "children": [], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 21}}, {"id": 285, "type": "declaration", "text": "int health;", "parent": 0, "children": [286, 287], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 12}}, {"id": 286, "type": "primitive_type", "text": "int", "parent": 285, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 4}}, {"id": 287, "type": "identifier", "text": "health", "parent": 285, "children": [], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 11}}, {"id": 288, "type": "declaration", "text": "int index;", "parent": 0, "children": [289, 290], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 11}}, {"id": 289, "type": "primitive_type", "text": "int", "parent": 288, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 4}}, {"id": 290, "type": "identifier", "text": "index", "parent": 288, "children": [], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 10}}, {"id": 291, "type": "labeled_statement", "text": "sf::Vector2f Pos;", "parent": 0, "children": [292, 293], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 18}}, {"id": 292, "type": "statement_identifier", "text": "sf", "parent": 291, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 3}}, {"id": 293, "type": "declaration", "text": "Vector2f Pos;", "parent": 291, "children": [294, 295], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 18}}, {"id": 294, "type": "type_identifier", "text": "Vector2f", "parent": 293, "children": [], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 13}}, {"id": 295, "type": "identifier", "text": "Pos", "parent": 293, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 17}}, {"id": 296, "type": "labeled_statement", "text": "sf::Sound snd;", "parent": 0, "children": [297, 298], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 15}}, {"id": 297, "type": "statement_identifier", "text": "sf", "parent": 296, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 3}}, {"id": 298, "type": "declaration", "text": "Sound snd;", "parent": 296, "children": [299, 300], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 15}}, {"id": 299, "type": "type_identifier", "text": "Sound", "parent": 298, "children": [], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 10}}, {"id": 300, "type": "identifier", "text": "snd", "parent": 298, "children": [], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 14}}, {"id": 301, "type": "declaration", "text": "AnimatedSprite MainSprite;", "parent": 0, "children": [302, 303], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 27}}, {"id": 302, "type": "type_identifier", "text": "AnimatedSprite", "parent": 301, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 15}}, {"id": 303, "type": "identifier", "text": "MainSprite", "parent": 301, "children": [], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 26}}, {"id": 304, "type": "labeled_statement", "text": "CollisionTools::TextureBitmap bitmap;", "parent": 0, "children": [305, 306], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 38}}, {"id": 305, "type": "statement_identifier", "text": "CollisionTools", "parent": 304, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 15}}, {"id": 306, "type": "declaration", "text": "TextureBitmap bitmap;", "parent": 304, "children": [307, 308], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 38}}, {"id": 307, "type": "type_identifier", "text": "TextureBitmap", "parent": 306, "children": [], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 30}}, {"id": 308, "type": "identifier", "text": "bitmap", "parent": 306, "children": [], "start_point": {"row": 65, "column": 31}, "end_point": {"row": 65, "column": 37}}, {"id": 309, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 6}}, {"id": 310, "type": "identifier", "text": "_CentipedeSegment", "parent": null, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 24}}]}, "node_categories": {"declarations": {"functions": [45, 75, 82, 89, 96, 103, 110, 119, 129, 133, 139, 144, 150, 155, 161, 176, 182, 196, 201, 206, 210, 220, 224, 228, 240], "variables": [9, 43, 48, 53, 58, 61, 66, 71, 78, 85, 92, 99, 106, 113, 123, 164, 185, 213, 231, 236, 243, 249, 254, 259, 264, 269, 274, 279, 282, 285, 288, 293, 298, 301, 306], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [15, 24, 29, 35, 38], "assignments": [26, 37, 170, 190], "loops": [], "conditionals": [0, 1, 2, 5, 11, 13, 16, 18, 19, 21, 23, 25, 27, 31, 39, 42, 46, 49, 52, 54, 56, 57, 60, 62, 65, 67, 70, 72, 74, 76, 79, 81, 83, 86, 88, 90, 93, 95, 97, 100, 102, 104, 107, 109, 111, 114, 116, 120, 122, 124, 126, 130, 132, 134, 136, 140, 143, 145, 147, 151, 154, 156, 158, 162, 165, 168, 169, 171, 173, 177, 179, 183, 186, 189, 191, 193, 197, 199, 200, 202, 205, 207, 209, 211, 214, 215, 217, 219, 221, 223, 225, 227, 229, 232, 235, 237, 239, 241, 244, 247, 250, 253, 255, 258, 260, 263, 265, 268, 270, 273, 275, 278, 280, 281, 284, 287, 290, 292, 294, 295, 297, 299, 300, 302, 303, 305, 307, 308, 309, 310], "returns": [142, 153, 174, 194, 204], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 175, 195], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 45, "universal_type": "function", "name": "index,", "text_snippet": "Initialize(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body)"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "Update()"}, {"node_id": 82, "universal_type": "function", "name": "unknown", "text_snippet": "Draw()"}, {"node_id": 89, "universal_type": "function", "name": "unknown", "text_snippet": "Destroy()"}, {"node_id": 96, "universal_type": "function", "name": "unknown", "text_snippet": "Delete()"}, {"node_id": 103, "universal_type": "function", "name": "unknown", "text_snippet": "PlaceShroom()"}, {"node_id": 110, "universal_type": "function", "name": "unknown", "text_snippet": "Split()"}, {"node_id": 119, "universal_type": "function", "name": "unknown", "text_snippet": "GetNextState() override"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "getTile() override"}, {"node_id": 133, "universal_type": "function", "name": "unknown", "text_snippet": "virtual CentipedeSegment * getNext() { return pNext; }"}, {"node_id": 139, "universal_type": "function", "name": "unknown", "text_snippet": "getNext()"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "virtual Centipede * getPrev()\t\t { return pPrev; }"}, {"node_id": 150, "universal_type": "function", "name": "unknown", "text_snippet": "getPrev()"}, {"node_id": 155, "universal_type": "function", "name": "unknown", "text_snippet": "virtual Centipede * setNext(CentipedeSegment * centi) override { pNext = centi; return 0; }"}, {"node_id": 161, "universal_type": "function", "name": "unknown", "text_snippet": "setNext(CentipedeSegment * centi) override"}, {"node_id": 176, "universal_type": "function", "name": "unknown", "text_snippet": "virtual Centipede * setPrev(Centipede * centi) { pPrev = centi; return 0; }"}, {"node_id": 182, "universal_type": "function", "name": "unknown", "text_snippet": "setPrev(Centipede * centi)"}, {"node_id": 196, "universal_type": "function", "name": "unknown", "text_snippet": "virtual sf::Vector2f getPos() { return Pos; }"}, {"node_id": 201, "universal_type": "function", "name": "unknown", "text_snippet": "getPos()"}, {"node_id": 206, "universal_type": "function", "name": "GetIndex", "text_snippet": "virtual int GetIndex() override;\n\tvirtual void ReportHeadRecall() override {}"}, {"node_id": 210, "universal_type": "function", "name": "unknown", "text_snippet": "GetIndex()"}, {"node_id": 220, "universal_type": "function", "name": "unknown", "text_snippet": "ReportHeadRecall() override"}, {"node_id": 224, "universal_type": "function", "name": "Collision", "text_snippet": "virtual void Collision(GameObject *go) {}"}, {"node_id": 228, "universal_type": "function", "name": "unknown", "text_snippet": "Collision(GameObject *go)"}, {"node_id": 240, "universal_type": "function", "name": "unknown", "text_snippet": "Collision(Bullet *bullet)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"Centipede.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/* CentipedeSegment.h - <NAME>, October 2017 */\n\n#ifndef _CentipedeSegment\n#define _CentipedeSegment\n\n#include \"Centipede.h\"\n\nclass CentipedeSegment : public Centipede\n{\npublic:\n\t/* BIG FOUR */\n\tCentipedeSegment();\n\tCentipedeSegment(const CentipedeSegment &) = default;\n\tCentipedeSegment & operator =(const CentipedeSegment &) = default;\n\t~CentipedeSegment() = default;\n\n\t/* INITIALIZER */\n\tvoid Initialize(Tile* pTile, sf::Vector2f pos, int index, const HeadMoveState* state, Centipede* body);\n\n\t/* METHODS */\n\tvirtual void Update();\n\tvirtual void Draw();\n\tvirtual void Destroy();\n\tvirtual void Delete();\n\tvirtual void PlaceShroom();\n\tvirtual void Split();\n\n\tvirtual const HeadMoveState * GetNextState() override;\n\tvirtual Tile* getTile() override;\n\n\tvirtual CentipedeSegment * getNext() { return pNext; };\n\tvirtual Centipede * getPrev()\t\t { return pPrev; };\n\n\tvirtual Centipede * setNext(CentipedeSegment * centi) override { pNext = centi; return 0; }\n\tvirtual Centipede * setPrev(Centipede * centi) { pPrev = centi; return 0; }\n\n\tvirtual sf::Vector2f getPos() { return Pos; };\n\n\tvirtual int GetIndex() override;\n\tvirtual void ReportHeadRecall() override {}; // Does nothing\n\n\t/* COLLISIONS */\n\tvirtual void Collision(GameObject *go) {};\n\tvirtual void Collision(Bullet *bullet);\n\nprivate:\n\tCentipedeSegment *pNext;\n\tCentipede *pPrev;\n\n\tTile *pTile;\n\tTile *pNextTile;\n\n\tconst HeadMoveState *pCurrentState;\n\tconst HeadMoveState *pNextState;\n\tconst Score SCORE;\n\n\tconst int MAX_HEALTH;\n\n\tint health;\n\tint index;\n\n\tsf::Vector2f Pos;\n\tsf::Sound snd;\n\n\tAnimatedSprite MainSprite;\n\tCollisionTools::TextureBitmap bitmap;\n};\n\n#endif _CentipedeSegment"}
375
c
/* * Copyright (c) 2015 <NAME> <<EMAIL>> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <stdbool.h> #include <unistd.h> #include "../log.h" #include "../jail.h" //FIXME: copypaste from jmtest.c #define run(test) do { \ printf("%-24s", ""#test); \ if (test() != 0) { \ puts("FAILED"); \ exit(1); \ } else { \ puts("passed"); \ } \ } while(0) #define fail(_message) do { \ printf("FAIL: %s\n", _message); \ return -1; \ } while (0) int test_jail_config() { jail_config_t jc; jc = jail_config_new(); if (jail_config_set_name(jc, "foo") < 0) fail("set name 1"); if (jail_config_set_name(jc, "illegal name") == 0) fail("set name 2"); jail_config_free(jc); return 0; } int test_jail_create() { jail_config_t jc; jc = jail_config_new(); jail_config_set_name(jc, "thttpd"); jc->package = strdup("thttpd"); if (jail_is_installed(jc)) fail("jail_is_installed"); if (jail_is_running(jc)) fail("jail_is_running"); if (jail_create(jc) < 0) fail("jail_create"); if (!jail_is_installed(jc)) fail("jail_is_installed"); if (!jail_is_running(jc)) fail("jail_is_running"); if (jail_destroy(jc) < 0) fail("jail_destroy"); jail_config_free(jc); return 0; } int main() { if (getuid() != 0) { puts("jail-test: skipping because not run as root"); exit(0); } log_open("jail-test.log"); run(test_jail_config); run(test_jail_create); }
28.58
71
(translation_unit) "/*\n * Copyright (c) 2015 <NAME> <<EMAIL>>\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <stdbool.h>\n#include <unistd.h>\n\n#include "../log.h"\n#include "../jail.h"\n\n//FIXME: copypaste from jmtest.c\n#define run(test) do { \\n printf("%-24s", ""#test); \\n if (test() != 0) { \\n puts("FAILED"); \\n exit(1); \\n } else { \\n puts("passed"); \\n } \\n} while(0)\n\n#define fail(_message) do { \\n printf("FAIL: %s\n", _message); \\n return -1; \\n} while (0)\n\nint test_jail_config() {\n jail_config_t jc;\n\n jc = jail_config_new();\n if (jail_config_set_name(jc, "foo") < 0)\n fail("set name 1");\n if (jail_config_set_name(jc, "illegal name") == 0)\n fail("set name 2");\n jail_config_free(jc);\n\n return 0;\n}\n\nint test_jail_create() {\n jail_config_t jc;\n\n jc = jail_config_new();\n jail_config_set_name(jc, "thttpd");\n jc->package = strdup("thttpd");\n if (jail_is_installed(jc))\n fail("jail_is_installed");\n if (jail_is_running(jc))\n fail("jail_is_running");\n if (jail_create(jc) < 0)\n fail("jail_create");\n if (!jail_is_installed(jc))\n fail("jail_is_installed");\n if (!jail_is_running(jc))\n fail("jail_is_running");\n if (jail_destroy(jc) < 0)\n fail("jail_destroy");\n jail_config_free(jc);\n\n return 0;\n}\n\nint main()\n{\n if (getuid() != 0) {\n puts("jail-test: skipping because not run as root");\n exit(0);\n }\n log_open("jail-test.log");\n run(test_jail_config);\n run(test_jail_create);\n}\n" (comment) "/*\n * Copyright (c) 2015 <NAME> <<EMAIL>>\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_include) "#include <stdbool.h>\n" (#include) "#include" (system_lib_string) "<stdbool.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_include) "#include "../log.h"\n" (#include) "#include" (string_literal) ""../log.h"" (") """ (string_content) "../log.h" (") """ (preproc_include) "#include "../jail.h"\n" (#include) "#include" (string_literal) ""../jail.h"" (") """ (string_content) "../jail.h" (") """ (comment) "//FIXME: copypaste from jmtest.c" (preproc_function_def) "#define run(test) do { \\n printf("%-24s", ""#test); \\n if (test() != 0) { \\n puts("FAILED"); \\n exit(1); \\n } else { \\n puts("passed"); \\n } \\n} while(0)\n" (#define) "#define" (identifier) "run" (preproc_params) "(test)" (() "(" (identifier) "test" ()) ")" (preproc_arg) "do { \\n printf("%-24s", ""#test); \\n if (test() != 0) { \\n puts("FAILED"); \\n exit(1); \\n } else { \\n puts("passed"); \\n } \\n} while(0)" (preproc_function_def) "#define fail(_message) do { \\n printf("FAIL: %s\n", _message); \\n return -1; \\n} while (0)\n" (#define) "#define" (identifier) "fail" (preproc_params) "(_message)" (() "(" (identifier) "_message" ()) ")" (preproc_arg) "do { \\n printf("FAIL: %s\n", _message); \\n return -1; \\n} while (0)" (function_definition) "int test_jail_config() {\n jail_config_t jc;\n\n jc = jail_config_new();\n if (jail_config_set_name(jc, "foo") < 0)\n fail("set name 1");\n if (jail_config_set_name(jc, "illegal name") == 0)\n fail("set name 2");\n jail_config_free(jc);\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "test_jail_config()" (identifier) "test_jail_config" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n jail_config_t jc;\n\n jc = jail_config_new();\n if (jail_config_set_name(jc, "foo") < 0)\n fail("set name 1");\n if (jail_config_set_name(jc, "illegal name") == 0)\n fail("set name 2");\n jail_config_free(jc);\n\n return 0;\n}" ({) "{" (declaration) "jail_config_t jc;" (type_identifier) "jail_config_t" (identifier) "jc" (;) ";" (expression_statement) "jc = jail_config_new();" (assignment_expression) "jc = jail_config_new()" (identifier) "jc" (=) "=" (call_expression) "jail_config_new()" (identifier) "jail_config_new" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (jail_config_set_name(jc, "foo") < 0)\n fail("set name 1");" (if) "if" (parenthesized_expression) "(jail_config_set_name(jc, "foo") < 0)" (() "(" (binary_expression) "jail_config_set_name(jc, "foo") < 0" (call_expression) "jail_config_set_name(jc, "foo")" (identifier) "jail_config_set_name" (argument_list) "(jc, "foo")" (() "(" (identifier) "jc" (,) "," (string_literal) ""foo"" (") """ (string_content) "foo" (") """ ()) ")" (<) "<" (number_literal) "0" ()) ")" (expression_statement) "fail("set name 1");" (call_expression) "fail("set name 1")" (identifier) "fail" (argument_list) "("set name 1")" (() "(" (string_literal) ""set name 1"" (") """ (string_content) "set name 1" (") """ ()) ")" (;) ";" (if_statement) "if (jail_config_set_name(jc, "illegal name") == 0)\n fail("set name 2");" (if) "if" (parenthesized_expression) "(jail_config_set_name(jc, "illegal name") == 0)" (() "(" (binary_expression) "jail_config_set_name(jc, "illegal name") == 0" (call_expression) "jail_config_set_name(jc, "illegal name")" (identifier) "jail_config_set_name" (argument_list) "(jc, "illegal name")" (() "(" (identifier) "jc" (,) "," (string_literal) ""illegal name"" (") """ (string_content) "illegal name" (") """ ()) ")" (==) "==" (number_literal) "0" ()) ")" (expression_statement) "fail("set name 2");" (call_expression) "fail("set name 2")" (identifier) "fail" (argument_list) "("set name 2")" (() "(" (string_literal) ""set name 2"" (") """ (string_content) "set name 2" (") """ ()) ")" (;) ";" (expression_statement) "jail_config_free(jc);" (call_expression) "jail_config_free(jc)" (identifier) "jail_config_free" (argument_list) "(jc)" (() "(" (identifier) "jc" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "int test_jail_create() {\n jail_config_t jc;\n\n jc = jail_config_new();\n jail_config_set_name(jc, "thttpd");\n jc->package = strdup("thttpd");\n if (jail_is_installed(jc))\n fail("jail_is_installed");\n if (jail_is_running(jc))\n fail("jail_is_running");\n if (jail_create(jc) < 0)\n fail("jail_create");\n if (!jail_is_installed(jc))\n fail("jail_is_installed");\n if (!jail_is_running(jc))\n fail("jail_is_running");\n if (jail_destroy(jc) < 0)\n fail("jail_destroy");\n jail_config_free(jc);\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "test_jail_create()" (identifier) "test_jail_create" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n jail_config_t jc;\n\n jc = jail_config_new();\n jail_config_set_name(jc, "thttpd");\n jc->package = strdup("thttpd");\n if (jail_is_installed(jc))\n fail("jail_is_installed");\n if (jail_is_running(jc))\n fail("jail_is_running");\n if (jail_create(jc) < 0)\n fail("jail_create");\n if (!jail_is_installed(jc))\n fail("jail_is_installed");\n if (!jail_is_running(jc))\n fail("jail_is_running");\n if (jail_destroy(jc) < 0)\n fail("jail_destroy");\n jail_config_free(jc);\n\n return 0;\n}" ({) "{" (declaration) "jail_config_t jc;" (type_identifier) "jail_config_t" (identifier) "jc" (;) ";" (expression_statement) "jc = jail_config_new();" (assignment_expression) "jc = jail_config_new()" (identifier) "jc" (=) "=" (call_expression) "jail_config_new()" (identifier) "jail_config_new" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "jail_config_set_name(jc, "thttpd");" (call_expression) "jail_config_set_name(jc, "thttpd")" (identifier) "jail_config_set_name" (argument_list) "(jc, "thttpd")" (() "(" (identifier) "jc" (,) "," (string_literal) ""thttpd"" (") """ (string_content) "thttpd" (") """ ()) ")" (;) ";" (expression_statement) "jc->package = strdup("thttpd");" (assignment_expression) "jc->package = strdup("thttpd")" (field_expression) "jc->package" (identifier) "jc" (->) "->" (field_identifier) "package" (=) "=" (call_expression) "strdup("thttpd")" (identifier) "strdup" (argument_list) "("thttpd")" (() "(" (string_literal) ""thttpd"" (") """ (string_content) "thttpd" (") """ ()) ")" (;) ";" (if_statement) "if (jail_is_installed(jc))\n fail("jail_is_installed");" (if) "if" (parenthesized_expression) "(jail_is_installed(jc))" (() "(" (call_expression) "jail_is_installed(jc)" (identifier) "jail_is_installed" (argument_list) "(jc)" (() "(" (identifier) "jc" ()) ")" ()) ")" (expression_statement) "fail("jail_is_installed");" (call_expression) "fail("jail_is_installed")" (identifier) "fail" (argument_list) "("jail_is_installed")" (() "(" (string_literal) ""jail_is_installed"" (") """ (string_content) "jail_is_installed" (") """ ()) ")" (;) ";" (if_statement) "if (jail_is_running(jc))\n fail("jail_is_running");" (if) "if" (parenthesized_expression) "(jail_is_running(jc))" (() "(" (call_expression) "jail_is_running(jc)" (identifier) "jail_is_running" (argument_list) "(jc)" (() "(" (identifier) "jc" ()) ")" ()) ")" (expression_statement) "fail("jail_is_running");" (call_expression) "fail("jail_is_running")" (identifier) "fail" (argument_list) "("jail_is_running")" (() "(" (string_literal) ""jail_is_running"" (") """ (string_content) "jail_is_running" (") """ ()) ")" (;) ";" (if_statement) "if (jail_create(jc) < 0)\n fail("jail_create");" (if) "if" (parenthesized_expression) "(jail_create(jc) < 0)" (() "(" (binary_expression) "jail_create(jc) < 0" (call_expression) "jail_create(jc)" (identifier) "jail_create" (argument_list) "(jc)" (() "(" (identifier) "jc" ()) ")" (<) "<" (number_literal) "0" ()) ")" (expression_statement) "fail("jail_create");" (call_expression) "fail("jail_create")" (identifier) "fail" (argument_list) "("jail_create")" (() "(" (string_literal) ""jail_create"" (") """ (string_content) "jail_create" (") """ ()) ")" (;) ";" (if_statement) "if (!jail_is_installed(jc))\n fail("jail_is_installed");" (if) "if" (parenthesized_expression) "(!jail_is_installed(jc))" (() "(" (unary_expression) "!jail_is_installed(jc)" (!) "!" (call_expression) "jail_is_installed(jc)" (identifier) "jail_is_installed" (argument_list) "(jc)" (() "(" (identifier) "jc" ()) ")" ()) ")" (expression_statement) "fail("jail_is_installed");" (call_expression) "fail("jail_is_installed")" (identifier) "fail" (argument_list) "("jail_is_installed")" (() "(" (string_literal) ""jail_is_installed"" (") """ (string_content) "jail_is_installed" (") """ ()) ")" (;) ";" (if_statement) "if (!jail_is_running(jc))\n fail("jail_is_running");" (if) "if" (parenthesized_expression) "(!jail_is_running(jc))" (() "(" (unary_expression) "!jail_is_running(jc)" (!) "!" (call_expression) "jail_is_running(jc)" (identifier) "jail_is_running" (argument_list) "(jc)" (() "(" (identifier) "jc" ()) ")" ()) ")" (expression_statement) "fail("jail_is_running");" (call_expression) "fail("jail_is_running")" (identifier) "fail" (argument_list) "("jail_is_running")" (() "(" (string_literal) ""jail_is_running"" (") """ (string_content) "jail_is_running" (") """ ()) ")" (;) ";" (if_statement) "if (jail_destroy(jc) < 0)\n fail("jail_destroy");" (if) "if" (parenthesized_expression) "(jail_destroy(jc) < 0)" (() "(" (binary_expression) "jail_destroy(jc) < 0" (call_expression) "jail_destroy(jc)" (identifier) "jail_destroy" (argument_list) "(jc)" (() "(" (identifier) "jc" ()) ")" (<) "<" (number_literal) "0" ()) ")" (expression_statement) "fail("jail_destroy");" (call_expression) "fail("jail_destroy")" (identifier) "fail" (argument_list) "("jail_destroy")" (() "(" (string_literal) ""jail_destroy"" (") """ (string_content) "jail_destroy" (") """ ()) ")" (;) ";" (expression_statement) "jail_config_free(jc);" (call_expression) "jail_config_free(jc)" (identifier) "jail_config_free" (argument_list) "(jc)" (() "(" (identifier) "jc" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "int main()\n{\n if (getuid() != 0) {\n puts("jail-test: skipping because not run as root");\n exit(0);\n }\n log_open("jail-test.log");\n run(test_jail_config);\n run(test_jail_create);\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n if (getuid() != 0) {\n puts("jail-test: skipping because not run as root");\n exit(0);\n }\n log_open("jail-test.log");\n run(test_jail_config);\n run(test_jail_create);\n}" ({) "{" (if_statement) "if (getuid() != 0) {\n puts("jail-test: skipping because not run as root");\n exit(0);\n }" (if) "if" (parenthesized_expression) "(getuid() != 0)" (() "(" (binary_expression) "getuid() != 0" (call_expression) "getuid()" (identifier) "getuid" (argument_list) "()" (() "(" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n puts("jail-test: skipping because not run as root");\n exit(0);\n }" ({) "{" (expression_statement) "puts("jail-test: skipping because not run as root");" (call_expression) "puts("jail-test: skipping because not run as root")" (identifier) "puts" (argument_list) "("jail-test: skipping because not run as root")" (() "(" (string_literal) ""jail-test: skipping because not run as root"" (") """ (string_content) "jail-test: skipping because not run as root" (") """ ()) ")" (;) ";" (expression_statement) "exit(0);" (call_expression) "exit(0)" (identifier) "exit" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}" (expression_statement) "log_open("jail-test.log");" (call_expression) "log_open("jail-test.log")" (identifier) "log_open" (argument_list) "("jail-test.log")" (() "(" (string_literal) ""jail-test.log"" (") """ (string_content) "jail-test.log" (") """ ()) ")" (;) ";" (expression_statement) "run(test_jail_config);" (call_expression) "run(test_jail_config)" (identifier) "run" (argument_list) "(test_jail_config)" (() "(" (identifier) "test_jail_config" ()) ")" (;) ";" (expression_statement) "run(test_jail_create);" (call_expression) "run(test_jail_create)" (identifier) "run" (argument_list) "(test_jail_create)" (() "(" (identifier) "test_jail_create" ()) ")" (;) ";" (}) "}"
422
0
{"language": "c", "success": true, "metadata": {"lines": 71, "avg_line_length": 28.58, "nodes": 217, "errors": 0, "source_hash": "77bd8d2f3150b0b9a0593d09abc2b11b44ee359ccc400eb71747a0768819e4dd", "categorized_nodes": 167}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdlib.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": "system_lib_string", "text": "<stdlib.h>", "parent": 0, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdio.h>", "parent": 3, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<string.h>", "parent": 6, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <stdbool.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<stdbool.h>", "parent": 9, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 20}}, {"id": 12, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<unistd.h>", "parent": 12, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include \"../log.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"../log.h\"", "parent": 15, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 19}}, {"id": 18, "type": "preproc_include", "text": "#include \"../jail.h\"\n", "parent": null, "children": [19, 20], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"../jail.h\"", "parent": 18, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 20}}, {"id": 21, "type": "preproc_function_def", "text": "#define run(test) do { \\\n\tprintf(\"%-24s\", \"\"#test); \\\n\tif (test() != 0) { \\\n\t\tputs(\"FAILED\"); \\\n\t\texit(1); \\\n\t} else { \\\n\t\tputs(\"passed\"); \\\n\t} \\\n} while(0)\n", "parent": null, "children": [22, 23, 24, 26], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 22, "type": "#define", "text": "#define", "parent": 21, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 23, "type": "identifier", "text": "run", "parent": 21, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 11}}, {"id": 24, "type": "preproc_params", "text": "(test)", "parent": 21, "children": [25], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 17}}, {"id": 25, "type": "identifier", "text": "test", "parent": 24, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 16}}, {"id": 26, "type": "preproc_arg", "text": "do { \\\n\tprintf(\"%-24s\", \"\"#test); \\\n\tif (test() != 0) { \\\n\t\tputs(\"FAILED\"); \\\n\t\texit(1); \\\n\t} else { \\\n\t\tputs(\"passed\"); \\\n\t} \\\n} while(0)", "parent": 21, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 34, "column": 10}}, {"id": 27, "type": "preproc_function_def", "text": "#define fail(_message) do { \\\n\tprintf(\"FAIL: %s\\n\", _message); \\\n\treturn -1; \\\n} while (0)\n", "parent": null, "children": [28, 29, 30, 32], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 28, "type": "#define", "text": "#define", "parent": 27, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 29, "type": "identifier", "text": "fail", "parent": 27, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 12}}, {"id": 30, "type": "preproc_params", "text": "(_message)", "parent": 27, "children": [31], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 22}}, {"id": 31, "type": "identifier", "text": "_message", "parent": 30, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 21}}, {"id": 32, "type": "preproc_arg", "text": "do { \\\n\tprintf(\"FAIL: %s\\n\", _message); \\\n\treturn -1; \\\n} while (0)", "parent": 27, "children": [], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 39, "column": 11}}, {"id": 33, "type": "function_definition", "text": "int test_jail_config() {\n\tjail_config_t jc;\n\n\tjc = jail_config_new();\n\tif (jail_config_set_name(jc, \"foo\") < 0)\n\t\tfail(\"set name 1\");\n\tif (jail_config_set_name(jc, \"illegal name\") == 0)\n\t\tfail(\"set name 2\");\n\tjail_config_free(jc);\n\n\treturn 0;\n}", "parent": null, "children": [34, 35], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 52, "column": 1}}, {"id": 34, "type": "primitive_type", "text": "int", "parent": 33, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 3}}, {"id": 35, "type": "function_declarator", "text": "test_jail_config()", "parent": 33, "children": [36, 37], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 22}}, {"id": 36, "type": "identifier", "text": "test_jail_config", "parent": 35, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 20}}, {"id": 37, "type": "parameter_list", "text": "()", "parent": 35, "children": [], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 22}}, {"id": 38, "type": "declaration", "text": "jail_config_t jc;", "parent": 33, "children": [39, 40], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 18}}, {"id": 39, "type": "type_identifier", "text": "jail_config_t", "parent": 38, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 14}}, {"id": 40, "type": "identifier", "text": "jc", "parent": 38, "children": [], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 17}}, {"id": 41, "type": "assignment_expression", "text": "jc = jail_config_new()", "parent": 33, "children": [42, 43, 44], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 23}}, {"id": 42, "type": "identifier", "text": "jc", "parent": 41, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 3}}, {"id": 43, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 5}}, {"id": 44, "type": "call_expression", "text": "jail_config_new()", "parent": 41, "children": [45, 46], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 23}}, {"id": 45, "type": "identifier", "text": "jail_config_new", "parent": 44, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 21}}, {"id": 46, "type": "argument_list", "text": "()", "parent": 44, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 23}}, {"id": 47, "type": "if_statement", "text": "if (jail_config_set_name(jc, \"foo\") < 0)\n\t\tfail(\"set name 1\");", "parent": 33, "children": [48], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 46, "column": 21}}, {"id": 48, "type": "parenthesized_expression", "text": "(jail_config_set_name(jc, \"foo\") < 0)", "parent": 47, "children": [49], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 41}}, {"id": 49, "type": "binary_expression", "text": "jail_config_set_name(jc, \"foo\") < 0", "parent": 48, "children": [50, 55, 56], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 40}}, {"id": 50, "type": "call_expression", "text": "jail_config_set_name(jc, \"foo\")", "parent": 49, "children": [51, 52], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 36}}, {"id": 51, "type": "identifier", "text": "jail_config_set_name", "parent": 50, "children": [], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 25}}, {"id": 52, "type": "argument_list", "text": "(jc, \"foo\")", "parent": 50, "children": [53, 54], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 36}}, {"id": 53, "type": "identifier", "text": "jc", "parent": 52, "children": [], "start_point": {"row": 45, "column": 26}, "end_point": {"row": 45, "column": 28}}, {"id": 54, "type": "string_literal", "text": "\"foo\"", "parent": 52, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 35}}, {"id": 55, "type": "<", "text": "<", "parent": 49, "children": [], "start_point": {"row": 45, "column": 37}, "end_point": {"row": 45, "column": 38}}, {"id": 56, "type": "number_literal", "text": "0", "parent": 49, "children": [], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 40}}, {"id": 57, "type": "call_expression", "text": "fail(\"set name 1\")", "parent": 47, "children": [58, 59], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 20}}, {"id": 58, "type": "identifier", "text": "fail", "parent": 57, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 6}}, {"id": 59, "type": "argument_list", "text": "(\"set name 1\")", "parent": 57, "children": [60], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 20}}, {"id": 60, "type": "string_literal", "text": "\"set name 1\"", "parent": 59, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 19}}, {"id": 61, "type": "if_statement", "text": "if (jail_config_set_name(jc, \"illegal name\") == 0)\n\t\tfail(\"set name 2\");", "parent": 33, "children": [62], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 48, "column": 21}}, {"id": 62, "type": "parenthesized_expression", "text": "(jail_config_set_name(jc, \"illegal name\") == 0)", "parent": 61, "children": [63], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 51}}, {"id": 63, "type": "binary_expression", "text": "jail_config_set_name(jc, \"illegal name\") == 0", "parent": 62, "children": [64, 69, 70], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 50}}, {"id": 64, "type": "call_expression", "text": "jail_config_set_name(jc, \"illegal name\")", "parent": 63, "children": [65, 66], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 45}}, {"id": 65, "type": "identifier", "text": "jail_config_set_name", "parent": 64, "children": [], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 25}}, {"id": 66, "type": "argument_list", "text": "(jc, \"illegal name\")", "parent": 64, "children": [67, 68], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 45}}, {"id": 67, "type": "identifier", "text": "jc", "parent": 66, "children": [], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 47, "column": 28}}, {"id": 68, "type": "string_literal", "text": "\"illegal name\"", "parent": 66, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 44}}, {"id": 69, "type": "==", "text": "==", "parent": 63, "children": [], "start_point": {"row": 47, "column": 46}, "end_point": {"row": 47, "column": 48}}, {"id": 70, "type": "number_literal", "text": "0", "parent": 63, "children": [], "start_point": {"row": 47, "column": 49}, "end_point": {"row": 47, "column": 50}}, {"id": 71, "type": "call_expression", "text": "fail(\"set name 2\")", "parent": 61, "children": [72, 73], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 20}}, {"id": 72, "type": "identifier", "text": "fail", "parent": 71, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 6}}, {"id": 73, "type": "argument_list", "text": "(\"set name 2\")", "parent": 71, "children": [74], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 20}}, {"id": 74, "type": "string_literal", "text": "\"set name 2\"", "parent": 73, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 19}}, {"id": 75, "type": "call_expression", "text": "jail_config_free(jc)", "parent": 33, "children": [76, 77], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 21}}, {"id": 76, "type": "identifier", "text": "jail_config_free", "parent": 75, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 17}}, {"id": 77, "type": "argument_list", "text": "(jc)", "parent": 75, "children": [78], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 21}}, {"id": 78, "type": "identifier", "text": "jc", "parent": 77, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 20}}, {"id": 79, "type": "return_statement", "text": "return 0;", "parent": 33, "children": [80], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 10}}, {"id": 80, "type": "number_literal", "text": "0", "parent": 79, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 9}}, {"id": 81, "type": "function_definition", "text": "int test_jail_create() {\n\tjail_config_t jc;\n\n\tjc = jail_config_new();\n\tjail_config_set_name(jc, \"thttpd\");\n\tjc->package = strdup(\"thttpd\");\n\tif (jail_is_installed(jc))\n\t\tfail(\"jail_is_installed\");\n\tif (jail_is_running(jc))\n\t\tfail(\"jail_is_running\");\n\tif (jail_create(jc) < 0)\n\t\tfail(\"jail_create\");\n\tif (!jail_is_installed(jc))\n\t\tfail(\"jail_is_installed\");\n\tif (!jail_is_running(jc))\n\t\tfail(\"jail_is_running\");\n\tif (jail_destroy(jc) < 0)\n\t\tfail(\"jail_destroy\");\n\tjail_config_free(jc);\n\n\treturn 0;\n}", "parent": null, "children": [82, 83], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 75, "column": 1}}, {"id": 82, "type": "primitive_type", "text": "int", "parent": 81, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 3}}, {"id": 83, "type": "function_declarator", "text": "test_jail_create()", "parent": 81, "children": [84, 85], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 22}}, {"id": 84, "type": "identifier", "text": "test_jail_create", "parent": 83, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 20}}, {"id": 85, "type": "parameter_list", "text": "()", "parent": 83, "children": [], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 22}}, {"id": 86, "type": "declaration", "text": "jail_config_t jc;", "parent": 81, "children": [87, 88], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 18}}, {"id": 87, "type": "type_identifier", "text": "jail_config_t", "parent": 86, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 14}}, {"id": 88, "type": "identifier", "text": "jc", "parent": 86, "children": [], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 17}}, {"id": 89, "type": "assignment_expression", "text": "jc = jail_config_new()", "parent": 81, "children": [90, 91, 92], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 23}}, {"id": 90, "type": "identifier", "text": "jc", "parent": 89, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 3}}, {"id": 91, "type": "=", "text": "=", "parent": 89, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 5}}, {"id": 92, "type": "call_expression", "text": "jail_config_new()", "parent": 89, "children": [93, 94], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 23}}, {"id": 93, "type": "identifier", "text": "jail_config_new", "parent": 92, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 21}}, {"id": 94, "type": "argument_list", "text": "()", "parent": 92, "children": [], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 23}}, {"id": 95, "type": "call_expression", "text": "jail_config_set_name(jc, \"thttpd\")", "parent": 81, "children": [96, 97], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 35}}, {"id": 96, "type": "identifier", "text": "jail_config_set_name", "parent": 95, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 21}}, {"id": 97, "type": "argument_list", "text": "(jc, \"thttpd\")", "parent": 95, "children": [98, 99], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 35}}, {"id": 98, "type": "identifier", "text": "jc", "parent": 97, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 24}}, {"id": 99, "type": "string_literal", "text": "\"thttpd\"", "parent": 97, "children": [], "start_point": {"row": 58, "column": 26}, "end_point": {"row": 58, "column": 34}}, {"id": 100, "type": "assignment_expression", "text": "jc->package = strdup(\"thttpd\")", "parent": 81, "children": [101, 103, 104], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 31}}, {"id": 101, "type": "field_expression", "text": "jc->package", "parent": 100, "children": [102], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 12}}, {"id": 102, "type": "identifier", "text": "jc", "parent": 101, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 3}}, {"id": 103, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 14}}, {"id": 104, "type": "call_expression", "text": "strdup(\"thttpd\")", "parent": 100, "children": [105, 106], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 31}}, {"id": 105, "type": "identifier", "text": "strdup", "parent": 104, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 21}}, {"id": 106, "type": "argument_list", "text": "(\"thttpd\")", "parent": 104, "children": [107], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 31}}, {"id": 107, "type": "string_literal", "text": "\"thttpd\"", "parent": 106, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 30}}, {"id": 108, "type": "if_statement", "text": "if (jail_is_installed(jc))\n\t\tfail(\"jail_is_installed\");", "parent": 81, "children": [109], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 61, "column": 28}}, {"id": 109, "type": "parenthesized_expression", "text": "(jail_is_installed(jc))", "parent": 108, "children": [110], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 27}}, {"id": 110, "type": "call_expression", "text": "jail_is_installed(jc)", "parent": 109, "children": [111, 112], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 26}}, {"id": 111, "type": "identifier", "text": "jail_is_installed", "parent": 110, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 22}}, {"id": 112, "type": "argument_list", "text": "(jc)", "parent": 110, "children": [113], "start_point": {"row": 60, "column": 22}, "end_point": {"row": 60, "column": 26}}, {"id": 113, "type": "identifier", "text": "jc", "parent": 112, "children": [], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 25}}, {"id": 114, "type": "call_expression", "text": "fail(\"jail_is_installed\")", "parent": 108, "children": [115, 116], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 27}}, {"id": 115, "type": "identifier", "text": "fail", "parent": 114, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 6}}, {"id": 116, "type": "argument_list", "text": "(\"jail_is_installed\")", "parent": 114, "children": [117], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 27}}, {"id": 117, "type": "string_literal", "text": "\"jail_is_installed\"", "parent": 116, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 26}}, {"id": 118, "type": "if_statement", "text": "if (jail_is_running(jc))\n\t\tfail(\"jail_is_running\");", "parent": 81, "children": [119], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 63, "column": 26}}, {"id": 119, "type": "parenthesized_expression", "text": "(jail_is_running(jc))", "parent": 118, "children": [120], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 25}}, {"id": 120, "type": "call_expression", "text": "jail_is_running(jc)", "parent": 119, "children": [121, 122], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 24}}, {"id": 121, "type": "identifier", "text": "jail_is_running", "parent": 120, "children": [], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 20}}, {"id": 122, "type": "argument_list", "text": "(jc)", "parent": 120, "children": [123], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 24}}, {"id": 123, "type": "identifier", "text": "jc", "parent": 122, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 23}}, {"id": 124, "type": "call_expression", "text": "fail(\"jail_is_running\")", "parent": 118, "children": [125, 126], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 25}}, {"id": 125, "type": "identifier", "text": "fail", "parent": 124, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 6}}, {"id": 126, "type": "argument_list", "text": "(\"jail_is_running\")", "parent": 124, "children": [127], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 25}}, {"id": 127, "type": "string_literal", "text": "\"jail_is_running\"", "parent": 126, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 24}}, {"id": 128, "type": "if_statement", "text": "if (jail_create(jc) < 0)\n\t\tfail(\"jail_create\");", "parent": 81, "children": [129], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 65, "column": 22}}, {"id": 129, "type": "parenthesized_expression", "text": "(jail_create(jc) < 0)", "parent": 128, "children": [130], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 25}}, {"id": 130, "type": "binary_expression", "text": "jail_create(jc) < 0", "parent": 129, "children": [131, 135, 136], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 24}}, {"id": 131, "type": "call_expression", "text": "jail_create(jc)", "parent": 130, "children": [132, 133], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 20}}, {"id": 132, "type": "identifier", "text": "jail_create", "parent": 131, "children": [], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 16}}, {"id": 133, "type": "argument_list", "text": "(jc)", "parent": 131, "children": [134], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 20}}, {"id": 134, "type": "identifier", "text": "jc", "parent": 133, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 19}}, {"id": 135, "type": "<", "text": "<", "parent": 130, "children": [], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 22}}, {"id": 136, "type": "number_literal", "text": "0", "parent": 130, "children": [], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 24}}, {"id": 137, "type": "call_expression", "text": "fail(\"jail_create\")", "parent": 128, "children": [138, 139], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 21}}, {"id": 138, "type": "identifier", "text": "fail", "parent": 137, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 6}}, {"id": 139, "type": "argument_list", "text": "(\"jail_create\")", "parent": 137, "children": [140], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 21}}, {"id": 140, "type": "string_literal", "text": "\"jail_create\"", "parent": 139, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 20}}, {"id": 141, "type": "if_statement", "text": "if (!jail_is_installed(jc))\n\t\tfail(\"jail_is_installed\");", "parent": 81, "children": [142], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 67, "column": 28}}, {"id": 142, "type": "parenthesized_expression", "text": "(!jail_is_installed(jc))", "parent": 141, "children": [143], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 28}}, {"id": 143, "type": "unary_expression", "text": "!jail_is_installed(jc)", "parent": 142, "children": [144, 145], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 27}}, {"id": 144, "type": "!", "text": "!", "parent": 143, "children": [], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 6}}, {"id": 145, "type": "call_expression", "text": "jail_is_installed(jc)", "parent": 143, "children": [146, 147], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 27}}, {"id": 146, "type": "identifier", "text": "jail_is_installed", "parent": 145, "children": [], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 23}}, {"id": 147, "type": "argument_list", "text": "(jc)", "parent": 145, "children": [148], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 27}}, {"id": 148, "type": "identifier", "text": "jc", "parent": 147, "children": [], "start_point": {"row": 66, "column": 24}, "end_point": {"row": 66, "column": 26}}, {"id": 149, "type": "call_expression", "text": "fail(\"jail_is_installed\")", "parent": 141, "children": [150, 151], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 27}}, {"id": 150, "type": "identifier", "text": "fail", "parent": 149, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 6}}, {"id": 151, "type": "argument_list", "text": "(\"jail_is_installed\")", "parent": 149, "children": [152], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 27}}, {"id": 152, "type": "string_literal", "text": "\"jail_is_installed\"", "parent": 151, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 26}}, {"id": 153, "type": "if_statement", "text": "if (!jail_is_running(jc))\n\t\tfail(\"jail_is_running\");", "parent": 81, "children": [154], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 69, "column": 26}}, {"id": 154, "type": "parenthesized_expression", "text": "(!jail_is_running(jc))", "parent": 153, "children": [155], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 26}}, {"id": 155, "type": "unary_expression", "text": "!jail_is_running(jc)", "parent": 154, "children": [156, 157], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 25}}, {"id": 156, "type": "!", "text": "!", "parent": 155, "children": [], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 6}}, {"id": 157, "type": "call_expression", "text": "jail_is_running(jc)", "parent": 155, "children": [158, 159], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 25}}, {"id": 158, "type": "identifier", "text": "jail_is_running", "parent": 157, "children": [], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 21}}, {"id": 159, "type": "argument_list", "text": "(jc)", "parent": 157, "children": [160], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 25}}, {"id": 160, "type": "identifier", "text": "jc", "parent": 159, "children": [], "start_point": {"row": 68, "column": 22}, "end_point": {"row": 68, "column": 24}}, {"id": 161, "type": "call_expression", "text": "fail(\"jail_is_running\")", "parent": 153, "children": [162, 163], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 25}}, {"id": 162, "type": "identifier", "text": "fail", "parent": 161, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 6}}, {"id": 163, "type": "argument_list", "text": "(\"jail_is_running\")", "parent": 161, "children": [164], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 25}}, {"id": 164, "type": "string_literal", "text": "\"jail_is_running\"", "parent": 163, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 24}}, {"id": 165, "type": "if_statement", "text": "if (jail_destroy(jc) < 0)\n\t\tfail(\"jail_destroy\");", "parent": 81, "children": [166], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 71, "column": 23}}, {"id": 166, "type": "parenthesized_expression", "text": "(jail_destroy(jc) < 0)", "parent": 165, "children": [167], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 26}}, {"id": 167, "type": "binary_expression", "text": "jail_destroy(jc) < 0", "parent": 166, "children": [168, 172, 173], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 25}}, {"id": 168, "type": "call_expression", "text": "jail_destroy(jc)", "parent": 167, "children": [169, 170], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 21}}, {"id": 169, "type": "identifier", "text": "jail_destroy", "parent": 168, "children": [], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 17}}, {"id": 170, "type": "argument_list", "text": "(jc)", "parent": 168, "children": [171], "start_point": {"row": 70, "column": 17}, "end_point": {"row": 70, "column": 21}}, {"id": 171, "type": "identifier", "text": "jc", "parent": 170, "children": [], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 20}}, {"id": 172, "type": "<", "text": "<", "parent": 167, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 23}}, {"id": 173, "type": "number_literal", "text": "0", "parent": 167, "children": [], "start_point": {"row": 70, "column": 24}, "end_point": {"row": 70, "column": 25}}, {"id": 174, "type": "call_expression", "text": "fail(\"jail_destroy\")", "parent": 165, "children": [175, 176], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 22}}, {"id": 175, "type": "identifier", "text": "fail", "parent": 174, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 6}}, {"id": 176, "type": "argument_list", "text": "(\"jail_destroy\")", "parent": 174, "children": [177], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 22}}, {"id": 177, "type": "string_literal", "text": "\"jail_destroy\"", "parent": 176, "children": [], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 21}}, {"id": 178, "type": "call_expression", "text": "jail_config_free(jc)", "parent": 81, "children": [179, 180], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 21}}, {"id": 179, "type": "identifier", "text": "jail_config_free", "parent": 178, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 17}}, {"id": 180, "type": "argument_list", "text": "(jc)", "parent": 178, "children": [181], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 21}}, {"id": 181, "type": "identifier", "text": "jc", "parent": 180, "children": [], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 20}}, {"id": 182, "type": "return_statement", "text": "return 0;", "parent": 81, "children": [183], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 10}}, {"id": 183, "type": "number_literal", "text": "0", "parent": 182, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 9}}, {"id": 184, "type": "function_definition", "text": "int main()\n{\n\tif (getuid() != 0) {\n\t\tputs(\"jail-test: skipping because not run as root\");\n\t\texit(0);\n\t}\n\tlog_open(\"jail-test.log\");\n\trun(test_jail_config);\n\trun(test_jail_create);\n}", "parent": null, "children": [185, 186], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 86, "column": 1}}, {"id": 185, "type": "primitive_type", "text": "int", "parent": 184, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 3}}, {"id": 186, "type": "function_declarator", "text": "main()", "parent": 184, "children": [187, 188], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 10}}, {"id": 187, "type": "identifier", "text": "main", "parent": 186, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 8}}, {"id": 188, "type": "parameter_list", "text": "()", "parent": 186, "children": [], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 10}}, {"id": 189, "type": "if_statement", "text": "if (getuid() != 0) {\n\t\tputs(\"jail-test: skipping because not run as root\");\n\t\texit(0);\n\t}", "parent": 184, "children": [190], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 82, "column": 2}}, {"id": 190, "type": "parenthesized_expression", "text": "(getuid() != 0)", "parent": 189, "children": [191], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 19}}, {"id": 191, "type": "binary_expression", "text": "getuid() != 0", "parent": 190, "children": [192, 195, 196], "start_point": {"row": 79, "column": 5}, "end_point": {"row": 79, "column": 18}}, {"id": 192, "type": "call_expression", "text": "getuid()", "parent": 191, "children": [193, 194], "start_point": {"row": 79, "column": 5}, "end_point": {"row": 79, "column": 13}}, {"id": 193, "type": "identifier", "text": "getuid", "parent": 192, "children": [], "start_point": {"row": 79, "column": 5}, "end_point": {"row": 79, "column": 11}}, {"id": 194, "type": "argument_list", "text": "()", "parent": 192, "children": [], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 13}}, {"id": 195, "type": "!=", "text": "!=", "parent": 191, "children": [], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 16}}, {"id": 196, "type": "number_literal", "text": "0", "parent": 191, "children": [], "start_point": {"row": 79, "column": 17}, "end_point": {"row": 79, "column": 18}}, {"id": 197, "type": "call_expression", "text": "puts(\"jail-test: skipping because not run as root\")", "parent": 189, "children": [198, 199], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 53}}, {"id": 198, "type": "identifier", "text": "puts", "parent": 197, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 6}}, {"id": 199, "type": "argument_list", "text": "(\"jail-test: skipping because not run as root\")", "parent": 197, "children": [200], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 53}}, {"id": 200, "type": "string_literal", "text": "\"jail-test: skipping because not run as root\"", "parent": 199, "children": [], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 52}}, {"id": 201, "type": "call_expression", "text": "exit(0)", "parent": 189, "children": [202, 203], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 9}}, {"id": 202, "type": "identifier", "text": "exit", "parent": 201, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 6}}, {"id": 203, "type": "argument_list", "text": "(0)", "parent": 201, "children": [204], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 9}}, {"id": 204, "type": "number_literal", "text": "0", "parent": 203, "children": [], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 8}}, {"id": 205, "type": "call_expression", "text": "log_open(\"jail-test.log\")", "parent": 184, "children": [206, 207], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 26}}, {"id": 206, "type": "identifier", "text": "log_open", "parent": 205, "children": [], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 9}}, {"id": 207, "type": "argument_list", "text": "(\"jail-test.log\")", "parent": 205, "children": [208], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 26}}, {"id": 208, "type": "string_literal", "text": "\"jail-test.log\"", "parent": 207, "children": [], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 25}}, {"id": 209, "type": "call_expression", "text": "run(test_jail_config)", "parent": 184, "children": [210, 211], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 22}}, {"id": 210, "type": "identifier", "text": "run", "parent": 209, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 4}}, {"id": 211, "type": "argument_list", "text": "(test_jail_config)", "parent": 209, "children": [212], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 22}}, {"id": 212, "type": "identifier", "text": "test_jail_config", "parent": 211, "children": [], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 21}}, {"id": 213, "type": "call_expression", "text": "run(test_jail_create)", "parent": 184, "children": [214, 215], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 22}}, {"id": 214, "type": "identifier", "text": "run", "parent": 213, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 4}}, {"id": 215, "type": "argument_list", "text": "(test_jail_create)", "parent": 213, "children": [216], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 22}}, {"id": 216, "type": "identifier", "text": "test_jail_create", "parent": 215, "children": [], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 21}}]}, "node_categories": {"declarations": {"functions": [21, 27, 33, 35, 81, 83, 184, 186], "variables": [38, 86], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [44, 48, 49, 50, 57, 62, 63, 64, 71, 75, 92, 95, 101, 104, 109, 110, 114, 119, 120, 124, 129, 130, 131, 137, 142, 143, 145, 149, 154, 155, 157, 161, 166, 167, 168, 174, 178, 190, 191, 192, 197, 201, 205, 209, 213], "assignments": [41, 89, 100], "loops": [], "conditionals": [23, 25, 29, 31, 36, 39, 40, 42, 45, 47, 51, 53, 58, 61, 65, 67, 72, 76, 78, 84, 87, 88, 90, 93, 96, 98, 102, 105, 108, 111, 113, 115, 118, 121, 123, 125, 128, 132, 134, 138, 141, 146, 148, 150, 153, 158, 160, 162, 165, 169, 171, 175, 179, 181, 187, 189, 193, 198, 202, 206, 210, 212, 214, 216], "returns": [79, 182], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 54, 56, 60, 68, 70, 74, 80, 99, 107, 117, 127, 136, 140, 152, 164, 173, 177, 183, 196, 200, 204, 208], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "unknown", "text_snippet": "#define run(test) do { \\\n\tprintf(\"%-24s\", \"\"#test); \\\n\tif (test() != 0) { \\\n\t\tputs(\"FAILED\"); \\\n\t\tex"}, {"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "#define fail(_message) do { \\\n\tprintf(\"FAIL: %s\\n\", _message); \\\n\treturn -1; \\\n} while (0)\n"}, {"node_id": 33, "universal_type": "function", "name": "test_jail_config", "text_snippet": "int test_jail_config() {\n\tjail_config_t jc;\n\n\tjc = jail_config_new();\n\tif (jail_config_set_name(jc, "}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "test_jail_config()"}, {"node_id": 81, "universal_type": "function", "name": "test_jail_create", "text_snippet": "int test_jail_create() {\n\tjail_config_t jc;\n\n\tjc = jail_config_new();\n\tjail_config_set_name(jc, \"tht"}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "test_jail_create()"}, {"node_id": 184, "universal_type": "function", "name": "main", "text_snippet": "int main()\n{\n\tif (getuid() != 0) {\n\t\tputs(\"jail-test: skipping because not run as root\");\n\t\texit(0);"}, {"node_id": 186, "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 <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 <stdbool.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <unistd.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"../log.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"../jail.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 2015 <NAME> <<EMAIL>>\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <stdbool.h>\n#include <unistd.h>\n\n#include \"../log.h\"\n#include \"../jail.h\"\n\n//FIXME: copypaste from jmtest.c\n#define run(test) do { \\\n\tprintf(\"%-24s\", \"\"#test); \\\n\tif (test() != 0) { \\\n\t\tputs(\"FAILED\"); \\\n\t\texit(1); \\\n\t} else { \\\n\t\tputs(\"passed\"); \\\n\t} \\\n} while(0)\n\n#define fail(_message) do { \\\n\tprintf(\"FAIL: %s\\n\", _message); \\\n\treturn -1; \\\n} while (0)\n\nint test_jail_config() {\n\tjail_config_t jc;\n\n\tjc = jail_config_new();\n\tif (jail_config_set_name(jc, \"foo\") < 0)\n\t\tfail(\"set name 1\");\n\tif (jail_config_set_name(jc, \"illegal name\") == 0)\n\t\tfail(\"set name 2\");\n\tjail_config_free(jc);\n\n\treturn 0;\n}\n\nint test_jail_create() {\n\tjail_config_t jc;\n\n\tjc = jail_config_new();\n\tjail_config_set_name(jc, \"thttpd\");\n\tjc->package = strdup(\"thttpd\");\n\tif (jail_is_installed(jc))\n\t\tfail(\"jail_is_installed\");\n\tif (jail_is_running(jc))\n\t\tfail(\"jail_is_running\");\n\tif (jail_create(jc) < 0)\n\t\tfail(\"jail_create\");\n\tif (!jail_is_installed(jc))\n\t\tfail(\"jail_is_installed\");\n\tif (!jail_is_running(jc))\n\t\tfail(\"jail_is_running\");\n\tif (jail_destroy(jc) < 0)\n\t\tfail(\"jail_destroy\");\n\tjail_config_free(jc);\n\n\treturn 0;\n}\n\nint main()\n{\n\tif (getuid() != 0) {\n\t\tputs(\"jail-test: skipping because not run as root\");\n\t\texit(0);\n\t}\n\tlog_open(\"jail-test.log\");\n\trun(test_jail_config);\n\trun(test_jail_create);\n}\n"}
376
c
#ifndef __NVIF_CLB069_H__ #define __NVIF_CLB069_H__ struct nvif_clb069_v0 { __u8 version; __u8 pad01[3]; __u32 entries; __u32 get; __u32 put; }; #define NVB069_V0_NTFY_FAULT 0x00 #endif
20.82
11
(translation_unit) "#ifndef __NVIF_CLB069_H__\n#define __NVIF_CLB069_H__\nstruct nvif_clb069_v0 {\n __u8 version;\n __u8 pad01[3];\n __u32 entries;\n __u32 get;\n __u32 put;\n};\n\n#define NVB069_V0_NTFY_FAULT 0x00\n#endif\n" (preproc_ifdef) "#ifndef __NVIF_CLB069_H__\n#define __NVIF_CLB069_H__\nstruct nvif_clb069_v0 {\n __u8 version;\n __u8 pad01[3];\n __u32 entries;\n __u32 get;\n __u32 put;\n};\n\n#define NVB069_V0_NTFY_FAULT 0x00\n#endif" (#ifndef) "#ifndef" (identifier) "__NVIF_CLB069_H__" (preproc_def) "#define __NVIF_CLB069_H__\n" (#define) "#define" (identifier) "__NVIF_CLB069_H__" (struct_specifier) "struct nvif_clb069_v0 {\n __u8 version;\n __u8 pad01[3];\n __u32 entries;\n __u32 get;\n __u32 put;\n}" (struct) "struct" (type_identifier) "nvif_clb069_v0" (field_declaration_list) "{\n __u8 version;\n __u8 pad01[3];\n __u32 entries;\n __u32 get;\n __u32 put;\n}" ({) "{" (field_declaration) "__u8 version;" (type_identifier) "__u8" (field_identifier) "version" (;) ";" (field_declaration) "__u8 pad01[3];" (type_identifier) "__u8" (array_declarator) "pad01[3]" (field_identifier) "pad01" ([) "[" (number_literal) "3" (]) "]" (;) ";" (field_declaration) "__u32 entries;" (type_identifier) "__u32" (field_identifier) "entries" (;) ";" (field_declaration) "__u32 get;" (type_identifier) "__u32" (field_identifier) "get" (;) ";" (field_declaration) "__u32 put;" (type_identifier) "__u32" (field_identifier) "put" (;) ";" (}) "}" (;) ";" (preproc_def) "#define NVB069_V0_NTFY_FAULT 0x00\n" (#define) "#define" (identifier) "NVB069_V0_NTFY_FAULT" (preproc_arg) "0x00" (#endif) "#endif"
43
0
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 20.82, "nodes": 31, "errors": 0, "source_hash": "1e5f2b7160702996753c7ea13bb24b32721aee3e9288e7f901d2e1a256c2e973", "categorized_nodes": 25}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __NVIF_CLB069_H__\n#define __NVIF_CLB069_H__\nstruct nvif_clb069_v0 {\n\t__u8 version;\n\t__u8 pad01[3];\n\t__u32 entries;\n\t__u32 get;\n\t__u32 put;\n};\n\n#define NVB069_V0_NTFY_FAULT 0x00\n#endif", "parent": null, "children": [1, 2, 3, 6, 26, 30], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "__NVIF_CLB069_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define __NVIF_CLB069_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": "__NVIF_CLB069_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 25}}, {"id": 6, "type": "struct_specifier", "text": "struct nvif_clb069_v0 {\n\t__u8 version;\n\t__u8 pad01[3];\n\t__u32 entries;\n\t__u32 get;\n\t__u32 put;\n}", "parent": 0, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 7, "type": "struct", "text": "struct", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 6}}, {"id": 8, "type": "type_identifier", "text": "nvif_clb069_v0", "parent": 6, "children": [], "start_point": {"row": 2, "column": 7}, "end_point": {"row": 2, "column": 21}}, {"id": 9, "type": "field_declaration", "text": "__u8 version;", "parent": 6, "children": [10, 11], "start_point": {"row": 3, "column": 1}, "end_point": {"row": 3, "column": 15}}, {"id": 10, "type": "type_identifier", "text": "__u8", "parent": 9, "children": [], "start_point": {"row": 3, "column": 1}, "end_point": {"row": 3, "column": 5}}, {"id": 11, "type": "field_identifier", "text": "version", "parent": 9, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 14}}, {"id": 12, "type": "field_declaration", "text": "__u8 pad01[3];", "parent": 6, "children": [13, 14], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 16}}, {"id": 13, "type": "type_identifier", "text": "__u8", "parent": 12, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 5}}, {"id": 14, "type": "array_declarator", "text": "pad01[3]", "parent": 12, "children": [15, 16], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 15}}, {"id": 15, "type": "field_identifier", "text": "pad01", "parent": 14, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 12}}, {"id": 16, "type": "number_literal", "text": "3", "parent": 14, "children": [], "start_point": {"row": 4, "column": 13}, "end_point": {"row": 4, "column": 14}}, {"id": 17, "type": "field_declaration", "text": "__u32 entries;", "parent": 6, "children": [18, 19], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 15}}, {"id": 18, "type": "type_identifier", "text": "__u32", "parent": 17, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 6}}, {"id": 19, "type": "field_identifier", "text": "entries", "parent": 17, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 14}}, {"id": 20, "type": "field_declaration", "text": "__u32 get;", "parent": 6, "children": [21, 22], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 11}}, {"id": 21, "type": "type_identifier", "text": "__u32", "parent": 20, "children": [], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 6}}, {"id": 22, "type": "field_identifier", "text": "get", "parent": 20, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 10}}, {"id": 23, "type": "field_declaration", "text": "__u32 put;", "parent": 6, "children": [24, 25], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 11}}, {"id": 24, "type": "type_identifier", "text": "__u32", "parent": 23, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 6}}, {"id": 25, "type": "field_identifier", "text": "put", "parent": 23, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 10}}, {"id": 26, "type": "preproc_def", "text": "#define NVB069_V0_NTFY_FAULT 0x00\n", "parent": 0, "children": [27, 28, 29], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 27, "type": "#define", "text": "#define", "parent": 26, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 28, "type": "identifier", "text": "NVB069_V0_NTFY_FAULT", "parent": 26, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 28}}, {"id": 29, "type": "preproc_arg", "text": "0x00", "parent": 26, "children": [], "start_point": {"row": 10, "column": 76}, "end_point": {"row": 10, "column": 80}}, {"id": 30, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [9, 12, 17, 20, 23], "classes": [6, 7], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 8, 10, 11, 13, 15, 18, 19, 21, 22, 24, 25, 28, 30], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [16], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 6, "universal_type": "class", "name": "nvif_clb069_v0", "text_snippet": "struct nvif_clb069_v0 {\n\t__u8 version;\n\t__u8 pad01[3];\n\t__u32 entries;\n\t__u32 get;\n\t__u32 put;\n}"}, {"node_id": 7, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": []}, "original_source_code": "#ifndef __NVIF_CLB069_H__\n#define __NVIF_CLB069_H__\nstruct nvif_clb069_v0 {\n\t__u8 version;\n\t__u8 pad01[3];\n\t__u32 entries;\n\t__u32 get;\n\t__u32 put;\n};\n\n#define NVB069_V0_NTFY_FAULT 0x00\n#endif\n"}
377
c
/* nest98.h */ #include "nest99.h"
16.5
2
(translation_unit) "/* nest98.h */\n#include "nest99.h"\n" (comment) "/* nest98.h */" (preproc_include) "#include "nest99.h"\n" (#include) "#include" (string_literal) ""nest99.h"" (") """ (string_content) "nest99.h" (") """
8
0
{"language": "c", "success": true, "metadata": {"lines": 2, "avg_line_length": 16.5, "nodes": 3, "errors": 0, "source_hash": "ceea0aa70c588c37c5e11310a93228929b28716f891c5c06b8c095b363030a0d", "categorized_nodes": 3}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"nest99.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"nest99.h\"", "parent": 0, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"nest99.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/* nest98.h */\n#include \"nest99.h\"\n"}
378
c
#if defined(CGV_REFLECT_FORCE_STATIC) # define CGV_FORCE_STATIC_LIB #endif #ifdef CGV_REFLECT_EXPORTS # define CGV_EXPORTS #endif #include <cgv/config/lib_begin.h>
22.43
7
(translation_unit) "#if defined(CGV_REFLECT_FORCE_STATIC)\n# define CGV_FORCE_STATIC_LIB\n#endif\n#ifdef CGV_REFLECT_EXPORTS\n# define CGV_EXPORTS\n#endif\n\n#include <cgv/config/lib_begin.h>\n" (preproc_if) "#if defined(CGV_REFLECT_FORCE_STATIC)\n# define CGV_FORCE_STATIC_LIB\n#endif" (#if) "#if" (preproc_defined) "defined(CGV_REFLECT_FORCE_STATIC)" (defined) "defined" (() "(" (identifier) "CGV_REFLECT_FORCE_STATIC" ()) ")" ( ) "\n" (preproc_def) "# define CGV_FORCE_STATIC_LIB\n" (#define) "# define" (identifier) "CGV_FORCE_STATIC_LIB" (#endif) "#endif" (preproc_ifdef) "#ifdef CGV_REFLECT_EXPORTS\n# define CGV_EXPORTS\n#endif" (#ifdef) "#ifdef" (identifier) "CGV_REFLECT_EXPORTS" (preproc_def) "# define CGV_EXPORTS\n" (#define) "# define" (identifier) "CGV_EXPORTS" (#endif) "#endif" (preproc_include) "#include <cgv/config/lib_begin.h>\n" (#include) "#include" (system_lib_string) "<cgv/config/lib_begin.h>"
23
0
{"language": "c", "success": true, "metadata": {"lines": 7, "avg_line_length": 22.43, "nodes": 20, "errors": 0, "source_hash": "449e3500e1043ebaf56421b05d7fd0642d5737a8bb42894bf280f09e645de5ad", "categorized_nodes": 13}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_if", "text": "#if defined(CGV_REFLECT_FORCE_STATIC)\n#\tdefine CGV_FORCE_STATIC_LIB\n#endif", "parent": null, "children": [1, 2, 5, 6, 9], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 2, "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": "preproc_defined", "text": "defined(CGV_REFLECT_FORCE_STATIC)", "parent": 0, "children": [3, 4], "start_point": {"row": 0, "column": 4}, "end_point": {"row": 0, "column": 37}}, {"id": 3, "type": "defined", "text": "defined", "parent": 2, "children": [], "start_point": {"row": 0, "column": 4}, "end_point": {"row": 0, "column": 11}}, {"id": 4, "type": "identifier", "text": "CGV_REFLECT_FORCE_STATIC", "parent": 2, "children": [], "start_point": {"row": 0, "column": 12}, "end_point": {"row": 0, "column": 36}}, {"id": 5, "type": "\n", "text": "\n", "parent": 0, "children": [], "start_point": {"row": 0, "column": 37}, "end_point": {"row": 1, "column": 0}}, {"id": 6, "type": "preproc_def", "text": "#\tdefine CGV_FORCE_STATIC_LIB\n", "parent": 0, "children": [7, 8], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 7, "type": "#define", "text": "#\tdefine", "parent": 6, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 8, "type": "identifier", "text": "CGV_FORCE_STATIC_LIB", "parent": 6, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 29}}, {"id": 9, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 6}}, {"id": 10, "type": "preproc_ifdef", "text": "#ifdef CGV_REFLECT_EXPORTS\n#\tdefine CGV_EXPORTS\n#endif", "parent": null, "children": [11, 12, 13, 16], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 11, "type": "#ifdef", "text": "#ifdef", "parent": 10, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 12, "type": "identifier", "text": "CGV_REFLECT_EXPORTS", "parent": 10, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 26}}, {"id": 13, "type": "preproc_def", "text": "#\tdefine CGV_EXPORTS\n", "parent": 10, "children": [14, 15], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 14, "type": "#define", "text": "#\tdefine", "parent": 13, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 15, "type": "identifier", "text": "CGV_EXPORTS", "parent": 13, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 20}}, {"id": 16, "type": "#endif", "text": "#endif", "parent": 10, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 17, "type": "preproc_include", "text": "#include <cgv/config/lib_begin.h>\n", "parent": null, "children": [18, 19], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 18, "type": "#include", "text": "#include", "parent": 17, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 19, "type": "system_lib_string", "text": "<cgv/config/lib_begin.h>", "parent": 17, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 33}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [17, 18], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 4, 8, 9, 10, 11, 12, 15, 16], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [19], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 17, "text": "#include <cgv/config/lib_begin.h>\n"}, {"node_id": 18, "text": "#include"}]}, "original_source_code": "#if defined(CGV_REFLECT_FORCE_STATIC)\n#\tdefine CGV_FORCE_STATIC_LIB\n#endif\n#ifdef CGV_REFLECT_EXPORTS\n#\tdefine CGV_EXPORTS\n#endif\n\n#include <cgv/config/lib_begin.h>\n"}
379
c
#define UTS_VERSION "#1 2010-09-09 12:44:17 EDT" #define LINUX_COMPILE_TIME "12:44:17" #define LINUX_COMPILE_BY "root" #define LINUX_COMPILE_HOST "tomato" #define LINUX_COMPILE_DOMAIN "localdomain" #define LINUX_COMPILER "gcc version 3.4.6"
39.17
6
(translation_unit) "#define UTS_VERSION "#1 2010-09-09 12:44:17 EDT"\n#define LINUX_COMPILE_TIME "12:44:17"\n#define LINUX_COMPILE_BY "root"\n#define LINUX_COMPILE_HOST "tomato"\n#define LINUX_COMPILE_DOMAIN "localdomain"\n#define LINUX_COMPILER "gcc version 3.4.6"\n" (preproc_def) "#define UTS_VERSION "#1 2010-09-09 12:44:17 EDT"\n" (#define) "#define" (identifier) "UTS_VERSION" (preproc_arg) ""#1 2010-09-09 12:44:17 EDT"" (preproc_def) "#define LINUX_COMPILE_TIME "12:44:17"\n" (#define) "#define" (identifier) "LINUX_COMPILE_TIME" (preproc_arg) ""12:44:17"" (preproc_def) "#define LINUX_COMPILE_BY "root"\n" (#define) "#define" (identifier) "LINUX_COMPILE_BY" (preproc_arg) ""root"" (preproc_def) "#define LINUX_COMPILE_HOST "tomato"\n" (#define) "#define" (identifier) "LINUX_COMPILE_HOST" (preproc_arg) ""tomato"" (preproc_def) "#define LINUX_COMPILE_DOMAIN "localdomain"\n" (#define) "#define" (identifier) "LINUX_COMPILE_DOMAIN" (preproc_arg) ""localdomain"" (preproc_def) "#define LINUX_COMPILER "gcc version 3.4.6"\n" (#define) "#define" (identifier) "LINUX_COMPILER" (preproc_arg) ""gcc version 3.4.6""
25
0
{"language": "c", "success": true, "metadata": {"lines": 6, "avg_line_length": 39.17, "nodes": 24, "errors": 0, "source_hash": "6f9ee18c30b3d6d67f5338c8ed0729aed106f8ac9ca0bc35e44d5c03529fbc55", "categorized_nodes": 6}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_def", "text": "#define UTS_VERSION \"#1 2010-09-09 12:44:17 EDT\"\n", "parent": null, "children": [1, 2, 3], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#define", "text": "#define", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "UTS_VERSION", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_arg", "text": "\"#1 2010-09-09 12:44:17 EDT\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 20}, "end_point": {"row": 0, "column": 48}}, {"id": 4, "type": "preproc_def", "text": "#define LINUX_COMPILE_TIME \"12:44:17\"\n", "parent": null, "children": [5, 6, 7], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 5, "type": "#define", "text": "#define", "parent": 4, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 6, "type": "identifier", "text": "LINUX_COMPILE_TIME", "parent": 4, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 26}}, {"id": 7, "type": "preproc_arg", "text": "\"12:44:17\"", "parent": 4, "children": [], "start_point": {"row": 1, "column": 27}, "end_point": {"row": 1, "column": 37}}, {"id": 8, "type": "preproc_def", "text": "#define LINUX_COMPILE_BY \"root\"\n", "parent": null, "children": [9, 10, 11], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 9, "type": "#define", "text": "#define", "parent": 8, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 10, "type": "identifier", "text": "LINUX_COMPILE_BY", "parent": 8, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 24}}, {"id": 11, "type": "preproc_arg", "text": "\"root\"", "parent": 8, "children": [], "start_point": {"row": 2, "column": 25}, "end_point": {"row": 2, "column": 31}}, {"id": 12, "type": "preproc_def", "text": "#define LINUX_COMPILE_HOST \"tomato\"\n", "parent": null, "children": [13, 14, 15], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 14, "type": "identifier", "text": "LINUX_COMPILE_HOST", "parent": 12, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 26}}, {"id": 15, "type": "preproc_arg", "text": "\"tomato\"", "parent": 12, "children": [], "start_point": {"row": 3, "column": 27}, "end_point": {"row": 3, "column": 35}}, {"id": 16, "type": "preproc_def", "text": "#define LINUX_COMPILE_DOMAIN \"localdomain\"\n", "parent": null, "children": [17, 18, 19], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 17, "type": "#define", "text": "#define", "parent": 16, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 18, "type": "identifier", "text": "LINUX_COMPILE_DOMAIN", "parent": 16, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 28}}, {"id": 19, "type": "preproc_arg", "text": "\"localdomain\"", "parent": 16, "children": [], "start_point": {"row": 4, "column": 29}, "end_point": {"row": 4, "column": 42}}, {"id": 20, "type": "preproc_def", "text": "#define LINUX_COMPILER \"gcc version 3.4.6\"\n", "parent": null, "children": [21, 22, 23], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 21, "type": "#define", "text": "#define", "parent": 20, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 22, "type": "identifier", "text": "LINUX_COMPILER", "parent": 20, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 22}}, {"id": 23, "type": "preproc_arg", "text": "\"gcc version 3.4.6\"", "parent": 20, "children": [], "start_point": {"row": 5, "column": 23}, "end_point": {"row": 5, "column": 42}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [2, 6, 10, 14, 18, 22], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "#define UTS_VERSION \"#1 2010-09-09 12:44:17 EDT\"\n#define LINUX_COMPILE_TIME \"12:44:17\"\n#define LINUX_COMPILE_BY \"root\"\n#define LINUX_COMPILE_HOST \"tomato\"\n#define LINUX_COMPILE_DOMAIN \"localdomain\"\n#define LINUX_COMPILER \"gcc version 3.4.6\"\n"}
380
c
#ifndef SVM_HANDLER_H #define SVM_HANDLER_H #include "svm_basic.h" // SVMHandler interface, all blocks will implement this class class SVMHandler { public: //virtual ~SVMHandler(); virtual void processRequest(SVMConfiguration&) = 0; virtual bool canHandle(SVMConfiguration&) = 0; }; #endif
25.64
11
(translation_unit) "#ifndef SVM_HANDLER_H\n#define SVM_HANDLER_H\n\n#include "svm_basic.h"\n\n// SVMHandler interface, all blocks will implement this class\nclass SVMHandler {\npublic:\n //virtual ~SVMHandler();\n virtual void processRequest(SVMConfiguration&) = 0;\n virtual bool canHandle(SVMConfiguration&) = 0;\n};\n\n#endif\n" (preproc_ifdef) "#ifndef SVM_HANDLER_H\n#define SVM_HANDLER_H\n\n#include "svm_basic.h"\n\n// SVMHandler interface, all blocks will implement this class\nclass SVMHandler {\npublic:\n //virtual ~SVMHandler();\n virtual void processRequest(SVMConfiguration&) = 0;\n virtual bool canHandle(SVMConfiguration&) = 0;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "SVM_HANDLER_H" (preproc_def) "#define SVM_HANDLER_H\n" (#define) "#define" (identifier) "SVM_HANDLER_H" (preproc_include) "#include "svm_basic.h"\n" (#include) "#include" (string_literal) ""svm_basic.h"" (") """ (string_content) "svm_basic.h" (") """ (comment) "// SVMHandler interface, all blocks will implement this class" (function_definition) "class SVMHandler {\npublic:\n //virtual ~SVMHandler();\n virtual void processRequest(SVMConfiguration&) = 0;\n virtual bool canHandle(SVMConfiguration&) = 0;\n}" (type_identifier) "class" (identifier) "SVMHandler" (compound_statement) "{\npublic:\n //virtual ~SVMHandler();\n virtual void processRequest(SVMConfiguration&) = 0;\n virtual bool canHandle(SVMConfiguration&) = 0;\n}" ({) "{" (labeled_statement) "public:\n //virtual ~SVMHandler();\n virtual void" (statement_identifier) "public" (:) ":" (comment) "//virtual ~SVMHandler();" (declaration) "virtual void" (type_identifier) "virtual" (identifier) "void" (;) "" (expression_statement) "processRequest(SVMConfiguration&) = 0;" (assignment_expression) "processRequest(SVMConfiguration&) = 0" (call_expression) "processRequest(SVMConfiguration&)" (identifier) "processRequest" (argument_list) "(SVMConfiguration&)" (() "(" (binary_expression) "SVMConfiguration&" (identifier) "SVMConfiguration" (&) "&" (identifier) "" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual bool" (type_identifier) "virtual" (identifier) "bool" (;) "" (expression_statement) "canHandle(SVMConfiguration&) = 0;" (assignment_expression) "canHandle(SVMConfiguration&) = 0" (call_expression) "canHandle(SVMConfiguration&)" (identifier) "canHandle" (argument_list) "(SVMConfiguration&)" (() "(" (binary_expression) "SVMConfiguration&" (identifier) "SVMConfiguration" (&) "&" (identifier) "" ()) ")" (=) "=" (number_literal) "0" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif"
63
0
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 25.64, "nodes": 37, "errors": 0, "source_hash": "5a0a4978260c318ef4bb56ebd78043ed17ea22479a3288c813ef5c621f44e58a", "categorized_nodes": 30}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SVM_HANDLER_H\n#define SVM_HANDLER_H\n\n#include \"svm_basic.h\"\n\n// SVMHandler interface, all blocks will implement this class\nclass SVMHandler {\npublic:\n\t//virtual ~SVMHandler();\n\tvirtual void processRequest(SVMConfiguration&) = 0;\n\tvirtual bool canHandle(SVMConfiguration&) = 0;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 36], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 13, "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": "SVM_HANDLER_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 21}}, {"id": 3, "type": "preproc_def", "text": "#define SVM_HANDLER_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": "SVM_HANDLER_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "#include \"svm_basic.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": "\"svm_basic.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 22}}, {"id": 9, "type": "function_definition", "text": "class SVMHandler {\npublic:\n\t//virtual ~SVMHandler();\n\tvirtual void processRequest(SVMConfiguration&) = 0;\n\tvirtual bool canHandle(SVMConfiguration&) = 0;\n}", "parent": 0, "children": [10], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 10, "type": "identifier", "text": "SVMHandler", "parent": 9, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 16}}, {"id": 11, "type": "labeled_statement", "text": "public:\n\t//virtual ~SVMHandler();\n\tvirtual void", "parent": 9, "children": [12], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 9, "column": 13}}, {"id": 12, "type": "declaration", "text": "virtual void", "parent": 11, "children": [13, 14], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 13}}, {"id": 13, "type": "type_identifier", "text": "virtual", "parent": 12, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 8}}, {"id": 14, "type": "identifier", "text": "void", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 13}}, {"id": 15, "type": "assignment_expression", "text": "processRequest(SVMConfiguration&) = 0", "parent": 9, "children": [16, 22, 23], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 51}}, {"id": 16, "type": "call_expression", "text": "processRequest(SVMConfiguration&)", "parent": 15, "children": [17, 18], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 47}}, {"id": 17, "type": "identifier", "text": "processRequest", "parent": 16, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 28}}, {"id": 18, "type": "argument_list", "text": "(SVMConfiguration&)", "parent": 16, "children": [19], "start_point": {"row": 9, "column": 28}, "end_point": {"row": 9, "column": 47}}, {"id": 19, "type": "binary_expression", "text": "SVMConfiguration&", "parent": 18, "children": [20, 21], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 9, "column": 46}}, {"id": 20, "type": "identifier", "text": "SVMConfiguration", "parent": 19, "children": [], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 9, "column": 45}}, {"id": 21, "type": "identifier", "text": "", "parent": 19, "children": [], "start_point": {"row": 9, "column": 46}, "end_point": {"row": 9, "column": 46}}, {"id": 22, "type": "=", "text": "=", "parent": 15, "children": [], "start_point": {"row": 9, "column": 48}, "end_point": {"row": 9, "column": 49}}, {"id": 23, "type": "number_literal", "text": "0", "parent": 15, "children": [], "start_point": {"row": 9, "column": 50}, "end_point": {"row": 9, "column": 51}}, {"id": 24, "type": "declaration", "text": "virtual bool", "parent": 9, "children": [25, 26], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 13}}, {"id": 25, "type": "type_identifier", "text": "virtual", "parent": 24, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 8}}, {"id": 26, "type": "identifier", "text": "bool", "parent": 24, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 13}}, {"id": 27, "type": "assignment_expression", "text": "canHandle(SVMConfiguration&) = 0", "parent": 9, "children": [28, 34, 35], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 46}}, {"id": 28, "type": "call_expression", "text": "canHandle(SVMConfiguration&)", "parent": 27, "children": [29, 30], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 42}}, {"id": 29, "type": "identifier", "text": "canHandle", "parent": 28, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 23}}, {"id": 30, "type": "argument_list", "text": "(SVMConfiguration&)", "parent": 28, "children": [31], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 42}}, {"id": 31, "type": "binary_expression", "text": "SVMConfiguration&", "parent": 30, "children": [32, 33], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 41}}, {"id": 32, "type": "identifier", "text": "SVMConfiguration", "parent": 31, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 40}}, {"id": 33, "type": "identifier", "text": "", "parent": 31, "children": [], "start_point": {"row": 10, "column": 41}, "end_point": {"row": 10, "column": 41}}, {"id": 34, "type": "=", "text": "=", "parent": 27, "children": [], "start_point": {"row": 10, "column": 43}, "end_point": {"row": 10, "column": 44}}, {"id": 35, "type": "number_literal", "text": "0", "parent": 27, "children": [], "start_point": {"row": 10, "column": 45}, "end_point": {"row": 10, "column": 46}}, {"id": 36, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9], "variables": [12, 24], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [16, 19, 28, 31], "assignments": [15, 27], "loops": [], "conditionals": [0, 1, 2, 5, 10, 13, 14, 17, 20, 21, 25, 26, 29, 32, 33, 36], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 23, 35], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "SVMHandler", "text_snippet": "class SVMHandler {\npublic:\n\t//virtual ~SVMHandler();\n\tvirtual void processRequest(SVMConfiguration&)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"svm_basic.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef SVM_HANDLER_H\n#define SVM_HANDLER_H\n\n#include \"svm_basic.h\"\n\n// SVMHandler interface, all blocks will implement this class\nclass SVMHandler {\npublic:\n\t//virtual ~SVMHandler();\n\tvirtual void processRequest(SVMConfiguration&) = 0;\n\tvirtual bool canHandle(SVMConfiguration&) = 0;\n};\n\n#endif\n"}
381
c
/*@predicate who_is_taller{L}(int *x,integer j, integer last)= @ \forall integer i; j < i < last ==> x[j] > x[i]; @ */ /*@ predicate how_many{L}(int *x, integer counter, integer size,integer cnt) = @ (counter < size) ? @ (who_is_taller(x,counter,size))? how_many(x,counter+1,size,cnt-1) @ : how_many(x,counter+1,size,cnt) @ : cnt == 0; @*/ /*@ requires 0< N <= 1000000 ; @ requires \valid(x+(0..N-1)); @ requires \forall integer i; 0 <= i <= N-1 ==> 0< x[i] <= 1000000; @ ensures how_many(x,0,N,\result); @*/ int countWhoCanSee (int N, int x[]) { int tallest = x[N-1]; int count = 1; /*@ loop invariant -1 <= i < N-1; @ loop invariant 1 <= count < N-i; @ loop invariant \exists integer j; @ i<j<N && tallest==x[j]; @ loop invariant \forall integer j; @ i<j<N ==> tallest >=x[j]; @ loop invariant how_many(x,i+1,N,count); @ loop assigns i,count,tallest; @ loop variant i; @*/ for (int i = N-2; i >= 0; i--) if (tallest < x[i]) { tallest = x[i]; count++; } return count; }
28.15
39
(translation_unit) "/*@predicate who_is_taller{L}(int *x,integer j, integer last)=\n @ \forall integer i; j < i < last ==> x[j] > x[i];\n @\n*/\n\n/*@ predicate how_many{L}(int *x, integer counter, integer size,integer cnt) =\n @ (counter < size) ? \n @ (who_is_taller(x,counter,size))? how_many(x,counter+1,size,cnt-1)\n @ : how_many(x,counter+1,size,cnt)\n @ : cnt == 0;\n @*/\n\n\n/*@ requires 0< N <= 1000000 ;\n @ requires \valid(x+(0..N-1));\n @ requires \forall integer i; \n 0 <= i <= N-1 ==> 0< x[i] <= 1000000;\n @ ensures how_many(x,0,N,\result);\n @*/\nint countWhoCanSee (int N, int x[])\n\n{\n\n int tallest = x[N-1];\n int count = 1;\n\n/*@ loop invariant -1 <= i < N-1;\n @ loop invariant 1 <= count < N-i;\n @ loop invariant \exists integer j;\n @ i<j<N && tallest==x[j];\n @ loop invariant \forall integer j;\n @ i<j<N ==> tallest >=x[j];\n @ loop invariant how_many(x,i+1,N,count); \n @ loop assigns i,count,tallest;\n @ loop variant i;\n @*/\n\n\n for (int i = N-2; i >= 0; i--)\n\n if (tallest < x[i]) {\n tallest = x[i];\n count++;\n }\n return count;\n }\n" (comment) "/*@predicate who_is_taller{L}(int *x,integer j, integer last)=\n @ \forall integer i; j < i < last ==> x[j] > x[i];\n @\n*/" (comment) "/*@ predicate how_many{L}(int *x, integer counter, integer size,integer cnt) =\n @ (counter < size) ? \n @ (who_is_taller(x,counter,size))? how_many(x,counter+1,size,cnt-1)\n @ : how_many(x,counter+1,size,cnt)\n @ : cnt == 0;\n @*/" (comment) "/*@ requires 0< N <= 1000000 ;\n @ requires \valid(x+(0..N-1));\n @ requires \forall integer i; \n 0 <= i <= N-1 ==> 0< x[i] <= 1000000;\n @ ensures how_many(x,0,N,\result);\n @*/" (function_definition) "int countWhoCanSee (int N, int x[])\n\n{\n\n int tallest = x[N-1];\n int count = 1;\n\n/*@ loop invariant -1 <= i < N-1;\n @ loop invariant 1 <= count < N-i;\n @ loop invariant \exists integer j;\n @ i<j<N && tallest==x[j];\n @ loop invariant \forall integer j;\n @ i<j<N ==> tallest >=x[j];\n @ loop invariant how_many(x,i+1,N,count); \n @ loop assigns i,count,tallest;\n @ loop variant i;\n @*/\n\n\n for (int i = N-2; i >= 0; i--)\n\n if (tallest < x[i]) {\n tallest = x[i];\n count++;\n }\n return count;\n }" (primitive_type) "int" (function_declarator) "countWhoCanSee (int N, int x[])" (identifier) "countWhoCanSee" (parameter_list) "(int N, int x[])" (() "(" (parameter_declaration) "int N" (primitive_type) "int" (identifier) "N" (,) "," (parameter_declaration) "int x[]" (primitive_type) "int" (array_declarator) "x[]" (identifier) "x" ([) "[" (]) "]" ()) ")" (compound_statement) "{\n\n int tallest = x[N-1];\n int count = 1;\n\n/*@ loop invariant -1 <= i < N-1;\n @ loop invariant 1 <= count < N-i;\n @ loop invariant \exists integer j;\n @ i<j<N && tallest==x[j];\n @ loop invariant \forall integer j;\n @ i<j<N ==> tallest >=x[j];\n @ loop invariant how_many(x,i+1,N,count); \n @ loop assigns i,count,tallest;\n @ loop variant i;\n @*/\n\n\n for (int i = N-2; i >= 0; i--)\n\n if (tallest < x[i]) {\n tallest = x[i];\n count++;\n }\n return count;\n }" ({) "{" (declaration) "int tallest = x[N-1];" (primitive_type) "int" (init_declarator) "tallest = x[N-1]" (identifier) "tallest" (=) "=" (subscript_expression) "x[N-1]" (identifier) "x" ([) "[" (binary_expression) "N-1" (identifier) "N" (-) "-" (number_literal) "1" (]) "]" (;) ";" (declaration) "int count = 1;" (primitive_type) "int" (init_declarator) "count = 1" (identifier) "count" (=) "=" (number_literal) "1" (;) ";" (comment) "/*@ loop invariant -1 <= i < N-1;\n @ loop invariant 1 <= count < N-i;\n @ loop invariant \exists integer j;\n @ i<j<N && tallest==x[j];\n @ loop invariant \forall integer j;\n @ i<j<N ==> tallest >=x[j];\n @ loop invariant how_many(x,i+1,N,count); \n @ loop assigns i,count,tallest;\n @ loop variant i;\n @*/" (for_statement) "for (int i = N-2; i >= 0; i--)\n\n if (tallest < x[i]) {\n tallest = x[i];\n count++;\n }" (for) "for" (() "(" (declaration) "int i = N-2;" (primitive_type) "int" (init_declarator) "i = N-2" (identifier) "i" (=) "=" (binary_expression) "N-2" (identifier) "N" (-) "-" (number_literal) "2" (;) ";" (binary_expression) "i >= 0" (identifier) "i" (>=) ">=" (number_literal) "0" (;) ";" (update_expression) "i--" (identifier) "i" (--) "--" ()) ")" (if_statement) "if (tallest < x[i]) {\n tallest = x[i];\n count++;\n }" (if) "if" (parenthesized_expression) "(tallest < x[i])" (() "(" (binary_expression) "tallest < x[i]" (identifier) "tallest" (<) "<" (subscript_expression) "x[i]" (identifier) "x" ([) "[" (identifier) "i" (]) "]" ()) ")" (compound_statement) "{\n tallest = x[i];\n count++;\n }" ({) "{" (expression_statement) "tallest = x[i];" (assignment_expression) "tallest = x[i]" (identifier) "tallest" (=) "=" (subscript_expression) "x[i]" (identifier) "x" ([) "[" (identifier) "i" (]) "]" (;) ";" (expression_statement) "count++;" (update_expression) "count++" (identifier) "count" (++) "++" (;) ";" (}) "}" (return_statement) "return count;" (return) "return" (identifier) "count" (;) ";" (}) "}"
103
0
{"language": "c", "success": true, "metadata": {"lines": 39, "avg_line_length": 28.15, "nodes": 65, "errors": 0, "source_hash": "3827725cc936c2b1dd44458d571305d2c93ee2140620fdc8fbe8af07f0562ca9", "categorized_nodes": 44}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "function_definition", "text": "int countWhoCanSee (int N, int x[])\n\n{\n\n int tallest = x[N-1];\n int count = 1;\n\n/*@ loop invariant -1 <= i < N-1;\n @ loop invariant 1 <= count < N-i;\n @ loop invariant \\exists integer j;\n @ i<j<N && tallest==x[j];\n @ loop invariant \\forall integer j;\n @ i<j<N ==> tallest >=x[j];\n @ loop invariant how_many(x,i+1,N,count); \n @ loop assigns i,count,tallest;\n @ loop variant i;\n @*/\n\n\n for (int i = N-2; i >= 0; i--)\n\n if (tallest < x[i]) {\n tallest = x[i];\n count++;\n }\n return count;\n }", "parent": null, "children": [1, 2], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 46, "column": 2}}, {"id": 1, "type": "primitive_type", "text": "int", "parent": 0, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 3}}, {"id": 2, "type": "function_declarator", "text": "countWhoCanSee (int N, int x[])", "parent": 0, "children": [3, 4], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 35}}, {"id": 3, "type": "identifier", "text": "countWhoCanSee", "parent": 2, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 18}}, {"id": 4, "type": "parameter_list", "text": "(int N, int x[])", "parent": 2, "children": [5, 8], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 35}}, {"id": 5, "type": "parameter_declaration", "text": "int N", "parent": 4, "children": [6, 7], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 25}}, {"id": 6, "type": "primitive_type", "text": "int", "parent": 5, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 23}}, {"id": 7, "type": "identifier", "text": "N", "parent": 5, "children": [], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 25}}, {"id": 8, "type": "parameter_declaration", "text": "int x[]", "parent": 4, "children": [9, 10], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 34}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 30}}, {"id": 10, "type": "array_declarator", "text": "x[]", "parent": 8, "children": [11], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 34}}, {"id": 11, "type": "identifier", "text": "x", "parent": 10, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 32}}, {"id": 12, "type": "declaration", "text": "int tallest = x[N-1];", "parent": 0, "children": [13, 14], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 22}}, {"id": 13, "type": "primitive_type", "text": "int", "parent": 12, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 4}}, {"id": 14, "type": "init_declarator", "text": "tallest = x[N-1]", "parent": 12, "children": [15, 16, 17], "start_point": {"row": 24, "column": 5}, "end_point": {"row": 24, "column": 21}}, {"id": 15, "type": "identifier", "text": "tallest", "parent": 14, "children": [], "start_point": {"row": 24, "column": 5}, "end_point": {"row": 24, "column": 12}}, {"id": 16, "type": "=", "text": "=", "parent": 14, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 14}}, {"id": 17, "type": "subscript_expression", "text": "x[N-1]", "parent": 14, "children": [18, 19], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 21}}, {"id": 18, "type": "identifier", "text": "x", "parent": 17, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 16}}, {"id": 19, "type": "binary_expression", "text": "N-1", "parent": 17, "children": [20, 21, 22], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 20}}, {"id": 20, "type": "identifier", "text": "N", "parent": 19, "children": [], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 18}}, {"id": 21, "type": "-", "text": "-", "parent": 19, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 19}}, {"id": 22, "type": "number_literal", "text": "1", "parent": 19, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 20}}, {"id": 23, "type": "declaration", "text": "int count = 1;", "parent": 0, "children": [24, 25], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 15}}, {"id": 24, "type": "primitive_type", "text": "int", "parent": 23, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 4}}, {"id": 25, "type": "init_declarator", "text": "count = 1", "parent": 23, "children": [26, 27, 28], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 14}}, {"id": 26, "type": "identifier", "text": "count", "parent": 25, "children": [], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 10}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 12}}, {"id": 28, "type": "number_literal", "text": "1", "parent": 25, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 14}}, {"id": 29, "type": "for_statement", "text": "for (int i = N-2; i >= 0; i--)\n\n if (tallest < x[i]) {\n tallest = x[i];\n count++;\n }", "parent": 0, "children": [30, 39, 43, 46], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 44, "column": 2}}, {"id": 30, "type": "declaration", "text": "int i = N-2;", "parent": 29, "children": [31, 32], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 18}}, {"id": 31, "type": "primitive_type", "text": "int", "parent": 30, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 9}}, {"id": 32, "type": "init_declarator", "text": "i = N-2", "parent": 30, "children": [33, 34, 35], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 17}}, {"id": 33, "type": "identifier", "text": "i", "parent": 32, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 11}}, {"id": 34, "type": "=", "text": "=", "parent": 32, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 13}}, {"id": 35, "type": "binary_expression", "text": "N-2", "parent": 32, "children": [36, 37, 38], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 17}}, {"id": 36, "type": "identifier", "text": "N", "parent": 35, "children": [], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 15}}, {"id": 37, "type": "-", "text": "-", "parent": 35, "children": [], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 16}}, {"id": 38, "type": "number_literal", "text": "2", "parent": 35, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 17}}, {"id": 39, "type": "binary_expression", "text": "i >= 0", "parent": 29, "children": [40, 41, 42], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 25}}, {"id": 40, "type": "identifier", "text": "i", "parent": 39, "children": [], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 20}}, {"id": 41, "type": ">=", "text": ">=", "parent": 39, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 23}}, {"id": 42, "type": "number_literal", "text": "0", "parent": 39, "children": [], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 25}}, {"id": 43, "type": "update_expression", "text": "i--", "parent": 29, "children": [44, 45], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 30}}, {"id": 44, "type": "identifier", "text": "i", "parent": 43, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 28}}, {"id": 45, "type": "--", "text": "--", "parent": 43, "children": [], "start_point": {"row": 39, "column": 28}, "end_point": {"row": 39, "column": 30}}, {"id": 46, "type": "if_statement", "text": "if (tallest < x[i]) {\n tallest = x[i];\n count++;\n }", "parent": 29, "children": [47], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 44, "column": 2}}, {"id": 47, "type": "parenthesized_expression", "text": "(tallest < x[i])", "parent": 46, "children": [48], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 20}}, {"id": 48, "type": "binary_expression", "text": "tallest < x[i]", "parent": 47, "children": [49, 50, 51], "start_point": {"row": 41, "column": 5}, "end_point": {"row": 41, "column": 19}}, {"id": 49, "type": "identifier", "text": "tallest", "parent": 48, "children": [], "start_point": {"row": 41, "column": 5}, "end_point": {"row": 41, "column": 12}}, {"id": 50, "type": "<", "text": "<", "parent": 48, "children": [], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 14}}, {"id": 51, "type": "subscript_expression", "text": "x[i]", "parent": 48, "children": [52, 53], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 19}}, {"id": 52, "type": "identifier", "text": "x", "parent": 51, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 16}}, {"id": 53, "type": "identifier", "text": "i", "parent": 51, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 18}}, {"id": 54, "type": "assignment_expression", "text": "tallest = x[i]", "parent": 46, "children": [55, 56, 57], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 15}}, {"id": 55, "type": "identifier", "text": "tallest", "parent": 54, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 8}}, {"id": 56, "type": "=", "text": "=", "parent": 54, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 10}}, {"id": 57, "type": "subscript_expression", "text": "x[i]", "parent": 54, "children": [58, 59], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 15}}, {"id": 58, "type": "identifier", "text": "x", "parent": 57, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 12}}, {"id": 59, "type": "identifier", "text": "i", "parent": 57, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 14}}, {"id": 60, "type": "update_expression", "text": "count++", "parent": 46, "children": [61, 62], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 8}}, {"id": 61, "type": "identifier", "text": "count", "parent": 60, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 6}}, {"id": 62, "type": "++", "text": "++", "parent": 60, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 8}}, {"id": 63, "type": "return_statement", "text": "return count;", "parent": 0, "children": [64], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 14}}, {"id": 64, "type": "identifier", "text": "count", "parent": 63, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 13}}]}, "node_categories": {"declarations": {"functions": [0, 2], "variables": [5, 8, 12, 23, 30], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [17, 19, 35, 39, 43, 47, 48, 51, 57, 60], "assignments": [54], "loops": [29], "conditionals": [3, 7, 11, 15, 18, 20, 26, 33, 36, 40, 44, 46, 49, 52, 53, 55, 58, 59, 61, 64], "returns": [63], "exceptions": []}, "expressions": {"calls": [], "literals": [22, 28, 38, 42], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 0, "universal_type": "function", "name": "countWhoCanSee", "text_snippet": "int countWhoCanSee (int N, int x[])\n\n{\n\n int tallest = x[N-1];\n int count = 1;\n\n/*@ loop invariant -"}, {"node_id": 2, "universal_type": "function", "name": "x[])", "text_snippet": "countWhoCanSee (int N, int x[])"}], "class_declarations": [], "import_statements": []}, "original_source_code": "\n/*@predicate who_is_taller{L}(int *x,integer j, integer last)=\n @ \\forall integer i; j < i < last ==> x[j] > x[i];\n @\n*/\n\n/*@ predicate how_many{L}(int *x, integer counter, integer size,integer cnt) =\n @ (counter < size) ? \n @ (who_is_taller(x,counter,size))? how_many(x,counter+1,size,cnt-1)\n @ : how_many(x,counter+1,size,cnt)\n @ : cnt == 0;\n @*/\n\n\n/*@ requires 0< N <= 1000000 ;\n @ requires \\valid(x+(0..N-1));\n @ requires \\forall integer i; \n\t0 <= i <= N-1 ==> 0< x[i] <= 1000000;\n @ ensures how_many(x,0,N,\\result);\n @*/\nint countWhoCanSee (int N, int x[])\n\n{\n\n int tallest = x[N-1];\n int count = 1;\n\n/*@ loop invariant -1 <= i < N-1;\n @ loop invariant 1 <= count < N-i;\n @ loop invariant \\exists integer j;\n @ i<j<N && tallest==x[j];\n @ loop invariant \\forall integer j;\n @ i<j<N ==> tallest >=x[j];\n @ loop invariant how_many(x,i+1,N,count); \n @ loop assigns i,count,tallest;\n @ loop variant i;\n @*/\n\n\n for (int i = N-2; i >= 0; i--)\n\n if (tallest < x[i]) {\n tallest = x[i];\n count++;\n }\n return count;\n }\n"}
382
c
#ifndef __OS_LINUX_H__ #define __OS_LINUX_H__ #include "download.h" void qdl_flush_fifo(int fd, int tx_flush, int rx_flush,int rx_tcp_flag); int openport(int ioflush); int closeport(); int WriteABuffer(int file, const unsigned char * lpBuf, int dwToWrite); int ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout = 2); void show_log(char *msg, ...); void qdl_sleep(int millsec); int qdl_pre_download(download_context *pQdlContext); void qdl_post_download(download_context *pQdlContext, int result); int qdl_start_download(download_context *pQdlContext); extern int g_default_port; extern int endian_flag; #endif /*TARGET_OS_LINUX*/
31.29
21
(translation_unit) "#ifndef __OS_LINUX_H__ \n#define __OS_LINUX_H__ \n#include "download.h" \n \nvoid qdl_flush_fifo(int fd, int tx_flush, int rx_flush,int rx_tcp_flag); \n \nint openport(int ioflush); \nint closeport(); \nint WriteABuffer(int file, const unsigned char * lpBuf, int dwToWrite); \nint ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout = 2); \n \n \nvoid show_log(char *msg, ...); \nvoid qdl_sleep(int millsec); \nint qdl_pre_download(download_context *pQdlContext); \nvoid qdl_post_download(download_context *pQdlContext, int result); \nint qdl_start_download(download_context *pQdlContext); \nextern int g_default_port; \nextern int endian_flag; \n \n#endif /*TARGET_OS_LINUX*/ \n \n" (preproc_ifdef) "#ifndef __OS_LINUX_H__ \n#define __OS_LINUX_H__ \n#include "download.h" \n \nvoid qdl_flush_fifo(int fd, int tx_flush, int rx_flush,int rx_tcp_flag); \n \nint openport(int ioflush); \nint closeport(); \nint WriteABuffer(int file, const unsigned char * lpBuf, int dwToWrite); \nint ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout = 2); \n \n \nvoid show_log(char *msg, ...); \nvoid qdl_sleep(int millsec); \nint qdl_pre_download(download_context *pQdlContext); \nvoid qdl_post_download(download_context *pQdlContext, int result); \nint qdl_start_download(download_context *pQdlContext); \nextern int g_default_port; \nextern int endian_flag; \n \n#endif" (#ifndef) "#ifndef" (identifier) "__OS_LINUX_H__" (preproc_def) "#define __OS_LINUX_H__ \n" (#define) "#define" (identifier) "__OS_LINUX_H__" (preproc_include) "#include "download.h" \n" (#include) "#include" (string_literal) ""download.h"" (") """ (string_content) "download.h" (") """ (declaration) "void qdl_flush_fifo(int fd, int tx_flush, int rx_flush,int rx_tcp_flag);" (primitive_type) "void" (function_declarator) "qdl_flush_fifo(int fd, int tx_flush, int rx_flush,int rx_tcp_flag)" (identifier) "qdl_flush_fifo" (parameter_list) "(int fd, int tx_flush, int rx_flush,int rx_tcp_flag)" (() "(" (parameter_declaration) "int fd" (primitive_type) "int" (identifier) "fd" (,) "," (parameter_declaration) "int tx_flush" (primitive_type) "int" (identifier) "tx_flush" (,) "," (parameter_declaration) "int rx_flush" (primitive_type) "int" (identifier) "rx_flush" (,) "," (parameter_declaration) "int rx_tcp_flag" (primitive_type) "int" (identifier) "rx_tcp_flag" ()) ")" (;) ";" (declaration) "int openport(int ioflush);" (primitive_type) "int" (function_declarator) "openport(int ioflush)" (identifier) "openport" (parameter_list) "(int ioflush)" (() "(" (parameter_declaration) "int ioflush" (primitive_type) "int" (identifier) "ioflush" ()) ")" (;) ";" (declaration) "int closeport();" (primitive_type) "int" (function_declarator) "closeport()" (identifier) "closeport" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int WriteABuffer(int file, const unsigned char * lpBuf, int dwToWrite);" (primitive_type) "int" (function_declarator) "WriteABuffer(int file, const unsigned char * lpBuf, int dwToWrite)" (identifier) "WriteABuffer" (parameter_list) "(int file, const unsigned char * lpBuf, int dwToWrite)" (() "(" (parameter_declaration) "int file" (primitive_type) "int" (identifier) "file" (,) "," (parameter_declaration) "const unsigned char * lpBuf" (type_qualifier) "const" (const) "const" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "* lpBuf" (*) "*" (identifier) "lpBuf" (,) "," (parameter_declaration) "int dwToWrite" (primitive_type) "int" (identifier) "dwToWrite" ()) ")" (;) ";" (declaration) "int ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout = 2);" (primitive_type) "int" (init_declarator) "ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout = 2" (function_declarator) "ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout" (identifier) "ReadABuffer" (parameter_list) "(int file, unsigned char * lpBuf, int dwToRead, int timeout" (() "(" (parameter_declaration) "int file" (primitive_type) "int" (identifier) "file" (,) "," (parameter_declaration) "unsigned char * lpBuf" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "* lpBuf" (*) "*" (identifier) "lpBuf" (,) "," (parameter_declaration) "int dwToRead" (primitive_type) "int" (identifier) "dwToRead" (,) "," (parameter_declaration) "int timeout" (primitive_type) "int" (identifier) "timeout" ()) "" (=) "=" (number_literal) "2" (ERROR) ")" ()) ")" (;) ";" (declaration) "void show_log(char *msg, ...);" (primitive_type) "void" (function_declarator) "show_log(char *msg, ...)" (identifier) "show_log" (parameter_list) "(char *msg, ...)" (() "(" (parameter_declaration) "char *msg" (primitive_type) "char" (pointer_declarator) "*msg" (*) "*" (identifier) "msg" (,) "," (variadic_parameter) "..." (...) "..." ()) ")" (;) ";" (declaration) "void qdl_sleep(int millsec);" (primitive_type) "void" (function_declarator) "qdl_sleep(int millsec)" (identifier) "qdl_sleep" (parameter_list) "(int millsec)" (() "(" (parameter_declaration) "int millsec" (primitive_type) "int" (identifier) "millsec" ()) ")" (;) ";" (declaration) "int qdl_pre_download(download_context *pQdlContext);" (primitive_type) "int" (function_declarator) "qdl_pre_download(download_context *pQdlContext)" (identifier) "qdl_pre_download" (parameter_list) "(download_context *pQdlContext)" (() "(" (parameter_declaration) "download_context *pQdlContext" (type_identifier) "download_context" (pointer_declarator) "*pQdlContext" (*) "*" (identifier) "pQdlContext" ()) ")" (;) ";" (declaration) "void qdl_post_download(download_context *pQdlContext, int result);" (primitive_type) "void" (function_declarator) "qdl_post_download(download_context *pQdlContext, int result)" (identifier) "qdl_post_download" (parameter_list) "(download_context *pQdlContext, int result)" (() "(" (parameter_declaration) "download_context *pQdlContext" (type_identifier) "download_context" (pointer_declarator) "*pQdlContext" (*) "*" (identifier) "pQdlContext" (,) "," (parameter_declaration) "int result" (primitive_type) "int" (identifier) "result" ()) ")" (;) ";" (declaration) "int qdl_start_download(download_context *pQdlContext);" (primitive_type) "int" (function_declarator) "qdl_start_download(download_context *pQdlContext)" (identifier) "qdl_start_download" (parameter_list) "(download_context *pQdlContext)" (() "(" (parameter_declaration) "download_context *pQdlContext" (type_identifier) "download_context" (pointer_declarator) "*pQdlContext" (*) "*" (identifier) "pQdlContext" ()) ")" (;) ";" (declaration) "extern int g_default_port;" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "int" (identifier) "g_default_port" (;) ";" (declaration) "extern int endian_flag;" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "int" (identifier) "endian_flag" (;) ";" (#endif) "#endif" (comment) "/*TARGET_OS_LINUX*/"
196
1
{"language": "c", "success": true, "metadata": {"lines": 21, "avg_line_length": 31.29, "nodes": 143, "errors": 0, "source_hash": "cdbaf259d3e38af825f3dfd8bef3d4fb987ecd65ab87cbc45ff7c487e760fe85", "categorized_nodes": 86}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __OS_LINUX_H__\r\n#define __OS_LINUX_H__\r\n#include \"download.h\"\r\n\r\nvoid qdl_flush_fifo(int fd, int tx_flush, int rx_flush,int rx_tcp_flag);\r\n\r\nint openport(int ioflush);\r\nint closeport();\r\nint WriteABuffer(int file, const unsigned char * lpBuf, int dwToWrite);\r\nint ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout = 2);\r\n\r\n\r\nvoid show_log(char *msg, ...);\r\nvoid qdl_sleep(int millsec);\r\nint qdl_pre_download(download_context *pQdlContext);\r\nvoid qdl_post_download(download_context *pQdlContext, int result);\r\nint qdl_start_download(download_context *pQdlContext);\r\nextern int g_default_port;\r\nextern int endian_flag;\r\n\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 26, 34, 39, 57, 81, 91, 99, 109, 122, 132, 137, 142], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 20, "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": "__OS_LINUX_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define __OS_LINUX_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": "__OS_LINUX_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include \"download.h\"\r\n", "parent": 0, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"download.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 21}}, {"id": 9, "type": "declaration", "text": "void qdl_flush_fifo(int fd, int tx_flush, int rx_flush,int rx_tcp_flag);", "parent": 0, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 72}}, {"id": 10, "type": "primitive_type", "text": "void", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 4}}, {"id": 11, "type": "function_declarator", "text": "qdl_flush_fifo(int fd, int tx_flush, int rx_flush,int rx_tcp_flag)", "parent": 9, "children": [12, 13], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 71}}, {"id": 12, "type": "identifier", "text": "qdl_flush_fifo", "parent": 11, "children": [], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 19}}, {"id": 13, "type": "parameter_list", "text": "(int fd, int tx_flush, int rx_flush,int rx_tcp_flag)", "parent": 11, "children": [14, 17, 20, 23], "start_point": {"row": 4, "column": 19}, "end_point": {"row": 4, "column": 71}}, {"id": 14, "type": "parameter_declaration", "text": "int fd", "parent": 13, "children": [15, 16], "start_point": {"row": 4, "column": 20}, "end_point": {"row": 4, "column": 26}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 4, "column": 20}, "end_point": {"row": 4, "column": 23}}, {"id": 16, "type": "identifier", "text": "fd", "parent": 14, "children": [], "start_point": {"row": 4, "column": 24}, "end_point": {"row": 4, "column": 26}}, {"id": 17, "type": "parameter_declaration", "text": "int tx_flush", "parent": 13, "children": [18, 19], "start_point": {"row": 4, "column": 28}, "end_point": {"row": 4, "column": 40}}, {"id": 18, "type": "primitive_type", "text": "int", "parent": 17, "children": [], "start_point": {"row": 4, "column": 28}, "end_point": {"row": 4, "column": 31}}, {"id": 19, "type": "identifier", "text": "tx_flush", "parent": 17, "children": [], "start_point": {"row": 4, "column": 32}, "end_point": {"row": 4, "column": 40}}, {"id": 20, "type": "parameter_declaration", "text": "int rx_flush", "parent": 13, "children": [21, 22], "start_point": {"row": 4, "column": 42}, "end_point": {"row": 4, "column": 54}}, {"id": 21, "type": "primitive_type", "text": "int", "parent": 20, "children": [], "start_point": {"row": 4, "column": 42}, "end_point": {"row": 4, "column": 45}}, {"id": 22, "type": "identifier", "text": "rx_flush", "parent": 20, "children": [], "start_point": {"row": 4, "column": 46}, "end_point": {"row": 4, "column": 54}}, {"id": 23, "type": "parameter_declaration", "text": "int rx_tcp_flag", "parent": 13, "children": [24, 25], "start_point": {"row": 4, "column": 55}, "end_point": {"row": 4, "column": 70}}, {"id": 24, "type": "primitive_type", "text": "int", "parent": 23, "children": [], "start_point": {"row": 4, "column": 55}, "end_point": {"row": 4, "column": 58}}, {"id": 25, "type": "identifier", "text": "rx_tcp_flag", "parent": 23, "children": [], "start_point": {"row": 4, "column": 59}, "end_point": {"row": 4, "column": 70}}, {"id": 26, "type": "declaration", "text": "int openport(int ioflush);", "parent": 0, "children": [27, 28], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 26}}, {"id": 27, "type": "primitive_type", "text": "int", "parent": 26, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 3}}, {"id": 28, "type": "function_declarator", "text": "openport(int ioflush)", "parent": 26, "children": [29, 30], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 25}}, {"id": 29, "type": "identifier", "text": "openport", "parent": 28, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 12}}, {"id": 30, "type": "parameter_list", "text": "(int ioflush)", "parent": 28, "children": [31], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 25}}, {"id": 31, "type": "parameter_declaration", "text": "int ioflush", "parent": 30, "children": [32, 33], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 24}}, {"id": 32, "type": "primitive_type", "text": "int", "parent": 31, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 16}}, {"id": 33, "type": "identifier", "text": "ioflush", "parent": 31, "children": [], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 24}}, {"id": 34, "type": "declaration", "text": "int closeport();", "parent": 0, "children": [35, 36], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 16}}, {"id": 35, "type": "primitive_type", "text": "int", "parent": 34, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 3}}, {"id": 36, "type": "function_declarator", "text": "closeport()", "parent": 34, "children": [37, 38], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 15}}, {"id": 37, "type": "identifier", "text": "closeport", "parent": 36, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 13}}, {"id": 38, "type": "parameter_list", "text": "()", "parent": 36, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 15}}, {"id": 39, "type": "declaration", "text": "int WriteABuffer(int file, const unsigned char * lpBuf, int dwToWrite);", "parent": 0, "children": [40, 41], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 71}}, {"id": 40, "type": "primitive_type", "text": "int", "parent": 39, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 3}}, {"id": 41, "type": "function_declarator", "text": "WriteABuffer(int file, const unsigned char * lpBuf, int dwToWrite)", "parent": 39, "children": [42, 43], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 70}}, {"id": 42, "type": "identifier", "text": "WriteABuffer", "parent": 41, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 16}}, {"id": 43, "type": "parameter_list", "text": "(int file, const unsigned char * lpBuf, int dwToWrite)", "parent": 41, "children": [44, 47, 54], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 70}}, {"id": 44, "type": "parameter_declaration", "text": "int file", "parent": 43, "children": [45, 46], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 25}}, {"id": 45, "type": "primitive_type", "text": "int", "parent": 44, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 20}}, {"id": 46, "type": "identifier", "text": "file", "parent": 44, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 25}}, {"id": 47, "type": "parameter_declaration", "text": "const unsigned char * lpBuf", "parent": 43, "children": [48, 51], "start_point": {"row": 8, "column": 27}, "end_point": {"row": 8, "column": 54}}, {"id": 48, "type": "sized_type_specifier", "text": "unsigned char", "parent": 47, "children": [49, 50], "start_point": {"row": 8, "column": 33}, "end_point": {"row": 8, "column": 46}}, {"id": 49, "type": "unsigned", "text": "unsigned", "parent": 48, "children": [], "start_point": {"row": 8, "column": 33}, "end_point": {"row": 8, "column": 41}}, {"id": 50, "type": "primitive_type", "text": "char", "parent": 48, "children": [], "start_point": {"row": 8, "column": 42}, "end_point": {"row": 8, "column": 46}}, {"id": 51, "type": "pointer_declarator", "text": "* lpBuf", "parent": 47, "children": [52, 53], "start_point": {"row": 8, "column": 47}, "end_point": {"row": 8, "column": 54}}, {"id": 52, "type": "*", "text": "*", "parent": 51, "children": [], "start_point": {"row": 8, "column": 47}, "end_point": {"row": 8, "column": 48}}, {"id": 53, "type": "identifier", "text": "lpBuf", "parent": 51, "children": [], "start_point": {"row": 8, "column": 49}, "end_point": {"row": 8, "column": 54}}, {"id": 54, "type": "parameter_declaration", "text": "int dwToWrite", "parent": 43, "children": [55, 56], "start_point": {"row": 8, "column": 56}, "end_point": {"row": 8, "column": 69}}, {"id": 55, "type": "primitive_type", "text": "int", "parent": 54, "children": [], "start_point": {"row": 8, "column": 56}, "end_point": {"row": 8, "column": 59}}, {"id": 56, "type": "identifier", "text": "dwToWrite", "parent": 54, "children": [], "start_point": {"row": 8, "column": 60}, "end_point": {"row": 8, "column": 69}}, {"id": 57, "type": "declaration", "text": "int ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout = 2);", "parent": 0, "children": [58, 59], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 80}}, {"id": 58, "type": "primitive_type", "text": "int", "parent": 57, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 3}}, {"id": 59, "type": "init_declarator", "text": "ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout = 2", "parent": 57, "children": [60, 79, 80], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 78}}, {"id": 60, "type": "function_declarator", "text": "ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout", "parent": 59, "children": [61, 62], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 74}}, {"id": 61, "type": "identifier", "text": "ReadABuffer", "parent": 60, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 15}}, {"id": 62, "type": "parameter_list", "text": "(int file, unsigned char * lpBuf, int dwToRead, int timeout", "parent": 60, "children": [63, 66, 73, 76], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 74}}, {"id": 63, "type": "parameter_declaration", "text": "int file", "parent": 62, "children": [64, 65], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 24}}, {"id": 64, "type": "primitive_type", "text": "int", "parent": 63, "children": [], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 19}}, {"id": 65, "type": "identifier", "text": "file", "parent": 63, "children": [], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 24}}, {"id": 66, "type": "parameter_declaration", "text": "unsigned char * lpBuf", "parent": 62, "children": [67, 70], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 47}}, {"id": 67, "type": "sized_type_specifier", "text": "unsigned char", "parent": 66, "children": [68, 69], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 39}}, {"id": 68, "type": "unsigned", "text": "unsigned", "parent": 67, "children": [], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 34}}, {"id": 69, "type": "primitive_type", "text": "char", "parent": 67, "children": [], "start_point": {"row": 9, "column": 35}, "end_point": {"row": 9, "column": 39}}, {"id": 70, "type": "pointer_declarator", "text": "* lpBuf", "parent": 66, "children": [71, 72], "start_point": {"row": 9, "column": 40}, "end_point": {"row": 9, "column": 47}}, {"id": 71, "type": "*", "text": "*", "parent": 70, "children": [], "start_point": {"row": 9, "column": 40}, "end_point": {"row": 9, "column": 41}}, {"id": 72, "type": "identifier", "text": "lpBuf", "parent": 70, "children": [], "start_point": {"row": 9, "column": 42}, "end_point": {"row": 9, "column": 47}}, {"id": 73, "type": "parameter_declaration", "text": "int dwToRead", "parent": 62, "children": [74, 75], "start_point": {"row": 9, "column": 49}, "end_point": {"row": 9, "column": 61}}, {"id": 74, "type": "primitive_type", "text": "int", "parent": 73, "children": [], "start_point": {"row": 9, "column": 49}, "end_point": {"row": 9, "column": 52}}, {"id": 75, "type": "identifier", "text": "dwToRead", "parent": 73, "children": [], "start_point": {"row": 9, "column": 53}, "end_point": {"row": 9, "column": 61}}, {"id": 76, "type": "parameter_declaration", "text": "int timeout", "parent": 62, "children": [77, 78], "start_point": {"row": 9, "column": 63}, "end_point": {"row": 9, "column": 74}}, {"id": 77, "type": "primitive_type", "text": "int", "parent": 76, "children": [], "start_point": {"row": 9, "column": 63}, "end_point": {"row": 9, "column": 66}}, {"id": 78, "type": "identifier", "text": "timeout", "parent": 76, "children": [], "start_point": {"row": 9, "column": 67}, "end_point": {"row": 9, "column": 74}}, {"id": 79, "type": "=", "text": "=", "parent": 59, "children": [], "start_point": {"row": 9, "column": 75}, "end_point": {"row": 9, "column": 76}}, {"id": 80, "type": "number_literal", "text": "2", "parent": 59, "children": [], "start_point": {"row": 9, "column": 77}, "end_point": {"row": 9, "column": 78}}, {"id": 81, "type": "declaration", "text": "void show_log(char *msg, ...);", "parent": 0, "children": [82, 83], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 30}}, {"id": 82, "type": "primitive_type", "text": "void", "parent": 81, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 4}}, {"id": 83, "type": "function_declarator", "text": "show_log(char *msg, ...)", "parent": 81, "children": [84, 85], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 29}}, {"id": 84, "type": "identifier", "text": "show_log", "parent": 83, "children": [], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 13}}, {"id": 85, "type": "parameter_list", "text": "(char *msg, ...)", "parent": 83, "children": [86], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 29}}, {"id": 86, "type": "parameter_declaration", "text": "char *msg", "parent": 85, "children": [87, 88], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 23}}, {"id": 87, "type": "primitive_type", "text": "char", "parent": 86, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 18}}, {"id": 88, "type": "pointer_declarator", "text": "*msg", "parent": 86, "children": [89, 90], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 23}}, {"id": 89, "type": "*", "text": "*", "parent": 88, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 20}}, {"id": 90, "type": "identifier", "text": "msg", "parent": 88, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 23}}, {"id": 91, "type": "declaration", "text": "void qdl_sleep(int millsec);", "parent": 0, "children": [92, 93], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 28}}, {"id": 92, "type": "primitive_type", "text": "void", "parent": 91, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 4}}, {"id": 93, "type": "function_declarator", "text": "qdl_sleep(int millsec)", "parent": 91, "children": [94, 95], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 27}}, {"id": 94, "type": "identifier", "text": "qdl_sleep", "parent": 93, "children": [], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 14}}, {"id": 95, "type": "parameter_list", "text": "(int millsec)", "parent": 93, "children": [96], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 27}}, {"id": 96, "type": "parameter_declaration", "text": "int millsec", "parent": 95, "children": [97, 98], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 26}}, {"id": 97, "type": "primitive_type", "text": "int", "parent": 96, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 18}}, {"id": 98, "type": "identifier", "text": "millsec", "parent": 96, "children": [], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 26}}, {"id": 99, "type": "declaration", "text": "int qdl_pre_download(download_context *pQdlContext);", "parent": 0, "children": [100, 101], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 52}}, {"id": 100, "type": "primitive_type", "text": "int", "parent": 99, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 3}}, {"id": 101, "type": "function_declarator", "text": "qdl_pre_download(download_context *pQdlContext)", "parent": 99, "children": [102, 103], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 51}}, {"id": 102, "type": "identifier", "text": "qdl_pre_download", "parent": 101, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 20}}, {"id": 103, "type": "parameter_list", "text": "(download_context *pQdlContext)", "parent": 101, "children": [104], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 51}}, {"id": 104, "type": "parameter_declaration", "text": "download_context *pQdlContext", "parent": 103, "children": [105, 106], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 50}}, {"id": 105, "type": "type_identifier", "text": "download_context", "parent": 104, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 37}}, {"id": 106, "type": "pointer_declarator", "text": "*pQdlContext", "parent": 104, "children": [107, 108], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 50}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 39}}, {"id": 108, "type": "identifier", "text": "pQdlContext", "parent": 106, "children": [], "start_point": {"row": 14, "column": 39}, "end_point": {"row": 14, "column": 50}}, {"id": 109, "type": "declaration", "text": "void qdl_post_download(download_context *pQdlContext, int result);", "parent": 0, "children": [110, 111], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 66}}, {"id": 110, "type": "primitive_type", "text": "void", "parent": 109, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 4}}, {"id": 111, "type": "function_declarator", "text": "qdl_post_download(download_context *pQdlContext, int result)", "parent": 109, "children": [112, 113], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 65}}, {"id": 112, "type": "identifier", "text": "qdl_post_download", "parent": 111, "children": [], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 22}}, {"id": 113, "type": "parameter_list", "text": "(download_context *pQdlContext, int result)", "parent": 111, "children": [114, 119], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 65}}, {"id": 114, "type": "parameter_declaration", "text": "download_context *pQdlContext", "parent": 113, "children": [115, 116], "start_point": {"row": 15, "column": 23}, "end_point": {"row": 15, "column": 52}}, {"id": 115, "type": "type_identifier", "text": "download_context", "parent": 114, "children": [], "start_point": {"row": 15, "column": 23}, "end_point": {"row": 15, "column": 39}}, {"id": 116, "type": "pointer_declarator", "text": "*pQdlContext", "parent": 114, "children": [117, 118], "start_point": {"row": 15, "column": 40}, "end_point": {"row": 15, "column": 52}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 15, "column": 40}, "end_point": {"row": 15, "column": 41}}, {"id": 118, "type": "identifier", "text": "pQdlContext", "parent": 116, "children": [], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 52}}, {"id": 119, "type": "parameter_declaration", "text": "int result", "parent": 113, "children": [120, 121], "start_point": {"row": 15, "column": 54}, "end_point": {"row": 15, "column": 64}}, {"id": 120, "type": "primitive_type", "text": "int", "parent": 119, "children": [], "start_point": {"row": 15, "column": 54}, "end_point": {"row": 15, "column": 57}}, {"id": 121, "type": "identifier", "text": "result", "parent": 119, "children": [], "start_point": {"row": 15, "column": 58}, "end_point": {"row": 15, "column": 64}}, {"id": 122, "type": "declaration", "text": "int qdl_start_download(download_context *pQdlContext);", "parent": 0, "children": [123, 124], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 55}}, {"id": 123, "type": "primitive_type", "text": "int", "parent": 122, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 3}}, {"id": 124, "type": "function_declarator", "text": "qdl_start_download(download_context *pQdlContext)", "parent": 122, "children": [125, 126], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 54}}, {"id": 125, "type": "identifier", "text": "qdl_start_download", "parent": 124, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 23}}, {"id": 126, "type": "parameter_list", "text": "(download_context *pQdlContext)", "parent": 124, "children": [127], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 54}}, {"id": 127, "type": "parameter_declaration", "text": "download_context *pQdlContext", "parent": 126, "children": [128, 129], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 53}}, {"id": 128, "type": "type_identifier", "text": "download_context", "parent": 127, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 40}}, {"id": 129, "type": "pointer_declarator", "text": "*pQdlContext", "parent": 127, "children": [130, 131], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 53}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 42}}, {"id": 131, "type": "identifier", "text": "pQdlContext", "parent": 129, "children": [], "start_point": {"row": 16, "column": 42}, "end_point": {"row": 16, "column": 53}}, {"id": 132, "type": "declaration", "text": "extern int g_default_port;", "parent": 0, "children": [133, 135, 136], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 26}}, {"id": 133, "type": "storage_class_specifier", "text": "extern", "parent": 132, "children": [134], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 134, "type": "extern", "text": "extern", "parent": 133, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 135, "type": "primitive_type", "text": "int", "parent": 132, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 10}}, {"id": 136, "type": "identifier", "text": "g_default_port", "parent": 132, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 25}}, {"id": 137, "type": "declaration", "text": "extern int endian_flag;", "parent": 0, "children": [138, 140, 141], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 23}}, {"id": 138, "type": "storage_class_specifier", "text": "extern", "parent": 137, "children": [139], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 139, "type": "extern", "text": "extern", "parent": 138, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 140, "type": "primitive_type", "text": "int", "parent": 137, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 10}}, {"id": 141, "type": "identifier", "text": "endian_flag", "parent": 137, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 22}}, {"id": 142, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}]}, "node_categories": {"declarations": {"functions": [11, 28, 36, 41, 60, 83, 93, 101, 111, 124], "variables": [9, 14, 17, 20, 23, 26, 31, 34, 39, 44, 47, 54, 57, 63, 66, 73, 76, 81, 86, 91, 96, 99, 104, 109, 114, 119, 122, 127, 132, 137], "classes": [133, 138], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 12, 16, 19, 22, 25, 29, 33, 37, 42, 46, 48, 53, 56, 61, 65, 67, 72, 75, 78, 84, 90, 94, 98, 102, 105, 108, 112, 115, 118, 121, 125, 128, 131, 136, 141, 142], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 80], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 11, "universal_type": "function", "name": "tx_flush,", "text_snippet": "qdl_flush_fifo(int fd, int tx_flush, int rx_flush,int rx_tcp_flag)"}, {"node_id": 28, "universal_type": "function", "name": "unknown", "text_snippet": "openport(int ioflush)"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "closeport()"}, {"node_id": 41, "universal_type": "function", "name": "dwToWrite)", "text_snippet": "WriteABuffer(int file, const unsigned char * lpBuf, int dwToWrite)"}, {"node_id": 60, "universal_type": "function", "name": "dwToRead,", "text_snippet": "ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout"}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "show_log(char *msg, ...)"}, {"node_id": 93, "universal_type": "function", "name": "unknown", "text_snippet": "qdl_sleep(int millsec)"}, {"node_id": 101, "universal_type": "function", "name": "unknown", "text_snippet": "qdl_pre_download(download_context *pQdlContext)"}, {"node_id": 111, "universal_type": "function", "name": "result)", "text_snippet": "qdl_post_download(download_context *pQdlContext, int result)"}, {"node_id": 124, "universal_type": "function", "name": "unknown", "text_snippet": "qdl_start_download(download_context *pQdlContext)"}], "class_declarations": [{"node_id": 133, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 138, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 6, "text": "#include \"download.h\"\r\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef __OS_LINUX_H__\r\n#define __OS_LINUX_H__\r\n#include \"download.h\"\r\n\r\nvoid qdl_flush_fifo(int fd, int tx_flush, int rx_flush,int rx_tcp_flag);\r\n\r\nint openport(int ioflush);\r\nint closeport();\r\nint WriteABuffer(int file, const unsigned char * lpBuf, int dwToWrite);\r\nint ReadABuffer(int file, unsigned char * lpBuf, int dwToRead, int timeout = 2);\r\n\r\n\r\nvoid show_log(char *msg, ...);\r\nvoid qdl_sleep(int millsec);\r\nint qdl_pre_download(download_context *pQdlContext);\r\nvoid qdl_post_download(download_context *pQdlContext, int result);\r\nint qdl_start_download(download_context *pQdlContext);\r\nextern int g_default_port;\r\nextern int endian_flag;\r\n\r\n#endif /*TARGET_OS_LINUX*/\r\n\r\n"}
383
c
/* Copyright 2016. The Regents of the University of California. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2016 <NAME> <<EMAIL>> */ #include <stdlib.h> #include <complex.h> #include "num/flpmath.h" #include "num/multind.h" #include "misc/debug.h" #include "misc/misc.h" #include "misc/mri.h" #include "utest.h" static bool test_pattern_flags(unsigned int D, const long dims[D], unsigned int flags, const complex float* in, const complex float* ref) { long odims[D]; md_select_dims(D, ~flags, odims, dims); complex float* out = md_alloc(D, odims, CFL_SIZE); estimate_pattern(D, dims, flags, out, in); bool ret = (md_znrmse(D, odims, ref, out) < UT_TOL); md_free(out); return ret; } static bool test_pattern(void) { const complex float in[1][5][3] = { { { 3., 0., 0. }, { 0., 2., 0. }, { .2, 0., 0. }, { 0., 0., 0. }, { 0., 2., 0. }, } }; const complex float ref0[1][5][3] = { { { 1., 0., 0. }, { 0., 1., 0. }, { 1., 0., 0. }, { 0., 0., 0. }, { 0., 1., 0. }, } }; const complex float ref2[1][1][3] = { { { 1., 1., 0. }, } }; const complex float ref3[1][1][1] = { { { 1. }, } }; long idims[3] = { 3, 5, 1 }; return (test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && test_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) && test_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0])); } UT_REGISTER_TEST(test_pattern);
24.76
58
(translation_unit) "/* Copyright 2016. The Regents of the University of California.\n * All rights reserved. Use of this source code is governed by\n * a BSD-style license which can be found in the LICENSE file.\n *\n * Authors:\n * 2016 <NAME> <<EMAIL>>\n */\n\n#include <stdlib.h>\n#include <complex.h>\n\n#include "num/flpmath.h"\n#include "num/multind.h"\n\n#include "misc/debug.h"\n#include "misc/misc.h"\n#include "misc/mri.h"\n\n#include "utest.h"\n\n\nstatic bool test_pattern_flags(unsigned int D, const long dims[D], unsigned int flags, const complex float* in, const complex float* ref)\n{\n long odims[D];\n md_select_dims(D, ~flags, odims, dims);\n\n complex float* out = md_alloc(D, odims, CFL_SIZE);\n\n estimate_pattern(D, dims, flags, out, in);\n\n bool ret = (md_znrmse(D, odims, ref, out) < UT_TOL);\n\n md_free(out);\n\n return ret;\n}\n\n\nstatic bool test_pattern(void)\n{\n const complex float in[1][5][3] = { {\n\n { 3., 0., 0. },\n { 0., 2., 0. },\n { .2, 0., 0. },\n { 0., 0., 0. },\n { 0., 2., 0. },\n } };\n\n\n const complex float ref0[1][5][3] = { {\n\n { 1., 0., 0. },\n { 0., 1., 0. },\n { 1., 0., 0. },\n { 0., 0., 0. },\n { 0., 1., 0. },\n } };\n\n const complex float ref2[1][1][3] = { {\n\n { 1., 1., 0. },\n } };\n\n const complex float ref3[1][1][1] = { {\n\n { 1. },\n } };\n\n long idims[3] = { 3, 5, 1 };\n\n\n return (test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n test_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) &&\n test_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0]));\n}\n\n\nUT_REGISTER_TEST(test_pattern);\n\n" (comment) "/* Copyright 2016. The Regents of the University of California.\n * All rights reserved. Use of this source code is governed by\n * a BSD-style license which can be found in the LICENSE file.\n *\n * Authors:\n * 2016 <NAME> <<EMAIL>>\n */" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <complex.h>\n" (#include) "#include" (system_lib_string) "<complex.h>" (preproc_include) "#include "num/flpmath.h"\n" (#include) "#include" (string_literal) ""num/flpmath.h"" (") """ (string_content) "num/flpmath.h" (") """ (preproc_include) "#include "num/multind.h"\n" (#include) "#include" (string_literal) ""num/multind.h"" (") """ (string_content) "num/multind.h" (") """ (preproc_include) "#include "misc/debug.h"\n" (#include) "#include" (string_literal) ""misc/debug.h"" (") """ (string_content) "misc/debug.h" (") """ (preproc_include) "#include "misc/misc.h"\n" (#include) "#include" (string_literal) ""misc/misc.h"" (") """ (string_content) "misc/misc.h" (") """ (preproc_include) "#include "misc/mri.h"\n" (#include) "#include" (string_literal) ""misc/mri.h"" (") """ (string_content) "misc/mri.h" (") """ (preproc_include) "#include "utest.h"\n" (#include) "#include" (string_literal) ""utest.h"" (") """ (string_content) "utest.h" (") """ (function_definition) "static bool test_pattern_flags(unsigned int D, const long dims[D], unsigned int flags, const complex float* in, const complex float* ref)\n{\n long odims[D];\n md_select_dims(D, ~flags, odims, dims);\n\n complex float* out = md_alloc(D, odims, CFL_SIZE);\n\n estimate_pattern(D, dims, flags, out, in);\n\n bool ret = (md_znrmse(D, odims, ref, out) < UT_TOL);\n\n md_free(out);\n\n return ret;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "test_pattern_flags(unsigned int D, const long dims[D], unsigned int flags, const complex float* in, const complex float* ref)" (identifier) "test_pattern_flags" (parameter_list) "(unsigned int D, const long dims[D], unsigned int flags, const complex float* in, const complex float* ref)" (() "(" (parameter_declaration) "unsigned int D" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "D" (,) "," (parameter_declaration) "const long dims[D]" (type_qualifier) "const" (const) "const" (sized_type_specifier) "long" (long) "long" (array_declarator) "dims[D]" (identifier) "dims" ([) "[" (identifier) "D" (]) "]" (,) "," (parameter_declaration) "unsigned int flags" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "flags" (,) "," (parameter_declaration) "const complex float* in" (type_qualifier) "const" (const) "const" (type_identifier) "complex" (ERROR) "float" (identifier) "float" (pointer_declarator) "* in" (*) "*" (identifier) "in" (,) "," (parameter_declaration) "const complex float* ref" (type_qualifier) "const" (const) "const" (type_identifier) "complex" (ERROR) "float" (identifier) "float" (pointer_declarator) "* ref" (*) "*" (identifier) "ref" ()) ")" (compound_statement) "{\n long odims[D];\n md_select_dims(D, ~flags, odims, dims);\n\n complex float* out = md_alloc(D, odims, CFL_SIZE);\n\n estimate_pattern(D, dims, flags, out, in);\n\n bool ret = (md_znrmse(D, odims, ref, out) < UT_TOL);\n\n md_free(out);\n\n return ret;\n}" ({) "{" (declaration) "long odims[D];" (sized_type_specifier) "long" (long) "long" (array_declarator) "odims[D]" (identifier) "odims" ([) "[" (identifier) "D" (]) "]" (;) ";" (expression_statement) "md_select_dims(D, ~flags, odims, dims);" (call_expression) "md_select_dims(D, ~flags, odims, dims)" (identifier) "md_select_dims" (argument_list) "(D, ~flags, odims, dims)" (() "(" (identifier) "D" (,) "," (unary_expression) "~flags" (~) "~" (identifier) "flags" (,) "," (identifier) "odims" (,) "," (identifier) "dims" ()) ")" (;) ";" (declaration) "complex float* out = md_alloc(D, odims, CFL_SIZE);" (type_identifier) "complex" (ERROR) "float" (identifier) "float" (init_declarator) "* out = md_alloc(D, odims, CFL_SIZE)" (pointer_declarator) "* out" (*) "*" (identifier) "out" (=) "=" (call_expression) "md_alloc(D, odims, CFL_SIZE)" (identifier) "md_alloc" (argument_list) "(D, odims, CFL_SIZE)" (() "(" (identifier) "D" (,) "," (identifier) "odims" (,) "," (identifier) "CFL_SIZE" ()) ")" (;) ";" (expression_statement) "estimate_pattern(D, dims, flags, out, in);" (call_expression) "estimate_pattern(D, dims, flags, out, in)" (identifier) "estimate_pattern" (argument_list) "(D, dims, flags, out, in)" (() "(" (identifier) "D" (,) "," (identifier) "dims" (,) "," (identifier) "flags" (,) "," (identifier) "out" (,) "," (identifier) "in" ()) ")" (;) ";" (declaration) "bool ret = (md_znrmse(D, odims, ref, out) < UT_TOL);" (primitive_type) "bool" (init_declarator) "ret = (md_znrmse(D, odims, ref, out) < UT_TOL)" (identifier) "ret" (=) "=" (parenthesized_expression) "(md_znrmse(D, odims, ref, out) < UT_TOL)" (() "(" (binary_expression) "md_znrmse(D, odims, ref, out) < UT_TOL" (call_expression) "md_znrmse(D, odims, ref, out)" (identifier) "md_znrmse" (argument_list) "(D, odims, ref, out)" (() "(" (identifier) "D" (,) "," (identifier) "odims" (,) "," (identifier) "ref" (,) "," (identifier) "out" ()) ")" (<) "<" (identifier) "UT_TOL" ()) ")" (;) ";" (expression_statement) "md_free(out);" (call_expression) "md_free(out)" (identifier) "md_free" (argument_list) "(out)" (() "(" (identifier) "out" ()) ")" (;) ";" (return_statement) "return ret;" (return) "return" (identifier) "ret" (;) ";" (}) "}" (function_definition) "static bool test_pattern(void)\n{\n const complex float in[1][5][3] = { {\n\n { 3., 0., 0. },\n { 0., 2., 0. },\n { .2, 0., 0. },\n { 0., 0., 0. },\n { 0., 2., 0. },\n } };\n\n\n const complex float ref0[1][5][3] = { {\n\n { 1., 0., 0. },\n { 0., 1., 0. },\n { 1., 0., 0. },\n { 0., 0., 0. },\n { 0., 1., 0. },\n } };\n\n const complex float ref2[1][1][3] = { {\n\n { 1., 1., 0. },\n } };\n\n const complex float ref3[1][1][1] = { {\n\n { 1. },\n } };\n\n long idims[3] = { 3, 5, 1 };\n\n\n return (test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n test_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) &&\n test_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0]));\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "test_pattern(void)" (identifier) "test_pattern" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n const complex float in[1][5][3] = { {\n\n { 3., 0., 0. },\n { 0., 2., 0. },\n { .2, 0., 0. },\n { 0., 0., 0. },\n { 0., 2., 0. },\n } };\n\n\n const complex float ref0[1][5][3] = { {\n\n { 1., 0., 0. },\n { 0., 1., 0. },\n { 1., 0., 0. },\n { 0., 0., 0. },\n { 0., 1., 0. },\n } };\n\n const complex float ref2[1][1][3] = { {\n\n { 1., 1., 0. },\n } };\n\n const complex float ref3[1][1][1] = { {\n\n { 1. },\n } };\n\n long idims[3] = { 3, 5, 1 };\n\n\n return (test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n test_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) &&\n test_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0]));\n}" ({) "{" (declaration) "const complex float in[1][5][3] = { {\n\n { 3., 0., 0. },\n { 0., 2., 0. },\n { .2, 0., 0. },\n { 0., 0., 0. },\n { 0., 2., 0. },\n } };" (type_qualifier) "const" (const) "const" (type_identifier) "complex" (init_declarator) "float in[1][5][3] = { {\n\n { 3., 0., 0. },\n { 0., 2., 0. },\n { .2, 0., 0. },\n { 0., 0., 0. },\n { 0., 2., 0. },\n } }" (array_declarator) "float in[1][5][3]" (array_declarator) "float in[1][5]" (array_declarator) "float in[1]" (identifier) "float" (ERROR) "in" (identifier) "in" ([) "[" (number_literal) "1" (]) "]" ([) "[" (number_literal) "5" (]) "]" ([) "[" (number_literal) "3" (]) "]" (=) "=" (initializer_list) "{ {\n\n { 3., 0., 0. },\n { 0., 2., 0. },\n { .2, 0., 0. },\n { 0., 0., 0. },\n { 0., 2., 0. },\n } }" ({) "{" (initializer_list) "{\n\n { 3., 0., 0. },\n { 0., 2., 0. },\n { .2, 0., 0. },\n { 0., 0., 0. },\n { 0., 2., 0. },\n }" ({) "{" (initializer_list) "{ 3., 0., 0. }" ({) "{" (number_literal) "3." (,) "," (number_literal) "0." (,) "," (number_literal) "0." (}) "}" (,) "," (initializer_list) "{ 0., 2., 0. }" ({) "{" (number_literal) "0." (,) "," (number_literal) "2." (,) "," (number_literal) "0." (}) "}" (,) "," (initializer_list) "{ .2, 0., 0. }" ({) "{" (number_literal) ".2" (,) "," (number_literal) "0." (,) "," (number_literal) "0." (}) "}" (,) "," (initializer_list) "{ 0., 0., 0. }" ({) "{" (number_literal) "0." (,) "," (number_literal) "0." (,) "," (number_literal) "0." (}) "}" (,) "," (initializer_list) "{ 0., 2., 0. }" ({) "{" (number_literal) "0." (,) "," (number_literal) "2." (,) "," (number_literal) "0." (}) "}" (,) "," (}) "}" (}) "}" (;) ";" (declaration) "const complex float ref0[1][5][3] = { {\n\n { 1., 0., 0. },\n { 0., 1., 0. },\n { 1., 0., 0. },\n { 0., 0., 0. },\n { 0., 1., 0. },\n } };" (type_qualifier) "const" (const) "const" (type_identifier) "complex" (init_declarator) "float ref0[1][5][3] = { {\n\n { 1., 0., 0. },\n { 0., 1., 0. },\n { 1., 0., 0. },\n { 0., 0., 0. },\n { 0., 1., 0. },\n } }" (array_declarator) "float ref0[1][5][3]" (array_declarator) "float ref0[1][5]" (array_declarator) "float ref0[1]" (identifier) "float" (ERROR) "ref0" (identifier) "ref0" ([) "[" (number_literal) "1" (]) "]" ([) "[" (number_literal) "5" (]) "]" ([) "[" (number_literal) "3" (]) "]" (=) "=" (initializer_list) "{ {\n\n { 1., 0., 0. },\n { 0., 1., 0. },\n { 1., 0., 0. },\n { 0., 0., 0. },\n { 0., 1., 0. },\n } }" ({) "{" (initializer_list) "{\n\n { 1., 0., 0. },\n { 0., 1., 0. },\n { 1., 0., 0. },\n { 0., 0., 0. },\n { 0., 1., 0. },\n }" ({) "{" (initializer_list) "{ 1., 0., 0. }" ({) "{" (number_literal) "1." (,) "," (number_literal) "0." (,) "," (number_literal) "0." (}) "}" (,) "," (initializer_list) "{ 0., 1., 0. }" ({) "{" (number_literal) "0." (,) "," (number_literal) "1." (,) "," (number_literal) "0." (}) "}" (,) "," (initializer_list) "{ 1., 0., 0. }" ({) "{" (number_literal) "1." (,) "," (number_literal) "0." (,) "," (number_literal) "0." (}) "}" (,) "," (initializer_list) "{ 0., 0., 0. }" ({) "{" (number_literal) "0." (,) "," (number_literal) "0." (,) "," (number_literal) "0." (}) "}" (,) "," (initializer_list) "{ 0., 1., 0. }" ({) "{" (number_literal) "0." (,) "," (number_literal) "1." (,) "," (number_literal) "0." (}) "}" (,) "," (}) "}" (}) "}" (;) ";" (declaration) "const complex float ref2[1][1][3] = { {\n\n { 1., 1., 0. },\n } };" (type_qualifier) "const" (const) "const" (type_identifier) "complex" (init_declarator) "float ref2[1][1][3] = { {\n\n { 1., 1., 0. },\n } }" (array_declarator) "float ref2[1][1][3]" (array_declarator) "float ref2[1][1]" (array_declarator) "float ref2[1]" (identifier) "float" (ERROR) "ref2" (identifier) "ref2" ([) "[" (number_literal) "1" (]) "]" ([) "[" (number_literal) "1" (]) "]" ([) "[" (number_literal) "3" (]) "]" (=) "=" (initializer_list) "{ {\n\n { 1., 1., 0. },\n } }" ({) "{" (initializer_list) "{\n\n { 1., 1., 0. },\n }" ({) "{" (initializer_list) "{ 1., 1., 0. }" ({) "{" (number_literal) "1." (,) "," (number_literal) "1." (,) "," (number_literal) "0." (}) "}" (,) "," (}) "}" (}) "}" (;) ";" (declaration) "const complex float ref3[1][1][1] = { {\n\n { 1. },\n } };" (type_qualifier) "const" (const) "const" (type_identifier) "complex" (init_declarator) "float ref3[1][1][1] = { {\n\n { 1. },\n } }" (array_declarator) "float ref3[1][1][1]" (array_declarator) "float ref3[1][1]" (array_declarator) "float ref3[1]" (identifier) "float" (ERROR) "ref3" (identifier) "ref3" ([) "[" (number_literal) "1" (]) "]" ([) "[" (number_literal) "1" (]) "]" ([) "[" (number_literal) "1" (]) "]" (=) "=" (initializer_list) "{ {\n\n { 1. },\n } }" ({) "{" (initializer_list) "{\n\n { 1. },\n }" ({) "{" (initializer_list) "{ 1. }" ({) "{" (number_literal) "1." (}) "}" (,) "," (}) "}" (}) "}" (;) ";" (declaration) "long idims[3] = { 3, 5, 1 };" (sized_type_specifier) "long" (long) "long" (init_declarator) "idims[3] = { 3, 5, 1 }" (array_declarator) "idims[3]" (identifier) "idims" ([) "[" (number_literal) "3" (]) "]" (=) "=" (initializer_list) "{ 3, 5, 1 }" ({) "{" (number_literal) "3" (,) "," (number_literal) "5" (,) "," (number_literal) "1" (}) "}" (;) ";" (return_statement) "return (test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n test_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) &&\n test_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0]));" (return) "return" (parenthesized_expression) "(test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n test_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) &&\n test_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0]))" (() "(" (binary_expression) "test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n test_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) &&\n test_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0])" (binary_expression) "test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n test_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0])" (call_expression) "test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0])" (identifier) "test_pattern_flags" (argument_list) "(3, idims, 0, &in[0][0][0], &ref0[0][0][0])" (() "(" (number_literal) "3" (,) "," (identifier) "idims" (,) "," (number_literal) "0" (,) "," (pointer_expression) "&in[0][0][0]" (&) "&" (subscript_expression) "in[0][0][0]" (subscript_expression) "in[0][0]" (subscript_expression) "in[0]" (identifier) "in" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" (,) "," (pointer_expression) "&ref0[0][0][0]" (&) "&" (subscript_expression) "ref0[0][0][0]" (subscript_expression) "ref0[0][0]" (subscript_expression) "ref0[0]" (identifier) "ref0" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" ()) ")" (&&) "&&" (call_expression) "test_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0])" (identifier) "test_pattern_flags" (argument_list) "(3, idims, 2, &in[0][0][0], &ref2[0][0][0])" (() "(" (number_literal) "3" (,) "," (identifier) "idims" (,) "," (number_literal) "2" (,) "," (pointer_expression) "&in[0][0][0]" (&) "&" (subscript_expression) "in[0][0][0]" (subscript_expression) "in[0][0]" (subscript_expression) "in[0]" (identifier) "in" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" (,) "," (pointer_expression) "&ref2[0][0][0]" (&) "&" (subscript_expression) "ref2[0][0][0]" (subscript_expression) "ref2[0][0]" (subscript_expression) "ref2[0]" (identifier) "ref2" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" ()) ")" (&&) "&&" (call_expression) "test_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0])" (identifier) "test_pattern_flags" (argument_list) "(3, idims, 3, &in[0][0][0], &ref3[0][0][0])" (() "(" (number_literal) "3" (,) "," (identifier) "idims" (,) "," (number_literal) "3" (,) "," (pointer_expression) "&in[0][0][0]" (&) "&" (subscript_expression) "in[0][0][0]" (subscript_expression) "in[0][0]" (subscript_expression) "in[0]" (identifier) "in" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" (,) "," (pointer_expression) "&ref3[0][0][0]" (&) "&" (subscript_expression) "ref3[0][0][0]" (subscript_expression) "ref3[0][0]" (subscript_expression) "ref3[0]" (identifier) "ref3" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" ()) ")" ()) ")" (;) ";" (}) "}" (expression_statement) "UT_REGISTER_TEST(test_pattern);" (call_expression) "UT_REGISTER_TEST(test_pattern)" (identifier) "UT_REGISTER_TEST" (argument_list) "(test_pattern)" (() "(" (identifier) "test_pattern" ()) ")" (;) ";"
588
7
{"language": "c", "success": true, "metadata": {"lines": 58, "avg_line_length": 24.76, "nodes": 320, "errors": 0, "source_hash": "f018cec3a02982145d1e73a04d283ed10bf5caf8cf8c51a472a852bfa3dd6a90", "categorized_nodes": 231}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 0, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include <complex.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<complex.h>", "parent": 3, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include \"num/flpmath.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"num/flpmath.h\"", "parent": 6, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 24}}, {"id": 9, "type": "preproc_include", "text": "#include \"num/multind.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"num/multind.h\"", "parent": 9, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 24}}, {"id": 12, "type": "preproc_include", "text": "#include \"misc/debug.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": "\"misc/debug.h\"", "parent": 12, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 23}}, {"id": 15, "type": "preproc_include", "text": "#include \"misc/misc.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": "\"misc/misc.h\"", "parent": 15, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 22}}, {"id": 18, "type": "preproc_include", "text": "#include \"misc/mri.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": "\"misc/mri.h\"", "parent": 18, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 21}}, {"id": 21, "type": "preproc_include", "text": "#include \"utest.h\"\n", "parent": null, "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": "\"utest.h\"", "parent": 21, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 18}}, {"id": 24, "type": "function_definition", "text": "static bool test_pattern_flags(unsigned int D, const long dims[D], unsigned int flags, const complex float* in, const complex float* ref)\n{\n\tlong odims[D];\n\tmd_select_dims(D, ~flags, odims, dims);\n\n\tcomplex float* out = md_alloc(D, odims, CFL_SIZE);\n\n\testimate_pattern(D, dims, flags, out, in);\n\n\tbool ret = (md_znrmse(D, odims, ref, out) < UT_TOL);\n\n\tmd_free(out);\n\n\treturn ret;\n}", "parent": null, "children": [25, 26], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 25, "type": "primitive_type", "text": "bool", "parent": 24, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 11}}, {"id": 26, "type": "function_declarator", "text": "test_pattern_flags(unsigned int D, const long dims[D], unsigned int flags, const complex float* in, const complex float* ref)", "parent": 24, "children": [27, 28], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 137}}, {"id": 27, "type": "identifier", "text": "test_pattern_flags", "parent": 26, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 30}}, {"id": 28, "type": "parameter_list", "text": "(unsigned int D, const long dims[D], unsigned int flags, const complex float* in, const complex float* ref)", "parent": 26, "children": [29, 34, 40, 45, 52], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 137}}, {"id": 29, "type": "parameter_declaration", "text": "unsigned int D", "parent": 28, "children": [30, 33], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 45}}, {"id": 30, "type": "sized_type_specifier", "text": "unsigned int", "parent": 29, "children": [31, 32], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 43}}, {"id": 31, "type": "unsigned", "text": "unsigned", "parent": 30, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 39}}, {"id": 32, "type": "primitive_type", "text": "int", "parent": 30, "children": [], "start_point": {"row": 21, "column": 40}, "end_point": {"row": 21, "column": 43}}, {"id": 33, "type": "identifier", "text": "D", "parent": 29, "children": [], "start_point": {"row": 21, "column": 44}, "end_point": {"row": 21, "column": 45}}, {"id": 34, "type": "parameter_declaration", "text": "const long dims[D]", "parent": 28, "children": [35, 37], "start_point": {"row": 21, "column": 47}, "end_point": {"row": 21, "column": 65}}, {"id": 35, "type": "sized_type_specifier", "text": "long", "parent": 34, "children": [36], "start_point": {"row": 21, "column": 53}, "end_point": {"row": 21, "column": 57}}, {"id": 36, "type": "long", "text": "long", "parent": 35, "children": [], "start_point": {"row": 21, "column": 53}, "end_point": {"row": 21, "column": 57}}, {"id": 37, "type": "array_declarator", "text": "dims[D]", "parent": 34, "children": [38, 39], "start_point": {"row": 21, "column": 58}, "end_point": {"row": 21, "column": 65}}, {"id": 38, "type": "identifier", "text": "dims", "parent": 37, "children": [], "start_point": {"row": 21, "column": 58}, "end_point": {"row": 21, "column": 62}}, {"id": 39, "type": "identifier", "text": "D", "parent": 37, "children": [], "start_point": {"row": 21, "column": 63}, "end_point": {"row": 21, "column": 64}}, {"id": 40, "type": "parameter_declaration", "text": "unsigned int flags", "parent": 28, "children": [41, 44], "start_point": {"row": 21, "column": 67}, "end_point": {"row": 21, "column": 85}}, {"id": 41, "type": "sized_type_specifier", "text": "unsigned int", "parent": 40, "children": [42, 43], "start_point": {"row": 21, "column": 67}, "end_point": {"row": 21, "column": 79}}, {"id": 42, "type": "unsigned", "text": "unsigned", "parent": 41, "children": [], "start_point": {"row": 21, "column": 67}, "end_point": {"row": 21, "column": 75}}, {"id": 43, "type": "primitive_type", "text": "int", "parent": 41, "children": [], "start_point": {"row": 21, "column": 76}, "end_point": {"row": 21, "column": 79}}, {"id": 44, "type": "identifier", "text": "flags", "parent": 40, "children": [], "start_point": {"row": 21, "column": 80}, "end_point": {"row": 21, "column": 85}}, {"id": 45, "type": "parameter_declaration", "text": "const complex float* in", "parent": 28, "children": [46, 47, 49], "start_point": {"row": 21, "column": 87}, "end_point": {"row": 21, "column": 110}}, {"id": 46, "type": "type_identifier", "text": "complex", "parent": 45, "children": [], "start_point": {"row": 21, "column": 93}, "end_point": {"row": 21, "column": 100}}, {"id": 47, "type": "ERROR", "text": "float", "parent": 45, "children": [48], "start_point": {"row": 21, "column": 101}, "end_point": {"row": 21, "column": 106}}, {"id": 48, "type": "identifier", "text": "float", "parent": 47, "children": [], "start_point": {"row": 21, "column": 101}, "end_point": {"row": 21, "column": 106}}, {"id": 49, "type": "pointer_declarator", "text": "* in", "parent": 45, "children": [50, 51], "start_point": {"row": 21, "column": 106}, "end_point": {"row": 21, "column": 110}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 21, "column": 106}, "end_point": {"row": 21, "column": 107}}, {"id": 51, "type": "identifier", "text": "in", "parent": 49, "children": [], "start_point": {"row": 21, "column": 108}, "end_point": {"row": 21, "column": 110}}, {"id": 52, "type": "parameter_declaration", "text": "const complex float* ref", "parent": 28, "children": [53, 54, 56], "start_point": {"row": 21, "column": 112}, "end_point": {"row": 21, "column": 136}}, {"id": 53, "type": "type_identifier", "text": "complex", "parent": 52, "children": [], "start_point": {"row": 21, "column": 118}, "end_point": {"row": 21, "column": 125}}, {"id": 54, "type": "ERROR", "text": "float", "parent": 52, "children": [55], "start_point": {"row": 21, "column": 126}, "end_point": {"row": 21, "column": 131}}, {"id": 55, "type": "identifier", "text": "float", "parent": 54, "children": [], "start_point": {"row": 21, "column": 126}, "end_point": {"row": 21, "column": 131}}, {"id": 56, "type": "pointer_declarator", "text": "* ref", "parent": 52, "children": [57, 58], "start_point": {"row": 21, "column": 131}, "end_point": {"row": 21, "column": 136}}, {"id": 57, "type": "*", "text": "*", "parent": 56, "children": [], "start_point": {"row": 21, "column": 131}, "end_point": {"row": 21, "column": 132}}, {"id": 58, "type": "identifier", "text": "ref", "parent": 56, "children": [], "start_point": {"row": 21, "column": 133}, "end_point": {"row": 21, "column": 136}}, {"id": 59, "type": "declaration", "text": "long odims[D];", "parent": 24, "children": [60, 62], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 15}}, {"id": 60, "type": "sized_type_specifier", "text": "long", "parent": 59, "children": [61], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 5}}, {"id": 61, "type": "long", "text": "long", "parent": 60, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 5}}, {"id": 62, "type": "array_declarator", "text": "odims[D]", "parent": 59, "children": [63, 64], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 14}}, {"id": 63, "type": "identifier", "text": "odims", "parent": 62, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 11}}, {"id": 64, "type": "identifier", "text": "D", "parent": 62, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 13}}, {"id": 65, "type": "call_expression", "text": "md_select_dims(D, ~flags, odims, dims)", "parent": 24, "children": [66, 67], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 39}}, {"id": 66, "type": "identifier", "text": "md_select_dims", "parent": 65, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 15}}, {"id": 67, "type": "argument_list", "text": "(D, ~flags, odims, dims)", "parent": 65, "children": [68, 69, 72, 73], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 39}}, {"id": 68, "type": "identifier", "text": "D", "parent": 67, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 17}}, {"id": 69, "type": "unary_expression", "text": "~flags", "parent": 67, "children": [70, 71], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 25}}, {"id": 70, "type": "~", "text": "~", "parent": 69, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 20}}, {"id": 71, "type": "identifier", "text": "flags", "parent": 69, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 25}}, {"id": 72, "type": "identifier", "text": "odims", "parent": 67, "children": [], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 32}}, {"id": 73, "type": "identifier", "text": "dims", "parent": 67, "children": [], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 38}}, {"id": 74, "type": "declaration", "text": "complex float* out = md_alloc(D, odims, CFL_SIZE);", "parent": 24, "children": [75, 76, 78], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 51}}, {"id": 75, "type": "type_identifier", "text": "complex", "parent": 74, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 8}}, {"id": 76, "type": "ERROR", "text": "float", "parent": 74, "children": [77], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 14}}, {"id": 77, "type": "identifier", "text": "float", "parent": 76, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 14}}, {"id": 78, "type": "init_declarator", "text": "* out = md_alloc(D, odims, CFL_SIZE)", "parent": 74, "children": [79, 82, 83], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 50}}, {"id": 79, "type": "pointer_declarator", "text": "* out", "parent": 78, "children": [80, 81], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 19}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 15}}, {"id": 81, "type": "identifier", "text": "out", "parent": 79, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 19}}, {"id": 82, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 21}}, {"id": 83, "type": "call_expression", "text": "md_alloc(D, odims, CFL_SIZE)", "parent": 78, "children": [84, 85], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 50}}, {"id": 84, "type": "identifier", "text": "md_alloc", "parent": 83, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 30}}, {"id": 85, "type": "argument_list", "text": "(D, odims, CFL_SIZE)", "parent": 83, "children": [86, 87, 88], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 50}}, {"id": 86, "type": "identifier", "text": "D", "parent": 85, "children": [], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 32}}, {"id": 87, "type": "identifier", "text": "odims", "parent": 85, "children": [], "start_point": {"row": 26, "column": 34}, "end_point": {"row": 26, "column": 39}}, {"id": 88, "type": "identifier", "text": "CFL_SIZE", "parent": 85, "children": [], "start_point": {"row": 26, "column": 41}, "end_point": {"row": 26, "column": 49}}, {"id": 89, "type": "call_expression", "text": "estimate_pattern(D, dims, flags, out, in)", "parent": 24, "children": [90, 91], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 42}}, {"id": 90, "type": "identifier", "text": "estimate_pattern", "parent": 89, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 17}}, {"id": 91, "type": "argument_list", "text": "(D, dims, flags, out, in)", "parent": 89, "children": [92, 93, 94, 95, 96], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 42}}, {"id": 92, "type": "identifier", "text": "D", "parent": 91, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 19}}, {"id": 93, "type": "identifier", "text": "dims", "parent": 91, "children": [], "start_point": {"row": 28, "column": 21}, "end_point": {"row": 28, "column": 25}}, {"id": 94, "type": "identifier", "text": "flags", "parent": 91, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 32}}, {"id": 95, "type": "identifier", "text": "out", "parent": 91, "children": [], "start_point": {"row": 28, "column": 34}, "end_point": {"row": 28, "column": 37}}, {"id": 96, "type": "identifier", "text": "in", "parent": 91, "children": [], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 41}}, {"id": 97, "type": "declaration", "text": "bool ret = (md_znrmse(D, odims, ref, out) < UT_TOL);", "parent": 24, "children": [98, 99], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 53}}, {"id": 98, "type": "primitive_type", "text": "bool", "parent": 97, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 5}}, {"id": 99, "type": "init_declarator", "text": "ret = (md_znrmse(D, odims, ref, out) < UT_TOL)", "parent": 97, "children": [100, 101, 102], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 52}}, {"id": 100, "type": "identifier", "text": "ret", "parent": 99, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 9}}, {"id": 101, "type": "=", "text": "=", "parent": 99, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 11}}, {"id": 102, "type": "parenthesized_expression", "text": "(md_znrmse(D, odims, ref, out) < UT_TOL)", "parent": 99, "children": [103], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 52}}, {"id": 103, "type": "binary_expression", "text": "md_znrmse(D, odims, ref, out) < UT_TOL", "parent": 102, "children": [104, 111, 112], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 51}}, {"id": 104, "type": "call_expression", "text": "md_znrmse(D, odims, ref, out)", "parent": 103, "children": [105, 106], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 42}}, {"id": 105, "type": "identifier", "text": "md_znrmse", "parent": 104, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 22}}, {"id": 106, "type": "argument_list", "text": "(D, odims, ref, out)", "parent": 104, "children": [107, 108, 109, 110], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 42}}, {"id": 107, "type": "identifier", "text": "D", "parent": 106, "children": [], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 24}}, {"id": 108, "type": "identifier", "text": "odims", "parent": 106, "children": [], "start_point": {"row": 30, "column": 26}, "end_point": {"row": 30, "column": 31}}, {"id": 109, "type": "identifier", "text": "ref", "parent": 106, "children": [], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 36}}, {"id": 110, "type": "identifier", "text": "out", "parent": 106, "children": [], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 30, "column": 41}}, {"id": 111, "type": "<", "text": "<", "parent": 103, "children": [], "start_point": {"row": 30, "column": 43}, "end_point": {"row": 30, "column": 44}}, {"id": 112, "type": "identifier", "text": "UT_TOL", "parent": 103, "children": [], "start_point": {"row": 30, "column": 45}, "end_point": {"row": 30, "column": 51}}, {"id": 113, "type": "call_expression", "text": "md_free(out)", "parent": 24, "children": [114, 115], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 13}}, {"id": 114, "type": "identifier", "text": "md_free", "parent": 113, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 8}}, {"id": 115, "type": "argument_list", "text": "(out)", "parent": 113, "children": [116], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 13}}, {"id": 116, "type": "identifier", "text": "out", "parent": 115, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 12}}, {"id": 117, "type": "return_statement", "text": "return ret;", "parent": 24, "children": [118], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 12}}, {"id": 118, "type": "identifier", "text": "ret", "parent": 117, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 11}}, {"id": 119, "type": "function_definition", "text": "static bool test_pattern(void)\n{\n\tconst complex float in[1][5][3] = { {\n\n\t\t{ 3., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t\t{ .2, 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t} };\n\n\n\tconst complex float ref0[1][5][3] = { {\n\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t} };\n\n\tconst complex float ref2[1][1][3] = { {\n\n\t\t{ 1., 1., 0. },\n\t} };\n\n\tconst complex float ref3[1][1][1] = { {\n\n\t\t{ 1. },\n\t} };\n\n\tlong idims[3] = { 3, 5, 1 };\n\n\n\treturn (test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n\t\ttest_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) &&\n\t\ttest_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0]));\n}", "parent": null, "children": [120, 121], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 75, "column": 1}}, {"id": 120, "type": "primitive_type", "text": "bool", "parent": 119, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 11}}, {"id": 121, "type": "function_declarator", "text": "test_pattern(void)", "parent": 119, "children": [122, 123], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 30}}, {"id": 122, "type": "identifier", "text": "test_pattern", "parent": 121, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 24}}, {"id": 123, "type": "parameter_list", "text": "(void)", "parent": 121, "children": [124], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 30}}, {"id": 124, "type": "parameter_declaration", "text": "void", "parent": 123, "children": [125], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 29}}, {"id": 125, "type": "primitive_type", "text": "void", "parent": 124, "children": [], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 29}}, {"id": 126, "type": "declaration", "text": "const complex float in[1][5][3] = { {\n\n\t\t{ 3., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t\t{ .2, 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t} };", "parent": 119, "children": [127, 128], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 47, "column": 5}}, {"id": 127, "type": "type_identifier", "text": "complex", "parent": 126, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 14}}, {"id": 128, "type": "init_declarator", "text": "float in[1][5][3] = { {\n\n\t\t{ 3., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t\t{ .2, 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t} }", "parent": 126, "children": [129, 138, 139], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 47, "column": 4}}, {"id": 129, "type": "array_declarator", "text": "float in[1][5][3]", "parent": 128, "children": [130, 137], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 32}}, {"id": 130, "type": "array_declarator", "text": "float in[1][5]", "parent": 129, "children": [131, 136], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 29}}, {"id": 131, "type": "array_declarator", "text": "float in[1]", "parent": 130, "children": [132, 133, 135], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 26}}, {"id": 132, "type": "identifier", "text": "float", "parent": 131, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 20}}, {"id": 133, "type": "ERROR", "text": "in", "parent": 131, "children": [134], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 23}}, {"id": 134, "type": "identifier", "text": "in", "parent": 133, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 23}}, {"id": 135, "type": "number_literal", "text": "1", "parent": 131, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 25}}, {"id": 136, "type": "number_literal", "text": "5", "parent": 130, "children": [], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 40, "column": 28}}, {"id": 137, "type": "number_literal", "text": "3", "parent": 129, "children": [], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 31}}, {"id": 138, "type": "=", "text": "=", "parent": 128, "children": [], "start_point": {"row": 40, "column": 33}, "end_point": {"row": 40, "column": 34}}, {"id": 139, "type": "initializer_list", "text": "{ {\n\n\t\t{ 3., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t\t{ .2, 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t} }", "parent": 128, "children": [140], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 47, "column": 4}}, {"id": 140, "type": "initializer_list", "text": "{\n\n\t\t{ 3., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t\t{ .2, 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t}", "parent": 139, "children": [141, 145, 149, 153, 157], "start_point": {"row": 40, "column": 37}, "end_point": {"row": 47, "column": 2}}, {"id": 141, "type": "initializer_list", "text": "{ 3., 0., 0. }", "parent": 140, "children": [142, 143, 144], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 16}}, {"id": 142, "type": "number_literal", "text": "3.", "parent": 141, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 6}}, {"id": 143, "type": "number_literal", "text": "0.", "parent": 141, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 10}}, {"id": 144, "type": "number_literal", "text": "0.", "parent": 141, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 14}}, {"id": 145, "type": "initializer_list", "text": "{ 0., 2., 0. }", "parent": 140, "children": [146, 147, 148], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 16}}, {"id": 146, "type": "number_literal", "text": "0.", "parent": 145, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 6}}, {"id": 147, "type": "number_literal", "text": "2.", "parent": 145, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 10}}, {"id": 148, "type": "number_literal", "text": "0.", "parent": 145, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 14}}, {"id": 149, "type": "initializer_list", "text": "{ .2, 0., 0. }", "parent": 140, "children": [150, 151, 152], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 16}}, {"id": 150, "type": "number_literal", "text": ".2", "parent": 149, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 6}}, {"id": 151, "type": "number_literal", "text": "0.", "parent": 149, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 10}}, {"id": 152, "type": "number_literal", "text": "0.", "parent": 149, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 14}}, {"id": 153, "type": "initializer_list", "text": "{ 0., 0., 0. }", "parent": 140, "children": [154, 155, 156], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 16}}, {"id": 154, "type": "number_literal", "text": "0.", "parent": 153, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 6}}, {"id": 155, "type": "number_literal", "text": "0.", "parent": 153, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 10}}, {"id": 156, "type": "number_literal", "text": "0.", "parent": 153, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 14}}, {"id": 157, "type": "initializer_list", "text": "{ 0., 2., 0. }", "parent": 140, "children": [158, 159, 160], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 16}}, {"id": 158, "type": "number_literal", "text": "0.", "parent": 157, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 6}}, {"id": 159, "type": "number_literal", "text": "2.", "parent": 157, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 10}}, {"id": 160, "type": "number_literal", "text": "0.", "parent": 157, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 14}}, {"id": 161, "type": "declaration", "text": "const complex float ref0[1][5][3] = { {\n\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t} };", "parent": 119, "children": [162, 163], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 57, "column": 5}}, {"id": 162, "type": "type_identifier", "text": "complex", "parent": 161, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 14}}, {"id": 163, "type": "init_declarator", "text": "float ref0[1][5][3] = { {\n\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t} }", "parent": 161, "children": [164, 173, 174], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 57, "column": 4}}, {"id": 164, "type": "array_declarator", "text": "float ref0[1][5][3]", "parent": 163, "children": [165, 172], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 34}}, {"id": 165, "type": "array_declarator", "text": "float ref0[1][5]", "parent": 164, "children": [166, 171], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 31}}, {"id": 166, "type": "array_declarator", "text": "float ref0[1]", "parent": 165, "children": [167, 168, 170], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 28}}, {"id": 167, "type": "identifier", "text": "float", "parent": 166, "children": [], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 20}}, {"id": 168, "type": "ERROR", "text": "ref0", "parent": 166, "children": [169], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 25}}, {"id": 169, "type": "identifier", "text": "ref0", "parent": 168, "children": [], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 25}}, {"id": 170, "type": "number_literal", "text": "1", "parent": 166, "children": [], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 27}}, {"id": 171, "type": "number_literal", "text": "5", "parent": 165, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 30}}, {"id": 172, "type": "number_literal", "text": "3", "parent": 164, "children": [], "start_point": {"row": 50, "column": 32}, "end_point": {"row": 50, "column": 33}}, {"id": 173, "type": "=", "text": "=", "parent": 163, "children": [], "start_point": {"row": 50, "column": 35}, "end_point": {"row": 50, "column": 36}}, {"id": 174, "type": "initializer_list", "text": "{ {\n\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t} }", "parent": 163, "children": [175], "start_point": {"row": 50, "column": 37}, "end_point": {"row": 57, "column": 4}}, {"id": 175, "type": "initializer_list", "text": "{\n\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t}", "parent": 174, "children": [176, 180, 184, 188, 192], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 57, "column": 2}}, {"id": 176, "type": "initializer_list", "text": "{ 1., 0., 0. }", "parent": 175, "children": [177, 178, 179], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 16}}, {"id": 177, "type": "number_literal", "text": "1.", "parent": 176, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 6}}, {"id": 178, "type": "number_literal", "text": "0.", "parent": 176, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 10}}, {"id": 179, "type": "number_literal", "text": "0.", "parent": 176, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 14}}, {"id": 180, "type": "initializer_list", "text": "{ 0., 1., 0. }", "parent": 175, "children": [181, 182, 183], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 16}}, {"id": 181, "type": "number_literal", "text": "0.", "parent": 180, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 6}}, {"id": 182, "type": "number_literal", "text": "1.", "parent": 180, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 10}}, {"id": 183, "type": "number_literal", "text": "0.", "parent": 180, "children": [], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 14}}, {"id": 184, "type": "initializer_list", "text": "{ 1., 0., 0. }", "parent": 175, "children": [185, 186, 187], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 16}}, {"id": 185, "type": "number_literal", "text": "1.", "parent": 184, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 6}}, {"id": 186, "type": "number_literal", "text": "0.", "parent": 184, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 10}}, {"id": 187, "type": "number_literal", "text": "0.", "parent": 184, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 14}}, {"id": 188, "type": "initializer_list", "text": "{ 0., 0., 0. }", "parent": 175, "children": [189, 190, 191], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 16}}, {"id": 189, "type": "number_literal", "text": "0.", "parent": 188, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 6}}, {"id": 190, "type": "number_literal", "text": "0.", "parent": 188, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 10}}, {"id": 191, "type": "number_literal", "text": "0.", "parent": 188, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 14}}, {"id": 192, "type": "initializer_list", "text": "{ 0., 1., 0. }", "parent": 175, "children": [193, 194, 195], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 16}}, {"id": 193, "type": "number_literal", "text": "0.", "parent": 192, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 6}}, {"id": 194, "type": "number_literal", "text": "1.", "parent": 192, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 10}}, {"id": 195, "type": "number_literal", "text": "0.", "parent": 192, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 14}}, {"id": 196, "type": "declaration", "text": "const complex float ref2[1][1][3] = { {\n\n\t\t{ 1., 1., 0. },\n\t} };", "parent": 119, "children": [197, 198], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 62, "column": 5}}, {"id": 197, "type": "type_identifier", "text": "complex", "parent": 196, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 14}}, {"id": 198, "type": "init_declarator", "text": "float ref2[1][1][3] = { {\n\n\t\t{ 1., 1., 0. },\n\t} }", "parent": 196, "children": [199, 208, 209], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 62, "column": 4}}, {"id": 199, "type": "array_declarator", "text": "float ref2[1][1][3]", "parent": 198, "children": [200, 207], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 34}}, {"id": 200, "type": "array_declarator", "text": "float ref2[1][1]", "parent": 199, "children": [201, 206], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 31}}, {"id": 201, "type": "array_declarator", "text": "float ref2[1]", "parent": 200, "children": [202, 203, 205], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 28}}, {"id": 202, "type": "identifier", "text": "float", "parent": 201, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 20}}, {"id": 203, "type": "ERROR", "text": "ref2", "parent": 201, "children": [204], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 25}}, {"id": 204, "type": "identifier", "text": "ref2", "parent": 203, "children": [], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 25}}, {"id": 205, "type": "number_literal", "text": "1", "parent": 201, "children": [], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 27}}, {"id": 206, "type": "number_literal", "text": "1", "parent": 200, "children": [], "start_point": {"row": 59, "column": 29}, "end_point": {"row": 59, "column": 30}}, {"id": 207, "type": "number_literal", "text": "3", "parent": 199, "children": [], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 59, "column": 33}}, {"id": 208, "type": "=", "text": "=", "parent": 198, "children": [], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 36}}, {"id": 209, "type": "initializer_list", "text": "{ {\n\n\t\t{ 1., 1., 0. },\n\t} }", "parent": 198, "children": [210], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 62, "column": 4}}, {"id": 210, "type": "initializer_list", "text": "{\n\n\t\t{ 1., 1., 0. },\n\t}", "parent": 209, "children": [211], "start_point": {"row": 59, "column": 39}, "end_point": {"row": 62, "column": 2}}, {"id": 211, "type": "initializer_list", "text": "{ 1., 1., 0. }", "parent": 210, "children": [212, 213, 214], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 16}}, {"id": 212, "type": "number_literal", "text": "1.", "parent": 211, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 6}}, {"id": 213, "type": "number_literal", "text": "1.", "parent": 211, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 10}}, {"id": 214, "type": "number_literal", "text": "0.", "parent": 211, "children": [], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 14}}, {"id": 215, "type": "declaration", "text": "const complex float ref3[1][1][1] = { {\n\n\t\t{ 1. },\n\t} };", "parent": 119, "children": [216, 217], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 67, "column": 5}}, {"id": 216, "type": "type_identifier", "text": "complex", "parent": 215, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 14}}, {"id": 217, "type": "init_declarator", "text": "float ref3[1][1][1] = { {\n\n\t\t{ 1. },\n\t} }", "parent": 215, "children": [218, 227, 228], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 67, "column": 4}}, {"id": 218, "type": "array_declarator", "text": "float ref3[1][1][1]", "parent": 217, "children": [219, 226], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 34}}, {"id": 219, "type": "array_declarator", "text": "float ref3[1][1]", "parent": 218, "children": [220, 225], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 31}}, {"id": 220, "type": "array_declarator", "text": "float ref3[1]", "parent": 219, "children": [221, 222, 224], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 28}}, {"id": 221, "type": "identifier", "text": "float", "parent": 220, "children": [], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 20}}, {"id": 222, "type": "ERROR", "text": "ref3", "parent": 220, "children": [223], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 25}}, {"id": 223, "type": "identifier", "text": "ref3", "parent": 222, "children": [], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 25}}, {"id": 224, "type": "number_literal", "text": "1", "parent": 220, "children": [], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 27}}, {"id": 225, "type": "number_literal", "text": "1", "parent": 219, "children": [], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 30}}, {"id": 226, "type": "number_literal", "text": "1", "parent": 218, "children": [], "start_point": {"row": 64, "column": 32}, "end_point": {"row": 64, "column": 33}}, {"id": 227, "type": "=", "text": "=", "parent": 217, "children": [], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 36}}, {"id": 228, "type": "initializer_list", "text": "{ {\n\n\t\t{ 1. },\n\t} }", "parent": 217, "children": [229], "start_point": {"row": 64, "column": 37}, "end_point": {"row": 67, "column": 4}}, {"id": 229, "type": "initializer_list", "text": "{\n\n\t\t{ 1. },\n\t}", "parent": 228, "children": [230], "start_point": {"row": 64, "column": 39}, "end_point": {"row": 67, "column": 2}}, {"id": 230, "type": "initializer_list", "text": "{ 1. }", "parent": 229, "children": [231], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 8}}, {"id": 231, "type": "number_literal", "text": "1.", "parent": 230, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 6}}, {"id": 232, "type": "declaration", "text": "long idims[3] = { 3, 5, 1 };", "parent": 119, "children": [233, 235], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 29}}, {"id": 233, "type": "sized_type_specifier", "text": "long", "parent": 232, "children": [234], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 5}}, {"id": 234, "type": "long", "text": "long", "parent": 233, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 5}}, {"id": 235, "type": "init_declarator", "text": "idims[3] = { 3, 5, 1 }", "parent": 232, "children": [236, 239, 240], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 28}}, {"id": 236, "type": "array_declarator", "text": "idims[3]", "parent": 235, "children": [237, 238], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 14}}, {"id": 237, "type": "identifier", "text": "idims", "parent": 236, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 11}}, {"id": 238, "type": "number_literal", "text": "3", "parent": 236, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 13}}, {"id": 239, "type": "=", "text": "=", "parent": 235, "children": [], "start_point": {"row": 69, "column": 15}, "end_point": {"row": 69, "column": 16}}, {"id": 240, "type": "initializer_list", "text": "{ 3, 5, 1 }", "parent": 235, "children": [241, 242, 243], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 28}}, {"id": 241, "type": "number_literal", "text": "3", "parent": 240, "children": [], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 20}}, {"id": 242, "type": "number_literal", "text": "5", "parent": 240, "children": [], "start_point": {"row": 69, "column": 22}, "end_point": {"row": 69, "column": 23}}, {"id": 243, "type": "number_literal", "text": "1", "parent": 240, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 26}}, {"id": 244, "type": "return_statement", "text": "return (test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n\t\ttest_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) &&\n\t\ttest_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0]));", "parent": 119, "children": [245], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 74, "column": 65}}, {"id": 245, "type": "parenthesized_expression", "text": "(test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n\t\ttest_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) &&\n\t\ttest_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0]))", "parent": 244, "children": [246], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 74, "column": 64}}, {"id": 246, "type": "binary_expression", "text": "test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n\t\ttest_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) &&\n\t\ttest_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0])", "parent": 245, "children": [247, 293, 294], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 74, "column": 63}}, {"id": 247, "type": "binary_expression", "text": "test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n\t\ttest_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0])", "parent": 246, "children": [248, 270, 271], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 73, "column": 63}}, {"id": 248, "type": "call_expression", "text": "test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0])", "parent": 247, "children": [249, 250], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 70}}, {"id": 249, "type": "identifier", "text": "test_pattern_flags", "parent": 248, "children": [], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 27}}, {"id": 250, "type": "argument_list", "text": "(3, idims, 0, &in[0][0][0], &ref0[0][0][0])", "parent": 248, "children": [251, 252, 253, 254, 262], "start_point": {"row": 72, "column": 27}, "end_point": {"row": 72, "column": 70}}, {"id": 251, "type": "number_literal", "text": "3", "parent": 250, "children": [], "start_point": {"row": 72, "column": 28}, "end_point": {"row": 72, "column": 29}}, {"id": 252, "type": "identifier", "text": "idims", "parent": 250, "children": [], "start_point": {"row": 72, "column": 31}, "end_point": {"row": 72, "column": 36}}, {"id": 253, "type": "number_literal", "text": "0", "parent": 250, "children": [], "start_point": {"row": 72, "column": 38}, "end_point": {"row": 72, "column": 39}}, {"id": 254, "type": "pointer_expression", "text": "&in[0][0][0]", "parent": 250, "children": [255], "start_point": {"row": 72, "column": 41}, "end_point": {"row": 72, "column": 53}}, {"id": 255, "type": "subscript_expression", "text": "in[0][0][0]", "parent": 254, "children": [256, 261], "start_point": {"row": 72, "column": 42}, "end_point": {"row": 72, "column": 53}}, {"id": 256, "type": "subscript_expression", "text": "in[0][0]", "parent": 255, "children": [257, 260], "start_point": {"row": 72, "column": 42}, "end_point": {"row": 72, "column": 50}}, {"id": 257, "type": "subscript_expression", "text": "in[0]", "parent": 256, "children": [258, 259], "start_point": {"row": 72, "column": 42}, "end_point": {"row": 72, "column": 47}}, {"id": 258, "type": "identifier", "text": "in", "parent": 257, "children": [], "start_point": {"row": 72, "column": 42}, "end_point": {"row": 72, "column": 44}}, {"id": 259, "type": "number_literal", "text": "0", "parent": 257, "children": [], "start_point": {"row": 72, "column": 45}, "end_point": {"row": 72, "column": 46}}, {"id": 260, "type": "number_literal", "text": "0", "parent": 256, "children": [], "start_point": {"row": 72, "column": 48}, "end_point": {"row": 72, "column": 49}}, {"id": 261, "type": "number_literal", "text": "0", "parent": 255, "children": [], "start_point": {"row": 72, "column": 51}, "end_point": {"row": 72, "column": 52}}, {"id": 262, "type": "pointer_expression", "text": "&ref0[0][0][0]", "parent": 250, "children": [263], "start_point": {"row": 72, "column": 55}, "end_point": {"row": 72, "column": 69}}, {"id": 263, "type": "subscript_expression", "text": "ref0[0][0][0]", "parent": 262, "children": [264, 269], "start_point": {"row": 72, "column": 56}, "end_point": {"row": 72, "column": 69}}, {"id": 264, "type": "subscript_expression", "text": "ref0[0][0]", "parent": 263, "children": [265, 268], "start_point": {"row": 72, "column": 56}, "end_point": {"row": 72, "column": 66}}, {"id": 265, "type": "subscript_expression", "text": "ref0[0]", "parent": 264, "children": [266, 267], "start_point": {"row": 72, "column": 56}, "end_point": {"row": 72, "column": 63}}, {"id": 266, "type": "identifier", "text": "ref0", "parent": 265, "children": [], "start_point": {"row": 72, "column": 56}, "end_point": {"row": 72, "column": 60}}, {"id": 267, "type": "number_literal", "text": "0", "parent": 265, "children": [], "start_point": {"row": 72, "column": 61}, "end_point": {"row": 72, "column": 62}}, {"id": 268, "type": "number_literal", "text": "0", "parent": 264, "children": [], "start_point": {"row": 72, "column": 64}, "end_point": {"row": 72, "column": 65}}, {"id": 269, "type": "number_literal", "text": "0", "parent": 263, "children": [], "start_point": {"row": 72, "column": 67}, "end_point": {"row": 72, "column": 68}}, {"id": 270, "type": "&&", "text": "&&", "parent": 247, "children": [], "start_point": {"row": 72, "column": 71}, "end_point": {"row": 72, "column": 73}}, {"id": 271, "type": "call_expression", "text": "test_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0])", "parent": 247, "children": [272, 273], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 63}}, {"id": 272, "type": "identifier", "text": "test_pattern_flags", "parent": 271, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 20}}, {"id": 273, "type": "argument_list", "text": "(3, idims, 2, &in[0][0][0], &ref2[0][0][0])", "parent": 271, "children": [274, 275, 276, 277, 285], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 63}}, {"id": 274, "type": "number_literal", "text": "3", "parent": 273, "children": [], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 22}}, {"id": 275, "type": "identifier", "text": "idims", "parent": 273, "children": [], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 29}}, {"id": 276, "type": "number_literal", "text": "2", "parent": 273, "children": [], "start_point": {"row": 73, "column": 31}, "end_point": {"row": 73, "column": 32}}, {"id": 277, "type": "pointer_expression", "text": "&in[0][0][0]", "parent": 273, "children": [278], "start_point": {"row": 73, "column": 34}, "end_point": {"row": 73, "column": 46}}, {"id": 278, "type": "subscript_expression", "text": "in[0][0][0]", "parent": 277, "children": [279, 284], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 46}}, {"id": 279, "type": "subscript_expression", "text": "in[0][0]", "parent": 278, "children": [280, 283], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 43}}, {"id": 280, "type": "subscript_expression", "text": "in[0]", "parent": 279, "children": [281, 282], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 40}}, {"id": 281, "type": "identifier", "text": "in", "parent": 280, "children": [], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 37}}, {"id": 282, "type": "number_literal", "text": "0", "parent": 280, "children": [], "start_point": {"row": 73, "column": 38}, "end_point": {"row": 73, "column": 39}}, {"id": 283, "type": "number_literal", "text": "0", "parent": 279, "children": [], "start_point": {"row": 73, "column": 41}, "end_point": {"row": 73, "column": 42}}, {"id": 284, "type": "number_literal", "text": "0", "parent": 278, "children": [], "start_point": {"row": 73, "column": 44}, "end_point": {"row": 73, "column": 45}}, {"id": 285, "type": "pointer_expression", "text": "&ref2[0][0][0]", "parent": 273, "children": [286], "start_point": {"row": 73, "column": 48}, "end_point": {"row": 73, "column": 62}}, {"id": 286, "type": "subscript_expression", "text": "ref2[0][0][0]", "parent": 285, "children": [287, 292], "start_point": {"row": 73, "column": 49}, "end_point": {"row": 73, "column": 62}}, {"id": 287, "type": "subscript_expression", "text": "ref2[0][0]", "parent": 286, "children": [288, 291], "start_point": {"row": 73, "column": 49}, "end_point": {"row": 73, "column": 59}}, {"id": 288, "type": "subscript_expression", "text": "ref2[0]", "parent": 287, "children": [289, 290], "start_point": {"row": 73, "column": 49}, "end_point": {"row": 73, "column": 56}}, {"id": 289, "type": "identifier", "text": "ref2", "parent": 288, "children": [], "start_point": {"row": 73, "column": 49}, "end_point": {"row": 73, "column": 53}}, {"id": 290, "type": "number_literal", "text": "0", "parent": 288, "children": [], "start_point": {"row": 73, "column": 54}, "end_point": {"row": 73, "column": 55}}, {"id": 291, "type": "number_literal", "text": "0", "parent": 287, "children": [], "start_point": {"row": 73, "column": 57}, "end_point": {"row": 73, "column": 58}}, {"id": 292, "type": "number_literal", "text": "0", "parent": 286, "children": [], "start_point": {"row": 73, "column": 60}, "end_point": {"row": 73, "column": 61}}, {"id": 293, "type": "&&", "text": "&&", "parent": 246, "children": [], "start_point": {"row": 73, "column": 64}, "end_point": {"row": 73, "column": 66}}, {"id": 294, "type": "call_expression", "text": "test_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0])", "parent": 246, "children": [295, 296], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 63}}, {"id": 295, "type": "identifier", "text": "test_pattern_flags", "parent": 294, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 20}}, {"id": 296, "type": "argument_list", "text": "(3, idims, 3, &in[0][0][0], &ref3[0][0][0])", "parent": 294, "children": [297, 298, 299, 300, 308], "start_point": {"row": 74, "column": 20}, "end_point": {"row": 74, "column": 63}}, {"id": 297, "type": "number_literal", "text": "3", "parent": 296, "children": [], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 22}}, {"id": 298, "type": "identifier", "text": "idims", "parent": 296, "children": [], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 29}}, {"id": 299, "type": "number_literal", "text": "3", "parent": 296, "children": [], "start_point": {"row": 74, "column": 31}, "end_point": {"row": 74, "column": 32}}, {"id": 300, "type": "pointer_expression", "text": "&in[0][0][0]", "parent": 296, "children": [301], "start_point": {"row": 74, "column": 34}, "end_point": {"row": 74, "column": 46}}, {"id": 301, "type": "subscript_expression", "text": "in[0][0][0]", "parent": 300, "children": [302, 307], "start_point": {"row": 74, "column": 35}, "end_point": {"row": 74, "column": 46}}, {"id": 302, "type": "subscript_expression", "text": "in[0][0]", "parent": 301, "children": [303, 306], "start_point": {"row": 74, "column": 35}, "end_point": {"row": 74, "column": 43}}, {"id": 303, "type": "subscript_expression", "text": "in[0]", "parent": 302, "children": [304, 305], "start_point": {"row": 74, "column": 35}, "end_point": {"row": 74, "column": 40}}, {"id": 304, "type": "identifier", "text": "in", "parent": 303, "children": [], "start_point": {"row": 74, "column": 35}, "end_point": {"row": 74, "column": 37}}, {"id": 305, "type": "number_literal", "text": "0", "parent": 303, "children": [], "start_point": {"row": 74, "column": 38}, "end_point": {"row": 74, "column": 39}}, {"id": 306, "type": "number_literal", "text": "0", "parent": 302, "children": [], "start_point": {"row": 74, "column": 41}, "end_point": {"row": 74, "column": 42}}, {"id": 307, "type": "number_literal", "text": "0", "parent": 301, "children": [], "start_point": {"row": 74, "column": 44}, "end_point": {"row": 74, "column": 45}}, {"id": 308, "type": "pointer_expression", "text": "&ref3[0][0][0]", "parent": 296, "children": [309], "start_point": {"row": 74, "column": 48}, "end_point": {"row": 74, "column": 62}}, {"id": 309, "type": "subscript_expression", "text": "ref3[0][0][0]", "parent": 308, "children": [310, 315], "start_point": {"row": 74, "column": 49}, "end_point": {"row": 74, "column": 62}}, {"id": 310, "type": "subscript_expression", "text": "ref3[0][0]", "parent": 309, "children": [311, 314], "start_point": {"row": 74, "column": 49}, "end_point": {"row": 74, "column": 59}}, {"id": 311, "type": "subscript_expression", "text": "ref3[0]", "parent": 310, "children": [312, 313], "start_point": {"row": 74, "column": 49}, "end_point": {"row": 74, "column": 56}}, {"id": 312, "type": "identifier", "text": "ref3", "parent": 311, "children": [], "start_point": {"row": 74, "column": 49}, "end_point": {"row": 74, "column": 53}}, {"id": 313, "type": "number_literal", "text": "0", "parent": 311, "children": [], "start_point": {"row": 74, "column": 54}, "end_point": {"row": 74, "column": 55}}, {"id": 314, "type": "number_literal", "text": "0", "parent": 310, "children": [], "start_point": {"row": 74, "column": 57}, "end_point": {"row": 74, "column": 58}}, {"id": 315, "type": "number_literal", "text": "0", "parent": 309, "children": [], "start_point": {"row": 74, "column": 60}, "end_point": {"row": 74, "column": 61}}, {"id": 316, "type": "call_expression", "text": "UT_REGISTER_TEST(test_pattern)", "parent": null, "children": [317, 318], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 30}}, {"id": 317, "type": "identifier", "text": "UT_REGISTER_TEST", "parent": 316, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 16}}, {"id": 318, "type": "argument_list", "text": "(test_pattern)", "parent": 316, "children": [319], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 30}}, {"id": 319, "type": "identifier", "text": "test_pattern", "parent": 318, "children": [], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 29}}]}, "node_categories": {"declarations": {"functions": [24, 26, 119, 121], "variables": [29, 34, 40, 45, 52, 59, 74, 97, 124, 126, 161, 196, 215, 232], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22], "modules": [], "enums": []}, "statements": {"expressions": [65, 69, 83, 89, 102, 103, 104, 113, 245, 246, 247, 248, 254, 255, 256, 257, 262, 263, 264, 265, 271, 277, 278, 279, 280, 285, 286, 287, 288, 294, 300, 301, 302, 303, 308, 309, 310, 311, 316], "assignments": [], "loops": [], "conditionals": [27, 30, 33, 35, 38, 39, 41, 44, 46, 48, 51, 53, 55, 58, 60, 63, 64, 66, 68, 71, 72, 73, 75, 77, 81, 84, 86, 87, 88, 90, 92, 93, 94, 95, 96, 100, 105, 107, 108, 109, 110, 112, 114, 116, 118, 122, 127, 132, 134, 162, 167, 169, 197, 202, 204, 216, 221, 223, 233, 237, 249, 252, 258, 266, 272, 275, 281, 289, 295, 298, 304, 312, 317, 319], "returns": [117, 244], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 135, 136, 137, 142, 143, 144, 146, 147, 148, 150, 151, 152, 154, 155, 156, 158, 159, 160, 170, 171, 172, 177, 178, 179, 181, 182, 183, 185, 186, 187, 189, 190, 191, 193, 194, 195, 205, 206, 207, 212, 213, 214, 224, 225, 226, 231, 238, 241, 242, 243, 251, 253, 259, 260, 261, 267, 268, 269, 274, 276, 282, 283, 284, 290, 291, 292, 297, 299, 305, 306, 307, 313, 314, 315], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 24, "universal_type": "function", "name": "test_pattern_flags", "text_snippet": "static bool test_pattern_flags(unsigned int D, const long dims[D], unsigned int flags, const complex"}, {"node_id": 26, "universal_type": "function", "name": "D,", "text_snippet": "test_pattern_flags(unsigned int D, const long dims[D], unsigned int flags, const complex float* in, "}, {"node_id": 119, "universal_type": "function", "name": "test_pattern", "text_snippet": "static bool test_pattern(void)\n{\n\tconst complex float in[1][5][3] = { {\n\n\t\t{ 3., 0., 0. },\n\t\t{ 0., 2"}, {"node_id": 121, "universal_type": "function", "name": "unknown", "text_snippet": "test_pattern(void)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdlib.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <complex.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"num/flpmath.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"num/multind.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"misc/debug.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"misc/misc.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"misc/mri.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"utest.h\"\n"}, {"node_id": 22, "text": "#include"}]}, "original_source_code": "/* Copyright 2016. The Regents of the University of California.\n * All rights reserved. Use of this source code is governed by\n * a BSD-style license which can be found in the LICENSE file.\n *\n * Authors:\n * 2016 <NAME> <<EMAIL>>\n */\n\n#include <stdlib.h>\n#include <complex.h>\n\n#include \"num/flpmath.h\"\n#include \"num/multind.h\"\n\n#include \"misc/debug.h\"\n#include \"misc/misc.h\"\n#include \"misc/mri.h\"\n\n#include \"utest.h\"\n\n\nstatic bool test_pattern_flags(unsigned int D, const long dims[D], unsigned int flags, const complex float* in, const complex float* ref)\n{\n\tlong odims[D];\n\tmd_select_dims(D, ~flags, odims, dims);\n\n\tcomplex float* out = md_alloc(D, odims, CFL_SIZE);\n\n\testimate_pattern(D, dims, flags, out, in);\n\n\tbool ret = (md_znrmse(D, odims, ref, out) < UT_TOL);\n\n\tmd_free(out);\n\n\treturn ret;\n}\n\n\nstatic bool test_pattern(void)\n{\n\tconst complex float in[1][5][3] = { {\n\n\t\t{ 3., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t\t{ .2, 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 2., 0. },\n\t} };\n\n\n\tconst complex float ref0[1][5][3] = { {\n\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t\t{ 1., 0., 0. },\n\t\t{ 0., 0., 0. },\n\t\t{ 0., 1., 0. },\n\t} };\n\n\tconst complex float ref2[1][1][3] = { {\n\n\t\t{ 1., 1., 0. },\n\t} };\n\n\tconst complex float ref3[1][1][1] = { {\n\n\t\t{ 1. },\n\t} };\n\n\tlong idims[3] = { 3, 5, 1 };\n\n\n\treturn (test_pattern_flags(3, idims, 0, &in[0][0][0], &ref0[0][0][0]) && \n\t\ttest_pattern_flags(3, idims, 2, &in[0][0][0], &ref2[0][0][0]) &&\n\t\ttest_pattern_flags(3, idims, 3, &in[0][0][0], &ref3[0][0][0]));\n}\n\n\nUT_REGISTER_TEST(test_pattern);\n\n"}
384
c
#include <R.h> #include <Rinternals.h> #include <Rdefines.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Generate C function finalizer which prints the string stored in the // protected field //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void gozer_finalizer(SEXP ptr_) { SEXP str_ = R_ExternalPtrProtected(ptr_); const char *txt = CHAR(asChar(str_)); Rprintf("%s\n", txt); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Return a NULL external pointer with a finalizer // @param destructor_ string only // // @return external pointer with a finalizer //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SEXP gozer_(SEXP destructor_) { SEXP ptr_; if (isString(destructor_)) { ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_)); R_RegisterCFinalizer(ptr_, gozer_finalizer); } else { error("Only strings acceptable as destructors in gozer_()"); } SET_CLASS(ptr_, mkString("gozer_string")); UNPROTECT(1); return ptr_; }
32.09
35
(translation_unit) "#include <R.h>\n#include <Rinternals.h>\n#include <Rdefines.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n\n\n\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n// Generate C function finalizer which prints the string stored in the\n// protected field\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nvoid gozer_finalizer(SEXP ptr_) {\n SEXP str_ = R_ExternalPtrProtected(ptr_);\n const char *txt = CHAR(asChar(str_));\n Rprintf("%s\n", txt);\n}\n\n\n\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n// Return a NULL external pointer with a finalizer\n// @param destructor_ string only\n//\n// @return external pointer with a finalizer\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nSEXP gozer_(SEXP destructor_) {\n\n SEXP ptr_;\n if (isString(destructor_)) {\n ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_));\n R_RegisterCFinalizer(ptr_, gozer_finalizer);\n } else {\n error("Only strings acceptable as destructors in gozer_()");\n }\n\n SET_CLASS(ptr_, mkString("gozer_string"));\n\n UNPROTECT(1);\n return ptr_;\n}\n" (preproc_include) "#include <R.h>\n" (#include) "#include" (system_lib_string) "<R.h>" (preproc_include) "#include <Rinternals.h>\n" (#include) "#include" (system_lib_string) "<Rinternals.h>" (preproc_include) "#include <Rdefines.h>\n" (#include) "#include" (system_lib_string) "<Rdefines.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 <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (comment) "//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" (comment) "// Generate C function finalizer which prints the string stored in the" (comment) "// protected field" (comment) "//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" (function_definition) "void gozer_finalizer(SEXP ptr_) {\n SEXP str_ = R_ExternalPtrProtected(ptr_);\n const char *txt = CHAR(asChar(str_));\n Rprintf("%s\n", txt);\n}" (primitive_type) "void" (function_declarator) "gozer_finalizer(SEXP ptr_)" (identifier) "gozer_finalizer" (parameter_list) "(SEXP ptr_)" (() "(" (parameter_declaration) "SEXP ptr_" (type_identifier) "SEXP" (identifier) "ptr_" ()) ")" (compound_statement) "{\n SEXP str_ = R_ExternalPtrProtected(ptr_);\n const char *txt = CHAR(asChar(str_));\n Rprintf("%s\n", txt);\n}" ({) "{" (declaration) "SEXP str_ = R_ExternalPtrProtected(ptr_);" (type_identifier) "SEXP" (init_declarator) "str_ = R_ExternalPtrProtected(ptr_)" (identifier) "str_" (=) "=" (call_expression) "R_ExternalPtrProtected(ptr_)" (identifier) "R_ExternalPtrProtected" (argument_list) "(ptr_)" (() "(" (identifier) "ptr_" ()) ")" (;) ";" (declaration) "const char *txt = CHAR(asChar(str_));" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "*txt = CHAR(asChar(str_))" (pointer_declarator) "*txt" (*) "*" (identifier) "txt" (=) "=" (call_expression) "CHAR(asChar(str_))" (identifier) "CHAR" (argument_list) "(asChar(str_))" (() "(" (call_expression) "asChar(str_)" (identifier) "asChar" (argument_list) "(str_)" (() "(" (identifier) "str_" ()) ")" ()) ")" (;) ";" (expression_statement) "Rprintf("%s\n", txt);" (call_expression) "Rprintf("%s\n", txt)" (identifier) "Rprintf" (argument_list) "("%s\n", txt)" (() "(" (string_literal) ""%s\n"" (") """ (string_content) "%s" (escape_sequence) "\n" (") """ (,) "," (identifier) "txt" ()) ")" (;) ";" (}) "}" (comment) "//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" (comment) "// Return a NULL external pointer with a finalizer" (comment) "// @param destructor_ string only" (comment) "//" (comment) "// @return external pointer with a finalizer" (comment) "//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" (function_definition) "SEXP gozer_(SEXP destructor_) {\n\n SEXP ptr_;\n if (isString(destructor_)) {\n ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_));\n R_RegisterCFinalizer(ptr_, gozer_finalizer);\n } else {\n error("Only strings acceptable as destructors in gozer_()");\n }\n\n SET_CLASS(ptr_, mkString("gozer_string"));\n\n UNPROTECT(1);\n return ptr_;\n}" (type_identifier) "SEXP" (function_declarator) "gozer_(SEXP destructor_)" (identifier) "gozer_" (parameter_list) "(SEXP destructor_)" (() "(" (parameter_declaration) "SEXP destructor_" (type_identifier) "SEXP" (identifier) "destructor_" ()) ")" (compound_statement) "{\n\n SEXP ptr_;\n if (isString(destructor_)) {\n ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_));\n R_RegisterCFinalizer(ptr_, gozer_finalizer);\n } else {\n error("Only strings acceptable as destructors in gozer_()");\n }\n\n SET_CLASS(ptr_, mkString("gozer_string"));\n\n UNPROTECT(1);\n return ptr_;\n}" ({) "{" (declaration) "SEXP ptr_;" (type_identifier) "SEXP" (identifier) "ptr_" (;) ";" (if_statement) "if (isString(destructor_)) {\n ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_));\n R_RegisterCFinalizer(ptr_, gozer_finalizer);\n } else {\n error("Only strings acceptable as destructors in gozer_()");\n }" (if) "if" (parenthesized_expression) "(isString(destructor_))" (() "(" (call_expression) "isString(destructor_)" (identifier) "isString" (argument_list) "(destructor_)" (() "(" (identifier) "destructor_" ()) ")" ()) ")" (compound_statement) "{\n ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_));\n R_RegisterCFinalizer(ptr_, gozer_finalizer);\n }" ({) "{" (expression_statement) "ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_));" (assignment_expression) "ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_))" (identifier) "ptr_" (=) "=" (call_expression) "PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_))" (identifier) "PROTECT" (argument_list) "(R_MakeExternalPtr(NULL, R_NilValue, destructor_))" (() "(" (call_expression) "R_MakeExternalPtr(NULL, R_NilValue, destructor_)" (identifier) "R_MakeExternalPtr" (argument_list) "(NULL, R_NilValue, destructor_)" (() "(" (null) "NULL" (NULL) "NULL" (,) "," (identifier) "R_NilValue" (,) "," (identifier) "destructor_" ()) ")" ()) ")" (;) ";" (expression_statement) "R_RegisterCFinalizer(ptr_, gozer_finalizer);" (call_expression) "R_RegisterCFinalizer(ptr_, gozer_finalizer)" (identifier) "R_RegisterCFinalizer" (argument_list) "(ptr_, gozer_finalizer)" (() "(" (identifier) "ptr_" (,) "," (identifier) "gozer_finalizer" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n error("Only strings acceptable as destructors in gozer_()");\n }" (else) "else" (compound_statement) "{\n error("Only strings acceptable as destructors in gozer_()");\n }" ({) "{" (expression_statement) "error("Only strings acceptable as destructors in gozer_()");" (call_expression) "error("Only strings acceptable as destructors in gozer_()")" (identifier) "error" (argument_list) "("Only strings acceptable as destructors in gozer_()")" (() "(" (string_literal) ""Only strings acceptable as destructors in gozer_()"" (") """ (string_content) "Only strings acceptable as destructors in gozer_()" (") """ ()) ")" (;) ";" (}) "}" (expression_statement) "SET_CLASS(ptr_, mkString("gozer_string"));" (call_expression) "SET_CLASS(ptr_, mkString("gozer_string"))" (identifier) "SET_CLASS" (argument_list) "(ptr_, mkString("gozer_string"))" (() "(" (identifier) "ptr_" (,) "," (call_expression) "mkString("gozer_string")" (identifier) "mkString" (argument_list) "("gozer_string")" (() "(" (string_literal) ""gozer_string"" (") """ (string_content) "gozer_string" (") """ ()) ")" ()) ")" (;) ";" (expression_statement) "UNPROTECT(1);" (call_expression) "UNPROTECT(1)" (identifier) "UNPROTECT" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (return_statement) "return ptr_;" (return) "return" (identifier) "ptr_" (;) ";" (}) "}"
197
0
{"language": "c", "success": true, "metadata": {"lines": 35, "avg_line_length": 32.09, "nodes": 109, "errors": 0, "source_hash": "05b77d5de827c60ff402a04337b1cd21c8874cb3a48efd138e2d4cbe58bb1bb0", "categorized_nodes": 82}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <R.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<R.h>", "parent": 0, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 14}}, {"id": 3, "type": "preproc_include", "text": "#include <Rinternals.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<Rinternals.h>", "parent": 3, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include <Rdefines.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<Rdefines.h>", "parent": 6, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 21}}, {"id": 9, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<stdio.h>", "parent": 9, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 12, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<unistd.h>", "parent": 15, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 19}}, {"id": 18, "type": "function_definition", "text": "void gozer_finalizer(SEXP ptr_) {\n SEXP str_ = R_ExternalPtrProtected(ptr_);\n const char *txt = CHAR(asChar(str_));\n Rprintf(\"%s\\n\", txt);\n}", "parent": null, "children": [19, 20], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 19, "type": "primitive_type", "text": "void", "parent": 18, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 4}}, {"id": 20, "type": "function_declarator", "text": "gozer_finalizer(SEXP ptr_)", "parent": 18, "children": [21, 22], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 31}}, {"id": 21, "type": "identifier", "text": "gozer_finalizer", "parent": 20, "children": [], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 20}}, {"id": 22, "type": "parameter_list", "text": "(SEXP ptr_)", "parent": 20, "children": [23], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 31}}, {"id": 23, "type": "parameter_declaration", "text": "SEXP ptr_", "parent": 22, "children": [24, 25], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 30}}, {"id": 24, "type": "type_identifier", "text": "SEXP", "parent": 23, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 25}}, {"id": 25, "type": "identifier", "text": "ptr_", "parent": 23, "children": [], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 30}}, {"id": 26, "type": "declaration", "text": "SEXP str_ = R_ExternalPtrProtected(ptr_);", "parent": 18, "children": [27, 28], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 43}}, {"id": 27, "type": "type_identifier", "text": "SEXP", "parent": 26, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 6}}, {"id": 28, "type": "init_declarator", "text": "str_ = R_ExternalPtrProtected(ptr_)", "parent": 26, "children": [29, 30, 31], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 42}}, {"id": 29, "type": "identifier", "text": "str_", "parent": 28, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 11}}, {"id": 30, "type": "=", "text": "=", "parent": 28, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 13}}, {"id": 31, "type": "call_expression", "text": "R_ExternalPtrProtected(ptr_)", "parent": 28, "children": [32, 33], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 42}}, {"id": 32, "type": "identifier", "text": "R_ExternalPtrProtected", "parent": 31, "children": [], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 36}}, {"id": 33, "type": "argument_list", "text": "(ptr_)", "parent": 31, "children": [34], "start_point": {"row": 18, "column": 36}, "end_point": {"row": 18, "column": 42}}, {"id": 34, "type": "identifier", "text": "ptr_", "parent": 33, "children": [], "start_point": {"row": 18, "column": 37}, "end_point": {"row": 18, "column": 41}}, {"id": 35, "type": "declaration", "text": "const char *txt = CHAR(asChar(str_));", "parent": 18, "children": [36, 37], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 39}}, {"id": 36, "type": "primitive_type", "text": "char", "parent": 35, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 12}}, {"id": 37, "type": "init_declarator", "text": "*txt = CHAR(asChar(str_))", "parent": 35, "children": [38, 41, 42], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 38}}, {"id": 38, "type": "pointer_declarator", "text": "*txt", "parent": 37, "children": [39, 40], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 17}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 14}}, {"id": 40, "type": "identifier", "text": "txt", "parent": 38, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 17}}, {"id": 41, "type": "=", "text": "=", "parent": 37, "children": [], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 19}}, {"id": 42, "type": "call_expression", "text": "CHAR(asChar(str_))", "parent": 37, "children": [43, 44], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 38}}, {"id": 43, "type": "identifier", "text": "CHAR", "parent": 42, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 24}}, {"id": 44, "type": "argument_list", "text": "(asChar(str_))", "parent": 42, "children": [45], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 38}}, {"id": 45, "type": "call_expression", "text": "asChar(str_)", "parent": 44, "children": [46, 47], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 37}}, {"id": 46, "type": "identifier", "text": "asChar", "parent": 45, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 31}}, {"id": 47, "type": "argument_list", "text": "(str_)", "parent": 45, "children": [48], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 37}}, {"id": 48, "type": "identifier", "text": "str_", "parent": 47, "children": [], "start_point": {"row": 19, "column": 32}, "end_point": {"row": 19, "column": 36}}, {"id": 49, "type": "call_expression", "text": "Rprintf(\"%s\\n\", txt)", "parent": 18, "children": [50, 51], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 22}}, {"id": 50, "type": "identifier", "text": "Rprintf", "parent": 49, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 9}}, {"id": 51, "type": "argument_list", "text": "(\"%s\\n\", txt)", "parent": 49, "children": [52, 54], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 22}}, {"id": 52, "type": "string_literal", "text": "\"%s\\n\"", "parent": 51, "children": [53], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 16}}, {"id": 53, "type": "escape_sequence", "text": "\\n", "parent": 52, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 15}}, {"id": 54, "type": "identifier", "text": "txt", "parent": 51, "children": [], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 21}}, {"id": 55, "type": "function_definition", "text": "SEXP gozer_(SEXP destructor_) {\n\n SEXP ptr_;\n if (isString(destructor_)) {\n ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_));\n R_RegisterCFinalizer(ptr_, gozer_finalizer);\n } else {\n error(\"Only strings acceptable as destructors in gozer_()\");\n }\n\n SET_CLASS(ptr_, mkString(\"gozer_string\"));\n\n UNPROTECT(1);\n return ptr_;\n}", "parent": null, "children": [56, 57], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 56, "type": "type_identifier", "text": "SEXP", "parent": 55, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 4}}, {"id": 57, "type": "function_declarator", "text": "gozer_(SEXP destructor_)", "parent": 55, "children": [58, 59], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 29}}, {"id": 58, "type": "identifier", "text": "gozer_", "parent": 57, "children": [], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 11}}, {"id": 59, "type": "parameter_list", "text": "(SEXP destructor_)", "parent": 57, "children": [60], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 29}}, {"id": 60, "type": "parameter_declaration", "text": "SEXP destructor_", "parent": 59, "children": [61, 62], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 28}}, {"id": 61, "type": "type_identifier", "text": "SEXP", "parent": 60, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 16}}, {"id": 62, "type": "identifier", "text": "destructor_", "parent": 60, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 28}}, {"id": 63, "type": "declaration", "text": "SEXP ptr_;", "parent": 55, "children": [64, 65], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 12}}, {"id": 64, "type": "type_identifier", "text": "SEXP", "parent": 63, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 6}}, {"id": 65, "type": "identifier", "text": "ptr_", "parent": 63, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 11}}, {"id": 66, "type": "if_statement", "text": "if (isString(destructor_)) {\n ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_));\n R_RegisterCFinalizer(ptr_, gozer_finalizer);\n } else {\n error(\"Only strings acceptable as destructors in gozer_()\");\n }", "parent": 55, "children": [67, 90], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 39, "column": 3}}, {"id": 67, "type": "parenthesized_expression", "text": "(isString(destructor_))", "parent": 66, "children": [68], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 28}}, {"id": 68, "type": "call_expression", "text": "isString(destructor_)", "parent": 67, "children": [69, 70], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 27}}, {"id": 69, "type": "identifier", "text": "isString", "parent": 68, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 14}}, {"id": 70, "type": "argument_list", "text": "(destructor_)", "parent": 68, "children": [71], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 27}}, {"id": 71, "type": "identifier", "text": "destructor_", "parent": 70, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 26}}, {"id": 72, "type": "assignment_expression", "text": "ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_))", "parent": 66, "children": [73, 74, 75], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 68}}, {"id": 73, "type": "identifier", "text": "ptr_", "parent": 72, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 8}}, {"id": 74, "type": "=", "text": "=", "parent": 72, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 10}}, {"id": 75, "type": "call_expression", "text": "PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_))", "parent": 72, "children": [76, 77], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 68}}, {"id": 76, "type": "identifier", "text": "PROTECT", "parent": 75, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 18}}, {"id": 77, "type": "argument_list", "text": "(R_MakeExternalPtr(NULL, R_NilValue, destructor_))", "parent": 75, "children": [78], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 68}}, {"id": 78, "type": "call_expression", "text": "R_MakeExternalPtr(NULL, R_NilValue, destructor_)", "parent": 77, "children": [79, 80], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 67}}, {"id": 79, "type": "identifier", "text": "R_MakeExternalPtr", "parent": 78, "children": [], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 36}}, {"id": 80, "type": "argument_list", "text": "(NULL, R_NilValue, destructor_)", "parent": 78, "children": [81, 83, 84], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 67}}, {"id": 81, "type": "null", "text": "NULL", "parent": 80, "children": [82], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 41}}, {"id": 82, "type": "NULL", "text": "NULL", "parent": 81, "children": [], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 41}}, {"id": 83, "type": "identifier", "text": "R_NilValue", "parent": 80, "children": [], "start_point": {"row": 35, "column": 43}, "end_point": {"row": 35, "column": 53}}, {"id": 84, "type": "identifier", "text": "destructor_", "parent": 80, "children": [], "start_point": {"row": 35, "column": 55}, "end_point": {"row": 35, "column": 66}}, {"id": 85, "type": "call_expression", "text": "R_RegisterCFinalizer(ptr_, gozer_finalizer)", "parent": 66, "children": [86, 87], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 47}}, {"id": 86, "type": "identifier", "text": "R_RegisterCFinalizer", "parent": 85, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 24}}, {"id": 87, "type": "argument_list", "text": "(ptr_, gozer_finalizer)", "parent": 85, "children": [88, 89], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 47}}, {"id": 88, "type": "identifier", "text": "ptr_", "parent": 87, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 29}}, {"id": 89, "type": "identifier", "text": "gozer_finalizer", "parent": 87, "children": [], "start_point": {"row": 36, "column": 31}, "end_point": {"row": 36, "column": 46}}, {"id": 90, "type": "else_clause", "text": "else {\n error(\"Only strings acceptable as destructors in gozer_()\");\n }", "parent": 66, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 39, "column": 3}}, {"id": 91, "type": "call_expression", "text": "error(\"Only strings acceptable as destructors in gozer_()\")", "parent": 90, "children": [92, 93], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 63}}, {"id": 92, "type": "identifier", "text": "error", "parent": 91, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 9}}, {"id": 93, "type": "argument_list", "text": "(\"Only strings acceptable as destructors in gozer_()\")", "parent": 91, "children": [94], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 63}}, {"id": 94, "type": "string_literal", "text": "\"Only strings acceptable as destructors in gozer_()\"", "parent": 93, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 62}}, {"id": 95, "type": "call_expression", "text": "SET_CLASS(ptr_, mkString(\"gozer_string\"))", "parent": 55, "children": [96, 97], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 43}}, {"id": 96, "type": "identifier", "text": "SET_CLASS", "parent": 95, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 11}}, {"id": 97, "type": "argument_list", "text": "(ptr_, mkString(\"gozer_string\"))", "parent": 95, "children": [98, 99], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 43}}, {"id": 98, "type": "identifier", "text": "ptr_", "parent": 97, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 16}}, {"id": 99, "type": "call_expression", "text": "mkString(\"gozer_string\")", "parent": 97, "children": [100, 101], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 42}}, {"id": 100, "type": "identifier", "text": "mkString", "parent": 99, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 26}}, {"id": 101, "type": "argument_list", "text": "(\"gozer_string\")", "parent": 99, "children": [102], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 42}}, {"id": 102, "type": "string_literal", "text": "\"gozer_string\"", "parent": 101, "children": [], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 41}}, {"id": 103, "type": "call_expression", "text": "UNPROTECT(1)", "parent": 55, "children": [104, 105], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 14}}, {"id": 104, "type": "identifier", "text": "UNPROTECT", "parent": 103, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 11}}, {"id": 105, "type": "argument_list", "text": "(1)", "parent": 103, "children": [106], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 14}}, {"id": 106, "type": "number_literal", "text": "1", "parent": 105, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 13}}, {"id": 107, "type": "return_statement", "text": "return ptr_;", "parent": 55, "children": [108], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 14}}, {"id": 108, "type": "identifier", "text": "ptr_", "parent": 107, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 13}}]}, "node_categories": {"declarations": {"functions": [18, 20, 55, 57], "variables": [23, 26, 35, 60, 63], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [31, 42, 45, 49, 67, 68, 75, 78, 85, 91, 95, 99, 103], "assignments": [72], "loops": [], "conditionals": [21, 24, 25, 27, 29, 32, 34, 40, 43, 46, 48, 50, 54, 56, 58, 61, 62, 64, 65, 66, 69, 71, 73, 76, 79, 83, 84, 86, 88, 89, 92, 96, 98, 100, 104, 108], "returns": [107], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 52, 94, 102, 106], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 18, "universal_type": "function", "name": "gozer_finalizer", "text_snippet": "void gozer_finalizer(SEXP ptr_) {\n SEXP str_ = R_ExternalPtrProtected(ptr_);\n const char *txt = CH"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "gozer_finalizer(SEXP ptr_)"}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "SEXP gozer_(SEXP destructor_) {\n\n SEXP ptr_;\n if (isString(destructor_)) {\n ptr_ = PROTECT(R_Ma"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "gozer_(SEXP destructor_)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <R.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <Rinternals.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <Rdefines.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"}, {"node_id": 15, "text": "#include <unistd.h>\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "\n\n\n#include <R.h>\n#include <Rinternals.h>\n#include <Rdefines.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n\n\n\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n// Generate C function finalizer which prints the string stored in the\n// protected field\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nvoid gozer_finalizer(SEXP ptr_) {\n SEXP str_ = R_ExternalPtrProtected(ptr_);\n const char *txt = CHAR(asChar(str_));\n Rprintf(\"%s\\n\", txt);\n}\n\n\n\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n// Return a NULL external pointer with a finalizer\n// @param destructor_ string only\n//\n// @return external pointer with a finalizer\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nSEXP gozer_(SEXP destructor_) {\n\n SEXP ptr_;\n if (isString(destructor_)) {\n ptr_ = PROTECT(R_MakeExternalPtr(NULL, R_NilValue, destructor_));\n R_RegisterCFinalizer(ptr_, gozer_finalizer);\n } else {\n error(\"Only strings acceptable as destructors in gozer_()\");\n }\n\n SET_CLASS(ptr_, mkString(\"gozer_string\"));\n\n UNPROTECT(1);\n return ptr_;\n}\n"}
385
c
/* * <NAME> * * Based on Y.A.Chong's work (http://myarduinomelodies.blogspot.com/2013/11/2-jingle-bell.html) */ int jingleBellTempo = 123; int jingleBellNotes[] = { N_G4, N_E5, N_D5, N_C5, N_G4, N_G4, N_E5, N_D5, N_C5, N_A4, N_A4, N_F5, N_E5, N_D5, N_B4, N_G5, N_G5, N_F5, N_D5, N_E5, N_G4, N_E5, N_D5, N_C5, N_G4, N_G4, N_E5, N_D5, N_C5, N_A4, N_A4, N_F5, N_E5, N_D5, N_G5, N_G5, N_G5, N_G5, N_G5, N_A5, N_G5, N_F5, N_D5, N_C5, N_G5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_G5, N_C5, N_D5, N_E5, N_F5, N_F5, N_F5, N_F5, N_F5, N_F5, N_E5, N_E5, N_E5, N_E5, N_E5, N_D5, N_D5, N_E5, N_D5, N_G5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_G5, N_C5, N_D5, N_E5, N_F5, N_F5, N_F5, N_F5, N_F5, N_F5, N_E5, N_E5, N_E5, N_E5, N_G5, N_G5, N_F5, N_D5, N_C5}; int jingleBellDurations[] = { 8, 8, 8, 8, 2, 8, 8, 8, 8, 2, 8, 8, 8, 8, 2, 8, 8, 8, 8, 2, 8, 8, 8, 8, 2, 8, 8, 8, 8, 2, 8, 8, 8, 8, 8, 8, 8, 16, 16, 8, 8, 8, 8, 4, 4, 8, 8, 4, 8, 8, 4, 8, 8, 8, 8, 2, 8, 8, 8, 16, 16, 8, 8, 8, 16, 16, 8, 8, 8, 8, 4, 4, 8, 8, 4, 8, 8, 4, 8, 8, 8, 8, 2, 8, 8, 8, 16, 16, 8, 8, 8, 16, 16, 8, 8, 8, 8, 2};
34.24
34
(translation_unit) "/*\n * <NAME>\n * \n * Based on Y.A.Chong's work (http://myarduinomelodies.blogspot.com/2013/11/2-jingle-bell.html)\n */\n\nint jingleBellTempo = 123;\n\nint jingleBellNotes[] = {\n N_G4, N_E5, N_D5, N_C5, N_G4, N_G4, N_E5, N_D5,\n N_C5, N_A4, N_A4, N_F5, N_E5, N_D5, N_B4, N_G5,\n N_G5, N_F5, N_D5, N_E5, N_G4, N_E5, N_D5, N_C5,\n N_G4, N_G4, N_E5, N_D5, N_C5, N_A4, N_A4, N_F5,\n N_E5, N_D5, N_G5, N_G5, N_G5, N_G5, N_G5, N_A5,\n N_G5, N_F5, N_D5, N_C5, N_G5, N_E5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_E5, N_G5, N_C5, N_D5, N_E5,\n N_F5, N_F5, N_F5, N_F5, N_F5, N_F5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_D5, N_D5, N_E5, N_D5, N_G5,\n N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_G5,\n N_C5, N_D5, N_E5, N_F5, N_F5, N_F5, N_F5, N_F5,\n N_F5, N_E5, N_E5, N_E5, N_E5, N_G5, N_G5, N_F5,\n N_D5, N_C5};\n\nint jingleBellDurations[] = {\n 8, 8, 8, 8, 2, 8, 8, 8,\n 8, 2, 8, 8, 8, 8, 2, 8,\n 8, 8, 8, 2, 8, 8, 8, 8,\n 2, 8, 8, 8, 8, 2, 8, 8,\n 8, 8, 8, 8, 8, 16, 16, 8,\n 8, 8, 8, 4, 4, 8, 8, 4,\n 8, 8, 4, 8, 8, 8, 8, 2,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 16, 16, 8, 8, 8, 8, 4, 4,\n 8, 8, 4, 8, 8, 4, 8, 8,\n 8, 8, 2, 8, 8, 8, 16, 16,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 8, 2};" (comment) "/*\n * <NAME>\n * \n * Based on Y.A.Chong's work (http://myarduinomelodies.blogspot.com/2013/11/2-jingle-bell.html)\n */" (declaration) "int jingleBellTempo = 123;" (primitive_type) "int" (init_declarator) "jingleBellTempo = 123" (identifier) "jingleBellTempo" (=) "=" (number_literal) "123" (;) ";" (declaration) "int jingleBellNotes[] = {\n N_G4, N_E5, N_D5, N_C5, N_G4, N_G4, N_E5, N_D5,\n N_C5, N_A4, N_A4, N_F5, N_E5, N_D5, N_B4, N_G5,\n N_G5, N_F5, N_D5, N_E5, N_G4, N_E5, N_D5, N_C5,\n N_G4, N_G4, N_E5, N_D5, N_C5, N_A4, N_A4, N_F5,\n N_E5, N_D5, N_G5, N_G5, N_G5, N_G5, N_G5, N_A5,\n N_G5, N_F5, N_D5, N_C5, N_G5, N_E5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_E5, N_G5, N_C5, N_D5, N_E5,\n N_F5, N_F5, N_F5, N_F5, N_F5, N_F5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_D5, N_D5, N_E5, N_D5, N_G5,\n N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_G5,\n N_C5, N_D5, N_E5, N_F5, N_F5, N_F5, N_F5, N_F5,\n N_F5, N_E5, N_E5, N_E5, N_E5, N_G5, N_G5, N_F5,\n N_D5, N_C5};" (primitive_type) "int" (init_declarator) "jingleBellNotes[] = {\n N_G4, N_E5, N_D5, N_C5, N_G4, N_G4, N_E5, N_D5,\n N_C5, N_A4, N_A4, N_F5, N_E5, N_D5, N_B4, N_G5,\n N_G5, N_F5, N_D5, N_E5, N_G4, N_E5, N_D5, N_C5,\n N_G4, N_G4, N_E5, N_D5, N_C5, N_A4, N_A4, N_F5,\n N_E5, N_D5, N_G5, N_G5, N_G5, N_G5, N_G5, N_A5,\n N_G5, N_F5, N_D5, N_C5, N_G5, N_E5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_E5, N_G5, N_C5, N_D5, N_E5,\n N_F5, N_F5, N_F5, N_F5, N_F5, N_F5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_D5, N_D5, N_E5, N_D5, N_G5,\n N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_G5,\n N_C5, N_D5, N_E5, N_F5, N_F5, N_F5, N_F5, N_F5,\n N_F5, N_E5, N_E5, N_E5, N_E5, N_G5, N_G5, N_F5,\n N_D5, N_C5}" (array_declarator) "jingleBellNotes[]" (identifier) "jingleBellNotes" ([) "[" (]) "]" (=) "=" (initializer_list) "{\n N_G4, N_E5, N_D5, N_C5, N_G4, N_G4, N_E5, N_D5,\n N_C5, N_A4, N_A4, N_F5, N_E5, N_D5, N_B4, N_G5,\n N_G5, N_F5, N_D5, N_E5, N_G4, N_E5, N_D5, N_C5,\n N_G4, N_G4, N_E5, N_D5, N_C5, N_A4, N_A4, N_F5,\n N_E5, N_D5, N_G5, N_G5, N_G5, N_G5, N_G5, N_A5,\n N_G5, N_F5, N_D5, N_C5, N_G5, N_E5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_E5, N_G5, N_C5, N_D5, N_E5,\n N_F5, N_F5, N_F5, N_F5, N_F5, N_F5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_D5, N_D5, N_E5, N_D5, N_G5,\n N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_G5,\n N_C5, N_D5, N_E5, N_F5, N_F5, N_F5, N_F5, N_F5,\n N_F5, N_E5, N_E5, N_E5, N_E5, N_G5, N_G5, N_F5,\n N_D5, N_C5}" ({) "{" (identifier) "N_G4" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_C5" (,) "," (identifier) "N_G4" (,) "," (identifier) "N_G4" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_C5" (,) "," (identifier) "N_A4" (,) "," (identifier) "N_A4" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_B4" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_G4" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_C5" (,) "," (identifier) "N_G4" (,) "," (identifier) "N_G4" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_C5" (,) "," (identifier) "N_A4" (,) "," (identifier) "N_A4" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_A5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_C5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_C5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_C5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_E5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_G5" (,) "," (identifier) "N_F5" (,) "," (identifier) "N_D5" (,) "," (identifier) "N_C5" (}) "}" (;) ";" (declaration) "int jingleBellDurations[] = {\n 8, 8, 8, 8, 2, 8, 8, 8,\n 8, 2, 8, 8, 8, 8, 2, 8,\n 8, 8, 8, 2, 8, 8, 8, 8,\n 2, 8, 8, 8, 8, 2, 8, 8,\n 8, 8, 8, 8, 8, 16, 16, 8,\n 8, 8, 8, 4, 4, 8, 8, 4,\n 8, 8, 4, 8, 8, 8, 8, 2,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 16, 16, 8, 8, 8, 8, 4, 4,\n 8, 8, 4, 8, 8, 4, 8, 8,\n 8, 8, 2, 8, 8, 8, 16, 16,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 8, 2};" (primitive_type) "int" (init_declarator) "jingleBellDurations[] = {\n 8, 8, 8, 8, 2, 8, 8, 8,\n 8, 2, 8, 8, 8, 8, 2, 8,\n 8, 8, 8, 2, 8, 8, 8, 8,\n 2, 8, 8, 8, 8, 2, 8, 8,\n 8, 8, 8, 8, 8, 16, 16, 8,\n 8, 8, 8, 4, 4, 8, 8, 4,\n 8, 8, 4, 8, 8, 8, 8, 2,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 16, 16, 8, 8, 8, 8, 4, 4,\n 8, 8, 4, 8, 8, 4, 8, 8,\n 8, 8, 2, 8, 8, 8, 16, 16,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 8, 2}" (array_declarator) "jingleBellDurations[]" (identifier) "jingleBellDurations" ([) "[" (]) "]" (=) "=" (initializer_list) "{\n 8, 8, 8, 8, 2, 8, 8, 8,\n 8, 2, 8, 8, 8, 8, 2, 8,\n 8, 8, 8, 2, 8, 8, 8, 8,\n 2, 8, 8, 8, 8, 2, 8, 8,\n 8, 8, 8, 8, 8, 16, 16, 8,\n 8, 8, 8, 4, 4, 8, 8, 4,\n 8, 8, 4, 8, 8, 8, 8, 2,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 16, 16, 8, 8, 8, 8, 4, 4,\n 8, 8, 4, 8, 8, 4, 8, 8,\n 8, 8, 2, 8, 8, 8, 16, 16,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 8, 2}" ({) "{" (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "2" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "2" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "2" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "2" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "2" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "2" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "16" (,) "," (number_literal) "16" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "4" (,) "," (number_literal) "4" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "4" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "4" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "2" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "16" (,) "," (number_literal) "16" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "16" (,) "," (number_literal) "16" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "4" (,) "," (number_literal) "4" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "4" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "4" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "2" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "16" (,) "," (number_literal) "16" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "16" (,) "," (number_literal) "16" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "8" (,) "," (number_literal) "2" (}) "}" (;) ";"
423
0
{"language": "c", "success": true, "metadata": {"lines": 34, "avg_line_length": 34.24, "nodes": 216, "errors": 0, "source_hash": "113d7de84d7060ac3ceac45b676d7a6e927d04620ef23a443e467af3a19c88c8", "categorized_nodes": 203}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "declaration", "text": "int jingleBellTempo = 123;", "parent": null, "children": [1, 2], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 26}}, {"id": 1, "type": "primitive_type", "text": "int", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 3}}, {"id": 2, "type": "init_declarator", "text": "jingleBellTempo = 123", "parent": 0, "children": [3, 4, 5], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 25}}, {"id": 3, "type": "identifier", "text": "jingleBellTempo", "parent": 2, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 19}}, {"id": 4, "type": "=", "text": "=", "parent": 2, "children": [], "start_point": {"row": 6, "column": 20}, "end_point": {"row": 6, "column": 21}}, {"id": 5, "type": "number_literal", "text": "123", "parent": 2, "children": [], "start_point": {"row": 6, "column": 22}, "end_point": {"row": 6, "column": 25}}, {"id": 6, "type": "declaration", "text": "int jingleBellNotes[] = {\n N_G4, N_E5, N_D5, N_C5, N_G4, N_G4, N_E5, N_D5,\n N_C5, N_A4, N_A4, N_F5, N_E5, N_D5, N_B4, N_G5,\n N_G5, N_F5, N_D5, N_E5, N_G4, N_E5, N_D5, N_C5,\n N_G4, N_G4, N_E5, N_D5, N_C5, N_A4, N_A4, N_F5,\n N_E5, N_D5, N_G5, N_G5, N_G5, N_G5, N_G5, N_A5,\n N_G5, N_F5, N_D5, N_C5, N_G5, N_E5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_E5, N_G5, N_C5, N_D5, N_E5,\n N_F5, N_F5, N_F5, N_F5, N_F5, N_F5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_D5, N_D5, N_E5, N_D5, N_G5,\n N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_G5,\n N_C5, N_D5, N_E5, N_F5, N_F5, N_F5, N_F5, N_F5,\n N_F5, N_E5, N_E5, N_E5, N_E5, N_G5, N_G5, N_F5,\n N_D5, N_C5};", "parent": null, "children": [7, 8], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 21, "column": 16}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 3}}, {"id": 8, "type": "init_declarator", "text": "jingleBellNotes[] = {\n N_G4, N_E5, N_D5, N_C5, N_G4, N_G4, N_E5, N_D5,\n N_C5, N_A4, N_A4, N_F5, N_E5, N_D5, N_B4, N_G5,\n N_G5, N_F5, N_D5, N_E5, N_G4, N_E5, N_D5, N_C5,\n N_G4, N_G4, N_E5, N_D5, N_C5, N_A4, N_A4, N_F5,\n N_E5, N_D5, N_G5, N_G5, N_G5, N_G5, N_G5, N_A5,\n N_G5, N_F5, N_D5, N_C5, N_G5, N_E5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_E5, N_G5, N_C5, N_D5, N_E5,\n N_F5, N_F5, N_F5, N_F5, N_F5, N_F5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_D5, N_D5, N_E5, N_D5, N_G5,\n N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_G5,\n N_C5, N_D5, N_E5, N_F5, N_F5, N_F5, N_F5, N_F5,\n N_F5, N_E5, N_E5, N_E5, N_E5, N_G5, N_G5, N_F5,\n N_D5, N_C5}", "parent": 6, "children": [9, 11, 12], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 21, "column": 15}}, {"id": 9, "type": "array_declarator", "text": "jingleBellNotes[]", "parent": 8, "children": [10], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 21}}, {"id": 10, "type": "identifier", "text": "jingleBellNotes", "parent": 9, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 19}}, {"id": 11, "type": "=", "text": "=", "parent": 8, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 23}}, {"id": 12, "type": "initializer_list", "text": "{\n N_G4, N_E5, N_D5, N_C5, N_G4, N_G4, N_E5, N_D5,\n N_C5, N_A4, N_A4, N_F5, N_E5, N_D5, N_B4, N_G5,\n N_G5, N_F5, N_D5, N_E5, N_G4, N_E5, N_D5, N_C5,\n N_G4, N_G4, N_E5, N_D5, N_C5, N_A4, N_A4, N_F5,\n N_E5, N_D5, N_G5, N_G5, N_G5, N_G5, N_G5, N_A5,\n N_G5, N_F5, N_D5, N_C5, N_G5, N_E5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_E5, N_G5, N_C5, N_D5, N_E5,\n N_F5, N_F5, N_F5, N_F5, N_F5, N_F5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_D5, N_D5, N_E5, N_D5, N_G5,\n N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_G5,\n N_C5, N_D5, N_E5, N_F5, N_F5, N_F5, N_F5, N_F5,\n N_F5, N_E5, N_E5, N_E5, N_E5, N_G5, N_G5, N_F5,\n N_D5, N_C5}", "parent": 8, "children": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 21, "column": 15}}, {"id": 13, "type": "identifier", "text": "N_G4", "parent": 12, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 8}}, {"id": 14, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 14}}, {"id": 15, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 20}}, {"id": 16, "type": "identifier", "text": "N_C5", "parent": 12, "children": [], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 26}}, {"id": 17, "type": "identifier", "text": "N_G4", "parent": 12, "children": [], "start_point": {"row": 9, "column": 28}, "end_point": {"row": 9, "column": 32}}, {"id": 18, "type": "identifier", "text": "N_G4", "parent": 12, "children": [], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 38}}, {"id": 19, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 9, "column": 40}, "end_point": {"row": 9, "column": 44}}, {"id": 20, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 9, "column": 46}, "end_point": {"row": 9, "column": 50}}, {"id": 21, "type": "identifier", "text": "N_C5", "parent": 12, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 8}}, {"id": 22, "type": "identifier", "text": "N_A4", "parent": 12, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 14}}, {"id": 23, "type": "identifier", "text": "N_A4", "parent": 12, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 20}}, {"id": 24, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 26}}, {"id": 25, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 10, "column": 28}, "end_point": {"row": 10, "column": 32}}, {"id": 26, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 10, "column": 34}, "end_point": {"row": 10, "column": 38}}, {"id": 27, "type": "identifier", "text": "N_B4", "parent": 12, "children": [], "start_point": {"row": 10, "column": 40}, "end_point": {"row": 10, "column": 44}}, {"id": 28, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 50}}, {"id": 29, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 8}}, {"id": 30, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 14}}, {"id": 31, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 20}}, {"id": 32, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 26}}, {"id": 33, "type": "identifier", "text": "N_G4", "parent": 12, "children": [], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 32}}, {"id": 34, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 11, "column": 34}, "end_point": {"row": 11, "column": 38}}, {"id": 35, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 11, "column": 40}, "end_point": {"row": 11, "column": 44}}, {"id": 36, "type": "identifier", "text": "N_C5", "parent": 12, "children": [], "start_point": {"row": 11, "column": 46}, "end_point": {"row": 11, "column": 50}}, {"id": 37, "type": "identifier", "text": "N_G4", "parent": 12, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 8}}, {"id": 38, "type": "identifier", "text": "N_G4", "parent": 12, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 14}}, {"id": 39, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 20}}, {"id": 40, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 26}}, {"id": 41, "type": "identifier", "text": "N_C5", "parent": 12, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 32}}, {"id": 42, "type": "identifier", "text": "N_A4", "parent": 12, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 38}}, {"id": 43, "type": "identifier", "text": "N_A4", "parent": 12, "children": [], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 44}}, {"id": 44, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 12, "column": 46}, "end_point": {"row": 12, "column": 50}}, {"id": 45, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 8}}, {"id": 46, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 14}}, {"id": 47, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 20}}, {"id": 48, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 26}}, {"id": 49, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 32}}, {"id": 50, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 13, "column": 34}, "end_point": {"row": 13, "column": 38}}, {"id": 51, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 13, "column": 40}, "end_point": {"row": 13, "column": 44}}, {"id": 52, "type": "identifier", "text": "N_A5", "parent": 12, "children": [], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 50}}, {"id": 53, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 8}}, {"id": 54, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 14}}, {"id": 55, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 20}}, {"id": 56, "type": "identifier", "text": "N_C5", "parent": 12, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 26}}, {"id": 57, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 32}}, {"id": 58, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 38}}, {"id": 59, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 14, "column": 40}, "end_point": {"row": 14, "column": 44}}, {"id": 60, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 14, "column": 46}, "end_point": {"row": 14, "column": 50}}, {"id": 61, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 8}}, {"id": 62, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 14}}, {"id": 63, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 20}}, {"id": 64, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 26}}, {"id": 65, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 32}}, {"id": 66, "type": "identifier", "text": "N_C5", "parent": 12, "children": [], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 38}}, {"id": 67, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 15, "column": 40}, "end_point": {"row": 15, "column": 44}}, {"id": 68, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 15, "column": 46}, "end_point": {"row": 15, "column": 50}}, {"id": 69, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 8}}, {"id": 70, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 14}}, {"id": 71, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 20}}, {"id": 72, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 26}}, {"id": 73, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 32}}, {"id": 74, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 38}}, {"id": 75, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 16, "column": 40}, "end_point": {"row": 16, "column": 44}}, {"id": 76, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 16, "column": 46}, "end_point": {"row": 16, "column": 50}}, {"id": 77, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 8}}, {"id": 78, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 14}}, {"id": 79, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 20}}, {"id": 80, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 26}}, {"id": 81, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 32}}, {"id": 82, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 38}}, {"id": 83, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 17, "column": 40}, "end_point": {"row": 17, "column": 44}}, {"id": 84, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 17, "column": 46}, "end_point": {"row": 17, "column": 50}}, {"id": 85, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 8}}, {"id": 86, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 14}}, {"id": 87, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 20}}, {"id": 88, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 26}}, {"id": 89, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 32}}, {"id": 90, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 18, "column": 34}, "end_point": {"row": 18, "column": 38}}, {"id": 91, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 18, "column": 40}, "end_point": {"row": 18, "column": 44}}, {"id": 92, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 18, "column": 46}, "end_point": {"row": 18, "column": 50}}, {"id": 93, "type": "identifier", "text": "N_C5", "parent": 12, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 8}}, {"id": 94, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 14}}, {"id": 95, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 20}}, {"id": 96, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 26}}, {"id": 97, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 32}}, {"id": 98, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 19, "column": 34}, "end_point": {"row": 19, "column": 38}}, {"id": 99, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 19, "column": 40}, "end_point": {"row": 19, "column": 44}}, {"id": 100, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 19, "column": 46}, "end_point": {"row": 19, "column": 50}}, {"id": 101, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 8}}, {"id": 102, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 14}}, {"id": 103, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 20}}, {"id": 104, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 26}}, {"id": 105, "type": "identifier", "text": "N_E5", "parent": 12, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 32}}, {"id": 106, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 20, "column": 34}, "end_point": {"row": 20, "column": 38}}, {"id": 107, "type": "identifier", "text": "N_G5", "parent": 12, "children": [], "start_point": {"row": 20, "column": 40}, "end_point": {"row": 20, "column": 44}}, {"id": 108, "type": "identifier", "text": "N_F5", "parent": 12, "children": [], "start_point": {"row": 20, "column": 46}, "end_point": {"row": 20, "column": 50}}, {"id": 109, "type": "identifier", "text": "N_D5", "parent": 12, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 8}}, {"id": 110, "type": "identifier", "text": "N_C5", "parent": 12, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 14}}, {"id": 111, "type": "declaration", "text": "int jingleBellDurations[] = {\n 8, 8, 8, 8, 2, 8, 8, 8,\n 8, 2, 8, 8, 8, 8, 2, 8,\n 8, 8, 8, 2, 8, 8, 8, 8,\n 2, 8, 8, 8, 8, 2, 8, 8,\n 8, 8, 8, 8, 8, 16, 16, 8,\n 8, 8, 8, 4, 4, 8, 8, 4,\n 8, 8, 4, 8, 8, 8, 8, 2,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 16, 16, 8, 8, 8, 8, 4, 4,\n 8, 8, 4, 8, 8, 4, 8, 8,\n 8, 8, 2, 8, 8, 8, 16, 16,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 8, 2};", "parent": null, "children": [112, 113], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 36, "column": 10}}, {"id": 112, "type": "primitive_type", "text": "int", "parent": 111, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 3}}, {"id": 113, "type": "init_declarator", "text": "jingleBellDurations[] = {\n 8, 8, 8, 8, 2, 8, 8, 8,\n 8, 2, 8, 8, 8, 8, 2, 8,\n 8, 8, 8, 2, 8, 8, 8, 8,\n 2, 8, 8, 8, 8, 2, 8, 8,\n 8, 8, 8, 8, 8, 16, 16, 8,\n 8, 8, 8, 4, 4, 8, 8, 4,\n 8, 8, 4, 8, 8, 8, 8, 2,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 16, 16, 8, 8, 8, 8, 4, 4,\n 8, 8, 4, 8, 8, 4, 8, 8,\n 8, 8, 2, 8, 8, 8, 16, 16,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 8, 2}", "parent": 111, "children": [114, 116, 117], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 36, "column": 9}}, {"id": 114, "type": "array_declarator", "text": "jingleBellDurations[]", "parent": 113, "children": [115], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 25}}, {"id": 115, "type": "identifier", "text": "jingleBellDurations", "parent": 114, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 23}}, {"id": 116, "type": "=", "text": "=", "parent": 113, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 27}}, {"id": 117, "type": "initializer_list", "text": "{\n 8, 8, 8, 8, 2, 8, 8, 8,\n 8, 2, 8, 8, 8, 8, 2, 8,\n 8, 8, 8, 2, 8, 8, 8, 8,\n 2, 8, 8, 8, 8, 2, 8, 8,\n 8, 8, 8, 8, 8, 16, 16, 8,\n 8, 8, 8, 4, 4, 8, 8, 4,\n 8, 8, 4, 8, 8, 8, 8, 2,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 16, 16, 8, 8, 8, 8, 4, 4,\n 8, 8, 4, 8, 8, 4, 8, 8,\n 8, 8, 2, 8, 8, 8, 16, 16,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 8, 2}", "parent": 113, "children": [118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 36, "column": 9}}, {"id": 118, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 5}}, {"id": 119, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 8}}, {"id": 120, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 11}}, {"id": 121, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 14}}, {"id": 122, "type": "number_literal", "text": "2", "parent": 117, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 17}}, {"id": 123, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 20}}, {"id": 124, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 24, "column": 22}, "end_point": {"row": 24, "column": 23}}, {"id": 125, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 26}}, {"id": 126, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 5}}, {"id": 127, "type": "number_literal", "text": "2", "parent": 117, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 8}}, {"id": 128, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 11}}, {"id": 129, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 14}}, {"id": 130, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 17}}, {"id": 131, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 20}}, {"id": 132, "type": "number_literal", "text": "2", "parent": 117, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 23}}, {"id": 133, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 26}}, {"id": 134, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 5}}, {"id": 135, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 8}}, {"id": 136, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 11}}, {"id": 137, "type": "number_literal", "text": "2", "parent": 117, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 14}}, {"id": 138, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 17}}, {"id": 139, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 20}}, {"id": 140, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 23}}, {"id": 141, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 26}}, {"id": 142, "type": "number_literal", "text": "2", "parent": 117, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 5}}, {"id": 143, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 8}}, {"id": 144, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 11}}, {"id": 145, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 14}}, {"id": 146, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 17}}, {"id": 147, "type": "number_literal", "text": "2", "parent": 117, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 20}}, {"id": 148, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 23}}, {"id": 149, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 27, "column": 25}, "end_point": {"row": 27, "column": 26}}, {"id": 150, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 5}}, {"id": 151, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 8}}, {"id": 152, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 11}}, {"id": 153, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 14}}, {"id": 154, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 28, "column": 16}, "end_point": {"row": 28, "column": 17}}, {"id": 155, "type": "number_literal", "text": "16", "parent": 117, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 21}}, {"id": 156, "type": "number_literal", "text": "16", "parent": 117, "children": [], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 25}}, {"id": 157, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 28}}, {"id": 158, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 5}}, {"id": 159, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 8}}, {"id": 160, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 11}}, {"id": 161, "type": "number_literal", "text": "4", "parent": 117, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 14}}, {"id": 162, "type": "number_literal", "text": "4", "parent": 117, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 17}}, {"id": 163, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 20}}, {"id": 164, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 23}}, {"id": 165, "type": "number_literal", "text": "4", "parent": 117, "children": [], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 26}}, {"id": 166, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 5}}, {"id": 167, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 8}}, {"id": 168, "type": "number_literal", "text": "4", "parent": 117, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 11}}, {"id": 169, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 14}}, {"id": 170, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 17}}, {"id": 171, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 20}}, {"id": 172, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 23}}, {"id": 173, "type": "number_literal", "text": "2", "parent": 117, "children": [], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 26}}, {"id": 174, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 5}}, {"id": 175, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 8}}, {"id": 176, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 11}}, {"id": 177, "type": "number_literal", "text": "16", "parent": 117, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 15}}, {"id": 178, "type": "number_literal", "text": "16", "parent": 117, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 19}}, {"id": 179, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 22}}, {"id": 180, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 25}}, {"id": 181, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 28}}, {"id": 182, "type": "number_literal", "text": "16", "parent": 117, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 6}}, {"id": 183, "type": "number_literal", "text": "16", "parent": 117, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 10}}, {"id": 184, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 13}}, {"id": 185, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 16}}, {"id": 186, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 19}}, {"id": 187, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 22}}, {"id": 188, "type": "number_literal", "text": "4", "parent": 117, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 25}}, {"id": 189, "type": "number_literal", "text": "4", "parent": 117, "children": [], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 28}}, {"id": 190, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 5}}, {"id": 191, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 8}}, {"id": 192, "type": "number_literal", "text": "4", "parent": 117, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 11}}, {"id": 193, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 14}}, {"id": 194, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 17}}, {"id": 195, "type": "number_literal", "text": "4", "parent": 117, "children": [], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 20}}, {"id": 196, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 23}}, {"id": 197, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 26}}, {"id": 198, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 5}}, {"id": 199, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 8}}, {"id": 200, "type": "number_literal", "text": "2", "parent": 117, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 11}}, {"id": 201, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 14}}, {"id": 202, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 17}}, {"id": 203, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 20}}, {"id": 204, "type": "number_literal", "text": "16", "parent": 117, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 24}}, {"id": 205, "type": "number_literal", "text": "16", "parent": 117, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 28}}, {"id": 206, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 5}}, {"id": 207, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 8}}, {"id": 208, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 11}}, {"id": 209, "type": "number_literal", "text": "16", "parent": 117, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 15}}, {"id": 210, "type": "number_literal", "text": "16", "parent": 117, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 19}}, {"id": 211, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 22}}, {"id": 212, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 25}}, {"id": 213, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 28}}, {"id": 214, "type": "number_literal", "text": "8", "parent": 117, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 5}}, {"id": 215, "type": "number_literal", "text": "2", "parent": 117, "children": [], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 8}}]}, "node_categories": {"declarations": {"functions": [], "variables": [0, 6, 111], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [3, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 115], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [5, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "/*\n * <NAME>\n * \n * Based on Y.A.Chong's work (http://myarduinomelodies.blogspot.com/2013/11/2-jingle-bell.html)\n */\n\nint jingleBellTempo = 123;\n\nint jingleBellNotes[] = {\n N_G4, N_E5, N_D5, N_C5, N_G4, N_G4, N_E5, N_D5,\n N_C5, N_A4, N_A4, N_F5, N_E5, N_D5, N_B4, N_G5,\n N_G5, N_F5, N_D5, N_E5, N_G4, N_E5, N_D5, N_C5,\n N_G4, N_G4, N_E5, N_D5, N_C5, N_A4, N_A4, N_F5,\n N_E5, N_D5, N_G5, N_G5, N_G5, N_G5, N_G5, N_A5,\n N_G5, N_F5, N_D5, N_C5, N_G5, N_E5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_E5, N_G5, N_C5, N_D5, N_E5,\n N_F5, N_F5, N_F5, N_F5, N_F5, N_F5, N_E5, N_E5,\n N_E5, N_E5, N_E5, N_D5, N_D5, N_E5, N_D5, N_G5,\n N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_E5, N_G5,\n N_C5, N_D5, N_E5, N_F5, N_F5, N_F5, N_F5, N_F5,\n N_F5, N_E5, N_E5, N_E5, N_E5, N_G5, N_G5, N_F5,\n N_D5, N_C5};\n\nint jingleBellDurations[] = {\n 8, 8, 8, 8, 2, 8, 8, 8,\n 8, 2, 8, 8, 8, 8, 2, 8,\n 8, 8, 8, 2, 8, 8, 8, 8,\n 2, 8, 8, 8, 8, 2, 8, 8,\n 8, 8, 8, 8, 8, 16, 16, 8,\n 8, 8, 8, 4, 4, 8, 8, 4,\n 8, 8, 4, 8, 8, 8, 8, 2,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 16, 16, 8, 8, 8, 8, 4, 4,\n 8, 8, 4, 8, 8, 4, 8, 8,\n 8, 8, 2, 8, 8, 8, 16, 16,\n 8, 8, 8, 16, 16, 8, 8, 8,\n 8, 2};"}
386
c
/* * Copyright (C) Texas Instruments - http://www.ti.com/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "CameraHal.h" #include <ui/GraphicBufferMapper.h> #include <hal_public.h> //temporarily define format here #define HAL_PIXEL_FORMAT_TI_NV12 0x100 namespace android { /** * Display handler class - This class basically handles the buffer posting to display */ class ANativeWindowDisplayAdapter : public DisplayAdapter { public: typedef struct { void *mBuffer; void *mUser; int mOffset; int mWidth; int mHeight; int mWidthStride; int mHeightStride; int mLength; CameraFrame::FrameType mType; } DisplayFrame; enum DisplayStates { DISPLAY_INIT = 0, DISPLAY_STARTED, DISPLAY_STOPPED, DISPLAY_EXITED }; public: ANativeWindowDisplayAdapter(); virtual ~ANativeWindowDisplayAdapter(); ///Initializes the display adapter creates any resources required virtual status_t initialize(); virtual int setPreviewWindow(struct preview_stream_ops *window); virtual int setFrameProvider(FrameNotifier *frameProvider); virtual int setErrorHandler(ErrorNotifier *errorNotifier); virtual int enableDisplay(int width, int height, struct timeval *refTime = NULL, S3DParameters *s3dParams = NULL); virtual int disableDisplay(bool cancel_buffer = true); virtual status_t pauseDisplay(bool pause); #if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS //Used for shot to snapshot measurement virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL); #endif virtual int useBuffers(void* bufArr, int num); virtual bool supportsExternalBuffering(); //Implementation of inherited interfaces virtual void* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs); virtual uint32_t * getOffsets() ; virtual int getFd() ; virtual int freeBuffer(void* buf); virtual int maxQueueableBuffers(unsigned int& queueable); ///Class specific functions static void frameCallbackRelay(CameraFrame* caFrame); void frameCallback(CameraFrame* caFrame); void displayThread(); private: void destroy(); bool processHalMsg(); status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame); bool handleFrameReturn(); status_t returnBuffersToWindow(); public: static const int DISPLAY_TIMEOUT; static const int FAILED_DQS_TO_SUSPEND; class DisplayThread : public Thread { ANativeWindowDisplayAdapter* mDisplayAdapter; TIUTILS::MessageQueue mDisplayThreadQ; public: DisplayThread(ANativeWindowDisplayAdapter* da) : Thread(false), mDisplayAdapter(da) { } ///Returns a reference to the display message Q for display adapter to post messages TIUTILS::MessageQueue& msgQ() { return mDisplayThreadQ; } virtual bool threadLoop() { mDisplayAdapter->displayThread(); return false; } enum DisplayThreadCommands { DISPLAY_START, DISPLAY_STOP, DISPLAY_FRAME, DISPLAY_EXIT }; }; //friend declarations friend class DisplayThread; private: int postBuffer(void* displayBuf); private: bool mFirstInit; bool mSuspend; int mFailedDQs; bool mPaused; //Pause state preview_stream_ops_t* mANativeWindow; sp<DisplayThread> mDisplayThread; FrameProvider *mFrameProvider; ///Pointer to the frame provider interface TIUTILS::MessageQueue mDisplayQ; unsigned int mDisplayState; ///@todo Have a common class for these members mutable Mutex mLock; bool mDisplayEnabled; int mBufferCount; buffer_handle_t** mBufferHandleMap; IMG_native_handle_t** mGrallocHandleMap; uint32_t* mOffsetsMap; int mFD; KeyedVector<int, int> mFramesWithCameraAdapterMap; sp<ErrorNotifier> mErrorNotifier; uint32_t mFrameWidth; uint32_t mFrameHeight; uint32_t mPreviewWidth; uint32_t mPreviewHeight; uint32_t mXOff; uint32_t mYOff; const char *mPixelFormat; #if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS //Used for calculating standby to first shot struct timeval mStandbyToShot; bool mMeasureStandby; //Used for shot to snapshot/shot calculation struct timeval mStartCapture; bool mShotToShot; #endif }; };
33.3
149
(translation_unit) "/*\n * Copyright (C) Texas Instruments - http://www.ti.com/\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n#include "CameraHal.h"\n#include <ui/GraphicBufferMapper.h>\n#include <hal_public.h>\n\n//temporarily define format here\n#define HAL_PIXEL_FORMAT_TI_NV12 0x100\n\nnamespace android {\n\n/**\n * Display handler class - This class basically handles the buffer posting to display\n */\n\nclass ANativeWindowDisplayAdapter : public DisplayAdapter\n{\npublic:\n\n typedef struct\n {\n void *mBuffer;\n void *mUser;\n int mOffset;\n int mWidth;\n int mHeight;\n int mWidthStride;\n int mHeightStride;\n int mLength;\n CameraFrame::FrameType mType;\n } DisplayFrame;\n\n enum DisplayStates\n {\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n };\n\npublic:\n\n ANativeWindowDisplayAdapter();\n virtual ~ANativeWindowDisplayAdapter();\n\n ///Initializes the display adapter creates any resources required\n virtual status_t initialize();\n\n virtual int setPreviewWindow(struct preview_stream_ops *window);\n virtual int setFrameProvider(FrameNotifier *frameProvider);\n virtual int setErrorHandler(ErrorNotifier *errorNotifier);\n virtual int enableDisplay(int width, int height, struct timeval *refTime = NULL, S3DParameters *s3dParams = NULL);\n virtual int disableDisplay(bool cancel_buffer = true);\n virtual status_t pauseDisplay(bool pause);\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n\n //Used for shot to snapshot measurement\n virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);\n\n#endif\n\n virtual int useBuffers(void* bufArr, int num);\n virtual bool supportsExternalBuffering();\n\n //Implementation of inherited interfaces\n virtual void* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs);\n virtual uint32_t * getOffsets() ;\n virtual int getFd() ;\n virtual int freeBuffer(void* buf);\n\n virtual int maxQueueableBuffers(unsigned int& queueable);\n\n ///Class specific functions\n static void frameCallbackRelay(CameraFrame* caFrame);\n void frameCallback(CameraFrame* caFrame);\n\n void displayThread();\n\n private:\n void destroy();\n bool processHalMsg();\n status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame);\n bool handleFrameReturn();\n status_t returnBuffersToWindow();\n\npublic:\n\n static const int DISPLAY_TIMEOUT;\n static const int FAILED_DQS_TO_SUSPEND;\n\n class DisplayThread : public Thread\n {\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n TIUTILS::MessageQueue mDisplayThreadQ;\n\n public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }\n\n ///Returns a reference to the display message Q for display adapter to post messages\n TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }\n\n virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }\n\n enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n };\n };\n\n //friend declarations\nfriend class DisplayThread;\n\nprivate:\n int postBuffer(void* displayBuf);\n\nprivate:\n bool mFirstInit;\n bool mSuspend;\n int mFailedDQs;\n bool mPaused; //Pause state\n preview_stream_ops_t* mANativeWindow;\n sp<DisplayThread> mDisplayThread;\n FrameProvider *mFrameProvider; ///Pointer to the frame provider interface\n TIUTILS::MessageQueue mDisplayQ;\n unsigned int mDisplayState;\n ///@todo Have a common class for these members\n mutable Mutex mLock;\n bool mDisplayEnabled;\n int mBufferCount;\n buffer_handle_t** mBufferHandleMap;\n IMG_native_handle_t** mGrallocHandleMap;\n uint32_t* mOffsetsMap;\n int mFD;\n KeyedVector<int, int> mFramesWithCameraAdapterMap;\n sp<ErrorNotifier> mErrorNotifier;\n\n uint32_t mFrameWidth;\n uint32_t mFrameHeight;\n uint32_t mPreviewWidth;\n uint32_t mPreviewHeight;\n\n uint32_t mXOff;\n uint32_t mYOff;\n\n const char *mPixelFormat;\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n //Used for calculating standby to first shot\n struct timeval mStandbyToShot;\n bool mMeasureStandby;\n //Used for shot to snapshot/shot calculation\n struct timeval mStartCapture;\n bool mShotToShot;\n\n#endif\n\n};\n\n};\n\n" (comment) "/*\n * Copyright (C) Texas Instruments - http://www.ti.com/\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */" (preproc_include) "#include "CameraHal.h"\n" (#include) "#include" (string_literal) ""CameraHal.h"" (") """ (string_content) "CameraHal.h" (") """ (preproc_include) "#include <ui/GraphicBufferMapper.h>\n" (#include) "#include" (system_lib_string) "<ui/GraphicBufferMapper.h>" (preproc_include) "#include <hal_public.h>\n" (#include) "#include" (system_lib_string) "<hal_public.h>" (comment) "//temporarily define format here" (preproc_def) "#define HAL_PIXEL_FORMAT_TI_NV12 0x100\n" (#define) "#define" (identifier) "HAL_PIXEL_FORMAT_TI_NV12" (preproc_arg) "0x100" (function_definition) "namespace android {\n\n/**\n * Display handler class - This class basically handles the buffer posting to display\n */\n\nclass ANativeWindowDisplayAdapter : public DisplayAdapter\n{\npublic:\n\n typedef struct\n {\n void *mBuffer;\n void *mUser;\n int mOffset;\n int mWidth;\n int mHeight;\n int mWidthStride;\n int mHeightStride;\n int mLength;\n CameraFrame::FrameType mType;\n } DisplayFrame;\n\n enum DisplayStates\n {\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n };\n\npublic:\n\n ANativeWindowDisplayAdapter();\n virtual ~ANativeWindowDisplayAdapter();\n\n ///Initializes the display adapter creates any resources required\n virtual status_t initialize();\n\n virtual int setPreviewWindow(struct preview_stream_ops *window);\n virtual int setFrameProvider(FrameNotifier *frameProvider);\n virtual int setErrorHandler(ErrorNotifier *errorNotifier);\n virtual int enableDisplay(int width, int height, struct timeval *refTime = NULL, S3DParameters *s3dParams = NULL);\n virtual int disableDisplay(bool cancel_buffer = true);\n virtual status_t pauseDisplay(bool pause);\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n\n //Used for shot to snapshot measurement\n virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);\n\n#endif\n\n virtual int useBuffers(void* bufArr, int num);\n virtual bool supportsExternalBuffering();\n\n //Implementation of inherited interfaces\n virtual void* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs);\n virtual uint32_t * getOffsets() ;\n virtual int getFd() ;\n virtual int freeBuffer(void* buf);\n\n virtual int maxQueueableBuffers(unsigned int& queueable);\n\n ///Class specific functions\n static void frameCallbackRelay(CameraFrame* caFrame);\n void frameCallback(CameraFrame* caFrame);\n\n void displayThread();\n\n private:\n void destroy();\n bool processHalMsg();\n status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame);\n bool handleFrameReturn();\n status_t returnBuffersToWindow();\n\npublic:\n\n static const int DISPLAY_TIMEOUT;\n static const int FAILED_DQS_TO_SUSPEND;\n\n class DisplayThread : public Thread\n {\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n TIUTILS::MessageQueue mDisplayThreadQ;\n\n public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }\n\n ///Returns a reference to the display message Q for display adapter to post messages\n TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }\n\n virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }\n\n enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n };\n };\n\n //friend declarations\nfriend class DisplayThread;\n\nprivate:\n int postBuffer(void* displayBuf);\n\nprivate:\n bool mFirstInit;\n bool mSuspend;\n int mFailedDQs;\n bool mPaused; //Pause state\n preview_stream_ops_t* mANativeWindow;\n sp<DisplayThread> mDisplayThread;\n FrameProvider *mFrameProvider; ///Pointer to the frame provider interface\n TIUTILS::MessageQueue mDisplayQ;\n unsigned int mDisplayState;\n ///@todo Have a common class for these members\n mutable Mutex mLock;\n bool mDisplayEnabled;\n int mBufferCount;\n buffer_handle_t** mBufferHandleMap;\n IMG_native_handle_t** mGrallocHandleMap;\n uint32_t* mOffsetsMap;\n int mFD;\n KeyedVector<int, int> mFramesWithCameraAdapterMap;\n sp<ErrorNotifier> mErrorNotifier;\n\n uint32_t mFrameWidth;\n uint32_t mFrameHeight;\n uint32_t mPreviewWidth;\n uint32_t mPreviewHeight;\n\n uint32_t mXOff;\n uint32_t mYOff;\n\n const char *mPixelFormat;\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n //Used for calculating standby to first shot\n struct timeval mStandbyToShot;\n bool mMeasureStandby;\n //Used for shot to snapshot/shot calculation\n struct timeval mStartCapture;\n bool mShotToShot;\n\n#endif\n\n};\n\n}" (type_identifier) "namespace" (identifier) "android" (compound_statement) "{\n\n/**\n * Display handler class - This class basically handles the buffer posting to display\n */\n\nclass ANativeWindowDisplayAdapter : public DisplayAdapter\n{\npublic:\n\n typedef struct\n {\n void *mBuffer;\n void *mUser;\n int mOffset;\n int mWidth;\n int mHeight;\n int mWidthStride;\n int mHeightStride;\n int mLength;\n CameraFrame::FrameType mType;\n } DisplayFrame;\n\n enum DisplayStates\n {\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n };\n\npublic:\n\n ANativeWindowDisplayAdapter();\n virtual ~ANativeWindowDisplayAdapter();\n\n ///Initializes the display adapter creates any resources required\n virtual status_t initialize();\n\n virtual int setPreviewWindow(struct preview_stream_ops *window);\n virtual int setFrameProvider(FrameNotifier *frameProvider);\n virtual int setErrorHandler(ErrorNotifier *errorNotifier);\n virtual int enableDisplay(int width, int height, struct timeval *refTime = NULL, S3DParameters *s3dParams = NULL);\n virtual int disableDisplay(bool cancel_buffer = true);\n virtual status_t pauseDisplay(bool pause);\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n\n //Used for shot to snapshot measurement\n virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);\n\n#endif\n\n virtual int useBuffers(void* bufArr, int num);\n virtual bool supportsExternalBuffering();\n\n //Implementation of inherited interfaces\n virtual void* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs);\n virtual uint32_t * getOffsets() ;\n virtual int getFd() ;\n virtual int freeBuffer(void* buf);\n\n virtual int maxQueueableBuffers(unsigned int& queueable);\n\n ///Class specific functions\n static void frameCallbackRelay(CameraFrame* caFrame);\n void frameCallback(CameraFrame* caFrame);\n\n void displayThread();\n\n private:\n void destroy();\n bool processHalMsg();\n status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame);\n bool handleFrameReturn();\n status_t returnBuffersToWindow();\n\npublic:\n\n static const int DISPLAY_TIMEOUT;\n static const int FAILED_DQS_TO_SUSPEND;\n\n class DisplayThread : public Thread\n {\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n TIUTILS::MessageQueue mDisplayThreadQ;\n\n public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }\n\n ///Returns a reference to the display message Q for display adapter to post messages\n TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }\n\n virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }\n\n enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n };\n };\n\n //friend declarations\nfriend class DisplayThread;\n\nprivate:\n int postBuffer(void* displayBuf);\n\nprivate:\n bool mFirstInit;\n bool mSuspend;\n int mFailedDQs;\n bool mPaused; //Pause state\n preview_stream_ops_t* mANativeWindow;\n sp<DisplayThread> mDisplayThread;\n FrameProvider *mFrameProvider; ///Pointer to the frame provider interface\n TIUTILS::MessageQueue mDisplayQ;\n unsigned int mDisplayState;\n ///@todo Have a common class for these members\n mutable Mutex mLock;\n bool mDisplayEnabled;\n int mBufferCount;\n buffer_handle_t** mBufferHandleMap;\n IMG_native_handle_t** mGrallocHandleMap;\n uint32_t* mOffsetsMap;\n int mFD;\n KeyedVector<int, int> mFramesWithCameraAdapterMap;\n sp<ErrorNotifier> mErrorNotifier;\n\n uint32_t mFrameWidth;\n uint32_t mFrameHeight;\n uint32_t mPreviewWidth;\n uint32_t mPreviewHeight;\n\n uint32_t mXOff;\n uint32_t mYOff;\n\n const char *mPixelFormat;\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n //Used for calculating standby to first shot\n struct timeval mStandbyToShot;\n bool mMeasureStandby;\n //Used for shot to snapshot/shot calculation\n struct timeval mStartCapture;\n bool mShotToShot;\n\n#endif\n\n};\n\n}" ({) "{" (comment) "/**\n * Display handler class - This class basically handles the buffer posting to display\n */" (function_definition) "class ANativeWindowDisplayAdapter : public DisplayAdapter\n{\npublic:\n\n typedef struct\n {\n void *mBuffer;\n void *mUser;\n int mOffset;\n int mWidth;\n int mHeight;\n int mWidthStride;\n int mHeightStride;\n int mLength;\n CameraFrame::FrameType mType;\n } DisplayFrame;\n\n enum DisplayStates\n {\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n };\n\npublic:\n\n ANativeWindowDisplayAdapter();\n virtual ~ANativeWindowDisplayAdapter();\n\n ///Initializes the display adapter creates any resources required\n virtual status_t initialize();\n\n virtual int setPreviewWindow(struct preview_stream_ops *window);\n virtual int setFrameProvider(FrameNotifier *frameProvider);\n virtual int setErrorHandler(ErrorNotifier *errorNotifier);\n virtual int enableDisplay(int width, int height, struct timeval *refTime = NULL, S3DParameters *s3dParams = NULL);\n virtual int disableDisplay(bool cancel_buffer = true);\n virtual status_t pauseDisplay(bool pause);\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n\n //Used for shot to snapshot measurement\n virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);\n\n#endif\n\n virtual int useBuffers(void* bufArr, int num);\n virtual bool supportsExternalBuffering();\n\n //Implementation of inherited interfaces\n virtual void* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs);\n virtual uint32_t * getOffsets() ;\n virtual int getFd() ;\n virtual int freeBuffer(void* buf);\n\n virtual int maxQueueableBuffers(unsigned int& queueable);\n\n ///Class specific functions\n static void frameCallbackRelay(CameraFrame* caFrame);\n void frameCallback(CameraFrame* caFrame);\n\n void displayThread();\n\n private:\n void destroy();\n bool processHalMsg();\n status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame);\n bool handleFrameReturn();\n status_t returnBuffersToWindow();\n\npublic:\n\n static const int DISPLAY_TIMEOUT;\n static const int FAILED_DQS_TO_SUSPEND;\n\n class DisplayThread : public Thread\n {\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n TIUTILS::MessageQueue mDisplayThreadQ;\n\n public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }\n\n ///Returns a reference to the display message Q for display adapter to post messages\n TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }\n\n virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }\n\n enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n };\n };\n\n //friend declarations\nfriend class DisplayThread;\n\nprivate:\n int postBuffer(void* displayBuf);\n\nprivate:\n bool mFirstInit;\n bool mSuspend;\n int mFailedDQs;\n bool mPaused; //Pause state\n preview_stream_ops_t* mANativeWindow;\n sp<DisplayThread> mDisplayThread;\n FrameProvider *mFrameProvider; ///Pointer to the frame provider interface\n TIUTILS::MessageQueue mDisplayQ;\n unsigned int mDisplayState;\n ///@todo Have a common class for these members\n mutable Mutex mLock;\n bool mDisplayEnabled;\n int mBufferCount;\n buffer_handle_t** mBufferHandleMap;\n IMG_native_handle_t** mGrallocHandleMap;\n uint32_t* mOffsetsMap;\n int mFD;\n KeyedVector<int, int> mFramesWithCameraAdapterMap;\n sp<ErrorNotifier> mErrorNotifier;\n\n uint32_t mFrameWidth;\n uint32_t mFrameHeight;\n uint32_t mPreviewWidth;\n uint32_t mPreviewHeight;\n\n uint32_t mXOff;\n uint32_t mYOff;\n\n const char *mPixelFormat;\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n //Used for calculating standby to first shot\n struct timeval mStandbyToShot;\n bool mMeasureStandby;\n //Used for shot to snapshot/shot calculation\n struct timeval mStartCapture;\n bool mShotToShot;\n\n#endif\n\n}" (type_identifier) "class" (identifier) "ANativeWindowDisplayAdapter" (ERROR) ": public DisplayAdapter" (:) ":" (identifier) "public" (identifier) "DisplayAdapter" (compound_statement) "{\npublic:\n\n typedef struct\n {\n void *mBuffer;\n void *mUser;\n int mOffset;\n int mWidth;\n int mHeight;\n int mWidthStride;\n int mHeightStride;\n int mLength;\n CameraFrame::FrameType mType;\n } DisplayFrame;\n\n enum DisplayStates\n {\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n };\n\npublic:\n\n ANativeWindowDisplayAdapter();\n virtual ~ANativeWindowDisplayAdapter();\n\n ///Initializes the display adapter creates any resources required\n virtual status_t initialize();\n\n virtual int setPreviewWindow(struct preview_stream_ops *window);\n virtual int setFrameProvider(FrameNotifier *frameProvider);\n virtual int setErrorHandler(ErrorNotifier *errorNotifier);\n virtual int enableDisplay(int width, int height, struct timeval *refTime = NULL, S3DParameters *s3dParams = NULL);\n virtual int disableDisplay(bool cancel_buffer = true);\n virtual status_t pauseDisplay(bool pause);\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n\n //Used for shot to snapshot measurement\n virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);\n\n#endif\n\n virtual int useBuffers(void* bufArr, int num);\n virtual bool supportsExternalBuffering();\n\n //Implementation of inherited interfaces\n virtual void* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs);\n virtual uint32_t * getOffsets() ;\n virtual int getFd() ;\n virtual int freeBuffer(void* buf);\n\n virtual int maxQueueableBuffers(unsigned int& queueable);\n\n ///Class specific functions\n static void frameCallbackRelay(CameraFrame* caFrame);\n void frameCallback(CameraFrame* caFrame);\n\n void displayThread();\n\n private:\n void destroy();\n bool processHalMsg();\n status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame);\n bool handleFrameReturn();\n status_t returnBuffersToWindow();\n\npublic:\n\n static const int DISPLAY_TIMEOUT;\n static const int FAILED_DQS_TO_SUSPEND;\n\n class DisplayThread : public Thread\n {\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n TIUTILS::MessageQueue mDisplayThreadQ;\n\n public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }\n\n ///Returns a reference to the display message Q for display adapter to post messages\n TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }\n\n virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }\n\n enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n };\n };\n\n //friend declarations\nfriend class DisplayThread;\n\nprivate:\n int postBuffer(void* displayBuf);\n\nprivate:\n bool mFirstInit;\n bool mSuspend;\n int mFailedDQs;\n bool mPaused; //Pause state\n preview_stream_ops_t* mANativeWindow;\n sp<DisplayThread> mDisplayThread;\n FrameProvider *mFrameProvider; ///Pointer to the frame provider interface\n TIUTILS::MessageQueue mDisplayQ;\n unsigned int mDisplayState;\n ///@todo Have a common class for these members\n mutable Mutex mLock;\n bool mDisplayEnabled;\n int mBufferCount;\n buffer_handle_t** mBufferHandleMap;\n IMG_native_handle_t** mGrallocHandleMap;\n uint32_t* mOffsetsMap;\n int mFD;\n KeyedVector<int, int> mFramesWithCameraAdapterMap;\n sp<ErrorNotifier> mErrorNotifier;\n\n uint32_t mFrameWidth;\n uint32_t mFrameHeight;\n uint32_t mPreviewWidth;\n uint32_t mPreviewHeight;\n\n uint32_t mXOff;\n uint32_t mYOff;\n\n const char *mPixelFormat;\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n //Used for calculating standby to first shot\n struct timeval mStandbyToShot;\n bool mMeasureStandby;\n //Used for shot to snapshot/shot calculation\n struct timeval mStartCapture;\n bool mShotToShot;\n\n#endif\n\n}" ({) "{" (labeled_statement) "public:\n\n typedef struct\n {\n void *mBuffer;\n void *mUser;\n int mOffset;\n int mWidth;\n int mHeight;\n int mWidthStride;\n int mHeightStride;\n int mLength;\n CameraFrame::FrameType mType;\n }" (statement_identifier) "public" (:) ":" (ERROR) "typedef struct" (type_identifier) "typedef" (identifier) "struct" (compound_statement) "{\n void *mBuffer;\n void *mUser;\n int mOffset;\n int mWidth;\n int mHeight;\n int mWidthStride;\n int mHeightStride;\n int mLength;\n CameraFrame::FrameType mType;\n }" ({) "{" (declaration) "void *mBuffer;" (primitive_type) "void" (pointer_declarator) "*mBuffer" (*) "*" (identifier) "mBuffer" (;) ";" (declaration) "void *mUser;" (primitive_type) "void" (pointer_declarator) "*mUser" (*) "*" (identifier) "mUser" (;) ";" (declaration) "int mOffset;" (primitive_type) "int" (identifier) "mOffset" (;) ";" (declaration) "int mWidth;" (primitive_type) "int" (identifier) "mWidth" (;) ";" (declaration) "int mHeight;" (primitive_type) "int" (identifier) "mHeight" (;) ";" (declaration) "int mWidthStride;" (primitive_type) "int" (identifier) "mWidthStride" (;) ";" (declaration) "int mHeightStride;" (primitive_type) "int" (identifier) "mHeightStride" (;) ";" (declaration) "int mLength;" (primitive_type) "int" (identifier) "mLength" (;) ";" (labeled_statement) "CameraFrame::FrameType mType;" (statement_identifier) "CameraFrame" (:) ":" (ERROR) ":" (:) ":" (declaration) "FrameType mType;" (type_identifier) "FrameType" (identifier) "mType" (;) ";" (}) "}" (expression_statement) "DisplayFrame;" (identifier) "DisplayFrame" (;) ";" (enum_specifier) "enum DisplayStates\n {\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n }" (enum) "enum" (type_identifier) "DisplayStates" (enumerator_list) "{\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n }" ({) "{" (enumerator) "DISPLAY_INIT = 0" (identifier) "DISPLAY_INIT" (=) "=" (number_literal) "0" (,) "," (enumerator) "DISPLAY_STARTED" (identifier) "DISPLAY_STARTED" (,) "," (enumerator) "DISPLAY_STOPPED" (identifier) "DISPLAY_STOPPED" (,) "," (enumerator) "DISPLAY_EXITED" (identifier) "DISPLAY_EXITED" (}) "}" (;) ";" (labeled_statement) "public:\n\n ANativeWindowDisplayAdapter();" (statement_identifier) "public" (:) ":" (expression_statement) "ANativeWindowDisplayAdapter();" (call_expression) "ANativeWindowDisplayAdapter()" (identifier) "ANativeWindowDisplayAdapter" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual ~ANativeWindowDisplayAdapter();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "ANativeWindowDisplayAdapter()" (identifier) "ANativeWindowDisplayAdapter" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "///Initializes the display adapter creates any resources required" (declaration) "virtual status_t initialize();" (type_identifier) "virtual" (ERROR) "status_t" (identifier) "status_t" (function_declarator) "initialize()" (identifier) "initialize" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual int setPreviewWindow(struct preview_stream_ops *window);" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (function_declarator) "setPreviewWindow(struct preview_stream_ops *window)" (identifier) "setPreviewWindow" (parameter_list) "(struct preview_stream_ops *window)" (() "(" (parameter_declaration) "struct preview_stream_ops *window" (struct_specifier) "struct preview_stream_ops" (struct) "struct" (type_identifier) "preview_stream_ops" (pointer_declarator) "*window" (*) "*" (identifier) "window" ()) ")" (;) ";" (declaration) "virtual int setFrameProvider(FrameNotifier *frameProvider);" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (function_declarator) "setFrameProvider(FrameNotifier *frameProvider)" (identifier) "setFrameProvider" (parameter_list) "(FrameNotifier *frameProvider)" (() "(" (parameter_declaration) "FrameNotifier *frameProvider" (type_identifier) "FrameNotifier" (pointer_declarator) "*frameProvider" (*) "*" (identifier) "frameProvider" ()) ")" (;) ";" (declaration) "virtual int setErrorHandler(ErrorNotifier *errorNotifier);" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (function_declarator) "setErrorHandler(ErrorNotifier *errorNotifier)" (identifier) "setErrorHandler" (parameter_list) "(ErrorNotifier *errorNotifier)" (() "(" (parameter_declaration) "ErrorNotifier *errorNotifier" (type_identifier) "ErrorNotifier" (pointer_declarator) "*errorNotifier" (*) "*" (identifier) "errorNotifier" ()) ")" (;) ";" (declaration) "virtual int enableDisplay(int width, int height, struct timeval *refTime = NULL, S3DParameters *s3dParams = NULL);" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (init_declarator) "enableDisplay(int width, int height, struct timeval *refTime = NULL" (function_declarator) "enableDisplay(int width, int height, struct timeval *refTime" (identifier) "enableDisplay" (parameter_list) "(int width, int height, struct timeval *refTime" (() "(" (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" (,) "," (parameter_declaration) "struct timeval *refTime" (struct_specifier) "struct timeval" (struct) "struct" (type_identifier) "timeval" (pointer_declarator) "*refTime" (*) "*" (identifier) "refTime" ()) "" (=) "=" (null) "NULL" (NULL) "NULL" (,) "," (ERROR) "S3DParameters" (identifier) "S3DParameters" (init_declarator) "*s3dParams = NULL" (pointer_declarator) "*s3dParams" (*) "*" (identifier) "s3dParams" (=) "=" (null) "NULL" (NULL) "NULL" (ERROR) ")" ()) ")" (;) ";" (declaration) "virtual int disableDisplay(bool cancel_buffer = true);" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (init_declarator) "disableDisplay(bool cancel_buffer = true" (function_declarator) "disableDisplay(bool cancel_buffer" (identifier) "disableDisplay" (parameter_list) "(bool cancel_buffer" (() "(" (parameter_declaration) "bool cancel_buffer" (primitive_type) "bool" (identifier) "cancel_buffer" ()) "" (=) "=" (true) "true" (ERROR) ")" ()) ")" (;) ";" (declaration) "virtual status_t pauseDisplay(bool pause);" (type_identifier) "virtual" (ERROR) "status_t" (identifier) "status_t" (function_declarator) "pauseDisplay(bool pause)" (identifier) "pauseDisplay" (parameter_list) "(bool pause)" (() "(" (parameter_declaration) "bool pause" (primitive_type) "bool" (identifier) "pause" ()) ")" (;) ";" (preproc_if) "#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n\n //Used for shot to snapshot measurement\n virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);\n\n#endif" (#if) "#if" (binary_expression) "PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS" (identifier) "PPM_INSTRUMENTATION" (||) "||" (identifier) "PPM_INSTRUMENTATION_ABS" ( ) "\n\n" (comment) "//Used for shot to snapshot measurement" (declaration) "virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);" (type_identifier) "virtual" (ERROR) "status_t" (identifier) "status_t" (init_declarator) "setSnapshotTimeRef(struct timeval *refTime = NULL" (function_declarator) "setSnapshotTimeRef(struct timeval *refTime" (identifier) "setSnapshotTimeRef" (parameter_list) "(struct timeval *refTime" (() "(" (parameter_declaration) "struct timeval *refTime" (struct_specifier) "struct timeval" (struct) "struct" (type_identifier) "timeval" (pointer_declarator) "*refTime" (*) "*" (identifier) "refTime" ()) "" (=) "=" (null) "NULL" (NULL) "NULL" (ERROR) ")" ()) ")" (;) ";" (#endif) "#endif" (declaration) "virtual int useBuffers(void* bufArr, int num);" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (function_declarator) "useBuffers(void* bufArr, int num)" (identifier) "useBuffers" (parameter_list) "(void* bufArr, int num)" (() "(" (parameter_declaration) "void* bufArr" (primitive_type) "void" (pointer_declarator) "* bufArr" (*) "*" (identifier) "bufArr" (,) "," (parameter_declaration) "int num" (primitive_type) "int" (identifier) "num" ()) ")" (;) ";" (declaration) "virtual bool supportsExternalBuffering();" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (function_declarator) "supportsExternalBuffering()" (identifier) "supportsExternalBuffering" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//Implementation of inherited interfaces" (declaration) "virtual void* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs);" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (pointer_declarator) "* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs)" (*) "*" (function_declarator) "allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs)" (identifier) "allocateBuffer" (parameter_list) "(int width, int height, const char* format, int &bytes, int numBufs)" (() "(" (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" (,) "," (parameter_declaration) "const char* format" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* format" (*) "*" (identifier) "format" (,) "," (parameter_declaration) "int &bytes" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "bytes" (,) "," (parameter_declaration) "int numBufs" (primitive_type) "int" (identifier) "numBufs" ()) ")" (;) ";" (declaration) "virtual uint32_t * getOffsets() ;" (type_identifier) "virtual" (ERROR) "uint32_t" (identifier) "uint32_t" (pointer_declarator) "* getOffsets()" (*) "*" (function_declarator) "getOffsets()" (identifier) "getOffsets" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual int getFd() ;" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (function_declarator) "getFd()" (identifier) "getFd" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual int freeBuffer(void* buf);" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (function_declarator) "freeBuffer(void* buf)" (identifier) "freeBuffer" (parameter_list) "(void* buf)" (() "(" (parameter_declaration) "void* buf" (primitive_type) "void" (pointer_declarator) "* buf" (*) "*" (identifier) "buf" ()) ")" (;) ";" (declaration) "virtual int maxQueueableBuffers(unsigned int& queueable);" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (function_declarator) "maxQueueableBuffers(unsigned int& queueable)" (identifier) "maxQueueableBuffers" (parameter_list) "(unsigned int& queueable)" (() "(" (parameter_declaration) "unsigned int& queueable" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "queueable" ()) ")" (;) ";" (comment) "///Class specific functions" (declaration) "static void frameCallbackRelay(CameraFrame* caFrame);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "frameCallbackRelay(CameraFrame* caFrame)" (identifier) "frameCallbackRelay" (parameter_list) "(CameraFrame* caFrame)" (() "(" (parameter_declaration) "CameraFrame* caFrame" (type_identifier) "CameraFrame" (pointer_declarator) "* caFrame" (*) "*" (identifier) "caFrame" ()) ")" (;) ";" (declaration) "void frameCallback(CameraFrame* caFrame);" (primitive_type) "void" (function_declarator) "frameCallback(CameraFrame* caFrame)" (identifier) "frameCallback" (parameter_list) "(CameraFrame* caFrame)" (() "(" (parameter_declaration) "CameraFrame* caFrame" (type_identifier) "CameraFrame" (pointer_declarator) "* caFrame" (*) "*" (identifier) "caFrame" ()) ")" (;) ";" (declaration) "void displayThread();" (primitive_type) "void" (function_declarator) "displayThread()" (identifier) "displayThread" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n void destroy();" (statement_identifier) "private" (:) ":" (declaration) "void destroy();" (primitive_type) "void" (function_declarator) "destroy()" (identifier) "destroy" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool processHalMsg();" (primitive_type) "bool" (function_declarator) "processHalMsg()" (identifier) "processHalMsg" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame);" (type_identifier) "status_t" (function_declarator) "PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame)" (identifier) "PostFrame" (parameter_list) "(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame)" (() "(" (parameter_declaration) "ANativeWindowDisplayAdapter::DisplayFrame &dispFrame" (type_identifier) "ANativeWindowDisplayAdapter" (ERROR) "::DisplayFrame &" (:) ":" (:) ":" (identifier) "DisplayFrame" (&) "&" (identifier) "dispFrame" ()) ")" (;) ";" (declaration) "bool handleFrameReturn();" (primitive_type) "bool" (function_declarator) "handleFrameReturn()" (identifier) "handleFrameReturn" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "status_t returnBuffersToWindow();" (type_identifier) "status_t" (function_declarator) "returnBuffersToWindow()" (identifier) "returnBuffersToWindow" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "public:\n\n static const int DISPLAY_TIMEOUT;" (statement_identifier) "public" (:) ":" (declaration) "static const int DISPLAY_TIMEOUT;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "int" (identifier) "DISPLAY_TIMEOUT" (;) ";" (declaration) "static const int FAILED_DQS_TO_SUSPEND;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "int" (identifier) "FAILED_DQS_TO_SUSPEND" (;) ";" (function_definition) "class DisplayThread : public Thread\n {\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n TIUTILS::MessageQueue mDisplayThreadQ;\n\n public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }\n\n ///Returns a reference to the display message Q for display adapter to post messages\n TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }\n\n virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }\n\n enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n };\n }" (type_identifier) "class" (identifier) "DisplayThread" (ERROR) ": public Thread" (:) ":" (identifier) "public" (identifier) "Thread" (compound_statement) "{\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n TIUTILS::MessageQueue mDisplayThreadQ;\n\n public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }\n\n ///Returns a reference to the display message Q for display adapter to post messages\n TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }\n\n virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }\n\n enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n };\n }" ({) "{" (declaration) "ANativeWindowDisplayAdapter* mDisplayAdapter;" (type_identifier) "ANativeWindowDisplayAdapter" (pointer_declarator) "* mDisplayAdapter" (*) "*" (identifier) "mDisplayAdapter" (;) ";" (labeled_statement) "TIUTILS::MessageQueue mDisplayThreadQ;" (statement_identifier) "TIUTILS" (:) ":" (ERROR) ":" (:) ":" (declaration) "MessageQueue mDisplayThreadQ;" (type_identifier) "MessageQueue" (identifier) "mDisplayThreadQ" (;) ";" (labeled_statement) "public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }" (statement_identifier) "public" (:) ":" (ERROR) "DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da)" (call_expression) "DisplayThread(ANativeWindowDisplayAdapter* da)" (identifier) "DisplayThread" (argument_list) "(ANativeWindowDisplayAdapter* da)" (() "(" (binary_expression) "ANativeWindowDisplayAdapter* da" (identifier) "ANativeWindowDisplayAdapter" (*) "*" (identifier) "da" ()) ")" (:) ":" (comma_expression) "Thread(false), mDisplayAdapter(da)" (call_expression) "Thread(false)" (identifier) "Thread" (argument_list) "(false)" (() "(" (false) "false" ()) ")" (,) "," (call_expression) "mDisplayAdapter(da)" (identifier) "mDisplayAdapter" (argument_list) "(da)" (() "(" (identifier) "da" ()) ")" (compound_statement) "{ }" ({) "{" (}) "}" (comment) "///Returns a reference to the display message Q for display adapter to post messages" (labeled_statement) "TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }" (statement_identifier) "TIUTILS" (:) ":" (ERROR) ":MessageQueue& msgQ()" (:) ":" (binary_expression) "MessageQueue& msgQ()" (identifier) "MessageQueue" (&) "&" (call_expression) "msgQ()" (identifier) "msgQ" (argument_list) "()" (() "(" ()) ")" (compound_statement) "{\n return mDisplayThreadQ;\n }" ({) "{" (return_statement) "return mDisplayThreadQ;" (return) "return" (identifier) "mDisplayThreadQ" (;) ";" (}) "}" (function_definition) "virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (function_declarator) "threadLoop()" (identifier) "threadLoop" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n mDisplayAdapter->displayThread();\n return false;\n }" ({) "{" (expression_statement) "mDisplayAdapter->displayThread();" (call_expression) "mDisplayAdapter->displayThread()" (field_expression) "mDisplayAdapter->displayThread" (identifier) "mDisplayAdapter" (->) "->" (field_identifier) "displayThread" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (enum_specifier) "enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n }" (enum) "enum" (type_identifier) "DisplayThreadCommands" (enumerator_list) "{\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n }" ({) "{" (enumerator) "DISPLAY_START" (identifier) "DISPLAY_START" (,) "," (enumerator) "DISPLAY_STOP" (identifier) "DISPLAY_STOP" (,) "," (enumerator) "DISPLAY_FRAME" (identifier) "DISPLAY_FRAME" (,) "," (enumerator) "DISPLAY_EXIT" (identifier) "DISPLAY_EXIT" (}) "}" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "//friend declarations" (declaration) "friend class DisplayThread;" (type_identifier) "friend" (ERROR) "class" (identifier) "class" (identifier) "DisplayThread" (;) ";" (labeled_statement) "private:\n int postBuffer(void* displayBuf);" (statement_identifier) "private" (:) ":" (declaration) "int postBuffer(void* displayBuf);" (primitive_type) "int" (function_declarator) "postBuffer(void* displayBuf)" (identifier) "postBuffer" (parameter_list) "(void* displayBuf)" (() "(" (parameter_declaration) "void* displayBuf" (primitive_type) "void" (pointer_declarator) "* displayBuf" (*) "*" (identifier) "displayBuf" ()) ")" (;) ";" (labeled_statement) "private:\n bool mFirstInit;" (statement_identifier) "private" (:) ":" (declaration) "bool mFirstInit;" (primitive_type) "bool" (identifier) "mFirstInit" (;) ";" (declaration) "bool mSuspend;" (primitive_type) "bool" (identifier) "mSuspend" (;) ";" (declaration) "int mFailedDQs;" (primitive_type) "int" (identifier) "mFailedDQs" (;) ";" (declaration) "bool mPaused;" (primitive_type) "bool" (identifier) "mPaused" (;) ";" (comment) "//Pause state" (declaration) "preview_stream_ops_t* mANativeWindow;" (type_identifier) "preview_stream_ops_t" (pointer_declarator) "* mANativeWindow" (*) "*" (identifier) "mANativeWindow" (;) ";" (expression_statement) "sp<DisplayThread> mDisplayThread;" (binary_expression) "sp<DisplayThread> mDisplayThread" (binary_expression) "sp<DisplayThread" (identifier) "sp" (<) "<" (identifier) "DisplayThread" (>) ">" (identifier) "mDisplayThread" (;) ";" (declaration) "FrameProvider *mFrameProvider;" (type_identifier) "FrameProvider" (pointer_declarator) "*mFrameProvider" (*) "*" (identifier) "mFrameProvider" (;) ";" (comment) "///Pointer to the frame provider interface" (labeled_statement) "TIUTILS::MessageQueue mDisplayQ;" (statement_identifier) "TIUTILS" (:) ":" (ERROR) ":" (:) ":" (declaration) "MessageQueue mDisplayQ;" (type_identifier) "MessageQueue" (identifier) "mDisplayQ" (;) ";" (declaration) "unsigned int mDisplayState;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "mDisplayState" (;) ";" (comment) "///@todo Have a common class for these members" (declaration) "mutable Mutex mLock;" (type_identifier) "mutable" (ERROR) "Mutex" (identifier) "Mutex" (identifier) "mLock" (;) ";" (declaration) "bool mDisplayEnabled;" (primitive_type) "bool" (identifier) "mDisplayEnabled" (;) ";" (declaration) "int mBufferCount;" (primitive_type) "int" (identifier) "mBufferCount" (;) ";" (declaration) "buffer_handle_t** mBufferHandleMap;" (type_identifier) "buffer_handle_t" (pointer_declarator) "** mBufferHandleMap" (*) "*" (pointer_declarator) "* mBufferHandleMap" (*) "*" (identifier) "mBufferHandleMap" (;) ";" (declaration) "IMG_native_handle_t** mGrallocHandleMap;" (type_identifier) "IMG_native_handle_t" (pointer_declarator) "** mGrallocHandleMap" (*) "*" (pointer_declarator) "* mGrallocHandleMap" (*) "*" (identifier) "mGrallocHandleMap" (;) ";" (declaration) "uint32_t* mOffsetsMap;" (primitive_type) "uint32_t" (pointer_declarator) "* mOffsetsMap" (*) "*" (identifier) "mOffsetsMap" (;) ";" (declaration) "int mFD;" (primitive_type) "int" (identifier) "mFD" (;) ";" (expression_statement) "KeyedVector<int, int> mFramesWithCameraAdapterMap;" (comma_expression) "KeyedVector<int, int> mFramesWithCameraAdapterMap" (binary_expression) "KeyedVector<int" (identifier) "KeyedVector" (<) "<" (identifier) "int" (,) "," (binary_expression) "int> mFramesWithCameraAdapterMap" (identifier) "int" (>) ">" (identifier) "mFramesWithCameraAdapterMap" (;) ";" (expression_statement) "sp<ErrorNotifier> mErrorNotifier;" (binary_expression) "sp<ErrorNotifier> mErrorNotifier" (binary_expression) "sp<ErrorNotifier" (identifier) "sp" (<) "<" (identifier) "ErrorNotifier" (>) ">" (identifier) "mErrorNotifier" (;) ";" (declaration) "uint32_t mFrameWidth;" (primitive_type) "uint32_t" (identifier) "mFrameWidth" (;) ";" (declaration) "uint32_t mFrameHeight;" (primitive_type) "uint32_t" (identifier) "mFrameHeight" (;) ";" (declaration) "uint32_t mPreviewWidth;" (primitive_type) "uint32_t" (identifier) "mPreviewWidth" (;) ";" (declaration) "uint32_t mPreviewHeight;" (primitive_type) "uint32_t" (identifier) "mPreviewHeight" (;) ";" (declaration) "uint32_t mXOff;" (primitive_type) "uint32_t" (identifier) "mXOff" (;) ";" (declaration) "uint32_t mYOff;" (primitive_type) "uint32_t" (identifier) "mYOff" (;) ";" (declaration) "const char *mPixelFormat;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*mPixelFormat" (*) "*" (identifier) "mPixelFormat" (;) ";" (preproc_if) "#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n //Used for calculating standby to first shot\n struct timeval mStandbyToShot;\n bool mMeasureStandby;\n //Used for shot to snapshot/shot calculation\n struct timeval mStartCapture;\n bool mShotToShot;\n\n#endif" (#if) "#if" (binary_expression) "PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS" (identifier) "PPM_INSTRUMENTATION" (||) "||" (identifier) "PPM_INSTRUMENTATION_ABS" ( ) "\n" (comment) "//Used for calculating standby to first shot" (declaration) "struct timeval mStandbyToShot;" (struct_specifier) "struct timeval" (struct) "struct" (type_identifier) "timeval" (identifier) "mStandbyToShot" (;) ";" (declaration) "bool mMeasureStandby;" (primitive_type) "bool" (identifier) "mMeasureStandby" (;) ";" (comment) "//Used for shot to snapshot/shot calculation" (declaration) "struct timeval mStartCapture;" (struct_specifier) "struct timeval" (struct) "struct" (type_identifier) "timeval" (identifier) "mStartCapture" (;) ";" (declaration) "bool mShotToShot;" (primitive_type) "bool" (identifier) "mShotToShot" (;) ";" (#endif) "#endif" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
854
34
{"language": "c", "success": true, "metadata": {"lines": 149, "avg_line_length": 33.3, "nodes": 579, "errors": 0, "source_hash": "c71f1ee850d0b111473d16febd5df73c592a26a8bb90b221fd41ef428f546da9", "categorized_nodes": 377}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"CameraHal.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"CameraHal.h\"", "parent": 0, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 22}}, {"id": 3, "type": "preproc_include", "text": "#include <ui/GraphicBufferMapper.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<ui/GraphicBufferMapper.h>", "parent": 3, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 35}}, {"id": 6, "type": "preproc_include", "text": "#include <hal_public.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<hal_public.h>", "parent": 6, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 23}}, {"id": 9, "type": "preproc_def", "text": "#define HAL_PIXEL_FORMAT_TI_NV12 0x100\n", "parent": null, "children": [10, 11, 12], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 11, "type": "identifier", "text": "HAL_PIXEL_FORMAT_TI_NV12", "parent": 9, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 32}}, {"id": 12, "type": "preproc_arg", "text": "0x100", "parent": 9, "children": [], "start_point": {"row": 23, "column": 33}, "end_point": {"row": 23, "column": 38}}, {"id": 13, "type": "function_definition", "text": "namespace android {\n\n/**\n * Display handler class - This class basically handles the buffer posting to display\n */\n\nclass ANativeWindowDisplayAdapter : public DisplayAdapter\n{\npublic:\n\n typedef struct\n {\n void *mBuffer;\n void *mUser;\n int mOffset;\n int mWidth;\n int mHeight;\n int mWidthStride;\n int mHeightStride;\n int mLength;\n CameraFrame::FrameType mType;\n } DisplayFrame;\n\n enum DisplayStates\n {\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n };\n\npublic:\n\n ANativeWindowDisplayAdapter();\n virtual ~ANativeWindowDisplayAdapter();\n\n ///Initializes the display adapter creates any resources required\n virtual status_t initialize();\n\n virtual int setPreviewWindow(struct preview_stream_ops *window);\n virtual int setFrameProvider(FrameNotifier *frameProvider);\n virtual int setErrorHandler(ErrorNotifier *errorNotifier);\n virtual int enableDisplay(int width, int height, struct timeval *refTime = NULL, S3DParameters *s3dParams = NULL);\n virtual int disableDisplay(bool cancel_buffer = true);\n virtual status_t pauseDisplay(bool pause);\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n\n //Used for shot to snapshot measurement\n virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);\n\n#endif\n\n virtual int useBuffers(void* bufArr, int num);\n virtual bool supportsExternalBuffering();\n\n //Implementation of inherited interfaces\n virtual void* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs);\n virtual uint32_t * getOffsets() ;\n virtual int getFd() ;\n virtual int freeBuffer(void* buf);\n\n virtual int maxQueueableBuffers(unsigned int& queueable);\n\n ///Class specific functions\n static void frameCallbackRelay(CameraFrame* caFrame);\n void frameCallback(CameraFrame* caFrame);\n\n void displayThread();\n\n private:\n void destroy();\n bool processHalMsg();\n status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame);\n bool handleFrameReturn();\n status_t returnBuffersToWindow();\n\npublic:\n\n static const int DISPLAY_TIMEOUT;\n static const int FAILED_DQS_TO_SUSPEND;\n\n class DisplayThread : public Thread\n {\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n TIUTILS::MessageQueue mDisplayThreadQ;\n\n public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }\n\n ///Returns a reference to the display message Q for display adapter to post messages\n TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }\n\n virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }\n\n enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n };\n };\n\n //friend declarations\nfriend class DisplayThread;\n\nprivate:\n int postBuffer(void* displayBuf);\n\nprivate:\n bool mFirstInit;\n bool mSuspend;\n int mFailedDQs;\n bool mPaused; //Pause state\n preview_stream_ops_t* mANativeWindow;\n sp<DisplayThread> mDisplayThread;\n FrameProvider *mFrameProvider; ///Pointer to the frame provider interface\n TIUTILS::MessageQueue mDisplayQ;\n unsigned int mDisplayState;\n ///@todo Have a common class for these members\n mutable Mutex mLock;\n bool mDisplayEnabled;\n int mBufferCount;\n buffer_handle_t** mBufferHandleMap;\n IMG_native_handle_t** mGrallocHandleMap;\n uint32_t* mOffsetsMap;\n int mFD;\n KeyedVector<int, int> mFramesWithCameraAdapterMap;\n sp<ErrorNotifier> mErrorNotifier;\n\n uint32_t mFrameWidth;\n uint32_t mFrameHeight;\n uint32_t mPreviewWidth;\n uint32_t mPreviewHeight;\n\n uint32_t mXOff;\n uint32_t mYOff;\n\n const char *mPixelFormat;\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n //Used for calculating standby to first shot\n struct timeval mStandbyToShot;\n bool mMeasureStandby;\n //Used for shot to snapshot/shot calculation\n struct timeval mStartCapture;\n bool mShotToShot;\n\n#endif\n\n};\n\n}", "parent": null, "children": [14, 15], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 186, "column": 1}}, {"id": 14, "type": "type_identifier", "text": "namespace", "parent": 13, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 9}}, {"id": 15, "type": "identifier", "text": "android", "parent": 13, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 17}}, {"id": 16, "type": "function_definition", "text": "class ANativeWindowDisplayAdapter : public DisplayAdapter\n{\npublic:\n\n typedef struct\n {\n void *mBuffer;\n void *mUser;\n int mOffset;\n int mWidth;\n int mHeight;\n int mWidthStride;\n int mHeightStride;\n int mLength;\n CameraFrame::FrameType mType;\n } DisplayFrame;\n\n enum DisplayStates\n {\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n };\n\npublic:\n\n ANativeWindowDisplayAdapter();\n virtual ~ANativeWindowDisplayAdapter();\n\n ///Initializes the display adapter creates any resources required\n virtual status_t initialize();\n\n virtual int setPreviewWindow(struct preview_stream_ops *window);\n virtual int setFrameProvider(FrameNotifier *frameProvider);\n virtual int setErrorHandler(ErrorNotifier *errorNotifier);\n virtual int enableDisplay(int width, int height, struct timeval *refTime = NULL, S3DParameters *s3dParams = NULL);\n virtual int disableDisplay(bool cancel_buffer = true);\n virtual status_t pauseDisplay(bool pause);\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n\n //Used for shot to snapshot measurement\n virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);\n\n#endif\n\n virtual int useBuffers(void* bufArr, int num);\n virtual bool supportsExternalBuffering();\n\n //Implementation of inherited interfaces\n virtual void* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs);\n virtual uint32_t * getOffsets() ;\n virtual int getFd() ;\n virtual int freeBuffer(void* buf);\n\n virtual int maxQueueableBuffers(unsigned int& queueable);\n\n ///Class specific functions\n static void frameCallbackRelay(CameraFrame* caFrame);\n void frameCallback(CameraFrame* caFrame);\n\n void displayThread();\n\n private:\n void destroy();\n bool processHalMsg();\n status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame);\n bool handleFrameReturn();\n status_t returnBuffersToWindow();\n\npublic:\n\n static const int DISPLAY_TIMEOUT;\n static const int FAILED_DQS_TO_SUSPEND;\n\n class DisplayThread : public Thread\n {\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n TIUTILS::MessageQueue mDisplayThreadQ;\n\n public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }\n\n ///Returns a reference to the display message Q for display adapter to post messages\n TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }\n\n virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }\n\n enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n };\n };\n\n //friend declarations\nfriend class DisplayThread;\n\nprivate:\n int postBuffer(void* displayBuf);\n\nprivate:\n bool mFirstInit;\n bool mSuspend;\n int mFailedDQs;\n bool mPaused; //Pause state\n preview_stream_ops_t* mANativeWindow;\n sp<DisplayThread> mDisplayThread;\n FrameProvider *mFrameProvider; ///Pointer to the frame provider interface\n TIUTILS::MessageQueue mDisplayQ;\n unsigned int mDisplayState;\n ///@todo Have a common class for these members\n mutable Mutex mLock;\n bool mDisplayEnabled;\n int mBufferCount;\n buffer_handle_t** mBufferHandleMap;\n IMG_native_handle_t** mGrallocHandleMap;\n uint32_t* mOffsetsMap;\n int mFD;\n KeyedVector<int, int> mFramesWithCameraAdapterMap;\n sp<ErrorNotifier> mErrorNotifier;\n\n uint32_t mFrameWidth;\n uint32_t mFrameHeight;\n uint32_t mPreviewWidth;\n uint32_t mPreviewHeight;\n\n uint32_t mXOff;\n uint32_t mYOff;\n\n const char *mPixelFormat;\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n //Used for calculating standby to first shot\n struct timeval mStandbyToShot;\n bool mMeasureStandby;\n //Used for shot to snapshot/shot calculation\n struct timeval mStartCapture;\n bool mShotToShot;\n\n#endif\n\n}", "parent": 13, "children": [17, 18], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 184, "column": 1}}, {"id": 17, "type": "identifier", "text": "ANativeWindowDisplayAdapter", "parent": 16, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 33}}, {"id": 18, "type": "ERROR", "text": ": public DisplayAdapter", "parent": 16, "children": [19], "start_point": {"row": 31, "column": 34}, "end_point": {"row": 31, "column": 57}}, {"id": 19, "type": "identifier", "text": "DisplayAdapter", "parent": 18, "children": [], "start_point": {"row": 31, "column": 43}, "end_point": {"row": 31, "column": 57}}, {"id": 20, "type": "labeled_statement", "text": "public:\n\n typedef struct\n {\n void *mBuffer;\n void *mUser;\n int mOffset;\n int mWidth;\n int mHeight;\n int mWidthStride;\n int mHeightStride;\n int mLength;\n CameraFrame::FrameType mType;\n }", "parent": 16, "children": [21], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 46, "column": 9}}, {"id": 21, "type": "ERROR", "text": "typedef struct", "parent": 20, "children": [22, 23], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 18}}, {"id": 22, "type": "type_identifier", "text": "typedef", "parent": 21, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 11}}, {"id": 23, "type": "identifier", "text": "struct", "parent": 21, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 18}}, {"id": 24, "type": "declaration", "text": "void *mBuffer;", "parent": 20, "children": [25, 26], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 22}}, {"id": 25, "type": "primitive_type", "text": "void", "parent": 24, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 12}}, {"id": 26, "type": "pointer_declarator", "text": "*mBuffer", "parent": 24, "children": [27, 28], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 21}}, {"id": 27, "type": "*", "text": "*", "parent": 26, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 14}}, {"id": 28, "type": "identifier", "text": "mBuffer", "parent": 26, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 21}}, {"id": 29, "type": "declaration", "text": "void *mUser;", "parent": 20, "children": [30, 31], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 20}}, {"id": 30, "type": "primitive_type", "text": "void", "parent": 29, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 12}}, {"id": 31, "type": "pointer_declarator", "text": "*mUser", "parent": 29, "children": [32, 33], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 19}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 14}}, {"id": 33, "type": "identifier", "text": "mUser", "parent": 31, "children": [], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 19}}, {"id": 34, "type": "declaration", "text": "int mOffset;", "parent": 20, "children": [35, 36], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 20}}, {"id": 35, "type": "primitive_type", "text": "int", "parent": 34, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 11}}, {"id": 36, "type": "identifier", "text": "mOffset", "parent": 34, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 19}}, {"id": 37, "type": "declaration", "text": "int mWidth;", "parent": 20, "children": [38, 39], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 19}}, {"id": 38, "type": "primitive_type", "text": "int", "parent": 37, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 11}}, {"id": 39, "type": "identifier", "text": "mWidth", "parent": 37, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 18}}, {"id": 40, "type": "declaration", "text": "int mHeight;", "parent": 20, "children": [41, 42], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 20}}, {"id": 41, "type": "primitive_type", "text": "int", "parent": 40, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 11}}, {"id": 42, "type": "identifier", "text": "mHeight", "parent": 40, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 19}}, {"id": 43, "type": "declaration", "text": "int mWidthStride;", "parent": 20, "children": [44, 45], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 25}}, {"id": 44, "type": "primitive_type", "text": "int", "parent": 43, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 11}}, {"id": 45, "type": "identifier", "text": "mWidthStride", "parent": 43, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 24}}, {"id": 46, "type": "declaration", "text": "int mHeightStride;", "parent": 20, "children": [47, 48], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 26}}, {"id": 47, "type": "primitive_type", "text": "int", "parent": 46, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 11}}, {"id": 48, "type": "identifier", "text": "mHeightStride", "parent": 46, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 25}}, {"id": 49, "type": "declaration", "text": "int mLength;", "parent": 20, "children": [50, 51], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 20}}, {"id": 50, "type": "primitive_type", "text": "int", "parent": 49, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 11}}, {"id": 51, "type": "identifier", "text": "mLength", "parent": 49, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 19}}, {"id": 52, "type": "labeled_statement", "text": "CameraFrame::FrameType mType;", "parent": 20, "children": [53, 54], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 37}}, {"id": 53, "type": "statement_identifier", "text": "CameraFrame", "parent": 52, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 19}}, {"id": 54, "type": "declaration", "text": "FrameType mType;", "parent": 52, "children": [55, 56], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 37}}, {"id": 55, "type": "type_identifier", "text": "FrameType", "parent": 54, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 30}}, {"id": 56, "type": "identifier", "text": "mType", "parent": 54, "children": [], "start_point": {"row": 45, "column": 31}, "end_point": {"row": 45, "column": 36}}, {"id": 57, "type": "identifier", "text": "DisplayFrame", "parent": 16, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 22}}, {"id": 58, "type": "enum_specifier", "text": "enum DisplayStates\n {\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n }", "parent": 16, "children": [59, 60, 61], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 54, "column": 9}}, {"id": 59, "type": "enum", "text": "enum", "parent": 58, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 8}}, {"id": 60, "type": "type_identifier", "text": "DisplayStates", "parent": 58, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 22}}, {"id": 61, "type": "enumerator_list", "text": "{\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n }", "parent": 58, "children": [62, 66, 68, 70], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 54, "column": 9}}, {"id": 62, "type": "enumerator", "text": "DISPLAY_INIT = 0", "parent": 61, "children": [63, 64, 65], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 24}}, {"id": 63, "type": "identifier", "text": "DISPLAY_INIT", "parent": 62, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 20}}, {"id": 64, "type": "=", "text": "=", "parent": 62, "children": [], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 22}}, {"id": 65, "type": "number_literal", "text": "0", "parent": 62, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 24}}, {"id": 66, "type": "enumerator", "text": "DISPLAY_STARTED", "parent": 61, "children": [67], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 23}}, {"id": 67, "type": "identifier", "text": "DISPLAY_STARTED", "parent": 66, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 23}}, {"id": 68, "type": "enumerator", "text": "DISPLAY_STOPPED", "parent": 61, "children": [69], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 23}}, {"id": 69, "type": "identifier", "text": "DISPLAY_STOPPED", "parent": 68, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 23}}, {"id": 70, "type": "enumerator", "text": "DISPLAY_EXITED", "parent": 61, "children": [71], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 22}}, {"id": 71, "type": "identifier", "text": "DISPLAY_EXITED", "parent": 70, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 22}}, {"id": 72, "type": "labeled_statement", "text": "public:\n\n ANativeWindowDisplayAdapter();", "parent": 16, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 58, "column": 34}}, {"id": 73, "type": "call_expression", "text": "ANativeWindowDisplayAdapter()", "parent": 72, "children": [74, 75], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 33}}, {"id": 74, "type": "identifier", "text": "ANativeWindowDisplayAdapter", "parent": 73, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 31}}, {"id": 75, "type": "argument_list", "text": "()", "parent": 73, "children": [], "start_point": {"row": 58, "column": 31}, "end_point": {"row": 58, "column": 33}}, {"id": 76, "type": "declaration", "text": "virtual ~ANativeWindowDisplayAdapter();", "parent": 16, "children": [77, 78, 80], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 43}}, {"id": 77, "type": "type_identifier", "text": "virtual", "parent": 76, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 11}}, {"id": 78, "type": "ERROR", "text": "~", "parent": 76, "children": [79], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 13}}, {"id": 79, "type": "~", "text": "~", "parent": 78, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 13}}, {"id": 80, "type": "function_declarator", "text": "ANativeWindowDisplayAdapter()", "parent": 76, "children": [81, 82], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 42}}, {"id": 81, "type": "identifier", "text": "ANativeWindowDisplayAdapter", "parent": 80, "children": [], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 40}}, {"id": 82, "type": "parameter_list", "text": "()", "parent": 80, "children": [], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 42}}, {"id": 83, "type": "declaration", "text": "virtual status_t initialize();", "parent": 16, "children": [84, 85, 87], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 34}}, {"id": 84, "type": "type_identifier", "text": "virtual", "parent": 83, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 11}}, {"id": 85, "type": "ERROR", "text": "status_t", "parent": 83, "children": [86], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 20}}, {"id": 86, "type": "identifier", "text": "status_t", "parent": 85, "children": [], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 20}}, {"id": 87, "type": "function_declarator", "text": "initialize()", "parent": 83, "children": [88, 89], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 33}}, {"id": 88, "type": "identifier", "text": "initialize", "parent": 87, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 31}}, {"id": 89, "type": "parameter_list", "text": "()", "parent": 87, "children": [], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 33}}, {"id": 90, "type": "declaration", "text": "virtual int setPreviewWindow(struct preview_stream_ops *window);", "parent": 16, "children": [91, 92, 94], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 68}}, {"id": 91, "type": "type_identifier", "text": "virtual", "parent": 90, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 11}}, {"id": 92, "type": "ERROR", "text": "int", "parent": 90, "children": [93], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 15}}, {"id": 93, "type": "identifier", "text": "int", "parent": 92, "children": [], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 15}}, {"id": 94, "type": "function_declarator", "text": "setPreviewWindow(struct preview_stream_ops *window)", "parent": 90, "children": [95, 96], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 67}}, {"id": 95, "type": "identifier", "text": "setPreviewWindow", "parent": 94, "children": [], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 32}}, {"id": 96, "type": "parameter_list", "text": "(struct preview_stream_ops *window)", "parent": 94, "children": [97], "start_point": {"row": 64, "column": 32}, "end_point": {"row": 64, "column": 67}}, {"id": 97, "type": "parameter_declaration", "text": "struct preview_stream_ops *window", "parent": 96, "children": [98, 101], "start_point": {"row": 64, "column": 33}, "end_point": {"row": 64, "column": 66}}, {"id": 98, "type": "struct_specifier", "text": "struct preview_stream_ops", "parent": 97, "children": [99, 100], "start_point": {"row": 64, "column": 33}, "end_point": {"row": 64, "column": 58}}, {"id": 99, "type": "struct", "text": "struct", "parent": 98, "children": [], "start_point": {"row": 64, "column": 33}, "end_point": {"row": 64, "column": 39}}, {"id": 100, "type": "type_identifier", "text": "preview_stream_ops", "parent": 98, "children": [], "start_point": {"row": 64, "column": 40}, "end_point": {"row": 64, "column": 58}}, {"id": 101, "type": "pointer_declarator", "text": "*window", "parent": 97, "children": [102, 103], "start_point": {"row": 64, "column": 59}, "end_point": {"row": 64, "column": 66}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 64, "column": 59}, "end_point": {"row": 64, "column": 60}}, {"id": 103, "type": "identifier", "text": "window", "parent": 101, "children": [], "start_point": {"row": 64, "column": 60}, "end_point": {"row": 64, "column": 66}}, {"id": 104, "type": "declaration", "text": "virtual int setFrameProvider(FrameNotifier *frameProvider);", "parent": 16, "children": [105, 106, 108], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 63}}, {"id": 105, "type": "type_identifier", "text": "virtual", "parent": 104, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 11}}, {"id": 106, "type": "ERROR", "text": "int", "parent": 104, "children": [107], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 15}}, {"id": 107, "type": "identifier", "text": "int", "parent": 106, "children": [], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 15}}, {"id": 108, "type": "function_declarator", "text": "setFrameProvider(FrameNotifier *frameProvider)", "parent": 104, "children": [109, 110], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 62}}, {"id": 109, "type": "identifier", "text": "setFrameProvider", "parent": 108, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 32}}, {"id": 110, "type": "parameter_list", "text": "(FrameNotifier *frameProvider)", "parent": 108, "children": [111], "start_point": {"row": 65, "column": 32}, "end_point": {"row": 65, "column": 62}}, {"id": 111, "type": "parameter_declaration", "text": "FrameNotifier *frameProvider", "parent": 110, "children": [112, 113], "start_point": {"row": 65, "column": 33}, "end_point": {"row": 65, "column": 61}}, {"id": 112, "type": "type_identifier", "text": "FrameNotifier", "parent": 111, "children": [], "start_point": {"row": 65, "column": 33}, "end_point": {"row": 65, "column": 46}}, {"id": 113, "type": "pointer_declarator", "text": "*frameProvider", "parent": 111, "children": [114, 115], "start_point": {"row": 65, "column": 47}, "end_point": {"row": 65, "column": 61}}, {"id": 114, "type": "*", "text": "*", "parent": 113, "children": [], "start_point": {"row": 65, "column": 47}, "end_point": {"row": 65, "column": 48}}, {"id": 115, "type": "identifier", "text": "frameProvider", "parent": 113, "children": [], "start_point": {"row": 65, "column": 48}, "end_point": {"row": 65, "column": 61}}, {"id": 116, "type": "declaration", "text": "virtual int setErrorHandler(ErrorNotifier *errorNotifier);", "parent": 16, "children": [117, 118, 120], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 62}}, {"id": 117, "type": "type_identifier", "text": "virtual", "parent": 116, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 11}}, {"id": 118, "type": "ERROR", "text": "int", "parent": 116, "children": [119], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 15}}, {"id": 119, "type": "identifier", "text": "int", "parent": 118, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 15}}, {"id": 120, "type": "function_declarator", "text": "setErrorHandler(ErrorNotifier *errorNotifier)", "parent": 116, "children": [121, 122], "start_point": {"row": 66, "column": 16}, "end_point": {"row": 66, "column": 61}}, {"id": 121, "type": "identifier", "text": "setErrorHandler", "parent": 120, "children": [], "start_point": {"row": 66, "column": 16}, "end_point": {"row": 66, "column": 31}}, {"id": 122, "type": "parameter_list", "text": "(ErrorNotifier *errorNotifier)", "parent": 120, "children": [123], "start_point": {"row": 66, "column": 31}, "end_point": {"row": 66, "column": 61}}, {"id": 123, "type": "parameter_declaration", "text": "ErrorNotifier *errorNotifier", "parent": 122, "children": [124, 125], "start_point": {"row": 66, "column": 32}, "end_point": {"row": 66, "column": 60}}, {"id": 124, "type": "type_identifier", "text": "ErrorNotifier", "parent": 123, "children": [], "start_point": {"row": 66, "column": 32}, "end_point": {"row": 66, "column": 45}}, {"id": 125, "type": "pointer_declarator", "text": "*errorNotifier", "parent": 123, "children": [126, 127], "start_point": {"row": 66, "column": 46}, "end_point": {"row": 66, "column": 60}}, {"id": 126, "type": "*", "text": "*", "parent": 125, "children": [], "start_point": {"row": 66, "column": 46}, "end_point": {"row": 66, "column": 47}}, {"id": 127, "type": "identifier", "text": "errorNotifier", "parent": 125, "children": [], "start_point": {"row": 66, "column": 47}, "end_point": {"row": 66, "column": 60}}, {"id": 128, "type": "declaration", "text": "virtual int enableDisplay(int width, int height, struct timeval *refTime = NULL, S3DParameters *s3dParams = NULL);", "parent": 16, "children": [129, 130, 132, 152, 154], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 118}}, {"id": 129, "type": "type_identifier", "text": "virtual", "parent": 128, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 11}}, {"id": 130, "type": "ERROR", "text": "int", "parent": 128, "children": [131], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 15}}, {"id": 131, "type": "identifier", "text": "int", "parent": 130, "children": [], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 15}}, {"id": 132, "type": "init_declarator", "text": "enableDisplay(int width, int height, struct timeval *refTime = NULL", "parent": 128, "children": [133, 149, 150], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 83}}, {"id": 133, "type": "function_declarator", "text": "enableDisplay(int width, int height, struct timeval *refTime", "parent": 132, "children": [134, 135], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 76}}, {"id": 134, "type": "identifier", "text": "enableDisplay", "parent": 133, "children": [], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 29}}, {"id": 135, "type": "parameter_list", "text": "(int width, int height, struct timeval *refTime", "parent": 133, "children": [136, 139, 142], "start_point": {"row": 67, "column": 29}, "end_point": {"row": 67, "column": 76}}, {"id": 136, "type": "parameter_declaration", "text": "int width", "parent": 135, "children": [137, 138], "start_point": {"row": 67, "column": 30}, "end_point": {"row": 67, "column": 39}}, {"id": 137, "type": "primitive_type", "text": "int", "parent": 136, "children": [], "start_point": {"row": 67, "column": 30}, "end_point": {"row": 67, "column": 33}}, {"id": 138, "type": "identifier", "text": "width", "parent": 136, "children": [], "start_point": {"row": 67, "column": 34}, "end_point": {"row": 67, "column": 39}}, {"id": 139, "type": "parameter_declaration", "text": "int height", "parent": 135, "children": [140, 141], "start_point": {"row": 67, "column": 41}, "end_point": {"row": 67, "column": 51}}, {"id": 140, "type": "primitive_type", "text": "int", "parent": 139, "children": [], "start_point": {"row": 67, "column": 41}, "end_point": {"row": 67, "column": 44}}, {"id": 141, "type": "identifier", "text": "height", "parent": 139, "children": [], "start_point": {"row": 67, "column": 45}, "end_point": {"row": 67, "column": 51}}, {"id": 142, "type": "parameter_declaration", "text": "struct timeval *refTime", "parent": 135, "children": [143, 146], "start_point": {"row": 67, "column": 53}, "end_point": {"row": 67, "column": 76}}, {"id": 143, "type": "struct_specifier", "text": "struct timeval", "parent": 142, "children": [144, 145], "start_point": {"row": 67, "column": 53}, "end_point": {"row": 67, "column": 67}}, {"id": 144, "type": "struct", "text": "struct", "parent": 143, "children": [], "start_point": {"row": 67, "column": 53}, "end_point": {"row": 67, "column": 59}}, {"id": 145, "type": "type_identifier", "text": "timeval", "parent": 143, "children": [], "start_point": {"row": 67, "column": 60}, "end_point": {"row": 67, "column": 67}}, {"id": 146, "type": "pointer_declarator", "text": "*refTime", "parent": 142, "children": [147, 148], "start_point": {"row": 67, "column": 68}, "end_point": {"row": 67, "column": 76}}, {"id": 147, "type": "*", "text": "*", "parent": 146, "children": [], "start_point": {"row": 67, "column": 68}, "end_point": {"row": 67, "column": 69}}, {"id": 148, "type": "identifier", "text": "refTime", "parent": 146, "children": [], "start_point": {"row": 67, "column": 69}, "end_point": {"row": 67, "column": 76}}, {"id": 149, "type": "=", "text": "=", "parent": 132, "children": [], "start_point": {"row": 67, "column": 77}, "end_point": {"row": 67, "column": 78}}, {"id": 150, "type": "null", "text": "NULL", "parent": 132, "children": [151], "start_point": {"row": 67, "column": 79}, "end_point": {"row": 67, "column": 83}}, {"id": 151, "type": "NULL", "text": "NULL", "parent": 150, "children": [], "start_point": {"row": 67, "column": 79}, "end_point": {"row": 67, "column": 83}}, {"id": 152, "type": "ERROR", "text": "S3DParameters", "parent": 128, "children": [153], "start_point": {"row": 67, "column": 85}, "end_point": {"row": 67, "column": 98}}, {"id": 153, "type": "identifier", "text": "S3DParameters", "parent": 152, "children": [], "start_point": {"row": 67, "column": 85}, "end_point": {"row": 67, "column": 98}}, {"id": 154, "type": "init_declarator", "text": "*s3dParams = NULL", "parent": 128, "children": [155, 158, 159], "start_point": {"row": 67, "column": 99}, "end_point": {"row": 67, "column": 116}}, {"id": 155, "type": "pointer_declarator", "text": "*s3dParams", "parent": 154, "children": [156, 157], "start_point": {"row": 67, "column": 99}, "end_point": {"row": 67, "column": 109}}, {"id": 156, "type": "*", "text": "*", "parent": 155, "children": [], "start_point": {"row": 67, "column": 99}, "end_point": {"row": 67, "column": 100}}, {"id": 157, "type": "identifier", "text": "s3dParams", "parent": 155, "children": [], "start_point": {"row": 67, "column": 100}, "end_point": {"row": 67, "column": 109}}, {"id": 158, "type": "=", "text": "=", "parent": 154, "children": [], "start_point": {"row": 67, "column": 110}, "end_point": {"row": 67, "column": 111}}, {"id": 159, "type": "null", "text": "NULL", "parent": 154, "children": [160], "start_point": {"row": 67, "column": 112}, "end_point": {"row": 67, "column": 116}}, {"id": 160, "type": "NULL", "text": "NULL", "parent": 159, "children": [], "start_point": {"row": 67, "column": 112}, "end_point": {"row": 67, "column": 116}}, {"id": 161, "type": "declaration", "text": "virtual int disableDisplay(bool cancel_buffer = true);", "parent": 16, "children": [162, 163, 165], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 58}}, {"id": 162, "type": "type_identifier", "text": "virtual", "parent": 161, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 11}}, {"id": 163, "type": "ERROR", "text": "int", "parent": 161, "children": [164], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 15}}, {"id": 164, "type": "identifier", "text": "int", "parent": 163, "children": [], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 15}}, {"id": 165, "type": "init_declarator", "text": "disableDisplay(bool cancel_buffer = true", "parent": 161, "children": [166, 172, 173], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 56}}, {"id": 166, "type": "function_declarator", "text": "disableDisplay(bool cancel_buffer", "parent": 165, "children": [167, 168], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 49}}, {"id": 167, "type": "identifier", "text": "disableDisplay", "parent": 166, "children": [], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 30}}, {"id": 168, "type": "parameter_list", "text": "(bool cancel_buffer", "parent": 166, "children": [169], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 49}}, {"id": 169, "type": "parameter_declaration", "text": "bool cancel_buffer", "parent": 168, "children": [170, 171], "start_point": {"row": 68, "column": 31}, "end_point": {"row": 68, "column": 49}}, {"id": 170, "type": "primitive_type", "text": "bool", "parent": 169, "children": [], "start_point": {"row": 68, "column": 31}, "end_point": {"row": 68, "column": 35}}, {"id": 171, "type": "identifier", "text": "cancel_buffer", "parent": 169, "children": [], "start_point": {"row": 68, "column": 36}, "end_point": {"row": 68, "column": 49}}, {"id": 172, "type": "=", "text": "=", "parent": 165, "children": [], "start_point": {"row": 68, "column": 50}, "end_point": {"row": 68, "column": 51}}, {"id": 173, "type": "true", "text": "true", "parent": 165, "children": [], "start_point": {"row": 68, "column": 52}, "end_point": {"row": 68, "column": 56}}, {"id": 174, "type": "declaration", "text": "virtual status_t pauseDisplay(bool pause);", "parent": 16, "children": [175, 176, 178], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 46}}, {"id": 175, "type": "type_identifier", "text": "virtual", "parent": 174, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 11}}, {"id": 176, "type": "ERROR", "text": "status_t", "parent": 174, "children": [177], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 20}}, {"id": 177, "type": "identifier", "text": "status_t", "parent": 176, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 20}}, {"id": 178, "type": "function_declarator", "text": "pauseDisplay(bool pause)", "parent": 174, "children": [179, 180], "start_point": {"row": 69, "column": 21}, "end_point": {"row": 69, "column": 45}}, {"id": 179, "type": "identifier", "text": "pauseDisplay", "parent": 178, "children": [], "start_point": {"row": 69, "column": 21}, "end_point": {"row": 69, "column": 33}}, {"id": 180, "type": "parameter_list", "text": "(bool pause)", "parent": 178, "children": [181], "start_point": {"row": 69, "column": 33}, "end_point": {"row": 69, "column": 45}}, {"id": 181, "type": "parameter_declaration", "text": "bool pause", "parent": 180, "children": [182, 183], "start_point": {"row": 69, "column": 34}, "end_point": {"row": 69, "column": 44}}, {"id": 182, "type": "primitive_type", "text": "bool", "parent": 181, "children": [], "start_point": {"row": 69, "column": 34}, "end_point": {"row": 69, "column": 38}}, {"id": 183, "type": "identifier", "text": "pause", "parent": 181, "children": [], "start_point": {"row": 69, "column": 39}, "end_point": {"row": 69, "column": 44}}, {"id": 184, "type": "preproc_if", "text": "#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n\n //Used for shot to snapshot measurement\n virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);\n\n#endif", "parent": 16, "children": [185, 186, 190, 191, 209], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 76, "column": 6}}, {"id": 185, "type": "#if", "text": "#if", "parent": 184, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 3}}, {"id": 186, "type": "binary_expression", "text": "PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS", "parent": 184, "children": [187, 188, 189], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 50}}, {"id": 187, "type": "identifier", "text": "PPM_INSTRUMENTATION", "parent": 186, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 23}}, {"id": 188, "type": "||", "text": "||", "parent": 186, "children": [], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 26}}, {"id": 189, "type": "identifier", "text": "PPM_INSTRUMENTATION_ABS", "parent": 186, "children": [], "start_point": {"row": 71, "column": 27}, "end_point": {"row": 71, "column": 50}}, {"id": 190, "type": "\n", "text": "\n\n", "parent": 184, "children": [], "start_point": {"row": 71, "column": 50}, "end_point": {"row": 73, "column": 0}}, {"id": 191, "type": "declaration", "text": "virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);", "parent": 184, "children": [192, 193, 195], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 72}}, {"id": 192, "type": "type_identifier", "text": "virtual", "parent": 191, "children": [], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 11}}, {"id": 193, "type": "ERROR", "text": "status_t", "parent": 191, "children": [194], "start_point": {"row": 74, "column": 12}, "end_point": {"row": 74, "column": 20}}, {"id": 194, "type": "identifier", "text": "status_t", "parent": 193, "children": [], "start_point": {"row": 74, "column": 12}, "end_point": {"row": 74, "column": 20}}, {"id": 195, "type": "init_declarator", "text": "setSnapshotTimeRef(struct timeval *refTime = NULL", "parent": 191, "children": [196, 206, 207], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 70}}, {"id": 196, "type": "function_declarator", "text": "setSnapshotTimeRef(struct timeval *refTime", "parent": 195, "children": [197, 198], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 63}}, {"id": 197, "type": "identifier", "text": "setSnapshotTimeRef", "parent": 196, "children": [], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 39}}, {"id": 198, "type": "parameter_list", "text": "(struct timeval *refTime", "parent": 196, "children": [199], "start_point": {"row": 74, "column": 39}, "end_point": {"row": 74, "column": 63}}, {"id": 199, "type": "parameter_declaration", "text": "struct timeval *refTime", "parent": 198, "children": [200, 203], "start_point": {"row": 74, "column": 40}, "end_point": {"row": 74, "column": 63}}, {"id": 200, "type": "struct_specifier", "text": "struct timeval", "parent": 199, "children": [201, 202], "start_point": {"row": 74, "column": 40}, "end_point": {"row": 74, "column": 54}}, {"id": 201, "type": "struct", "text": "struct", "parent": 200, "children": [], "start_point": {"row": 74, "column": 40}, "end_point": {"row": 74, "column": 46}}, {"id": 202, "type": "type_identifier", "text": "timeval", "parent": 200, "children": [], "start_point": {"row": 74, "column": 47}, "end_point": {"row": 74, "column": 54}}, {"id": 203, "type": "pointer_declarator", "text": "*refTime", "parent": 199, "children": [204, 205], "start_point": {"row": 74, "column": 55}, "end_point": {"row": 74, "column": 63}}, {"id": 204, "type": "*", "text": "*", "parent": 203, "children": [], "start_point": {"row": 74, "column": 55}, "end_point": {"row": 74, "column": 56}}, {"id": 205, "type": "identifier", "text": "refTime", "parent": 203, "children": [], "start_point": {"row": 74, "column": 56}, "end_point": {"row": 74, "column": 63}}, {"id": 206, "type": "=", "text": "=", "parent": 195, "children": [], "start_point": {"row": 74, "column": 64}, "end_point": {"row": 74, "column": 65}}, {"id": 207, "type": "null", "text": "NULL", "parent": 195, "children": [208], "start_point": {"row": 74, "column": 66}, "end_point": {"row": 74, "column": 70}}, {"id": 208, "type": "NULL", "text": "NULL", "parent": 207, "children": [], "start_point": {"row": 74, "column": 66}, "end_point": {"row": 74, "column": 70}}, {"id": 209, "type": "#endif", "text": "#endif", "parent": 184, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 6}}, {"id": 210, "type": "declaration", "text": "virtual int useBuffers(void* bufArr, int num);", "parent": 16, "children": [211, 212, 214], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 50}}, {"id": 211, "type": "type_identifier", "text": "virtual", "parent": 210, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 11}}, {"id": 212, "type": "ERROR", "text": "int", "parent": 210, "children": [213], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 15}}, {"id": 213, "type": "identifier", "text": "int", "parent": 212, "children": [], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 15}}, {"id": 214, "type": "function_declarator", "text": "useBuffers(void* bufArr, int num)", "parent": 210, "children": [215, 216], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 49}}, {"id": 215, "type": "identifier", "text": "useBuffers", "parent": 214, "children": [], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 26}}, {"id": 216, "type": "parameter_list", "text": "(void* bufArr, int num)", "parent": 214, "children": [217, 222], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 49}}, {"id": 217, "type": "parameter_declaration", "text": "void* bufArr", "parent": 216, "children": [218, 219], "start_point": {"row": 78, "column": 27}, "end_point": {"row": 78, "column": 39}}, {"id": 218, "type": "primitive_type", "text": "void", "parent": 217, "children": [], "start_point": {"row": 78, "column": 27}, "end_point": {"row": 78, "column": 31}}, {"id": 219, "type": "pointer_declarator", "text": "* bufArr", "parent": 217, "children": [220, 221], "start_point": {"row": 78, "column": 31}, "end_point": {"row": 78, "column": 39}}, {"id": 220, "type": "*", "text": "*", "parent": 219, "children": [], "start_point": {"row": 78, "column": 31}, "end_point": {"row": 78, "column": 32}}, {"id": 221, "type": "identifier", "text": "bufArr", "parent": 219, "children": [], "start_point": {"row": 78, "column": 33}, "end_point": {"row": 78, "column": 39}}, {"id": 222, "type": "parameter_declaration", "text": "int num", "parent": 216, "children": [223, 224], "start_point": {"row": 78, "column": 41}, "end_point": {"row": 78, "column": 48}}, {"id": 223, "type": "primitive_type", "text": "int", "parent": 222, "children": [], "start_point": {"row": 78, "column": 41}, "end_point": {"row": 78, "column": 44}}, {"id": 224, "type": "identifier", "text": "num", "parent": 222, "children": [], "start_point": {"row": 78, "column": 45}, "end_point": {"row": 78, "column": 48}}, {"id": 225, "type": "declaration", "text": "virtual bool supportsExternalBuffering();", "parent": 16, "children": [226, 227, 229], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 45}}, {"id": 226, "type": "type_identifier", "text": "virtual", "parent": 225, "children": [], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 11}}, {"id": 227, "type": "ERROR", "text": "bool", "parent": 225, "children": [228], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 16}}, {"id": 228, "type": "identifier", "text": "bool", "parent": 227, "children": [], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 16}}, {"id": 229, "type": "function_declarator", "text": "supportsExternalBuffering()", "parent": 225, "children": [230, 231], "start_point": {"row": 79, "column": 17}, "end_point": {"row": 79, "column": 44}}, {"id": 230, "type": "identifier", "text": "supportsExternalBuffering", "parent": 229, "children": [], "start_point": {"row": 79, "column": 17}, "end_point": {"row": 79, "column": 42}}, {"id": 231, "type": "parameter_list", "text": "()", "parent": 229, "children": [], "start_point": {"row": 79, "column": 42}, "end_point": {"row": 79, "column": 44}}, {"id": 232, "type": "declaration", "text": "virtual void* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs);", "parent": 16, "children": [233, 234, 236], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 101}}, {"id": 233, "type": "type_identifier", "text": "virtual", "parent": 232, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 11}}, {"id": 234, "type": "ERROR", "text": "void", "parent": 232, "children": [235], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 16}}, {"id": 235, "type": "identifier", "text": "void", "parent": 234, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 16}}, {"id": 236, "type": "pointer_declarator", "text": "* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs)", "parent": 232, "children": [237, 238], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 100}}, {"id": 237, "type": "*", "text": "*", "parent": 236, "children": [], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 17}}, {"id": 238, "type": "function_declarator", "text": "allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs)", "parent": 236, "children": [239, 240], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 100}}, {"id": 239, "type": "identifier", "text": "allocateBuffer", "parent": 238, "children": [], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 32}}, {"id": 240, "type": "parameter_list", "text": "(int width, int height, const char* format, int &bytes, int numBufs)", "parent": 238, "children": [241, 244, 247, 252, 255], "start_point": {"row": 82, "column": 32}, "end_point": {"row": 82, "column": 100}}, {"id": 241, "type": "parameter_declaration", "text": "int width", "parent": 240, "children": [242, 243], "start_point": {"row": 82, "column": 33}, "end_point": {"row": 82, "column": 42}}, {"id": 242, "type": "primitive_type", "text": "int", "parent": 241, "children": [], "start_point": {"row": 82, "column": 33}, "end_point": {"row": 82, "column": 36}}, {"id": 243, "type": "identifier", "text": "width", "parent": 241, "children": [], "start_point": {"row": 82, "column": 37}, "end_point": {"row": 82, "column": 42}}, {"id": 244, "type": "parameter_declaration", "text": "int height", "parent": 240, "children": [245, 246], "start_point": {"row": 82, "column": 44}, "end_point": {"row": 82, "column": 54}}, {"id": 245, "type": "primitive_type", "text": "int", "parent": 244, "children": [], "start_point": {"row": 82, "column": 44}, "end_point": {"row": 82, "column": 47}}, {"id": 246, "type": "identifier", "text": "height", "parent": 244, "children": [], "start_point": {"row": 82, "column": 48}, "end_point": {"row": 82, "column": 54}}, {"id": 247, "type": "parameter_declaration", "text": "const char* format", "parent": 240, "children": [248, 249], "start_point": {"row": 82, "column": 56}, "end_point": {"row": 82, "column": 74}}, {"id": 248, "type": "primitive_type", "text": "char", "parent": 247, "children": [], "start_point": {"row": 82, "column": 62}, "end_point": {"row": 82, "column": 66}}, {"id": 249, "type": "pointer_declarator", "text": "* format", "parent": 247, "children": [250, 251], "start_point": {"row": 82, "column": 66}, "end_point": {"row": 82, "column": 74}}, {"id": 250, "type": "*", "text": "*", "parent": 249, "children": [], "start_point": {"row": 82, "column": 66}, "end_point": {"row": 82, "column": 67}}, {"id": 251, "type": "identifier", "text": "format", "parent": 249, "children": [], "start_point": {"row": 82, "column": 68}, "end_point": {"row": 82, "column": 74}}, {"id": 252, "type": "parameter_declaration", "text": "int &bytes", "parent": 240, "children": [253, 254], "start_point": {"row": 82, "column": 76}, "end_point": {"row": 82, "column": 86}}, {"id": 253, "type": "primitive_type", "text": "int", "parent": 252, "children": [], "start_point": {"row": 82, "column": 76}, "end_point": {"row": 82, "column": 79}}, {"id": 254, "type": "identifier", "text": "bytes", "parent": 252, "children": [], "start_point": {"row": 82, "column": 81}, "end_point": {"row": 82, "column": 86}}, {"id": 255, "type": "parameter_declaration", "text": "int numBufs", "parent": 240, "children": [256, 257], "start_point": {"row": 82, "column": 88}, "end_point": {"row": 82, "column": 99}}, {"id": 256, "type": "primitive_type", "text": "int", "parent": 255, "children": [], "start_point": {"row": 82, "column": 88}, "end_point": {"row": 82, "column": 91}}, {"id": 257, "type": "identifier", "text": "numBufs", "parent": 255, "children": [], "start_point": {"row": 82, "column": 92}, "end_point": {"row": 82, "column": 99}}, {"id": 258, "type": "declaration", "text": "virtual uint32_t * getOffsets() ;", "parent": 16, "children": [259, 260, 262], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 37}}, {"id": 259, "type": "type_identifier", "text": "virtual", "parent": 258, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 11}}, {"id": 260, "type": "ERROR", "text": "uint32_t", "parent": 258, "children": [261], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 20}}, {"id": 261, "type": "identifier", "text": "uint32_t", "parent": 260, "children": [], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 20}}, {"id": 262, "type": "pointer_declarator", "text": "* getOffsets()", "parent": 258, "children": [263, 264], "start_point": {"row": 83, "column": 21}, "end_point": {"row": 83, "column": 35}}, {"id": 263, "type": "*", "text": "*", "parent": 262, "children": [], "start_point": {"row": 83, "column": 21}, "end_point": {"row": 83, "column": 22}}, {"id": 264, "type": "function_declarator", "text": "getOffsets()", "parent": 262, "children": [265, 266], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 35}}, {"id": 265, "type": "identifier", "text": "getOffsets", "parent": 264, "children": [], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 33}}, {"id": 266, "type": "parameter_list", "text": "()", "parent": 264, "children": [], "start_point": {"row": 83, "column": 33}, "end_point": {"row": 83, "column": 35}}, {"id": 267, "type": "declaration", "text": "virtual int getFd() ;", "parent": 16, "children": [268, 269, 271], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 25}}, {"id": 268, "type": "type_identifier", "text": "virtual", "parent": 267, "children": [], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 11}}, {"id": 269, "type": "ERROR", "text": "int", "parent": 267, "children": [270], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 15}}, {"id": 270, "type": "identifier", "text": "int", "parent": 269, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 15}}, {"id": 271, "type": "function_declarator", "text": "getFd()", "parent": 267, "children": [272, 273], "start_point": {"row": 84, "column": 16}, "end_point": {"row": 84, "column": 23}}, {"id": 272, "type": "identifier", "text": "getFd", "parent": 271, "children": [], "start_point": {"row": 84, "column": 16}, "end_point": {"row": 84, "column": 21}}, {"id": 273, "type": "parameter_list", "text": "()", "parent": 271, "children": [], "start_point": {"row": 84, "column": 21}, "end_point": {"row": 84, "column": 23}}, {"id": 274, "type": "declaration", "text": "virtual int freeBuffer(void* buf);", "parent": 16, "children": [275, 276, 278], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 38}}, {"id": 275, "type": "type_identifier", "text": "virtual", "parent": 274, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 11}}, {"id": 276, "type": "ERROR", "text": "int", "parent": 274, "children": [277], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 15}}, {"id": 277, "type": "identifier", "text": "int", "parent": 276, "children": [], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 15}}, {"id": 278, "type": "function_declarator", "text": "freeBuffer(void* buf)", "parent": 274, "children": [279, 280], "start_point": {"row": 85, "column": 16}, "end_point": {"row": 85, "column": 37}}, {"id": 279, "type": "identifier", "text": "freeBuffer", "parent": 278, "children": [], "start_point": {"row": 85, "column": 16}, "end_point": {"row": 85, "column": 26}}, {"id": 280, "type": "parameter_list", "text": "(void* buf)", "parent": 278, "children": [281], "start_point": {"row": 85, "column": 26}, "end_point": {"row": 85, "column": 37}}, {"id": 281, "type": "parameter_declaration", "text": "void* buf", "parent": 280, "children": [282, 283], "start_point": {"row": 85, "column": 27}, "end_point": {"row": 85, "column": 36}}, {"id": 282, "type": "primitive_type", "text": "void", "parent": 281, "children": [], "start_point": {"row": 85, "column": 27}, "end_point": {"row": 85, "column": 31}}, {"id": 283, "type": "pointer_declarator", "text": "* buf", "parent": 281, "children": [284, 285], "start_point": {"row": 85, "column": 31}, "end_point": {"row": 85, "column": 36}}, {"id": 284, "type": "*", "text": "*", "parent": 283, "children": [], "start_point": {"row": 85, "column": 31}, "end_point": {"row": 85, "column": 32}}, {"id": 285, "type": "identifier", "text": "buf", "parent": 283, "children": [], "start_point": {"row": 85, "column": 33}, "end_point": {"row": 85, "column": 36}}, {"id": 286, "type": "declaration", "text": "virtual int maxQueueableBuffers(unsigned int& queueable);", "parent": 16, "children": [287, 288, 290], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 61}}, {"id": 287, "type": "type_identifier", "text": "virtual", "parent": 286, "children": [], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 11}}, {"id": 288, "type": "ERROR", "text": "int", "parent": 286, "children": [289], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 15}}, {"id": 289, "type": "identifier", "text": "int", "parent": 288, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 15}}, {"id": 290, "type": "function_declarator", "text": "maxQueueableBuffers(unsigned int& queueable)", "parent": 286, "children": [291, 292], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 60}}, {"id": 291, "type": "identifier", "text": "maxQueueableBuffers", "parent": 290, "children": [], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 35}}, {"id": 292, "type": "parameter_list", "text": "(unsigned int& queueable)", "parent": 290, "children": [293], "start_point": {"row": 87, "column": 35}, "end_point": {"row": 87, "column": 60}}, {"id": 293, "type": "parameter_declaration", "text": "unsigned int& queueable", "parent": 292, "children": [294, 297], "start_point": {"row": 87, "column": 36}, "end_point": {"row": 87, "column": 59}}, {"id": 294, "type": "sized_type_specifier", "text": "unsigned int", "parent": 293, "children": [295, 296], "start_point": {"row": 87, "column": 36}, "end_point": {"row": 87, "column": 48}}, {"id": 295, "type": "unsigned", "text": "unsigned", "parent": 294, "children": [], "start_point": {"row": 87, "column": 36}, "end_point": {"row": 87, "column": 44}}, {"id": 296, "type": "primitive_type", "text": "int", "parent": 294, "children": [], "start_point": {"row": 87, "column": 45}, "end_point": {"row": 87, "column": 48}}, {"id": 297, "type": "identifier", "text": "queueable", "parent": 293, "children": [], "start_point": {"row": 87, "column": 50}, "end_point": {"row": 87, "column": 59}}, {"id": 298, "type": "declaration", "text": "static void frameCallbackRelay(CameraFrame* caFrame);", "parent": 16, "children": [299, 300], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 57}}, {"id": 299, "type": "primitive_type", "text": "void", "parent": 298, "children": [], "start_point": {"row": 90, "column": 11}, "end_point": {"row": 90, "column": 15}}, {"id": 300, "type": "function_declarator", "text": "frameCallbackRelay(CameraFrame* caFrame)", "parent": 298, "children": [301, 302], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 56}}, {"id": 301, "type": "identifier", "text": "frameCallbackRelay", "parent": 300, "children": [], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 34}}, {"id": 302, "type": "parameter_list", "text": "(CameraFrame* caFrame)", "parent": 300, "children": [303], "start_point": {"row": 90, "column": 34}, "end_point": {"row": 90, "column": 56}}, {"id": 303, "type": "parameter_declaration", "text": "CameraFrame* caFrame", "parent": 302, "children": [304, 305], "start_point": {"row": 90, "column": 35}, "end_point": {"row": 90, "column": 55}}, {"id": 304, "type": "type_identifier", "text": "CameraFrame", "parent": 303, "children": [], "start_point": {"row": 90, "column": 35}, "end_point": {"row": 90, "column": 46}}, {"id": 305, "type": "pointer_declarator", "text": "* caFrame", "parent": 303, "children": [306, 307], "start_point": {"row": 90, "column": 46}, "end_point": {"row": 90, "column": 55}}, {"id": 306, "type": "*", "text": "*", "parent": 305, "children": [], "start_point": {"row": 90, "column": 46}, "end_point": {"row": 90, "column": 47}}, {"id": 307, "type": "identifier", "text": "caFrame", "parent": 305, "children": [], "start_point": {"row": 90, "column": 48}, "end_point": {"row": 90, "column": 55}}, {"id": 308, "type": "declaration", "text": "void frameCallback(CameraFrame* caFrame);", "parent": 16, "children": [309, 310], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 45}}, {"id": 309, "type": "primitive_type", "text": "void", "parent": 308, "children": [], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 8}}, {"id": 310, "type": "function_declarator", "text": "frameCallback(CameraFrame* caFrame)", "parent": 308, "children": [311, 312], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 44}}, {"id": 311, "type": "identifier", "text": "frameCallback", "parent": 310, "children": [], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 22}}, {"id": 312, "type": "parameter_list", "text": "(CameraFrame* caFrame)", "parent": 310, "children": [313], "start_point": {"row": 91, "column": 22}, "end_point": {"row": 91, "column": 44}}, {"id": 313, "type": "parameter_declaration", "text": "CameraFrame* caFrame", "parent": 312, "children": [314, 315], "start_point": {"row": 91, "column": 23}, "end_point": {"row": 91, "column": 43}}, {"id": 314, "type": "type_identifier", "text": "CameraFrame", "parent": 313, "children": [], "start_point": {"row": 91, "column": 23}, "end_point": {"row": 91, "column": 34}}, {"id": 315, "type": "pointer_declarator", "text": "* caFrame", "parent": 313, "children": [316, 317], "start_point": {"row": 91, "column": 34}, "end_point": {"row": 91, "column": 43}}, {"id": 316, "type": "*", "text": "*", "parent": 315, "children": [], "start_point": {"row": 91, "column": 34}, "end_point": {"row": 91, "column": 35}}, {"id": 317, "type": "identifier", "text": "caFrame", "parent": 315, "children": [], "start_point": {"row": 91, "column": 36}, "end_point": {"row": 91, "column": 43}}, {"id": 318, "type": "declaration", "text": "void displayThread();", "parent": 16, "children": [319, 320], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 25}}, {"id": 319, "type": "primitive_type", "text": "void", "parent": 318, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 8}}, {"id": 320, "type": "function_declarator", "text": "displayThread()", "parent": 318, "children": [321, 322], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 24}}, {"id": 321, "type": "identifier", "text": "displayThread", "parent": 320, "children": [], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 22}}, {"id": 322, "type": "parameter_list", "text": "()", "parent": 320, "children": [], "start_point": {"row": 93, "column": 22}, "end_point": {"row": 93, "column": 24}}, {"id": 323, "type": "labeled_statement", "text": "private:\n void destroy();", "parent": 16, "children": [324], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 96, "column": 19}}, {"id": 324, "type": "declaration", "text": "void destroy();", "parent": 323, "children": [325, 326], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 19}}, {"id": 325, "type": "primitive_type", "text": "void", "parent": 324, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 8}}, {"id": 326, "type": "function_declarator", "text": "destroy()", "parent": 324, "children": [327, 328], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 18}}, {"id": 327, "type": "identifier", "text": "destroy", "parent": 326, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 16}}, {"id": 328, "type": "parameter_list", "text": "()", "parent": 326, "children": [], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 18}}, {"id": 329, "type": "declaration", "text": "bool processHalMsg();", "parent": 16, "children": [330, 331], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 25}}, {"id": 330, "type": "primitive_type", "text": "bool", "parent": 329, "children": [], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 8}}, {"id": 331, "type": "function_declarator", "text": "processHalMsg()", "parent": 329, "children": [332, 333], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 24}}, {"id": 332, "type": "identifier", "text": "processHalMsg", "parent": 331, "children": [], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 22}}, {"id": 333, "type": "parameter_list", "text": "()", "parent": 331, "children": [], "start_point": {"row": 97, "column": 22}, "end_point": {"row": 97, "column": 24}}, {"id": 334, "type": "declaration", "text": "status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame);", "parent": 16, "children": [335, 336], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 77}}, {"id": 335, "type": "type_identifier", "text": "status_t", "parent": 334, "children": [], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 12}}, {"id": 336, "type": "function_declarator", "text": "PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame)", "parent": 334, "children": [337, 338], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 76}}, {"id": 337, "type": "identifier", "text": "PostFrame", "parent": 336, "children": [], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 22}}, {"id": 338, "type": "parameter_list", "text": "(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame)", "parent": 336, "children": [339], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 76}}, {"id": 339, "type": "parameter_declaration", "text": "ANativeWindowDisplayAdapter::DisplayFrame &dispFrame", "parent": 338, "children": [340, 341, 343], "start_point": {"row": 98, "column": 23}, "end_point": {"row": 98, "column": 75}}, {"id": 340, "type": "type_identifier", "text": "ANativeWindowDisplayAdapter", "parent": 339, "children": [], "start_point": {"row": 98, "column": 23}, "end_point": {"row": 98, "column": 50}}, {"id": 341, "type": "ERROR", "text": "::DisplayFrame &", "parent": 339, "children": [342], "start_point": {"row": 98, "column": 50}, "end_point": {"row": 98, "column": 66}}, {"id": 342, "type": "identifier", "text": "DisplayFrame", "parent": 341, "children": [], "start_point": {"row": 98, "column": 52}, "end_point": {"row": 98, "column": 64}}, {"id": 343, "type": "identifier", "text": "dispFrame", "parent": 339, "children": [], "start_point": {"row": 98, "column": 66}, "end_point": {"row": 98, "column": 75}}, {"id": 344, "type": "declaration", "text": "bool handleFrameReturn();", "parent": 16, "children": [345, 346], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 29}}, {"id": 345, "type": "primitive_type", "text": "bool", "parent": 344, "children": [], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 8}}, {"id": 346, "type": "function_declarator", "text": "handleFrameReturn()", "parent": 344, "children": [347, 348], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 99, "column": 28}}, {"id": 347, "type": "identifier", "text": "handleFrameReturn", "parent": 346, "children": [], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 99, "column": 26}}, {"id": 348, "type": "parameter_list", "text": "()", "parent": 346, "children": [], "start_point": {"row": 99, "column": 26}, "end_point": {"row": 99, "column": 28}}, {"id": 349, "type": "declaration", "text": "status_t returnBuffersToWindow();", "parent": 16, "children": [350, 351], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 37}}, {"id": 350, "type": "type_identifier", "text": "status_t", "parent": 349, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 12}}, {"id": 351, "type": "function_declarator", "text": "returnBuffersToWindow()", "parent": 349, "children": [352, 353], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 36}}, {"id": 352, "type": "identifier", "text": "returnBuffersToWindow", "parent": 351, "children": [], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 34}}, {"id": 353, "type": "parameter_list", "text": "()", "parent": 351, "children": [], "start_point": {"row": 100, "column": 34}, "end_point": {"row": 100, "column": 36}}, {"id": 354, "type": "labeled_statement", "text": "public:\n\n static const int DISPLAY_TIMEOUT;", "parent": 16, "children": [355], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 104, "column": 37}}, {"id": 355, "type": "declaration", "text": "static const int DISPLAY_TIMEOUT;", "parent": 354, "children": [356, 357], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 37}}, {"id": 356, "type": "primitive_type", "text": "int", "parent": 355, "children": [], "start_point": {"row": 104, "column": 17}, "end_point": {"row": 104, "column": 20}}, {"id": 357, "type": "identifier", "text": "DISPLAY_TIMEOUT", "parent": 355, "children": [], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 36}}, {"id": 358, "type": "declaration", "text": "static const int FAILED_DQS_TO_SUSPEND;", "parent": 16, "children": [359, 360], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 43}}, {"id": 359, "type": "primitive_type", "text": "int", "parent": 358, "children": [], "start_point": {"row": 105, "column": 17}, "end_point": {"row": 105, "column": 20}}, {"id": 360, "type": "identifier", "text": "FAILED_DQS_TO_SUSPEND", "parent": 358, "children": [], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 42}}, {"id": 361, "type": "function_definition", "text": "class DisplayThread : public Thread\n {\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n TIUTILS::MessageQueue mDisplayThreadQ;\n\n public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }\n\n ///Returns a reference to the display message Q for display adapter to post messages\n TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }\n\n virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }\n\n enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n };\n }", "parent": 16, "children": [362, 363], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 135, "column": 9}}, {"id": 362, "type": "identifier", "text": "DisplayThread", "parent": 361, "children": [], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 23}}, {"id": 363, "type": "ERROR", "text": ": public Thread", "parent": 361, "children": [364], "start_point": {"row": 107, "column": 24}, "end_point": {"row": 107, "column": 39}}, {"id": 364, "type": "identifier", "text": "Thread", "parent": 363, "children": [], "start_point": {"row": 107, "column": 33}, "end_point": {"row": 107, "column": 39}}, {"id": 365, "type": "declaration", "text": "ANativeWindowDisplayAdapter* mDisplayAdapter;", "parent": 361, "children": [366, 367], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 53}}, {"id": 366, "type": "type_identifier", "text": "ANativeWindowDisplayAdapter", "parent": 365, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 35}}, {"id": 367, "type": "pointer_declarator", "text": "* mDisplayAdapter", "parent": 365, "children": [368, 369], "start_point": {"row": 109, "column": 35}, "end_point": {"row": 109, "column": 52}}, {"id": 368, "type": "*", "text": "*", "parent": 367, "children": [], "start_point": {"row": 109, "column": 35}, "end_point": {"row": 109, "column": 36}}, {"id": 369, "type": "identifier", "text": "mDisplayAdapter", "parent": 367, "children": [], "start_point": {"row": 109, "column": 37}, "end_point": {"row": 109, "column": 52}}, {"id": 370, "type": "labeled_statement", "text": "TIUTILS::MessageQueue mDisplayThreadQ;", "parent": 361, "children": [371, 372], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 46}}, {"id": 371, "type": "statement_identifier", "text": "TIUTILS", "parent": 370, "children": [], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 15}}, {"id": 372, "type": "declaration", "text": "MessageQueue mDisplayThreadQ;", "parent": 370, "children": [373, 374], "start_point": {"row": 110, "column": 17}, "end_point": {"row": 110, "column": 46}}, {"id": 373, "type": "type_identifier", "text": "MessageQueue", "parent": 372, "children": [], "start_point": {"row": 110, "column": 17}, "end_point": {"row": 110, "column": 29}}, {"id": 374, "type": "identifier", "text": "mDisplayThreadQ", "parent": 372, "children": [], "start_point": {"row": 110, "column": 30}, "end_point": {"row": 110, "column": 45}}, {"id": 375, "type": "labeled_statement", "text": "public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }", "parent": 361, "children": [376], "start_point": {"row": 112, "column": 8}, "end_point": {"row": 114, "column": 52}}, {"id": 376, "type": "ERROR", "text": "DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da)", "parent": 375, "children": [377, 384], "start_point": {"row": 113, "column": 12}, "end_point": {"row": 114, "column": 48}}, {"id": 377, "type": "call_expression", "text": "DisplayThread(ANativeWindowDisplayAdapter* da)", "parent": 376, "children": [378, 379], "start_point": {"row": 113, "column": 12}, "end_point": {"row": 113, "column": 58}}, {"id": 378, "type": "identifier", "text": "DisplayThread", "parent": 377, "children": [], "start_point": {"row": 113, "column": 12}, "end_point": {"row": 113, "column": 25}}, {"id": 379, "type": "argument_list", "text": "(ANativeWindowDisplayAdapter* da)", "parent": 377, "children": [380], "start_point": {"row": 113, "column": 25}, "end_point": {"row": 113, "column": 58}}, {"id": 380, "type": "binary_expression", "text": "ANativeWindowDisplayAdapter* da", "parent": 379, "children": [381, 382, 383], "start_point": {"row": 113, "column": 26}, "end_point": {"row": 113, "column": 57}}, {"id": 381, "type": "identifier", "text": "ANativeWindowDisplayAdapter", "parent": 380, "children": [], "start_point": {"row": 113, "column": 26}, "end_point": {"row": 113, "column": 53}}, {"id": 382, "type": "*", "text": "*", "parent": 380, "children": [], "start_point": {"row": 113, "column": 53}, "end_point": {"row": 113, "column": 54}}, {"id": 383, "type": "identifier", "text": "da", "parent": 380, "children": [], "start_point": {"row": 113, "column": 55}, "end_point": {"row": 113, "column": 57}}, {"id": 384, "type": "comma_expression", "text": "Thread(false), mDisplayAdapter(da)", "parent": 376, "children": [385, 389], "start_point": {"row": 114, "column": 14}, "end_point": {"row": 114, "column": 48}}, {"id": 385, "type": "call_expression", "text": "Thread(false)", "parent": 384, "children": [386, 387], "start_point": {"row": 114, "column": 14}, "end_point": {"row": 114, "column": 27}}, {"id": 386, "type": "identifier", "text": "Thread", "parent": 385, "children": [], "start_point": {"row": 114, "column": 14}, "end_point": {"row": 114, "column": 20}}, {"id": 387, "type": "argument_list", "text": "(false)", "parent": 385, "children": [388], "start_point": {"row": 114, "column": 20}, "end_point": {"row": 114, "column": 27}}, {"id": 388, "type": "false", "text": "false", "parent": 387, "children": [], "start_point": {"row": 114, "column": 21}, "end_point": {"row": 114, "column": 26}}, {"id": 389, "type": "call_expression", "text": "mDisplayAdapter(da)", "parent": 384, "children": [390, 391], "start_point": {"row": 114, "column": 29}, "end_point": {"row": 114, "column": 48}}, {"id": 390, "type": "identifier", "text": "mDisplayAdapter", "parent": 389, "children": [], "start_point": {"row": 114, "column": 29}, "end_point": {"row": 114, "column": 44}}, {"id": 391, "type": "argument_list", "text": "(da)", "parent": 389, "children": [392], "start_point": {"row": 114, "column": 44}, "end_point": {"row": 114, "column": 48}}, {"id": 392, "type": "identifier", "text": "da", "parent": 391, "children": [], "start_point": {"row": 114, "column": 45}, "end_point": {"row": 114, "column": 47}}, {"id": 393, "type": "labeled_statement", "text": "TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }", "parent": 361, "children": [394, 395], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 120, "column": 17}}, {"id": 394, "type": "statement_identifier", "text": "TIUTILS", "parent": 393, "children": [], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 19}}, {"id": 395, "type": "ERROR", "text": ":MessageQueue& msgQ()", "parent": 393, "children": [396], "start_point": {"row": 117, "column": 20}, "end_point": {"row": 117, "column": 41}}, {"id": 396, "type": "binary_expression", "text": "MessageQueue& msgQ()", "parent": 395, "children": [397, 398], "start_point": {"row": 117, "column": 21}, "end_point": {"row": 117, "column": 41}}, {"id": 397, "type": "identifier", "text": "MessageQueue", "parent": 396, "children": [], "start_point": {"row": 117, "column": 21}, "end_point": {"row": 117, "column": 33}}, {"id": 398, "type": "call_expression", "text": "msgQ()", "parent": 396, "children": [399, 400], "start_point": {"row": 117, "column": 35}, "end_point": {"row": 117, "column": 41}}, {"id": 399, "type": "identifier", "text": "msgQ", "parent": 398, "children": [], "start_point": {"row": 117, "column": 35}, "end_point": {"row": 117, "column": 39}}, {"id": 400, "type": "argument_list", "text": "()", "parent": 398, "children": [], "start_point": {"row": 117, "column": 39}, "end_point": {"row": 117, "column": 41}}, {"id": 401, "type": "return_statement", "text": "return mDisplayThreadQ;", "parent": 393, "children": [402], "start_point": {"row": 119, "column": 16}, "end_point": {"row": 119, "column": 39}}, {"id": 402, "type": "identifier", "text": "mDisplayThreadQ", "parent": 401, "children": [], "start_point": {"row": 119, "column": 23}, "end_point": {"row": 119, "column": 38}}, {"id": 403, "type": "function_definition", "text": "virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }", "parent": 361, "children": [404, 405, 407], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 126, "column": 17}}, {"id": 404, "type": "type_identifier", "text": "virtual", "parent": 403, "children": [], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 19}}, {"id": 405, "type": "ERROR", "text": "bool", "parent": 403, "children": [406], "start_point": {"row": 122, "column": 20}, "end_point": {"row": 122, "column": 24}}, {"id": 406, "type": "identifier", "text": "bool", "parent": 405, "children": [], "start_point": {"row": 122, "column": 20}, "end_point": {"row": 122, "column": 24}}, {"id": 407, "type": "function_declarator", "text": "threadLoop()", "parent": 403, "children": [408, 409], "start_point": {"row": 122, "column": 25}, "end_point": {"row": 122, "column": 37}}, {"id": 408, "type": "identifier", "text": "threadLoop", "parent": 407, "children": [], "start_point": {"row": 122, "column": 25}, "end_point": {"row": 122, "column": 35}}, {"id": 409, "type": "parameter_list", "text": "()", "parent": 407, "children": [], "start_point": {"row": 122, "column": 35}, "end_point": {"row": 122, "column": 37}}, {"id": 410, "type": "call_expression", "text": "mDisplayAdapter->displayThread()", "parent": 403, "children": [411, 414], "start_point": {"row": 124, "column": 16}, "end_point": {"row": 124, "column": 48}}, {"id": 411, "type": "field_expression", "text": "mDisplayAdapter->displayThread", "parent": 410, "children": [412, 413], "start_point": {"row": 124, "column": 16}, "end_point": {"row": 124, "column": 46}}, {"id": 412, "type": "identifier", "text": "mDisplayAdapter", "parent": 411, "children": [], "start_point": {"row": 124, "column": 16}, "end_point": {"row": 124, "column": 31}}, {"id": 413, "type": "field_identifier", "text": "displayThread", "parent": 411, "children": [], "start_point": {"row": 124, "column": 33}, "end_point": {"row": 124, "column": 46}}, {"id": 414, "type": "argument_list", "text": "()", "parent": 410, "children": [], "start_point": {"row": 124, "column": 46}, "end_point": {"row": 124, "column": 48}}, {"id": 415, "type": "return_statement", "text": "return false;", "parent": 403, "children": [416], "start_point": {"row": 125, "column": 16}, "end_point": {"row": 125, "column": 29}}, {"id": 416, "type": "false", "text": "false", "parent": 415, "children": [], "start_point": {"row": 125, "column": 23}, "end_point": {"row": 125, "column": 28}}, {"id": 417, "type": "enum_specifier", "text": "enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n }", "parent": 361, "children": [418, 419, 420], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 134, "column": 17}}, {"id": 418, "type": "enum", "text": "enum", "parent": 417, "children": [], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 16}}, {"id": 419, "type": "type_identifier", "text": "DisplayThreadCommands", "parent": 417, "children": [], "start_point": {"row": 128, "column": 17}, "end_point": {"row": 128, "column": 38}}, {"id": 420, "type": "enumerator_list", "text": "{\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n }", "parent": 417, "children": [421, 423, 425, 427], "start_point": {"row": 129, "column": 16}, "end_point": {"row": 134, "column": 17}}, {"id": 421, "type": "enumerator", "text": "DISPLAY_START", "parent": 420, "children": [422], "start_point": {"row": 130, "column": 16}, "end_point": {"row": 130, "column": 29}}, {"id": 422, "type": "identifier", "text": "DISPLAY_START", "parent": 421, "children": [], "start_point": {"row": 130, "column": 16}, "end_point": {"row": 130, "column": 29}}, {"id": 423, "type": "enumerator", "text": "DISPLAY_STOP", "parent": 420, "children": [424], "start_point": {"row": 131, "column": 16}, "end_point": {"row": 131, "column": 28}}, {"id": 424, "type": "identifier", "text": "DISPLAY_STOP", "parent": 423, "children": [], "start_point": {"row": 131, "column": 16}, "end_point": {"row": 131, "column": 28}}, {"id": 425, "type": "enumerator", "text": "DISPLAY_FRAME", "parent": 420, "children": [426], "start_point": {"row": 132, "column": 16}, "end_point": {"row": 132, "column": 29}}, {"id": 426, "type": "identifier", "text": "DISPLAY_FRAME", "parent": 425, "children": [], "start_point": {"row": 132, "column": 16}, "end_point": {"row": 132, "column": 29}}, {"id": 427, "type": "enumerator", "text": "DISPLAY_EXIT", "parent": 420, "children": [428], "start_point": {"row": 133, "column": 16}, "end_point": {"row": 133, "column": 28}}, {"id": 428, "type": "identifier", "text": "DISPLAY_EXIT", "parent": 427, "children": [], "start_point": {"row": 133, "column": 16}, "end_point": {"row": 133, "column": 28}}, {"id": 429, "type": "declaration", "text": "friend class DisplayThread;", "parent": 16, "children": [430, 431], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 138, "column": 27}}, {"id": 430, "type": "type_identifier", "text": "friend", "parent": 429, "children": [], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 138, "column": 6}}, {"id": 431, "type": "identifier", "text": "DisplayThread", "parent": 429, "children": [], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 26}}, {"id": 432, "type": "labeled_statement", "text": "private:\n int postBuffer(void* displayBuf);", "parent": 16, "children": [433], "start_point": {"row": 140, "column": 0}, "end_point": {"row": 141, "column": 37}}, {"id": 433, "type": "declaration", "text": "int postBuffer(void* displayBuf);", "parent": 432, "children": [434, 435], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 37}}, {"id": 434, "type": "primitive_type", "text": "int", "parent": 433, "children": [], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 7}}, {"id": 435, "type": "function_declarator", "text": "postBuffer(void* displayBuf)", "parent": 433, "children": [436, 437], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 36}}, {"id": 436, "type": "identifier", "text": "postBuffer", "parent": 435, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 18}}, {"id": 437, "type": "parameter_list", "text": "(void* displayBuf)", "parent": 435, "children": [438], "start_point": {"row": 141, "column": 18}, "end_point": {"row": 141, "column": 36}}, {"id": 438, "type": "parameter_declaration", "text": "void* displayBuf", "parent": 437, "children": [439, 440], "start_point": {"row": 141, "column": 19}, "end_point": {"row": 141, "column": 35}}, {"id": 439, "type": "primitive_type", "text": "void", "parent": 438, "children": [], "start_point": {"row": 141, "column": 19}, "end_point": {"row": 141, "column": 23}}, {"id": 440, "type": "pointer_declarator", "text": "* displayBuf", "parent": 438, "children": [441, 442], "start_point": {"row": 141, "column": 23}, "end_point": {"row": 141, "column": 35}}, {"id": 441, "type": "*", "text": "*", "parent": 440, "children": [], "start_point": {"row": 141, "column": 23}, "end_point": {"row": 141, "column": 24}}, {"id": 442, "type": "identifier", "text": "displayBuf", "parent": 440, "children": [], "start_point": {"row": 141, "column": 25}, "end_point": {"row": 141, "column": 35}}, {"id": 443, "type": "labeled_statement", "text": "private:\n bool mFirstInit;", "parent": 16, "children": [444], "start_point": {"row": 143, "column": 0}, "end_point": {"row": 144, "column": 20}}, {"id": 444, "type": "declaration", "text": "bool mFirstInit;", "parent": 443, "children": [445, 446], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 20}}, {"id": 445, "type": "primitive_type", "text": "bool", "parent": 444, "children": [], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 8}}, {"id": 446, "type": "identifier", "text": "mFirstInit", "parent": 444, "children": [], "start_point": {"row": 144, "column": 9}, "end_point": {"row": 144, "column": 19}}, {"id": 447, "type": "declaration", "text": "bool mSuspend;", "parent": 16, "children": [448, 449], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 18}}, {"id": 448, "type": "primitive_type", "text": "bool", "parent": 447, "children": [], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 8}}, {"id": 449, "type": "identifier", "text": "mSuspend", "parent": 447, "children": [], "start_point": {"row": 145, "column": 9}, "end_point": {"row": 145, "column": 17}}, {"id": 450, "type": "declaration", "text": "int mFailedDQs;", "parent": 16, "children": [451, 452], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 19}}, {"id": 451, "type": "primitive_type", "text": "int", "parent": 450, "children": [], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 7}}, {"id": 452, "type": "identifier", "text": "mFailedDQs", "parent": 450, "children": [], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 18}}, {"id": 453, "type": "declaration", "text": "bool mPaused;", "parent": 16, "children": [454, 455], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 17}}, {"id": 454, "type": "primitive_type", "text": "bool", "parent": 453, "children": [], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 8}}, {"id": 455, "type": "identifier", "text": "mPaused", "parent": 453, "children": [], "start_point": {"row": 147, "column": 9}, "end_point": {"row": 147, "column": 16}}, {"id": 456, "type": "declaration", "text": "preview_stream_ops_t* mANativeWindow;", "parent": 16, "children": [457, 458], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 42}}, {"id": 457, "type": "type_identifier", "text": "preview_stream_ops_t", "parent": 456, "children": [], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 24}}, {"id": 458, "type": "pointer_declarator", "text": "* mANativeWindow", "parent": 456, "children": [459, 460], "start_point": {"row": 148, "column": 24}, "end_point": {"row": 148, "column": 41}}, {"id": 459, "type": "*", "text": "*", "parent": 458, "children": [], "start_point": {"row": 148, "column": 24}, "end_point": {"row": 148, "column": 25}}, {"id": 460, "type": "identifier", "text": "mANativeWindow", "parent": 458, "children": [], "start_point": {"row": 148, "column": 27}, "end_point": {"row": 148, "column": 41}}, {"id": 461, "type": "binary_expression", "text": "sp<DisplayThread> mDisplayThread", "parent": 16, "children": [462, 466, 467], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 36}}, {"id": 462, "type": "binary_expression", "text": "sp<DisplayThread", "parent": 461, "children": [463, 464, 465], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 20}}, {"id": 463, "type": "identifier", "text": "sp", "parent": 462, "children": [], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 6}}, {"id": 464, "type": "<", "text": "<", "parent": 462, "children": [], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 7}}, {"id": 465, "type": "identifier", "text": "DisplayThread", "parent": 462, "children": [], "start_point": {"row": 149, "column": 7}, "end_point": {"row": 149, "column": 20}}, {"id": 466, "type": ">", "text": ">", "parent": 461, "children": [], "start_point": {"row": 149, "column": 20}, "end_point": {"row": 149, "column": 21}}, {"id": 467, "type": "identifier", "text": "mDisplayThread", "parent": 461, "children": [], "start_point": {"row": 149, "column": 22}, "end_point": {"row": 149, "column": 36}}, {"id": 468, "type": "declaration", "text": "FrameProvider *mFrameProvider;", "parent": 16, "children": [469, 470], "start_point": {"row": 150, "column": 4}, "end_point": {"row": 150, "column": 34}}, {"id": 469, "type": "type_identifier", "text": "FrameProvider", "parent": 468, "children": [], "start_point": {"row": 150, "column": 4}, "end_point": {"row": 150, "column": 17}}, {"id": 470, "type": "pointer_declarator", "text": "*mFrameProvider", "parent": 468, "children": [471, 472], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 33}}, {"id": 471, "type": "*", "text": "*", "parent": 470, "children": [], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 19}}, {"id": 472, "type": "identifier", "text": "mFrameProvider", "parent": 470, "children": [], "start_point": {"row": 150, "column": 19}, "end_point": {"row": 150, "column": 33}}, {"id": 473, "type": "labeled_statement", "text": "TIUTILS::MessageQueue mDisplayQ;", "parent": 16, "children": [474, 475], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 36}}, {"id": 474, "type": "statement_identifier", "text": "TIUTILS", "parent": 473, "children": [], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 11}}, {"id": 475, "type": "declaration", "text": "MessageQueue mDisplayQ;", "parent": 473, "children": [476, 477], "start_point": {"row": 151, "column": 13}, "end_point": {"row": 151, "column": 36}}, {"id": 476, "type": "type_identifier", "text": "MessageQueue", "parent": 475, "children": [], "start_point": {"row": 151, "column": 13}, "end_point": {"row": 151, "column": 25}}, {"id": 477, "type": "identifier", "text": "mDisplayQ", "parent": 475, "children": [], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 35}}, {"id": 478, "type": "declaration", "text": "unsigned int mDisplayState;", "parent": 16, "children": [479, 482], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 31}}, {"id": 479, "type": "sized_type_specifier", "text": "unsigned int", "parent": 478, "children": [480, 481], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 16}}, {"id": 480, "type": "unsigned", "text": "unsigned", "parent": 479, "children": [], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 12}}, {"id": 481, "type": "primitive_type", "text": "int", "parent": 479, "children": [], "start_point": {"row": 152, "column": 13}, "end_point": {"row": 152, "column": 16}}, {"id": 482, "type": "identifier", "text": "mDisplayState", "parent": 478, "children": [], "start_point": {"row": 152, "column": 17}, "end_point": {"row": 152, "column": 30}}, {"id": 483, "type": "declaration", "text": "mutable Mutex mLock;", "parent": 16, "children": [484, 485, 487], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 24}}, {"id": 484, "type": "type_identifier", "text": "mutable", "parent": 483, "children": [], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 11}}, {"id": 485, "type": "ERROR", "text": "Mutex", "parent": 483, "children": [486], "start_point": {"row": 154, "column": 12}, "end_point": {"row": 154, "column": 17}}, {"id": 486, "type": "identifier", "text": "Mutex", "parent": 485, "children": [], "start_point": {"row": 154, "column": 12}, "end_point": {"row": 154, "column": 17}}, {"id": 487, "type": "identifier", "text": "mLock", "parent": 483, "children": [], "start_point": {"row": 154, "column": 18}, "end_point": {"row": 154, "column": 23}}, {"id": 488, "type": "declaration", "text": "bool mDisplayEnabled;", "parent": 16, "children": [489, 490], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 155, "column": 25}}, {"id": 489, "type": "primitive_type", "text": "bool", "parent": 488, "children": [], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 155, "column": 8}}, {"id": 490, "type": "identifier", "text": "mDisplayEnabled", "parent": 488, "children": [], "start_point": {"row": 155, "column": 9}, "end_point": {"row": 155, "column": 24}}, {"id": 491, "type": "declaration", "text": "int mBufferCount;", "parent": 16, "children": [492, 493], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 21}}, {"id": 492, "type": "primitive_type", "text": "int", "parent": 491, "children": [], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 7}}, {"id": 493, "type": "identifier", "text": "mBufferCount", "parent": 491, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 20}}, {"id": 494, "type": "declaration", "text": "buffer_handle_t** mBufferHandleMap;", "parent": 16, "children": [495, 496], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 39}}, {"id": 495, "type": "type_identifier", "text": "buffer_handle_t", "parent": 494, "children": [], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 19}}, {"id": 496, "type": "pointer_declarator", "text": "** mBufferHandleMap", "parent": 494, "children": [497, 498], "start_point": {"row": 157, "column": 19}, "end_point": {"row": 157, "column": 38}}, {"id": 497, "type": "*", "text": "*", "parent": 496, "children": [], "start_point": {"row": 157, "column": 19}, "end_point": {"row": 157, "column": 20}}, {"id": 498, "type": "pointer_declarator", "text": "* mBufferHandleMap", "parent": 496, "children": [499, 500], "start_point": {"row": 157, "column": 20}, "end_point": {"row": 157, "column": 38}}, {"id": 499, "type": "*", "text": "*", "parent": 498, "children": [], "start_point": {"row": 157, "column": 20}, "end_point": {"row": 157, "column": 21}}, {"id": 500, "type": "identifier", "text": "mBufferHandleMap", "parent": 498, "children": [], "start_point": {"row": 157, "column": 22}, "end_point": {"row": 157, "column": 38}}, {"id": 501, "type": "declaration", "text": "IMG_native_handle_t** mGrallocHandleMap;", "parent": 16, "children": [502, 503], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 44}}, {"id": 502, "type": "type_identifier", "text": "IMG_native_handle_t", "parent": 501, "children": [], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 23}}, {"id": 503, "type": "pointer_declarator", "text": "** mGrallocHandleMap", "parent": 501, "children": [504, 505], "start_point": {"row": 158, "column": 23}, "end_point": {"row": 158, "column": 43}}, {"id": 504, "type": "*", "text": "*", "parent": 503, "children": [], "start_point": {"row": 158, "column": 23}, "end_point": {"row": 158, "column": 24}}, {"id": 505, "type": "pointer_declarator", "text": "* mGrallocHandleMap", "parent": 503, "children": [506, 507], "start_point": {"row": 158, "column": 24}, "end_point": {"row": 158, "column": 43}}, {"id": 506, "type": "*", "text": "*", "parent": 505, "children": [], "start_point": {"row": 158, "column": 24}, "end_point": {"row": 158, "column": 25}}, {"id": 507, "type": "identifier", "text": "mGrallocHandleMap", "parent": 505, "children": [], "start_point": {"row": 158, "column": 26}, "end_point": {"row": 158, "column": 43}}, {"id": 508, "type": "declaration", "text": "uint32_t* mOffsetsMap;", "parent": 16, "children": [509, 510], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 26}}, {"id": 509, "type": "primitive_type", "text": "uint32_t", "parent": 508, "children": [], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 12}}, {"id": 510, "type": "pointer_declarator", "text": "* mOffsetsMap", "parent": 508, "children": [511, 512], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 25}}, {"id": 511, "type": "*", "text": "*", "parent": 510, "children": [], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 13}}, {"id": 512, "type": "identifier", "text": "mOffsetsMap", "parent": 510, "children": [], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 25}}, {"id": 513, "type": "declaration", "text": "int mFD;", "parent": 16, "children": [514, 515], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 12}}, {"id": 514, "type": "primitive_type", "text": "int", "parent": 513, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 7}}, {"id": 515, "type": "identifier", "text": "mFD", "parent": 513, "children": [], "start_point": {"row": 160, "column": 8}, "end_point": {"row": 160, "column": 11}}, {"id": 516, "type": "comma_expression", "text": "KeyedVector<int, int> mFramesWithCameraAdapterMap", "parent": 16, "children": [517, 521], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 53}}, {"id": 517, "type": "binary_expression", "text": "KeyedVector<int", "parent": 516, "children": [518, 519, 520], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 19}}, {"id": 518, "type": "identifier", "text": "KeyedVector", "parent": 517, "children": [], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 15}}, {"id": 519, "type": "<", "text": "<", "parent": 517, "children": [], "start_point": {"row": 161, "column": 15}, "end_point": {"row": 161, "column": 16}}, {"id": 520, "type": "identifier", "text": "int", "parent": 517, "children": [], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 19}}, {"id": 521, "type": "binary_expression", "text": "int> mFramesWithCameraAdapterMap", "parent": 516, "children": [522, 523, 524], "start_point": {"row": 161, "column": 21}, "end_point": {"row": 161, "column": 53}}, {"id": 522, "type": "identifier", "text": "int", "parent": 521, "children": [], "start_point": {"row": 161, "column": 21}, "end_point": {"row": 161, "column": 24}}, {"id": 523, "type": ">", "text": ">", "parent": 521, "children": [], "start_point": {"row": 161, "column": 24}, "end_point": {"row": 161, "column": 25}}, {"id": 524, "type": "identifier", "text": "mFramesWithCameraAdapterMap", "parent": 521, "children": [], "start_point": {"row": 161, "column": 26}, "end_point": {"row": 161, "column": 53}}, {"id": 525, "type": "binary_expression", "text": "sp<ErrorNotifier> mErrorNotifier", "parent": 16, "children": [526, 530, 531], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 36}}, {"id": 526, "type": "binary_expression", "text": "sp<ErrorNotifier", "parent": 525, "children": [527, 528, 529], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 20}}, {"id": 527, "type": "identifier", "text": "sp", "parent": 526, "children": [], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 6}}, {"id": 528, "type": "<", "text": "<", "parent": 526, "children": [], "start_point": {"row": 162, "column": 6}, "end_point": {"row": 162, "column": 7}}, {"id": 529, "type": "identifier", "text": "ErrorNotifier", "parent": 526, "children": [], "start_point": {"row": 162, "column": 7}, "end_point": {"row": 162, "column": 20}}, {"id": 530, "type": ">", "text": ">", "parent": 525, "children": [], "start_point": {"row": 162, "column": 20}, "end_point": {"row": 162, "column": 21}}, {"id": 531, "type": "identifier", "text": "mErrorNotifier", "parent": 525, "children": [], "start_point": {"row": 162, "column": 22}, "end_point": {"row": 162, "column": 36}}, {"id": 532, "type": "declaration", "text": "uint32_t mFrameWidth;", "parent": 16, "children": [533, 534], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 25}}, {"id": 533, "type": "primitive_type", "text": "uint32_t", "parent": 532, "children": [], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 12}}, {"id": 534, "type": "identifier", "text": "mFrameWidth", "parent": 532, "children": [], "start_point": {"row": 164, "column": 13}, "end_point": {"row": 164, "column": 24}}, {"id": 535, "type": "declaration", "text": "uint32_t mFrameHeight;", "parent": 16, "children": [536, 537], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 26}}, {"id": 536, "type": "primitive_type", "text": "uint32_t", "parent": 535, "children": [], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 12}}, {"id": 537, "type": "identifier", "text": "mFrameHeight", "parent": 535, "children": [], "start_point": {"row": 165, "column": 13}, "end_point": {"row": 165, "column": 25}}, {"id": 538, "type": "declaration", "text": "uint32_t mPreviewWidth;", "parent": 16, "children": [539, 540], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 27}}, {"id": 539, "type": "primitive_type", "text": "uint32_t", "parent": 538, "children": [], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 12}}, {"id": 540, "type": "identifier", "text": "mPreviewWidth", "parent": 538, "children": [], "start_point": {"row": 166, "column": 13}, "end_point": {"row": 166, "column": 26}}, {"id": 541, "type": "declaration", "text": "uint32_t mPreviewHeight;", "parent": 16, "children": [542, 543], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 28}}, {"id": 542, "type": "primitive_type", "text": "uint32_t", "parent": 541, "children": [], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 12}}, {"id": 543, "type": "identifier", "text": "mPreviewHeight", "parent": 541, "children": [], "start_point": {"row": 167, "column": 13}, "end_point": {"row": 167, "column": 27}}, {"id": 544, "type": "declaration", "text": "uint32_t mXOff;", "parent": 16, "children": [545, 546], "start_point": {"row": 169, "column": 4}, "end_point": {"row": 169, "column": 19}}, {"id": 545, "type": "primitive_type", "text": "uint32_t", "parent": 544, "children": [], "start_point": {"row": 169, "column": 4}, "end_point": {"row": 169, "column": 12}}, {"id": 546, "type": "identifier", "text": "mXOff", "parent": 544, "children": [], "start_point": {"row": 169, "column": 13}, "end_point": {"row": 169, "column": 18}}, {"id": 547, "type": "declaration", "text": "uint32_t mYOff;", "parent": 16, "children": [548, 549], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 19}}, {"id": 548, "type": "primitive_type", "text": "uint32_t", "parent": 547, "children": [], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 12}}, {"id": 549, "type": "identifier", "text": "mYOff", "parent": 547, "children": [], "start_point": {"row": 170, "column": 13}, "end_point": {"row": 170, "column": 18}}, {"id": 550, "type": "declaration", "text": "const char *mPixelFormat;", "parent": 16, "children": [551, 552], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 29}}, {"id": 551, "type": "primitive_type", "text": "char", "parent": 550, "children": [], "start_point": {"row": 172, "column": 10}, "end_point": {"row": 172, "column": 14}}, {"id": 552, "type": "pointer_declarator", "text": "*mPixelFormat", "parent": 550, "children": [553, 554], "start_point": {"row": 172, "column": 15}, "end_point": {"row": 172, "column": 28}}, {"id": 553, "type": "*", "text": "*", "parent": 552, "children": [], "start_point": {"row": 172, "column": 15}, "end_point": {"row": 172, "column": 16}}, {"id": 554, "type": "identifier", "text": "mPixelFormat", "parent": 552, "children": [], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 28}}, {"id": 555, "type": "preproc_if", "text": "#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n //Used for calculating standby to first shot\n struct timeval mStandbyToShot;\n bool mMeasureStandby;\n //Used for shot to snapshot/shot calculation\n struct timeval mStartCapture;\n bool mShotToShot;\n\n#endif", "parent": 16, "children": [556, 557, 561, 562, 567, 570, 575, 578], "start_point": {"row": 174, "column": 0}, "end_point": {"row": 182, "column": 6}}, {"id": 556, "type": "#if", "text": "#if", "parent": 555, "children": [], "start_point": {"row": 174, "column": 0}, "end_point": {"row": 174, "column": 3}}, {"id": 557, "type": "binary_expression", "text": "PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS", "parent": 555, "children": [558, 559, 560], "start_point": {"row": 174, "column": 4}, "end_point": {"row": 174, "column": 50}}, {"id": 558, "type": "identifier", "text": "PPM_INSTRUMENTATION", "parent": 557, "children": [], "start_point": {"row": 174, "column": 4}, "end_point": {"row": 174, "column": 23}}, {"id": 559, "type": "||", "text": "||", "parent": 557, "children": [], "start_point": {"row": 174, "column": 24}, "end_point": {"row": 174, "column": 26}}, {"id": 560, "type": "identifier", "text": "PPM_INSTRUMENTATION_ABS", "parent": 557, "children": [], "start_point": {"row": 174, "column": 27}, "end_point": {"row": 174, "column": 50}}, {"id": 561, "type": "\n", "text": "\n", "parent": 555, "children": [], "start_point": {"row": 174, "column": 50}, "end_point": {"row": 175, "column": 0}}, {"id": 562, "type": "declaration", "text": "struct timeval mStandbyToShot;", "parent": 555, "children": [563, 566], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 34}}, {"id": 563, "type": "struct_specifier", "text": "struct timeval", "parent": 562, "children": [564, 565], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 18}}, {"id": 564, "type": "struct", "text": "struct", "parent": 563, "children": [], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 10}}, {"id": 565, "type": "type_identifier", "text": "timeval", "parent": 563, "children": [], "start_point": {"row": 176, "column": 11}, "end_point": {"row": 176, "column": 18}}, {"id": 566, "type": "identifier", "text": "mStandbyToShot", "parent": 562, "children": [], "start_point": {"row": 176, "column": 19}, "end_point": {"row": 176, "column": 33}}, {"id": 567, "type": "declaration", "text": "bool mMeasureStandby;", "parent": 555, "children": [568, 569], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 25}}, {"id": 568, "type": "primitive_type", "text": "bool", "parent": 567, "children": [], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 8}}, {"id": 569, "type": "identifier", "text": "mMeasureStandby", "parent": 567, "children": [], "start_point": {"row": 177, "column": 9}, "end_point": {"row": 177, "column": 24}}, {"id": 570, "type": "declaration", "text": "struct timeval mStartCapture;", "parent": 555, "children": [571, 574], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 33}}, {"id": 571, "type": "struct_specifier", "text": "struct timeval", "parent": 570, "children": [572, 573], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 18}}, {"id": 572, "type": "struct", "text": "struct", "parent": 571, "children": [], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 10}}, {"id": 573, "type": "type_identifier", "text": "timeval", "parent": 571, "children": [], "start_point": {"row": 179, "column": 11}, "end_point": {"row": 179, "column": 18}}, {"id": 574, "type": "identifier", "text": "mStartCapture", "parent": 570, "children": [], "start_point": {"row": 179, "column": 19}, "end_point": {"row": 179, "column": 32}}, {"id": 575, "type": "declaration", "text": "bool mShotToShot;", "parent": 555, "children": [576, 577], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 21}}, {"id": 576, "type": "primitive_type", "text": "bool", "parent": 575, "children": [], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 8}}, {"id": 577, "type": "identifier", "text": "mShotToShot", "parent": 575, "children": [], "start_point": {"row": 180, "column": 9}, "end_point": {"row": 180, "column": 20}}, {"id": 578, "type": "#endif", "text": "#endif", "parent": 555, "children": [], "start_point": {"row": 182, "column": 0}, "end_point": {"row": 182, "column": 6}}]}, "node_categories": {"declarations": {"functions": [13, 16, 80, 87, 94, 108, 120, 133, 166, 178, 196, 214, 229, 238, 264, 271, 278, 290, 300, 310, 320, 326, 331, 336, 346, 351, 361, 403, 407, 435], "variables": [24, 29, 34, 37, 40, 43, 46, 49, 54, 76, 83, 90, 97, 104, 111, 116, 123, 128, 136, 139, 142, 161, 169, 174, 181, 191, 199, 210, 217, 222, 225, 232, 241, 244, 247, 252, 255, 258, 267, 274, 281, 286, 293, 298, 303, 308, 313, 318, 324, 329, 334, 339, 344, 349, 355, 358, 365, 372, 429, 433, 438, 444, 447, 450, 453, 456, 468, 475, 478, 483, 488, 491, 494, 501, 508, 513, 532, 535, 538, 541, 544, 547, 550, 562, 567, 570, 575], "classes": [98, 99, 143, 144, 200, 201, 563, 564, 571, 572], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": [58, 59, 61, 62, 66, 68, 70, 417, 418, 420, 421, 423, 425, 427]}, "statements": {"expressions": [73, 186, 377, 380, 384, 385, 389, 396, 398, 410, 411, 461, 462, 516, 517, 521, 525, 526, 557], "assignments": [], "loops": [], "conditionals": [11, 14, 15, 17, 19, 22, 23, 28, 33, 36, 39, 42, 45, 48, 51, 53, 55, 56, 57, 60, 63, 67, 69, 71, 74, 77, 81, 84, 86, 88, 91, 93, 95, 100, 103, 105, 107, 109, 112, 115, 117, 119, 121, 124, 127, 129, 131, 134, 138, 141, 145, 148, 153, 157, 162, 164, 167, 171, 175, 177, 179, 183, 184, 185, 187, 189, 192, 194, 197, 202, 205, 209, 211, 213, 215, 221, 224, 226, 228, 230, 233, 235, 239, 243, 246, 251, 254, 257, 259, 261, 265, 268, 270, 272, 275, 277, 279, 285, 287, 289, 291, 294, 297, 301, 304, 307, 311, 314, 317, 321, 327, 332, 335, 337, 340, 342, 343, 347, 350, 352, 357, 360, 362, 364, 366, 369, 371, 373, 374, 378, 381, 383, 386, 390, 392, 394, 397, 399, 402, 404, 406, 408, 412, 413, 419, 422, 424, 426, 428, 430, 431, 436, 442, 446, 449, 452, 455, 457, 460, 463, 465, 467, 469, 472, 474, 476, 477, 479, 482, 484, 486, 487, 490, 493, 495, 500, 502, 507, 512, 515, 518, 520, 522, 524, 527, 529, 531, 534, 537, 540, 543, 546, 549, 554, 555, 556, 558, 560, 565, 566, 569, 573, 574, 577, 578], "returns": [401, 415], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 65], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 13, "universal_type": "function", "name": "-", "text_snippet": "namespace android {\n\n/**\n * Display handler class - This class basically handles the buffer posting "}, {"node_id": 16, "universal_type": "function", "name": "ANativeWindowDisplayAdapter", "text_snippet": "class ANativeWindowDisplayAdapter : public DisplayAdapter\n{\npublic:\n\n typedef struct\n {\n "}, {"node_id": 80, "universal_type": "function", "name": "unknown", "text_snippet": "ANativeWindowDisplayAdapter()"}, {"node_id": 87, "universal_type": "function", "name": "unknown", "text_snippet": "initialize()"}, {"node_id": 94, "universal_type": "function", "name": "unknown", "text_snippet": "setPreviewWindow(struct preview_stream_ops *window)"}, {"node_id": 108, "universal_type": "function", "name": "unknown", "text_snippet": "setFrameProvider(FrameNotifier *frameProvider)"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "setErrorHandler(ErrorNotifier *errorNotifier)"}, {"node_id": 133, "universal_type": "function", "name": "height,", "text_snippet": "enableDisplay(int width, int height, struct timeval *refTime"}, {"node_id": 166, "universal_type": "function", "name": "unknown", "text_snippet": "disableDisplay(bool cancel_buffer"}, {"node_id": 178, "universal_type": "function", "name": "unknown", "text_snippet": "pauseDisplay(bool pause)"}, {"node_id": 196, "universal_type": "function", "name": "unknown", "text_snippet": "setSnapshotTimeRef(struct timeval *refTime"}, {"node_id": 214, "universal_type": "function", "name": "num)", "text_snippet": "useBuffers(void* bufArr, int num)"}, {"node_id": 229, "universal_type": "function", "name": "unknown", "text_snippet": "supportsExternalBuffering()"}, {"node_id": 238, "universal_type": "function", "name": "height,", "text_snippet": "allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs)"}, {"node_id": 264, "universal_type": "function", "name": "unknown", "text_snippet": "getOffsets()"}, {"node_id": 271, "universal_type": "function", "name": "unknown", "text_snippet": "getFd()"}, {"node_id": 278, "universal_type": "function", "name": "unknown", "text_snippet": "freeBuffer(void* buf)"}, {"node_id": 290, "universal_type": "function", "name": "unknown", "text_snippet": "maxQueueableBuffers(unsigned int& queueable)"}, {"node_id": 300, "universal_type": "function", "name": "unknown", "text_snippet": "frameCallbackRelay(CameraFrame* caFrame)"}, {"node_id": 310, "universal_type": "function", "name": "unknown", "text_snippet": "frameCallback(CameraFrame* caFrame)"}, {"node_id": 320, "universal_type": "function", "name": "unknown", "text_snippet": "displayThread()"}, {"node_id": 326, "universal_type": "function", "name": "unknown", "text_snippet": "destroy()"}, {"node_id": 331, "universal_type": "function", "name": "unknown", "text_snippet": "processHalMsg()"}, {"node_id": 336, "universal_type": "function", "name": "unknown", "text_snippet": "PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame)"}, {"node_id": 346, "universal_type": "function", "name": "unknown", "text_snippet": "handleFrameReturn()"}, {"node_id": 351, "universal_type": "function", "name": "unknown", "text_snippet": "returnBuffersToWindow()"}, {"node_id": 361, "universal_type": "function", "name": "DisplayThread", "text_snippet": "class DisplayThread : public Thread\n {\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n"}, {"node_id": 403, "universal_type": "function", "name": "threadLoop", "text_snippet": "virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n "}, {"node_id": 407, "universal_type": "function", "name": "unknown", "text_snippet": "threadLoop()"}, {"node_id": 435, "universal_type": "function", "name": "unknown", "text_snippet": "postBuffer(void* displayBuf)"}], "class_declarations": [{"node_id": 98, "universal_type": "class", "name": "preview_stream_ops", "text_snippet": "struct preview_stream_ops"}, {"node_id": 99, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 143, "universal_type": "class", "name": "timeval", "text_snippet": "struct timeval"}, {"node_id": 144, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 200, "universal_type": "class", "name": "timeval", "text_snippet": "struct timeval"}, {"node_id": 201, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 563, "universal_type": "class", "name": "timeval", "text_snippet": "struct timeval"}, {"node_id": 564, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 571, "universal_type": "class", "name": "timeval", "text_snippet": "struct timeval"}, {"node_id": 572, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"CameraHal.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <ui/GraphicBufferMapper.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <hal_public.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (C) Texas Instruments - http://www.ti.com/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n#include \"CameraHal.h\"\n#include <ui/GraphicBufferMapper.h>\n#include <hal_public.h>\n\n//temporarily define format here\n#define HAL_PIXEL_FORMAT_TI_NV12 0x100\n\nnamespace android {\n\n/**\n * Display handler class - This class basically handles the buffer posting to display\n */\n\nclass ANativeWindowDisplayAdapter : public DisplayAdapter\n{\npublic:\n\n typedef struct\n {\n void *mBuffer;\n void *mUser;\n int mOffset;\n int mWidth;\n int mHeight;\n int mWidthStride;\n int mHeightStride;\n int mLength;\n CameraFrame::FrameType mType;\n } DisplayFrame;\n\n enum DisplayStates\n {\n DISPLAY_INIT = 0,\n DISPLAY_STARTED,\n DISPLAY_STOPPED,\n DISPLAY_EXITED\n };\n\npublic:\n\n ANativeWindowDisplayAdapter();\n virtual ~ANativeWindowDisplayAdapter();\n\n ///Initializes the display adapter creates any resources required\n virtual status_t initialize();\n\n virtual int setPreviewWindow(struct preview_stream_ops *window);\n virtual int setFrameProvider(FrameNotifier *frameProvider);\n virtual int setErrorHandler(ErrorNotifier *errorNotifier);\n virtual int enableDisplay(int width, int height, struct timeval *refTime = NULL, S3DParameters *s3dParams = NULL);\n virtual int disableDisplay(bool cancel_buffer = true);\n virtual status_t pauseDisplay(bool pause);\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n\n //Used for shot to snapshot measurement\n virtual status_t setSnapshotTimeRef(struct timeval *refTime = NULL);\n\n#endif\n\n virtual int useBuffers(void* bufArr, int num);\n virtual bool supportsExternalBuffering();\n\n //Implementation of inherited interfaces\n virtual void* allocateBuffer(int width, int height, const char* format, int &bytes, int numBufs);\n virtual uint32_t * getOffsets() ;\n virtual int getFd() ;\n virtual int freeBuffer(void* buf);\n\n virtual int maxQueueableBuffers(unsigned int& queueable);\n\n ///Class specific functions\n static void frameCallbackRelay(CameraFrame* caFrame);\n void frameCallback(CameraFrame* caFrame);\n\n void displayThread();\n\n private:\n void destroy();\n bool processHalMsg();\n status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame);\n bool handleFrameReturn();\n status_t returnBuffersToWindow();\n\npublic:\n\n static const int DISPLAY_TIMEOUT;\n static const int FAILED_DQS_TO_SUSPEND;\n\n class DisplayThread : public Thread\n {\n ANativeWindowDisplayAdapter* mDisplayAdapter;\n TIUTILS::MessageQueue mDisplayThreadQ;\n\n public:\n DisplayThread(ANativeWindowDisplayAdapter* da)\n : Thread(false), mDisplayAdapter(da) { }\n\n ///Returns a reference to the display message Q for display adapter to post messages\n TIUTILS::MessageQueue& msgQ()\n {\n return mDisplayThreadQ;\n }\n\n virtual bool threadLoop()\n {\n mDisplayAdapter->displayThread();\n return false;\n }\n\n enum DisplayThreadCommands\n {\n DISPLAY_START,\n DISPLAY_STOP,\n DISPLAY_FRAME,\n DISPLAY_EXIT\n };\n };\n\n //friend declarations\nfriend class DisplayThread;\n\nprivate:\n int postBuffer(void* displayBuf);\n\nprivate:\n bool mFirstInit;\n bool mSuspend;\n int mFailedDQs;\n bool mPaused; //Pause state\n preview_stream_ops_t* mANativeWindow;\n sp<DisplayThread> mDisplayThread;\n FrameProvider *mFrameProvider; ///Pointer to the frame provider interface\n TIUTILS::MessageQueue mDisplayQ;\n unsigned int mDisplayState;\n ///@todo Have a common class for these members\n mutable Mutex mLock;\n bool mDisplayEnabled;\n int mBufferCount;\n buffer_handle_t** mBufferHandleMap;\n IMG_native_handle_t** mGrallocHandleMap;\n uint32_t* mOffsetsMap;\n int mFD;\n KeyedVector<int, int> mFramesWithCameraAdapterMap;\n sp<ErrorNotifier> mErrorNotifier;\n\n uint32_t mFrameWidth;\n uint32_t mFrameHeight;\n uint32_t mPreviewWidth;\n uint32_t mPreviewHeight;\n\n uint32_t mXOff;\n uint32_t mYOff;\n\n const char *mPixelFormat;\n\n#if PPM_INSTRUMENTATION || PPM_INSTRUMENTATION_ABS\n //Used for calculating standby to first shot\n struct timeval mStandbyToShot;\n bool mMeasureStandby;\n //Used for shot to snapshot/shot calculation\n struct timeval mStartCapture;\n bool mShotToShot;\n\n#endif\n\n};\n\n};\n\n"}
387
c
/* * drivers/base/sw_sync.c * * Copyright (C) 2012 Google, Inc. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include <linux/kernel.h> #include <linux/init.h> #include <linux/export.h> #include <linux/file.h> #include <linux/fs.h> #include <linux/miscdevice.h> #include <linux/syscalls.h> #include <linux/uaccess.h> #include "sw_sync.h" struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value) { struct sw_sync_pt *pt; pt = (struct sw_sync_pt *) sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt)); pt->value = value; return (struct fence *)pt; } EXPORT_SYMBOL(sw_sync_pt_create); static int sw_sync_fence_has_signaled(struct fence *fence) { struct sw_sync_pt *pt = (struct sw_sync_pt *)fence; struct sw_sync_timeline *obj = (struct sw_sync_timeline *)fence_parent(fence); return (pt->value > obj->value) ? 0 : 1; } static void sw_sync_timeline_value_str(struct sync_timeline *sync_timeline, char *str, int size) { struct sw_sync_timeline *timeline = (struct sw_sync_timeline *)sync_timeline; snprintf(str, size, "%d", timeline->value); } static void sw_sync_fence_value_str(struct fence *fence, char *str, int size) { struct sw_sync_pt *pt = (struct sw_sync_pt *)fence; snprintf(str, size, "%d", pt->value); } static struct sync_timeline_ops sw_sync_timeline_ops = { .driver_name = "sw_sync", .has_signaled = sw_sync_fence_has_signaled, .timeline_value_str = sw_sync_timeline_value_str, .fence_value_str = sw_sync_fence_value_str, }; struct sw_sync_timeline *sw_sync_timeline_create(const char *name) { struct sw_sync_timeline *obj = (struct sw_sync_timeline *) sync_timeline_create(&sw_sync_timeline_ops, sizeof(struct sw_sync_timeline), name); return obj; } EXPORT_SYMBOL(sw_sync_timeline_create); void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc) { obj->value += inc; sync_timeline_signal(&obj->obj); } EXPORT_SYMBOL(sw_sync_timeline_inc);
31.26
73
(translation_unit) "/*\n * drivers/base/sw_sync.c\n *\n * Copyright (C) 2012 Google, Inc.\n *\n * This software is licensed under the terms of the GNU General Public\n * License version 2, as published by the Free Software Foundation, and\n * may be copied, distributed, and modified under those terms.\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 */\n\n#include <linux/kernel.h>\n#include <linux/init.h>\n#include <linux/export.h>\n#include <linux/file.h>\n#include <linux/fs.h>\n#include <linux/miscdevice.h>\n#include <linux/syscalls.h>\n#include <linux/uaccess.h>\n\n#include "sw_sync.h"\n\nstruct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)\n{\n struct sw_sync_pt *pt;\n\n pt = (struct sw_sync_pt *)\n sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt));\n\n pt->value = value;\n\n return (struct fence *)pt;\n}\nEXPORT_SYMBOL(sw_sync_pt_create);\n\nstatic int sw_sync_fence_has_signaled(struct fence *fence)\n{\n struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;\n struct sw_sync_timeline *obj =\n (struct sw_sync_timeline *)fence_parent(fence);\n\n return (pt->value > obj->value) ? 0 : 1;\n}\n\nstatic void sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,\n char *str, int size)\n{\n struct sw_sync_timeline *timeline =\n (struct sw_sync_timeline *)sync_timeline;\n snprintf(str, size, "%d", timeline->value);\n}\n\nstatic void sw_sync_fence_value_str(struct fence *fence, char *str, int size)\n{\n struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;\n\n snprintf(str, size, "%d", pt->value);\n}\n\nstatic struct sync_timeline_ops sw_sync_timeline_ops = {\n .driver_name = "sw_sync",\n .has_signaled = sw_sync_fence_has_signaled,\n .timeline_value_str = sw_sync_timeline_value_str,\n .fence_value_str = sw_sync_fence_value_str,\n};\n\nstruct sw_sync_timeline *sw_sync_timeline_create(const char *name)\n{\n struct sw_sync_timeline *obj = (struct sw_sync_timeline *)\n sync_timeline_create(&sw_sync_timeline_ops,\n sizeof(struct sw_sync_timeline),\n name);\n\n return obj;\n}\nEXPORT_SYMBOL(sw_sync_timeline_create);\n\nvoid sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)\n{\n obj->value += inc;\n\n sync_timeline_signal(&obj->obj);\n}\nEXPORT_SYMBOL(sw_sync_timeline_inc);\n" (comment) "/*\n * drivers/base/sw_sync.c\n *\n * Copyright (C) 2012 Google, Inc.\n *\n * This software is licensed under the terms of the GNU General Public\n * License version 2, as published by the Free Software Foundation, and\n * may be copied, distributed, and modified under those terms.\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 */" (preproc_include) "#include <linux/kernel.h>\n" (#include) "#include" (system_lib_string) "<linux/kernel.h>" (preproc_include) "#include <linux/init.h>\n" (#include) "#include" (system_lib_string) "<linux/init.h>" (preproc_include) "#include <linux/export.h>\n" (#include) "#include" (system_lib_string) "<linux/export.h>" (preproc_include) "#include <linux/file.h>\n" (#include) "#include" (system_lib_string) "<linux/file.h>" (preproc_include) "#include <linux/fs.h>\n" (#include) "#include" (system_lib_string) "<linux/fs.h>" (preproc_include) "#include <linux/miscdevice.h>\n" (#include) "#include" (system_lib_string) "<linux/miscdevice.h>" (preproc_include) "#include <linux/syscalls.h>\n" (#include) "#include" (system_lib_string) "<linux/syscalls.h>" (preproc_include) "#include <linux/uaccess.h>\n" (#include) "#include" (system_lib_string) "<linux/uaccess.h>" (preproc_include) "#include "sw_sync.h"\n" (#include) "#include" (string_literal) ""sw_sync.h"" (") """ (string_content) "sw_sync.h" (") """ (function_definition) "struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)\n{\n struct sw_sync_pt *pt;\n\n pt = (struct sw_sync_pt *)\n sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt));\n\n pt->value = value;\n\n return (struct fence *)pt;\n}" (struct_specifier) "struct fence" (struct) "struct" (type_identifier) "fence" (pointer_declarator) "*sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)" (*) "*" (function_declarator) "sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)" (identifier) "sw_sync_pt_create" (parameter_list) "(struct sw_sync_timeline *obj, u32 value)" (() "(" (parameter_declaration) "struct sw_sync_timeline *obj" (struct_specifier) "struct sw_sync_timeline" (struct) "struct" (type_identifier) "sw_sync_timeline" (pointer_declarator) "*obj" (*) "*" (identifier) "obj" (,) "," (parameter_declaration) "u32 value" (type_identifier) "u32" (identifier) "value" ()) ")" (compound_statement) "{\n struct sw_sync_pt *pt;\n\n pt = (struct sw_sync_pt *)\n sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt));\n\n pt->value = value;\n\n return (struct fence *)pt;\n}" ({) "{" (declaration) "struct sw_sync_pt *pt;" (struct_specifier) "struct sw_sync_pt" (struct) "struct" (type_identifier) "sw_sync_pt" (pointer_declarator) "*pt" (*) "*" (identifier) "pt" (;) ";" (expression_statement) "pt = (struct sw_sync_pt *)\n sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt));" (assignment_expression) "pt = (struct sw_sync_pt *)\n sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt))" (identifier) "pt" (=) "=" (cast_expression) "(struct sw_sync_pt *)\n sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt))" (() "(" (type_descriptor) "struct sw_sync_pt *" (struct_specifier) "struct sw_sync_pt" (struct) "struct" (type_identifier) "sw_sync_pt" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt))" (identifier) "sync_pt_create" (argument_list) "(&obj->obj, sizeof(struct sw_sync_pt))" (() "(" (pointer_expression) "&obj->obj" (&) "&" (field_expression) "obj->obj" (identifier) "obj" (->) "->" (field_identifier) "obj" (,) "," (sizeof_expression) "sizeof(struct sw_sync_pt)" (sizeof) "sizeof" (() "(" (type_descriptor) "struct sw_sync_pt" (struct_specifier) "struct sw_sync_pt" (struct) "struct" (type_identifier) "sw_sync_pt" ()) ")" ()) ")" (;) ";" (expression_statement) "pt->value = value;" (assignment_expression) "pt->value = value" (field_expression) "pt->value" (identifier) "pt" (->) "->" (field_identifier) "value" (=) "=" (identifier) "value" (;) ";" (return_statement) "return (struct fence *)pt;" (return) "return" (cast_expression) "(struct fence *)pt" (() "(" (type_descriptor) "struct fence *" (struct_specifier) "struct fence" (struct) "struct" (type_identifier) "fence" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "pt" (;) ";" (}) "}" (expression_statement) "EXPORT_SYMBOL(sw_sync_pt_create);" (call_expression) "EXPORT_SYMBOL(sw_sync_pt_create)" (identifier) "EXPORT_SYMBOL" (argument_list) "(sw_sync_pt_create)" (() "(" (identifier) "sw_sync_pt_create" ()) ")" (;) ";" (function_definition) "static int sw_sync_fence_has_signaled(struct fence *fence)\n{\n struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;\n struct sw_sync_timeline *obj =\n (struct sw_sync_timeline *)fence_parent(fence);\n\n return (pt->value > obj->value) ? 0 : 1;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "sw_sync_fence_has_signaled(struct fence *fence)" (identifier) "sw_sync_fence_has_signaled" (parameter_list) "(struct fence *fence)" (() "(" (parameter_declaration) "struct fence *fence" (struct_specifier) "struct fence" (struct) "struct" (type_identifier) "fence" (pointer_declarator) "*fence" (*) "*" (identifier) "fence" ()) ")" (compound_statement) "{\n struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;\n struct sw_sync_timeline *obj =\n (struct sw_sync_timeline *)fence_parent(fence);\n\n return (pt->value > obj->value) ? 0 : 1;\n}" ({) "{" (declaration) "struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;" (struct_specifier) "struct sw_sync_pt" (struct) "struct" (type_identifier) "sw_sync_pt" (init_declarator) "*pt = (struct sw_sync_pt *)fence" (pointer_declarator) "*pt" (*) "*" (identifier) "pt" (=) "=" (cast_expression) "(struct sw_sync_pt *)fence" (() "(" (type_descriptor) "struct sw_sync_pt *" (struct_specifier) "struct sw_sync_pt" (struct) "struct" (type_identifier) "sw_sync_pt" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "fence" (;) ";" (declaration) "struct sw_sync_timeline *obj =\n (struct sw_sync_timeline *)fence_parent(fence);" (struct_specifier) "struct sw_sync_timeline" (struct) "struct" (type_identifier) "sw_sync_timeline" (init_declarator) "*obj =\n (struct sw_sync_timeline *)fence_parent(fence)" (pointer_declarator) "*obj" (*) "*" (identifier) "obj" (=) "=" (cast_expression) "(struct sw_sync_timeline *)fence_parent(fence)" (() "(" (type_descriptor) "struct sw_sync_timeline *" (struct_specifier) "struct sw_sync_timeline" (struct) "struct" (type_identifier) "sw_sync_timeline" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "fence_parent(fence)" (identifier) "fence_parent" (argument_list) "(fence)" (() "(" (identifier) "fence" ()) ")" (;) ";" (return_statement) "return (pt->value > obj->value) ? 0 : 1;" (return) "return" (conditional_expression) "(pt->value > obj->value) ? 0 : 1" (parenthesized_expression) "(pt->value > obj->value)" (() "(" (binary_expression) "pt->value > obj->value" (field_expression) "pt->value" (identifier) "pt" (->) "->" (field_identifier) "value" (>) ">" (field_expression) "obj->value" (identifier) "obj" (->) "->" (field_identifier) "value" ()) ")" (?) "?" (number_literal) "0" (:) ":" (number_literal) "1" (;) ";" (}) "}" (function_definition) "static void sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,\n char *str, int size)\n{\n struct sw_sync_timeline *timeline =\n (struct sw_sync_timeline *)sync_timeline;\n snprintf(str, size, "%d", timeline->value);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,\n char *str, int size)" (identifier) "sw_sync_timeline_value_str" (parameter_list) "(struct sync_timeline *sync_timeline,\n char *str, int size)" (() "(" (parameter_declaration) "struct sync_timeline *sync_timeline" (struct_specifier) "struct sync_timeline" (struct) "struct" (type_identifier) "sync_timeline" (pointer_declarator) "*sync_timeline" (*) "*" (identifier) "sync_timeline" (,) "," (parameter_declaration) "char *str" (primitive_type) "char" (pointer_declarator) "*str" (*) "*" (identifier) "str" (,) "," (parameter_declaration) "int size" (primitive_type) "int" (identifier) "size" ()) ")" (compound_statement) "{\n struct sw_sync_timeline *timeline =\n (struct sw_sync_timeline *)sync_timeline;\n snprintf(str, size, "%d", timeline->value);\n}" ({) "{" (declaration) "struct sw_sync_timeline *timeline =\n (struct sw_sync_timeline *)sync_timeline;" (struct_specifier) "struct sw_sync_timeline" (struct) "struct" (type_identifier) "sw_sync_timeline" (init_declarator) "*timeline =\n (struct sw_sync_timeline *)sync_timeline" (pointer_declarator) "*timeline" (*) "*" (identifier) "timeline" (=) "=" (cast_expression) "(struct sw_sync_timeline *)sync_timeline" (() "(" (type_descriptor) "struct sw_sync_timeline *" (struct_specifier) "struct sw_sync_timeline" (struct) "struct" (type_identifier) "sw_sync_timeline" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "sync_timeline" (;) ";" (expression_statement) "snprintf(str, size, "%d", timeline->value);" (call_expression) "snprintf(str, size, "%d", timeline->value)" (identifier) "snprintf" (argument_list) "(str, size, "%d", timeline->value)" (() "(" (identifier) "str" (,) "," (identifier) "size" (,) "," (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (field_expression) "timeline->value" (identifier) "timeline" (->) "->" (field_identifier) "value" ()) ")" (;) ";" (}) "}" (function_definition) "static void sw_sync_fence_value_str(struct fence *fence, char *str, int size)\n{\n struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;\n\n snprintf(str, size, "%d", pt->value);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "sw_sync_fence_value_str(struct fence *fence, char *str, int size)" (identifier) "sw_sync_fence_value_str" (parameter_list) "(struct fence *fence, char *str, int size)" (() "(" (parameter_declaration) "struct fence *fence" (struct_specifier) "struct fence" (struct) "struct" (type_identifier) "fence" (pointer_declarator) "*fence" (*) "*" (identifier) "fence" (,) "," (parameter_declaration) "char *str" (primitive_type) "char" (pointer_declarator) "*str" (*) "*" (identifier) "str" (,) "," (parameter_declaration) "int size" (primitive_type) "int" (identifier) "size" ()) ")" (compound_statement) "{\n struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;\n\n snprintf(str, size, "%d", pt->value);\n}" ({) "{" (declaration) "struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;" (struct_specifier) "struct sw_sync_pt" (struct) "struct" (type_identifier) "sw_sync_pt" (init_declarator) "*pt = (struct sw_sync_pt *)fence" (pointer_declarator) "*pt" (*) "*" (identifier) "pt" (=) "=" (cast_expression) "(struct sw_sync_pt *)fence" (() "(" (type_descriptor) "struct sw_sync_pt *" (struct_specifier) "struct sw_sync_pt" (struct) "struct" (type_identifier) "sw_sync_pt" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "fence" (;) ";" (expression_statement) "snprintf(str, size, "%d", pt->value);" (call_expression) "snprintf(str, size, "%d", pt->value)" (identifier) "snprintf" (argument_list) "(str, size, "%d", pt->value)" (() "(" (identifier) "str" (,) "," (identifier) "size" (,) "," (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (field_expression) "pt->value" (identifier) "pt" (->) "->" (field_identifier) "value" ()) ")" (;) ";" (}) "}" (declaration) "static struct sync_timeline_ops sw_sync_timeline_ops = {\n .driver_name = "sw_sync",\n .has_signaled = sw_sync_fence_has_signaled,\n .timeline_value_str = sw_sync_timeline_value_str,\n .fence_value_str = sw_sync_fence_value_str,\n};" (storage_class_specifier) "static" (static) "static" (struct_specifier) "struct sync_timeline_ops" (struct) "struct" (type_identifier) "sync_timeline_ops" (init_declarator) "sw_sync_timeline_ops = {\n .driver_name = "sw_sync",\n .has_signaled = sw_sync_fence_has_signaled,\n .timeline_value_str = sw_sync_timeline_value_str,\n .fence_value_str = sw_sync_fence_value_str,\n}" (identifier) "sw_sync_timeline_ops" (=) "=" (initializer_list) "{\n .driver_name = "sw_sync",\n .has_signaled = sw_sync_fence_has_signaled,\n .timeline_value_str = sw_sync_timeline_value_str,\n .fence_value_str = sw_sync_fence_value_str,\n}" ({) "{" (initializer_pair) ".driver_name = "sw_sync"" (field_designator) ".driver_name" (.) "." (field_identifier) "driver_name" (=) "=" (string_literal) ""sw_sync"" (") """ (string_content) "sw_sync" (") """ (,) "," (initializer_pair) ".has_signaled = sw_sync_fence_has_signaled" (field_designator) ".has_signaled" (.) "." (field_identifier) "has_signaled" (=) "=" (identifier) "sw_sync_fence_has_signaled" (,) "," (initializer_pair) ".timeline_value_str = sw_sync_timeline_value_str" (field_designator) ".timeline_value_str" (.) "." (field_identifier) "timeline_value_str" (=) "=" (identifier) "sw_sync_timeline_value_str" (,) "," (initializer_pair) ".fence_value_str = sw_sync_fence_value_str" (field_designator) ".fence_value_str" (.) "." (field_identifier) "fence_value_str" (=) "=" (identifier) "sw_sync_fence_value_str" (,) "," (}) "}" (;) ";" (function_definition) "struct sw_sync_timeline *sw_sync_timeline_create(const char *name)\n{\n struct sw_sync_timeline *obj = (struct sw_sync_timeline *)\n sync_timeline_create(&sw_sync_timeline_ops,\n sizeof(struct sw_sync_timeline),\n name);\n\n return obj;\n}" (struct_specifier) "struct sw_sync_timeline" (struct) "struct" (type_identifier) "sw_sync_timeline" (pointer_declarator) "*sw_sync_timeline_create(const char *name)" (*) "*" (function_declarator) "sw_sync_timeline_create(const char *name)" (identifier) "sw_sync_timeline_create" (parameter_list) "(const char *name)" (() "(" (parameter_declaration) "const char *name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*name" (*) "*" (identifier) "name" ()) ")" (compound_statement) "{\n struct sw_sync_timeline *obj = (struct sw_sync_timeline *)\n sync_timeline_create(&sw_sync_timeline_ops,\n sizeof(struct sw_sync_timeline),\n name);\n\n return obj;\n}" ({) "{" (declaration) "struct sw_sync_timeline *obj = (struct sw_sync_timeline *)\n sync_timeline_create(&sw_sync_timeline_ops,\n sizeof(struct sw_sync_timeline),\n name);" (struct_specifier) "struct sw_sync_timeline" (struct) "struct" (type_identifier) "sw_sync_timeline" (init_declarator) "*obj = (struct sw_sync_timeline *)\n sync_timeline_create(&sw_sync_timeline_ops,\n sizeof(struct sw_sync_timeline),\n name)" (pointer_declarator) "*obj" (*) "*" (identifier) "obj" (=) "=" (cast_expression) "(struct sw_sync_timeline *)\n sync_timeline_create(&sw_sync_timeline_ops,\n sizeof(struct sw_sync_timeline),\n name)" (() "(" (type_descriptor) "struct sw_sync_timeline *" (struct_specifier) "struct sw_sync_timeline" (struct) "struct" (type_identifier) "sw_sync_timeline" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "sync_timeline_create(&sw_sync_timeline_ops,\n sizeof(struct sw_sync_timeline),\n name)" (identifier) "sync_timeline_create" (argument_list) "(&sw_sync_timeline_ops,\n sizeof(struct sw_sync_timeline),\n name)" (() "(" (pointer_expression) "&sw_sync_timeline_ops" (&) "&" (identifier) "sw_sync_timeline_ops" (,) "," (sizeof_expression) "sizeof(struct sw_sync_timeline)" (sizeof) "sizeof" (() "(" (type_descriptor) "struct sw_sync_timeline" (struct_specifier) "struct sw_sync_timeline" (struct) "struct" (type_identifier) "sw_sync_timeline" ()) ")" (,) "," (identifier) "name" ()) ")" (;) ";" (return_statement) "return obj;" (return) "return" (identifier) "obj" (;) ";" (}) "}" (expression_statement) "EXPORT_SYMBOL(sw_sync_timeline_create);" (call_expression) "EXPORT_SYMBOL(sw_sync_timeline_create)" (identifier) "EXPORT_SYMBOL" (argument_list) "(sw_sync_timeline_create)" (() "(" (identifier) "sw_sync_timeline_create" ()) ")" (;) ";" (function_definition) "void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)\n{\n obj->value += inc;\n\n sync_timeline_signal(&obj->obj);\n}" (primitive_type) "void" (function_declarator) "sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)" (identifier) "sw_sync_timeline_inc" (parameter_list) "(struct sw_sync_timeline *obj, u32 inc)" (() "(" (parameter_declaration) "struct sw_sync_timeline *obj" (struct_specifier) "struct sw_sync_timeline" (struct) "struct" (type_identifier) "sw_sync_timeline" (pointer_declarator) "*obj" (*) "*" (identifier) "obj" (,) "," (parameter_declaration) "u32 inc" (type_identifier) "u32" (identifier) "inc" ()) ")" (compound_statement) "{\n obj->value += inc;\n\n sync_timeline_signal(&obj->obj);\n}" ({) "{" (expression_statement) "obj->value += inc;" (assignment_expression) "obj->value += inc" (field_expression) "obj->value" (identifier) "obj" (->) "->" (field_identifier) "value" (+=) "+=" (identifier) "inc" (;) ";" (expression_statement) "sync_timeline_signal(&obj->obj);" (call_expression) "sync_timeline_signal(&obj->obj)" (identifier) "sync_timeline_signal" (argument_list) "(&obj->obj)" (() "(" (pointer_expression) "&obj->obj" (&) "&" (field_expression) "obj->obj" (identifier) "obj" (->) "->" (field_identifier) "obj" ()) ")" (;) ";" (}) "}" (expression_statement) "EXPORT_SYMBOL(sw_sync_timeline_inc);" (call_expression) "EXPORT_SYMBOL(sw_sync_timeline_inc)" (identifier) "EXPORT_SYMBOL" (argument_list) "(sw_sync_timeline_inc)" (() "(" (identifier) "sw_sync_timeline_inc" ()) ")" (;) ";"
518
0
{"language": "c", "success": true, "metadata": {"lines": 73, "avg_line_length": 31.26, "nodes": 356, "errors": 0, "source_hash": "dc14e27f0f1a6714a4aefa5065e1aa5c2c7bc9a56fa7b6cb947b857257124148", "categorized_nodes": 251}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <linux/kernel.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": "system_lib_string", "text": "<linux/kernel.h>", "parent": 0, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 25}}, {"id": 3, "type": "preproc_include", "text": "#include <linux/init.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<linux/init.h>", "parent": 3, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include <linux/export.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<linux/export.h>", "parent": 6, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 25}}, {"id": 9, "type": "preproc_include", "text": "#include <linux/file.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<linux/file.h>", "parent": 9, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 23}}, {"id": 12, "type": "preproc_include", "text": "#include <linux/fs.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<linux/fs.h>", "parent": 12, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 21}}, {"id": 15, "type": "preproc_include", "text": "#include <linux/miscdevice.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<linux/miscdevice.h>", "parent": 15, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 29}}, {"id": 18, "type": "preproc_include", "text": "#include <linux/syscalls.h>\n", "parent": null, "children": [19, 20], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<linux/syscalls.h>", "parent": 18, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 27}}, {"id": 21, "type": "preproc_include", "text": "#include <linux/uaccess.h>\n", "parent": null, "children": [22, 23], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<linux/uaccess.h>", "parent": 21, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 26}}, {"id": 24, "type": "preproc_include", "text": "#include \"sw_sync.h\"\n", "parent": null, "children": [25, 26], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"sw_sync.h\"", "parent": 24, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 20}}, {"id": 27, "type": "function_definition", "text": "struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)\n{\n\tstruct sw_sync_pt *pt;\n\n\tpt = (struct sw_sync_pt *)\n\t\tsync_pt_create(&obj->obj, sizeof(struct sw_sync_pt));\n\n\tpt->value = value;\n\n\treturn (struct fence *)pt;\n}", "parent": null, "children": [28, 31], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 28, "type": "struct_specifier", "text": "struct fence", "parent": 27, "children": [29, 30], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 12}}, {"id": 29, "type": "struct", "text": "struct", "parent": 28, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 30, "type": "type_identifier", "text": "fence", "parent": 28, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 12}}, {"id": 31, "type": "pointer_declarator", "text": "*sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)", "parent": 27, "children": [32, 33], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 72}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 14}}, {"id": 33, "type": "function_declarator", "text": "sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)", "parent": 31, "children": [34, 35], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 72}}, {"id": 34, "type": "identifier", "text": "sw_sync_pt_create", "parent": 33, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 31}}, {"id": 35, "type": "parameter_list", "text": "(struct sw_sync_timeline *obj, u32 value)", "parent": 33, "children": [36, 43], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 72}}, {"id": 36, "type": "parameter_declaration", "text": "struct sw_sync_timeline *obj", "parent": 35, "children": [37, 40], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 60}}, {"id": 37, "type": "struct_specifier", "text": "struct sw_sync_timeline", "parent": 36, "children": [38, 39], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 55}}, {"id": 38, "type": "struct", "text": "struct", "parent": 37, "children": [], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 38}}, {"id": 39, "type": "type_identifier", "text": "sw_sync_timeline", "parent": 37, "children": [], "start_point": {"row": 27, "column": 39}, "end_point": {"row": 27, "column": 55}}, {"id": 40, "type": "pointer_declarator", "text": "*obj", "parent": 36, "children": [41, 42], "start_point": {"row": 27, "column": 56}, "end_point": {"row": 27, "column": 60}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 27, "column": 56}, "end_point": {"row": 27, "column": 57}}, {"id": 42, "type": "identifier", "text": "obj", "parent": 40, "children": [], "start_point": {"row": 27, "column": 57}, "end_point": {"row": 27, "column": 60}}, {"id": 43, "type": "parameter_declaration", "text": "u32 value", "parent": 35, "children": [44, 45], "start_point": {"row": 27, "column": 62}, "end_point": {"row": 27, "column": 71}}, {"id": 44, "type": "type_identifier", "text": "u32", "parent": 43, "children": [], "start_point": {"row": 27, "column": 62}, "end_point": {"row": 27, "column": 65}}, {"id": 45, "type": "identifier", "text": "value", "parent": 43, "children": [], "start_point": {"row": 27, "column": 66}, "end_point": {"row": 27, "column": 71}}, {"id": 46, "type": "declaration", "text": "struct sw_sync_pt *pt;", "parent": 27, "children": [47, 50], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 23}}, {"id": 47, "type": "struct_specifier", "text": "struct sw_sync_pt", "parent": 46, "children": [48, 49], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 18}}, {"id": 48, "type": "struct", "text": "struct", "parent": 47, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 7}}, {"id": 49, "type": "type_identifier", "text": "sw_sync_pt", "parent": 47, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 18}}, {"id": 50, "type": "pointer_declarator", "text": "*pt", "parent": 46, "children": [51, 52], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 22}}, {"id": 51, "type": "*", "text": "*", "parent": 50, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 20}}, {"id": 52, "type": "identifier", "text": "pt", "parent": 50, "children": [], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 22}}, {"id": 53, "type": "assignment_expression", "text": "pt = (struct sw_sync_pt *)\n\t\tsync_pt_create(&obj->obj, sizeof(struct sw_sync_pt))", "parent": 27, "children": [54, 55, 56], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 32, "column": 54}}, {"id": 54, "type": "identifier", "text": "pt", "parent": 53, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 3}}, {"id": 55, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 5}}, {"id": 56, "type": "cast_expression", "text": "(struct sw_sync_pt *)\n\t\tsync_pt_create(&obj->obj, sizeof(struct sw_sync_pt))", "parent": 53, "children": [57, 63], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 32, "column": 54}}, {"id": 57, "type": "type_descriptor", "text": "struct sw_sync_pt *", "parent": 56, "children": [58, 61], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 26}}, {"id": 58, "type": "struct_specifier", "text": "struct sw_sync_pt", "parent": 57, "children": [59, 60], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 24}}, {"id": 59, "type": "struct", "text": "struct", "parent": 58, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 13}}, {"id": 60, "type": "type_identifier", "text": "sw_sync_pt", "parent": 58, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 24}}, {"id": 61, "type": "abstract_pointer_declarator", "text": "*", "parent": 57, "children": [62], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 26}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 26}}, {"id": 63, "type": "call_expression", "text": "sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt))", "parent": 56, "children": [64, 65], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 54}}, {"id": 64, "type": "identifier", "text": "sync_pt_create", "parent": 63, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 16}}, {"id": 65, "type": "argument_list", "text": "(&obj->obj, sizeof(struct sw_sync_pt))", "parent": 63, "children": [66, 70], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 54}}, {"id": 66, "type": "pointer_expression", "text": "&obj->obj", "parent": 65, "children": [67], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 26}}, {"id": 67, "type": "field_expression", "text": "obj->obj", "parent": 66, "children": [68, 69], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 26}}, {"id": 68, "type": "identifier", "text": "obj", "parent": 67, "children": [], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 21}}, {"id": 69, "type": "field_identifier", "text": "obj", "parent": 67, "children": [], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 26}}, {"id": 70, "type": "sizeof_expression", "text": "sizeof(struct sw_sync_pt)", "parent": 65, "children": [71], "start_point": {"row": 32, "column": 28}, "end_point": {"row": 32, "column": 53}}, {"id": 71, "type": "type_descriptor", "text": "struct sw_sync_pt", "parent": 70, "children": [72], "start_point": {"row": 32, "column": 35}, "end_point": {"row": 32, "column": 52}}, {"id": 72, "type": "struct_specifier", "text": "struct sw_sync_pt", "parent": 71, "children": [73, 74], "start_point": {"row": 32, "column": 35}, "end_point": {"row": 32, "column": 52}}, {"id": 73, "type": "struct", "text": "struct", "parent": 72, "children": [], "start_point": {"row": 32, "column": 35}, "end_point": {"row": 32, "column": 41}}, {"id": 74, "type": "type_identifier", "text": "sw_sync_pt", "parent": 72, "children": [], "start_point": {"row": 32, "column": 42}, "end_point": {"row": 32, "column": 52}}, {"id": 75, "type": "assignment_expression", "text": "pt->value = value", "parent": 27, "children": [76, 79, 80], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 18}}, {"id": 76, "type": "field_expression", "text": "pt->value", "parent": 75, "children": [77, 78], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 10}}, {"id": 77, "type": "identifier", "text": "pt", "parent": 76, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 3}}, {"id": 78, "type": "field_identifier", "text": "value", "parent": 76, "children": [], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 10}}, {"id": 79, "type": "=", "text": "=", "parent": 75, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 12}}, {"id": 80, "type": "identifier", "text": "value", "parent": 75, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 18}}, {"id": 81, "type": "return_statement", "text": "return (struct fence *)pt;", "parent": 27, "children": [82], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 27}}, {"id": 82, "type": "cast_expression", "text": "(struct fence *)pt", "parent": 81, "children": [83, 89], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 26}}, {"id": 83, "type": "type_descriptor", "text": "struct fence *", "parent": 82, "children": [84, 87], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 23}}, {"id": 84, "type": "struct_specifier", "text": "struct fence", "parent": 83, "children": [85, 86], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 21}}, {"id": 85, "type": "struct", "text": "struct", "parent": 84, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 15}}, {"id": 86, "type": "type_identifier", "text": "fence", "parent": 84, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 21}}, {"id": 87, "type": "abstract_pointer_declarator", "text": "*", "parent": 83, "children": [88], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 23}}, {"id": 88, "type": "*", "text": "*", "parent": 87, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 23}}, {"id": 89, "type": "identifier", "text": "pt", "parent": 82, "children": [], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 26}}, {"id": 90, "type": "call_expression", "text": "EXPORT_SYMBOL(sw_sync_pt_create)", "parent": null, "children": [91, 92], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 32}}, {"id": 91, "type": "identifier", "text": "EXPORT_SYMBOL", "parent": 90, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 13}}, {"id": 92, "type": "argument_list", "text": "(sw_sync_pt_create)", "parent": 90, "children": [93], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 32}}, {"id": 93, "type": "identifier", "text": "sw_sync_pt_create", "parent": 92, "children": [], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 31}}, {"id": 94, "type": "function_definition", "text": "static int sw_sync_fence_has_signaled(struct fence *fence)\n{\n\tstruct sw_sync_pt *pt = (struct sw_sync_pt *)fence;\n\tstruct sw_sync_timeline *obj =\n\t\t(struct sw_sync_timeline *)fence_parent(fence);\n\n\treturn (pt->value > obj->value) ? 0 : 1;\n}", "parent": null, "children": [95, 96], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 95, "type": "primitive_type", "text": "int", "parent": 94, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 10}}, {"id": 96, "type": "function_declarator", "text": "sw_sync_fence_has_signaled(struct fence *fence)", "parent": 94, "children": [97, 98], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 58}}, {"id": 97, "type": "identifier", "text": "sw_sync_fence_has_signaled", "parent": 96, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 37}}, {"id": 98, "type": "parameter_list", "text": "(struct fence *fence)", "parent": 96, "children": [99], "start_point": {"row": 40, "column": 37}, "end_point": {"row": 40, "column": 58}}, {"id": 99, "type": "parameter_declaration", "text": "struct fence *fence", "parent": 98, "children": [100, 103], "start_point": {"row": 40, "column": 38}, "end_point": {"row": 40, "column": 57}}, {"id": 100, "type": "struct_specifier", "text": "struct fence", "parent": 99, "children": [101, 102], "start_point": {"row": 40, "column": 38}, "end_point": {"row": 40, "column": 50}}, {"id": 101, "type": "struct", "text": "struct", "parent": 100, "children": [], "start_point": {"row": 40, "column": 38}, "end_point": {"row": 40, "column": 44}}, {"id": 102, "type": "type_identifier", "text": "fence", "parent": 100, "children": [], "start_point": {"row": 40, "column": 45}, "end_point": {"row": 40, "column": 50}}, {"id": 103, "type": "pointer_declarator", "text": "*fence", "parent": 99, "children": [104, 105], "start_point": {"row": 40, "column": 51}, "end_point": {"row": 40, "column": 57}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 40, "column": 51}, "end_point": {"row": 40, "column": 52}}, {"id": 105, "type": "identifier", "text": "fence", "parent": 103, "children": [], "start_point": {"row": 40, "column": 52}, "end_point": {"row": 40, "column": 57}}, {"id": 106, "type": "declaration", "text": "struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;", "parent": 94, "children": [107, 110], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 52}}, {"id": 107, "type": "struct_specifier", "text": "struct sw_sync_pt", "parent": 106, "children": [108, 109], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 18}}, {"id": 108, "type": "struct", "text": "struct", "parent": 107, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 7}}, {"id": 109, "type": "type_identifier", "text": "sw_sync_pt", "parent": 107, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 18}}, {"id": 110, "type": "init_declarator", "text": "*pt = (struct sw_sync_pt *)fence", "parent": 106, "children": [111, 114, 115], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 51}}, {"id": 111, "type": "pointer_declarator", "text": "*pt", "parent": 110, "children": [112, 113], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 22}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 20}}, {"id": 113, "type": "identifier", "text": "pt", "parent": 111, "children": [], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 22}}, {"id": 114, "type": "=", "text": "=", "parent": 110, "children": [], "start_point": {"row": 42, "column": 23}, "end_point": {"row": 42, "column": 24}}, {"id": 115, "type": "cast_expression", "text": "(struct sw_sync_pt *)fence", "parent": 110, "children": [116, 122], "start_point": {"row": 42, "column": 25}, "end_point": {"row": 42, "column": 51}}, {"id": 116, "type": "type_descriptor", "text": "struct sw_sync_pt *", "parent": 115, "children": [117, 120], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 45}}, {"id": 117, "type": "struct_specifier", "text": "struct sw_sync_pt", "parent": 116, "children": [118, 119], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 43}}, {"id": 118, "type": "struct", "text": "struct", "parent": 117, "children": [], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 32}}, {"id": 119, "type": "type_identifier", "text": "sw_sync_pt", "parent": 117, "children": [], "start_point": {"row": 42, "column": 33}, "end_point": {"row": 42, "column": 43}}, {"id": 120, "type": "abstract_pointer_declarator", "text": "*", "parent": 116, "children": [121], "start_point": {"row": 42, "column": 44}, "end_point": {"row": 42, "column": 45}}, {"id": 121, "type": "*", "text": "*", "parent": 120, "children": [], "start_point": {"row": 42, "column": 44}, "end_point": {"row": 42, "column": 45}}, {"id": 122, "type": "identifier", "text": "fence", "parent": 115, "children": [], "start_point": {"row": 42, "column": 46}, "end_point": {"row": 42, "column": 51}}, {"id": 123, "type": "declaration", "text": "struct sw_sync_timeline *obj =\n\t\t(struct sw_sync_timeline *)fence_parent(fence);", "parent": 94, "children": [124, 127], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 44, "column": 49}}, {"id": 124, "type": "struct_specifier", "text": "struct sw_sync_timeline", "parent": 123, "children": [125, 126], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 24}}, {"id": 125, "type": "struct", "text": "struct", "parent": 124, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 7}}, {"id": 126, "type": "type_identifier", "text": "sw_sync_timeline", "parent": 124, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 24}}, {"id": 127, "type": "init_declarator", "text": "*obj =\n\t\t(struct sw_sync_timeline *)fence_parent(fence)", "parent": 123, "children": [128, 131, 132], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 44, "column": 48}}, {"id": 128, "type": "pointer_declarator", "text": "*obj", "parent": 127, "children": [129, 130], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 29}}, {"id": 129, "type": "*", "text": "*", "parent": 128, "children": [], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 26}}, {"id": 130, "type": "identifier", "text": "obj", "parent": 128, "children": [], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 29}}, {"id": 131, "type": "=", "text": "=", "parent": 127, "children": [], "start_point": {"row": 43, "column": 30}, "end_point": {"row": 43, "column": 31}}, {"id": 132, "type": "cast_expression", "text": "(struct sw_sync_timeline *)fence_parent(fence)", "parent": 127, "children": [133, 139], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 48}}, {"id": 133, "type": "type_descriptor", "text": "struct sw_sync_timeline *", "parent": 132, "children": [134, 137], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 28}}, {"id": 134, "type": "struct_specifier", "text": "struct sw_sync_timeline", "parent": 133, "children": [135, 136], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 26}}, {"id": 135, "type": "struct", "text": "struct", "parent": 134, "children": [], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 9}}, {"id": 136, "type": "type_identifier", "text": "sw_sync_timeline", "parent": 134, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 26}}, {"id": 137, "type": "abstract_pointer_declarator", "text": "*", "parent": 133, "children": [138], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 28}}, {"id": 138, "type": "*", "text": "*", "parent": 137, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 28}}, {"id": 139, "type": "call_expression", "text": "fence_parent(fence)", "parent": 132, "children": [140, 141], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 48}}, {"id": 140, "type": "identifier", "text": "fence_parent", "parent": 139, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 41}}, {"id": 141, "type": "argument_list", "text": "(fence)", "parent": 139, "children": [142], "start_point": {"row": 44, "column": 41}, "end_point": {"row": 44, "column": 48}}, {"id": 142, "type": "identifier", "text": "fence", "parent": 141, "children": [], "start_point": {"row": 44, "column": 42}, "end_point": {"row": 44, "column": 47}}, {"id": 143, "type": "return_statement", "text": "return (pt->value > obj->value) ? 0 : 1;", "parent": 94, "children": [144], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 41}}, {"id": 144, "type": "conditional_expression", "text": "(pt->value > obj->value) ? 0 : 1", "parent": 143, "children": [145, 154, 155, 156], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 40}}, {"id": 145, "type": "parenthesized_expression", "text": "(pt->value > obj->value)", "parent": 144, "children": [146], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 32}}, {"id": 146, "type": "binary_expression", "text": "pt->value > obj->value", "parent": 145, "children": [147, 150, 151], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 31}}, {"id": 147, "type": "field_expression", "text": "pt->value", "parent": 146, "children": [148, 149], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 18}}, {"id": 148, "type": "identifier", "text": "pt", "parent": 147, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 11}}, {"id": 149, "type": "field_identifier", "text": "value", "parent": 147, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 18}}, {"id": 150, "type": ">", "text": ">", "parent": 146, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 20}}, {"id": 151, "type": "field_expression", "text": "obj->value", "parent": 146, "children": [152, 153], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 31}}, {"id": 152, "type": "identifier", "text": "obj", "parent": 151, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 24}}, {"id": 153, "type": "field_identifier", "text": "value", "parent": 151, "children": [], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 31}}, {"id": 154, "type": "?", "text": "?", "parent": 144, "children": [], "start_point": {"row": 46, "column": 33}, "end_point": {"row": 46, "column": 34}}, {"id": 155, "type": "number_literal", "text": "0", "parent": 144, "children": [], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 36}}, {"id": 156, "type": "number_literal", "text": "1", "parent": 144, "children": [], "start_point": {"row": 46, "column": 39}, "end_point": {"row": 46, "column": 40}}, {"id": 157, "type": "function_definition", "text": "static void sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,\n\t\t\t\t char *str, int size)\n{\n\tstruct sw_sync_timeline *timeline =\n\t\t(struct sw_sync_timeline *)sync_timeline;\n\tsnprintf(str, size, \"%d\", timeline->value);\n}", "parent": null, "children": [158, 159], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 158, "type": "primitive_type", "text": "void", "parent": 157, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 11}}, {"id": 159, "type": "function_declarator", "text": "sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,\n\t\t\t\t char *str, int size)", "parent": 157, "children": [160, 161], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 50, "column": 31}}, {"id": 160, "type": "identifier", "text": "sw_sync_timeline_value_str", "parent": 159, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 38}}, {"id": 161, "type": "parameter_list", "text": "(struct sync_timeline *sync_timeline,\n\t\t\t\t char *str, int size)", "parent": 159, "children": [162, 169, 174], "start_point": {"row": 49, "column": 38}, "end_point": {"row": 50, "column": 31}}, {"id": 162, "type": "parameter_declaration", "text": "struct sync_timeline *sync_timeline", "parent": 161, "children": [163, 166], "start_point": {"row": 49, "column": 39}, "end_point": {"row": 49, "column": 74}}, {"id": 163, "type": "struct_specifier", "text": "struct sync_timeline", "parent": 162, "children": [164, 165], "start_point": {"row": 49, "column": 39}, "end_point": {"row": 49, "column": 59}}, {"id": 164, "type": "struct", "text": "struct", "parent": 163, "children": [], "start_point": {"row": 49, "column": 39}, "end_point": {"row": 49, "column": 45}}, {"id": 165, "type": "type_identifier", "text": "sync_timeline", "parent": 163, "children": [], "start_point": {"row": 49, "column": 46}, "end_point": {"row": 49, "column": 59}}, {"id": 166, "type": "pointer_declarator", "text": "*sync_timeline", "parent": 162, "children": [167, 168], "start_point": {"row": 49, "column": 60}, "end_point": {"row": 49, "column": 74}}, {"id": 167, "type": "*", "text": "*", "parent": 166, "children": [], "start_point": {"row": 49, "column": 60}, "end_point": {"row": 49, "column": 61}}, {"id": 168, "type": "identifier", "text": "sync_timeline", "parent": 166, "children": [], "start_point": {"row": 49, "column": 61}, "end_point": {"row": 49, "column": 74}}, {"id": 169, "type": "parameter_declaration", "text": "char *str", "parent": 161, "children": [170, 171], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 20}}, {"id": 170, "type": "primitive_type", "text": "char", "parent": 169, "children": [], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 15}}, {"id": 171, "type": "pointer_declarator", "text": "*str", "parent": 169, "children": [172, 173], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 20}}, {"id": 172, "type": "*", "text": "*", "parent": 171, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 17}}, {"id": 173, "type": "identifier", "text": "str", "parent": 171, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 20}}, {"id": 174, "type": "parameter_declaration", "text": "int size", "parent": 161, "children": [175, 176], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 30}}, {"id": 175, "type": "primitive_type", "text": "int", "parent": 174, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 25}}, {"id": 176, "type": "identifier", "text": "size", "parent": 174, "children": [], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 30}}, {"id": 177, "type": "declaration", "text": "struct sw_sync_timeline *timeline =\n\t\t(struct sw_sync_timeline *)sync_timeline;", "parent": 157, "children": [178, 181], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 53, "column": 43}}, {"id": 178, "type": "struct_specifier", "text": "struct sw_sync_timeline", "parent": 177, "children": [179, 180], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 24}}, {"id": 179, "type": "struct", "text": "struct", "parent": 178, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 7}}, {"id": 180, "type": "type_identifier", "text": "sw_sync_timeline", "parent": 178, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 24}}, {"id": 181, "type": "init_declarator", "text": "*timeline =\n\t\t(struct sw_sync_timeline *)sync_timeline", "parent": 177, "children": [182, 185, 186], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 53, "column": 42}}, {"id": 182, "type": "pointer_declarator", "text": "*timeline", "parent": 181, "children": [183, 184], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 34}}, {"id": 183, "type": "*", "text": "*", "parent": 182, "children": [], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 26}}, {"id": 184, "type": "identifier", "text": "timeline", "parent": 182, "children": [], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 34}}, {"id": 185, "type": "=", "text": "=", "parent": 181, "children": [], "start_point": {"row": 52, "column": 35}, "end_point": {"row": 52, "column": 36}}, {"id": 186, "type": "cast_expression", "text": "(struct sw_sync_timeline *)sync_timeline", "parent": 181, "children": [187, 193], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 42}}, {"id": 187, "type": "type_descriptor", "text": "struct sw_sync_timeline *", "parent": 186, "children": [188, 191], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 28}}, {"id": 188, "type": "struct_specifier", "text": "struct sw_sync_timeline", "parent": 187, "children": [189, 190], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 26}}, {"id": 189, "type": "struct", "text": "struct", "parent": 188, "children": [], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 9}}, {"id": 190, "type": "type_identifier", "text": "sw_sync_timeline", "parent": 188, "children": [], "start_point": {"row": 53, "column": 10}, "end_point": {"row": 53, "column": 26}}, {"id": 191, "type": "abstract_pointer_declarator", "text": "*", "parent": 187, "children": [192], "start_point": {"row": 53, "column": 27}, "end_point": {"row": 53, "column": 28}}, {"id": 192, "type": "*", "text": "*", "parent": 191, "children": [], "start_point": {"row": 53, "column": 27}, "end_point": {"row": 53, "column": 28}}, {"id": 193, "type": "identifier", "text": "sync_timeline", "parent": 186, "children": [], "start_point": {"row": 53, "column": 29}, "end_point": {"row": 53, "column": 42}}, {"id": 194, "type": "call_expression", "text": "snprintf(str, size, \"%d\", timeline->value)", "parent": 157, "children": [195, 196], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 43}}, {"id": 195, "type": "identifier", "text": "snprintf", "parent": 194, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 9}}, {"id": 196, "type": "argument_list", "text": "(str, size, \"%d\", timeline->value)", "parent": 194, "children": [197, 198, 199, 200], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 43}}, {"id": 197, "type": "identifier", "text": "str", "parent": 196, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 13}}, {"id": 198, "type": "identifier", "text": "size", "parent": 196, "children": [], "start_point": {"row": 54, "column": 15}, "end_point": {"row": 54, "column": 19}}, {"id": 199, "type": "string_literal", "text": "\"%d\"", "parent": 196, "children": [], "start_point": {"row": 54, "column": 21}, "end_point": {"row": 54, "column": 25}}, {"id": 200, "type": "field_expression", "text": "timeline->value", "parent": 196, "children": [201, 202], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 42}}, {"id": 201, "type": "identifier", "text": "timeline", "parent": 200, "children": [], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 35}}, {"id": 202, "type": "field_identifier", "text": "value", "parent": 200, "children": [], "start_point": {"row": 54, "column": 37}, "end_point": {"row": 54, "column": 42}}, {"id": 203, "type": "function_definition", "text": "static void sw_sync_fence_value_str(struct fence *fence, char *str, int size)\n{\n\tstruct sw_sync_pt *pt = (struct sw_sync_pt *)fence;\n\n\tsnprintf(str, size, \"%d\", pt->value);\n}", "parent": null, "children": [204, 205], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 204, "type": "primitive_type", "text": "void", "parent": 203, "children": [], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 11}}, {"id": 205, "type": "function_declarator", "text": "sw_sync_fence_value_str(struct fence *fence, char *str, int size)", "parent": 203, "children": [206, 207], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 77}}, {"id": 206, "type": "identifier", "text": "sw_sync_fence_value_str", "parent": 205, "children": [], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 35}}, {"id": 207, "type": "parameter_list", "text": "(struct fence *fence, char *str, int size)", "parent": 205, "children": [208, 215, 220], "start_point": {"row": 57, "column": 35}, "end_point": {"row": 57, "column": 77}}, {"id": 208, "type": "parameter_declaration", "text": "struct fence *fence", "parent": 207, "children": [209, 212], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 55}}, {"id": 209, "type": "struct_specifier", "text": "struct fence", "parent": 208, "children": [210, 211], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 48}}, {"id": 210, "type": "struct", "text": "struct", "parent": 209, "children": [], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 42}}, {"id": 211, "type": "type_identifier", "text": "fence", "parent": 209, "children": [], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 57, "column": 48}}, {"id": 212, "type": "pointer_declarator", "text": "*fence", "parent": 208, "children": [213, 214], "start_point": {"row": 57, "column": 49}, "end_point": {"row": 57, "column": 55}}, {"id": 213, "type": "*", "text": "*", "parent": 212, "children": [], "start_point": {"row": 57, "column": 49}, "end_point": {"row": 57, "column": 50}}, {"id": 214, "type": "identifier", "text": "fence", "parent": 212, "children": [], "start_point": {"row": 57, "column": 50}, "end_point": {"row": 57, "column": 55}}, {"id": 215, "type": "parameter_declaration", "text": "char *str", "parent": 207, "children": [216, 217], "start_point": {"row": 57, "column": 57}, "end_point": {"row": 57, "column": 66}}, {"id": 216, "type": "primitive_type", "text": "char", "parent": 215, "children": [], "start_point": {"row": 57, "column": 57}, "end_point": {"row": 57, "column": 61}}, {"id": 217, "type": "pointer_declarator", "text": "*str", "parent": 215, "children": [218, 219], "start_point": {"row": 57, "column": 62}, "end_point": {"row": 57, "column": 66}}, {"id": 218, "type": "*", "text": "*", "parent": 217, "children": [], "start_point": {"row": 57, "column": 62}, "end_point": {"row": 57, "column": 63}}, {"id": 219, "type": "identifier", "text": "str", "parent": 217, "children": [], "start_point": {"row": 57, "column": 63}, "end_point": {"row": 57, "column": 66}}, {"id": 220, "type": "parameter_declaration", "text": "int size", "parent": 207, "children": [221, 222], "start_point": {"row": 57, "column": 68}, "end_point": {"row": 57, "column": 76}}, {"id": 221, "type": "primitive_type", "text": "int", "parent": 220, "children": [], "start_point": {"row": 57, "column": 68}, "end_point": {"row": 57, "column": 71}}, {"id": 222, "type": "identifier", "text": "size", "parent": 220, "children": [], "start_point": {"row": 57, "column": 72}, "end_point": {"row": 57, "column": 76}}, {"id": 223, "type": "declaration", "text": "struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;", "parent": 203, "children": [224, 227], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 52}}, {"id": 224, "type": "struct_specifier", "text": "struct sw_sync_pt", "parent": 223, "children": [225, 226], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 18}}, {"id": 225, "type": "struct", "text": "struct", "parent": 224, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 7}}, {"id": 226, "type": "type_identifier", "text": "sw_sync_pt", "parent": 224, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 18}}, {"id": 227, "type": "init_declarator", "text": "*pt = (struct sw_sync_pt *)fence", "parent": 223, "children": [228, 231, 232], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 51}}, {"id": 228, "type": "pointer_declarator", "text": "*pt", "parent": 227, "children": [229, 230], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 22}}, {"id": 229, "type": "*", "text": "*", "parent": 228, "children": [], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 20}}, {"id": 230, "type": "identifier", "text": "pt", "parent": 228, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 22}}, {"id": 231, "type": "=", "text": "=", "parent": 227, "children": [], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 24}}, {"id": 232, "type": "cast_expression", "text": "(struct sw_sync_pt *)fence", "parent": 227, "children": [233, 239], "start_point": {"row": 59, "column": 25}, "end_point": {"row": 59, "column": 51}}, {"id": 233, "type": "type_descriptor", "text": "struct sw_sync_pt *", "parent": 232, "children": [234, 237], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 45}}, {"id": 234, "type": "struct_specifier", "text": "struct sw_sync_pt", "parent": 233, "children": [235, 236], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 43}}, {"id": 235, "type": "struct", "text": "struct", "parent": 234, "children": [], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 32}}, {"id": 236, "type": "type_identifier", "text": "sw_sync_pt", "parent": 234, "children": [], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 43}}, {"id": 237, "type": "abstract_pointer_declarator", "text": "*", "parent": 233, "children": [238], "start_point": {"row": 59, "column": 44}, "end_point": {"row": 59, "column": 45}}, {"id": 238, "type": "*", "text": "*", "parent": 237, "children": [], "start_point": {"row": 59, "column": 44}, "end_point": {"row": 59, "column": 45}}, {"id": 239, "type": "identifier", "text": "fence", "parent": 232, "children": [], "start_point": {"row": 59, "column": 46}, "end_point": {"row": 59, "column": 51}}, {"id": 240, "type": "call_expression", "text": "snprintf(str, size, \"%d\", pt->value)", "parent": 203, "children": [241, 242], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 37}}, {"id": 241, "type": "identifier", "text": "snprintf", "parent": 240, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 9}}, {"id": 242, "type": "argument_list", "text": "(str, size, \"%d\", pt->value)", "parent": 240, "children": [243, 244, 245, 246], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 37}}, {"id": 243, "type": "identifier", "text": "str", "parent": 242, "children": [], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 13}}, {"id": 244, "type": "identifier", "text": "size", "parent": 242, "children": [], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 19}}, {"id": 245, "type": "string_literal", "text": "\"%d\"", "parent": 242, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 25}}, {"id": 246, "type": "field_expression", "text": "pt->value", "parent": 242, "children": [247, 248], "start_point": {"row": 61, "column": 27}, "end_point": {"row": 61, "column": 36}}, {"id": 247, "type": "identifier", "text": "pt", "parent": 246, "children": [], "start_point": {"row": 61, "column": 27}, "end_point": {"row": 61, "column": 29}}, {"id": 248, "type": "field_identifier", "text": "value", "parent": 246, "children": [], "start_point": {"row": 61, "column": 31}, "end_point": {"row": 61, "column": 36}}, {"id": 249, "type": "declaration", "text": "static struct sync_timeline_ops sw_sync_timeline_ops = {\n\t.driver_name = \"sw_sync\",\n\t.has_signaled = sw_sync_fence_has_signaled,\n\t.timeline_value_str = sw_sync_timeline_value_str,\n\t.fence_value_str = sw_sync_fence_value_str,\n};", "parent": null, "children": [250, 253], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 69, "column": 2}}, {"id": 250, "type": "struct_specifier", "text": "struct sync_timeline_ops", "parent": 249, "children": [251, 252], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 31}}, {"id": 251, "type": "struct", "text": "struct", "parent": 250, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 13}}, {"id": 252, "type": "type_identifier", "text": "sync_timeline_ops", "parent": 250, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 31}}, {"id": 253, "type": "init_declarator", "text": "sw_sync_timeline_ops = {\n\t.driver_name = \"sw_sync\",\n\t.has_signaled = sw_sync_fence_has_signaled,\n\t.timeline_value_str = sw_sync_timeline_value_str,\n\t.fence_value_str = sw_sync_fence_value_str,\n}", "parent": 249, "children": [254, 255, 256], "start_point": {"row": 64, "column": 32}, "end_point": {"row": 69, "column": 1}}, {"id": 254, "type": "identifier", "text": "sw_sync_timeline_ops", "parent": 253, "children": [], "start_point": {"row": 64, "column": 32}, "end_point": {"row": 64, "column": 52}}, {"id": 255, "type": "=", "text": "=", "parent": 253, "children": [], "start_point": {"row": 64, "column": 53}, "end_point": {"row": 64, "column": 54}}, {"id": 256, "type": "initializer_list", "text": "{\n\t.driver_name = \"sw_sync\",\n\t.has_signaled = sw_sync_fence_has_signaled,\n\t.timeline_value_str = sw_sync_timeline_value_str,\n\t.fence_value_str = sw_sync_fence_value_str,\n}", "parent": 253, "children": [257, 262, 267, 272], "start_point": {"row": 64, "column": 55}, "end_point": {"row": 69, "column": 1}}, {"id": 257, "type": "initializer_pair", "text": ".driver_name = \"sw_sync\"", "parent": 256, "children": [258, 260, 261], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 25}}, {"id": 258, "type": "field_designator", "text": ".driver_name", "parent": 257, "children": [259], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 13}}, {"id": 259, "type": "field_identifier", "text": "driver_name", "parent": 258, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 13}}, {"id": 260, "type": "=", "text": "=", "parent": 257, "children": [], "start_point": {"row": 65, "column": 14}, "end_point": {"row": 65, "column": 15}}, {"id": 261, "type": "string_literal", "text": "\"sw_sync\"", "parent": 257, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 25}}, {"id": 262, "type": "initializer_pair", "text": ".has_signaled = sw_sync_fence_has_signaled", "parent": 256, "children": [263, 265, 266], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 43}}, {"id": 263, "type": "field_designator", "text": ".has_signaled", "parent": 262, "children": [264], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 14}}, {"id": 264, "type": "field_identifier", "text": "has_signaled", "parent": 263, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 14}}, {"id": 265, "type": "=", "text": "=", "parent": 262, "children": [], "start_point": {"row": 66, "column": 15}, "end_point": {"row": 66, "column": 16}}, {"id": 266, "type": "identifier", "text": "sw_sync_fence_has_signaled", "parent": 262, "children": [], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 43}}, {"id": 267, "type": "initializer_pair", "text": ".timeline_value_str = sw_sync_timeline_value_str", "parent": 256, "children": [268, 270, 271], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 49}}, {"id": 268, "type": "field_designator", "text": ".timeline_value_str", "parent": 267, "children": [269], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 20}}, {"id": 269, "type": "field_identifier", "text": "timeline_value_str", "parent": 268, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 20}}, {"id": 270, "type": "=", "text": "=", "parent": 267, "children": [], "start_point": {"row": 67, "column": 21}, "end_point": {"row": 67, "column": 22}}, {"id": 271, "type": "identifier", "text": "sw_sync_timeline_value_str", "parent": 267, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 49}}, {"id": 272, "type": "initializer_pair", "text": ".fence_value_str = sw_sync_fence_value_str", "parent": 256, "children": [273, 275, 276], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 43}}, {"id": 273, "type": "field_designator", "text": ".fence_value_str", "parent": 272, "children": [274], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 17}}, {"id": 274, "type": "field_identifier", "text": "fence_value_str", "parent": 273, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 17}}, {"id": 275, "type": "=", "text": "=", "parent": 272, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 19}}, {"id": 276, "type": "identifier", "text": "sw_sync_fence_value_str", "parent": 272, "children": [], "start_point": {"row": 68, "column": 20}, "end_point": {"row": 68, "column": 43}}, {"id": 277, "type": "function_definition", "text": "struct sw_sync_timeline *sw_sync_timeline_create(const char *name)\n{\n\tstruct sw_sync_timeline *obj = (struct sw_sync_timeline *)\n\t\tsync_timeline_create(&sw_sync_timeline_ops,\n\t\t\t\t sizeof(struct sw_sync_timeline),\n\t\t\t\t name);\n\n\treturn obj;\n}", "parent": null, "children": [278, 281], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 79, "column": 1}}, {"id": 278, "type": "struct_specifier", "text": "struct sw_sync_timeline", "parent": 277, "children": [279, 280], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 23}}, {"id": 279, "type": "struct", "text": "struct", "parent": 278, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 6}}, {"id": 280, "type": "type_identifier", "text": "sw_sync_timeline", "parent": 278, "children": [], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 23}}, {"id": 281, "type": "pointer_declarator", "text": "*sw_sync_timeline_create(const char *name)", "parent": 277, "children": [282, 283], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 66}}, {"id": 282, "type": "*", "text": "*", "parent": 281, "children": [], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 25}}, {"id": 283, "type": "function_declarator", "text": "sw_sync_timeline_create(const char *name)", "parent": 281, "children": [284, 285], "start_point": {"row": 71, "column": 25}, "end_point": {"row": 71, "column": 66}}, {"id": 284, "type": "identifier", "text": "sw_sync_timeline_create", "parent": 283, "children": [], "start_point": {"row": 71, "column": 25}, "end_point": {"row": 71, "column": 48}}, {"id": 285, "type": "parameter_list", "text": "(const char *name)", "parent": 283, "children": [286], "start_point": {"row": 71, "column": 48}, "end_point": {"row": 71, "column": 66}}, {"id": 286, "type": "parameter_declaration", "text": "const char *name", "parent": 285, "children": [287, 288], "start_point": {"row": 71, "column": 49}, "end_point": {"row": 71, "column": 65}}, {"id": 287, "type": "primitive_type", "text": "char", "parent": 286, "children": [], "start_point": {"row": 71, "column": 55}, "end_point": {"row": 71, "column": 59}}, {"id": 288, "type": "pointer_declarator", "text": "*name", "parent": 286, "children": [289, 290], "start_point": {"row": 71, "column": 60}, "end_point": {"row": 71, "column": 65}}, {"id": 289, "type": "*", "text": "*", "parent": 288, "children": [], "start_point": {"row": 71, "column": 60}, "end_point": {"row": 71, "column": 61}}, {"id": 290, "type": "identifier", "text": "name", "parent": 288, "children": [], "start_point": {"row": 71, "column": 61}, "end_point": {"row": 71, "column": 65}}, {"id": 291, "type": "declaration", "text": "struct sw_sync_timeline *obj = (struct sw_sync_timeline *)\n\t\tsync_timeline_create(&sw_sync_timeline_ops,\n\t\t\t\t sizeof(struct sw_sync_timeline),\n\t\t\t\t name);", "parent": 277, "children": [292, 295], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 76, "column": 15}}, {"id": 292, "type": "struct_specifier", "text": "struct sw_sync_timeline", "parent": 291, "children": [293, 294], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 24}}, {"id": 293, "type": "struct", "text": "struct", "parent": 292, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 7}}, {"id": 294, "type": "type_identifier", "text": "sw_sync_timeline", "parent": 292, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 24}}, {"id": 295, "type": "init_declarator", "text": "*obj = (struct sw_sync_timeline *)\n\t\tsync_timeline_create(&sw_sync_timeline_ops,\n\t\t\t\t sizeof(struct sw_sync_timeline),\n\t\t\t\t name)", "parent": 291, "children": [296, 299, 300], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 76, "column": 14}}, {"id": 296, "type": "pointer_declarator", "text": "*obj", "parent": 295, "children": [297, 298], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 29}}, {"id": 297, "type": "*", "text": "*", "parent": 296, "children": [], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 26}}, {"id": 298, "type": "identifier", "text": "obj", "parent": 296, "children": [], "start_point": {"row": 73, "column": 26}, "end_point": {"row": 73, "column": 29}}, {"id": 299, "type": "=", "text": "=", "parent": 295, "children": [], "start_point": {"row": 73, "column": 30}, "end_point": {"row": 73, "column": 31}}, {"id": 300, "type": "cast_expression", "text": "(struct sw_sync_timeline *)\n\t\tsync_timeline_create(&sw_sync_timeline_ops,\n\t\t\t\t sizeof(struct sw_sync_timeline),\n\t\t\t\t name)", "parent": 295, "children": [301, 307], "start_point": {"row": 73, "column": 32}, "end_point": {"row": 76, "column": 14}}, {"id": 301, "type": "type_descriptor", "text": "struct sw_sync_timeline *", "parent": 300, "children": [302, 305], "start_point": {"row": 73, "column": 33}, "end_point": {"row": 73, "column": 58}}, {"id": 302, "type": "struct_specifier", "text": "struct sw_sync_timeline", "parent": 301, "children": [303, 304], "start_point": {"row": 73, "column": 33}, "end_point": {"row": 73, "column": 56}}, {"id": 303, "type": "struct", "text": "struct", "parent": 302, "children": [], "start_point": {"row": 73, "column": 33}, "end_point": {"row": 73, "column": 39}}, {"id": 304, "type": "type_identifier", "text": "sw_sync_timeline", "parent": 302, "children": [], "start_point": {"row": 73, "column": 40}, "end_point": {"row": 73, "column": 56}}, {"id": 305, "type": "abstract_pointer_declarator", "text": "*", "parent": 301, "children": [306], "start_point": {"row": 73, "column": 57}, "end_point": {"row": 73, "column": 58}}, {"id": 306, "type": "*", "text": "*", "parent": 305, "children": [], "start_point": {"row": 73, "column": 57}, "end_point": {"row": 73, "column": 58}}, {"id": 307, "type": "call_expression", "text": "sync_timeline_create(&sw_sync_timeline_ops,\n\t\t\t\t sizeof(struct sw_sync_timeline),\n\t\t\t\t name)", "parent": 300, "children": [308, 309], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 76, "column": 14}}, {"id": 308, "type": "identifier", "text": "sync_timeline_create", "parent": 307, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 22}}, {"id": 309, "type": "argument_list", "text": "(&sw_sync_timeline_ops,\n\t\t\t\t sizeof(struct sw_sync_timeline),\n\t\t\t\t name)", "parent": 307, "children": [310, 312, 317], "start_point": {"row": 74, "column": 22}, "end_point": {"row": 76, "column": 14}}, {"id": 310, "type": "pointer_expression", "text": "&sw_sync_timeline_ops", "parent": 309, "children": [311], "start_point": {"row": 74, "column": 23}, "end_point": {"row": 74, "column": 44}}, {"id": 311, "type": "identifier", "text": "sw_sync_timeline_ops", "parent": 310, "children": [], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 44}}, {"id": 312, "type": "sizeof_expression", "text": "sizeof(struct sw_sync_timeline)", "parent": 309, "children": [313], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 40}}, {"id": 313, "type": "type_descriptor", "text": "struct sw_sync_timeline", "parent": 312, "children": [314], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 39}}, {"id": 314, "type": "struct_specifier", "text": "struct sw_sync_timeline", "parent": 313, "children": [315, 316], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 39}}, {"id": 315, "type": "struct", "text": "struct", "parent": 314, "children": [], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 22}}, {"id": 316, "type": "type_identifier", "text": "sw_sync_timeline", "parent": 314, "children": [], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 39}}, {"id": 317, "type": "identifier", "text": "name", "parent": 309, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 13}}, {"id": 318, "type": "return_statement", "text": "return obj;", "parent": 277, "children": [319], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 12}}, {"id": 319, "type": "identifier", "text": "obj", "parent": 318, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 11}}, {"id": 320, "type": "call_expression", "text": "EXPORT_SYMBOL(sw_sync_timeline_create)", "parent": null, "children": [321, 322], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 38}}, {"id": 321, "type": "identifier", "text": "EXPORT_SYMBOL", "parent": 320, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 13}}, {"id": 322, "type": "argument_list", "text": "(sw_sync_timeline_create)", "parent": 320, "children": [323], "start_point": {"row": 80, "column": 13}, "end_point": {"row": 80, "column": 38}}, {"id": 323, "type": "identifier", "text": "sw_sync_timeline_create", "parent": 322, "children": [], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 37}}, {"id": 324, "type": "function_definition", "text": "void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)\n{\n\tobj->value += inc;\n\n\tsync_timeline_signal(&obj->obj);\n}", "parent": null, "children": [325, 326], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 87, "column": 1}}, {"id": 325, "type": "primitive_type", "text": "void", "parent": 324, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 4}}, {"id": 326, "type": "function_declarator", "text": "sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)", "parent": 324, "children": [327, 328], "start_point": {"row": 82, "column": 5}, "end_point": {"row": 82, "column": 64}}, {"id": 327, "type": "identifier", "text": "sw_sync_timeline_inc", "parent": 326, "children": [], "start_point": {"row": 82, "column": 5}, "end_point": {"row": 82, "column": 25}}, {"id": 328, "type": "parameter_list", "text": "(struct sw_sync_timeline *obj, u32 inc)", "parent": 326, "children": [329, 336], "start_point": {"row": 82, "column": 25}, "end_point": {"row": 82, "column": 64}}, {"id": 329, "type": "parameter_declaration", "text": "struct sw_sync_timeline *obj", "parent": 328, "children": [330, 333], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 54}}, {"id": 330, "type": "struct_specifier", "text": "struct sw_sync_timeline", "parent": 329, "children": [331, 332], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 49}}, {"id": 331, "type": "struct", "text": "struct", "parent": 330, "children": [], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 32}}, {"id": 332, "type": "type_identifier", "text": "sw_sync_timeline", "parent": 330, "children": [], "start_point": {"row": 82, "column": 33}, "end_point": {"row": 82, "column": 49}}, {"id": 333, "type": "pointer_declarator", "text": "*obj", "parent": 329, "children": [334, 335], "start_point": {"row": 82, "column": 50}, "end_point": {"row": 82, "column": 54}}, {"id": 334, "type": "*", "text": "*", "parent": 333, "children": [], "start_point": {"row": 82, "column": 50}, "end_point": {"row": 82, "column": 51}}, {"id": 335, "type": "identifier", "text": "obj", "parent": 333, "children": [], "start_point": {"row": 82, "column": 51}, "end_point": {"row": 82, "column": 54}}, {"id": 336, "type": "parameter_declaration", "text": "u32 inc", "parent": 328, "children": [337, 338], "start_point": {"row": 82, "column": 56}, "end_point": {"row": 82, "column": 63}}, {"id": 337, "type": "type_identifier", "text": "u32", "parent": 336, "children": [], "start_point": {"row": 82, "column": 56}, "end_point": {"row": 82, "column": 59}}, {"id": 338, "type": "identifier", "text": "inc", "parent": 336, "children": [], "start_point": {"row": 82, "column": 60}, "end_point": {"row": 82, "column": 63}}, {"id": 339, "type": "assignment_expression", "text": "obj->value += inc", "parent": 324, "children": [340, 343, 344], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 18}}, {"id": 340, "type": "field_expression", "text": "obj->value", "parent": 339, "children": [341, 342], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 11}}, {"id": 341, "type": "identifier", "text": "obj", "parent": 340, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 4}}, {"id": 342, "type": "field_identifier", "text": "value", "parent": 340, "children": [], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 11}}, {"id": 343, "type": "+=", "text": "+=", "parent": 339, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 14}}, {"id": 344, "type": "identifier", "text": "inc", "parent": 339, "children": [], "start_point": {"row": 84, "column": 15}, "end_point": {"row": 84, "column": 18}}, {"id": 345, "type": "call_expression", "text": "sync_timeline_signal(&obj->obj)", "parent": 324, "children": [346, 347], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 32}}, {"id": 346, "type": "identifier", "text": "sync_timeline_signal", "parent": 345, "children": [], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 21}}, {"id": 347, "type": "argument_list", "text": "(&obj->obj)", "parent": 345, "children": [348], "start_point": {"row": 86, "column": 21}, "end_point": {"row": 86, "column": 32}}, {"id": 348, "type": "pointer_expression", "text": "&obj->obj", "parent": 347, "children": [349], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 31}}, {"id": 349, "type": "field_expression", "text": "obj->obj", "parent": 348, "children": [350, 351], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 31}}, {"id": 350, "type": "identifier", "text": "obj", "parent": 349, "children": [], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 26}}, {"id": 351, "type": "field_identifier", "text": "obj", "parent": 349, "children": [], "start_point": {"row": 86, "column": 28}, "end_point": {"row": 86, "column": 31}}, {"id": 352, "type": "call_expression", "text": "EXPORT_SYMBOL(sw_sync_timeline_inc)", "parent": null, "children": [353, 354], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 35}}, {"id": 353, "type": "identifier", "text": "EXPORT_SYMBOL", "parent": 352, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 13}}, {"id": 354, "type": "argument_list", "text": "(sw_sync_timeline_inc)", "parent": 352, "children": [355], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 35}}, {"id": 355, "type": "identifier", "text": "sw_sync_timeline_inc", "parent": 354, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 34}}]}, "node_categories": {"declarations": {"functions": [27, 33, 94, 96, 157, 159, 203, 205, 277, 283, 324, 326], "variables": [36, 43, 46, 99, 106, 123, 162, 169, 174, 177, 208, 215, 220, 223, 249, 286, 291, 329, 336], "classes": [28, 29, 37, 38, 47, 48, 58, 59, 72, 73, 84, 85, 100, 101, 107, 108, 117, 118, 124, 125, 134, 135, 163, 164, 178, 179, 188, 189, 209, 210, 224, 225, 234, 235, 250, 251, 278, 279, 292, 293, 302, 303, 314, 315, 330, 331], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25], "modules": [], "enums": []}, "statements": {"expressions": [56, 63, 66, 67, 70, 76, 82, 90, 115, 132, 139, 145, 146, 147, 151, 186, 194, 200, 232, 240, 246, 300, 307, 310, 312, 320, 340, 345, 348, 349, 352], "assignments": [53, 75, 339], "loops": [], "conditionals": [30, 34, 39, 42, 44, 45, 49, 52, 54, 60, 64, 68, 69, 74, 77, 78, 80, 86, 89, 91, 93, 97, 102, 105, 109, 113, 119, 122, 126, 130, 136, 140, 142, 144, 148, 149, 152, 153, 160, 165, 168, 173, 176, 180, 184, 190, 193, 195, 197, 198, 201, 202, 206, 211, 214, 219, 222, 226, 230, 236, 239, 241, 243, 244, 247, 248, 252, 254, 259, 264, 266, 269, 271, 274, 276, 280, 284, 290, 294, 298, 304, 308, 311, 316, 317, 319, 321, 323, 327, 332, 335, 337, 338, 341, 342, 344, 346, 350, 351, 353, 355], "returns": [81, 143, 318], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 26, 155, 156, 199, 245, 261], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [258, 263, 268, 273]}}, "cross_language_map": {"function_declarations": [{"node_id": 27, "universal_type": "function", "name": "fence", "text_snippet": "struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)\n{\n\tstruct sw_sync_pt *pt;\n\n"}, {"node_id": 33, "universal_type": "function", "name": "unknown", "text_snippet": "sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)"}, {"node_id": 94, "universal_type": "function", "name": "sw_sync_fence_has_signaled", "text_snippet": "static int sw_sync_fence_has_signaled(struct fence *fence)\n{\n\tstruct sw_sync_pt *pt = (struct sw_syn"}, {"node_id": 96, "universal_type": "function", "name": "unknown", "text_snippet": "sw_sync_fence_has_signaled(struct fence *fence)"}, {"node_id": 157, "universal_type": "function", "name": "sw_sync_timeline_value_str", "text_snippet": "static void sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,\n\t\t\t\t char *str, in"}, {"node_id": 159, "universal_type": "function", "name": "size)", "text_snippet": "sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,\n\t\t\t\t char *str, int size)"}, {"node_id": 203, "universal_type": "function", "name": "sw_sync_fence_value_str", "text_snippet": "static void sw_sync_fence_value_str(struct fence *fence, char *str, int size)\n{\n\tstruct sw_sync_pt *"}, {"node_id": 205, "universal_type": "function", "name": "size)", "text_snippet": "sw_sync_fence_value_str(struct fence *fence, char *str, int size)"}, {"node_id": 277, "universal_type": "function", "name": "sw_sync_timeline", "text_snippet": "struct sw_sync_timeline *sw_sync_timeline_create(const char *name)\n{\n\tstruct sw_sync_timeline *obj ="}, {"node_id": 283, "universal_type": "function", "name": "unknown", "text_snippet": "sw_sync_timeline_create(const char *name)"}, {"node_id": 324, "universal_type": "function", "name": "sw_sync_timeline_inc", "text_snippet": "void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)\n{\n\tobj->value += inc;\n\n\tsync_timeli"}, {"node_id": 326, "universal_type": "function", "name": "unknown", "text_snippet": "sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)"}], "class_declarations": [{"node_id": 28, "universal_type": "class", "name": "fence", "text_snippet": "struct fence"}, {"node_id": 29, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 37, "universal_type": "class", "name": "sw_sync_timeline", "text_snippet": "struct sw_sync_timeline"}, {"node_id": 38, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 47, "universal_type": "class", "name": "sw_sync_pt", "text_snippet": "struct sw_sync_pt"}, {"node_id": 48, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 58, "universal_type": "class", "name": "sw_sync_pt", "text_snippet": "struct sw_sync_pt"}, {"node_id": 59, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 72, "universal_type": "class", "name": "sw_sync_pt", "text_snippet": "struct sw_sync_pt"}, {"node_id": 73, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 84, "universal_type": "class", "name": "fence", "text_snippet": "struct fence"}, {"node_id": 85, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 100, "universal_type": "class", "name": "fence", "text_snippet": "struct fence"}, {"node_id": 101, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 107, "universal_type": "class", "name": "sw_sync_pt", "text_snippet": "struct sw_sync_pt"}, {"node_id": 108, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 117, "universal_type": "class", "name": "sw_sync_pt", "text_snippet": "struct sw_sync_pt"}, {"node_id": 118, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 124, "universal_type": "class", "name": "sw_sync_timeline", "text_snippet": "struct sw_sync_timeline"}, {"node_id": 125, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 134, "universal_type": "class", "name": "sw_sync_timeline", "text_snippet": "struct sw_sync_timeline"}, {"node_id": 135, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 163, "universal_type": "class", "name": "sync_timeline", "text_snippet": "struct sync_timeline"}, {"node_id": 164, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 178, "universal_type": "class", "name": "sw_sync_timeline", "text_snippet": "struct sw_sync_timeline"}, {"node_id": 179, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 188, "universal_type": "class", "name": "sw_sync_timeline", "text_snippet": "struct sw_sync_timeline"}, {"node_id": 189, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 209, "universal_type": "class", "name": "fence", "text_snippet": "struct fence"}, {"node_id": 210, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 224, "universal_type": "class", "name": "sw_sync_pt", "text_snippet": "struct sw_sync_pt"}, {"node_id": 225, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 234, "universal_type": "class", "name": "sw_sync_pt", "text_snippet": "struct sw_sync_pt"}, {"node_id": 235, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 250, "universal_type": "class", "name": "sync_timeline_ops", "text_snippet": "struct sync_timeline_ops"}, {"node_id": 251, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 278, "universal_type": "class", "name": "sw_sync_timeline", "text_snippet": "struct sw_sync_timeline"}, {"node_id": 279, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 292, "universal_type": "class", "name": "sw_sync_timeline", "text_snippet": "struct sw_sync_timeline"}, {"node_id": 293, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 302, "universal_type": "class", "name": "sw_sync_timeline", "text_snippet": "struct sw_sync_timeline"}, {"node_id": 303, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 314, "universal_type": "class", "name": "sw_sync_timeline", "text_snippet": "struct sw_sync_timeline"}, {"node_id": 315, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 330, "universal_type": "class", "name": "sw_sync_timeline", "text_snippet": "struct sw_sync_timeline"}, {"node_id": 331, "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/init.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <linux/export.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <linux/file.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <linux/fs.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <linux/miscdevice.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <linux/syscalls.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <linux/uaccess.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"sw_sync.h\"\n"}, {"node_id": 25, "text": "#include"}]}, "original_source_code": "/*\n * drivers/base/sw_sync.c\n *\n * Copyright (C) 2012 Google, Inc.\n *\n * This software is licensed under the terms of the GNU General Public\n * License version 2, as published by the Free Software Foundation, and\n * may be copied, distributed, and modified under those terms.\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 */\n\n#include <linux/kernel.h>\n#include <linux/init.h>\n#include <linux/export.h>\n#include <linux/file.h>\n#include <linux/fs.h>\n#include <linux/miscdevice.h>\n#include <linux/syscalls.h>\n#include <linux/uaccess.h>\n\n#include \"sw_sync.h\"\n\nstruct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)\n{\n\tstruct sw_sync_pt *pt;\n\n\tpt = (struct sw_sync_pt *)\n\t\tsync_pt_create(&obj->obj, sizeof(struct sw_sync_pt));\n\n\tpt->value = value;\n\n\treturn (struct fence *)pt;\n}\nEXPORT_SYMBOL(sw_sync_pt_create);\n\nstatic int sw_sync_fence_has_signaled(struct fence *fence)\n{\n\tstruct sw_sync_pt *pt = (struct sw_sync_pt *)fence;\n\tstruct sw_sync_timeline *obj =\n\t\t(struct sw_sync_timeline *)fence_parent(fence);\n\n\treturn (pt->value > obj->value) ? 0 : 1;\n}\n\nstatic void sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,\n\t\t\t\t char *str, int size)\n{\n\tstruct sw_sync_timeline *timeline =\n\t\t(struct sw_sync_timeline *)sync_timeline;\n\tsnprintf(str, size, \"%d\", timeline->value);\n}\n\nstatic void sw_sync_fence_value_str(struct fence *fence, char *str, int size)\n{\n\tstruct sw_sync_pt *pt = (struct sw_sync_pt *)fence;\n\n\tsnprintf(str, size, \"%d\", pt->value);\n}\n\nstatic struct sync_timeline_ops sw_sync_timeline_ops = {\n\t.driver_name = \"sw_sync\",\n\t.has_signaled = sw_sync_fence_has_signaled,\n\t.timeline_value_str = sw_sync_timeline_value_str,\n\t.fence_value_str = sw_sync_fence_value_str,\n};\n\nstruct sw_sync_timeline *sw_sync_timeline_create(const char *name)\n{\n\tstruct sw_sync_timeline *obj = (struct sw_sync_timeline *)\n\t\tsync_timeline_create(&sw_sync_timeline_ops,\n\t\t\t\t sizeof(struct sw_sync_timeline),\n\t\t\t\t name);\n\n\treturn obj;\n}\nEXPORT_SYMBOL(sw_sync_timeline_create);\n\nvoid sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)\n{\n\tobj->value += inc;\n\n\tsync_timeline_signal(&obj->obj);\n}\nEXPORT_SYMBOL(sw_sync_timeline_inc);\n"}
388
c
#include <stdio.h> void swap(int &a, int &b) { int tmp; tmp = a; a = b; b = tmp; } int partition(int a[], int start, int end) { int i, j; int tmp, x; x = a[end]; //按x分割元素 i = start - 1; for (j = start; j < end; j++) { if (a[j] <= x) swap(a[++i], a[j]); } swap(a[i + 1], a[end]); return i + 1; } void print(int a[]) { for (int i = 0; i < 8; i++) printf("%d ", a[i]); printf("\n"); } void quicksort(int a[], int start, int end) { int p; if (start < end) { p = partition(a, start, end); quicksort(a, start, p - 1); quicksort(a, p + 1, end); } } int main() { int a[8] = {3, 9, 8, 1, 5, 6, 2, 5}; //partition(a, 0, 7); quicksort(a, 0, 7); print(a); }
16.58
45
(translation_unit) "#include <stdio.h>\n\nvoid swap(int &a, int &b)\n{\n int tmp;\n tmp = a;\n a = b;\n b = tmp;\n}\nint partition(int a[], int start, int end)\n{\n int i, j;\n int tmp, x;\n x = a[end]; //按x分割元素\n i = start - 1;\n for (j = start; j < end; j++)\n {\n if (a[j] <= x)\n swap(a[++i], a[j]);\n }\n swap(a[i + 1], a[end]);\n return i + 1;\n}\nvoid print(int a[])\n{\n for (int i = 0; i < 8; i++)\n printf("%d ", a[i]);\n printf("\n");\n}\nvoid quicksort(int a[], int start, int end)\n{\n int p;\n if (start < end)\n {\n p = partition(a, start, end);\n quicksort(a, start, p - 1);\n quicksort(a, p + 1, end);\n }\n}\nint main()\n{\n int a[8] = {3, 9, 8, 1, 5, 6, 2, 5};\n //partition(a, 0, 7);\n quicksort(a, 0, 7);\n print(a);\n}" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (function_definition) "void swap(int &a, int &b)\n{\n int tmp;\n tmp = a;\n a = b;\n b = tmp;\n}" (primitive_type) "void" (function_declarator) "swap(int &a, int &b)" (identifier) "swap" (parameter_list) "(int &a, int &b)" (() "(" (parameter_declaration) "int &a" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "a" (,) "," (parameter_declaration) "int &b" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "b" ()) ")" (compound_statement) "{\n int tmp;\n tmp = a;\n a = b;\n b = tmp;\n}" ({) "{" (declaration) "int tmp;" (primitive_type) "int" (identifier) "tmp" (;) ";" (expression_statement) "tmp = a;" (assignment_expression) "tmp = a" (identifier) "tmp" (=) "=" (identifier) "a" (;) ";" (expression_statement) "a = b;" (assignment_expression) "a = b" (identifier) "a" (=) "=" (identifier) "b" (;) ";" (expression_statement) "b = tmp;" (assignment_expression) "b = tmp" (identifier) "b" (=) "=" (identifier) "tmp" (;) ";" (}) "}" (function_definition) "int partition(int a[], int start, int end)\n{\n int i, j;\n int tmp, x;\n x = a[end]; //按x分割元素\n i = start - 1;\n for (j = start; j < end; j++)\n {\n if (a[j] <= x)\n swap(a[++i], a[j]);\n }\n swap(a[i + 1], a[end]);\n return i + 1;\n}\nvoid prin" (primitive_type) "int" (function_declarator) "partition(int a[], int start, int end)" (identifier) "partition" (parameter_list) "(int a[], int start, int end)" (() "(" (parameter_declaration) "int a[]" (primitive_type) "int" (array_declarator) "a[]" (identifier) "a" ([) "[" (]) "]" (,) "," (parameter_declaration) "int start" (primitive_type) "int" (identifier) "start" (,) "," (parameter_declaration) "int end" (primitive_type) "int" (identifier) "end" ()) ")" (compound_statement) "{\n int i, j;\n int tmp, x;\n x = a[end]; //按x分割元素\n i = start - 1;\n for (j = start; j < end; j++)\n {\n if (a[j] <= x)\n swap(a[++i], a[j]);\n }\n swap(a[i + 1], a[end]);\n return i + 1;\n}\nvoid prin" ({) "{" (declaration) "int i, j;" (primitive_type) "int" (identifier) "i" (,) "," (identifier) "j" (;) ";" (declaration) "int tmp, x;" (primitive_type) "int" (identifier) "tmp" (,) "," (identifier) "x" (;) ";" (expression_statement) "x = a[end];" (assignment_expression) "x = a[end]" (identifier) "x" (=) "=" (subscript_expression) "a[end]" (identifier) "a" ([) "[" (identifier) "end" (]) "]" (;) ";" (comment) "//按x分割元素\n i = s" (expression_statement) "- 1;\n for (" (assignment_expression) "- 1;\n for " (identifier) "-" (=) "1" (binary_expression) "\n for " (identifier) "\n " (-) "o" (number_literal) " " (;) "(" (for_statement) "tart; j < end; j++)\n {\n if (a[j] <= x)\n swap(a[++i], a[j]);\n }\n swap(" (for) "tar" (() ";" (assignment_expression) " j < end;" (identifier) " " (=) " " (identifier) " end;" (;) " " (binary_expression) "++)\n " (identifier) "+" (<) ")" (identifier) " " (;) " " (update_expression) "\n " (identifier) "\n" (++) " " ()) " " (compound_statement) "if (a[j] <= x)\n swap(a[++i], a[j]);\n }\n swap(" ({) "i" (if_statement) "= x)\n swap(a[++i], a[j]);\n }\n " (if) "= " (parenthesized_expression) ")\n " (() ")" (binary_expression) "\n " (subscript_expression) "\n " (identifier) "\n" ([) " " (identifier) " " (]) " " (<=) " " (identifier) " " ()) " " (expression_statement) "], a[j]);\n }\n " (call_expression) "], a[j]);\n }\n " (identifier) "], a" (argument_list) "[j]);\n }\n " (() "[" (subscript_expression) "j]);\n " (identifier) "j" ([) "]" (update_expression) ");\n" (++) ");" (identifier) "\n" (]) " " (,) " " (subscript_expression) " }\n " (identifier) " " ([) "}" (identifier) "\n" (]) " " ()) " " (;) " " (}) "(" (expression_statement) " 1], a[end]);\n retur" (call_expression) " 1], a[end]);\n retu" (identifier) " 1]," (argument_list) " a[end]);\n retu" (() " " (subscript_expression) "a[end]);" (identifier) "a" ([) "[" (binary_expression) "end])" (identifier) "e" (+) "d" (number_literal) ")" (]) ";" (,) "\n" (subscript_expression) " ret" (identifier) " " ([) " " (identifier) " re" (]) "t" ()) "u" (;) "r" (return_statement) " 1;\n}\nvoid pr" (return) " 1;\n}\n" (binary_expression) "oid p" (identifier) "o" (+) "d" (number_literal) "p" (;) "r" (}) "n" (function_definition) "(int a[])\n{\n for (int i = 0; i < 8; i++)\n printf("%d ", a[i]);\n printf("\n");\n}\nvoid quic" (primitive_type) "(int" (function_declarator) "a[])\n{\n for" (identifier) "a[])\n" (parameter_list) "{\n for" (() "{" (parameter_declaration) "\n fo" (primitive_type) "\n " (array_declarator) " fo" (identifier) " " ([) "f" (]) "o" ()) "r" (compound_statement) "(int i = 0; i < 8; i++)\n printf("%d ", a[i]);\n printf("\n");\n}\nvoid quic" ({) "(" (for_statement) " = 0; i < 8; i++)\n printf("%d ", a[i]);\n print" (for) " = " (() ";" (declaration) " i < 8; i+" (primitive_type) " i " (init_declarator) " 8; i" (identifier) " " (=) ";" (number_literal) "i" (;) "+" (binary_expression) ")\n " (identifier) ")" (<) " " (number_literal) " " (;) " " (update_expression) " " (identifier) " " (++) " " ()) "p" (expression_statement) " ", a[i]);\n print" (call_expression) " ", a[i]);\n prin" (identifier) " ", a" (argument_list) "[i]);\n prin" (() "[" (string_literal) "i]);\n " (") "i" (string_content) "]);\n" (") " " (,) " " (subscript_expression) " pri" (identifier) " " ([) "p" (identifier) "r" (]) "i" ()) "n" (;) "t" (expression_statement) "");\n}\nvoid qu" (call_expression) "");\n}\nvoid q" (identifier) "");\n}\n" (argument_list) "void q" (() "v" (string_literal) "oid " (") "o" (escape_sequence) "id" (") " " ()) "q" (;) "u" (}) "c" (function_definition) "sort(int a[], int start, int end)\n{\n int p;\n if (start < end)\n {\n p = partition(a, start, end);\n quicksort(a, start, p - 1);\n quicksort(a, p + 1, end);\n }\n}\nint main(" (primitive_type) "sort" (function_declarator) "int a[], int start, int end)\n{\n int" (identifier) "int a[], " (parameter_list) "int start, int end)\n{\n int" (() "i" (parameter_declaration) "nt star" (primitive_type) "nt " (array_declarator) "tar" (identifier) "t" ([) "a" (]) "r" (,) "t" (parameter_declaration) " int end)" (primitive_type) " in" (identifier) " end)" (,) "\n" (parameter_declaration) "\n in" (primitive_type) "\n " (identifier) " in" ()) "t" (compound_statement) "p;\n if (start < end)\n {\n p = partition(a, start, end);\n quicksort(a, start, p - 1);\n quicksort(a, p + 1, end);\n }\n}\nint main(" ({) "p" (declaration) " if (s" (primitive_type) " if" (identifier) "(" (;) "s" (if_statement) "< end)\n {\n p = partition(a, start, end);\n quicksort(a, start, p - 1);\n quicksort(a, p + 1, end);\n }\n}\nint mai" (if) "< " (parenthesized_expression) "nd)\n {\n " (() "n" (binary_expression) "d)\n {\n " (identifier) "d)\n " (<) " " (identifier) "\n " ()) " " (compound_statement) "p = partition(a, start, end);\n quicksort(a, start, p - 1);\n quicksort(a, p + 1, end);\n }\n}\nint mai" ({) "p" (expression_statement) "ion(a, start, end);\n q" (assignment_expression) "ion(a, start, end);\n " (identifier) "i" (=) "n" (call_expression) "a, start, end);\n " (identifier) "a, start," (argument_list) " end);\n " (() " " (identifier) "e" (,) "n" (identifier) ");\n " (,) " " (identifier) " " ()) " " (;) "q" (expression_statement) "a, start, p - 1);\n q" (call_expression) "a, start, p - 1);\n " (identifier) "a, start," (argument_list) " p - 1);\n " (() " " (identifier) "p" (,) " " (identifier) " 1);\n" (,) " " (binary_expression) " " (identifier) " " (-) " " (number_literal) " " ()) " " (;) "q" (expression_statement) "a, p + 1, end);\n }\n}\ni" (call_expression) "a, p + 1, end);\n }\n}\n" (identifier) "a, p + 1," (argument_list) " end);\n }\n}\n" (() " " (identifier) "e" (,) "n" (binary_expression) ");\n " (identifier) ")" (+) "\n" (number_literal) " " (,) " " (identifier) "}\n}" ()) "\n" (;) "i" (}) "i" (}) "(" (function_definition) "\n{\n int a[8] = {3, 9, 8, 1, 5, 6, 2, 5};\n //partition(a, 0, 7);\n quicksort(a, 0, 7);\n print(a);\n}" (primitive_type) "\n{\n" (function_declarator) " int" (identifier) " i" (parameter_list) "nt" (() "n" ()) "t" (compound_statement) "a[8] = {3, 9, 8, 1, 5, 6, 2, 5};\n //partition(a, 0, 7);\n quicksort(a, 0, 7);\n print(a);\n}" ({) "a" (declaration) " {3, 9, 8, 1, 5, 6, 2, 5};\n //par" (primitive_type) " {3" (init_declarator) " 9, 8, 1, 5, 6, 2, 5};\n //pa" (array_declarator) " 9, " (identifier) " " ([) "9" (number_literal) "," (]) " " (=) "," (initializer_list) "1, 5, 6, 2, 5};\n //pa" ({) "1" (number_literal) "," (,) " " (number_literal) "," (,) " " (number_literal) "," (,) " " (number_literal) "," (,) " " (number_literal) "}" (,) ";" (number_literal) " " (,) " " (number_literal) " " (,) "/" (number_literal) "p" (}) "a" (;) "r" (comment) "n(a, 0, 7);\n quick" (expression_statement) "a, 0, 7);\n print" (call_expression) "a, 0, 7);\n prin" (identifier) "a, 0, 7);" (argument_list) "\n prin" (() "\n" (identifier) " " (,) " " (number_literal) " " (,) "p" (number_literal) "i" ()) "n" (;) "t" (expression_statement) "}" (call_expression) "}" (identifier) "}" (argument_list) "" (() "" (identifier) "" ()) "" (;) "" (}) ""
391
2
{"language": "c", "success": true, "metadata": {"lines": 45, "avg_line_length": 16.58, "nodes": 207, "errors": 0, "source_hash": "c3634a1331e4bba87f9370a231d1951f27ec8e848f5f869d5685e45e0ea193a0", "categorized_nodes": 149}, "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": "function_definition", "text": "void swap(int &a, int &b)\n{\n int tmp;\n tmp = a;\n a = b;\n b = tmp;\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "void", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 4}}, {"id": 5, "type": "function_declarator", "text": "swap(int &a, int &b)", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 25}}, {"id": 6, "type": "identifier", "text": "swap", "parent": 5, "children": [], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 9}}, {"id": 7, "type": "parameter_list", "text": "(int &a, int &b)", "parent": 5, "children": [8, 11], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 25}}, {"id": 8, "type": "parameter_declaration", "text": "int &a", "parent": 7, "children": [9, 10], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 2, "column": 16}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 2, "column": 13}}, {"id": 10, "type": "identifier", "text": "a", "parent": 8, "children": [], "start_point": {"row": 2, "column": 15}, "end_point": {"row": 2, "column": 16}}, {"id": 11, "type": "parameter_declaration", "text": "int &b", "parent": 7, "children": [12, 13], "start_point": {"row": 2, "column": 18}, "end_point": {"row": 2, "column": 24}}, {"id": 12, "type": "primitive_type", "text": "int", "parent": 11, "children": [], "start_point": {"row": 2, "column": 18}, "end_point": {"row": 2, "column": 21}}, {"id": 13, "type": "identifier", "text": "b", "parent": 11, "children": [], "start_point": {"row": 2, "column": 23}, "end_point": {"row": 2, "column": 24}}, {"id": 14, "type": "declaration", "text": "int tmp;", "parent": 3, "children": [15, 16], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 12}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 7}}, {"id": 16, "type": "identifier", "text": "tmp", "parent": 14, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 11}}, {"id": 17, "type": "assignment_expression", "text": "tmp = a", "parent": 3, "children": [18, 19, 20], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 11}}, {"id": 18, "type": "identifier", "text": "tmp", "parent": 17, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 7}}, {"id": 19, "type": "=", "text": "=", "parent": 17, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 9}}, {"id": 20, "type": "identifier", "text": "a", "parent": 17, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 11}}, {"id": 21, "type": "assignment_expression", "text": "a = b", "parent": 3, "children": [22, 23, 24], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 9}}, {"id": 22, "type": "identifier", "text": "a", "parent": 21, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 5}}, {"id": 23, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 7}}, {"id": 24, "type": "identifier", "text": "b", "parent": 21, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 9}}, {"id": 25, "type": "assignment_expression", "text": "b = tmp", "parent": 3, "children": [26, 27, 28], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 11}}, {"id": 26, "type": "identifier", "text": "b", "parent": 25, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 5}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 7}}, {"id": 28, "type": "identifier", "text": "tmp", "parent": 25, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 11}}, {"id": 29, "type": "function_definition", "text": "int partition(int a[], int start, int end)\n{\n int i, j;\n int tmp, x;\n x = a[end]; //\u6309x\u5206\u5272\u5143\u7d20\n i = start - 1;\n for (j = start; j < end; j++)\n {\n if (a[j] <= x)\n swap(a[++i], a[j]);\n }\n swap(a[i + 1], a[end]);\n return i + 1;\n}\nvoid prin", "parent": null, "children": [30, 31], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 30, "type": "primitive_type", "text": "int", "parent": 29, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 3}}, {"id": 31, "type": "function_declarator", "text": "partition(int a[], int start, int end)", "parent": 29, "children": [32, 33], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 42}}, {"id": 32, "type": "identifier", "text": "partition", "parent": 31, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 13}}, {"id": 33, "type": "parameter_list", "text": "(int a[], int start, int end)", "parent": 31, "children": [34, 38, 41], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 42}}, {"id": 34, "type": "parameter_declaration", "text": "int a[]", "parent": 33, "children": [35, 36], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 21}}, {"id": 35, "type": "primitive_type", "text": "int", "parent": 34, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 17}}, {"id": 36, "type": "array_declarator", "text": "a[]", "parent": 34, "children": [37], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 21}}, {"id": 37, "type": "identifier", "text": "a", "parent": 36, "children": [], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 19}}, {"id": 38, "type": "parameter_declaration", "text": "int start", "parent": 33, "children": [39, 40], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 32}}, {"id": 39, "type": "primitive_type", "text": "int", "parent": 38, "children": [], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 26}}, {"id": 40, "type": "identifier", "text": "start", "parent": 38, "children": [], "start_point": {"row": 9, "column": 27}, "end_point": {"row": 9, "column": 32}}, {"id": 41, "type": "parameter_declaration", "text": "int end", "parent": 33, "children": [42], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 41}}, {"id": 42, "type": "primitive_type", "text": "int", "parent": 41, "children": [], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 37}}, {"id": 43, "type": "declaration", "text": "int i, j;", "parent": 29, "children": [44, 45, 46], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 13}}, {"id": 44, "type": "primitive_type", "text": "int", "parent": 43, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 7}}, {"id": 45, "type": "identifier", "text": "i", "parent": 43, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 9}}, {"id": 46, "type": "identifier", "text": "j", "parent": 43, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 12}}, {"id": 47, "type": "declaration", "text": "int tmp, x;", "parent": 29, "children": [48, 49, 50], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 15}}, {"id": 48, "type": "primitive_type", "text": "int", "parent": 47, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 7}}, {"id": 49, "type": "identifier", "text": "tmp", "parent": 47, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 11}}, {"id": 50, "type": "identifier", "text": "x", "parent": 47, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 14}}, {"id": 51, "type": "assignment_expression", "text": "x = a[end]", "parent": 29, "children": [52, 53, 54], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 14}}, {"id": 52, "type": "identifier", "text": "x", "parent": 51, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 5}}, {"id": 53, "type": "=", "text": "=", "parent": 51, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 7}}, {"id": 54, "type": "subscript_expression", "text": "a[end]", "parent": 51, "children": [55], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 14}}, {"id": 55, "type": "identifier", "text": "a", "parent": 54, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 9}}, {"id": 56, "type": "assignment_expression", "text": "- 1;\n for ", "parent": 29, "children": [57, 58], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 17}}, {"id": 57, "type": "identifier", "text": "-", "parent": 56, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 5}}, {"id": 58, "type": "=", "text": "1", "parent": 56, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 7}}, {"id": 59, "type": "identifier", "text": "\n ", "parent": 56, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 13}}, {"id": 60, "type": "-", "text": "o", "parent": 56, "children": [], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 15}}, {"id": 61, "type": "number_literal", "text": " ", "parent": 56, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 17}}, {"id": 62, "type": "for_statement", "text": "tart; j < end; j++)\n {\n if (a[j] <= x)\n swap(a[++i], a[j]);\n }\n swap(", "parent": 29, "children": [63, 67, 70], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 19, "column": 5}}, {"id": 63, "type": "assignment_expression", "text": " j < end;", "parent": 62, "children": [64, 65, 66], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 18}}, {"id": 64, "type": "identifier", "text": " ", "parent": 63, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 10}}, {"id": 65, "type": "=", "text": " ", "parent": 63, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 12}}, {"id": 66, "type": "identifier", "text": " end;", "parent": 63, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 18}}, {"id": 67, "type": "binary_expression", "text": "++)\n ", "parent": 62, "children": [68, 69], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 27}}, {"id": 68, "type": "identifier", "text": "+", "parent": 67, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 21}}, {"id": 69, "type": "identifier", "text": " ", "parent": 67, "children": [], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 27}}, {"id": 70, "type": "update_expression", "text": "\n ", "parent": 62, "children": [71, 72], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 32}}, {"id": 71, "type": "identifier", "text": "\n", "parent": 70, "children": [], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 30}}, {"id": 72, "type": "++", "text": " ", "parent": 70, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 32}}, {"id": 73, "type": "if_statement", "text": "= x)\n swap(a[++i], a[j]);\n }\n ", "parent": 62, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 18, "column": 31}}, {"id": 74, "type": "binary_expression", "text": "\n ", "parent": 73, "children": [75, 78, 79], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 21}}, {"id": 75, "type": "subscript_expression", "text": "\n ", "parent": 74, "children": [76, 77], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 16}}, {"id": 76, "type": "identifier", "text": "\n", "parent": 75, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 13}}, {"id": 77, "type": "identifier", "text": " ", "parent": 75, "children": [], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 15}}, {"id": 78, "type": "<=", "text": " ", "parent": 74, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 19}}, {"id": 79, "type": "identifier", "text": " ", "parent": 74, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 21}}, {"id": 80, "type": "call_expression", "text": "], a[j]);\n }\n ", "parent": 73, "children": [81, 82], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 30}}, {"id": 81, "type": "identifier", "text": "], a", "parent": 80, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 16}}, {"id": 82, "type": "argument_list", "text": "[j]);\n }\n ", "parent": 80, "children": [83], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 30}}, {"id": 83, "type": "subscript_expression", "text": "j]);\n ", "parent": 82, "children": [84, 85], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 23}}, {"id": 84, "type": "identifier", "text": "j", "parent": 83, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 18}}, {"id": 85, "type": "update_expression", "text": ");\n", "parent": 83, "children": [86, 87], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 22}}, {"id": 86, "type": "++", "text": ");", "parent": 85, "children": [], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 21}}, {"id": 87, "type": "identifier", "text": "\n", "parent": 85, "children": [], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 22}}, {"id": 88, "type": "identifier", "text": " ", "parent": 82, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 26}}, {"id": 89, "type": "identifier", "text": "\n", "parent": 82, "children": [], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 28}}, {"id": 90, "type": "call_expression", "text": " 1], a[end]);\n retu", "parent": 29, "children": [91, 92], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 26}}, {"id": 91, "type": "identifier", "text": " 1],", "parent": 90, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 8}}, {"id": 92, "type": "argument_list", "text": " a[end]);\n retu", "parent": 90, "children": [93, 98], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 26}}, {"id": 93, "type": "subscript_expression", "text": "a[end]);", "parent": 92, "children": [94, 95], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 17}}, {"id": 94, "type": "identifier", "text": "a", "parent": 93, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 10}}, {"id": 95, "type": "binary_expression", "text": "end])", "parent": 93, "children": [96, 97], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 16}}, {"id": 96, "type": "identifier", "text": "e", "parent": 95, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 12}}, {"id": 97, "type": "+", "text": "d", "parent": 95, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 14}}, {"id": 98, "type": "subscript_expression", "text": " ret", "parent": 92, "children": [99, 100], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 25}}, {"id": 99, "type": "identifier", "text": " ", "parent": 98, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 20}}, {"id": 100, "type": "identifier", "text": " re", "parent": 98, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 24}}, {"id": 101, "type": "return_statement", "text": " 1;\n}\nvoid pr", "parent": 29, "children": [102], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 17}}, {"id": 102, "type": "binary_expression", "text": "oid p", "parent": 101, "children": [103, 104, 105], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 16}}, {"id": 103, "type": "identifier", "text": "o", "parent": 102, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 12}}, {"id": 104, "type": "+", "text": "d", "parent": 102, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 14}}, {"id": 105, "type": "number_literal", "text": "p", "parent": 102, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 16}}, {"id": 106, "type": "function_definition", "text": "(int a[])\n{\n for (int i = 0; i < 8; i++)\n printf(\"%d \", a[i]);\n printf(\"\\n\");\n}\nvoid quic", "parent": null, "children": [107, 108], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 107, "type": "primitive_type", "text": "(int", "parent": 106, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 4}}, {"id": 108, "type": "function_declarator", "text": "a[])\n{\n for", "parent": 106, "children": [109, 110], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 19}}, {"id": 109, "type": "identifier", "text": "a[])\n", "parent": 108, "children": [], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 10}}, {"id": 110, "type": "parameter_list", "text": "{\n for", "parent": 108, "children": [111], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 19}}, {"id": 111, "type": "parameter_declaration", "text": "\n fo", "parent": 110, "children": [112, 113], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 18}}, {"id": 112, "type": "primitive_type", "text": "\n ", "parent": 111, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 14}}, {"id": 113, "type": "array_declarator", "text": " fo", "parent": 111, "children": [114], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 18}}, {"id": 114, "type": "identifier", "text": " ", "parent": 113, "children": [], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 16}}, {"id": 115, "type": "for_statement", "text": " = 0; i < 8; i++)\n printf(\"%d \", a[i]);\n print", "parent": 106, "children": [116, 123], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 26, "column": 29}}, {"id": 116, "type": "declaration", "text": " i < 8; i+", "parent": 115, "children": [117, 118], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 19}}, {"id": 117, "type": "primitive_type", "text": " i ", "parent": 116, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 12}}, {"id": 118, "type": "init_declarator", "text": " 8; i", "parent": 116, "children": [119, 120], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 18}}, {"id": 119, "type": "identifier", "text": " ", "parent": 118, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 14}}, {"id": 120, "type": "number_literal", "text": "i", "parent": 118, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 18}}, {"id": 121, "type": "<", "text": " ", "parent": 115, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 23}}, {"id": 122, "type": "number_literal", "text": " ", "parent": 115, "children": [], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 25}}, {"id": 123, "type": "update_expression", "text": " ", "parent": 115, "children": [124, 125], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 30}}, {"id": 124, "type": "identifier", "text": " ", "parent": 123, "children": [], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 28}}, {"id": 125, "type": "++", "text": " ", "parent": 123, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 30}}, {"id": 126, "type": "call_expression", "text": " \", a[i]);\n prin", "parent": 115, "children": [127, 128], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 28}}, {"id": 127, "type": "identifier", "text": " \", a", "parent": 126, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 14}}, {"id": 128, "type": "argument_list", "text": "[i]);\n prin", "parent": 126, "children": [129, 130], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 28}}, {"id": 129, "type": "string_literal", "text": "i]);\n ", "parent": 128, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 21}}, {"id": 130, "type": "subscript_expression", "text": " pri", "parent": 128, "children": [131, 132], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 27}}, {"id": 131, "type": "identifier", "text": " ", "parent": 130, "children": [], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 24}}, {"id": 132, "type": "identifier", "text": "r", "parent": 130, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 26}}, {"id": 133, "type": "call_expression", "text": "\");\n}\nvoid q", "parent": 106, "children": [134, 135], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 16}}, {"id": 134, "type": "identifier", "text": "\");\n}\n", "parent": 133, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 10}}, {"id": 135, "type": "argument_list", "text": "void q", "parent": 133, "children": [136], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 16}}, {"id": 136, "type": "string_literal", "text": "oid ", "parent": 135, "children": [137], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 15}}, {"id": 137, "type": "escape_sequence", "text": "id", "parent": 136, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 14}}, {"id": 138, "type": "function_definition", "text": "sort(int a[], int start, int end)\n{\n int p;\n if (start < end)\n {\n p = partition(a, start, end);\n quicksort(a, start, p - 1);\n quicksort(a, p + 1, end);\n }\n}\nint main(", "parent": null, "children": [139, 140], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 139, "type": "primitive_type", "text": "sort", "parent": 138, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 4}}, {"id": 140, "type": "function_declarator", "text": "int a[], int start, int end)\n{\n int", "parent": 138, "children": [141, 142], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 43}}, {"id": 141, "type": "identifier", "text": "int a[], ", "parent": 140, "children": [], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 14}}, {"id": 142, "type": "parameter_list", "text": "int start, int end)\n{\n int", "parent": 140, "children": [143, 147, 150], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 43}}, {"id": 143, "type": "parameter_declaration", "text": "nt star", "parent": 142, "children": [144, 145], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 22}}, {"id": 144, "type": "primitive_type", "text": "nt ", "parent": 143, "children": [], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 18}}, {"id": 145, "type": "array_declarator", "text": "tar", "parent": 143, "children": [146], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 22}}, {"id": 146, "type": "identifier", "text": "t", "parent": 145, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 20}}, {"id": 147, "type": "parameter_declaration", "text": " int end)", "parent": 142, "children": [148, 149], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 33}}, {"id": 148, "type": "primitive_type", "text": " in", "parent": 147, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 27}}, {"id": 149, "type": "identifier", "text": " end)", "parent": 147, "children": [], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 33}}, {"id": 150, "type": "parameter_declaration", "text": "\n in", "parent": 142, "children": [151, 152], "start_point": {"row": 29, "column": 35}, "end_point": {"row": 29, "column": 42}}, {"id": 151, "type": "primitive_type", "text": "\n ", "parent": 150, "children": [], "start_point": {"row": 29, "column": 35}, "end_point": {"row": 29, "column": 38}}, {"id": 152, "type": "identifier", "text": " in", "parent": 150, "children": [], "start_point": {"row": 29, "column": 39}, "end_point": {"row": 29, "column": 42}}, {"id": 153, "type": "declaration", "text": " if (s", "parent": 138, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 10}}, {"id": 154, "type": "if_statement", "text": "< end)\n {\n p = partition(a, start, end);\n quicksort(a, start, p - 1);\n quicksort(a, p + 1, end);\n }\n}\nint mai", "parent": 138, "children": [155], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 37, "column": 5}}, {"id": 155, "type": "parenthesized_expression", "text": "nd)\n {\n ", "parent": 154, "children": [156], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 20}}, {"id": 156, "type": "binary_expression", "text": "d)\n {\n ", "parent": 155, "children": [157, 158, 159], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 19}}, {"id": 157, "type": "identifier", "text": "d)\n ", "parent": 156, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 13}}, {"id": 158, "type": "<", "text": " ", "parent": 156, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 15}}, {"id": 159, "type": "identifier", "text": "\n ", "parent": 156, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 19}}, {"id": 160, "type": "assignment_expression", "text": "ion(a, start, end);\n ", "parent": 154, "children": [161, 162, 163], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 36}}, {"id": 161, "type": "identifier", "text": "i", "parent": 160, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 9}}, {"id": 162, "type": "=", "text": "n", "parent": 160, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 11}}, {"id": 163, "type": "call_expression", "text": "a, start, end);\n ", "parent": 160, "children": [164, 165], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 36}}, {"id": 164, "type": "identifier", "text": "a, start,", "parent": 163, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 21}}, {"id": 165, "type": "argument_list", "text": " end);\n ", "parent": 163, "children": [166, 167, 168], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 36}}, {"id": 166, "type": "identifier", "text": "e", "parent": 165, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 23}}, {"id": 167, "type": "identifier", "text": ");\n ", "parent": 165, "children": [], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 30}}, {"id": 168, "type": "identifier", "text": " ", "parent": 165, "children": [], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 35}}, {"id": 169, "type": "call_expression", "text": "a, start, p - 1);\n ", "parent": 154, "children": [170, 171], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 34}}, {"id": 170, "type": "identifier", "text": "a, start,", "parent": 169, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 17}}, {"id": 171, "type": "argument_list", "text": " p - 1);\n ", "parent": 169, "children": [172, 173, 174], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 34}}, {"id": 172, "type": "identifier", "text": "p", "parent": 171, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 19}}, {"id": 173, "type": "identifier", "text": " 1);\n", "parent": 171, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 26}}, {"id": 174, "type": "binary_expression", "text": " ", "parent": 171, "children": [175, 176, 177], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 33}}, {"id": 175, "type": "identifier", "text": " ", "parent": 174, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 29}}, {"id": 176, "type": "-", "text": " ", "parent": 174, "children": [], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 31}}, {"id": 177, "type": "number_literal", "text": " ", "parent": 174, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 33}}, {"id": 178, "type": "call_expression", "text": "a, p + 1, end);\n }\n}\n", "parent": 154, "children": [179, 180], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 32}}, {"id": 179, "type": "identifier", "text": "a, p + 1,", "parent": 178, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 17}}, {"id": 180, "type": "argument_list", "text": " end);\n }\n}\n", "parent": 178, "children": [181, 182, 185], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 32}}, {"id": 181, "type": "identifier", "text": "e", "parent": 180, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 19}}, {"id": 182, "type": "binary_expression", "text": ");\n ", "parent": 180, "children": [183, 184], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 26}}, {"id": 183, "type": "+", "text": "\n", "parent": 182, "children": [], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 24}}, {"id": 184, "type": "number_literal", "text": " ", "parent": 182, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 26}}, {"id": 185, "type": "identifier", "text": "}\n}", "parent": 180, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 31}}, {"id": 186, "type": "function_definition", "text": "\n{\n int a[8] = {3, 9, 8, 1, 5, 6, 2, 5};\n //partition(a, 0, 7);\n quicksort(a, 0, 7);\n print(a);\n}", "parent": null, "children": [187], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 187, "type": "function_declarator", "text": " int", "parent": 186, "children": [188, 189], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 10}}, {"id": 188, "type": "identifier", "text": " i", "parent": 187, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 8}}, {"id": 189, "type": "parameter_list", "text": "nt", "parent": 187, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 10}}, {"id": 190, "type": "declaration", "text": " {3, 9, 8, 1, 5, 6, 2, 5};\n //par", "parent": 186, "children": [191, 192], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 40}}, {"id": 191, "type": "primitive_type", "text": " {3", "parent": 190, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 7}}, {"id": 192, "type": "init_declarator", "text": " 9, 8, 1, 5, 6, 2, 5};\n //pa", "parent": 190, "children": [193, 195], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 39}}, {"id": 193, "type": "array_declarator", "text": " 9, ", "parent": 192, "children": [194], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 12}}, {"id": 194, "type": "identifier", "text": " ", "parent": 193, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 9}}, {"id": 195, "type": "initializer_list", "text": "1, 5, 6, 2, 5};\n //pa", "parent": 192, "children": [196, 197, 198], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 39}}, {"id": 196, "type": "number_literal", "text": " ", "parent": 195, "children": [], "start_point": {"row": 41, "column": 31}, "end_point": {"row": 41, "column": 32}}, {"id": 197, "type": "number_literal", "text": " ", "parent": 195, "children": [], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 35}}, {"id": 198, "type": "number_literal", "text": "p", "parent": 195, "children": [], "start_point": {"row": 41, "column": 37}, "end_point": {"row": 41, "column": 38}}, {"id": 199, "type": "call_expression", "text": "a, 0, 7);\n prin", "parent": 186, "children": [200, 201], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 22}}, {"id": 200, "type": "identifier", "text": "a, 0, 7);", "parent": 199, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 13}}, {"id": 201, "type": "argument_list", "text": "\n prin", "parent": 199, "children": [202, 203, 204], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 22}}, {"id": 202, "type": "identifier", "text": " ", "parent": 201, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 15}}, {"id": 203, "type": "number_literal", "text": " ", "parent": 201, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 18}}, {"id": 204, "type": "number_literal", "text": "i", "parent": 201, "children": [], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 21}}, {"id": 205, "type": "argument_list", "text": "", "parent": 186, "children": [206], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 12}}, {"id": 206, "type": "identifier", "text": "", "parent": 205, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 11}}]}, "node_categories": {"declarations": {"functions": [3, 5, 29, 31, 106, 108, 138, 140, 186, 187], "variables": [8, 11, 14, 34, 38, 41, 43, 47, 111, 116, 143, 147, 150, 153, 190], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [54, 67, 70, 74, 75, 80, 83, 85, 90, 93, 95, 98, 102, 123, 126, 130, 133, 155, 156, 163, 169, 174, 178, 182, 199], "assignments": [17, 21, 25, 51, 56, 63, 160], "loops": [62, 115], "conditionals": [6, 10, 13, 16, 18, 20, 22, 24, 26, 28, 32, 37, 40, 45, 46, 49, 50, 52, 55, 57, 59, 64, 66, 68, 69, 71, 73, 76, 77, 79, 81, 84, 87, 88, 89, 91, 94, 96, 99, 100, 103, 109, 114, 119, 124, 127, 131, 132, 134, 141, 146, 149, 152, 154, 157, 159, 161, 164, 166, 167, 168, 170, 172, 173, 175, 179, 181, 185, 188, 194, 200, 202, 206], "returns": [101], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 61, 105, 120, 122, 129, 136, 177, 184, 196, 197, 198, 203, 204], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "swap", "text_snippet": "void swap(int &a, int &b)\n{\n int tmp;\n tmp = a;\n a = b;\n b = tmp;\n}"}, {"node_id": 5, "universal_type": "function", "name": "&b)", "text_snippet": "swap(int &a, int &b)"}, {"node_id": 29, "universal_type": "function", "name": "partition", "text_snippet": "int partition(int a[], int start, int end)\n{\n int i, j;\n int tmp, x;\n x = a[end]; //\u6309x\u5206\u5272\u5143\u7d20\n"}, {"node_id": 31, "universal_type": "function", "name": "start,", "text_snippet": "partition(int a[], int start, int end)"}, {"node_id": 106, "universal_type": "function", "name": "quic", "text_snippet": "(int a[])\n{\n for (int i = 0; i < 8; i++)\n printf(\"%d \", a[i]);\n printf(\"\\n\");\n}\nvoid q"}, {"node_id": 108, "universal_type": "function", "name": "unknown", "text_snippet": "a[])\n{\n for"}, {"node_id": 138, "universal_type": "function", "name": "start,", "text_snippet": "sort(int a[], int start, int end)\n{\n int p;\n if (start < end)\n {\n p = partition(a, s"}, {"node_id": 140, "universal_type": "function", "name": "a[],", "text_snippet": "int a[], int start, int end)\n{\n int"}, {"node_id": 186, "universal_type": "function", "name": "a[8]", "text_snippet": "\n{\n int a[8] = {3, 9, 8, 1, 5, 6, 2, 5};\n //partition(a, 0, 7);\n quicksort(a, 0, 7);\n pr"}, {"node_id": 187, "universal_type": "function", "name": "unknown", "text_snippet": " int"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n\nvoid swap(int &a, int &b)\n{\n int tmp;\n tmp = a;\n a = b;\n b = tmp;\n}\nint partition(int a[], int start, int end)\n{\n int i, j;\n int tmp, x;\n x = a[end]; //\u6309x\u5206\u5272\u5143\u7d20\n i = start - 1;\n for (j = start; j < end; j++)\n {\n if (a[j] <= x)\n swap(a[++i], a[j]);\n }\n swap(a[i + 1], a[end]);\n return i + 1;\n}\nvoid print(int a[])\n{\n for (int i = 0; i < 8; i++)\n printf(\"%d \", a[i]);\n printf(\"\\n\");\n}\nvoid quicksort(int a[], int start, int end)\n{\n int p;\n if (start < end)\n {\n p = partition(a, start, end);\n quicksort(a, start, p - 1);\n quicksort(a, p + 1, end);\n }\n}\nint main()\n{\n int a[8] = {3, 9, 8, 1, 5, 6, 2, 5};\n //partition(a, 0, 7);\n quicksort(a, 0, 7);\n print(a);\n}"}
389
c
// // UICollectionView+PASExtras.h // ProatomicCore // // Created by <NAME> on 5/13/16. // Copyright © 2016 Property Atomic Strong SAC. All rights reserved. // @import UIKit; @interface UICollectionView (PASExtras) /** This method retrieves the indexPath from the cell which contains an specific UIView. @param view - specified view @return NSIndexPath */ - (NSIndexPath *)indexPathForItemContainingView:(UIView *)view; - (UICollectionViewFlowLayout *)collectionViewFlowLayout; @end
26.39
18
(translation_unit) "//\n// UICollectionView+PASExtras.h\n// ProatomicCore\n//\n// Created by <NAME> on 5/13/16.\n// Copyright © 2016 Property Atomic Strong SAC. All rights reserved.\n//\n\n@import UIKit;\n\n@interface UICollectionView (PASExtras)\n\n/**\n This method retrieves the indexPath from the cell which contains an specific UIView.\n \n @param view - specified view\n @return NSIndexPath\n */\n- (NSIndexPath *)indexPathForItemContainingView:(UIView *)view;\n\n- (UICollectionViewFlowLayout *)collectionViewFlowLayout;\n\n@end\n\n" (comment) "//" (comment) "// UICollectionView+PASExtras.h" (comment) "// ProatomicCore" (comment) "//" (comment) "// Created by <NAME> on 5/13/16." (comment) "// Copyright © 2016 Property Atomic Strong SAC. All rights reserved.\n" (comment) "/\n" (ERROR) "i" (ERROR) "i" (declaration) "mport UIKit;\n" (type_identifier) "mport " (identifier) "IKit;" (;) "\n" (ERROR) "interface UICollectionView (PASExtras)\n" (ERROR) "i" (type_identifier) "nterface " (function_declarator) "ICollectionView (PASExtras)\n" (identifier) "ICollectionView " (parameter_list) "PASExtras)\n" (() "P" (identifier) "ASExtras)" ()) "\n" (comment) "**\n This method retrieves the indexPath from the cell which contains an specific UIView.\n \n @param view - specified view\n @return NSIndexPath\n */\n" (expression_statement) " (NSIndexPath *)indexPathForItemContainingView:(UIView *)view;\n" (update_expression) " (NSIndexPath *)indexPathForItemContainingView:(UIView *)view;" (binary_expression) " (NSIndexPath *)indexPathForItemContainingView:(UIView *)view;" (unary_expression) " (NSIndexPath *)indexPathForItemContainingView:" (-) " " (cast_expression) "NSIndexPath *)indexPathForItemContainingView:" (() "N" (type_descriptor) "SIndexPath *)" (type_identifier) "SIndexPath " (abstract_pointer_declarator) ")" (*) ")" ()) "i" (identifier) "ndexPathForItemContainingView:" (ERROR) "(UIView " (:) "(" (() "U" (identifier) "IView " (*) ")" (ERROR) "v" ()) "v" (identifier) "iew;" (--) "" (;) "\n" (expression_statement) " (UICollectionViewFlowLayout *)collectionViewFlowLayout;\n" (unary_expression) " (UICollectionViewFlowLayout *)collectionViewFlowLayout;" (-) " " (cast_expression) "UICollectionViewFlowLayout *)collectionViewFlowLayout;" (() "U" (type_descriptor) "ICollectionViewFlowLayout *)" (type_identifier) "ICollectionViewFlowLayout " (abstract_pointer_declarator) ")" (*) ")" ()) "c" (identifier) "ollectionViewFlowLayout;" (;) "\n" (ERROR) "e" (ERROR) "e" (expression_statement) "nd\n" (identifier) "nd\n" (;) ""
64
8
{"language": "c", "success": true, "metadata": {"lines": 18, "avg_line_length": 26.39, "nodes": 34, "errors": 0, "source_hash": "2afa76133de392134d09bf09e2ad218c02f75b33925f31198f9f2d791becdb69", "categorized_nodes": 20}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "ERROR", "text": "i", "parent": null, "children": [1], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 1, "type": "ERROR", "text": "i", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 2, "type": "declaration", "text": "mport UIKit;\n", "parent": null, "children": [3, 4], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 14}}, {"id": 3, "type": "type_identifier", "text": "mport ", "parent": 2, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 7}}, {"id": 4, "type": "identifier", "text": "IKit;", "parent": 2, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 13}}, {"id": 5, "type": "ERROR", "text": "interface UICollectionView (PASExtras)\n", "parent": null, "children": [6, 7, 8], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 39}}, {"id": 6, "type": "ERROR", "text": "i", "parent": 5, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "nterface ", "parent": 5, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 8, "type": "function_declarator", "text": "ICollectionView (PASExtras)\n", "parent": 5, "children": [9, 10], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 39}}, {"id": 9, "type": "identifier", "text": "ICollectionView ", "parent": 8, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 27}}, {"id": 10, "type": "parameter_list", "text": "PASExtras)\n", "parent": 8, "children": [11], "start_point": {"row": 10, "column": 28}, "end_point": {"row": 10, "column": 39}}, {"id": 11, "type": "identifier", "text": "ASExtras)", "parent": 10, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 38}}, {"id": 12, "type": "update_expression", "text": " (NSIndexPath *)indexPathForItemContainingView:(UIView *)view;", "parent": null, "children": [13, 24], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 62}}, {"id": 13, "type": "binary_expression", "text": " (NSIndexPath *)indexPathForItemContainingView:(UIView *)view;", "parent": 12, "children": [14, 20, 22, 23], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 62}}, {"id": 14, "type": "unary_expression", "text": " (NSIndexPath *)indexPathForItemContainingView:", "parent": 13, "children": [15, 16], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 47}}, {"id": 15, "type": "-", "text": " ", "parent": 14, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 16, "type": "cast_expression", "text": "NSIndexPath *)indexPathForItemContainingView:", "parent": 14, "children": [17, 19], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 47}}, {"id": 17, "type": "type_descriptor", "text": "SIndexPath *)", "parent": 16, "children": [18], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 16}}, {"id": 18, "type": "type_identifier", "text": "SIndexPath ", "parent": 17, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 14}}, {"id": 19, "type": "identifier", "text": "ndexPathForItemContainingView:", "parent": 16, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 47}}, {"id": 20, "type": "ERROR", "text": "(UIView ", "parent": 13, "children": [21], "start_point": {"row": 18, "column": 47}, "end_point": {"row": 18, "column": 55}}, {"id": 21, "type": "identifier", "text": "IView ", "parent": 20, "children": [], "start_point": {"row": 18, "column": 49}, "end_point": {"row": 18, "column": 55}}, {"id": 22, "type": "ERROR", "text": "v", "parent": 13, "children": [], "start_point": {"row": 18, "column": 57}, "end_point": {"row": 18, "column": 58}}, {"id": 23, "type": "identifier", "text": "iew;", "parent": 13, "children": [], "start_point": {"row": 18, "column": 58}, "end_point": {"row": 18, "column": 62}}, {"id": 24, "type": "--", "text": "", "parent": 12, "children": [], "start_point": {"row": 18, "column": 62}, "end_point": {"row": 18, "column": 62}}, {"id": 25, "type": "unary_expression", "text": " (UICollectionViewFlowLayout *)collectionViewFlowLayout;", "parent": null, "children": [26, 27], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 56}}, {"id": 26, "type": "-", "text": " ", "parent": 25, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 27, "type": "cast_expression", "text": "UICollectionViewFlowLayout *)collectionViewFlowLayout;", "parent": 25, "children": [28, 30], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 56}}, {"id": 28, "type": "type_descriptor", "text": "ICollectionViewFlowLayout *)", "parent": 27, "children": [29], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 31}}, {"id": 29, "type": "type_identifier", "text": "ICollectionViewFlowLayout ", "parent": 28, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 29}}, {"id": 30, "type": "identifier", "text": "ollectionViewFlowLayout;", "parent": 27, "children": [], "start_point": {"row": 20, "column": 32}, "end_point": {"row": 20, "column": 56}}, {"id": 31, "type": "ERROR", "text": "e", "parent": null, "children": [32], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 32, "type": "ERROR", "text": "e", "parent": 31, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 33, "type": "identifier", "text": "nd\n", "parent": null, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 4}}]}, "node_categories": {"declarations": {"functions": [8], "variables": [2], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [12, 13, 14, 16, 25, 27], "assignments": [], "loops": [], "conditionals": [3, 4, 7, 9, 11, 18, 19, 21, 23, 29, 30, 33], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "ICollectionView (PASExtras)\n"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// UICollectionView+PASExtras.h\n// ProatomicCore\n//\n// Created by <NAME> on 5/13/16.\n// Copyright \u00a9 2016 Property Atomic Strong SAC. All rights reserved.\n//\n\n@import UIKit;\n\n@interface UICollectionView (PASExtras)\n\n/**\n This method retrieves the indexPath from the cell which contains an specific UIView.\n \n @param view - specified view\n @return NSIndexPath\n */\n- (NSIndexPath *)indexPathForItemContainingView:(UIView *)view;\n\n- (UICollectionViewFlowLayout *)collectionViewFlowLayout;\n\n@end\n\n"}
390
c
#include<stdio.h> void main() { int a[50],i,j,n; printf("\n\n Sorting An Array \n\n"); printf(" Enter Number Of Elements : "); scanf("%d",&n); printf("\n\n Creating The Array \n\n"); for(i = 0 ; i < n ; i++) { printf("\n Enter Value : "); scanf("%d",&a[i]); } printf("\n\n The Entered Array Is \n\n"); for(i = 0 ; i < n ; i++) { printf("\n %d ",a[i]); } printf("\n\n Array After Sorting In Ascending Order \n\n"); for(i = 0 ; i < n-1 ; i++) { for(j = 0 ;j < n - i -1 ; j++) { if(a[j] > a[j+1]) { int temp = a[j]; a[j] = a[j + 1]; a[j + 1] = temp; } } } for(i = 0 ; i < n ; i++) { printf("\n %d ",a[i]); } printf("\n\n"); }
19.46
39
(translation_unit) "#include<stdio.h> \n \nvoid main() \n{ \n int a[50],i,j,n; \n printf("\n\n Sorting An Array \n\n"); \n printf(" Enter Number Of Elements : "); \n scanf("%d",&n); \n printf("\n\n Creating The Array \n\n"); \n for(i = 0 ; i < n ; i++) \n { \n printf("\n Enter Value : "); \n scanf("%d",&a[i]); \n } \n printf("\n\n The Entered Array Is \n\n"); \n for(i = 0 ; i < n ; i++) \n { \n printf("\n %d ",a[i]); \n } \n printf("\n\n Array After Sorting In Ascending Order \n\n"); \n for(i = 0 ; i < n-1 ; i++) \n { \n for(j = 0 ;j < n - i -1 ; j++) \n { \n if(a[j] > a[j+1]) \n { \n int temp = a[j]; \n a[j] = a[j + 1]; \n a[j + 1] = temp; \n } \n } \n } \n for(i = 0 ; i < n ; i++) \n { \n printf("\n %d ",a[i]); \n } \n printf("\n\n"); \n \n}" (preproc_include) "#include<stdio.h> \n" (#include) "#include" (system_lib_string) "<stdio.h>" (function_definition) "void main() \n{ \n int a[50],i,j,n; \n printf("\n\n Sorting An Array \n\n"); \n printf(" Enter Number Of Elements : "); \n scanf("%d",&n); \n printf("\n\n Creating The Array \n\n"); \n for(i = 0 ; i < n ; i++) \n { \n printf("\n Enter Value : "); \n scanf("%d",&a[i]); \n } \n printf("\n\n The Entered Array Is \n\n"); \n for(i = 0 ; i < n ; i++) \n { \n printf("\n %d ",a[i]); \n } \n printf("\n\n Array After Sorting In Ascending Order \n\n"); \n for(i = 0 ; i < n-1 ; i++) \n { \n for(j = 0 ;j < n - i -1 ; j++) \n { \n if(a[j] > a[j+1]) \n { \n int temp = a[j]; \n a[j] = a[j + 1]; \n a[j + 1] = temp; \n } \n } \n } \n for(i = 0 ; i < n ; i++) \n { \n printf("\n %d ",a[i]); \n } \n printf("\n\n"); \n \n}" (primitive_type) "void" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ \n int a[50],i,j,n; \n printf("\n\n Sorting An Array \n\n"); \n printf(" Enter Number Of Elements : "); \n scanf("%d",&n); \n printf("\n\n Creating The Array \n\n"); \n for(i = 0 ; i < n ; i++) \n { \n printf("\n Enter Value : "); \n scanf("%d",&a[i]); \n } \n printf("\n\n The Entered Array Is \n\n"); \n for(i = 0 ; i < n ; i++) \n { \n printf("\n %d ",a[i]); \n } \n printf("\n\n Array After Sorting In Ascending Order \n\n"); \n for(i = 0 ; i < n-1 ; i++) \n { \n for(j = 0 ;j < n - i -1 ; j++) \n { \n if(a[j] > a[j+1]) \n { \n int temp = a[j]; \n a[j] = a[j + 1]; \n a[j + 1] = temp; \n } \n } \n } \n for(i = 0 ; i < n ; i++) \n { \n printf("\n %d ",a[i]); \n } \n printf("\n\n"); \n \n}" ({) "{" (declaration) "int a[50],i,j,n;" (primitive_type) "int" (array_declarator) "a[50]" (identifier) "a" ([) "[" (number_literal) "50" (]) "]" (,) "," (identifier) "i" (,) "," (identifier) "j" (,) "," (identifier) "n" (;) ";" (expression_statement) "printf("\n\n Sorting An Array \n\n");" (call_expression) "printf("\n\n Sorting An Array \n\n")" (identifier) "printf" (argument_list) "("\n\n Sorting An Array \n\n")" (() "(" (string_literal) ""\n\n Sorting An Array \n\n"" (") """ (escape_sequence) "\n" (escape_sequence) "\n" (string_content) " Sorting An Array " (escape_sequence) "\n" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "printf(" Enter Number Of Elements : ");" (call_expression) "printf(" Enter Number Of Elements : ")" (identifier) "printf" (argument_list) "(" Enter Number Of Elements : ")" (() "(" (string_literal) "" Enter Number Of Elements : "" (") """ (string_content) " Enter Number Of Elements : " (") """ ()) ")" (;) ";" (expression_statement) "scanf("%d",&n);" (call_expression) "scanf("%d",&n)" (identifier) "scanf" (argument_list) "("%d",&n)" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (pointer_expression) "&n" (&) "&" (identifier) "n" ()) ")" (;) ";" (expression_statement) "printf("\n\n Creating The Array \n\n");" (call_expression) "printf("\n\n Creating The Array \n\n")" (identifier) "printf" (argument_list) "("\n\n Creating The Array \n\n")" (() "(" (string_literal) ""\n\n Creating The Array \n\n"" (") """ (escape_sequence) "\n" (escape_sequence) "\n" (string_content) " Creating The Array " (escape_sequence) "\n" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (for_statement) "for(i = 0 ; i < n ; i++) \n { \n printf("\n Enter Value : "); \n scanf("%d",&a[i]); \n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < n" (identifier) "i" (<) "<" (identifier) "n" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{ \n printf("\n Enter Value : "); \n scanf("%d",&a[i]); \n }" ({) "{" (expression_statement) "printf("\n Enter Value : ");" (call_expression) "printf("\n Enter Value : ")" (identifier) "printf" (argument_list) "("\n Enter Value : ")" (() "(" (string_literal) ""\n Enter Value : "" (") """ (escape_sequence) "\n" (string_content) " Enter Value : " (") """ ()) ")" (;) ";" (expression_statement) "scanf("%d",&a[i]);" (call_expression) "scanf("%d",&a[i])" (identifier) "scanf" (argument_list) "("%d",&a[i])" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (pointer_expression) "&a[i]" (&) "&" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("\n\n The Entered Array Is \n\n");" (call_expression) "printf("\n\n The Entered Array Is \n\n")" (identifier) "printf" (argument_list) "("\n\n The Entered Array Is \n\n")" (() "(" (string_literal) ""\n\n The Entered Array Is \n\n"" (") """ (escape_sequence) "\n" (escape_sequence) "\n" (string_content) " The Entered Array Is " (escape_sequence) "\n" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (for_statement) "for(i = 0 ; i < n ; i++) \n { \n printf("\n %d ",a[i]); \n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < n" (identifier) "i" (<) "<" (identifier) "n" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{ \n printf("\n %d ",a[i]); \n }" ({) "{" (expression_statement) "printf("\n %d ",a[i]);" (call_expression) "printf("\n %d ",a[i])" (identifier) "printf" (argument_list) "("\n %d ",a[i])" (() "(" (string_literal) ""\n %d "" (") """ (escape_sequence) "\n" (string_content) " %d " (") """ (,) "," (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("\n\n Array After Sorting In Ascending Order \n\n");" (call_expression) "printf("\n\n Array After Sorting In Ascending Order \n\n")" (identifier) "printf" (argument_list) "("\n\n Array After Sorting In Ascending Order \n\n")" (() "(" (string_literal) ""\n\n Array After Sorting In Ascending Order \n\n"" (") """ (escape_sequence) "\n" (escape_sequence) "\n" (string_content) " Array After Sorting In Ascending Order " (escape_sequence) "\n" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (for_statement) "for(i = 0 ; i < n-1 ; i++) \n { \n for(j = 0 ;j < n - i -1 ; j++) \n { \n if(a[j] > a[j+1]) \n { \n int temp = a[j]; \n a[j] = a[j + 1]; \n a[j + 1] = temp; \n } \n } \n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < n-1" (identifier) "i" (<) "<" (binary_expression) "n-1" (identifier) "n" (-) "-" (number_literal) "1" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{ \n for(j = 0 ;j < n - i -1 ; j++) \n { \n if(a[j] > a[j+1]) \n { \n int temp = a[j]; \n a[j] = a[j + 1]; \n a[j + 1] = temp; \n } \n } \n }" ({) "{" (for_statement) "for(j = 0 ;j < n - i -1 ; j++) \n { \n if(a[j] > a[j+1]) \n { \n int temp = a[j]; \n a[j] = a[j + 1]; \n a[j + 1] = temp; \n } \n }" (for) "for" (() "(" (assignment_expression) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j < n - i -1" (identifier) "j" (<) "<" (binary_expression) "n - i -1" (binary_expression) "n - i" (identifier) "n" (-) "-" (identifier) "i" (-) "-" (number_literal) "1" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{ \n if(a[j] > a[j+1]) \n { \n int temp = a[j]; \n a[j] = a[j + 1]; \n a[j + 1] = temp; \n } \n }" ({) "{" (if_statement) "if(a[j] > a[j+1]) \n { \n int temp = a[j]; \n a[j] = a[j + 1]; \n a[j + 1] = temp; \n }" (if) "if" (parenthesized_expression) "(a[j] > a[j+1])" (() "(" (binary_expression) "a[j] > a[j+1]" (subscript_expression) "a[j]" (identifier) "a" ([) "[" (identifier) "j" (]) "]" (>) ">" (subscript_expression) "a[j+1]" (identifier) "a" ([) "[" (binary_expression) "j+1" (identifier) "j" (+) "+" (number_literal) "1" (]) "]" ()) ")" (compound_statement) "{ \n int temp = a[j]; \n a[j] = a[j + 1]; \n a[j + 1] = temp; \n }" ({) "{" (declaration) "int temp = a[j];" (primitive_type) "int" (init_declarator) "temp = a[j]" (identifier) "temp" (=) "=" (subscript_expression) "a[j]" (identifier) "a" ([) "[" (identifier) "j" (]) "]" (;) ";" (expression_statement) "a[j] = a[j + 1];" (assignment_expression) "a[j] = a[j + 1]" (subscript_expression) "a[j]" (identifier) "a" ([) "[" (identifier) "j" (]) "]" (=) "=" (subscript_expression) "a[j + 1]" (identifier) "a" ([) "[" (binary_expression) "j + 1" (identifier) "j" (+) "+" (number_literal) "1" (]) "]" (;) ";" (expression_statement) "a[j + 1] = temp;" (assignment_expression) "a[j + 1] = temp" (subscript_expression) "a[j + 1]" (identifier) "a" ([) "[" (binary_expression) "j + 1" (identifier) "j" (+) "+" (number_literal) "1" (]) "]" (=) "=" (identifier) "temp" (;) ";" (}) "}" (}) "}" (}) "}" (for_statement) "for(i = 0 ; i < n ; i++) \n { \n printf("\n %d ",a[i]); \n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < n" (identifier) "i" (<) "<" (identifier) "n" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{ \n printf("\n %d ",a[i]); \n }" ({) "{" (expression_statement) "printf("\n %d ",a[i]);" (call_expression) "printf("\n %d ",a[i])" (identifier) "printf" (argument_list) "("\n %d ",a[i])" (() "(" (string_literal) ""\n %d "" (") """ (escape_sequence) "\n" (string_content) " %d " (") """ (,) "," (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("\n\n");" (call_expression) "printf("\n\n")" (identifier) "printf" (argument_list) "("\n\n")" (() "(" (string_literal) ""\n\n"" (") """ (escape_sequence) "\n" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}"
366
0
{"language": "c", "success": true, "metadata": {"lines": 39, "avg_line_length": 19.46, "nodes": 203, "errors": 0, "source_hash": "1ff6e65a3f14e1b4a7619742ef72ab5d47a0aa01124701d0c2cc5614239acc0a", "categorized_nodes": 140}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<stdio.h>\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 17}}, {"id": 3, "type": "function_definition", "text": "void main()\r\n{\r\n\tint \ta[50],i,j,n;\r\n\t\t\tprintf(\"\\n\\n Sorting An Array \\n\\n\");\r\n\t\t\tprintf(\" Enter Number Of Elements : \");\r\n\t\t\tscanf(\"%d\",&n);\r\n\t\t\tprintf(\"\\n\\n Creating The Array \\n\\n\");\r\n\t\t\tfor(i = 0 ; i < n ; i++)\r\n\t\t\t{\r\n\t\t\t\t\tprintf(\"\\n Enter Value : \");\r\n\t\t\t\t\tscanf(\"%d\",&a[i]);\r\n\t\t\t}\r\n\t\t\tprintf(\"\\n\\n The Entered Array Is \\n\\n\");\r\n\t\t\tfor(i = 0 ; i < n ; i++)\r\n\t\t\t{\r\n\t\t\t\t\tprintf(\"\\n %d \",a[i]);\r\n\t\t\t}\t\r\n\t\t\tprintf(\"\\n\\n Array After Sorting In Ascending Order \\n\\n\");\r\n\t\t\tfor(i = 0 ; i < n-1 ; i++)\r\n\t\t\t{\r\n\t\t\t\tfor(j = 0 ;j < n - i -1 ; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(a[j] > a[j+1])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint \ttemp = a[j];\r\n\t\t\t\t\t\t\t\ta[j] = a[j + 1];\r\n\t\t\t\t\t\t\t\ta[j + 1] = temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(i = 0 ; i < n ; i++)\r\n\t\t\t{\r\n\t\t\t\t\tprintf(\"\\n %d \",a[i]);\r\n\t\t\t}\r\n\t\t\tprintf(\"\\n\\n\");\t\r\n\r\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "void", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 4}}, {"id": 5, "type": "function_declarator", "text": "main()", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 11}}, {"id": 6, "type": "identifier", "text": "main", "parent": 5, "children": [], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 9}}, {"id": 7, "type": "parameter_list", "text": "()", "parent": 5, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 11}}, {"id": 8, "type": "declaration", "text": "int \ta[50],i,j,n;", "parent": 3, "children": [9, 10, 13, 14, 15], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 18}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 4}}, {"id": 10, "type": "array_declarator", "text": "a[50]", "parent": 8, "children": [11, 12], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 11}}, {"id": 11, "type": "identifier", "text": "a", "parent": 10, "children": [], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 7}}, {"id": 12, "type": "number_literal", "text": "50", "parent": 10, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 10}}, {"id": 13, "type": "identifier", "text": "i", "parent": 8, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 13}}, {"id": 14, "type": "identifier", "text": "j", "parent": 8, "children": [], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 15}}, {"id": 15, "type": "identifier", "text": "n", "parent": 8, "children": [], "start_point": {"row": 4, "column": 16}, "end_point": {"row": 4, "column": 17}}, {"id": 16, "type": "call_expression", "text": "printf(\"\\n\\n Sorting An Array \\n\\n\")", "parent": 3, "children": [17, 18], "start_point": {"row": 5, "column": 3}, "end_point": {"row": 5, "column": 39}}, {"id": 17, "type": "identifier", "text": "printf", "parent": 16, "children": [], "start_point": {"row": 5, "column": 3}, "end_point": {"row": 5, "column": 9}}, {"id": 18, "type": "argument_list", "text": "(\"\\n\\n Sorting An Array \\n\\n\")", "parent": 16, "children": [19], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 39}}, {"id": 19, "type": "string_literal", "text": "\"\\n\\n Sorting An Array \\n\\n\"", "parent": 18, "children": [20, 21, 22, 23], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 38}}, {"id": 20, "type": "escape_sequence", "text": "\\n", "parent": 19, "children": [], "start_point": {"row": 5, "column": 11}, "end_point": {"row": 5, "column": 13}}, {"id": 21, "type": "escape_sequence", "text": "\\n", "parent": 19, "children": [], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 15}}, {"id": 22, "type": "escape_sequence", "text": "\\n", "parent": 19, "children": [], "start_point": {"row": 5, "column": 33}, "end_point": {"row": 5, "column": 35}}, {"id": 23, "type": "escape_sequence", "text": "\\n", "parent": 19, "children": [], "start_point": {"row": 5, "column": 35}, "end_point": {"row": 5, "column": 37}}, {"id": 24, "type": "call_expression", "text": "printf(\" Enter Number Of Elements : \")", "parent": 3, "children": [25, 26], "start_point": {"row": 6, "column": 3}, "end_point": {"row": 6, "column": 41}}, {"id": 25, "type": "identifier", "text": "printf", "parent": 24, "children": [], "start_point": {"row": 6, "column": 3}, "end_point": {"row": 6, "column": 9}}, {"id": 26, "type": "argument_list", "text": "(\" Enter Number Of Elements : \")", "parent": 24, "children": [27], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 41}}, {"id": 27, "type": "string_literal", "text": "\" Enter Number Of Elements : \"", "parent": 26, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 40}}, {"id": 28, "type": "call_expression", "text": "scanf(\"%d\",&n)", "parent": 3, "children": [29, 30], "start_point": {"row": 7, "column": 3}, "end_point": {"row": 7, "column": 17}}, {"id": 29, "type": "identifier", "text": "scanf", "parent": 28, "children": [], "start_point": {"row": 7, "column": 3}, "end_point": {"row": 7, "column": 8}}, {"id": 30, "type": "argument_list", "text": "(\"%d\",&n)", "parent": 28, "children": [31, 32], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 17}}, {"id": 31, "type": "string_literal", "text": "\"%d\"", "parent": 30, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 13}}, {"id": 32, "type": "pointer_expression", "text": "&n", "parent": 30, "children": [33], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 16}}, {"id": 33, "type": "identifier", "text": "n", "parent": 32, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 16}}, {"id": 34, "type": "call_expression", "text": "printf(\"\\n\\n Creating The Array \\n\\n\")", "parent": 3, "children": [35, 36], "start_point": {"row": 8, "column": 3}, "end_point": {"row": 8, "column": 41}}, {"id": 35, "type": "identifier", "text": "printf", "parent": 34, "children": [], "start_point": {"row": 8, "column": 3}, "end_point": {"row": 8, "column": 9}}, {"id": 36, "type": "argument_list", "text": "(\"\\n\\n Creating The Array \\n\\n\")", "parent": 34, "children": [37], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 41}}, {"id": 37, "type": "string_literal", "text": "\"\\n\\n Creating The Array \\n\\n\"", "parent": 36, "children": [38, 39, 40, 41], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 40}}, {"id": 38, "type": "escape_sequence", "text": "\\n", "parent": 37, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 13}}, {"id": 39, "type": "escape_sequence", "text": "\\n", "parent": 37, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 15}}, {"id": 40, "type": "escape_sequence", "text": "\\n", "parent": 37, "children": [], "start_point": {"row": 8, "column": 35}, "end_point": {"row": 8, "column": 37}}, {"id": 41, "type": "escape_sequence", "text": "\\n", "parent": 37, "children": [], "start_point": {"row": 8, "column": 37}, "end_point": {"row": 8, "column": 39}}, {"id": 42, "type": "for_statement", "text": "for(i = 0 ; i < n ; i++)\r\n\t\t\t{\r\n\t\t\t\t\tprintf(\"\\n Enter Value : \");\r\n\t\t\t\t\tscanf(\"%d\",&a[i]);\r\n\t\t\t}", "parent": 3, "children": [43, 47, 51], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 13, "column": 4}}, {"id": 43, "type": "assignment_expression", "text": "i = 0", "parent": 42, "children": [44, 45, 46], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 12}}, {"id": 44, "type": "identifier", "text": "i", "parent": 43, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 8}}, {"id": 45, "type": "=", "text": "=", "parent": 43, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 10}}, {"id": 46, "type": "number_literal", "text": "0", "parent": 43, "children": [], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 12}}, {"id": 47, "type": "binary_expression", "text": "i < n", "parent": 42, "children": [48, 49, 50], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 20}}, {"id": 48, "type": "identifier", "text": "i", "parent": 47, "children": [], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 16}}, {"id": 49, "type": "<", "text": "<", "parent": 47, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 18}}, {"id": 50, "type": "identifier", "text": "n", "parent": 47, "children": [], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 20}}, {"id": 51, "type": "update_expression", "text": "i++", "parent": 42, "children": [52, 53], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 26}}, {"id": 52, "type": "identifier", "text": "i", "parent": 51, "children": [], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 24}}, {"id": 53, "type": "++", "text": "++", "parent": 51, "children": [], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 26}}, {"id": 54, "type": "call_expression", "text": "printf(\"\\n Enter Value : \")", "parent": 42, "children": [55, 56], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 32}}, {"id": 55, "type": "identifier", "text": "printf", "parent": 54, "children": [], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 11}}, {"id": 56, "type": "argument_list", "text": "(\"\\n Enter Value : \")", "parent": 54, "children": [57], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 32}}, {"id": 57, "type": "string_literal", "text": "\"\\n Enter Value : \"", "parent": 56, "children": [58], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 31}}, {"id": 58, "type": "escape_sequence", "text": "\\n", "parent": 57, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 15}}, {"id": 59, "type": "call_expression", "text": "scanf(\"%d\",&a[i])", "parent": 42, "children": [60, 61], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 22}}, {"id": 60, "type": "identifier", "text": "scanf", "parent": 59, "children": [], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 10}}, {"id": 61, "type": "argument_list", "text": "(\"%d\",&a[i])", "parent": 59, "children": [62, 63], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 22}}, {"id": 62, "type": "string_literal", "text": "\"%d\"", "parent": 61, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 15}}, {"id": 63, "type": "pointer_expression", "text": "&a[i]", "parent": 61, "children": [64], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 21}}, {"id": 64, "type": "subscript_expression", "text": "a[i]", "parent": 63, "children": [65, 66], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 21}}, {"id": 65, "type": "identifier", "text": "a", "parent": 64, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 18}}, {"id": 66, "type": "identifier", "text": "i", "parent": 64, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 20}}, {"id": 67, "type": "call_expression", "text": "printf(\"\\n\\n The Entered Array Is \\n\\n\")", "parent": 3, "children": [68, 69], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 43}}, {"id": 68, "type": "identifier", "text": "printf", "parent": 67, "children": [], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 9}}, {"id": 69, "type": "argument_list", "text": "(\"\\n\\n The Entered Array Is \\n\\n\")", "parent": 67, "children": [70], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 43}}, {"id": 70, "type": "string_literal", "text": "\"\\n\\n The Entered Array Is \\n\\n\"", "parent": 69, "children": [71, 72, 73, 74], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 42}}, {"id": 71, "type": "escape_sequence", "text": "\\n", "parent": 70, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 13}}, {"id": 72, "type": "escape_sequence", "text": "\\n", "parent": 70, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 15}}, {"id": 73, "type": "escape_sequence", "text": "\\n", "parent": 70, "children": [], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 39}}, {"id": 74, "type": "escape_sequence", "text": "\\n", "parent": 70, "children": [], "start_point": {"row": 14, "column": 39}, "end_point": {"row": 14, "column": 41}}, {"id": 75, "type": "for_statement", "text": "for(i = 0 ; i < n ; i++)\r\n\t\t\t{\r\n\t\t\t\t\tprintf(\"\\n %d \",a[i]);\r\n\t\t\t}", "parent": 3, "children": [76, 80, 84], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 18, "column": 4}}, {"id": 76, "type": "assignment_expression", "text": "i = 0", "parent": 75, "children": [77, 78, 79], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 12}}, {"id": 77, "type": "identifier", "text": "i", "parent": 76, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 8}}, {"id": 78, "type": "=", "text": "=", "parent": 76, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 10}}, {"id": 79, "type": "number_literal", "text": "0", "parent": 76, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 12}}, {"id": 80, "type": "binary_expression", "text": "i < n", "parent": 75, "children": [81, 82, 83], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 20}}, {"id": 81, "type": "identifier", "text": "i", "parent": 80, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 16}}, {"id": 82, "type": "<", "text": "<", "parent": 80, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 18}}, {"id": 83, "type": "identifier", "text": "n", "parent": 80, "children": [], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 20}}, {"id": 84, "type": "update_expression", "text": "i++", "parent": 75, "children": [85, 86], "start_point": {"row": 15, "column": 23}, "end_point": {"row": 15, "column": 26}}, {"id": 85, "type": "identifier", "text": "i", "parent": 84, "children": [], "start_point": {"row": 15, "column": 23}, "end_point": {"row": 15, "column": 24}}, {"id": 86, "type": "++", "text": "++", "parent": 84, "children": [], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 26}}, {"id": 87, "type": "call_expression", "text": "printf(\"\\n %d \",a[i])", "parent": 75, "children": [88, 89], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 27}}, {"id": 88, "type": "identifier", "text": "printf", "parent": 87, "children": [], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 11}}, {"id": 89, "type": "argument_list", "text": "(\"\\n %d \",a[i])", "parent": 87, "children": [90, 92], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 27}}, {"id": 90, "type": "string_literal", "text": "\"\\n %d \"", "parent": 89, "children": [91], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 21}}, {"id": 91, "type": "escape_sequence", "text": "\\n", "parent": 90, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 15}}, {"id": 92, "type": "subscript_expression", "text": "a[i]", "parent": 89, "children": [93, 94], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 26}}, {"id": 93, "type": "identifier", "text": "a", "parent": 92, "children": [], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 23}}, {"id": 94, "type": "identifier", "text": "i", "parent": 92, "children": [], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 25}}, {"id": 95, "type": "call_expression", "text": "printf(\"\\n\\n Array After Sorting In Ascending Order \\n\\n\")", "parent": 3, "children": [96, 97], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 61}}, {"id": 96, "type": "identifier", "text": "printf", "parent": 95, "children": [], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 9}}, {"id": 97, "type": "argument_list", "text": "(\"\\n\\n Array After Sorting In Ascending Order \\n\\n\")", "parent": 95, "children": [98], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 61}}, {"id": 98, "type": "string_literal", "text": "\"\\n\\n Array After Sorting In Ascending Order \\n\\n\"", "parent": 97, "children": [99, 100, 101, 102], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 60}}, {"id": 99, "type": "escape_sequence", "text": "\\n", "parent": 98, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 13}}, {"id": 100, "type": "escape_sequence", "text": "\\n", "parent": 98, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 15}}, {"id": 101, "type": "escape_sequence", "text": "\\n", "parent": 98, "children": [], "start_point": {"row": 19, "column": 55}, "end_point": {"row": 19, "column": 57}}, {"id": 102, "type": "escape_sequence", "text": "\\n", "parent": 98, "children": [], "start_point": {"row": 19, "column": 57}, "end_point": {"row": 19, "column": 59}}, {"id": 103, "type": "for_statement", "text": "for(i = 0 ; i < n-1 ; i++)\r\n\t\t\t{\r\n\t\t\t\tfor(j = 0 ;j < n - i -1 ; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(a[j] > a[j+1])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint \ttemp = a[j];\r\n\t\t\t\t\t\t\t\ta[j] = a[j + 1];\r\n\t\t\t\t\t\t\t\ta[j + 1] = temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "parent": 3, "children": [104, 108, 115], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 31, "column": 4}}, {"id": 104, "type": "assignment_expression", "text": "i = 0", "parent": 103, "children": [105, 106, 107], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 12}}, {"id": 105, "type": "identifier", "text": "i", "parent": 104, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 8}}, {"id": 106, "type": "=", "text": "=", "parent": 104, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 10}}, {"id": 107, "type": "number_literal", "text": "0", "parent": 104, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 12}}, {"id": 108, "type": "binary_expression", "text": "i < n-1", "parent": 103, "children": [109, 110, 111], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 22}}, {"id": 109, "type": "identifier", "text": "i", "parent": 108, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 16}}, {"id": 110, "type": "<", "text": "<", "parent": 108, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 18}}, {"id": 111, "type": "binary_expression", "text": "n-1", "parent": 108, "children": [112, 113, 114], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 22}}, {"id": 112, "type": "identifier", "text": "n", "parent": 111, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 20}}, {"id": 113, "type": "-", "text": "-", "parent": 111, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 21}}, {"id": 114, "type": "number_literal", "text": "1", "parent": 111, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 22}}, {"id": 115, "type": "update_expression", "text": "i++", "parent": 103, "children": [116, 117], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 28}}, {"id": 116, "type": "identifier", "text": "i", "parent": 115, "children": [], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 26}}, {"id": 117, "type": "++", "text": "++", "parent": 115, "children": [], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 28}}, {"id": 118, "type": "for_statement", "text": "for(j = 0 ;j < n - i -1 ; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(a[j] > a[j+1])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint \ttemp = a[j];\r\n\t\t\t\t\t\t\t\ta[j] = a[j + 1];\r\n\t\t\t\t\t\t\t\ta[j + 1] = temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "parent": 103, "children": [119, 123, 133], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 30, "column": 5}}, {"id": 119, "type": "assignment_expression", "text": "j = 0", "parent": 118, "children": [120, 121, 122], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 13}}, {"id": 120, "type": "identifier", "text": "j", "parent": 119, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 9}}, {"id": 121, "type": "=", "text": "=", "parent": 119, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 11}}, {"id": 122, "type": "number_literal", "text": "0", "parent": 119, "children": [], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 13}}, {"id": 123, "type": "binary_expression", "text": "j < n - i -1", "parent": 118, "children": [124, 125, 126], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 27}}, {"id": 124, "type": "identifier", "text": "j", "parent": 123, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 16}}, {"id": 125, "type": "<", "text": "<", "parent": 123, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 18}}, {"id": 126, "type": "binary_expression", "text": "n - i -1", "parent": 123, "children": [127, 131, 132], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 27}}, {"id": 127, "type": "binary_expression", "text": "n - i", "parent": 126, "children": [128, 129, 130], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 24}}, {"id": 128, "type": "identifier", "text": "n", "parent": 127, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 20}}, {"id": 129, "type": "-", "text": "-", "parent": 127, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 22}}, {"id": 130, "type": "identifier", "text": "i", "parent": 127, "children": [], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 24}}, {"id": 131, "type": "-", "text": "-", "parent": 126, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 26}}, {"id": 132, "type": "number_literal", "text": "1", "parent": 126, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 27}}, {"id": 133, "type": "update_expression", "text": "j++", "parent": 118, "children": [134, 135], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 33}}, {"id": 134, "type": "identifier", "text": "j", "parent": 133, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 31}}, {"id": 135, "type": "++", "text": "++", "parent": 133, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 33}}, {"id": 136, "type": "if_statement", "text": "if(a[j] > a[j+1])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint \ttemp = a[j];\r\n\t\t\t\t\t\t\t\ta[j] = a[j + 1];\r\n\t\t\t\t\t\t\t\ta[j + 1] = temp;\r\n\t\t\t\t\t}", "parent": 118, "children": [137], "start_point": {"row": 24, "column": 5}, "end_point": {"row": 29, "column": 6}}, {"id": 137, "type": "parenthesized_expression", "text": "(a[j] > a[j+1])", "parent": 136, "children": [138], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 22}}, {"id": 138, "type": "binary_expression", "text": "a[j] > a[j+1]", "parent": 137, "children": [139, 142, 143], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 21}}, {"id": 139, "type": "subscript_expression", "text": "a[j]", "parent": 138, "children": [140, 141], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 12}}, {"id": 140, "type": "identifier", "text": "a", "parent": 139, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 9}}, {"id": 141, "type": "identifier", "text": "j", "parent": 139, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 11}}, {"id": 142, "type": ">", "text": ">", "parent": 138, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 14}}, {"id": 143, "type": "subscript_expression", "text": "a[j+1]", "parent": 138, "children": [144, 145], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 21}}, {"id": 144, "type": "identifier", "text": "a", "parent": 143, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 16}}, {"id": 145, "type": "binary_expression", "text": "j+1", "parent": 143, "children": [146, 147, 148], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 20}}, {"id": 146, "type": "identifier", "text": "j", "parent": 145, "children": [], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 18}}, {"id": 147, "type": "+", "text": "+", "parent": 145, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 19}}, {"id": 148, "type": "number_literal", "text": "1", "parent": 145, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 20}}, {"id": 149, "type": "declaration", "text": "int \ttemp = a[j];", "parent": 136, "children": [150, 151], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 24}}, {"id": 150, "type": "primitive_type", "text": "int", "parent": 149, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 9}}, {"id": 151, "type": "init_declarator", "text": "temp = a[j]", "parent": 149, "children": [152, 153, 154], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 23}}, {"id": 152, "type": "identifier", "text": "temp", "parent": 151, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 15}}, {"id": 153, "type": "=", "text": "=", "parent": 151, "children": [], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 18}}, {"id": 154, "type": "subscript_expression", "text": "a[j]", "parent": 151, "children": [155, 156], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 23}}, {"id": 155, "type": "identifier", "text": "a", "parent": 154, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 20}}, {"id": 156, "type": "identifier", "text": "j", "parent": 154, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 22}}, {"id": 157, "type": "assignment_expression", "text": "a[j] = a[j + 1]", "parent": 136, "children": [158, 161, 162], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 24}}, {"id": 158, "type": "subscript_expression", "text": "a[j]", "parent": 157, "children": [159, 160], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 12}}, {"id": 159, "type": "identifier", "text": "a", "parent": 158, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 9}}, {"id": 160, "type": "identifier", "text": "j", "parent": 158, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 11}}, {"id": 161, "type": "=", "text": "=", "parent": 157, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 15}}, {"id": 162, "type": "subscript_expression", "text": "a[j + 1]", "parent": 157, "children": [163, 164], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 24}}, {"id": 163, "type": "identifier", "text": "a", "parent": 162, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 17}}, {"id": 164, "type": "binary_expression", "text": "j + 1", "parent": 162, "children": [165, 166, 167], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 23}}, {"id": 165, "type": "identifier", "text": "j", "parent": 164, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 19}}, {"id": 166, "type": "+", "text": "+", "parent": 164, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 21}}, {"id": 167, "type": "number_literal", "text": "1", "parent": 164, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 23}}, {"id": 168, "type": "assignment_expression", "text": "a[j + 1] = temp", "parent": 136, "children": [169, 175, 176], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 23}}, {"id": 169, "type": "subscript_expression", "text": "a[j + 1]", "parent": 168, "children": [170, 171], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 16}}, {"id": 170, "type": "identifier", "text": "a", "parent": 169, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 9}}, {"id": 171, "type": "binary_expression", "text": "j + 1", "parent": 169, "children": [172, 173, 174], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 15}}, {"id": 172, "type": "identifier", "text": "j", "parent": 171, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 11}}, {"id": 173, "type": "+", "text": "+", "parent": 171, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 13}}, {"id": 174, "type": "number_literal", "text": "1", "parent": 171, "children": [], "start_point": {"row": 28, "column": 14}, "end_point": {"row": 28, "column": 15}}, {"id": 175, "type": "=", "text": "=", "parent": 168, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 18}}, {"id": 176, "type": "identifier", "text": "temp", "parent": 168, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 23}}, {"id": 177, "type": "for_statement", "text": "for(i = 0 ; i < n ; i++)\r\n\t\t\t{\r\n\t\t\t\t\tprintf(\"\\n %d \",a[i]);\r\n\t\t\t}", "parent": 3, "children": [178, 182, 186], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 35, "column": 4}}, {"id": 178, "type": "assignment_expression", "text": "i = 0", "parent": 177, "children": [179, 180, 181], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 12}}, {"id": 179, "type": "identifier", "text": "i", "parent": 178, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 8}}, {"id": 180, "type": "=", "text": "=", "parent": 178, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 10}}, {"id": 181, "type": "number_literal", "text": "0", "parent": 178, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 12}}, {"id": 182, "type": "binary_expression", "text": "i < n", "parent": 177, "children": [183, 184, 185], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 20}}, {"id": 183, "type": "identifier", "text": "i", "parent": 182, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 16}}, {"id": 184, "type": "<", "text": "<", "parent": 182, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 18}}, {"id": 185, "type": "identifier", "text": "n", "parent": 182, "children": [], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 20}}, {"id": 186, "type": "update_expression", "text": "i++", "parent": 177, "children": [187, 188], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 26}}, {"id": 187, "type": "identifier", "text": "i", "parent": 186, "children": [], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 24}}, {"id": 188, "type": "++", "text": "++", "parent": 186, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 26}}, {"id": 189, "type": "call_expression", "text": "printf(\"\\n %d \",a[i])", "parent": 177, "children": [190, 191], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 27}}, {"id": 190, "type": "identifier", "text": "printf", "parent": 189, "children": [], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 11}}, {"id": 191, "type": "argument_list", "text": "(\"\\n %d \",a[i])", "parent": 189, "children": [192, 194], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 27}}, {"id": 192, "type": "string_literal", "text": "\"\\n %d \"", "parent": 191, "children": [193], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 21}}, {"id": 193, "type": "escape_sequence", "text": "\\n", "parent": 192, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 15}}, {"id": 194, "type": "subscript_expression", "text": "a[i]", "parent": 191, "children": [195, 196], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 26}}, {"id": 195, "type": "identifier", "text": "a", "parent": 194, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 23}}, {"id": 196, "type": "identifier", "text": "i", "parent": 194, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 25}}, {"id": 197, "type": "call_expression", "text": "printf(\"\\n\\n\")", "parent": 3, "children": [198, 199], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 17}}, {"id": 198, "type": "identifier", "text": "printf", "parent": 197, "children": [], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 9}}, {"id": 199, "type": "argument_list", "text": "(\"\\n\\n\")", "parent": 197, "children": [200], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 17}}, {"id": 200, "type": "string_literal", "text": "\"\\n\\n\"", "parent": 199, "children": [201, 202], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 16}}, {"id": 201, "type": "escape_sequence", "text": "\\n", "parent": 200, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 13}}, {"id": 202, "type": "escape_sequence", "text": "\\n", "parent": 200, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 15}}]}, "node_categories": {"declarations": {"functions": [3, 5], "variables": [8, 149], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [16, 24, 28, 32, 34, 47, 51, 54, 59, 63, 64, 67, 80, 84, 87, 92, 95, 108, 111, 115, 123, 126, 127, 133, 137, 138, 139, 143, 145, 154, 158, 162, 164, 169, 171, 182, 186, 189, 194, 197], "assignments": [43, 76, 104, 119, 157, 168, 178], "loops": [42, 75, 103, 118, 177], "conditionals": [6, 11, 13, 14, 15, 17, 25, 29, 33, 35, 44, 48, 50, 52, 55, 60, 65, 66, 68, 77, 81, 83, 85, 88, 93, 94, 96, 105, 109, 112, 116, 120, 124, 128, 130, 134, 136, 140, 141, 144, 146, 152, 155, 156, 159, 160, 163, 165, 170, 172, 176, 179, 183, 185, 187, 190, 195, 196, 198], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 12, 19, 27, 31, 37, 46, 57, 62, 70, 79, 90, 98, 107, 114, 122, 132, 148, 167, 174, 181, 192, 200], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "main", "text_snippet": "void main()\r\n{\r\n\tint \ta[50],i,j,n;\r\n\t\t\tprintf(\"\\n\\n Sorting An Array \\n\\n\");\r\n\t\t\tprintf(\" Enter Numb"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include<stdio.h>\r\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include<stdio.h>\r\n\r\nvoid main()\r\n{\r\n\tint \ta[50],i,j,n;\r\n\t\t\tprintf(\"\\n\\n Sorting An Array \\n\\n\");\r\n\t\t\tprintf(\" Enter Number Of Elements : \");\r\n\t\t\tscanf(\"%d\",&n);\r\n\t\t\tprintf(\"\\n\\n Creating The Array \\n\\n\");\r\n\t\t\tfor(i = 0 ; i < n ; i++)\r\n\t\t\t{\r\n\t\t\t\t\tprintf(\"\\n Enter Value : \");\r\n\t\t\t\t\tscanf(\"%d\",&a[i]);\r\n\t\t\t}\r\n\t\t\tprintf(\"\\n\\n The Entered Array Is \\n\\n\");\r\n\t\t\tfor(i = 0 ; i < n ; i++)\r\n\t\t\t{\r\n\t\t\t\t\tprintf(\"\\n %d \",a[i]);\r\n\t\t\t}\t\r\n\t\t\tprintf(\"\\n\\n Array After Sorting In Ascending Order \\n\\n\");\r\n\t\t\tfor(i = 0 ; i < n-1 ; i++)\r\n\t\t\t{\r\n\t\t\t\tfor(j = 0 ;j < n - i -1 ; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(a[j] > a[j+1])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint \ttemp = a[j];\r\n\t\t\t\t\t\t\t\ta[j] = a[j + 1];\r\n\t\t\t\t\t\t\t\ta[j + 1] = temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(i = 0 ; i < n ; i++)\r\n\t\t\t{\r\n\t\t\t\t\tprintf(\"\\n %d \",a[i]);\r\n\t\t\t}\r\n\t\t\tprintf(\"\\n\\n\");\t\r\n\r\n}"}
391
c
#ifndef SERVER_H #define SERVER_H #include <wayland-server.h> #include <wlr/types/wlr_cursor.h> #include <wlr/types/wlr_virtual_pointer_v1.h> #include <wlr/types/wlr_virtual_keyboard_v1.h> #include <wlr/xcursor.h> #include <wayland-server-core.h> #include <wlr/types/wlr_xcursor_manager.h> #include <wlr/types/wlr_relative_pointer_v1.h> #include <glib.h> #include "cursor.h" #include "layout.h" #include "options.h" #include "xwayland.h" #include "input_manager.h" #include "utils/coreUtils.h" #include "bitset/bitset.h" struct server { struct wl_display *wl_display; struct wl_event_loop *wl_event_loop; struct wlr_backend *backend; struct wlr_compositor *compositor; struct wlr_xdg_shell *xdg_shell; struct wlr_layer_shell_v1 *layer_shell; struct wlr_xdg_decoration_manager_v1 *xdeco_mgr; struct input_manager *input_manager; struct wlr_virtual_pointer_manager_v1 *virtual_pointer_mgr; struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr; struct wlr_relative_pointer_manager_v1 *relative_pointer_mgr; struct wlr_input_inhibit_manager *input_inhibitor_mgr; struct wlr_pointer_constraints_v1 *pointer_constraints; struct layout *default_layout; struct layout_set layout_set; struct wlr_output_layout *output_layout; GPtrArray *keyboards; GPtrArray *registered_key_combos; timer_t combo_timer; struct sigevent combo_sig_event; GPtrArray *workspaces; GPtrArray *scratchpad; GPtrArray *config_paths; char *config_file; char *config_dir; int previous_workspace; BitSet *previous_bitset; GPtrArray *client_lists; GPtrArray *normal_clients; GPtrArray *non_tiled_clients; GPtrArray *independent_clients; GPtrArray *mons; GPtrArray *popups; // X11 popups are handled as containers GPtrArray *xwayland_popups; GPtrArray *tagsets; struct wlr_surface *old_surface; GPtrArray2D *layer_visual_stack_lists; GPtrArray *layer_visual_stack_background; GPtrArray *layer_visual_stack_bottom; GPtrArray *layer_visual_stack_top; GPtrArray *layer_visual_stack_overlay; GPtrArray *floating_stack; GPtrArray *floating_containers; /* global event handlers */ struct wl_listener new_output; struct wl_listener new_xdeco; struct wl_listener new_xdg_surface; struct wl_listener new_layer_shell_surface; struct wl_listener new_pointer_constraint; // TODO: give them a more sensible name they are here to fix a bug for // sloppy focus struct container *old_xy_container; bool xy_container_is_locked; #if JAPOKWM_HAS_XWAYLAND struct xwayland xwayland; struct wl_listener xwayland_ready; struct wl_listener new_xwayland_surface; #endif }; extern struct server server; void init_server(); #endif /* SERVER_H */
33.33
82
(translation_unit) "#ifndef SERVER_H\n#define SERVER_H\n#include <wayland-server.h>\n#include <wlr/types/wlr_cursor.h>\n#include <wlr/types/wlr_virtual_pointer_v1.h>\n#include <wlr/types/wlr_virtual_keyboard_v1.h>\n#include <wlr/xcursor.h>\n#include <wayland-server-core.h>\n#include <wlr/types/wlr_xcursor_manager.h>\n#include <wlr/types/wlr_relative_pointer_v1.h>\n#include <glib.h>\n\n#include "cursor.h"\n#include "layout.h"\n#include "options.h"\n#include "xwayland.h"\n#include "input_manager.h"\n#include "utils/coreUtils.h"\n#include "bitset/bitset.h"\n\nstruct server {\n struct wl_display *wl_display;\n struct wl_event_loop *wl_event_loop;\n struct wlr_backend *backend;\n struct wlr_compositor *compositor;\n\n struct wlr_xdg_shell *xdg_shell;\n struct wlr_layer_shell_v1 *layer_shell;\n struct wlr_xdg_decoration_manager_v1 *xdeco_mgr;\n\n struct input_manager *input_manager;\n\n struct wlr_virtual_pointer_manager_v1 *virtual_pointer_mgr;\n struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr;\n struct wlr_relative_pointer_manager_v1 *relative_pointer_mgr;\n struct wlr_input_inhibit_manager *input_inhibitor_mgr;\n struct wlr_pointer_constraints_v1 *pointer_constraints;\n\n struct layout *default_layout;\n struct layout_set layout_set;\n\n struct wlr_output_layout *output_layout;\n GPtrArray *keyboards;\n\n GPtrArray *registered_key_combos;\n timer_t combo_timer;\n struct sigevent combo_sig_event;\n\n GPtrArray *workspaces;\n\n GPtrArray *scratchpad;\n\n GPtrArray *config_paths;\n char *config_file;\n char *config_dir;\n\n int previous_workspace;\n BitSet *previous_bitset;\n\n GPtrArray *client_lists;\n GPtrArray *normal_clients;\n GPtrArray *non_tiled_clients;\n GPtrArray *independent_clients;\n\n GPtrArray *mons;\n GPtrArray *popups;\n // X11 popups are handled as containers\n GPtrArray *xwayland_popups;\n\n GPtrArray *tagsets;\n\n struct wlr_surface *old_surface;\n\n GPtrArray2D *layer_visual_stack_lists;\n\n GPtrArray *layer_visual_stack_background;\n GPtrArray *layer_visual_stack_bottom;\n GPtrArray *layer_visual_stack_top;\n GPtrArray *layer_visual_stack_overlay;\n\n GPtrArray *floating_stack;\n GPtrArray *floating_containers;\n\n /* global event handlers */\n struct wl_listener new_output;\n struct wl_listener new_xdeco;\n struct wl_listener new_xdg_surface;\n struct wl_listener new_layer_shell_surface;\n struct wl_listener new_pointer_constraint;\n\n // TODO: give them a more sensible name they are here to fix a bug for\n // sloppy focus\n struct container *old_xy_container;\n bool xy_container_is_locked;\n\n#if JAPOKWM_HAS_XWAYLAND\n struct xwayland xwayland;\n struct wl_listener xwayland_ready;\n\n struct wl_listener new_xwayland_surface;\n#endif\n};\n\nextern struct server server;\n\nvoid init_server();\n#endif /* SERVER_H */\n" (preproc_ifdef) "#ifndef SERVER_H\n#define SERVER_H\n#include <wayland-server.h>\n#include <wlr/types/wlr_cursor.h>\n#include <wlr/types/wlr_virtual_pointer_v1.h>\n#include <wlr/types/wlr_virtual_keyboard_v1.h>\n#include <wlr/xcursor.h>\n#include <wayland-server-core.h>\n#include <wlr/types/wlr_xcursor_manager.h>\n#include <wlr/types/wlr_relative_pointer_v1.h>\n#include <glib.h>\n\n#include "cursor.h"\n#include "layout.h"\n#include "options.h"\n#include "xwayland.h"\n#include "input_manager.h"\n#include "utils/coreUtils.h"\n#include "bitset/bitset.h"\n\nstruct server {\n struct wl_display *wl_display;\n struct wl_event_loop *wl_event_loop;\n struct wlr_backend *backend;\n struct wlr_compositor *compositor;\n\n struct wlr_xdg_shell *xdg_shell;\n struct wlr_layer_shell_v1 *layer_shell;\n struct wlr_xdg_decoration_manager_v1 *xdeco_mgr;\n\n struct input_manager *input_manager;\n\n struct wlr_virtual_pointer_manager_v1 *virtual_pointer_mgr;\n struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr;\n struct wlr_relative_pointer_manager_v1 *relative_pointer_mgr;\n struct wlr_input_inhibit_manager *input_inhibitor_mgr;\n struct wlr_pointer_constraints_v1 *pointer_constraints;\n\n struct layout *default_layout;\n struct layout_set layout_set;\n\n struct wlr_output_layout *output_layout;\n GPtrArray *keyboards;\n\n GPtrArray *registered_key_combos;\n timer_t combo_timer;\n struct sigevent combo_sig_event;\n\n GPtrArray *workspaces;\n\n GPtrArray *scratchpad;\n\n GPtrArray *config_paths;\n char *config_file;\n char *config_dir;\n\n int previous_workspace;\n BitSet *previous_bitset;\n\n GPtrArray *client_lists;\n GPtrArray *normal_clients;\n GPtrArray *non_tiled_clients;\n GPtrArray *independent_clients;\n\n GPtrArray *mons;\n GPtrArray *popups;\n // X11 popups are handled as containers\n GPtrArray *xwayland_popups;\n\n GPtrArray *tagsets;\n\n struct wlr_surface *old_surface;\n\n GPtrArray2D *layer_visual_stack_lists;\n\n GPtrArray *layer_visual_stack_background;\n GPtrArray *layer_visual_stack_bottom;\n GPtrArray *layer_visual_stack_top;\n GPtrArray *layer_visual_stack_overlay;\n\n GPtrArray *floating_stack;\n GPtrArray *floating_containers;\n\n /* global event handlers */\n struct wl_listener new_output;\n struct wl_listener new_xdeco;\n struct wl_listener new_xdg_surface;\n struct wl_listener new_layer_shell_surface;\n struct wl_listener new_pointer_constraint;\n\n // TODO: give them a more sensible name they are here to fix a bug for\n // sloppy focus\n struct container *old_xy_container;\n bool xy_container_is_locked;\n\n#if JAPOKWM_HAS_XWAYLAND\n struct xwayland xwayland;\n struct wl_listener xwayland_ready;\n\n struct wl_listener new_xwayland_surface;\n#endif\n};\n\nextern struct server server;\n\nvoid init_server();\n#endif" (#ifndef) "#ifndef" (identifier) "SERVER_H" (preproc_def) "#define SERVER_H\n" (#define) "#define" (identifier) "SERVER_H" (preproc_include) "#include <wayland-server.h>\n" (#include) "#include" (system_lib_string) "<wayland-server.h>" (preproc_include) "#include <wlr/types/wlr_cursor.h>\n" (#include) "#include" (system_lib_string) "<wlr/types/wlr_cursor.h>" (preproc_include) "#include <wlr/types/wlr_virtual_pointer_v1.h>\n" (#include) "#include" (system_lib_string) "<wlr/types/wlr_virtual_pointer_v1.h>" (preproc_include) "#include <wlr/types/wlr_virtual_keyboard_v1.h>\n" (#include) "#include" (system_lib_string) "<wlr/types/wlr_virtual_keyboard_v1.h>" (preproc_include) "#include <wlr/xcursor.h>\n" (#include) "#include" (system_lib_string) "<wlr/xcursor.h>" (preproc_include) "#include <wayland-server-core.h>\n" (#include) "#include" (system_lib_string) "<wayland-server-core.h>" (preproc_include) "#include <wlr/types/wlr_xcursor_manager.h>\n" (#include) "#include" (system_lib_string) "<wlr/types/wlr_xcursor_manager.h>" (preproc_include) "#include <wlr/types/wlr_relative_pointer_v1.h>\n" (#include) "#include" (system_lib_string) "<wlr/types/wlr_relative_pointer_v1.h>" (preproc_include) "#include <glib.h>\n" (#include) "#include" (system_lib_string) "<glib.h>" (preproc_include) "#include "cursor.h"\n" (#include) "#include" (string_literal) ""cursor.h"" (") """ (string_content) "cursor.h" (") """ (preproc_include) "#include "layout.h"\n" (#include) "#include" (string_literal) ""layout.h"" (") """ (string_content) "layout.h" (") """ (preproc_include) "#include "options.h"\n" (#include) "#include" (string_literal) ""options.h"" (") """ (string_content) "options.h" (") """ (preproc_include) "#include "xwayland.h"\n" (#include) "#include" (string_literal) ""xwayland.h"" (") """ (string_content) "xwayland.h" (") """ (preproc_include) "#include "input_manager.h"\n" (#include) "#include" (string_literal) ""input_manager.h"" (") """ (string_content) "input_manager.h" (") """ (preproc_include) "#include "utils/coreUtils.h"\n" (#include) "#include" (string_literal) ""utils/coreUtils.h"" (") """ (string_content) "utils/coreUtils.h" (") """ (preproc_include) "#include "bitset/bitset.h"\n" (#include) "#include" (string_literal) ""bitset/bitset.h"" (") """ (string_content) "bitset/bitset.h" (") """ (struct_specifier) "struct server {\n struct wl_display *wl_display;\n struct wl_event_loop *wl_event_loop;\n struct wlr_backend *backend;\n struct wlr_compositor *compositor;\n\n struct wlr_xdg_shell *xdg_shell;\n struct wlr_layer_shell_v1 *layer_shell;\n struct wlr_xdg_decoration_manager_v1 *xdeco_mgr;\n\n struct input_manager *input_manager;\n\n struct wlr_virtual_pointer_manager_v1 *virtual_pointer_mgr;\n struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr;\n struct wlr_relative_pointer_manager_v1 *relative_pointer_mgr;\n struct wlr_input_inhibit_manager *input_inhibitor_mgr;\n struct wlr_pointer_constraints_v1 *pointer_constraints;\n\n struct layout *default_layout;\n struct layout_set layout_set;\n\n struct wlr_output_layout *output_layout;\n GPtrArray *keyboards;\n\n GPtrArray *registered_key_combos;\n timer_t combo_timer;\n struct sigevent combo_sig_event;\n\n GPtrArray *workspaces;\n\n GPtrArray *scratchpad;\n\n GPtrArray *config_paths;\n char *config_file;\n char *config_dir;\n\n int previous_workspace;\n BitSet *previous_bitset;\n\n GPtrArray *client_lists;\n GPtrArray *normal_clients;\n GPtrArray *non_tiled_clients;\n GPtrArray *independent_clients;\n\n GPtrArray *mons;\n GPtrArray *popups;\n // X11 popups are handled as containers\n GPtrArray *xwayland_popups;\n\n GPtrArray *tagsets;\n\n struct wlr_surface *old_surface;\n\n GPtrArray2D *layer_visual_stack_lists;\n\n GPtrArray *layer_visual_stack_background;\n GPtrArray *layer_visual_stack_bottom;\n GPtrArray *layer_visual_stack_top;\n GPtrArray *layer_visual_stack_overlay;\n\n GPtrArray *floating_stack;\n GPtrArray *floating_containers;\n\n /* global event handlers */\n struct wl_listener new_output;\n struct wl_listener new_xdeco;\n struct wl_listener new_xdg_surface;\n struct wl_listener new_layer_shell_surface;\n struct wl_listener new_pointer_constraint;\n\n // TODO: give them a more sensible name they are here to fix a bug for\n // sloppy focus\n struct container *old_xy_container;\n bool xy_container_is_locked;\n\n#if JAPOKWM_HAS_XWAYLAND\n struct xwayland xwayland;\n struct wl_listener xwayland_ready;\n\n struct wl_listener new_xwayland_surface;\n#endif\n}" (struct) "struct" (type_identifier) "server" (field_declaration_list) "{\n struct wl_display *wl_display;\n struct wl_event_loop *wl_event_loop;\n struct wlr_backend *backend;\n struct wlr_compositor *compositor;\n\n struct wlr_xdg_shell *xdg_shell;\n struct wlr_layer_shell_v1 *layer_shell;\n struct wlr_xdg_decoration_manager_v1 *xdeco_mgr;\n\n struct input_manager *input_manager;\n\n struct wlr_virtual_pointer_manager_v1 *virtual_pointer_mgr;\n struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr;\n struct wlr_relative_pointer_manager_v1 *relative_pointer_mgr;\n struct wlr_input_inhibit_manager *input_inhibitor_mgr;\n struct wlr_pointer_constraints_v1 *pointer_constraints;\n\n struct layout *default_layout;\n struct layout_set layout_set;\n\n struct wlr_output_layout *output_layout;\n GPtrArray *keyboards;\n\n GPtrArray *registered_key_combos;\n timer_t combo_timer;\n struct sigevent combo_sig_event;\n\n GPtrArray *workspaces;\n\n GPtrArray *scratchpad;\n\n GPtrArray *config_paths;\n char *config_file;\n char *config_dir;\n\n int previous_workspace;\n BitSet *previous_bitset;\n\n GPtrArray *client_lists;\n GPtrArray *normal_clients;\n GPtrArray *non_tiled_clients;\n GPtrArray *independent_clients;\n\n GPtrArray *mons;\n GPtrArray *popups;\n // X11 popups are handled as containers\n GPtrArray *xwayland_popups;\n\n GPtrArray *tagsets;\n\n struct wlr_surface *old_surface;\n\n GPtrArray2D *layer_visual_stack_lists;\n\n GPtrArray *layer_visual_stack_background;\n GPtrArray *layer_visual_stack_bottom;\n GPtrArray *layer_visual_stack_top;\n GPtrArray *layer_visual_stack_overlay;\n\n GPtrArray *floating_stack;\n GPtrArray *floating_containers;\n\n /* global event handlers */\n struct wl_listener new_output;\n struct wl_listener new_xdeco;\n struct wl_listener new_xdg_surface;\n struct wl_listener new_layer_shell_surface;\n struct wl_listener new_pointer_constraint;\n\n // TODO: give them a more sensible name they are here to fix a bug for\n // sloppy focus\n struct container *old_xy_container;\n bool xy_container_is_locked;\n\n#if JAPOKWM_HAS_XWAYLAND\n struct xwayland xwayland;\n struct wl_listener xwayland_ready;\n\n struct wl_listener new_xwayland_surface;\n#endif\n}" ({) "{" (field_declaration) "struct wl_display *wl_display;" (struct_specifier) "struct wl_display" (struct) "struct" (type_identifier) "wl_display" (pointer_declarator) "*wl_display" (*) "*" (field_identifier) "wl_display" (;) ";" (field_declaration) "struct wl_event_loop *wl_event_loop;" (struct_specifier) "struct wl_event_loop" (struct) "struct" (type_identifier) "wl_event_loop" (pointer_declarator) "*wl_event_loop" (*) "*" (field_identifier) "wl_event_loop" (;) ";" (field_declaration) "struct wlr_backend *backend;" (struct_specifier) "struct wlr_backend" (struct) "struct" (type_identifier) "wlr_backend" (pointer_declarator) "*backend" (*) "*" (field_identifier) "backend" (;) ";" (field_declaration) "struct wlr_compositor *compositor;" (struct_specifier) "struct wlr_compositor" (struct) "struct" (type_identifier) "wlr_compositor" (pointer_declarator) "*compositor" (*) "*" (field_identifier) "compositor" (;) ";" (field_declaration) "struct wlr_xdg_shell *xdg_shell;" (struct_specifier) "struct wlr_xdg_shell" (struct) "struct" (type_identifier) "wlr_xdg_shell" (pointer_declarator) "*xdg_shell" (*) "*" (field_identifier) "xdg_shell" (;) ";" (field_declaration) "struct wlr_layer_shell_v1 *layer_shell;" (struct_specifier) "struct wlr_layer_shell_v1" (struct) "struct" (type_identifier) "wlr_layer_shell_v1" (pointer_declarator) "*layer_shell" (*) "*" (field_identifier) "layer_shell" (;) ";" (field_declaration) "struct wlr_xdg_decoration_manager_v1 *xdeco_mgr;" (struct_specifier) "struct wlr_xdg_decoration_manager_v1" (struct) "struct" (type_identifier) "wlr_xdg_decoration_manager_v1" (pointer_declarator) "*xdeco_mgr" (*) "*" (field_identifier) "xdeco_mgr" (;) ";" (field_declaration) "struct input_manager *input_manager;" (struct_specifier) "struct input_manager" (struct) "struct" (type_identifier) "input_manager" (pointer_declarator) "*input_manager" (*) "*" (field_identifier) "input_manager" (;) ";" (field_declaration) "struct wlr_virtual_pointer_manager_v1 *virtual_pointer_mgr;" (struct_specifier) "struct wlr_virtual_pointer_manager_v1" (struct) "struct" (type_identifier) "wlr_virtual_pointer_manager_v1" (pointer_declarator) "*virtual_pointer_mgr" (*) "*" (field_identifier) "virtual_pointer_mgr" (;) ";" (field_declaration) "struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr;" (struct_specifier) "struct wlr_virtual_keyboard_manager_v1" (struct) "struct" (type_identifier) "wlr_virtual_keyboard_manager_v1" (pointer_declarator) "*virtual_keyboard_mgr" (*) "*" (field_identifier) "virtual_keyboard_mgr" (;) ";" (field_declaration) "struct wlr_relative_pointer_manager_v1 *relative_pointer_mgr;" (struct_specifier) "struct wlr_relative_pointer_manager_v1" (struct) "struct" (type_identifier) "wlr_relative_pointer_manager_v1" (pointer_declarator) "*relative_pointer_mgr" (*) "*" (field_identifier) "relative_pointer_mgr" (;) ";" (field_declaration) "struct wlr_input_inhibit_manager *input_inhibitor_mgr;" (struct_specifier) "struct wlr_input_inhibit_manager" (struct) "struct" (type_identifier) "wlr_input_inhibit_manager" (pointer_declarator) "*input_inhibitor_mgr" (*) "*" (field_identifier) "input_inhibitor_mgr" (;) ";" (field_declaration) "struct wlr_pointer_constraints_v1 *pointer_constraints;" (struct_specifier) "struct wlr_pointer_constraints_v1" (struct) "struct" (type_identifier) "wlr_pointer_constraints_v1" (pointer_declarator) "*pointer_constraints" (*) "*" (field_identifier) "pointer_constraints" (;) ";" (field_declaration) "struct layout *default_layout;" (struct_specifier) "struct layout" (struct) "struct" (type_identifier) "layout" (pointer_declarator) "*default_layout" (*) "*" (field_identifier) "default_layout" (;) ";" (field_declaration) "struct layout_set layout_set;" (struct_specifier) "struct layout_set" (struct) "struct" (type_identifier) "layout_set" (field_identifier) "layout_set" (;) ";" (field_declaration) "struct wlr_output_layout *output_layout;" (struct_specifier) "struct wlr_output_layout" (struct) "struct" (type_identifier) "wlr_output_layout" (pointer_declarator) "*output_layout" (*) "*" (field_identifier) "output_layout" (;) ";" (field_declaration) "GPtrArray *keyboards;" (type_identifier) "GPtrArray" (pointer_declarator) "*keyboards" (*) "*" (field_identifier) "keyboards" (;) ";" (field_declaration) "GPtrArray *registered_key_combos;" (type_identifier) "GPtrArray" (pointer_declarator) "*registered_key_combos" (*) "*" (field_identifier) "registered_key_combos" (;) ";" (field_declaration) "timer_t combo_timer;" (type_identifier) "timer_t" (field_identifier) "combo_timer" (;) ";" (field_declaration) "struct sigevent combo_sig_event;" (struct_specifier) "struct sigevent" (struct) "struct" (type_identifier) "sigevent" (field_identifier) "combo_sig_event" (;) ";" (field_declaration) "GPtrArray *workspaces;" (type_identifier) "GPtrArray" (pointer_declarator) "*workspaces" (*) "*" (field_identifier) "workspaces" (;) ";" (field_declaration) "GPtrArray *scratchpad;" (type_identifier) "GPtrArray" (pointer_declarator) "*scratchpad" (*) "*" (field_identifier) "scratchpad" (;) ";" (field_declaration) "GPtrArray *config_paths;" (type_identifier) "GPtrArray" (pointer_declarator) "*config_paths" (*) "*" (field_identifier) "config_paths" (;) ";" (field_declaration) "char *config_file;" (primitive_type) "char" (pointer_declarator) "*config_file" (*) "*" (field_identifier) "config_file" (;) ";" (field_declaration) "char *config_dir;" (primitive_type) "char" (pointer_declarator) "*config_dir" (*) "*" (field_identifier) "config_dir" (;) ";" (field_declaration) "int previous_workspace;" (primitive_type) "int" (field_identifier) "previous_workspace" (;) ";" (field_declaration) "BitSet *previous_bitset;" (type_identifier) "BitSet" (pointer_declarator) "*previous_bitset" (*) "*" (field_identifier) "previous_bitset" (;) ";" (field_declaration) "GPtrArray *client_lists;" (type_identifier) "GPtrArray" (pointer_declarator) "*client_lists" (*) "*" (field_identifier) "client_lists" (;) ";" (field_declaration) "GPtrArray *normal_clients;" (type_identifier) "GPtrArray" (pointer_declarator) "*normal_clients" (*) "*" (field_identifier) "normal_clients" (;) ";" (field_declaration) "GPtrArray *non_tiled_clients;" (type_identifier) "GPtrArray" (pointer_declarator) "*non_tiled_clients" (*) "*" (field_identifier) "non_tiled_clients" (;) ";" (field_declaration) "GPtrArray *independent_clients;" (type_identifier) "GPtrArray" (pointer_declarator) "*independent_clients" (*) "*" (field_identifier) "independent_clients" (;) ";" (field_declaration) "GPtrArray *mons;" (type_identifier) "GPtrArray" (pointer_declarator) "*mons" (*) "*" (field_identifier) "mons" (;) ";" (field_declaration) "GPtrArray *popups;" (type_identifier) "GPtrArray" (pointer_declarator) "*popups" (*) "*" (field_identifier) "popups" (;) ";" (comment) "// X11 popups are handled as containers" (field_declaration) "GPtrArray *xwayland_popups;" (type_identifier) "GPtrArray" (pointer_declarator) "*xwayland_popups" (*) "*" (field_identifier) "xwayland_popups" (;) ";" (field_declaration) "GPtrArray *tagsets;" (type_identifier) "GPtrArray" (pointer_declarator) "*tagsets" (*) "*" (field_identifier) "tagsets" (;) ";" (field_declaration) "struct wlr_surface *old_surface;" (struct_specifier) "struct wlr_surface" (struct) "struct" (type_identifier) "wlr_surface" (pointer_declarator) "*old_surface" (*) "*" (field_identifier) "old_surface" (;) ";" (field_declaration) "GPtrArray2D *layer_visual_stack_lists;" (type_identifier) "GPtrArray2D" (pointer_declarator) "*layer_visual_stack_lists" (*) "*" (field_identifier) "layer_visual_stack_lists" (;) ";" (field_declaration) "GPtrArray *layer_visual_stack_background;" (type_identifier) "GPtrArray" (pointer_declarator) "*layer_visual_stack_background" (*) "*" (field_identifier) "layer_visual_stack_background" (;) ";" (field_declaration) "GPtrArray *layer_visual_stack_bottom;" (type_identifier) "GPtrArray" (pointer_declarator) "*layer_visual_stack_bottom" (*) "*" (field_identifier) "layer_visual_stack_bottom" (;) ";" (field_declaration) "GPtrArray *layer_visual_stack_top;" (type_identifier) "GPtrArray" (pointer_declarator) "*layer_visual_stack_top" (*) "*" (field_identifier) "layer_visual_stack_top" (;) ";" (field_declaration) "GPtrArray *layer_visual_stack_overlay;" (type_identifier) "GPtrArray" (pointer_declarator) "*layer_visual_stack_overlay" (*) "*" (field_identifier) "layer_visual_stack_overlay" (;) ";" (field_declaration) "GPtrArray *floating_stack;" (type_identifier) "GPtrArray" (pointer_declarator) "*floating_stack" (*) "*" (field_identifier) "floating_stack" (;) ";" (field_declaration) "GPtrArray *floating_containers;" (type_identifier) "GPtrArray" (pointer_declarator) "*floating_containers" (*) "*" (field_identifier) "floating_containers" (;) ";" (comment) "/* global event handlers */" (field_declaration) "struct wl_listener new_output;" (struct_specifier) "struct wl_listener" (struct) "struct" (type_identifier) "wl_listener" (field_identifier) "new_output" (;) ";" (field_declaration) "struct wl_listener new_xdeco;" (struct_specifier) "struct wl_listener" (struct) "struct" (type_identifier) "wl_listener" (field_identifier) "new_xdeco" (;) ";" (field_declaration) "struct wl_listener new_xdg_surface;" (struct_specifier) "struct wl_listener" (struct) "struct" (type_identifier) "wl_listener" (field_identifier) "new_xdg_surface" (;) ";" (field_declaration) "struct wl_listener new_layer_shell_surface;" (struct_specifier) "struct wl_listener" (struct) "struct" (type_identifier) "wl_listener" (field_identifier) "new_layer_shell_surface" (;) ";" (field_declaration) "struct wl_listener new_pointer_constraint;" (struct_specifier) "struct wl_listener" (struct) "struct" (type_identifier) "wl_listener" (field_identifier) "new_pointer_constraint" (;) ";" (comment) "// TODO: give them a more sensible name they are here to fix a bug for" (comment) "// sloppy focus" (field_declaration) "struct container *old_xy_container;" (struct_specifier) "struct container" (struct) "struct" (type_identifier) "container" (pointer_declarator) "*old_xy_container" (*) "*" (field_identifier) "old_xy_container" (;) ";" (field_declaration) "bool xy_container_is_locked;" (primitive_type) "bool" (field_identifier) "xy_container_is_locked" (;) ";" (preproc_if) "#if JAPOKWM_HAS_XWAYLAND\n struct xwayland xwayland;\n struct wl_listener xwayland_ready;\n\n struct wl_listener new_xwayland_surface;\n#endif" (#if) "#if" (identifier) "JAPOKWM_HAS_XWAYLAND" ( ) "\n" (field_declaration) "struct xwayland xwayland;" (struct_specifier) "struct xwayland" (struct) "struct" (type_identifier) "xwayland" (field_identifier) "xwayland" (;) ";" (field_declaration) "struct wl_listener xwayland_ready;" (struct_specifier) "struct wl_listener" (struct) "struct" (type_identifier) "wl_listener" (field_identifier) "xwayland_ready" (;) ";" (field_declaration) "struct wl_listener new_xwayland_surface;" (struct_specifier) "struct wl_listener" (struct) "struct" (type_identifier) "wl_listener" (field_identifier) "new_xwayland_surface" (;) ";" (#endif) "#endif" (}) "}" (;) ";" (declaration) "extern struct server server;" (storage_class_specifier) "extern" (extern) "extern" (struct_specifier) "struct server" (struct) "struct" (type_identifier) "server" (identifier) "server" (;) ";" (declaration) "void init_server();" (primitive_type) "void" (function_declarator) "init_server()" (identifier) "init_server" (parameter_list) "()" (() "(" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* SERVER_H */"
456
0
{"language": "c", "success": true, "metadata": {"lines": 82, "avg_line_length": 33.33, "nodes": 368, "errors": 0, "source_hash": "860a0f98e82694bc4863b6ee20269a28fb51d91251b6652202444cabf557bd01", "categorized_nodes": 278}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SERVER_H\n#define SERVER_H\n#include <wayland-server.h>\n#include <wlr/types/wlr_cursor.h>\n#include <wlr/types/wlr_virtual_pointer_v1.h>\n#include <wlr/types/wlr_virtual_keyboard_v1.h>\n#include <wlr/xcursor.h>\n#include <wayland-server-core.h>\n#include <wlr/types/wlr_xcursor_manager.h>\n#include <wlr/types/wlr_relative_pointer_v1.h>\n#include <glib.h>\n\n#include \"cursor.h\"\n#include \"layout.h\"\n#include \"options.h\"\n#include \"xwayland.h\"\n#include \"input_manager.h\"\n#include \"utils/coreUtils.h\"\n#include \"bitset/bitset.h\"\n\nstruct server {\n struct wl_display *wl_display;\n struct wl_event_loop *wl_event_loop;\n struct wlr_backend *backend;\n struct wlr_compositor *compositor;\n\n struct wlr_xdg_shell *xdg_shell;\n struct wlr_layer_shell_v1 *layer_shell;\n struct wlr_xdg_decoration_manager_v1 *xdeco_mgr;\n\n struct input_manager *input_manager;\n\n struct wlr_virtual_pointer_manager_v1 *virtual_pointer_mgr;\n struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr;\n struct wlr_relative_pointer_manager_v1 *relative_pointer_mgr;\n struct wlr_input_inhibit_manager *input_inhibitor_mgr;\n struct wlr_pointer_constraints_v1 *pointer_constraints;\n\n struct layout *default_layout;\n struct layout_set layout_set;\n\n struct wlr_output_layout *output_layout;\n GPtrArray *keyboards;\n\n GPtrArray *registered_key_combos;\n timer_t combo_timer;\n struct sigevent combo_sig_event;\n\n GPtrArray *workspaces;\n\n GPtrArray *scratchpad;\n\n GPtrArray *config_paths;\n char *config_file;\n char *config_dir;\n\n int previous_workspace;\n BitSet *previous_bitset;\n\n GPtrArray *client_lists;\n GPtrArray *normal_clients;\n GPtrArray *non_tiled_clients;\n GPtrArray *independent_clients;\n\n GPtrArray *mons;\n GPtrArray *popups;\n // X11 popups are handled as containers\n GPtrArray *xwayland_popups;\n\n GPtrArray *tagsets;\n\n struct wlr_surface *old_surface;\n\n GPtrArray2D *layer_visual_stack_lists;\n\n GPtrArray *layer_visual_stack_background;\n GPtrArray *layer_visual_stack_bottom;\n GPtrArray *layer_visual_stack_top;\n GPtrArray *layer_visual_stack_overlay;\n\n GPtrArray *floating_stack;\n GPtrArray *floating_containers;\n\n /* global event handlers */\n struct wl_listener new_output;\n struct wl_listener new_xdeco;\n struct wl_listener new_xdg_surface;\n struct wl_listener new_layer_shell_surface;\n struct wl_listener new_pointer_constraint;\n\n // TODO: give them a more sensible name they are here to fix a bug for\n // sloppy focus\n struct container *old_xy_container;\n bool xy_container_is_locked;\n\n#if JAPOKWM_HAS_XWAYLAND\n struct xwayland xwayland;\n struct wl_listener xwayland_ready;\n\n struct wl_listener new_xwayland_surface;\n#endif\n};\n\nextern struct server server;\n\nvoid init_server();\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, 355, 362, 367], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 106, "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": "SERVER_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 16}}, {"id": 3, "type": "preproc_def", "text": "#define SERVER_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": "SERVER_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include <wayland-server.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<wayland-server.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 27}}, {"id": 9, "type": "preproc_include", "text": "#include <wlr/types/wlr_cursor.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<wlr/types/wlr_cursor.h>", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 33}}, {"id": 12, "type": "preproc_include", "text": "#include <wlr/types/wlr_virtual_pointer_v1.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<wlr/types/wlr_virtual_pointer_v1.h>", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 45}}, {"id": 15, "type": "preproc_include", "text": "#include <wlr/types/wlr_virtual_keyboard_v1.h>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<wlr/types/wlr_virtual_keyboard_v1.h>", "parent": 15, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 46}}, {"id": 18, "type": "preproc_include", "text": "#include <wlr/xcursor.h>\n", "parent": 0, "children": [19, 20], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<wlr/xcursor.h>", "parent": 18, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 24}}, {"id": 21, "type": "preproc_include", "text": "#include <wayland-server-core.h>\n", "parent": 0, "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": "<wayland-server-core.h>", "parent": 21, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 32}}, {"id": 24, "type": "preproc_include", "text": "#include <wlr/types/wlr_xcursor_manager.h>\n", "parent": 0, "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": "<wlr/types/wlr_xcursor_manager.h>", "parent": 24, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 42}}, {"id": 27, "type": "preproc_include", "text": "#include <wlr/types/wlr_relative_pointer_v1.h>\n", "parent": 0, "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": "<wlr/types/wlr_relative_pointer_v1.h>", "parent": 27, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 46}}, {"id": 30, "type": "preproc_include", "text": "#include <glib.h>\n", "parent": 0, "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": "<glib.h>", "parent": 30, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 17}}, {"id": 33, "type": "preproc_include", "text": "#include \"cursor.h\"\n", "parent": 0, "children": [34, 35], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"cursor.h\"", "parent": 33, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 36, "type": "preproc_include", "text": "#include \"layout.h\"\n", "parent": 0, "children": [37, 38], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"layout.h\"", "parent": 36, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 19}}, {"id": 39, "type": "preproc_include", "text": "#include \"options.h\"\n", "parent": 0, "children": [40, 41], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 41, "type": "string_literal", "text": "\"options.h\"", "parent": 39, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 20}}, {"id": 42, "type": "preproc_include", "text": "#include \"xwayland.h\"\n", "parent": 0, "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": "string_literal", "text": "\"xwayland.h\"", "parent": 42, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 21}}, {"id": 45, "type": "preproc_include", "text": "#include \"input_manager.h\"\n", "parent": 0, "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": "string_literal", "text": "\"input_manager.h\"", "parent": 45, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 26}}, {"id": 48, "type": "preproc_include", "text": "#include \"utils/coreUtils.h\"\n", "parent": 0, "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": "string_literal", "text": "\"utils/coreUtils.h\"", "parent": 48, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 28}}, {"id": 51, "type": "preproc_include", "text": "#include \"bitset/bitset.h\"\n", "parent": 0, "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": "string_literal", "text": "\"bitset/bitset.h\"", "parent": 51, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 26}}, {"id": 54, "type": "struct_specifier", "text": "struct server {\n struct wl_display *wl_display;\n struct wl_event_loop *wl_event_loop;\n struct wlr_backend *backend;\n struct wlr_compositor *compositor;\n\n struct wlr_xdg_shell *xdg_shell;\n struct wlr_layer_shell_v1 *layer_shell;\n struct wlr_xdg_decoration_manager_v1 *xdeco_mgr;\n\n struct input_manager *input_manager;\n\n struct wlr_virtual_pointer_manager_v1 *virtual_pointer_mgr;\n struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr;\n struct wlr_relative_pointer_manager_v1 *relative_pointer_mgr;\n struct wlr_input_inhibit_manager *input_inhibitor_mgr;\n struct wlr_pointer_constraints_v1 *pointer_constraints;\n\n struct layout *default_layout;\n struct layout_set layout_set;\n\n struct wlr_output_layout *output_layout;\n GPtrArray *keyboards;\n\n GPtrArray *registered_key_combos;\n timer_t combo_timer;\n struct sigevent combo_sig_event;\n\n GPtrArray *workspaces;\n\n GPtrArray *scratchpad;\n\n GPtrArray *config_paths;\n char *config_file;\n char *config_dir;\n\n int previous_workspace;\n BitSet *previous_bitset;\n\n GPtrArray *client_lists;\n GPtrArray *normal_clients;\n GPtrArray *non_tiled_clients;\n GPtrArray *independent_clients;\n\n GPtrArray *mons;\n GPtrArray *popups;\n // X11 popups are handled as containers\n GPtrArray *xwayland_popups;\n\n GPtrArray *tagsets;\n\n struct wlr_surface *old_surface;\n\n GPtrArray2D *layer_visual_stack_lists;\n\n GPtrArray *layer_visual_stack_background;\n GPtrArray *layer_visual_stack_bottom;\n GPtrArray *layer_visual_stack_top;\n GPtrArray *layer_visual_stack_overlay;\n\n GPtrArray *floating_stack;\n GPtrArray *floating_containers;\n\n /* global event handlers */\n struct wl_listener new_output;\n struct wl_listener new_xdeco;\n struct wl_listener new_xdg_surface;\n struct wl_listener new_layer_shell_surface;\n struct wl_listener new_pointer_constraint;\n\n // TODO: give them a more sensible name they are here to fix a bug for\n // sloppy focus\n struct container *old_xy_container;\n bool xy_container_is_locked;\n\n#if JAPOKWM_HAS_XWAYLAND\n struct xwayland xwayland;\n struct wl_listener xwayland_ready;\n\n struct wl_listener new_xwayland_surface;\n#endif\n}", "parent": 0, "children": [55, 56], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 101, "column": 1}}, {"id": 55, "type": "struct", "text": "struct", "parent": 54, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 56, "type": "type_identifier", "text": "server", "parent": 54, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 13}}, {"id": 57, "type": "field_declaration", "text": "struct wl_display *wl_display;", "parent": 54, "children": [58, 61], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 34}}, {"id": 58, "type": "struct_specifier", "text": "struct wl_display", "parent": 57, "children": [59, 60], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 21}}, {"id": 59, "type": "struct", "text": "struct", "parent": 58, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 10}}, {"id": 60, "type": "type_identifier", "text": "wl_display", "parent": 58, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 21}}, {"id": 61, "type": "pointer_declarator", "text": "*wl_display", "parent": 57, "children": [62, 63], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 33}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 23}}, {"id": 63, "type": "field_identifier", "text": "wl_display", "parent": 61, "children": [], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 33}}, {"id": 64, "type": "field_declaration", "text": "struct wl_event_loop *wl_event_loop;", "parent": 54, "children": [65, 68], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 40}}, {"id": 65, "type": "struct_specifier", "text": "struct wl_event_loop", "parent": 64, "children": [66, 67], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 24}}, {"id": 66, "type": "struct", "text": "struct", "parent": 65, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 10}}, {"id": 67, "type": "type_identifier", "text": "wl_event_loop", "parent": 65, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 24}}, {"id": 68, "type": "pointer_declarator", "text": "*wl_event_loop", "parent": 64, "children": [69, 70], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 39}}, {"id": 69, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 26}}, {"id": 70, "type": "field_identifier", "text": "wl_event_loop", "parent": 68, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 39}}, {"id": 71, "type": "field_declaration", "text": "struct wlr_backend *backend;", "parent": 54, "children": [72, 75], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 32}}, {"id": 72, "type": "struct_specifier", "text": "struct wlr_backend", "parent": 71, "children": [73, 74], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 22}}, {"id": 73, "type": "struct", "text": "struct", "parent": 72, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 10}}, {"id": 74, "type": "type_identifier", "text": "wlr_backend", "parent": 72, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 22}}, {"id": 75, "type": "pointer_declarator", "text": "*backend", "parent": 71, "children": [76, 77], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 31}}, {"id": 76, "type": "*", "text": "*", "parent": 75, "children": [], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 24}}, {"id": 77, "type": "field_identifier", "text": "backend", "parent": 75, "children": [], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 31}}, {"id": 78, "type": "field_declaration", "text": "struct wlr_compositor *compositor;", "parent": 54, "children": [79, 82], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 38}}, {"id": 79, "type": "struct_specifier", "text": "struct wlr_compositor", "parent": 78, "children": [80, 81], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 25}}, {"id": 80, "type": "struct", "text": "struct", "parent": 79, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 10}}, {"id": 81, "type": "type_identifier", "text": "wlr_compositor", "parent": 79, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 25}}, {"id": 82, "type": "pointer_declarator", "text": "*compositor", "parent": 78, "children": [83, 84], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 37}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 27}}, {"id": 84, "type": "field_identifier", "text": "compositor", "parent": 82, "children": [], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 37}}, {"id": 85, "type": "field_declaration", "text": "struct wlr_xdg_shell *xdg_shell;", "parent": 54, "children": [86, 89], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 36}}, {"id": 86, "type": "struct_specifier", "text": "struct wlr_xdg_shell", "parent": 85, "children": [87, 88], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 24}}, {"id": 87, "type": "struct", "text": "struct", "parent": 86, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 10}}, {"id": 88, "type": "type_identifier", "text": "wlr_xdg_shell", "parent": 86, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 24}}, {"id": 89, "type": "pointer_declarator", "text": "*xdg_shell", "parent": 85, "children": [90, 91], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 35}}, {"id": 90, "type": "*", "text": "*", "parent": 89, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 26}}, {"id": 91, "type": "field_identifier", "text": "xdg_shell", "parent": 89, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 35}}, {"id": 92, "type": "field_declaration", "text": "struct wlr_layer_shell_v1 *layer_shell;", "parent": 54, "children": [93, 96], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 43}}, {"id": 93, "type": "struct_specifier", "text": "struct wlr_layer_shell_v1", "parent": 92, "children": [94, 95], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 29}}, {"id": 94, "type": "struct", "text": "struct", "parent": 93, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 10}}, {"id": 95, "type": "type_identifier", "text": "wlr_layer_shell_v1", "parent": 93, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 29}}, {"id": 96, "type": "pointer_declarator", "text": "*layer_shell", "parent": 92, "children": [97, 98], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 42}}, {"id": 97, "type": "*", "text": "*", "parent": 96, "children": [], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 31}}, {"id": 98, "type": "field_identifier", "text": "layer_shell", "parent": 96, "children": [], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 42}}, {"id": 99, "type": "field_declaration", "text": "struct wlr_xdg_decoration_manager_v1 *xdeco_mgr;", "parent": 54, "children": [100, 103], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 52}}, {"id": 100, "type": "struct_specifier", "text": "struct wlr_xdg_decoration_manager_v1", "parent": 99, "children": [101, 102], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 40}}, {"id": 101, "type": "struct", "text": "struct", "parent": 100, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 10}}, {"id": 102, "type": "type_identifier", "text": "wlr_xdg_decoration_manager_v1", "parent": 100, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 40}}, {"id": 103, "type": "pointer_declarator", "text": "*xdeco_mgr", "parent": 99, "children": [104, 105], "start_point": {"row": 28, "column": 41}, "end_point": {"row": 28, "column": 51}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 28, "column": 41}, "end_point": {"row": 28, "column": 42}}, {"id": 105, "type": "field_identifier", "text": "xdeco_mgr", "parent": 103, "children": [], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 51}}, {"id": 106, "type": "field_declaration", "text": "struct input_manager *input_manager;", "parent": 54, "children": [107, 110], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 40}}, {"id": 107, "type": "struct_specifier", "text": "struct input_manager", "parent": 106, "children": [108, 109], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 24}}, {"id": 108, "type": "struct", "text": "struct", "parent": 107, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 10}}, {"id": 109, "type": "type_identifier", "text": "input_manager", "parent": 107, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 24}}, {"id": 110, "type": "pointer_declarator", "text": "*input_manager", "parent": 106, "children": [111, 112], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 39}}, {"id": 111, "type": "*", "text": "*", "parent": 110, "children": [], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 26}}, {"id": 112, "type": "field_identifier", "text": "input_manager", "parent": 110, "children": [], "start_point": {"row": 30, "column": 26}, "end_point": {"row": 30, "column": 39}}, {"id": 113, "type": "field_declaration", "text": "struct wlr_virtual_pointer_manager_v1 *virtual_pointer_mgr;", "parent": 54, "children": [114, 117], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 63}}, {"id": 114, "type": "struct_specifier", "text": "struct wlr_virtual_pointer_manager_v1", "parent": 113, "children": [115, 116], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 41}}, {"id": 115, "type": "struct", "text": "struct", "parent": 114, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 10}}, {"id": 116, "type": "type_identifier", "text": "wlr_virtual_pointer_manager_v1", "parent": 114, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 41}}, {"id": 117, "type": "pointer_declarator", "text": "*virtual_pointer_mgr", "parent": 113, "children": [118, 119], "start_point": {"row": 32, "column": 42}, "end_point": {"row": 32, "column": 62}}, {"id": 118, "type": "*", "text": "*", "parent": 117, "children": [], "start_point": {"row": 32, "column": 42}, "end_point": {"row": 32, "column": 43}}, {"id": 119, "type": "field_identifier", "text": "virtual_pointer_mgr", "parent": 117, "children": [], "start_point": {"row": 32, "column": 43}, "end_point": {"row": 32, "column": 62}}, {"id": 120, "type": "field_declaration", "text": "struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr;", "parent": 54, "children": [121, 124], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 65}}, {"id": 121, "type": "struct_specifier", "text": "struct wlr_virtual_keyboard_manager_v1", "parent": 120, "children": [122, 123], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 42}}, {"id": 122, "type": "struct", "text": "struct", "parent": 121, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 10}}, {"id": 123, "type": "type_identifier", "text": "wlr_virtual_keyboard_manager_v1", "parent": 121, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 42}}, {"id": 124, "type": "pointer_declarator", "text": "*virtual_keyboard_mgr", "parent": 120, "children": [125, 126], "start_point": {"row": 33, "column": 43}, "end_point": {"row": 33, "column": 64}}, {"id": 125, "type": "*", "text": "*", "parent": 124, "children": [], "start_point": {"row": 33, "column": 43}, "end_point": {"row": 33, "column": 44}}, {"id": 126, "type": "field_identifier", "text": "virtual_keyboard_mgr", "parent": 124, "children": [], "start_point": {"row": 33, "column": 44}, "end_point": {"row": 33, "column": 64}}, {"id": 127, "type": "field_declaration", "text": "struct wlr_relative_pointer_manager_v1 *relative_pointer_mgr;", "parent": 54, "children": [128, 131], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 65}}, {"id": 128, "type": "struct_specifier", "text": "struct wlr_relative_pointer_manager_v1", "parent": 127, "children": [129, 130], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 42}}, {"id": 129, "type": "struct", "text": "struct", "parent": 128, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 130, "type": "type_identifier", "text": "wlr_relative_pointer_manager_v1", "parent": 128, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 42}}, {"id": 131, "type": "pointer_declarator", "text": "*relative_pointer_mgr", "parent": 127, "children": [132, 133], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 64}}, {"id": 132, "type": "*", "text": "*", "parent": 131, "children": [], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 44}}, {"id": 133, "type": "field_identifier", "text": "relative_pointer_mgr", "parent": 131, "children": [], "start_point": {"row": 34, "column": 44}, "end_point": {"row": 34, "column": 64}}, {"id": 134, "type": "field_declaration", "text": "struct wlr_input_inhibit_manager *input_inhibitor_mgr;", "parent": 54, "children": [135, 138], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 58}}, {"id": 135, "type": "struct_specifier", "text": "struct wlr_input_inhibit_manager", "parent": 134, "children": [136, 137], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 36}}, {"id": 136, "type": "struct", "text": "struct", "parent": 135, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 10}}, {"id": 137, "type": "type_identifier", "text": "wlr_input_inhibit_manager", "parent": 135, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 36}}, {"id": 138, "type": "pointer_declarator", "text": "*input_inhibitor_mgr", "parent": 134, "children": [139, 140], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 57}}, {"id": 139, "type": "*", "text": "*", "parent": 138, "children": [], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 38}}, {"id": 140, "type": "field_identifier", "text": "input_inhibitor_mgr", "parent": 138, "children": [], "start_point": {"row": 35, "column": 38}, "end_point": {"row": 35, "column": 57}}, {"id": 141, "type": "field_declaration", "text": "struct wlr_pointer_constraints_v1 *pointer_constraints;", "parent": 54, "children": [142, 145], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 59}}, {"id": 142, "type": "struct_specifier", "text": "struct wlr_pointer_constraints_v1", "parent": 141, "children": [143, 144], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 37}}, {"id": 143, "type": "struct", "text": "struct", "parent": 142, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 10}}, {"id": 144, "type": "type_identifier", "text": "wlr_pointer_constraints_v1", "parent": 142, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 37}}, {"id": 145, "type": "pointer_declarator", "text": "*pointer_constraints", "parent": 141, "children": [146, 147], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 58}}, {"id": 146, "type": "*", "text": "*", "parent": 145, "children": [], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 39}}, {"id": 147, "type": "field_identifier", "text": "pointer_constraints", "parent": 145, "children": [], "start_point": {"row": 36, "column": 39}, "end_point": {"row": 36, "column": 58}}, {"id": 148, "type": "field_declaration", "text": "struct layout *default_layout;", "parent": 54, "children": [149, 152], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 34}}, {"id": 149, "type": "struct_specifier", "text": "struct layout", "parent": 148, "children": [150, 151], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 17}}, {"id": 150, "type": "struct", "text": "struct", "parent": 149, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 10}}, {"id": 151, "type": "type_identifier", "text": "layout", "parent": 149, "children": [], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 17}}, {"id": 152, "type": "pointer_declarator", "text": "*default_layout", "parent": 148, "children": [153, 154], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 33}}, {"id": 153, "type": "*", "text": "*", "parent": 152, "children": [], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 19}}, {"id": 154, "type": "field_identifier", "text": "default_layout", "parent": 152, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 33}}, {"id": 155, "type": "field_declaration", "text": "struct layout_set layout_set;", "parent": 54, "children": [156, 159], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 33}}, {"id": 156, "type": "struct_specifier", "text": "struct layout_set", "parent": 155, "children": [157, 158], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 21}}, {"id": 157, "type": "struct", "text": "struct", "parent": 156, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 10}}, {"id": 158, "type": "type_identifier", "text": "layout_set", "parent": 156, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 21}}, {"id": 159, "type": "field_identifier", "text": "layout_set", "parent": 155, "children": [], "start_point": {"row": 39, "column": 22}, "end_point": {"row": 39, "column": 32}}, {"id": 160, "type": "field_declaration", "text": "struct wlr_output_layout *output_layout;", "parent": 54, "children": [161, 164], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 44}}, {"id": 161, "type": "struct_specifier", "text": "struct wlr_output_layout", "parent": 160, "children": [162, 163], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 28}}, {"id": 162, "type": "struct", "text": "struct", "parent": 161, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 10}}, {"id": 163, "type": "type_identifier", "text": "wlr_output_layout", "parent": 161, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 28}}, {"id": 164, "type": "pointer_declarator", "text": "*output_layout", "parent": 160, "children": [165, 166], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 43}}, {"id": 165, "type": "*", "text": "*", "parent": 164, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 30}}, {"id": 166, "type": "field_identifier", "text": "output_layout", "parent": 164, "children": [], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 43}}, {"id": 167, "type": "field_declaration", "text": "GPtrArray *keyboards;", "parent": 54, "children": [168, 169], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 25}}, {"id": 168, "type": "type_identifier", "text": "GPtrArray", "parent": 167, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 13}}, {"id": 169, "type": "pointer_declarator", "text": "*keyboards", "parent": 167, "children": [170, 171], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 24}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 15}}, {"id": 171, "type": "field_identifier", "text": "keyboards", "parent": 169, "children": [], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 24}}, {"id": 172, "type": "field_declaration", "text": "GPtrArray *registered_key_combos;", "parent": 54, "children": [173, 174], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 37}}, {"id": 173, "type": "type_identifier", "text": "GPtrArray", "parent": 172, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 13}}, {"id": 174, "type": "pointer_declarator", "text": "*registered_key_combos", "parent": 172, "children": [175, 176], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 36}}, {"id": 175, "type": "*", "text": "*", "parent": 174, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 15}}, {"id": 176, "type": "field_identifier", "text": "registered_key_combos", "parent": 174, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 36}}, {"id": 177, "type": "field_declaration", "text": "timer_t combo_timer;", "parent": 54, "children": [178, 179], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 24}}, {"id": 178, "type": "type_identifier", "text": "timer_t", "parent": 177, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 11}}, {"id": 179, "type": "field_identifier", "text": "combo_timer", "parent": 177, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 23}}, {"id": 180, "type": "field_declaration", "text": "struct sigevent combo_sig_event;", "parent": 54, "children": [181, 184], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 36}}, {"id": 181, "type": "struct_specifier", "text": "struct sigevent", "parent": 180, "children": [182, 183], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 19}}, {"id": 182, "type": "struct", "text": "struct", "parent": 181, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 10}}, {"id": 183, "type": "type_identifier", "text": "sigevent", "parent": 181, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 19}}, {"id": 184, "type": "field_identifier", "text": "combo_sig_event", "parent": 180, "children": [], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 35}}, {"id": 185, "type": "field_declaration", "text": "GPtrArray *workspaces;", "parent": 54, "children": [186, 187], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 26}}, {"id": 186, "type": "type_identifier", "text": "GPtrArray", "parent": 185, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 13}}, {"id": 187, "type": "pointer_declarator", "text": "*workspaces", "parent": 185, "children": [188, 189], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 25}}, {"id": 188, "type": "*", "text": "*", "parent": 187, "children": [], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 15}}, {"id": 189, "type": "field_identifier", "text": "workspaces", "parent": 187, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 25}}, {"id": 190, "type": "field_declaration", "text": "GPtrArray *scratchpad;", "parent": 54, "children": [191, 192], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 26}}, {"id": 191, "type": "type_identifier", "text": "GPtrArray", "parent": 190, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 13}}, {"id": 192, "type": "pointer_declarator", "text": "*scratchpad", "parent": 190, "children": [193, 194], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 25}}, {"id": 193, "type": "*", "text": "*", "parent": 192, "children": [], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 15}}, {"id": 194, "type": "field_identifier", "text": "scratchpad", "parent": 192, "children": [], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 25}}, {"id": 195, "type": "field_declaration", "text": "GPtrArray *config_paths;", "parent": 54, "children": [196, 197], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 28}}, {"id": 196, "type": "type_identifier", "text": "GPtrArray", "parent": 195, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 13}}, {"id": 197, "type": "pointer_declarator", "text": "*config_paths", "parent": 195, "children": [198, 199], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 27}}, {"id": 198, "type": "*", "text": "*", "parent": 197, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 15}}, {"id": 199, "type": "field_identifier", "text": "config_paths", "parent": 197, "children": [], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 27}}, {"id": 200, "type": "field_declaration", "text": "char *config_file;", "parent": 54, "children": [201, 202], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 22}}, {"id": 201, "type": "primitive_type", "text": "char", "parent": 200, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 8}}, {"id": 202, "type": "pointer_declarator", "text": "*config_file", "parent": 200, "children": [203, 204], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 21}}, {"id": 203, "type": "*", "text": "*", "parent": 202, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 10}}, {"id": 204, "type": "field_identifier", "text": "config_file", "parent": 202, "children": [], "start_point": {"row": 53, "column": 10}, "end_point": {"row": 53, "column": 21}}, {"id": 205, "type": "field_declaration", "text": "char *config_dir;", "parent": 54, "children": [206, 207], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 21}}, {"id": 206, "type": "primitive_type", "text": "char", "parent": 205, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 8}}, {"id": 207, "type": "pointer_declarator", "text": "*config_dir", "parent": 205, "children": [208, 209], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 20}}, {"id": 208, "type": "*", "text": "*", "parent": 207, "children": [], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 10}}, {"id": 209, "type": "field_identifier", "text": "config_dir", "parent": 207, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 20}}, {"id": 210, "type": "field_declaration", "text": "int previous_workspace;", "parent": 54, "children": [211, 212], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 27}}, {"id": 211, "type": "primitive_type", "text": "int", "parent": 210, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 7}}, {"id": 212, "type": "field_identifier", "text": "previous_workspace", "parent": 210, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 26}}, {"id": 213, "type": "field_declaration", "text": "BitSet *previous_bitset;", "parent": 54, "children": [214, 215], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 28}}, {"id": 214, "type": "type_identifier", "text": "BitSet", "parent": 213, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 10}}, {"id": 215, "type": "pointer_declarator", "text": "*previous_bitset", "parent": 213, "children": [216, 217], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 27}}, {"id": 216, "type": "*", "text": "*", "parent": 215, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 12}}, {"id": 217, "type": "field_identifier", "text": "previous_bitset", "parent": 215, "children": [], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 27}}, {"id": 218, "type": "field_declaration", "text": "GPtrArray *client_lists;", "parent": 54, "children": [219, 220], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 28}}, {"id": 219, "type": "type_identifier", "text": "GPtrArray", "parent": 218, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 13}}, {"id": 220, "type": "pointer_declarator", "text": "*client_lists", "parent": 218, "children": [221, 222], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 27}}, {"id": 221, "type": "*", "text": "*", "parent": 220, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 15}}, {"id": 222, "type": "field_identifier", "text": "client_lists", "parent": 220, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 27}}, {"id": 223, "type": "field_declaration", "text": "GPtrArray *normal_clients;", "parent": 54, "children": [224, 225], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 30}}, {"id": 224, "type": "type_identifier", "text": "GPtrArray", "parent": 223, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 13}}, {"id": 225, "type": "pointer_declarator", "text": "*normal_clients", "parent": 223, "children": [226, 227], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 29}}, {"id": 226, "type": "*", "text": "*", "parent": 225, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 15}}, {"id": 227, "type": "field_identifier", "text": "normal_clients", "parent": 225, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 29}}, {"id": 228, "type": "field_declaration", "text": "GPtrArray *non_tiled_clients;", "parent": 54, "children": [229, 230], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 33}}, {"id": 229, "type": "type_identifier", "text": "GPtrArray", "parent": 228, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 13}}, {"id": 230, "type": "pointer_declarator", "text": "*non_tiled_clients", "parent": 228, "children": [231, 232], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 32}}, {"id": 231, "type": "*", "text": "*", "parent": 230, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 15}}, {"id": 232, "type": "field_identifier", "text": "non_tiled_clients", "parent": 230, "children": [], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 32}}, {"id": 233, "type": "field_declaration", "text": "GPtrArray *independent_clients;", "parent": 54, "children": [234, 235], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 35}}, {"id": 234, "type": "type_identifier", "text": "GPtrArray", "parent": 233, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 13}}, {"id": 235, "type": "pointer_declarator", "text": "*independent_clients", "parent": 233, "children": [236, 237], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 34}}, {"id": 236, "type": "*", "text": "*", "parent": 235, "children": [], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 15}}, {"id": 237, "type": "field_identifier", "text": "independent_clients", "parent": 235, "children": [], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 34}}, {"id": 238, "type": "field_declaration", "text": "GPtrArray *mons;", "parent": 54, "children": [239, 240], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 20}}, {"id": 239, "type": "type_identifier", "text": "GPtrArray", "parent": 238, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 13}}, {"id": 240, "type": "pointer_declarator", "text": "*mons", "parent": 238, "children": [241, 242], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 19}}, {"id": 241, "type": "*", "text": "*", "parent": 240, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 15}}, {"id": 242, "type": "field_identifier", "text": "mons", "parent": 240, "children": [], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 19}}, {"id": 243, "type": "field_declaration", "text": "GPtrArray *popups;", "parent": 54, "children": [244, 245], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 22}}, {"id": 244, "type": "type_identifier", "text": "GPtrArray", "parent": 243, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 13}}, {"id": 245, "type": "pointer_declarator", "text": "*popups", "parent": 243, "children": [246, 247], "start_point": {"row": 65, "column": 14}, "end_point": {"row": 65, "column": 21}}, {"id": 246, "type": "*", "text": "*", "parent": 245, "children": [], "start_point": {"row": 65, "column": 14}, "end_point": {"row": 65, "column": 15}}, {"id": 247, "type": "field_identifier", "text": "popups", "parent": 245, "children": [], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 21}}, {"id": 248, "type": "field_declaration", "text": "GPtrArray *xwayland_popups;", "parent": 54, "children": [249, 250], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 31}}, {"id": 249, "type": "type_identifier", "text": "GPtrArray", "parent": 248, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 13}}, {"id": 250, "type": "pointer_declarator", "text": "*xwayland_popups", "parent": 248, "children": [251, 252], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 30}}, {"id": 251, "type": "*", "text": "*", "parent": 250, "children": [], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 15}}, {"id": 252, "type": "field_identifier", "text": "xwayland_popups", "parent": 250, "children": [], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 30}}, {"id": 253, "type": "field_declaration", "text": "GPtrArray *tagsets;", "parent": 54, "children": [254, 255], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 23}}, {"id": 254, "type": "type_identifier", "text": "GPtrArray", "parent": 253, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 13}}, {"id": 255, "type": "pointer_declarator", "text": "*tagsets", "parent": 253, "children": [256, 257], "start_point": {"row": 69, "column": 14}, "end_point": {"row": 69, "column": 22}}, {"id": 256, "type": "*", "text": "*", "parent": 255, "children": [], "start_point": {"row": 69, "column": 14}, "end_point": {"row": 69, "column": 15}}, {"id": 257, "type": "field_identifier", "text": "tagsets", "parent": 255, "children": [], "start_point": {"row": 69, "column": 15}, "end_point": {"row": 69, "column": 22}}, {"id": 258, "type": "field_declaration", "text": "struct wlr_surface *old_surface;", "parent": 54, "children": [259, 262], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 36}}, {"id": 259, "type": "struct_specifier", "text": "struct wlr_surface", "parent": 258, "children": [260, 261], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 22}}, {"id": 260, "type": "struct", "text": "struct", "parent": 259, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 10}}, {"id": 261, "type": "type_identifier", "text": "wlr_surface", "parent": 259, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 22}}, {"id": 262, "type": "pointer_declarator", "text": "*old_surface", "parent": 258, "children": [263, 264], "start_point": {"row": 71, "column": 23}, "end_point": {"row": 71, "column": 35}}, {"id": 263, "type": "*", "text": "*", "parent": 262, "children": [], "start_point": {"row": 71, "column": 23}, "end_point": {"row": 71, "column": 24}}, {"id": 264, "type": "field_identifier", "text": "old_surface", "parent": 262, "children": [], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 35}}, {"id": 265, "type": "field_declaration", "text": "GPtrArray2D *layer_visual_stack_lists;", "parent": 54, "children": [266, 267], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 42}}, {"id": 266, "type": "type_identifier", "text": "GPtrArray2D", "parent": 265, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 15}}, {"id": 267, "type": "pointer_declarator", "text": "*layer_visual_stack_lists", "parent": 265, "children": [268, 269], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 41}}, {"id": 268, "type": "*", "text": "*", "parent": 267, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 17}}, {"id": 269, "type": "field_identifier", "text": "layer_visual_stack_lists", "parent": 267, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 41}}, {"id": 270, "type": "field_declaration", "text": "GPtrArray *layer_visual_stack_background;", "parent": 54, "children": [271, 272], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 45}}, {"id": 271, "type": "type_identifier", "text": "GPtrArray", "parent": 270, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 13}}, {"id": 272, "type": "pointer_declarator", "text": "*layer_visual_stack_background", "parent": 270, "children": [273, 274], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 44}}, {"id": 273, "type": "*", "text": "*", "parent": 272, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 15}}, {"id": 274, "type": "field_identifier", "text": "layer_visual_stack_background", "parent": 272, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 44}}, {"id": 275, "type": "field_declaration", "text": "GPtrArray *layer_visual_stack_bottom;", "parent": 54, "children": [276, 277], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 41}}, {"id": 276, "type": "type_identifier", "text": "GPtrArray", "parent": 275, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 13}}, {"id": 277, "type": "pointer_declarator", "text": "*layer_visual_stack_bottom", "parent": 275, "children": [278, 279], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 40}}, {"id": 278, "type": "*", "text": "*", "parent": 277, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 15}}, {"id": 279, "type": "field_identifier", "text": "layer_visual_stack_bottom", "parent": 277, "children": [], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 40}}, {"id": 280, "type": "field_declaration", "text": "GPtrArray *layer_visual_stack_top;", "parent": 54, "children": [281, 282], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 38}}, {"id": 281, "type": "type_identifier", "text": "GPtrArray", "parent": 280, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 13}}, {"id": 282, "type": "pointer_declarator", "text": "*layer_visual_stack_top", "parent": 280, "children": [283, 284], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 37}}, {"id": 283, "type": "*", "text": "*", "parent": 282, "children": [], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 15}}, {"id": 284, "type": "field_identifier", "text": "layer_visual_stack_top", "parent": 282, "children": [], "start_point": {"row": 77, "column": 15}, "end_point": {"row": 77, "column": 37}}, {"id": 285, "type": "field_declaration", "text": "GPtrArray *layer_visual_stack_overlay;", "parent": 54, "children": [286, 287], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 42}}, {"id": 286, "type": "type_identifier", "text": "GPtrArray", "parent": 285, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 13}}, {"id": 287, "type": "pointer_declarator", "text": "*layer_visual_stack_overlay", "parent": 285, "children": [288, 289], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 41}}, {"id": 288, "type": "*", "text": "*", "parent": 287, "children": [], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 15}}, {"id": 289, "type": "field_identifier", "text": "layer_visual_stack_overlay", "parent": 287, "children": [], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 41}}, {"id": 290, "type": "field_declaration", "text": "GPtrArray *floating_stack;", "parent": 54, "children": [291, 292], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 30}}, {"id": 291, "type": "type_identifier", "text": "GPtrArray", "parent": 290, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 13}}, {"id": 292, "type": "pointer_declarator", "text": "*floating_stack", "parent": 290, "children": [293, 294], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 29}}, {"id": 293, "type": "*", "text": "*", "parent": 292, "children": [], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 15}}, {"id": 294, "type": "field_identifier", "text": "floating_stack", "parent": 292, "children": [], "start_point": {"row": 80, "column": 15}, "end_point": {"row": 80, "column": 29}}, {"id": 295, "type": "field_declaration", "text": "GPtrArray *floating_containers;", "parent": 54, "children": [296, 297], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 35}}, {"id": 296, "type": "type_identifier", "text": "GPtrArray", "parent": 295, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 13}}, {"id": 297, "type": "pointer_declarator", "text": "*floating_containers", "parent": 295, "children": [298, 299], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 34}}, {"id": 298, "type": "*", "text": "*", "parent": 297, "children": [], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 15}}, {"id": 299, "type": "field_identifier", "text": "floating_containers", "parent": 297, "children": [], "start_point": {"row": 81, "column": 15}, "end_point": {"row": 81, "column": 34}}, {"id": 300, "type": "field_declaration", "text": "struct wl_listener new_output;", "parent": 54, "children": [301, 304], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 34}}, {"id": 301, "type": "struct_specifier", "text": "struct wl_listener", "parent": 300, "children": [302, 303], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 22}}, {"id": 302, "type": "struct", "text": "struct", "parent": 301, "children": [], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 10}}, {"id": 303, "type": "type_identifier", "text": "wl_listener", "parent": 301, "children": [], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 22}}, {"id": 304, "type": "field_identifier", "text": "new_output", "parent": 300, "children": [], "start_point": {"row": 84, "column": 23}, "end_point": {"row": 84, "column": 33}}, {"id": 305, "type": "field_declaration", "text": "struct wl_listener new_xdeco;", "parent": 54, "children": [306, 309], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 33}}, {"id": 306, "type": "struct_specifier", "text": "struct wl_listener", "parent": 305, "children": [307, 308], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 22}}, {"id": 307, "type": "struct", "text": "struct", "parent": 306, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 10}}, {"id": 308, "type": "type_identifier", "text": "wl_listener", "parent": 306, "children": [], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 85, "column": 22}}, {"id": 309, "type": "field_identifier", "text": "new_xdeco", "parent": 305, "children": [], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 32}}, {"id": 310, "type": "field_declaration", "text": "struct wl_listener new_xdg_surface;", "parent": 54, "children": [311, 314], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 39}}, {"id": 311, "type": "struct_specifier", "text": "struct wl_listener", "parent": 310, "children": [312, 313], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 22}}, {"id": 312, "type": "struct", "text": "struct", "parent": 311, "children": [], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 10}}, {"id": 313, "type": "type_identifier", "text": "wl_listener", "parent": 311, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 22}}, {"id": 314, "type": "field_identifier", "text": "new_xdg_surface", "parent": 310, "children": [], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 38}}, {"id": 315, "type": "field_declaration", "text": "struct wl_listener new_layer_shell_surface;", "parent": 54, "children": [316, 319], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 47}}, {"id": 316, "type": "struct_specifier", "text": "struct wl_listener", "parent": 315, "children": [317, 318], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 22}}, {"id": 317, "type": "struct", "text": "struct", "parent": 316, "children": [], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 10}}, {"id": 318, "type": "type_identifier", "text": "wl_listener", "parent": 316, "children": [], "start_point": {"row": 87, "column": 11}, "end_point": {"row": 87, "column": 22}}, {"id": 319, "type": "field_identifier", "text": "new_layer_shell_surface", "parent": 315, "children": [], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 46}}, {"id": 320, "type": "field_declaration", "text": "struct wl_listener new_pointer_constraint;", "parent": 54, "children": [321, 324], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 46}}, {"id": 321, "type": "struct_specifier", "text": "struct wl_listener", "parent": 320, "children": [322, 323], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 22}}, {"id": 322, "type": "struct", "text": "struct", "parent": 321, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 10}}, {"id": 323, "type": "type_identifier", "text": "wl_listener", "parent": 321, "children": [], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 22}}, {"id": 324, "type": "field_identifier", "text": "new_pointer_constraint", "parent": 320, "children": [], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 45}}, {"id": 325, "type": "field_declaration", "text": "struct container *old_xy_container;", "parent": 54, "children": [326, 329], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 39}}, {"id": 326, "type": "struct_specifier", "text": "struct container", "parent": 325, "children": [327, 328], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 20}}, {"id": 327, "type": "struct", "text": "struct", "parent": 326, "children": [], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 10}}, {"id": 328, "type": "type_identifier", "text": "container", "parent": 326, "children": [], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 20}}, {"id": 329, "type": "pointer_declarator", "text": "*old_xy_container", "parent": 325, "children": [330, 331], "start_point": {"row": 92, "column": 21}, "end_point": {"row": 92, "column": 38}}, {"id": 330, "type": "*", "text": "*", "parent": 329, "children": [], "start_point": {"row": 92, "column": 21}, "end_point": {"row": 92, "column": 22}}, {"id": 331, "type": "field_identifier", "text": "old_xy_container", "parent": 329, "children": [], "start_point": {"row": 92, "column": 22}, "end_point": {"row": 92, "column": 38}}, {"id": 332, "type": "field_declaration", "text": "bool xy_container_is_locked;", "parent": 54, "children": [333, 334], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 32}}, {"id": 333, "type": "primitive_type", "text": "bool", "parent": 332, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 8}}, {"id": 334, "type": "field_identifier", "text": "xy_container_is_locked", "parent": 332, "children": [], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 31}}, {"id": 335, "type": "preproc_if", "text": "#if JAPOKWM_HAS_XWAYLAND\n struct xwayland xwayland;\n struct wl_listener xwayland_ready;\n\n struct wl_listener new_xwayland_surface;\n#endif", "parent": 54, "children": [336, 337, 338, 339, 344, 349, 354], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 100, "column": 6}}, {"id": 336, "type": "#if", "text": "#if", "parent": 335, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 3}}, {"id": 337, "type": "identifier", "text": "JAPOKWM_HAS_XWAYLAND", "parent": 335, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 24}}, {"id": 338, "type": "\n", "text": "\n", "parent": 335, "children": [], "start_point": {"row": 95, "column": 24}, "end_point": {"row": 96, "column": 0}}, {"id": 339, "type": "field_declaration", "text": "struct xwayland xwayland;", "parent": 335, "children": [340, 343], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 29}}, {"id": 340, "type": "struct_specifier", "text": "struct xwayland", "parent": 339, "children": [341, 342], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 19}}, {"id": 341, "type": "struct", "text": "struct", "parent": 340, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 10}}, {"id": 342, "type": "type_identifier", "text": "xwayland", "parent": 340, "children": [], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 19}}, {"id": 343, "type": "field_identifier", "text": "xwayland", "parent": 339, "children": [], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 28}}, {"id": 344, "type": "field_declaration", "text": "struct wl_listener xwayland_ready;", "parent": 335, "children": [345, 348], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 38}}, {"id": 345, "type": "struct_specifier", "text": "struct wl_listener", "parent": 344, "children": [346, 347], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 22}}, {"id": 346, "type": "struct", "text": "struct", "parent": 345, "children": [], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 10}}, {"id": 347, "type": "type_identifier", "text": "wl_listener", "parent": 345, "children": [], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 22}}, {"id": 348, "type": "field_identifier", "text": "xwayland_ready", "parent": 344, "children": [], "start_point": {"row": 97, "column": 23}, "end_point": {"row": 97, "column": 37}}, {"id": 349, "type": "field_declaration", "text": "struct wl_listener new_xwayland_surface;", "parent": 335, "children": [350, 353], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 44}}, {"id": 350, "type": "struct_specifier", "text": "struct wl_listener", "parent": 349, "children": [351, 352], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 22}}, {"id": 351, "type": "struct", "text": "struct", "parent": 350, "children": [], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 10}}, {"id": 352, "type": "type_identifier", "text": "wl_listener", "parent": 350, "children": [], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 22}}, {"id": 353, "type": "field_identifier", "text": "new_xwayland_surface", "parent": 349, "children": [], "start_point": {"row": 99, "column": 23}, "end_point": {"row": 99, "column": 43}}, {"id": 354, "type": "#endif", "text": "#endif", "parent": 335, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 6}}, {"id": 355, "type": "declaration", "text": "extern struct server server;", "parent": 0, "children": [356, 358, 361], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 28}}, {"id": 356, "type": "storage_class_specifier", "text": "extern", "parent": 355, "children": [357], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 6}}, {"id": 357, "type": "extern", "text": "extern", "parent": 356, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 6}}, {"id": 358, "type": "struct_specifier", "text": "struct server", "parent": 355, "children": [359, 360], "start_point": {"row": 103, "column": 7}, "end_point": {"row": 103, "column": 20}}, {"id": 359, "type": "struct", "text": "struct", "parent": 358, "children": [], "start_point": {"row": 103, "column": 7}, "end_point": {"row": 103, "column": 13}}, {"id": 360, "type": "type_identifier", "text": "server", "parent": 358, "children": [], "start_point": {"row": 103, "column": 14}, "end_point": {"row": 103, "column": 20}}, {"id": 361, "type": "identifier", "text": "server", "parent": 355, "children": [], "start_point": {"row": 103, "column": 21}, "end_point": {"row": 103, "column": 27}}, {"id": 362, "type": "declaration", "text": "void init_server();", "parent": 0, "children": [363, 364], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 19}}, {"id": 363, "type": "primitive_type", "text": "void", "parent": 362, "children": [], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 4}}, {"id": 364, "type": "function_declarator", "text": "init_server()", "parent": 362, "children": [365, 366], "start_point": {"row": 105, "column": 5}, "end_point": {"row": 105, "column": 18}}, {"id": 365, "type": "identifier", "text": "init_server", "parent": 364, "children": [], "start_point": {"row": 105, "column": 5}, "end_point": {"row": 105, "column": 16}}, {"id": 366, "type": "parameter_list", "text": "()", "parent": 364, "children": [], "start_point": {"row": 105, "column": 16}, "end_point": {"row": 105, "column": 18}}, {"id": 367, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 6}}]}, "node_categories": {"declarations": {"functions": [364], "variables": [57, 64, 71, 78, 85, 92, 99, 106, 113, 120, 127, 134, 141, 148, 155, 160, 167, 172, 177, 180, 185, 190, 195, 200, 205, 210, 213, 218, 223, 228, 233, 238, 243, 248, 253, 258, 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, 320, 325, 332, 339, 344, 349, 355, 362], "classes": [54, 55, 58, 59, 65, 66, 72, 73, 79, 80, 86, 87, 93, 94, 100, 101, 107, 108, 114, 115, 121, 122, 128, 129, 135, 136, 142, 143, 149, 150, 156, 157, 161, 162, 181, 182, 259, 260, 301, 302, 306, 307, 311, 312, 316, 317, 321, 322, 326, 327, 340, 341, 345, 346, 350, 351, 356, 358, 359], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, 45, 46, 48, 49, 51, 52], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 56, 60, 63, 67, 70, 74, 77, 81, 84, 88, 91, 95, 98, 102, 105, 109, 112, 116, 119, 123, 126, 130, 133, 137, 140, 144, 147, 151, 154, 158, 159, 163, 166, 168, 171, 173, 176, 178, 179, 183, 184, 186, 189, 191, 194, 196, 199, 204, 209, 212, 214, 217, 219, 222, 224, 227, 229, 232, 234, 237, 239, 242, 244, 247, 249, 252, 254, 257, 261, 264, 266, 269, 271, 274, 276, 279, 281, 284, 286, 289, 291, 294, 296, 299, 303, 304, 308, 309, 313, 314, 318, 319, 323, 324, 328, 331, 334, 335, 336, 337, 342, 343, 347, 348, 352, 353, 354, 360, 361, 365, 367], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 364, "universal_type": "function", "name": "unknown", "text_snippet": "init_server()"}], "class_declarations": [{"node_id": 54, "universal_type": "class", "name": "server", "text_snippet": "struct server {\n struct wl_display *wl_display;\n struct wl_event_loop *wl_event_loop;\n stru"}, {"node_id": 55, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 58, "universal_type": "class", "name": "wl_display", "text_snippet": "struct wl_display"}, {"node_id": 59, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 65, "universal_type": "class", "name": "wl_event_loop", "text_snippet": "struct wl_event_loop"}, {"node_id": 66, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 72, "universal_type": "class", "name": "wlr_backend", "text_snippet": "struct wlr_backend"}, {"node_id": 73, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 79, "universal_type": "class", "name": "wlr_compositor", "text_snippet": "struct wlr_compositor"}, {"node_id": 80, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 86, "universal_type": "class", "name": "wlr_xdg_shell", "text_snippet": "struct wlr_xdg_shell"}, {"node_id": 87, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 93, "universal_type": "class", "name": "wlr_layer_shell_v1", "text_snippet": "struct wlr_layer_shell_v1"}, {"node_id": 94, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 100, "universal_type": "class", "name": "wlr_xdg_decoration_manager_v1", "text_snippet": "struct wlr_xdg_decoration_manager_v1"}, {"node_id": 101, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 107, "universal_type": "class", "name": "input_manager", "text_snippet": "struct input_manager"}, {"node_id": 108, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 114, "universal_type": "class", "name": "wlr_virtual_pointer_manager_v1", "text_snippet": "struct wlr_virtual_pointer_manager_v1"}, {"node_id": 115, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 121, "universal_type": "class", "name": "wlr_virtual_keyboard_manager_v1", "text_snippet": "struct wlr_virtual_keyboard_manager_v1"}, {"node_id": 122, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 128, "universal_type": "class", "name": "wlr_relative_pointer_manager_v1", "text_snippet": "struct wlr_relative_pointer_manager_v1"}, {"node_id": 129, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 135, "universal_type": "class", "name": "wlr_input_inhibit_manager", "text_snippet": "struct wlr_input_inhibit_manager"}, {"node_id": 136, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 142, "universal_type": "class", "name": "wlr_pointer_constraints_v1", "text_snippet": "struct wlr_pointer_constraints_v1"}, {"node_id": 143, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 149, "universal_type": "class", "name": "layout", "text_snippet": "struct layout"}, {"node_id": 150, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 156, "universal_type": "class", "name": "layout_set", "text_snippet": "struct layout_set"}, {"node_id": 157, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 161, "universal_type": "class", "name": "wlr_output_layout", "text_snippet": "struct wlr_output_layout"}, {"node_id": 162, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 181, "universal_type": "class", "name": "sigevent", "text_snippet": "struct sigevent"}, {"node_id": 182, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 259, "universal_type": "class", "name": "wlr_surface", "text_snippet": "struct wlr_surface"}, {"node_id": 260, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 301, "universal_type": "class", "name": "wl_listener", "text_snippet": "struct wl_listener"}, {"node_id": 302, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 306, "universal_type": "class", "name": "wl_listener", "text_snippet": "struct wl_listener"}, {"node_id": 307, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 311, "universal_type": "class", "name": "wl_listener", "text_snippet": "struct wl_listener"}, {"node_id": 312, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 316, "universal_type": "class", "name": "wl_listener", "text_snippet": "struct wl_listener"}, {"node_id": 317, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 321, "universal_type": "class", "name": "wl_listener", "text_snippet": "struct wl_listener"}, {"node_id": 322, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 326, "universal_type": "class", "name": "container", "text_snippet": "struct container"}, {"node_id": 327, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 340, "universal_type": "class", "name": "xwayland", "text_snippet": "struct xwayland"}, {"node_id": 341, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 345, "universal_type": "class", "name": "wl_listener", "text_snippet": "struct wl_listener"}, {"node_id": 346, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 350, "universal_type": "class", "name": "wl_listener", "text_snippet": "struct wl_listener"}, {"node_id": 351, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 356, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 358, "universal_type": "class", "name": "server", "text_snippet": "struct server"}, {"node_id": 359, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <wayland-server.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <wlr/types/wlr_cursor.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <wlr/types/wlr_virtual_pointer_v1.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <wlr/types/wlr_virtual_keyboard_v1.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <wlr/xcursor.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <wayland-server-core.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <wlr/types/wlr_xcursor_manager.h>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <wlr/types/wlr_relative_pointer_v1.h>\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include <glib.h>\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"cursor.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include \"layout.h\"\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include \"options.h\"\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 42, "text": "#include \"xwayland.h\"\n"}, {"node_id": 43, "text": "#include"}, {"node_id": 45, "text": "#include \"input_manager.h\"\n"}, {"node_id": 46, "text": "#include"}, {"node_id": 48, "text": "#include \"utils/coreUtils.h\"\n"}, {"node_id": 49, "text": "#include"}, {"node_id": 51, "text": "#include \"bitset/bitset.h\"\n"}, {"node_id": 52, "text": "#include"}]}, "original_source_code": "#ifndef SERVER_H\n#define SERVER_H\n#include <wayland-server.h>\n#include <wlr/types/wlr_cursor.h>\n#include <wlr/types/wlr_virtual_pointer_v1.h>\n#include <wlr/types/wlr_virtual_keyboard_v1.h>\n#include <wlr/xcursor.h>\n#include <wayland-server-core.h>\n#include <wlr/types/wlr_xcursor_manager.h>\n#include <wlr/types/wlr_relative_pointer_v1.h>\n#include <glib.h>\n\n#include \"cursor.h\"\n#include \"layout.h\"\n#include \"options.h\"\n#include \"xwayland.h\"\n#include \"input_manager.h\"\n#include \"utils/coreUtils.h\"\n#include \"bitset/bitset.h\"\n\nstruct server {\n struct wl_display *wl_display;\n struct wl_event_loop *wl_event_loop;\n struct wlr_backend *backend;\n struct wlr_compositor *compositor;\n\n struct wlr_xdg_shell *xdg_shell;\n struct wlr_layer_shell_v1 *layer_shell;\n struct wlr_xdg_decoration_manager_v1 *xdeco_mgr;\n\n struct input_manager *input_manager;\n\n struct wlr_virtual_pointer_manager_v1 *virtual_pointer_mgr;\n struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard_mgr;\n struct wlr_relative_pointer_manager_v1 *relative_pointer_mgr;\n struct wlr_input_inhibit_manager *input_inhibitor_mgr;\n struct wlr_pointer_constraints_v1 *pointer_constraints;\n\n struct layout *default_layout;\n struct layout_set layout_set;\n\n struct wlr_output_layout *output_layout;\n GPtrArray *keyboards;\n\n GPtrArray *registered_key_combos;\n timer_t combo_timer;\n struct sigevent combo_sig_event;\n\n GPtrArray *workspaces;\n\n GPtrArray *scratchpad;\n\n GPtrArray *config_paths;\n char *config_file;\n char *config_dir;\n\n int previous_workspace;\n BitSet *previous_bitset;\n\n GPtrArray *client_lists;\n GPtrArray *normal_clients;\n GPtrArray *non_tiled_clients;\n GPtrArray *independent_clients;\n\n GPtrArray *mons;\n GPtrArray *popups;\n // X11 popups are handled as containers\n GPtrArray *xwayland_popups;\n\n GPtrArray *tagsets;\n\n struct wlr_surface *old_surface;\n\n GPtrArray2D *layer_visual_stack_lists;\n\n GPtrArray *layer_visual_stack_background;\n GPtrArray *layer_visual_stack_bottom;\n GPtrArray *layer_visual_stack_top;\n GPtrArray *layer_visual_stack_overlay;\n\n GPtrArray *floating_stack;\n GPtrArray *floating_containers;\n\n /* global event handlers */\n struct wl_listener new_output;\n struct wl_listener new_xdeco;\n struct wl_listener new_xdg_surface;\n struct wl_listener new_layer_shell_surface;\n struct wl_listener new_pointer_constraint;\n\n // TODO: give them a more sensible name they are here to fix a bug for\n // sloppy focus\n struct container *old_xy_container;\n bool xy_container_is_locked;\n\n#if JAPOKWM_HAS_XWAYLAND\n struct xwayland xwayland;\n struct wl_listener xwayland_ready;\n\n struct wl_listener new_xwayland_surface;\n#endif\n};\n\nextern struct server server;\n\nvoid init_server();\n#endif /* SERVER_H */\n"}
392
c
/* * drivers/inputhub/sensor_feima.c * * sensors feima header file * * Copyright (c) 2012-2019 Huawei Technologies Co., Ltd. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * 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. * */ #ifndef __SENSOR_FEIMA_H__ #define __SENSOR_FEIMA_H__ #include <linux/mtd/hisi_nve_interface.h> #include "sensor_config.h" #define ALS_DBG_PARA_SIZE (8) #define BUF_SIZE (128) #define ALS_MCU_HAL_CONVER (10) #define ACC_CONVERT_COFF 1000 extern struct hisi_nve_info_user user_info; extern uint8_t als_support_under_screen_cali; extern uint16_t als_ud_cali_xy[]; extern uint8_t ps_support_cali_after_sale; extern char *cap_sensor_id; extern struct sar_sensor_detect g_semtech_sar_detect_aux; extern int stk32670_als_flag; extern als_para_normal_table stk32670_als_para[]; struct sensor_cookie { int tag; const char *name; const struct attribute_group *attrs_group; struct device *dev; }; struct ps_ioctl_t { uint32_t sub_cmd; uint16_t ps_rcv_info; }; typedef struct { uint16_t sub_cmd; uint16_t sar_info; } rpc_ioctl_t; struct acc_ioctl_t { uint32_t sub_cmd; uint8_t filter_flag; }; typedef enum { ALS_UD_CMD_START, ALS_UD_CMD_SET_ADDR, ALS_UD_CMD_BUFFER_UPDATE, } obj_als_ud_cmd_t; typedef struct als_ud_cmd_map { const char *str; int cmd; } als_ud_cmd_map_t; enum { CALL_START = 0xa2, CALL_STOP, }; void als_ud_block_release(void); void wake_up_als_ud_block(void); int als_underscreen_calidata_save(void); #endif /* __SENSOR_FEIMA_H__ */
26.21
68
(translation_unit) "/*\n * drivers/inputhub/sensor_feima.c\n *\n * sensors feima header file\n *\n * Copyright (c) 2012-2019 Huawei Technologies Co., Ltd.\n *\n * This software is licensed under the terms of the GNU General Public\n * License version 2, as published by the Free Software Foundation, and\n * may be copied, distributed, and modified under those terms.\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 */\n\n#ifndef __SENSOR_FEIMA_H__\n#define __SENSOR_FEIMA_H__\n\n#include <linux/mtd/hisi_nve_interface.h>\n#include "sensor_config.h"\n\n#define ALS_DBG_PARA_SIZE (8)\n#define BUF_SIZE (128)\n#define ALS_MCU_HAL_CONVER (10)\n#define ACC_CONVERT_COFF 1000\n\nextern struct hisi_nve_info_user user_info;\nextern uint8_t als_support_under_screen_cali;\nextern uint16_t als_ud_cali_xy[];\nextern uint8_t ps_support_cali_after_sale;\nextern char *cap_sensor_id;\nextern struct sar_sensor_detect g_semtech_sar_detect_aux;\nextern int stk32670_als_flag;\nextern als_para_normal_table stk32670_als_para[];\n\nstruct sensor_cookie {\n int tag;\n const char *name;\n const struct attribute_group *attrs_group;\n struct device *dev;\n};\n\nstruct ps_ioctl_t {\n uint32_t sub_cmd;\n uint16_t ps_rcv_info;\n};\n\ntypedef struct {\n uint16_t sub_cmd;\n uint16_t sar_info;\n} rpc_ioctl_t;\n\nstruct acc_ioctl_t {\n uint32_t sub_cmd;\n uint8_t filter_flag;\n};\n\ntypedef enum {\n ALS_UD_CMD_START,\n ALS_UD_CMD_SET_ADDR,\n ALS_UD_CMD_BUFFER_UPDATE,\n} obj_als_ud_cmd_t;\n\ntypedef struct als_ud_cmd_map {\n const char *str;\n int cmd;\n} als_ud_cmd_map_t;\n\nenum {\n CALL_START = 0xa2,\n CALL_STOP,\n};\n\nvoid als_ud_block_release(void);\nvoid wake_up_als_ud_block(void);\nint als_underscreen_calidata_save(void);\n\n#endif /* __SENSOR_FEIMA_H__ */\n" (comment) "/*\n * drivers/inputhub/sensor_feima.c\n *\n * sensors feima header file\n *\n * Copyright (c) 2012-2019 Huawei Technologies Co., Ltd.\n *\n * This software is licensed under the terms of the GNU General Public\n * License version 2, as published by the Free Software Foundation, and\n * may be copied, distributed, and modified under those terms.\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 */" (preproc_ifdef) "#ifndef __SENSOR_FEIMA_H__\n#define __SENSOR_FEIMA_H__\n\n#include <linux/mtd/hisi_nve_interface.h>\n#include "sensor_config.h"\n\n#define ALS_DBG_PARA_SIZE (8)\n#define BUF_SIZE (128)\n#define ALS_MCU_HAL_CONVER (10)\n#define ACC_CONVERT_COFF 1000\n\nextern struct hisi_nve_info_user user_info;\nextern uint8_t als_support_under_screen_cali;\nextern uint16_t als_ud_cali_xy[];\nextern uint8_t ps_support_cali_after_sale;\nextern char *cap_sensor_id;\nextern struct sar_sensor_detect g_semtech_sar_detect_aux;\nextern int stk32670_als_flag;\nextern als_para_normal_table stk32670_als_para[];\n\nstruct sensor_cookie {\n int tag;\n const char *name;\n const struct attribute_group *attrs_group;\n struct device *dev;\n};\n\nstruct ps_ioctl_t {\n uint32_t sub_cmd;\n uint16_t ps_rcv_info;\n};\n\ntypedef struct {\n uint16_t sub_cmd;\n uint16_t sar_info;\n} rpc_ioctl_t;\n\nstruct acc_ioctl_t {\n uint32_t sub_cmd;\n uint8_t filter_flag;\n};\n\ntypedef enum {\n ALS_UD_CMD_START,\n ALS_UD_CMD_SET_ADDR,\n ALS_UD_CMD_BUFFER_UPDATE,\n} obj_als_ud_cmd_t;\n\ntypedef struct als_ud_cmd_map {\n const char *str;\n int cmd;\n} als_ud_cmd_map_t;\n\nenum {\n CALL_START = 0xa2,\n CALL_STOP,\n};\n\nvoid als_ud_block_release(void);\nvoid wake_up_als_ud_block(void);\nint als_underscreen_calidata_save(void);\n\n#endif" (#ifndef) "#ifndef" (identifier) "__SENSOR_FEIMA_H__" (preproc_def) "#define __SENSOR_FEIMA_H__\n" (#define) "#define" (identifier) "__SENSOR_FEIMA_H__" (preproc_include) "#include <linux/mtd/hisi_nve_interface.h>\n" (#include) "#include" (system_lib_string) "<linux/mtd/hisi_nve_interface.h>" (preproc_include) "#include "sensor_config.h"\n" (#include) "#include" (string_literal) ""sensor_config.h"" (") """ (string_content) "sensor_config.h" (") """ (preproc_def) "#define ALS_DBG_PARA_SIZE (8)\n" (#define) "#define" (identifier) "ALS_DBG_PARA_SIZE" (preproc_arg) "(8)" (preproc_def) "#define BUF_SIZE (128)\n" (#define) "#define" (identifier) "BUF_SIZE" (preproc_arg) "(128)" (preproc_def) "#define ALS_MCU_HAL_CONVER (10)\n" (#define) "#define" (identifier) "ALS_MCU_HAL_CONVER" (preproc_arg) "(10)" (preproc_def) "#define ACC_CONVERT_COFF 1000\n" (#define) "#define" (identifier) "ACC_CONVERT_COFF" (preproc_arg) "1000" (declaration) "extern struct hisi_nve_info_user user_info;" (storage_class_specifier) "extern" (extern) "extern" (struct_specifier) "struct hisi_nve_info_user" (struct) "struct" (type_identifier) "hisi_nve_info_user" (identifier) "user_info" (;) ";" (declaration) "extern uint8_t als_support_under_screen_cali;" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "uint8_t" (identifier) "als_support_under_screen_cali" (;) ";" (declaration) "extern uint16_t als_ud_cali_xy[];" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "uint16_t" (array_declarator) "als_ud_cali_xy[]" (identifier) "als_ud_cali_xy" ([) "[" (]) "]" (;) ";" (declaration) "extern uint8_t ps_support_cali_after_sale;" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "uint8_t" (identifier) "ps_support_cali_after_sale" (;) ";" (declaration) "extern char *cap_sensor_id;" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "char" (pointer_declarator) "*cap_sensor_id" (*) "*" (identifier) "cap_sensor_id" (;) ";" (declaration) "extern struct sar_sensor_detect g_semtech_sar_detect_aux;" (storage_class_specifier) "extern" (extern) "extern" (struct_specifier) "struct sar_sensor_detect" (struct) "struct" (type_identifier) "sar_sensor_detect" (identifier) "g_semtech_sar_detect_aux" (;) ";" (declaration) "extern int stk32670_als_flag;" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "int" (identifier) "stk32670_als_flag" (;) ";" (declaration) "extern als_para_normal_table stk32670_als_para[];" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "als_para_normal_table" (array_declarator) "stk32670_als_para[]" (identifier) "stk32670_als_para" ([) "[" (]) "]" (;) ";" (struct_specifier) "struct sensor_cookie {\n int tag;\n const char *name;\n const struct attribute_group *attrs_group;\n struct device *dev;\n}" (struct) "struct" (type_identifier) "sensor_cookie" (field_declaration_list) "{\n int tag;\n const char *name;\n const struct attribute_group *attrs_group;\n struct device *dev;\n}" ({) "{" (field_declaration) "int tag;" (primitive_type) "int" (field_identifier) "tag" (;) ";" (field_declaration) "const char *name;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*name" (*) "*" (field_identifier) "name" (;) ";" (field_declaration) "const struct attribute_group *attrs_group;" (type_qualifier) "const" (const) "const" (struct_specifier) "struct attribute_group" (struct) "struct" (type_identifier) "attribute_group" (pointer_declarator) "*attrs_group" (*) "*" (field_identifier) "attrs_group" (;) ";" (field_declaration) "struct device *dev;" (struct_specifier) "struct device" (struct) "struct" (type_identifier) "device" (pointer_declarator) "*dev" (*) "*" (field_identifier) "dev" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct ps_ioctl_t {\n uint32_t sub_cmd;\n uint16_t ps_rcv_info;\n}" (struct) "struct" (type_identifier) "ps_ioctl_t" (field_declaration_list) "{\n uint32_t sub_cmd;\n uint16_t ps_rcv_info;\n}" ({) "{" (field_declaration) "uint32_t sub_cmd;" (primitive_type) "uint32_t" (field_identifier) "sub_cmd" (;) ";" (field_declaration) "uint16_t ps_rcv_info;" (primitive_type) "uint16_t" (field_identifier) "ps_rcv_info" (;) ";" (}) "}" (;) ";" (type_definition) "typedef struct {\n uint16_t sub_cmd;\n uint16_t sar_info;\n} rpc_ioctl_t;" (typedef) "typedef" (struct_specifier) "struct {\n uint16_t sub_cmd;\n uint16_t sar_info;\n}" (struct) "struct" (field_declaration_list) "{\n uint16_t sub_cmd;\n uint16_t sar_info;\n}" ({) "{" (field_declaration) "uint16_t sub_cmd;" (primitive_type) "uint16_t" (field_identifier) "sub_cmd" (;) ";" (field_declaration) "uint16_t sar_info;" (primitive_type) "uint16_t" (field_identifier) "sar_info" (;) ";" (}) "}" (type_identifier) "rpc_ioctl_t" (;) ";" (struct_specifier) "struct acc_ioctl_t {\n uint32_t sub_cmd;\n uint8_t filter_flag;\n}" (struct) "struct" (type_identifier) "acc_ioctl_t" (field_declaration_list) "{\n uint32_t sub_cmd;\n uint8_t filter_flag;\n}" ({) "{" (field_declaration) "uint32_t sub_cmd;" (primitive_type) "uint32_t" (field_identifier) "sub_cmd" (;) ";" (field_declaration) "uint8_t filter_flag;" (primitive_type) "uint8_t" (field_identifier) "filter_flag" (;) ";" (}) "}" (;) ";" (type_definition) "typedef enum {\n ALS_UD_CMD_START,\n ALS_UD_CMD_SET_ADDR,\n ALS_UD_CMD_BUFFER_UPDATE,\n} obj_als_ud_cmd_t;" (typedef) "typedef" (enum_specifier) "enum {\n ALS_UD_CMD_START,\n ALS_UD_CMD_SET_ADDR,\n ALS_UD_CMD_BUFFER_UPDATE,\n}" (enum) "enum" (enumerator_list) "{\n ALS_UD_CMD_START,\n ALS_UD_CMD_SET_ADDR,\n ALS_UD_CMD_BUFFER_UPDATE,\n}" ({) "{" (enumerator) "ALS_UD_CMD_START" (identifier) "ALS_UD_CMD_START" (,) "," (enumerator) "ALS_UD_CMD_SET_ADDR" (identifier) "ALS_UD_CMD_SET_ADDR" (,) "," (enumerator) "ALS_UD_CMD_BUFFER_UPDATE" (identifier) "ALS_UD_CMD_BUFFER_UPDATE" (,) "," (}) "}" (type_identifier) "obj_als_ud_cmd_t" (;) ";" (type_definition) "typedef struct als_ud_cmd_map {\n const char *str;\n int cmd;\n} als_ud_cmd_map_t;" (typedef) "typedef" (struct_specifier) "struct als_ud_cmd_map {\n const char *str;\n int cmd;\n}" (struct) "struct" (type_identifier) "als_ud_cmd_map" (field_declaration_list) "{\n const char *str;\n int cmd;\n}" ({) "{" (field_declaration) "const char *str;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*str" (*) "*" (field_identifier) "str" (;) ";" (field_declaration) "int cmd;" (primitive_type) "int" (field_identifier) "cmd" (;) ";" (}) "}" (type_identifier) "als_ud_cmd_map_t" (;) ";" (enum_specifier) "enum {\n CALL_START = 0xa2,\n CALL_STOP,\n}" (enum) "enum" (enumerator_list) "{\n CALL_START = 0xa2,\n CALL_STOP,\n}" ({) "{" (enumerator) "CALL_START = 0xa2" (identifier) "CALL_START" (=) "=" (number_literal) "0xa2" (,) "," (enumerator) "CALL_STOP" (identifier) "CALL_STOP" (,) "," (}) "}" (;) ";" (declaration) "void als_ud_block_release(void);" (primitive_type) "void" (function_declarator) "als_ud_block_release(void)" (identifier) "als_ud_block_release" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void wake_up_als_ud_block(void);" (primitive_type) "void" (function_declarator) "wake_up_als_ud_block(void)" (identifier) "wake_up_als_ud_block" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "int als_underscreen_calidata_save(void);" (primitive_type) "int" (function_declarator) "als_underscreen_calidata_save(void)" (identifier) "als_underscreen_calidata_save" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* __SENSOR_FEIMA_H__ */"
263
0
{"language": "c", "success": true, "metadata": {"lines": 68, "avg_line_length": 26.21, "nodes": 187, "errors": 0, "source_hash": "d07e8cb9e06df23594d24c98452c0ffa3b1645266723ae368dfbf37052ddec62", "categorized_nodes": 125}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __SENSOR_FEIMA_H__\n#define __SENSOR_FEIMA_H__\n\n#include <linux/mtd/hisi_nve_interface.h>\n#include \"sensor_config.h\"\n\n#define ALS_DBG_PARA_SIZE (8)\n#define BUF_SIZE (128)\n#define ALS_MCU_HAL_CONVER (10)\n#define ACC_CONVERT_COFF 1000\n\nextern struct hisi_nve_info_user user_info;\nextern uint8_t als_support_under_screen_cali;\nextern uint16_t als_ud_cali_xy[];\nextern uint8_t ps_support_cali_after_sale;\nextern char *cap_sensor_id;\nextern struct sar_sensor_detect g_semtech_sar_detect_aux;\nextern int stk32670_als_flag;\nextern als_para_normal_table stk32670_als_para[];\n\nstruct sensor_cookie {\n\tint tag;\n\tconst char *name;\n\tconst struct attribute_group *attrs_group;\n\tstruct device *dev;\n};\n\nstruct ps_ioctl_t {\n\tuint32_t sub_cmd;\n\tuint16_t ps_rcv_info;\n};\n\ntypedef struct {\n\tuint16_t sub_cmd;\n\tuint16_t sar_info;\n} rpc_ioctl_t;\n\nstruct acc_ioctl_t {\n\tuint32_t sub_cmd;\n\tuint8_t filter_flag;\n};\n\ntypedef enum {\n\tALS_UD_CMD_START,\n\tALS_UD_CMD_SET_ADDR,\n\tALS_UD_CMD_BUFFER_UPDATE,\n} obj_als_ud_cmd_t;\n\ntypedef struct als_ud_cmd_map {\n\tconst char *str;\n\tint cmd;\n} als_ud_cmd_map_t;\n\nenum {\n\tCALL_START = 0xa2,\n\tCALL_STOP,\n};\n\nvoid als_ud_block_release(void);\nvoid wake_up_als_ud_block(void);\nint als_underscreen_calidata_save(void);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 16, 20, 24, 28, 35, 40, 46, 51, 58, 65, 70, 76, 101, 110, 121, 130, 142, 156, 165, 172, 179, 186], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 2, "type": "identifier", "text": "__SENSOR_FEIMA_H__", "parent": 0, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 26}}, {"id": 3, "type": "preproc_def", "text": "#define __SENSOR_FEIMA_H__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 5, "type": "identifier", "text": "__SENSOR_FEIMA_H__", "parent": 3, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 26}}, {"id": 6, "type": "preproc_include", "text": "#include <linux/mtd/hisi_nve_interface.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<linux/mtd/hisi_nve_interface.h>", "parent": 6, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 41}}, {"id": 9, "type": "preproc_include", "text": "#include \"sensor_config.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"sensor_config.h\"", "parent": 9, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 26}}, {"id": 12, "type": "preproc_def", "text": "#define ALS_DBG_PARA_SIZE (8)\n", "parent": 0, "children": [13, 14, 15], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 14, "type": "identifier", "text": "ALS_DBG_PARA_SIZE", "parent": 12, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 25}}, {"id": 15, "type": "preproc_arg", "text": "(8)", "parent": 12, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 29}}, {"id": 16, "type": "preproc_def", "text": "#define BUF_SIZE (128)\n", "parent": 0, "children": [17, 18, 19], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 17, "type": "#define", "text": "#define", "parent": 16, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 18, "type": "identifier", "text": "BUF_SIZE", "parent": 16, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 16}}, {"id": 19, "type": "preproc_arg", "text": "(128)", "parent": 16, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 22}}, {"id": 20, "type": "preproc_def", "text": "#define ALS_MCU_HAL_CONVER (10)\n", "parent": 0, "children": [21, 22, 23], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 21, "type": "#define", "text": "#define", "parent": 20, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 22, "type": "identifier", "text": "ALS_MCU_HAL_CONVER", "parent": 20, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 26}}, {"id": 23, "type": "preproc_arg", "text": "(10)", "parent": 20, "children": [], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 31}}, {"id": 24, "type": "preproc_def", "text": "#define ACC_CONVERT_COFF 1000\n", "parent": 0, "children": [25, 26, 27], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 25, "type": "#define", "text": "#define", "parent": 24, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 26, "type": "identifier", "text": "ACC_CONVERT_COFF", "parent": 24, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 24}}, {"id": 27, "type": "preproc_arg", "text": "1000", "parent": 24, "children": [], "start_point": {"row": 27, "column": 25}, "end_point": {"row": 27, "column": 29}}, {"id": 28, "type": "declaration", "text": "extern struct hisi_nve_info_user user_info;", "parent": 0, "children": [29, 31, 34], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 43}}, {"id": 29, "type": "storage_class_specifier", "text": "extern", "parent": 28, "children": [30], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 30, "type": "extern", "text": "extern", "parent": 29, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 31, "type": "struct_specifier", "text": "struct hisi_nve_info_user", "parent": 28, "children": [32, 33], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 32}}, {"id": 32, "type": "struct", "text": "struct", "parent": 31, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 13}}, {"id": 33, "type": "type_identifier", "text": "hisi_nve_info_user", "parent": 31, "children": [], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 32}}, {"id": 34, "type": "identifier", "text": "user_info", "parent": 28, "children": [], "start_point": {"row": 29, "column": 33}, "end_point": {"row": 29, "column": 42}}, {"id": 35, "type": "declaration", "text": "extern uint8_t als_support_under_screen_cali;", "parent": 0, "children": [36, 38, 39], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 45}}, {"id": 36, "type": "storage_class_specifier", "text": "extern", "parent": 35, "children": [37], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 37, "type": "extern", "text": "extern", "parent": 36, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 38, "type": "primitive_type", "text": "uint8_t", "parent": 35, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 14}}, {"id": 39, "type": "identifier", "text": "als_support_under_screen_cali", "parent": 35, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 44}}, {"id": 40, "type": "declaration", "text": "extern uint16_t als_ud_cali_xy[];", "parent": 0, "children": [41, 43, 44], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 33}}, {"id": 41, "type": "storage_class_specifier", "text": "extern", "parent": 40, "children": [42], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 42, "type": "extern", "text": "extern", "parent": 41, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 43, "type": "primitive_type", "text": "uint16_t", "parent": 40, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 15}}, {"id": 44, "type": "array_declarator", "text": "als_ud_cali_xy[]", "parent": 40, "children": [45], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 32}}, {"id": 45, "type": "identifier", "text": "als_ud_cali_xy", "parent": 44, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 30}}, {"id": 46, "type": "declaration", "text": "extern uint8_t ps_support_cali_after_sale;", "parent": 0, "children": [47, 49, 50], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 42}}, {"id": 47, "type": "storage_class_specifier", "text": "extern", "parent": 46, "children": [48], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 6}}, {"id": 48, "type": "extern", "text": "extern", "parent": 47, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 6}}, {"id": 49, "type": "primitive_type", "text": "uint8_t", "parent": 46, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 14}}, {"id": 50, "type": "identifier", "text": "ps_support_cali_after_sale", "parent": 46, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 41}}, {"id": 51, "type": "declaration", "text": "extern char *cap_sensor_id;", "parent": 0, "children": [52, 54, 55], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 27}}, {"id": 52, "type": "storage_class_specifier", "text": "extern", "parent": 51, "children": [53], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 53, "type": "extern", "text": "extern", "parent": 52, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 54, "type": "primitive_type", "text": "char", "parent": 51, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 11}}, {"id": 55, "type": "pointer_declarator", "text": "*cap_sensor_id", "parent": 51, "children": [56, 57], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 26}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 13}}, {"id": 57, "type": "identifier", "text": "cap_sensor_id", "parent": 55, "children": [], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 26}}, {"id": 58, "type": "declaration", "text": "extern struct sar_sensor_detect g_semtech_sar_detect_aux;", "parent": 0, "children": [59, 61, 64], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 57}}, {"id": 59, "type": "storage_class_specifier", "text": "extern", "parent": 58, "children": [60], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 6}}, {"id": 60, "type": "extern", "text": "extern", "parent": 59, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 6}}, {"id": 61, "type": "struct_specifier", "text": "struct sar_sensor_detect", "parent": 58, "children": [62, 63], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 31}}, {"id": 62, "type": "struct", "text": "struct", "parent": 61, "children": [], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 13}}, {"id": 63, "type": "type_identifier", "text": "sar_sensor_detect", "parent": 61, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 31}}, {"id": 64, "type": "identifier", "text": "g_semtech_sar_detect_aux", "parent": 58, "children": [], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 56}}, {"id": 65, "type": "declaration", "text": "extern int stk32670_als_flag;", "parent": 0, "children": [66, 68, 69], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 29}}, {"id": 66, "type": "storage_class_specifier", "text": "extern", "parent": 65, "children": [67], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 6}}, {"id": 67, "type": "extern", "text": "extern", "parent": 66, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 6}}, {"id": 68, "type": "primitive_type", "text": "int", "parent": 65, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 10}}, {"id": 69, "type": "identifier", "text": "stk32670_als_flag", "parent": 65, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 28}}, {"id": 70, "type": "declaration", "text": "extern als_para_normal_table stk32670_als_para[];", "parent": 0, "children": [71, 73, 74], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 49}}, {"id": 71, "type": "storage_class_specifier", "text": "extern", "parent": 70, "children": [72], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 72, "type": "extern", "text": "extern", "parent": 71, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 73, "type": "type_identifier", "text": "als_para_normal_table", "parent": 70, "children": [], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 28}}, {"id": 74, "type": "array_declarator", "text": "stk32670_als_para[]", "parent": 70, "children": [75], "start_point": {"row": 36, "column": 29}, "end_point": {"row": 36, "column": 48}}, {"id": 75, "type": "identifier", "text": "stk32670_als_para", "parent": 74, "children": [], "start_point": {"row": 36, "column": 29}, "end_point": {"row": 36, "column": 46}}, {"id": 76, "type": "struct_specifier", "text": "struct sensor_cookie {\n\tint tag;\n\tconst char *name;\n\tconst struct attribute_group *attrs_group;\n\tstruct device *dev;\n}", "parent": 0, "children": [77, 78], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 77, "type": "struct", "text": "struct", "parent": 76, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 78, "type": "type_identifier", "text": "sensor_cookie", "parent": 76, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 20}}, {"id": 79, "type": "field_declaration", "text": "int tag;", "parent": 76, "children": [80, 81], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 9}}, {"id": 80, "type": "primitive_type", "text": "int", "parent": 79, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 4}}, {"id": 81, "type": "field_identifier", "text": "tag", "parent": 79, "children": [], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 8}}, {"id": 82, "type": "field_declaration", "text": "const char *name;", "parent": 76, "children": [83, 84], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 18}}, {"id": 83, "type": "primitive_type", "text": "char", "parent": 82, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 11}}, {"id": 84, "type": "pointer_declarator", "text": "*name", "parent": 82, "children": [85, 86], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 17}}, {"id": 85, "type": "*", "text": "*", "parent": 84, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 13}}, {"id": 86, "type": "field_identifier", "text": "name", "parent": 84, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 17}}, {"id": 87, "type": "field_declaration", "text": "const struct attribute_group *attrs_group;", "parent": 76, "children": [88, 91], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 43}}, {"id": 88, "type": "struct_specifier", "text": "struct attribute_group", "parent": 87, "children": [89, 90], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 29}}, {"id": 89, "type": "struct", "text": "struct", "parent": 88, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 13}}, {"id": 90, "type": "type_identifier", "text": "attribute_group", "parent": 88, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 29}}, {"id": 91, "type": "pointer_declarator", "text": "*attrs_group", "parent": 87, "children": [92, 93], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 42}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 31}}, {"id": 93, "type": "field_identifier", "text": "attrs_group", "parent": 91, "children": [], "start_point": {"row": 41, "column": 31}, "end_point": {"row": 41, "column": 42}}, {"id": 94, "type": "field_declaration", "text": "struct device *dev;", "parent": 76, "children": [95, 98], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 20}}, {"id": 95, "type": "struct_specifier", "text": "struct device", "parent": 94, "children": [96, 97], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 14}}, {"id": 96, "type": "struct", "text": "struct", "parent": 95, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 7}}, {"id": 97, "type": "type_identifier", "text": "device", "parent": 95, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 14}}, {"id": 98, "type": "pointer_declarator", "text": "*dev", "parent": 94, "children": [99, 100], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 19}}, {"id": 99, "type": "*", "text": "*", "parent": 98, "children": [], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 16}}, {"id": 100, "type": "field_identifier", "text": "dev", "parent": 98, "children": [], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 19}}, {"id": 101, "type": "struct_specifier", "text": "struct ps_ioctl_t {\n\tuint32_t sub_cmd;\n\tuint16_t ps_rcv_info;\n}", "parent": 0, "children": [102, 103], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 102, "type": "struct", "text": "struct", "parent": 101, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 6}}, {"id": 103, "type": "type_identifier", "text": "ps_ioctl_t", "parent": 101, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 17}}, {"id": 104, "type": "field_declaration", "text": "uint32_t sub_cmd;", "parent": 101, "children": [105, 106], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 18}}, {"id": 105, "type": "primitive_type", "text": "uint32_t", "parent": 104, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 9}}, {"id": 106, "type": "field_identifier", "text": "sub_cmd", "parent": 104, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 17}}, {"id": 107, "type": "field_declaration", "text": "uint16_t ps_rcv_info;", "parent": 101, "children": [108, 109], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 22}}, {"id": 108, "type": "primitive_type", "text": "uint16_t", "parent": 107, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 9}}, {"id": 109, "type": "field_identifier", "text": "ps_rcv_info", "parent": 107, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 21}}, {"id": 110, "type": "type_definition", "text": "typedef struct {\n\tuint16_t sub_cmd;\n\tuint16_t sar_info;\n} rpc_ioctl_t;", "parent": 0, "children": [111, 112, 120], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 53, "column": 14}}, {"id": 111, "type": "typedef", "text": "typedef", "parent": 110, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 7}}, {"id": 112, "type": "struct_specifier", "text": "struct {\n\tuint16_t sub_cmd;\n\tuint16_t sar_info;\n}", "parent": 110, "children": [113], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 53, "column": 1}}, {"id": 113, "type": "struct", "text": "struct", "parent": 112, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 14}}, {"id": 114, "type": "field_declaration", "text": "uint16_t sub_cmd;", "parent": 112, "children": [115, 116], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 18}}, {"id": 115, "type": "primitive_type", "text": "uint16_t", "parent": 114, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 9}}, {"id": 116, "type": "field_identifier", "text": "sub_cmd", "parent": 114, "children": [], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 17}}, {"id": 117, "type": "field_declaration", "text": "uint16_t sar_info;", "parent": 112, "children": [118, 119], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 19}}, {"id": 118, "type": "primitive_type", "text": "uint16_t", "parent": 117, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 9}}, {"id": 119, "type": "field_identifier", "text": "sar_info", "parent": 117, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 18}}, {"id": 120, "type": "type_identifier", "text": "rpc_ioctl_t", "parent": 110, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 13}}, {"id": 121, "type": "struct_specifier", "text": "struct acc_ioctl_t {\n\tuint32_t sub_cmd;\n\tuint8_t filter_flag;\n}", "parent": 0, "children": [122, 123], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 58, "column": 1}}, {"id": 122, "type": "struct", "text": "struct", "parent": 121, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 6}}, {"id": 123, "type": "type_identifier", "text": "acc_ioctl_t", "parent": 121, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 18}}, {"id": 124, "type": "field_declaration", "text": "uint32_t sub_cmd;", "parent": 121, "children": [125, 126], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 18}}, {"id": 125, "type": "primitive_type", "text": "uint32_t", "parent": 124, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 9}}, {"id": 126, "type": "field_identifier", "text": "sub_cmd", "parent": 124, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 17}}, {"id": 127, "type": "field_declaration", "text": "uint8_t filter_flag;", "parent": 121, "children": [128, 129], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 21}}, {"id": 128, "type": "primitive_type", "text": "uint8_t", "parent": 127, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 8}}, {"id": 129, "type": "field_identifier", "text": "filter_flag", "parent": 127, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 20}}, {"id": 130, "type": "type_definition", "text": "typedef enum {\n\tALS_UD_CMD_START,\n\tALS_UD_CMD_SET_ADDR,\n\tALS_UD_CMD_BUFFER_UPDATE,\n} obj_als_ud_cmd_t;", "parent": 0, "children": [131, 132, 141], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 64, "column": 19}}, {"id": 131, "type": "typedef", "text": "typedef", "parent": 130, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 7}}, {"id": 132, "type": "enum_specifier", "text": "enum {\n\tALS_UD_CMD_START,\n\tALS_UD_CMD_SET_ADDR,\n\tALS_UD_CMD_BUFFER_UPDATE,\n}", "parent": 130, "children": [133, 134], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 64, "column": 1}}, {"id": 133, "type": "enum", "text": "enum", "parent": 132, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 12}}, {"id": 134, "type": "enumerator_list", "text": "{\n\tALS_UD_CMD_START,\n\tALS_UD_CMD_SET_ADDR,\n\tALS_UD_CMD_BUFFER_UPDATE,\n}", "parent": 132, "children": [135, 137, 139], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 64, "column": 1}}, {"id": 135, "type": "enumerator", "text": "ALS_UD_CMD_START", "parent": 134, "children": [136], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 17}}, {"id": 136, "type": "identifier", "text": "ALS_UD_CMD_START", "parent": 135, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 17}}, {"id": 137, "type": "enumerator", "text": "ALS_UD_CMD_SET_ADDR", "parent": 134, "children": [138], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 20}}, {"id": 138, "type": "identifier", "text": "ALS_UD_CMD_SET_ADDR", "parent": 137, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 20}}, {"id": 139, "type": "enumerator", "text": "ALS_UD_CMD_BUFFER_UPDATE", "parent": 134, "children": [140], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 25}}, {"id": 140, "type": "identifier", "text": "ALS_UD_CMD_BUFFER_UPDATE", "parent": 139, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 25}}, {"id": 141, "type": "type_identifier", "text": "obj_als_ud_cmd_t", "parent": 130, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 18}}, {"id": 142, "type": "type_definition", "text": "typedef struct als_ud_cmd_map {\n\tconst char *str;\n\tint cmd;\n} als_ud_cmd_map_t;", "parent": 0, "children": [143, 144, 155], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 69, "column": 19}}, {"id": 143, "type": "typedef", "text": "typedef", "parent": 142, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 7}}, {"id": 144, "type": "struct_specifier", "text": "struct als_ud_cmd_map {\n\tconst char *str;\n\tint cmd;\n}", "parent": 142, "children": [145, 146], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 69, "column": 1}}, {"id": 145, "type": "struct", "text": "struct", "parent": 144, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 14}}, {"id": 146, "type": "type_identifier", "text": "als_ud_cmd_map", "parent": 144, "children": [], "start_point": {"row": 66, "column": 15}, "end_point": {"row": 66, "column": 29}}, {"id": 147, "type": "field_declaration", "text": "const char *str;", "parent": 144, "children": [148, 149], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 17}}, {"id": 148, "type": "primitive_type", "text": "char", "parent": 147, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 11}}, {"id": 149, "type": "pointer_declarator", "text": "*str", "parent": 147, "children": [150, 151], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 16}}, {"id": 150, "type": "*", "text": "*", "parent": 149, "children": [], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 13}}, {"id": 151, "type": "field_identifier", "text": "str", "parent": 149, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 16}}, {"id": 152, "type": "field_declaration", "text": "int cmd;", "parent": 144, "children": [153, 154], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 9}}, {"id": 153, "type": "primitive_type", "text": "int", "parent": 152, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 4}}, {"id": 154, "type": "field_identifier", "text": "cmd", "parent": 152, "children": [], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 8}}, {"id": 155, "type": "type_identifier", "text": "als_ud_cmd_map_t", "parent": 142, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 18}}, {"id": 156, "type": "enum_specifier", "text": "enum {\n\tCALL_START = 0xa2,\n\tCALL_STOP,\n}", "parent": 0, "children": [157, 158], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 74, "column": 1}}, {"id": 157, "type": "enum", "text": "enum", "parent": 156, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 4}}, {"id": 158, "type": "enumerator_list", "text": "{\n\tCALL_START = 0xa2,\n\tCALL_STOP,\n}", "parent": 156, "children": [159, 163], "start_point": {"row": 71, "column": 5}, "end_point": {"row": 74, "column": 1}}, {"id": 159, "type": "enumerator", "text": "CALL_START = 0xa2", "parent": 158, "children": [160, 161, 162], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 18}}, {"id": 160, "type": "identifier", "text": "CALL_START", "parent": 159, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 11}}, {"id": 161, "type": "=", "text": "=", "parent": 159, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 13}}, {"id": 162, "type": "number_literal", "text": "0xa2", "parent": 159, "children": [], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 18}}, {"id": 163, "type": "enumerator", "text": "CALL_STOP", "parent": 158, "children": [164], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 10}}, {"id": 164, "type": "identifier", "text": "CALL_STOP", "parent": 163, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 10}}, {"id": 165, "type": "declaration", "text": "void als_ud_block_release(void);", "parent": 0, "children": [166, 167], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 32}}, {"id": 166, "type": "primitive_type", "text": "void", "parent": 165, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 4}}, {"id": 167, "type": "function_declarator", "text": "als_ud_block_release(void)", "parent": 165, "children": [168, 169], "start_point": {"row": 76, "column": 5}, "end_point": {"row": 76, "column": 31}}, {"id": 168, "type": "identifier", "text": "als_ud_block_release", "parent": 167, "children": [], "start_point": {"row": 76, "column": 5}, "end_point": {"row": 76, "column": 25}}, {"id": 169, "type": "parameter_list", "text": "(void)", "parent": 167, "children": [170], "start_point": {"row": 76, "column": 25}, "end_point": {"row": 76, "column": 31}}, {"id": 170, "type": "parameter_declaration", "text": "void", "parent": 169, "children": [171], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 30}}, {"id": 171, "type": "primitive_type", "text": "void", "parent": 170, "children": [], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 30}}, {"id": 172, "type": "declaration", "text": "void wake_up_als_ud_block(void);", "parent": 0, "children": [173, 174], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 32}}, {"id": 173, "type": "primitive_type", "text": "void", "parent": 172, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 4}}, {"id": 174, "type": "function_declarator", "text": "wake_up_als_ud_block(void)", "parent": 172, "children": [175, 176], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 31}}, {"id": 175, "type": "identifier", "text": "wake_up_als_ud_block", "parent": 174, "children": [], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 25}}, {"id": 176, "type": "parameter_list", "text": "(void)", "parent": 174, "children": [177], "start_point": {"row": 77, "column": 25}, "end_point": {"row": 77, "column": 31}}, {"id": 177, "type": "parameter_declaration", "text": "void", "parent": 176, "children": [178], "start_point": {"row": 77, "column": 26}, "end_point": {"row": 77, "column": 30}}, {"id": 178, "type": "primitive_type", "text": "void", "parent": 177, "children": [], "start_point": {"row": 77, "column": 26}, "end_point": {"row": 77, "column": 30}}, {"id": 179, "type": "declaration", "text": "int als_underscreen_calidata_save(void);", "parent": 0, "children": [180, 181], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 40}}, {"id": 180, "type": "primitive_type", "text": "int", "parent": 179, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 3}}, {"id": 181, "type": "function_declarator", "text": "als_underscreen_calidata_save(void)", "parent": 179, "children": [182, 183], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 39}}, {"id": 182, "type": "identifier", "text": "als_underscreen_calidata_save", "parent": 181, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 33}}, {"id": 183, "type": "parameter_list", "text": "(void)", "parent": 181, "children": [184], "start_point": {"row": 78, "column": 33}, "end_point": {"row": 78, "column": 39}}, {"id": 184, "type": "parameter_declaration", "text": "void", "parent": 183, "children": [185], "start_point": {"row": 78, "column": 34}, "end_point": {"row": 78, "column": 38}}, {"id": 185, "type": "primitive_type", "text": "void", "parent": 184, "children": [], "start_point": {"row": 78, "column": 34}, "end_point": {"row": 78, "column": 38}}, {"id": 186, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 6}}]}, "node_categories": {"declarations": {"functions": [167, 174, 181], "variables": [28, 35, 40, 46, 51, 58, 65, 70, 79, 82, 87, 94, 104, 107, 110, 114, 117, 124, 127, 130, 142, 147, 152, 165, 170, 172, 177, 179, 184], "classes": [29, 31, 32, 36, 41, 47, 52, 59, 61, 62, 66, 71, 76, 77, 88, 89, 95, 96, 101, 102, 112, 113, 121, 122, 144, 145], "imports": [6, 7, 9, 10], "modules": [], "enums": [132, 133, 134, 135, 137, 139, 156, 157, 158, 159, 163]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 14, 18, 22, 26, 33, 34, 39, 45, 50, 57, 63, 64, 69, 73, 75, 78, 81, 86, 90, 93, 97, 100, 103, 106, 109, 116, 119, 120, 123, 126, 129, 136, 138, 140, 141, 146, 151, 154, 155, 160, 164, 168, 175, 182, 186], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 162], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 167, "universal_type": "function", "name": "unknown", "text_snippet": "als_ud_block_release(void)"}, {"node_id": 174, "universal_type": "function", "name": "unknown", "text_snippet": "wake_up_als_ud_block(void)"}, {"node_id": 181, "universal_type": "function", "name": "unknown", "text_snippet": "als_underscreen_calidata_save(void)"}], "class_declarations": [{"node_id": 29, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 31, "universal_type": "class", "name": "hisi_nve_info_user", "text_snippet": "struct hisi_nve_info_user"}, {"node_id": 32, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 36, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 41, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 47, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 52, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 59, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 61, "universal_type": "class", "name": "sar_sensor_detect", "text_snippet": "struct sar_sensor_detect"}, {"node_id": 62, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 66, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 71, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 76, "universal_type": "class", "name": "sensor_cookie", "text_snippet": "struct sensor_cookie {\n\tint tag;\n\tconst char *name;\n\tconst struct attribute_group *attrs_group;\n\tstr"}, {"node_id": 77, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 88, "universal_type": "class", "name": "attribute_group", "text_snippet": "struct attribute_group"}, {"node_id": 89, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 95, "universal_type": "class", "name": "device", "text_snippet": "struct device"}, {"node_id": 96, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 101, "universal_type": "class", "name": "ps_ioctl_t", "text_snippet": "struct ps_ioctl_t {\n\tuint32_t sub_cmd;\n\tuint16_t ps_rcv_info;\n}"}, {"node_id": 102, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 112, "universal_type": "class", "name": "{", "text_snippet": "struct {\n\tuint16_t sub_cmd;\n\tuint16_t sar_info;\n}"}, {"node_id": 113, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 121, "universal_type": "class", "name": "acc_ioctl_t", "text_snippet": "struct acc_ioctl_t {\n\tuint32_t sub_cmd;\n\tuint8_t filter_flag;\n}"}, {"node_id": 122, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 144, "universal_type": "class", "name": "als_ud_cmd_map", "text_snippet": "struct als_ud_cmd_map {\n\tconst char *str;\n\tint cmd;\n}"}, {"node_id": 145, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <linux/mtd/hisi_nve_interface.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"sensor_config.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/*\n * drivers/inputhub/sensor_feima.c\n *\n * sensors feima header file\n *\n * Copyright (c) 2012-2019 Huawei Technologies Co., Ltd.\n *\n * This software is licensed under the terms of the GNU General Public\n * License version 2, as published by the Free Software Foundation, and\n * may be copied, distributed, and modified under those terms.\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 */\n\n#ifndef __SENSOR_FEIMA_H__\n#define __SENSOR_FEIMA_H__\n\n#include <linux/mtd/hisi_nve_interface.h>\n#include \"sensor_config.h\"\n\n#define ALS_DBG_PARA_SIZE (8)\n#define BUF_SIZE (128)\n#define ALS_MCU_HAL_CONVER (10)\n#define ACC_CONVERT_COFF 1000\n\nextern struct hisi_nve_info_user user_info;\nextern uint8_t als_support_under_screen_cali;\nextern uint16_t als_ud_cali_xy[];\nextern uint8_t ps_support_cali_after_sale;\nextern char *cap_sensor_id;\nextern struct sar_sensor_detect g_semtech_sar_detect_aux;\nextern int stk32670_als_flag;\nextern als_para_normal_table stk32670_als_para[];\n\nstruct sensor_cookie {\n\tint tag;\n\tconst char *name;\n\tconst struct attribute_group *attrs_group;\n\tstruct device *dev;\n};\n\nstruct ps_ioctl_t {\n\tuint32_t sub_cmd;\n\tuint16_t ps_rcv_info;\n};\n\ntypedef struct {\n\tuint16_t sub_cmd;\n\tuint16_t sar_info;\n} rpc_ioctl_t;\n\nstruct acc_ioctl_t {\n\tuint32_t sub_cmd;\n\tuint8_t filter_flag;\n};\n\ntypedef enum {\n\tALS_UD_CMD_START,\n\tALS_UD_CMD_SET_ADDR,\n\tALS_UD_CMD_BUFFER_UPDATE,\n} obj_als_ud_cmd_t;\n\ntypedef struct als_ud_cmd_map {\n\tconst char *str;\n\tint cmd;\n} als_ud_cmd_map_t;\n\nenum {\n\tCALL_START = 0xa2,\n\tCALL_STOP,\n};\n\nvoid als_ud_block_release(void);\nvoid wake_up_als_ud_block(void);\nint als_underscreen_calidata_save(void);\n\n#endif /* __SENSOR_FEIMA_H__ */\n"}
393
c
/* * This header is generated by classdump-dyld 1.0 * on Saturday, June 1, 2019 at 6:46:41 PM Mountain Standard Time * Operating System: Version 12.1.1 (Build 16C5050a) * Image Source: /System/Library/Frameworks/PDFKit.framework/PDFKit * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by <NAME>. */ #import <PDFKit/PDFKit-Structs.h> @class PDFView, PDFDocument, PDFDocumentView, PDFTimer, NSDate; @interface PDFScrollViewPrivate : NSObject { PDFView* pdfView; PDFDocument* document; PDFDocumentView* documentView; double oldMagnification; PDFTimer* boundsUpdateTimer; CGRect oldBounds; BOOL isZooming; BOOL scheduledPageSync; NSDate* pageSyncDate; BOOL forcesTopAlignment; } @end
29.7
23
(translation_unit) "/*\n* This header is generated by classdump-dyld 1.0\n* on Saturday, June 1, 2019 at 6:46:41 PM Mountain Standard Time\n* Operating System: Version 12.1.1 (Build 16C5050a)\n* Image Source: /System/Library/Frameworks/PDFKit.framework/PDFKit\n* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by <NAME>.\n*/\n\n\n#import <PDFKit/PDFKit-Structs.h>\n@class PDFView, PDFDocument, PDFDocumentView, PDFTimer, NSDate;\n\n@interface PDFScrollViewPrivate : NSObject {\n\n PDFView* pdfView;\n PDFDocument* document;\n PDFDocumentView* documentView;\n double oldMagnification;\n PDFTimer* boundsUpdateTimer;\n CGRect oldBounds;\n BOOL isZooming;\n BOOL scheduledPageSync;\n NSDate* pageSyncDate;\n BOOL forcesTopAlignment;\n\n}\n@end\n\n" (comment) "/*\n* This header is generated by classdump-dyld 1.0\n* on Saturday, June 1, 2019 at 6:46:41 PM Mountain Standard Time\n* Operating System: Version 12.1.1 (Build 16C5050a)\n* Image Source: /System/Library/Frameworks/PDFKit.framework/PDFKit\n* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by <NAME>.\n*/\n" (preproc_call) "import <PDFKit/PDFKit-Structs.h>\n@" (preproc_directive) "import " (preproc_arg) "PDFKit/PDFKit-Structs.h>\n" (ERROR) "c" (ERROR) "c" (declaration) "lass PDFView, PDFDocument, PDFDocumentView, PDFTimer, NSDate;\n" (type_identifier) "lass " (identifier) "DFView," (,) " " (identifier) "DFDocument," (,) " " (identifier) "DFDocumentView," (,) " " (identifier) "DFTimer," (,) " " (identifier) "SDate;" (;) "\n" (ERROR) "i" (ERROR) "i" (function_definition) "nterface PDFScrollViewPrivate : NSObject {\n\n PDFView* pdfView;\n PDFDocument* document;\n PDFDocumentView* documentView;\n double oldMagnification;\n PDFTimer* boundsUpdateTimer;\n CGRect oldBounds;\n BOOL isZooming;\n BOOL scheduledPageSync;\n NSDate* pageSyncDate;\n BOOL forcesTopAlignment;\n\n}\n" (type_identifier) "nterface " (identifier) "DFScrollViewPrivate " (ERROR) " NSObject " (:) " " (identifier) "SObject " (compound_statement) "\n\n PDFView* pdfView;\n PDFDocument* document;\n PDFDocumentView* documentView;\n double oldMagnification;\n PDFTimer* boundsUpdateTimer;\n CGRect oldBounds;\n BOOL isZooming;\n BOOL scheduledPageSync;\n NSDate* pageSyncDate;\n BOOL forcesTopAlignment;\n\n}\n" ({) "\n" (declaration) "DFView* pdfView;\n" (type_identifier) "DFView*" (pointer_declarator) " pdfView;" (*) " " (identifier) "dfView;" (;) "\n" (declaration) "DFDocument* document;\n" (type_identifier) "DFDocument*" (pointer_declarator) " document;" (*) " " (identifier) "ocument;" (;) "\n" (declaration) "DFDocumentView* documentView;\n" (type_identifier) "DFDocumentView*" (pointer_declarator) " documentView;" (*) " " (identifier) "ocumentView;" (;) "\n" (declaration) "ouble oldMagnification;\n" (primitive_type) "ouble " (identifier) "ldMagnification;" (;) "\n" (declaration) "DFTimer* boundsUpdateTimer;\n" (type_identifier) "DFTimer*" (pointer_declarator) " boundsUpdateTimer;" (*) " " (identifier) "oundsUpdateTimer;" (;) "\n" (declaration) "GRect oldBounds;\n" (type_identifier) "GRect " (identifier) "ldBounds;" (;) "\n" (declaration) "OOL isZooming;\n" (type_identifier) "OOL " (identifier) "sZooming;" (;) "\n" (declaration) "OOL scheduledPageSync;\n" (type_identifier) "OOL " (identifier) "cheduledPageSync;" (;) "\n" (declaration) "SDate* pageSyncDate;\n" (type_identifier) "SDate*" (pointer_declarator) " pageSyncDate;" (*) " " (identifier) "ageSyncDate;" (;) "\n" (declaration) "OOL forcesTopAlignment;\n" (type_identifier) "OOL " (identifier) "orcesTopAlignment;" (;) "\n" (}) "\n" (ERROR) "e" (ERROR) "e" (expression_statement) "nd\n" (identifier) "nd\n" (;) ""
85
7
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 29.7, "nodes": 61, "errors": 0, "source_hash": "1bc9ffd07b7ae678db5b994a67385728beea911f038ba571f204dbea9519812d", "categorized_nodes": 42}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "import <PDFKit/PDFKit-Structs.h>\n@", "parent": null, "children": [1], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 1, "type": "preproc_arg", "text": "PDFKit/PDFKit-Structs.h>\n", "parent": 0, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 33}}, {"id": 2, "type": "ERROR", "text": "c", "parent": null, "children": [3], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 3, "type": "ERROR", "text": "c", "parent": 2, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 4, "type": "declaration", "text": "lass PDFView, PDFDocument, PDFDocumentView, PDFTimer, NSDate;\n", "parent": null, "children": [5, 6, 7, 8, 9, 10], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 63}}, {"id": 5, "type": "type_identifier", "text": "lass ", "parent": 4, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 6}}, {"id": 6, "type": "identifier", "text": "DFView,", "parent": 4, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 14}}, {"id": 7, "type": "identifier", "text": "DFDocument,", "parent": 4, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 27}}, {"id": 8, "type": "identifier", "text": "DFDocumentView,", "parent": 4, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 44}}, {"id": 9, "type": "identifier", "text": "DFTimer,", "parent": 4, "children": [], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 54}}, {"id": 10, "type": "identifier", "text": "SDate;", "parent": 4, "children": [], "start_point": {"row": 10, "column": 56}, "end_point": {"row": 10, "column": 62}}, {"id": 11, "type": "ERROR", "text": "i", "parent": null, "children": [12], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 12, "type": "ERROR", "text": "i", "parent": 11, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 13, "type": "function_definition", "text": "nterface PDFScrollViewPrivate : NSObject {\n\n\tPDFView* pdfView;\n\tPDFDocument* document;\n\tPDFDocumentView* documentView;\n\tdouble oldMagnification;\n\tPDFTimer* boundsUpdateTimer;\n\tCGRect oldBounds;\n\tBOOL isZooming;\n\tBOOL scheduledPageSync;\n\tNSDate* pageSyncDate;\n\tBOOL forcesTopAlignment;\n\n}\n", "parent": null, "children": [14, 15, 16], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 25, "column": 1}}, {"id": 14, "type": "type_identifier", "text": "nterface ", "parent": 13, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 10}}, {"id": 15, "type": "identifier", "text": "DFScrollViewPrivate ", "parent": 13, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 31}}, {"id": 16, "type": "ERROR", "text": " NSObject ", "parent": 13, "children": [17], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 42}}, {"id": 17, "type": "identifier", "text": "SObject ", "parent": 16, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 42}}, {"id": 18, "type": "declaration", "text": "DFView* pdfView;\n", "parent": 13, "children": [19, 20], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 18}}, {"id": 19, "type": "type_identifier", "text": "DFView*", "parent": 18, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 8}}, {"id": 20, "type": "pointer_declarator", "text": " pdfView;", "parent": 18, "children": [21, 22], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 17}}, {"id": 21, "type": "*", "text": " ", "parent": 20, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 9}}, {"id": 22, "type": "identifier", "text": "dfView;", "parent": 20, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 17}}, {"id": 23, "type": "declaration", "text": "DFDocument* document;\n", "parent": 13, "children": [24, 25], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 23}}, {"id": 24, "type": "type_identifier", "text": "DFDocument*", "parent": 23, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 12}}, {"id": 25, "type": "pointer_declarator", "text": " document;", "parent": 23, "children": [26, 27], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 22}}, {"id": 26, "type": "*", "text": " ", "parent": 25, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 13}}, {"id": 27, "type": "identifier", "text": "ocument;", "parent": 25, "children": [], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 22}}, {"id": 28, "type": "declaration", "text": "DFDocumentView* documentView;\n", "parent": 13, "children": [29, 30], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 31}}, {"id": 29, "type": "type_identifier", "text": "DFDocumentView*", "parent": 28, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 16}}, {"id": 30, "type": "pointer_declarator", "text": " documentView;", "parent": 28, "children": [31, 32], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 30}}, {"id": 31, "type": "*", "text": " ", "parent": 30, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 17}}, {"id": 32, "type": "identifier", "text": "ocumentView;", "parent": 30, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 30}}, {"id": 33, "type": "declaration", "text": "ouble oldMagnification;\n", "parent": 13, "children": [34, 35], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 25}}, {"id": 34, "type": "primitive_type", "text": "ouble ", "parent": 33, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 7}}, {"id": 35, "type": "identifier", "text": "ldMagnification;", "parent": 33, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 24}}, {"id": 36, "type": "declaration", "text": "DFTimer* boundsUpdateTimer;\n", "parent": 13, "children": [37, 38], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 29}}, {"id": 37, "type": "type_identifier", "text": "DFTimer*", "parent": 36, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 9}}, {"id": 38, "type": "pointer_declarator", "text": " boundsUpdateTimer;", "parent": 36, "children": [39, 40], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 28}}, {"id": 39, "type": "*", "text": " ", "parent": 38, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 10}}, {"id": 40, "type": "identifier", "text": "oundsUpdateTimer;", "parent": 38, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 28}}, {"id": 41, "type": "declaration", "text": "GRect oldBounds;\n", "parent": 13, "children": [42, 43], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 18}}, {"id": 42, "type": "type_identifier", "text": "GRect ", "parent": 41, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 7}}, {"id": 43, "type": "identifier", "text": "ldBounds;", "parent": 41, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 17}}, {"id": 44, "type": "declaration", "text": "OOL isZooming;\n", "parent": 13, "children": [45, 46], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 16}}, {"id": 45, "type": "type_identifier", "text": "OOL ", "parent": 44, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 5}}, {"id": 46, "type": "identifier", "text": "sZooming;", "parent": 44, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 15}}, {"id": 47, "type": "declaration", "text": "OOL scheduledPageSync;\n", "parent": 13, "children": [48, 49], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 24}}, {"id": 48, "type": "type_identifier", "text": "OOL ", "parent": 47, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 5}}, {"id": 49, "type": "identifier", "text": "cheduledPageSync;", "parent": 47, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 23}}, {"id": 50, "type": "declaration", "text": "SDate* pageSyncDate;\n", "parent": 13, "children": [51, 52], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 22}}, {"id": 51, "type": "type_identifier", "text": "SDate*", "parent": 50, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 7}}, {"id": 52, "type": "pointer_declarator", "text": " pageSyncDate;", "parent": 50, "children": [53, 54], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 21}}, {"id": 53, "type": "*", "text": " ", "parent": 52, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 8}}, {"id": 54, "type": "identifier", "text": "ageSyncDate;", "parent": 52, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 21}}, {"id": 55, "type": "declaration", "text": "OOL forcesTopAlignment;\n", "parent": 13, "children": [56, 57], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 25}}, {"id": 56, "type": "type_identifier", "text": "OOL ", "parent": 55, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 5}}, {"id": 57, "type": "identifier", "text": "orcesTopAlignment;", "parent": 55, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 24}}, {"id": 58, "type": "ERROR", "text": "e", "parent": null, "children": [59], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 59, "type": "ERROR", "text": "e", "parent": 58, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 60, "type": "identifier", "text": "nd\n", "parent": null, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 4}}]}, "node_categories": {"declarations": {"functions": [13], "variables": [4, 18, 23, 28, 33, 36, 41, 44, 47, 50, 55], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 6, 7, 8, 9, 10, 14, 15, 17, 19, 22, 24, 27, 29, 32, 35, 37, 40, 42, 43, 45, 46, 48, 49, 51, 54, 56, 57, 60], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 13, "universal_type": "function", "name": "unknown", "text_snippet": "nterface PDFScrollViewPrivate : NSObject {\n\n\tPDFView* pdfView;\n\tPDFDocument* document;\n\tPDFDocumentV"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/*\n* This header is generated by classdump-dyld 1.0\n* on Saturday, June 1, 2019 at 6:46:41 PM Mountain Standard Time\n* Operating System: Version 12.1.1 (Build 16C5050a)\n* Image Source: /System/Library/Frameworks/PDFKit.framework/PDFKit\n* classdump-dyld is licensed under GPLv3, Copyright \u00a9 2013-2016 by <NAME>.\n*/\n\n\n#import <PDFKit/PDFKit-Structs.h>\n@class PDFView, PDFDocument, PDFDocumentView, PDFTimer, NSDate;\n\n@interface PDFScrollViewPrivate : NSObject {\n\n\tPDFView* pdfView;\n\tPDFDocument* document;\n\tPDFDocumentView* documentView;\n\tdouble oldMagnification;\n\tPDFTimer* boundsUpdateTimer;\n\tCGRect oldBounds;\n\tBOOL isZooming;\n\tBOOL scheduledPageSync;\n\tNSDate* pageSyncDate;\n\tBOOL forcesTopAlignment;\n\n}\n@end\n\n"}
394
c
/////////////////////////////////////////////////////////////////////////////// /// /// Copyright (c) [!output PROJECT_YEAR] - [!output DDKWIZ_USERVARIABLE_COMPANY] /// /// Original filename: [!output PROJECT_FILENAME] /// Project : [!output PROJECT_NAME] /// Date of creation : [!output PROJECT_DATE] /// Author(s) : [!output DDKWIZ_USERVARIABLE_AUTHOR] /// /// Purpose : <description> /// /// Revisions: /// 0000 [[!output PROJECT_DATE]] Initial revision. /// /////////////////////////////////////////////////////////////////////////////// // $Id$ #ifdef __cplusplus extern "C" { #endif #include <ntddk.h> #include <string.h> #ifdef __cplusplus }; // extern "C" #endif #include "[!output PROJECT_NAME].h" #ifdef __cplusplus namespace { // anonymous namespace to limit the scope of this global variable! #endif PDRIVER_OBJECT pdoGlobalDrvObj = 0; #ifdef __cplusplus }; // anonymous namespace #endif NTSTATUS [!output PROJECT_PREFIX]_DispatchCreateClose( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp ) { NTSTATUS status = STATUS_SUCCESS; Irp->IoStatus.Status = status; Irp->IoStatus.Information = 0; IoCompleteRequest(Irp, IO_NO_INCREMENT); return status; } NTSTATUS [!output PROJECT_PREFIX]_DispatchDeviceControl( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp ) { NTSTATUS status = STATUS_SUCCESS; PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation(Irp); switch(irpSp->Parameters.DeviceIoControl.IoControlCode) { [!if STRICTERCPP_CHECKBOX] case IOCTL_[!output PROJECT_PREFIX]_OPERATION: // status = SomeHandlerFunction(irpSp); break; [!endif] default: Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; Irp->IoStatus.Information = 0; break; } status = Irp->IoStatus.Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); return status; } VOID [!output PROJECT_PREFIX]_DriverUnload( IN PDRIVER_OBJECT DriverObject ) { PDEVICE_OBJECT pdoNextDeviceObj = pdoGlobalDrvObj->DeviceObject; IoDeleteSymbolicLink(&usSymlinkName); // Delete all the device objects while(pdoNextDeviceObj) { PDEVICE_OBJECT pdoThisDeviceObj = pdoNextDeviceObj; pdoNextDeviceObj = pdoThisDeviceObj->NextDevice; IoDeleteDevice(pdoThisDeviceObj); } } #ifdef __cplusplus extern "C" { #endif NTSTATUS DriverEntry( IN OUT PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath ) { PDEVICE_OBJECT pdoDeviceObj = 0; NTSTATUS status = STATUS_UNSUCCESSFUL; pdoGlobalDrvObj = DriverObject; // Create the device object. if(!NT_SUCCESS(status = IoCreateDevice( DriverObject, 0, &usDeviceName, FILE_DEVICE_UNKNOWN, FILE_DEVICE_SECURE_OPEN, FALSE, &pdoDeviceObj ))) { // Bail out (implicitly forces the driver to unload). return status; }; // Now create the respective symbolic link object if(!NT_SUCCESS(status = IoCreateSymbolicLink( &usSymlinkName, &usDeviceName ))) { IoDeleteDevice(pdoDeviceObj); return status; } // NOTE: You need not provide your own implementation for any major function that // you do not want to handle. I have seen code using DDKWizard that left the // *empty* dispatch routines intact. This is not necessary at all! DriverObject->MajorFunction[IRP_MJ_CREATE] = DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]_DispatchCreateClose; DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = [!output PROJECT_PREFIX]_DispatchDeviceControl; DriverObject->DriverUnload = [!output PROJECT_PREFIX]_DriverUnload; return STATUS_SUCCESS; } #ifdef __cplusplus }; // extern "C" #endif
27.21
141
(ERROR) "/////////////////////////////////////////////////////////////////////////////// \n/// \n/// Copyright (c) [!output PROJECT_YEAR] - [!output DDKWIZ_USERVARIABLE_COMPANY] \n/// \n/// Original filename: [!output PROJECT_FILENAME] \n/// Project : [!output PROJECT_NAME] \n/// Date of creation : [!output PROJECT_DATE] \n/// Author(s) : [!output DDKWIZ_USERVARIABLE_AUTHOR] \n/// \n/// Purpose : <description> \n/// \n/// Revisions: \n/// 0000 [[!output PROJECT_DATE]] Initial revision. \n/// \n/////////////////////////////////////////////////////////////////////////////// \n \n// $Id$ \n \n#ifdef __cplusplus \nextern "C" { \n#endif \n#include <ntddk.h> \n#include <string.h> \n#ifdef __cplusplus \n}; // extern "C" \n#endif \n \n#include "[!output PROJECT_NAME].h" \n \n#ifdef __cplusplus \nnamespace { // anonymous namespace to limit the scope of this global variable! \n#endif \nPDRIVER_OBJECT pdoGlobalDrvObj = 0; \n#ifdef __cplusplus \n}; // anonymous namespace \n#endif \n \nNTSTATUS [!output PROJECT_PREFIX]_DispatchCreateClose( \n IN PDEVICE_OBJECT DeviceObject, \n IN PIRP Irp \n ) \n{ \n NTSTATUS status = STATUS_SUCCESS; \n Irp->IoStatus.Status = status; \n Irp->IoStatus.Information = 0; \n IoCompleteRequest(Irp, IO_NO_INCREMENT); \n return status; \n} \n \nNTSTATUS [!output PROJECT_PREFIX]_DispatchDeviceControl( \n IN PDEVICE_OBJECT DeviceObject, \n IN PIRP Irp \n ) \n{ \n NTSTATUS status = STATUS_SUCCESS; \n PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation(Irp); \n \n switch(irpSp->Parameters.DeviceIoControl.IoControlCode) \n { \n[!if STRICTERCPP_CHECKBOX] \n case IOCTL_[!output PROJECT_PREFIX]_OPERATION: \n // status = SomeHandlerFunction(irpSp); \n break; \n[!endif] \n default: \n Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; \n Irp->IoStatus.Information = 0; \n break; \n } \n \n status = Irp->IoStatus.Status; \n IoCompleteRequest(Irp, IO_NO_INCREMENT); \n return status; \n} \n \nVOID [!output PROJECT_PREFIX]_DriverUnload( \n IN PDRIVER_OBJECT DriverObject \n ) \n{ \n PDEVICE_OBJECT pdoNextDeviceObj = pdoGlobalDrvObj->DeviceObject; \n IoDeleteSymbolicLink(&usSymlinkName); \n \n // Delete all the device objects \n while(pdoNextDeviceObj) \n { \n PDEVICE_OBJECT pdoThisDeviceObj = pdoNextDeviceObj; \n pdoNextDeviceObj = pdoThisDeviceObj->NextDevice; \n IoDeleteDevice(pdoThisDeviceObj); \n } \n} \n \n#ifdef __cplusplus \nextern "C" { \n#endif \nNTSTATUS DriverEntry( \n IN OUT PDRIVER_OBJECT DriverObject, \n IN PUNICODE_STRING RegistryPath \n ) \n{ \n PDEVICE_OBJECT pdoDeviceObj = 0; \n NTSTATUS status = STATUS_UNSUCCESSFUL; \n pdoGlobalDrvObj = DriverObject; \n \n // Create the device object. \n if(!NT_SUCCESS(status = IoCreateDevice( \n DriverObject, \n 0, \n &usDeviceName, \n FILE_DEVICE_UNKNOWN, \n FILE_DEVICE_SECURE_OPEN, \n FALSE, \n &pdoDeviceObj \n ))) \n { \n // Bail out (implicitly forces the driver to unload). \n return status; \n }; \n \n // Now create the respective symbolic link object \n if(!NT_SUCCESS(status = IoCreateSymbolicLink( \n &usSymlinkName, \n &usDeviceName \n ))) \n { \n IoDeleteDevice(pdoDeviceObj); \n return status; \n } \n \n // NOTE: You need not provide your own implementation for any major function that \n // you do not want to handle. I have seen code using DDKWizard that left the \n // *empty* dispatch routines intact. This is not necessary at all! \n DriverObject->MajorFunction[IRP_MJ_CREATE] = \n DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]_DispatchCreateClose; \n DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = [!output PROJECT_PREFIX]_DispatchDeviceControl; \n DriverObject->DriverUnload = [!output PROJECT_PREFIX]_DriverUnload; \n \n return STATUS_SUCCESS; \n} \n#ifdef __cplusplus \n}; // extern "C" \n#endif \n" (comment) "/////////////////////////////////////////////////////////////////////////////// " (comment) "/// " (comment) "/// Copyright (c) [!output PROJECT_YEAR] - [!output DDKWIZ_USERVARIABLE_COMPANY] " (comment) "/// " (comment) "/// Original filename: [!output PROJECT_FILENAME] " (comment) "/// Project : [!output PROJECT_NAME] " (comment) "/// Date of creation : [!output PROJECT_DATE] " (comment) "/// Author(s) : [!output DDKWIZ_USERVARIABLE_AUTHOR] " (comment) "/// " (comment) "/// Purpose : <description> " (comment) "/// " (comment) "/// Revisions: " (comment) "/// 0000 [[!output PROJECT_DATE]] Initial revision. " (comment) "/// " (comment) "/////////////////////////////////////////////////////////////////////////////// " (comment) "// $Id$ " (#ifdef) "#ifdef" (identifier) "__cplusplus" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ ({) "{" (preproc_call) "#endif \n" (preproc_directive) "#endif" (preproc_include) "#include <ntddk.h> \n" (#include) "#include" (system_lib_string) "<ntddk.h>" (preproc_include) "#include <string.h> \n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_ifdef) "#ifdef __cplusplus \n}; // extern "C" \n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (comment) "// extern "C" " (#endif) "#endif" (preproc_include) "#include "[!output PROJECT_NAME].h" \n" (#include) "#include" (string_literal) ""[!output PROJECT_NAME].h"" (") """ (string_content) "[!output PROJECT_NAME].h" (") """ (#ifdef) "#ifdef" (identifier) "__cplusplus" (ERROR) "namespace" (identifier) "namespace" ({) "{" (comment) "// anonymous namespace to limit the scope of this global variable! " (preproc_call) "#endif \n" (preproc_directive) "#endif" (declaration) "PDRIVER_OBJECT pdoGlobalDrvObj = 0;" (type_identifier) "PDRIVER_OBJECT" (init_declarator) "pdoGlobalDrvObj = 0" (identifier) "pdoGlobalDrvObj" (=) "=" (number_literal) "0" (;) ";" (preproc_ifdef) "#ifdef __cplusplus \n}; // anonymous namespace \n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (comment) "// anonymous namespace " (#endif) "#endif" (expression_statement) "NTSTATUS [!output PROJECT_PREFIX]" (subscript_expression) "NTSTATUS [!output PROJECT_PREFIX]" (identifier) "NTSTATUS" ([) "[" (unary_expression) "!output PROJECT_PREFIX" (!) "!" (ERROR) "output" (identifier) "output" (identifier) "PROJECT_PREFIX" (]) "]" (;) "" (macro_type_specifier) "_DispatchCreateClose( \n IN PDEVICE_OBJECT DeviceObject, \n IN PIRP Irp \n )" (identifier) "_DispatchCreateClose" (() "(" (ERROR) "IN PDEVICE_OBJECT DeviceObject, \n IN PIRP" (type_identifier) "IN" (identifier) "PDEVICE_OBJECT" (type_descriptor) "DeviceObject" (type_identifier) "DeviceObject" (,) "," (type_identifier) "IN" (identifier) "PIRP" (type_descriptor) "Irp" (type_identifier) "Irp" ()) ")" (;) "" (compound_statement) "{ \n NTSTATUS status = STATUS_SUCCESS; \n Irp->IoStatus.Status = status; \n Irp->IoStatus.Information = 0; \n IoCompleteRequest(Irp, IO_NO_INCREMENT); \n return status; \n}" ({) "{" (declaration) "NTSTATUS status = STATUS_SUCCESS;" (type_identifier) "NTSTATUS" (init_declarator) "status = STATUS_SUCCESS" (identifier) "status" (=) "=" (identifier) "STATUS_SUCCESS" (;) ";" (expression_statement) "Irp->IoStatus.Status = status;" (assignment_expression) "Irp->IoStatus.Status = status" (field_expression) "Irp->IoStatus.Status" (field_expression) "Irp->IoStatus" (identifier) "Irp" (->) "->" (field_identifier) "IoStatus" (.) "." (field_identifier) "Status" (=) "=" (identifier) "status" (;) ";" (expression_statement) "Irp->IoStatus.Information = 0;" (assignment_expression) "Irp->IoStatus.Information = 0" (field_expression) "Irp->IoStatus.Information" (field_expression) "Irp->IoStatus" (identifier) "Irp" (->) "->" (field_identifier) "IoStatus" (.) "." (field_identifier) "Information" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "IoCompleteRequest(Irp, IO_NO_INCREMENT);" (call_expression) "IoCompleteRequest(Irp, IO_NO_INCREMENT)" (identifier) "IoCompleteRequest" (argument_list) "(Irp, IO_NO_INCREMENT)" (() "(" (identifier) "Irp" (,) "," (identifier) "IO_NO_INCREMENT" ()) ")" (;) ";" (return_statement) "return status;" (return) "return" (identifier) "status" (;) ";" (}) "}" (expression_statement) "NTSTATUS [!output PROJECT_PREFIX]" (subscript_expression) "NTSTATUS [!output PROJECT_PREFIX]" (identifier) "NTSTATUS" ([) "[" (unary_expression) "!output PROJECT_PREFIX" (!) "!" (ERROR) "output" (identifier) "output" (identifier) "PROJECT_PREFIX" (]) "]" (;) "" (macro_type_specifier) "_DispatchDeviceControl( \n IN PDEVICE_OBJECT DeviceObject, \n IN PIRP Irp \n )" (identifier) "_DispatchDeviceControl" (() "(" (ERROR) "IN PDEVICE_OBJECT DeviceObject, \n IN PIRP" (type_identifier) "IN" (identifier) "PDEVICE_OBJECT" (type_descriptor) "DeviceObject" (type_identifier) "DeviceObject" (,) "," (type_identifier) "IN" (identifier) "PIRP" (type_descriptor) "Irp" (type_identifier) "Irp" ()) ")" (;) "" (compound_statement) "{ \n NTSTATUS status = STATUS_SUCCESS; \n PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation(Irp); \n \n switch(irpSp->Parameters.DeviceIoControl.IoControlCode) \n { \n[!if STRICTERCPP_CHECKBOX] \n case IOCTL_[!output PROJECT_PREFIX]_OPERATION: \n // status = SomeHandlerFunction(irpSp); \n break; \n[!endif] \n default: \n Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; \n Irp->IoStatus.Information = 0; \n break; \n } \n \n status = Irp->IoStatus.Status; \n IoCompleteRequest(Irp, IO_NO_INCREMENT); \n return status; \n}" ({) "{" (declaration) "NTSTATUS status = STATUS_SUCCESS;" (type_identifier) "NTSTATUS" (init_declarator) "status = STATUS_SUCCESS" (identifier) "status" (=) "=" (identifier) "STATUS_SUCCESS" (;) ";" (declaration) "PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation(Irp);" (type_identifier) "PIO_STACK_LOCATION" (init_declarator) "irpSp = IoGetCurrentIrpStackLocation(Irp)" (identifier) "irpSp" (=) "=" (call_expression) "IoGetCurrentIrpStackLocation(Irp)" (identifier) "IoGetCurrentIrpStackLocation" (argument_list) "(Irp)" (() "(" (identifier) "Irp" ()) ")" (;) ";" (switch_statement) "switch(irpSp->Parameters.DeviceIoControl.IoControlCode) \n { \n[!if STRICTERCPP_CHECKBOX] \n case IOCTL_[!output PROJECT_PREFIX]_OPERATION: \n // status = SomeHandlerFunction(irpSp); \n break; \n[!endif] \n default: \n Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; \n Irp->IoStatus.Information = 0; \n break; \n }" (switch) "switch" (parenthesized_expression) "(irpSp->Parameters.DeviceIoControl.IoControlCode)" (() "(" (field_expression) "irpSp->Parameters.DeviceIoControl.IoControlCode" (field_expression) "irpSp->Parameters.DeviceIoControl" (field_expression) "irpSp->Parameters" (identifier) "irpSp" (->) "->" (field_identifier) "Parameters" (.) "." (field_identifier) "DeviceIoControl" (.) "." (field_identifier) "IoControlCode" ()) ")" (compound_statement) "{ \n[!if STRICTERCPP_CHECKBOX] \n case IOCTL_[!output PROJECT_PREFIX]_OPERATION: \n // status = SomeHandlerFunction(irpSp); \n break; \n[!endif] \n default: \n Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; \n Irp->IoStatus.Information = 0; \n break; \n }" ({) "{" (ERROR) "[!if STRICTERCPP_CHECKBOX]" ([) "[" (unary_expression) "!if" (!) "!" (identifier) "if" (identifier) "STRICTERCPP_CHECKBOX" (]) "]" (case_statement) "case IOCTL_[!output PROJECT_PREFIX]_OPERATION: \n // status = SomeHandlerFunction(irpSp); \n break; \n[!endif] \n default: \n Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; \n Irp->IoStatus.Information = 0; \n break;" (case) "case" (subscript_expression) "IOCTL_[!output PROJECT_PREFIX]_OPERATION: \n // status = SomeHandlerFunction(irpSp); \n break; \n[!endif]" (subscript_expression) "IOCTL_[!output PROJECT_PREFIX]" (identifier) "IOCTL_" ([) "[" (unary_expression) "!output PROJECT_PREFIX" (!) "!" (ERROR) "output" (identifier) "output" (identifier) "PROJECT_PREFIX" (]) "]" (ERROR) "_OPERATION: \n // status = SomeHandlerFunction(irpSp); \n break;" (identifier) "_OPERATION" (:) ":" (comment) "// status = SomeHandlerFunction(irpSp); " (break_statement) "break;" (break) "break" (;) ";" ([) "[" (unary_expression) "!endif" (!) "!" (identifier) "endif" (]) "]" (ERROR) "default" (identifier) "default" (:) ":" (expression_statement) "Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST;" (assignment_expression) "Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST" (field_expression) "Irp->IoStatus.Status" (field_expression) "Irp->IoStatus" (identifier) "Irp" (->) "->" (field_identifier) "IoStatus" (.) "." (field_identifier) "Status" (=) "=" (identifier) "STATUS_INVALID_DEVICE_REQUEST" (;) ";" (expression_statement) "Irp->IoStatus.Information = 0;" (assignment_expression) "Irp->IoStatus.Information = 0" (field_expression) "Irp->IoStatus.Information" (field_expression) "Irp->IoStatus" (identifier) "Irp" (->) "->" (field_identifier) "IoStatus" (.) "." (field_identifier) "Information" (=) "=" (number_literal) "0" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "status = Irp->IoStatus.Status;" (assignment_expression) "status = Irp->IoStatus.Status" (identifier) "status" (=) "=" (field_expression) "Irp->IoStatus.Status" (field_expression) "Irp->IoStatus" (identifier) "Irp" (->) "->" (field_identifier) "IoStatus" (.) "." (field_identifier) "Status" (;) ";" (expression_statement) "IoCompleteRequest(Irp, IO_NO_INCREMENT);" (call_expression) "IoCompleteRequest(Irp, IO_NO_INCREMENT)" (identifier) "IoCompleteRequest" (argument_list) "(Irp, IO_NO_INCREMENT)" (() "(" (identifier) "Irp" (,) "," (identifier) "IO_NO_INCREMENT" ()) ")" (;) ";" (return_statement) "return status;" (return) "return" (identifier) "status" (;) ";" (}) "}" (expression_statement) "VOID [!output PROJECT_PREFIX]" (subscript_expression) "VOID [!output PROJECT_PREFIX]" (identifier) "VOID" ([) "[" (unary_expression) "!output PROJECT_PREFIX" (!) "!" (ERROR) "output" (identifier) "output" (identifier) "PROJECT_PREFIX" (]) "]" (;) "" (macro_type_specifier) "_DriverUnload( \n IN PDRIVER_OBJECT DriverObject \n )" (identifier) "_DriverUnload" (() "(" (ERROR) "IN PDRIVER_OBJECT" (type_identifier) "IN" (identifier) "PDRIVER_OBJECT" (type_descriptor) "DriverObject" (type_identifier) "DriverObject" ()) ")" (;) "" (compound_statement) "{ \n PDEVICE_OBJECT pdoNextDeviceObj = pdoGlobalDrvObj->DeviceObject; \n IoDeleteSymbolicLink(&usSymlinkName); \n \n // Delete all the device objects \n while(pdoNextDeviceObj) \n { \n PDEVICE_OBJECT pdoThisDeviceObj = pdoNextDeviceObj; \n pdoNextDeviceObj = pdoThisDeviceObj->NextDevice; \n IoDeleteDevice(pdoThisDeviceObj); \n } \n}" ({) "{" (declaration) "PDEVICE_OBJECT pdoNextDeviceObj = pdoGlobalDrvObj->DeviceObject;" (type_identifier) "PDEVICE_OBJECT" (init_declarator) "pdoNextDeviceObj = pdoGlobalDrvObj->DeviceObject" (identifier) "pdoNextDeviceObj" (=) "=" (field_expression) "pdoGlobalDrvObj->DeviceObject" (identifier) "pdoGlobalDrvObj" (->) "->" (field_identifier) "DeviceObject" (;) ";" (expression_statement) "IoDeleteSymbolicLink(&usSymlinkName);" (call_expression) "IoDeleteSymbolicLink(&usSymlinkName)" (identifier) "IoDeleteSymbolicLink" (argument_list) "(&usSymlinkName)" (() "(" (pointer_expression) "&usSymlinkName" (&) "&" (identifier) "usSymlinkName" ()) ")" (;) ";" (comment) "// Delete all the device objects " (while_statement) "while(pdoNextDeviceObj) \n { \n PDEVICE_OBJECT pdoThisDeviceObj = pdoNextDeviceObj; \n pdoNextDeviceObj = pdoThisDeviceObj->NextDevice; \n IoDeleteDevice(pdoThisDeviceObj); \n }" (while) "while" (parenthesized_expression) "(pdoNextDeviceObj)" (() "(" (identifier) "pdoNextDeviceObj" ()) ")" (compound_statement) "{ \n PDEVICE_OBJECT pdoThisDeviceObj = pdoNextDeviceObj; \n pdoNextDeviceObj = pdoThisDeviceObj->NextDevice; \n IoDeleteDevice(pdoThisDeviceObj); \n }" ({) "{" (declaration) "PDEVICE_OBJECT pdoThisDeviceObj = pdoNextDeviceObj;" (type_identifier) "PDEVICE_OBJECT" (init_declarator) "pdoThisDeviceObj = pdoNextDeviceObj" (identifier) "pdoThisDeviceObj" (=) "=" (identifier) "pdoNextDeviceObj" (;) ";" (expression_statement) "pdoNextDeviceObj = pdoThisDeviceObj->NextDevice;" (assignment_expression) "pdoNextDeviceObj = pdoThisDeviceObj->NextDevice" (identifier) "pdoNextDeviceObj" (=) "=" (field_expression) "pdoThisDeviceObj->NextDevice" (identifier) "pdoThisDeviceObj" (->) "->" (field_identifier) "NextDevice" (;) ";" (expression_statement) "IoDeleteDevice(pdoThisDeviceObj);" (call_expression) "IoDeleteDevice(pdoThisDeviceObj)" (identifier) "IoDeleteDevice" (argument_list) "(pdoThisDeviceObj)" (() "(" (identifier) "pdoThisDeviceObj" ()) ")" (;) ";" (}) "}" (}) "}" (#ifdef) "#ifdef" (identifier) "__cplusplus" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ ({) "{" (preproc_call) "#endif \n" (preproc_directive) "#endif" (function_definition) "NTSTATUS DriverEntry( \n IN OUT PDRIVER_OBJECT DriverObject, \n IN PUNICODE_STRING RegistryPath \n ) \n{ \n PDEVICE_OBJECT pdoDeviceObj = 0; \n NTSTATUS status = STATUS_UNSUCCESSFUL; \n pdoGlobalDrvObj = DriverObject; \n \n // Create the device object. \n if(!NT_SUCCESS(status = IoCreateDevice( \n DriverObject, \n 0, \n &usDeviceName, \n FILE_DEVICE_UNKNOWN, \n FILE_DEVICE_SECURE_OPEN, \n FALSE, \n &pdoDeviceObj \n ))) \n { \n // Bail out (implicitly forces the driver to unload). \n return status; \n }; \n \n // Now create the respective symbolic link object \n if(!NT_SUCCESS(status = IoCreateSymbolicLink( \n &usSymlinkName, \n &usDeviceName \n ))) \n { \n IoDeleteDevice(pdoDeviceObj); \n return status; \n } \n \n // NOTE: You need not provide your own implementation for any major function that \n // you do not want to handle. I have seen code using DDKWizard that left the \n // *empty* dispatch routines intact. This is not necessary at all! \n DriverObject->MajorFunction[IRP_MJ_CREATE] = \n DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]_DispatchCreateClose; \n DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = [!output PROJECT_PREFIX]_DispatchDeviceControl; \n DriverObject->DriverUnload = [!output PROJECT_PREFIX]_DriverUnload; \n \n return STATUS_SUCCESS; \n}" (type_identifier) "NTSTATUS" (function_declarator) "DriverEntry( \n IN OUT PDRIVER_OBJECT DriverObject, \n IN PUNICODE_STRING RegistryPath \n )" (identifier) "DriverEntry" (parameter_list) "( \n IN OUT PDRIVER_OBJECT DriverObject, \n IN PUNICODE_STRING RegistryPath \n )" (() "(" (parameter_declaration) "IN OUT PDRIVER_OBJECT DriverObject" (type_identifier) "IN" (ERROR) "OUT PDRIVER_OBJECT" (identifier) "OUT" (identifier) "PDRIVER_OBJECT" (identifier) "DriverObject" (,) "," (parameter_declaration) "IN PUNICODE_STRING" (type_identifier) "IN" (identifier) "PUNICODE_STRING" (ERROR) "RegistryPath" (identifier) "RegistryPath" ()) ")" (compound_statement) "{ \n PDEVICE_OBJECT pdoDeviceObj = 0; \n NTSTATUS status = STATUS_UNSUCCESSFUL; \n pdoGlobalDrvObj = DriverObject; \n \n // Create the device object. \n if(!NT_SUCCESS(status = IoCreateDevice( \n DriverObject, \n 0, \n &usDeviceName, \n FILE_DEVICE_UNKNOWN, \n FILE_DEVICE_SECURE_OPEN, \n FALSE, \n &pdoDeviceObj \n ))) \n { \n // Bail out (implicitly forces the driver to unload). \n return status; \n }; \n \n // Now create the respective symbolic link object \n if(!NT_SUCCESS(status = IoCreateSymbolicLink( \n &usSymlinkName, \n &usDeviceName \n ))) \n { \n IoDeleteDevice(pdoDeviceObj); \n return status; \n } \n \n // NOTE: You need not provide your own implementation for any major function that \n // you do not want to handle. I have seen code using DDKWizard that left the \n // *empty* dispatch routines intact. This is not necessary at all! \n DriverObject->MajorFunction[IRP_MJ_CREATE] = \n DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]_DispatchCreateClose; \n DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = [!output PROJECT_PREFIX]_DispatchDeviceControl; \n DriverObject->DriverUnload = [!output PROJECT_PREFIX]_DriverUnload; \n \n return STATUS_SUCCESS; \n}" ({) "{" (declaration) "PDEVICE_OBJECT pdoDeviceObj = 0;" (type_identifier) "PDEVICE_OBJECT" (init_declarator) "pdoDeviceObj = 0" (identifier) "pdoDeviceObj" (=) "=" (number_literal) "0" (;) ";" (declaration) "NTSTATUS status = STATUS_UNSUCCESSFUL;" (type_identifier) "NTSTATUS" (init_declarator) "status = STATUS_UNSUCCESSFUL" (identifier) "status" (=) "=" (identifier) "STATUS_UNSUCCESSFUL" (;) ";" (expression_statement) "pdoGlobalDrvObj = DriverObject;" (assignment_expression) "pdoGlobalDrvObj = DriverObject" (identifier) "pdoGlobalDrvObj" (=) "=" (identifier) "DriverObject" (;) ";" (comment) "// Create the device object. " (if_statement) "if(!NT_SUCCESS(status = IoCreateDevice( \n DriverObject, \n 0, \n &usDeviceName, \n FILE_DEVICE_UNKNOWN, \n FILE_DEVICE_SECURE_OPEN, \n FALSE, \n &pdoDeviceObj \n ))) \n { \n // Bail out (implicitly forces the driver to unload). \n return status; \n }" (if) "if" (parenthesized_expression) "(!NT_SUCCESS(status = IoCreateDevice( \n DriverObject, \n 0, \n &usDeviceName, \n FILE_DEVICE_UNKNOWN, \n FILE_DEVICE_SECURE_OPEN, \n FALSE, \n &pdoDeviceObj \n )))" (() "(" (unary_expression) "!NT_SUCCESS(status = IoCreateDevice( \n DriverObject, \n 0, \n &usDeviceName, \n FILE_DEVICE_UNKNOWN, \n FILE_DEVICE_SECURE_OPEN, \n FALSE, \n &pdoDeviceObj \n ))" (!) "!" (call_expression) "NT_SUCCESS(status = IoCreateDevice( \n DriverObject, \n 0, \n &usDeviceName, \n FILE_DEVICE_UNKNOWN, \n FILE_DEVICE_SECURE_OPEN, \n FALSE, \n &pdoDeviceObj \n ))" (identifier) "NT_SUCCESS" (argument_list) "(status = IoCreateDevice( \n DriverObject, \n 0, \n &usDeviceName, \n FILE_DEVICE_UNKNOWN, \n FILE_DEVICE_SECURE_OPEN, \n FALSE, \n &pdoDeviceObj \n ))" (() "(" (assignment_expression) "status = IoCreateDevice( \n DriverObject, \n 0, \n &usDeviceName, \n FILE_DEVICE_UNKNOWN, \n FILE_DEVICE_SECURE_OPEN, \n FALSE, \n &pdoDeviceObj \n )" (identifier) "status" (=) "=" (call_expression) "IoCreateDevice( \n DriverObject, \n 0, \n &usDeviceName, \n FILE_DEVICE_UNKNOWN, \n FILE_DEVICE_SECURE_OPEN, \n FALSE, \n &pdoDeviceObj \n )" (identifier) "IoCreateDevice" (argument_list) "( \n DriverObject, \n 0, \n &usDeviceName, \n FILE_DEVICE_UNKNOWN, \n FILE_DEVICE_SECURE_OPEN, \n FALSE, \n &pdoDeviceObj \n )" (() "(" (identifier) "DriverObject" (,) "," (number_literal) "0" (,) "," (pointer_expression) "&usDeviceName" (&) "&" (identifier) "usDeviceName" (,) "," (identifier) "FILE_DEVICE_UNKNOWN" (,) "," (identifier) "FILE_DEVICE_SECURE_OPEN" (,) "," (false) "FALSE" (,) "," (pointer_expression) "&pdoDeviceObj" (&) "&" (identifier) "pdoDeviceObj" ()) ")" ()) ")" ()) ")" (compound_statement) "{ \n // Bail out (implicitly forces the driver to unload). \n return status; \n }" ({) "{" (comment) "// Bail out (implicitly forces the driver to unload). " (return_statement) "return status;" (return) "return" (identifier) "status" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "// Now create the respective symbolic link object " (if_statement) "if(!NT_SUCCESS(status = IoCreateSymbolicLink( \n &usSymlinkName, \n &usDeviceName \n ))) \n { \n IoDeleteDevice(pdoDeviceObj); \n return status; \n }" (if) "if" (parenthesized_expression) "(!NT_SUCCESS(status = IoCreateSymbolicLink( \n &usSymlinkName, \n &usDeviceName \n )))" (() "(" (unary_expression) "!NT_SUCCESS(status = IoCreateSymbolicLink( \n &usSymlinkName, \n &usDeviceName \n ))" (!) "!" (call_expression) "NT_SUCCESS(status = IoCreateSymbolicLink( \n &usSymlinkName, \n &usDeviceName \n ))" (identifier) "NT_SUCCESS" (argument_list) "(status = IoCreateSymbolicLink( \n &usSymlinkName, \n &usDeviceName \n ))" (() "(" (assignment_expression) "status = IoCreateSymbolicLink( \n &usSymlinkName, \n &usDeviceName \n )" (identifier) "status" (=) "=" (call_expression) "IoCreateSymbolicLink( \n &usSymlinkName, \n &usDeviceName \n )" (identifier) "IoCreateSymbolicLink" (argument_list) "( \n &usSymlinkName, \n &usDeviceName \n )" (() "(" (pointer_expression) "&usSymlinkName" (&) "&" (identifier) "usSymlinkName" (,) "," (pointer_expression) "&usDeviceName" (&) "&" (identifier) "usDeviceName" ()) ")" ()) ")" ()) ")" (compound_statement) "{ \n IoDeleteDevice(pdoDeviceObj); \n return status; \n }" ({) "{" (expression_statement) "IoDeleteDevice(pdoDeviceObj);" (call_expression) "IoDeleteDevice(pdoDeviceObj)" (identifier) "IoDeleteDevice" (argument_list) "(pdoDeviceObj)" (() "(" (identifier) "pdoDeviceObj" ()) ")" (;) ";" (return_statement) "return status;" (return) "return" (identifier) "status" (;) ";" (}) "}" (comment) "// NOTE: You need not provide your own implementation for any major function that " (comment) "// you do not want to handle. I have seen code using DDKWizard that left the " (comment) "// *empty* dispatch routines intact. This is not necessary at all! " (expression_statement) "DriverObject->MajorFunction[IRP_MJ_CREATE] = \n DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]" (assignment_expression) "DriverObject->MajorFunction[IRP_MJ_CREATE] = \n DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]" (subscript_expression) "DriverObject->MajorFunction[IRP_MJ_CREATE]" (field_expression) "DriverObject->MajorFunction" (identifier) "DriverObject" (->) "->" (field_identifier) "MajorFunction" ([) "[" (identifier) "IRP_MJ_CREATE" (]) "]" (=) "=" (subscript_expression) "DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]" (subscript_expression) "DriverObject->MajorFunction[IRP_MJ_CLOSE]" (field_expression) "DriverObject->MajorFunction" (identifier) "DriverObject" (->) "->" (field_identifier) "MajorFunction" ([) "[" (identifier) "IRP_MJ_CLOSE" (]) "]" (ERROR) "=" (=) "=" ([) "[" (unary_expression) "!output PROJECT_PREFIX" (!) "!" (ERROR) "output" (identifier) "output" (identifier) "PROJECT_PREFIX" (]) "]" (;) "" (expression_statement) "_DispatchCreateClose;" (identifier) "_DispatchCreateClose" (;) ";" (expression_statement) "DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = [!output PROJECT_PREFIX]" (subscript_expression) "DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = [!output PROJECT_PREFIX]" (subscript_expression) "DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL]" (field_expression) "DriverObject->MajorFunction" (identifier) "DriverObject" (->) "->" (field_identifier) "MajorFunction" ([) "[" (identifier) "IRP_MJ_DEVICE_CONTROL" (]) "]" (ERROR) "=" (=) "=" ([) "[" (unary_expression) "!output PROJECT_PREFIX" (!) "!" (ERROR) "output" (identifier) "output" (identifier) "PROJECT_PREFIX" (]) "]" (;) "" (expression_statement) "_DispatchDeviceControl;" (identifier) "_DispatchDeviceControl" (;) ";" (expression_statement) "DriverObject->DriverUnload = [!output PROJECT_PREFIX]" (subscript_expression) "DriverObject->DriverUnload = [!output PROJECT_PREFIX]" (field_expression) "DriverObject->DriverUnload" (identifier) "DriverObject" (->) "->" (field_identifier) "DriverUnload" (ERROR) "=" (=) "=" ([) "[" (unary_expression) "!output PROJECT_PREFIX" (!) "!" (ERROR) "output" (identifier) "output" (identifier) "PROJECT_PREFIX" (]) "]" (;) "" (expression_statement) "_DriverUnload;" (identifier) "_DriverUnload" (;) ";" (return_statement) "return STATUS_SUCCESS;" (return) "return" (identifier) "STATUS_SUCCESS" (;) ";" (}) "}" (preproc_ifdef) "#ifdef __cplusplus \n}; // extern "C" \n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (comment) "// extern "C" " (#endif) "#endif"
611
23
{"language": "c", "success": true, "metadata": {"lines": 141, "avg_line_length": 27.21, "nodes": 366, "errors": 0, "source_hash": "a9b0a3f6390a5cd312b7e198440f77ca4ad5de0cdb3ecbb707c0465b698069dd", "categorized_nodes": 280}, "ast": {"root": "ERROR", "nodes": [{"id": 0, "type": "ERROR", "text": "///////////////////////////////////////////////////////////////////////////////\r\n///\r\n/// Copyright (c) [!output PROJECT_YEAR] - [!output DDKWIZ_USERVARIABLE_COMPANY]\r\n///\r\n/// Original filename: [!output PROJECT_FILENAME]\r\n/// Project : [!output PROJECT_NAME]\r\n/// Date of creation : [!output PROJECT_DATE]\r\n/// Author(s) : [!output DDKWIZ_USERVARIABLE_AUTHOR]\r\n///\r\n/// Purpose : <description>\r\n///\r\n/// Revisions:\r\n/// 0000 [[!output PROJECT_DATE]] Initial revision.\r\n///\r\n///////////////////////////////////////////////////////////////////////////////\r\n\r\n// $Id$\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n#include <ntddk.h>\r\n#include <string.h>\r\n#ifdef __cplusplus\r\n}; // extern \"C\"\r\n#endif\r\n\r\n#include \"[!output PROJECT_NAME].h\"\r\n\r\n#ifdef __cplusplus\r\nnamespace { // anonymous namespace to limit the scope of this global variable!\r\n#endif\r\nPDRIVER_OBJECT pdoGlobalDrvObj = 0;\r\n#ifdef __cplusplus\r\n}; // anonymous namespace\r\n#endif\r\n\r\nNTSTATUS [!output PROJECT_PREFIX]_DispatchCreateClose(\r\n IN PDEVICE_OBJECT\t\tDeviceObject,\r\n IN PIRP\t\t\t\t\tIrp\r\n )\r\n{\r\n NTSTATUS status = STATUS_SUCCESS;\r\n Irp->IoStatus.Status = status;\r\n Irp->IoStatus.Information = 0;\r\n IoCompleteRequest(Irp, IO_NO_INCREMENT);\r\n return status;\r\n}\r\n\r\nNTSTATUS [!output PROJECT_PREFIX]_DispatchDeviceControl(\r\n IN PDEVICE_OBJECT\t\tDeviceObject,\r\n IN PIRP\t\t\t\t\tIrp\r\n )\r\n{\r\n NTSTATUS status = STATUS_SUCCESS;\r\n PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation(Irp);\r\n\r\n switch(irpSp->Parameters.DeviceIoControl.IoControlCode)\r\n {\r\n[!if STRICTERCPP_CHECKBOX]\r\n case IOCTL_[!output PROJECT_PREFIX]_OPERATION:\r\n // status = SomeHandlerFunction(irpSp);\r\n break;\r\n[!endif]\r\n default:\r\n Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST;\r\n Irp->IoStatus.Information = 0;\r\n break;\r\n }\r\n\r\n status = Irp->IoStatus.Status;\r\n IoCompleteRequest(Irp, IO_NO_INCREMENT);\r\n return status;\r\n}\r\n\r\nVOID [!output PROJECT_PREFIX]_DriverUnload(\r\n IN PDRIVER_OBJECT\t\tDriverObject\r\n )\r\n{\r\n PDEVICE_OBJECT pdoNextDeviceObj = pdoGlobalDrvObj->DeviceObject;\r\n IoDeleteSymbolicLink(&usSymlinkName);\r\n\r\n // Delete all the device objects\r\n while(pdoNextDeviceObj)\r\n {\r\n PDEVICE_OBJECT pdoThisDeviceObj = pdoNextDeviceObj;\r\n pdoNextDeviceObj = pdoThisDeviceObj->NextDevice;\r\n IoDeleteDevice(pdoThisDeviceObj);\r\n }\r\n}\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\nNTSTATUS DriverEntry(\r\n IN OUT PDRIVER_OBJECT DriverObject,\r\n IN PUNICODE_STRING RegistryPath\r\n )\r\n{\r\n PDEVICE_OBJECT pdoDeviceObj = 0;\r\n NTSTATUS status = STATUS_UNSUCCESSFUL;\r\n pdoGlobalDrvObj = DriverObject;\r\n\r\n // Create the device object.\r\n if(!NT_SUCCESS(status = IoCreateDevice(\r\n DriverObject,\r\n 0,\r\n &usDeviceName,\r\n FILE_DEVICE_UNKNOWN,\r\n FILE_DEVICE_SECURE_OPEN,\r\n FALSE,\r\n &pdoDeviceObj\r\n )))\r\n {\r\n // Bail out (implicitly forces the driver to unload).\r\n return status;\r\n };\r\n\r\n // Now create the respective symbolic link object\r\n if(!NT_SUCCESS(status = IoCreateSymbolicLink(\r\n &usSymlinkName,\r\n &usDeviceName\r\n )))\r\n {\r\n IoDeleteDevice(pdoDeviceObj);\r\n return status;\r\n }\r\n\r\n // NOTE: You need not provide your own implementation for any major function that\r\n // you do not want to handle. I have seen code using DDKWizard that left the\r\n // *empty* dispatch routines intact. This is not necessary at all!\r\n DriverObject->MajorFunction[IRP_MJ_CREATE] =\r\n DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]_DispatchCreateClose;\r\n DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = [!output PROJECT_PREFIX]_DispatchDeviceControl;\r\n DriverObject->DriverUnload = [!output PROJECT_PREFIX]_DriverUnload;\r\n\r\n return STATUS_SUCCESS;\r\n}\r\n#ifdef __cplusplus\r\n}; // extern \"C\"\r\n#endif\r\n", "parent": null, "children": [1, 2, 3, 4, 5, 7, 10, 13, 17, 20, 21, 22, 24, 26, 32, 43, 90, 189, 228, 229, 230, 231, 232, 234, 362], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 141, "column": 0}}, {"id": 1, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 2, "type": "identifier", "text": "__cplusplus", "parent": 0, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 18}}, {"id": 3, "type": "extern", "text": "extern", "parent": 0, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 4, "type": "string_literal", "text": "\"C\"", "parent": 0, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 10}}, {"id": 5, "type": "preproc_call", "text": "#endif\r\n", "parent": 0, "children": [6], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 6, "type": "preproc_directive", "text": "#endif", "parent": 5, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 7, "type": "preproc_include", "text": "#include <ntddk.h>\r\n", "parent": 0, "children": [8, 9], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 8, "type": "#include", "text": "#include", "parent": 7, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 9, "type": "system_lib_string", "text": "<ntddk.h>", "parent": 7, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 18}}, {"id": 10, "type": "preproc_include", "text": "#include <string.h>\r\n", "parent": 0, "children": [11, 12], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 11, "type": "#include", "text": "#include", "parent": 10, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 12, "type": "system_lib_string", "text": "<string.h>", "parent": 10, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 19}}, {"id": 13, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\r\n}; // extern \"C\"\r\n#endif", "parent": 0, "children": [14, 15, 16], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 14, "type": "#ifdef", "text": "#ifdef", "parent": 13, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 15, "type": "identifier", "text": "__cplusplus", "parent": 13, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 18}}, {"id": 16, "type": "#endif", "text": "#endif", "parent": 13, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 17, "type": "preproc_include", "text": "#include \"[!output PROJECT_NAME].h\"\r\n", "parent": 0, "children": [18, 19], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 18, "type": "#include", "text": "#include", "parent": 17, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 19, "type": "string_literal", "text": "\"[!output PROJECT_NAME].h\"", "parent": 17, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 35}}, {"id": 20, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 21, "type": "identifier", "text": "__cplusplus", "parent": 0, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 18}}, {"id": 22, "type": "ERROR", "text": "namespace", "parent": 0, "children": [23], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 9}}, {"id": 23, "type": "identifier", "text": "namespace", "parent": 22, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 9}}, {"id": 24, "type": "preproc_call", "text": "#endif\r\n", "parent": 0, "children": [25], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 25, "type": "preproc_directive", "text": "#endif", "parent": 24, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 26, "type": "declaration", "text": "PDRIVER_OBJECT pdoGlobalDrvObj = 0;", "parent": 0, "children": [27, 28], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 35}}, {"id": 27, "type": "type_identifier", "text": "PDRIVER_OBJECT", "parent": 26, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 14}}, {"id": 28, "type": "init_declarator", "text": "pdoGlobalDrvObj = 0", "parent": 26, "children": [29, 30, 31], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 34}}, {"id": 29, "type": "identifier", "text": "pdoGlobalDrvObj", "parent": 28, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 30}}, {"id": 30, "type": "=", "text": "=", "parent": 28, "children": [], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 32}}, {"id": 31, "type": "number_literal", "text": "0", "parent": 28, "children": [], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 34}}, {"id": 32, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\r\n}; // anonymous namespace\r\n#endif", "parent": 0, "children": [33, 34, 35], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 35, "column": 6}}, {"id": 33, "type": "#ifdef", "text": "#ifdef", "parent": 32, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 34, "type": "identifier", "text": "__cplusplus", "parent": 32, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 18}}, {"id": 35, "type": "#endif", "text": "#endif", "parent": 32, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 6}}, {"id": 36, "type": "subscript_expression", "text": "NTSTATUS [!output PROJECT_PREFIX]", "parent": 0, "children": [37, 38], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 33}}, {"id": 37, "type": "identifier", "text": "NTSTATUS", "parent": 36, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 8}}, {"id": 38, "type": "unary_expression", "text": "!output PROJECT_PREFIX", "parent": 36, "children": [39, 40, 42], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 32}}, {"id": 39, "type": "!", "text": "!", "parent": 38, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 11}}, {"id": 40, "type": "ERROR", "text": "output", "parent": 38, "children": [41], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 17}}, {"id": 41, "type": "identifier", "text": "output", "parent": 40, "children": [], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 17}}, {"id": 42, "type": "identifier", "text": "PROJECT_PREFIX", "parent": 38, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 32}}, {"id": 43, "type": "macro_type_specifier", "text": "_DispatchCreateClose(\r\n IN PDEVICE_OBJECT\t\tDeviceObject,\r\n IN PIRP\t\t\t\t\tIrp\r\n )", "parent": 0, "children": [44, 45, 52], "start_point": {"row": 37, "column": 33}, "end_point": {"row": 40, "column": 5}}, {"id": 44, "type": "identifier", "text": "_DispatchCreateClose", "parent": 43, "children": [], "start_point": {"row": 37, "column": 33}, "end_point": {"row": 37, "column": 53}}, {"id": 45, "type": "ERROR", "text": "IN PDEVICE_OBJECT\t\tDeviceObject,\r\n IN PIRP", "parent": 43, "children": [46, 47, 48, 50, 51], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 39, "column": 11}}, {"id": 46, "type": "type_identifier", "text": "IN", "parent": 45, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 6}}, {"id": 47, "type": "identifier", "text": "PDEVICE_OBJECT", "parent": 45, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 21}}, {"id": 48, "type": "type_descriptor", "text": "DeviceObject", "parent": 45, "children": [49], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 35}}, {"id": 49, "type": "type_identifier", "text": "DeviceObject", "parent": 48, "children": [], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 35}}, {"id": 50, "type": "type_identifier", "text": "IN", "parent": 45, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 6}}, {"id": 51, "type": "identifier", "text": "PIRP", "parent": 45, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 11}}, {"id": 52, "type": "type_descriptor", "text": "Irp", "parent": 43, "children": [53], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 19}}, {"id": 53, "type": "type_identifier", "text": "Irp", "parent": 52, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 19}}, {"id": 54, "type": "declaration", "text": "NTSTATUS status = STATUS_SUCCESS;", "parent": 0, "children": [55, 56], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 37}}, {"id": 55, "type": "type_identifier", "text": "NTSTATUS", "parent": 54, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 12}}, {"id": 56, "type": "init_declarator", "text": "status = STATUS_SUCCESS", "parent": 54, "children": [57, 58, 59], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 36}}, {"id": 57, "type": "identifier", "text": "status", "parent": 56, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 19}}, {"id": 58, "type": "=", "text": "=", "parent": 56, "children": [], "start_point": {"row": 42, "column": 20}, "end_point": {"row": 42, "column": 21}}, {"id": 59, "type": "identifier", "text": "STATUS_SUCCESS", "parent": 56, "children": [], "start_point": {"row": 42, "column": 22}, "end_point": {"row": 42, "column": 36}}, {"id": 60, "type": "assignment_expression", "text": "Irp->IoStatus.Status = status", "parent": 0, "children": [61, 66, 67], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 33}}, {"id": 61, "type": "field_expression", "text": "Irp->IoStatus.Status", "parent": 60, "children": [62, 65], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 24}}, {"id": 62, "type": "field_expression", "text": "Irp->IoStatus", "parent": 61, "children": [63, 64], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 17}}, {"id": 63, "type": "identifier", "text": "Irp", "parent": 62, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 7}}, {"id": 64, "type": "field_identifier", "text": "IoStatus", "parent": 62, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 17}}, {"id": 65, "type": "field_identifier", "text": "Status", "parent": 61, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 24}}, {"id": 66, "type": "=", "text": "=", "parent": 60, "children": [], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 26}}, {"id": 67, "type": "identifier", "text": "status", "parent": 60, "children": [], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 33}}, {"id": 68, "type": "assignment_expression", "text": "Irp->IoStatus.Information = 0", "parent": 0, "children": [69, 74, 75], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 33}}, {"id": 69, "type": "field_expression", "text": "Irp->IoStatus.Information", "parent": 68, "children": [70, 73], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 29}}, {"id": 70, "type": "field_expression", "text": "Irp->IoStatus", "parent": 69, "children": [71, 72], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 17}}, {"id": 71, "type": "identifier", "text": "Irp", "parent": 70, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 7}}, {"id": 72, "type": "field_identifier", "text": "IoStatus", "parent": 70, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 17}}, {"id": 73, "type": "field_identifier", "text": "Information", "parent": 69, "children": [], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 29}}, {"id": 74, "type": "=", "text": "=", "parent": 68, "children": [], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 31}}, {"id": 75, "type": "number_literal", "text": "0", "parent": 68, "children": [], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 33}}, {"id": 76, "type": "call_expression", "text": "IoCompleteRequest(Irp, IO_NO_INCREMENT)", "parent": 0, "children": [77, 78], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 43}}, {"id": 77, "type": "identifier", "text": "IoCompleteRequest", "parent": 76, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 21}}, {"id": 78, "type": "argument_list", "text": "(Irp, IO_NO_INCREMENT)", "parent": 76, "children": [79, 80], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 43}}, {"id": 79, "type": "identifier", "text": "Irp", "parent": 78, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 25}}, {"id": 80, "type": "identifier", "text": "IO_NO_INCREMENT", "parent": 78, "children": [], "start_point": {"row": 45, "column": 27}, "end_point": {"row": 45, "column": 42}}, {"id": 81, "type": "return_statement", "text": "return status;", "parent": 0, "children": [82], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 18}}, {"id": 82, "type": "identifier", "text": "status", "parent": 81, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 17}}, {"id": 83, "type": "subscript_expression", "text": "NTSTATUS [!output PROJECT_PREFIX]", "parent": 0, "children": [84, 85], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 33}}, {"id": 84, "type": "identifier", "text": "NTSTATUS", "parent": 83, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 8}}, {"id": 85, "type": "unary_expression", "text": "!output PROJECT_PREFIX", "parent": 83, "children": [86, 87, 89], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 32}}, {"id": 86, "type": "!", "text": "!", "parent": 85, "children": [], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 11}}, {"id": 87, "type": "ERROR", "text": "output", "parent": 85, "children": [88], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 17}}, {"id": 88, "type": "identifier", "text": "output", "parent": 87, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 17}}, {"id": 89, "type": "identifier", "text": "PROJECT_PREFIX", "parent": 85, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 32}}, {"id": 90, "type": "macro_type_specifier", "text": "_DispatchDeviceControl(\r\n IN PDEVICE_OBJECT\t\tDeviceObject,\r\n IN PIRP\t\t\t\t\tIrp\r\n )", "parent": 0, "children": [91, 92, 99], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 52, "column": 5}}, {"id": 91, "type": "identifier", "text": "_DispatchDeviceControl", "parent": 90, "children": [], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 49, "column": 55}}, {"id": 92, "type": "ERROR", "text": "IN PDEVICE_OBJECT\t\tDeviceObject,\r\n IN PIRP", "parent": 90, "children": [93, 94, 95, 97, 98], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 51, "column": 11}}, {"id": 93, "type": "type_identifier", "text": "IN", "parent": 92, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 6}}, {"id": 94, "type": "identifier", "text": "PDEVICE_OBJECT", "parent": 92, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 21}}, {"id": 95, "type": "type_descriptor", "text": "DeviceObject", "parent": 92, "children": [96], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 35}}, {"id": 96, "type": "type_identifier", "text": "DeviceObject", "parent": 95, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 35}}, {"id": 97, "type": "type_identifier", "text": "IN", "parent": 92, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 6}}, {"id": 98, "type": "identifier", "text": "PIRP", "parent": 92, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 11}}, {"id": 99, "type": "type_descriptor", "text": "Irp", "parent": 90, "children": [100], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 19}}, {"id": 100, "type": "type_identifier", "text": "Irp", "parent": 99, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 19}}, {"id": 101, "type": "declaration", "text": "NTSTATUS status = STATUS_SUCCESS;", "parent": 0, "children": [102, 103], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 37}}, {"id": 102, "type": "type_identifier", "text": "NTSTATUS", "parent": 101, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 12}}, {"id": 103, "type": "init_declarator", "text": "status = STATUS_SUCCESS", "parent": 101, "children": [104, 105, 106], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 36}}, {"id": 104, "type": "identifier", "text": "status", "parent": 103, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 19}}, {"id": 105, "type": "=", "text": "=", "parent": 103, "children": [], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 21}}, {"id": 106, "type": "identifier", "text": "STATUS_SUCCESS", "parent": 103, "children": [], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 36}}, {"id": 107, "type": "declaration", "text": "PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation(Irp);", "parent": 0, "children": [108, 109], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 65}}, {"id": 108, "type": "type_identifier", "text": "PIO_STACK_LOCATION", "parent": 107, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 22}}, {"id": 109, "type": "init_declarator", "text": "irpSp = IoGetCurrentIrpStackLocation(Irp)", "parent": 107, "children": [110, 111, 112], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 64}}, {"id": 110, "type": "identifier", "text": "irpSp", "parent": 109, "children": [], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 28}}, {"id": 111, "type": "=", "text": "=", "parent": 109, "children": [], "start_point": {"row": 55, "column": 29}, "end_point": {"row": 55, "column": 30}}, {"id": 112, "type": "call_expression", "text": "IoGetCurrentIrpStackLocation(Irp)", "parent": 109, "children": [113, 114], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 64}}, {"id": 113, "type": "identifier", "text": "IoGetCurrentIrpStackLocation", "parent": 112, "children": [], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 59}}, {"id": 114, "type": "argument_list", "text": "(Irp)", "parent": 112, "children": [115], "start_point": {"row": 55, "column": 59}, "end_point": {"row": 55, "column": 64}}, {"id": 115, "type": "identifier", "text": "Irp", "parent": 114, "children": [], "start_point": {"row": 55, "column": 60}, "end_point": {"row": 55, "column": 63}}, {"id": 116, "type": "switch_statement", "text": "switch(irpSp->Parameters.DeviceIoControl.IoControlCode)\r\n {\r\n[!if STRICTERCPP_CHECKBOX]\r\n case IOCTL_[!output PROJECT_PREFIX]_OPERATION:\r\n // status = SomeHandlerFunction(irpSp);\r\n break;\r\n[!endif]\r\n default:\r\n Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST;\r\n Irp->IoStatus.Information = 0;\r\n break;\r\n }", "parent": 0, "children": [117, 118], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 68, "column": 5}}, {"id": 117, "type": "switch", "text": "switch", "parent": 116, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 10}}, {"id": 118, "type": "parenthesized_expression", "text": "(irpSp->Parameters.DeviceIoControl.IoControlCode)", "parent": 116, "children": [119], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 59}}, {"id": 119, "type": "field_expression", "text": "irpSp->Parameters.DeviceIoControl.IoControlCode", "parent": 118, "children": [120, 125], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 58}}, {"id": 120, "type": "field_expression", "text": "irpSp->Parameters.DeviceIoControl", "parent": 119, "children": [121, 124], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 44}}, {"id": 121, "type": "field_expression", "text": "irpSp->Parameters", "parent": 120, "children": [122, 123], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 28}}, {"id": 122, "type": "identifier", "text": "irpSp", "parent": 121, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 16}}, {"id": 123, "type": "field_identifier", "text": "Parameters", "parent": 121, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 28}}, {"id": 124, "type": "field_identifier", "text": "DeviceIoControl", "parent": 120, "children": [], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 44}}, {"id": 125, "type": "field_identifier", "text": "IoControlCode", "parent": 119, "children": [], "start_point": {"row": 57, "column": 45}, "end_point": {"row": 57, "column": 58}}, {"id": 126, "type": "ERROR", "text": "[!if STRICTERCPP_CHECKBOX]", "parent": 116, "children": [127, 129], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 26}}, {"id": 127, "type": "unary_expression", "text": "!if", "parent": 126, "children": [128], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 4}}, {"id": 128, "type": "!", "text": "!", "parent": 127, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 2}}, {"id": 129, "type": "identifier", "text": "STRICTERCPP_CHECKBOX", "parent": 126, "children": [], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 25}}, {"id": 130, "type": "case_statement", "text": "case IOCTL_[!output PROJECT_PREFIX]_OPERATION:\r\n // status = SomeHandlerFunction(irpSp);\r\n break;\r\n[!endif]\r\n default:\r\n Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST;\r\n Irp->IoStatus.Information = 0;\r\n break;", "parent": 116, "children": [131, 132, 147, 165], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 67, "column": 14}}, {"id": 131, "type": "case", "text": "case", "parent": 130, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 8}}, {"id": 132, "type": "subscript_expression", "text": "IOCTL_[!output PROJECT_PREFIX]_OPERATION:\r\n // status = SomeHandlerFunction(irpSp);\r\n break;\r\n[!endif]", "parent": 130, "children": [133, 140, 144], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 63, "column": 8}}, {"id": 133, "type": "subscript_expression", "text": "IOCTL_[!output PROJECT_PREFIX]", "parent": 132, "children": [134, 135], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 39}}, {"id": 134, "type": "identifier", "text": "IOCTL_", "parent": 133, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 15}}, {"id": 135, "type": "unary_expression", "text": "!output PROJECT_PREFIX", "parent": 133, "children": [136, 137, 139], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 38}}, {"id": 136, "type": "!", "text": "!", "parent": 135, "children": [], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 17}}, {"id": 137, "type": "ERROR", "text": "output", "parent": 135, "children": [138], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 23}}, {"id": 138, "type": "identifier", "text": "output", "parent": 137, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 23}}, {"id": 139, "type": "identifier", "text": "PROJECT_PREFIX", "parent": 135, "children": [], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 38}}, {"id": 140, "type": "ERROR", "text": "_OPERATION:\r\n // status = SomeHandlerFunction(irpSp);\r\n break;", "parent": 132, "children": [141, 142], "start_point": {"row": 60, "column": 39}, "end_point": {"row": 62, "column": 14}}, {"id": 141, "type": "identifier", "text": "_OPERATION", "parent": 140, "children": [], "start_point": {"row": 60, "column": 39}, "end_point": {"row": 60, "column": 49}}, {"id": 142, "type": "break_statement", "text": "break;", "parent": 140, "children": [143], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 14}}, {"id": 143, "type": "break", "text": "break", "parent": 142, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 13}}, {"id": 144, "type": "unary_expression", "text": "!endif", "parent": 132, "children": [145, 146], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 7}}, {"id": 145, "type": "!", "text": "!", "parent": 144, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 2}}, {"id": 146, "type": "identifier", "text": "endif", "parent": 144, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 7}}, {"id": 147, "type": "ERROR", "text": "default", "parent": 130, "children": [148], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 11}}, {"id": 148, "type": "identifier", "text": "default", "parent": 147, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 11}}, {"id": 149, "type": "assignment_expression", "text": "Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST", "parent": 130, "children": [150, 155, 156], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 60}}, {"id": 150, "type": "field_expression", "text": "Irp->IoStatus.Status", "parent": 149, "children": [151, 154], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 28}}, {"id": 151, "type": "field_expression", "text": "Irp->IoStatus", "parent": 150, "children": [152, 153], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 21}}, {"id": 152, "type": "identifier", "text": "Irp", "parent": 151, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 11}}, {"id": 153, "type": "field_identifier", "text": "IoStatus", "parent": 151, "children": [], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 21}}, {"id": 154, "type": "field_identifier", "text": "Status", "parent": 150, "children": [], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 28}}, {"id": 155, "type": "=", "text": "=", "parent": 149, "children": [], "start_point": {"row": 65, "column": 29}, "end_point": {"row": 65, "column": 30}}, {"id": 156, "type": "identifier", "text": "STATUS_INVALID_DEVICE_REQUEST", "parent": 149, "children": [], "start_point": {"row": 65, "column": 31}, "end_point": {"row": 65, "column": 60}}, {"id": 157, "type": "assignment_expression", "text": "Irp->IoStatus.Information = 0", "parent": 130, "children": [158, 163, 164], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 37}}, {"id": 158, "type": "field_expression", "text": "Irp->IoStatus.Information", "parent": 157, "children": [159, 162], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 33}}, {"id": 159, "type": "field_expression", "text": "Irp->IoStatus", "parent": 158, "children": [160, 161], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 21}}, {"id": 160, "type": "identifier", "text": "Irp", "parent": 159, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 11}}, {"id": 161, "type": "field_identifier", "text": "IoStatus", "parent": 159, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 21}}, {"id": 162, "type": "field_identifier", "text": "Information", "parent": 158, "children": [], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 33}}, {"id": 163, "type": "=", "text": "=", "parent": 157, "children": [], "start_point": {"row": 66, "column": 34}, "end_point": {"row": 66, "column": 35}}, {"id": 164, "type": "number_literal", "text": "0", "parent": 157, "children": [], "start_point": {"row": 66, "column": 36}, "end_point": {"row": 66, "column": 37}}, {"id": 165, "type": "break_statement", "text": "break;", "parent": 130, "children": [166], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 14}}, {"id": 166, "type": "break", "text": "break", "parent": 165, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 13}}, {"id": 167, "type": "assignment_expression", "text": "status = Irp->IoStatus.Status", "parent": 0, "children": [168, 169, 170], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 33}}, {"id": 168, "type": "identifier", "text": "status", "parent": 167, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 10}}, {"id": 169, "type": "=", "text": "=", "parent": 167, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 12}}, {"id": 170, "type": "field_expression", "text": "Irp->IoStatus.Status", "parent": 167, "children": [171, 174], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 33}}, {"id": 171, "type": "field_expression", "text": "Irp->IoStatus", "parent": 170, "children": [172, 173], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 26}}, {"id": 172, "type": "identifier", "text": "Irp", "parent": 171, "children": [], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 16}}, {"id": 173, "type": "field_identifier", "text": "IoStatus", "parent": 171, "children": [], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 26}}, {"id": 174, "type": "field_identifier", "text": "Status", "parent": 170, "children": [], "start_point": {"row": 70, "column": 27}, "end_point": {"row": 70, "column": 33}}, {"id": 175, "type": "call_expression", "text": "IoCompleteRequest(Irp, IO_NO_INCREMENT)", "parent": 0, "children": [176, 177], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 43}}, {"id": 176, "type": "identifier", "text": "IoCompleteRequest", "parent": 175, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 21}}, {"id": 177, "type": "argument_list", "text": "(Irp, IO_NO_INCREMENT)", "parent": 175, "children": [178, 179], "start_point": {"row": 71, "column": 21}, "end_point": {"row": 71, "column": 43}}, {"id": 178, "type": "identifier", "text": "Irp", "parent": 177, "children": [], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 25}}, {"id": 179, "type": "identifier", "text": "IO_NO_INCREMENT", "parent": 177, "children": [], "start_point": {"row": 71, "column": 27}, "end_point": {"row": 71, "column": 42}}, {"id": 180, "type": "return_statement", "text": "return status;", "parent": 0, "children": [181], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 18}}, {"id": 181, "type": "identifier", "text": "status", "parent": 180, "children": [], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 17}}, {"id": 182, "type": "subscript_expression", "text": "VOID [!output PROJECT_PREFIX]", "parent": 0, "children": [183, 184], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 29}}, {"id": 183, "type": "identifier", "text": "VOID", "parent": 182, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 4}}, {"id": 184, "type": "unary_expression", "text": "!output PROJECT_PREFIX", "parent": 182, "children": [185, 186, 188], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 28}}, {"id": 185, "type": "!", "text": "!", "parent": 184, "children": [], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 7}}, {"id": 186, "type": "ERROR", "text": "output", "parent": 184, "children": [187], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 13}}, {"id": 187, "type": "identifier", "text": "output", "parent": 186, "children": [], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 13}}, {"id": 188, "type": "identifier", "text": "PROJECT_PREFIX", "parent": 184, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 28}}, {"id": 189, "type": "macro_type_specifier", "text": "_DriverUnload(\r\n IN PDRIVER_OBJECT\t\tDriverObject\r\n )", "parent": 0, "children": [190, 191, 194], "start_point": {"row": 75, "column": 29}, "end_point": {"row": 77, "column": 5}}, {"id": 190, "type": "identifier", "text": "_DriverUnload", "parent": 189, "children": [], "start_point": {"row": 75, "column": 29}, "end_point": {"row": 75, "column": 42}}, {"id": 191, "type": "ERROR", "text": "IN PDRIVER_OBJECT", "parent": 189, "children": [192, 193], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 21}}, {"id": 192, "type": "type_identifier", "text": "IN", "parent": 191, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 6}}, {"id": 193, "type": "identifier", "text": "PDRIVER_OBJECT", "parent": 191, "children": [], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 21}}, {"id": 194, "type": "type_descriptor", "text": "DriverObject", "parent": 189, "children": [195], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 35}}, {"id": 195, "type": "type_identifier", "text": "DriverObject", "parent": 194, "children": [], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 35}}, {"id": 196, "type": "declaration", "text": "PDEVICE_OBJECT pdoNextDeviceObj = pdoGlobalDrvObj->DeviceObject;", "parent": 0, "children": [197, 198], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 68}}, {"id": 197, "type": "type_identifier", "text": "PDEVICE_OBJECT", "parent": 196, "children": [], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 18}}, {"id": 198, "type": "init_declarator", "text": "pdoNextDeviceObj = pdoGlobalDrvObj->DeviceObject", "parent": 196, "children": [199, 200, 201], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 67}}, {"id": 199, "type": "identifier", "text": "pdoNextDeviceObj", "parent": 198, "children": [], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 35}}, {"id": 200, "type": "=", "text": "=", "parent": 198, "children": [], "start_point": {"row": 79, "column": 36}, "end_point": {"row": 79, "column": 37}}, {"id": 201, "type": "field_expression", "text": "pdoGlobalDrvObj->DeviceObject", "parent": 198, "children": [202, 203], "start_point": {"row": 79, "column": 38}, "end_point": {"row": 79, "column": 67}}, {"id": 202, "type": "identifier", "text": "pdoGlobalDrvObj", "parent": 201, "children": [], "start_point": {"row": 79, "column": 38}, "end_point": {"row": 79, "column": 53}}, {"id": 203, "type": "field_identifier", "text": "DeviceObject", "parent": 201, "children": [], "start_point": {"row": 79, "column": 55}, "end_point": {"row": 79, "column": 67}}, {"id": 204, "type": "call_expression", "text": "IoDeleteSymbolicLink(&usSymlinkName)", "parent": 0, "children": [205, 206], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 40}}, {"id": 205, "type": "identifier", "text": "IoDeleteSymbolicLink", "parent": 204, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 24}}, {"id": 206, "type": "argument_list", "text": "(&usSymlinkName)", "parent": 204, "children": [207], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 40}}, {"id": 207, "type": "pointer_expression", "text": "&usSymlinkName", "parent": 206, "children": [208], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 39}}, {"id": 208, "type": "identifier", "text": "usSymlinkName", "parent": 207, "children": [], "start_point": {"row": 80, "column": 26}, "end_point": {"row": 80, "column": 39}}, {"id": 209, "type": "while_statement", "text": "while(pdoNextDeviceObj)\r\n {\r\n PDEVICE_OBJECT pdoThisDeviceObj = pdoNextDeviceObj;\r\n pdoNextDeviceObj = pdoThisDeviceObj->NextDevice;\r\n IoDeleteDevice(pdoThisDeviceObj);\r\n }", "parent": 0, "children": [210], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 88, "column": 5}}, {"id": 210, "type": "parenthesized_expression", "text": "(pdoNextDeviceObj)", "parent": 209, "children": [211], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 27}}, {"id": 211, "type": "identifier", "text": "pdoNextDeviceObj", "parent": 210, "children": [], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 26}}, {"id": 212, "type": "declaration", "text": "PDEVICE_OBJECT pdoThisDeviceObj = pdoNextDeviceObj;", "parent": 209, "children": [213, 214], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 59}}, {"id": 213, "type": "type_identifier", "text": "PDEVICE_OBJECT", "parent": 212, "children": [], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 22}}, {"id": 214, "type": "init_declarator", "text": "pdoThisDeviceObj = pdoNextDeviceObj", "parent": 212, "children": [215, 216, 217], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 58}}, {"id": 215, "type": "identifier", "text": "pdoThisDeviceObj", "parent": 214, "children": [], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 39}}, {"id": 216, "type": "=", "text": "=", "parent": 214, "children": [], "start_point": {"row": 85, "column": 40}, "end_point": {"row": 85, "column": 41}}, {"id": 217, "type": "identifier", "text": "pdoNextDeviceObj", "parent": 214, "children": [], "start_point": {"row": 85, "column": 42}, "end_point": {"row": 85, "column": 58}}, {"id": 218, "type": "assignment_expression", "text": "pdoNextDeviceObj = pdoThisDeviceObj->NextDevice", "parent": 209, "children": [219, 220, 221], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 55}}, {"id": 219, "type": "identifier", "text": "pdoNextDeviceObj", "parent": 218, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 24}}, {"id": 220, "type": "=", "text": "=", "parent": 218, "children": [], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 26}}, {"id": 221, "type": "field_expression", "text": "pdoThisDeviceObj->NextDevice", "parent": 218, "children": [222, 223], "start_point": {"row": 86, "column": 27}, "end_point": {"row": 86, "column": 55}}, {"id": 222, "type": "identifier", "text": "pdoThisDeviceObj", "parent": 221, "children": [], "start_point": {"row": 86, "column": 27}, "end_point": {"row": 86, "column": 43}}, {"id": 223, "type": "field_identifier", "text": "NextDevice", "parent": 221, "children": [], "start_point": {"row": 86, "column": 45}, "end_point": {"row": 86, "column": 55}}, {"id": 224, "type": "call_expression", "text": "IoDeleteDevice(pdoThisDeviceObj)", "parent": 209, "children": [225, 226], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 40}}, {"id": 225, "type": "identifier", "text": "IoDeleteDevice", "parent": 224, "children": [], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 22}}, {"id": 226, "type": "argument_list", "text": "(pdoThisDeviceObj)", "parent": 224, "children": [227], "start_point": {"row": 87, "column": 22}, "end_point": {"row": 87, "column": 40}}, {"id": 227, "type": "identifier", "text": "pdoThisDeviceObj", "parent": 226, "children": [], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 39}}, {"id": 228, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 6}}, {"id": 229, "type": "identifier", "text": "__cplusplus", "parent": 0, "children": [], "start_point": {"row": 91, "column": 7}, "end_point": {"row": 91, "column": 18}}, {"id": 230, "type": "extern", "text": "extern", "parent": 0, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 231, "type": "string_literal", "text": "\"C\"", "parent": 0, "children": [], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 10}}, {"id": 232, "type": "preproc_call", "text": "#endif\r\n", "parent": 0, "children": [233], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 94, "column": 0}}, {"id": 233, "type": "preproc_directive", "text": "#endif", "parent": 232, "children": [], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 6}}, {"id": 234, "type": "function_definition", "text": "NTSTATUS DriverEntry(\r\n IN OUT PDRIVER_OBJECT DriverObject,\r\n IN PUNICODE_STRING RegistryPath\r\n )\r\n{\r\n PDEVICE_OBJECT pdoDeviceObj = 0;\r\n NTSTATUS status = STATUS_UNSUCCESSFUL;\r\n pdoGlobalDrvObj = DriverObject;\r\n\r\n // Create the device object.\r\n if(!NT_SUCCESS(status = IoCreateDevice(\r\n DriverObject,\r\n 0,\r\n &usDeviceName,\r\n FILE_DEVICE_UNKNOWN,\r\n FILE_DEVICE_SECURE_OPEN,\r\n FALSE,\r\n &pdoDeviceObj\r\n )))\r\n {\r\n // Bail out (implicitly forces the driver to unload).\r\n return status;\r\n };\r\n\r\n // Now create the respective symbolic link object\r\n if(!NT_SUCCESS(status = IoCreateSymbolicLink(\r\n &usSymlinkName,\r\n &usDeviceName\r\n )))\r\n {\r\n IoDeleteDevice(pdoDeviceObj);\r\n return status;\r\n }\r\n\r\n // NOTE: You need not provide your own implementation for any major function that\r\n // you do not want to handle. I have seen code using DDKWizard that left the\r\n // *empty* dispatch routines intact. This is not necessary at all!\r\n DriverObject->MajorFunction[IRP_MJ_CREATE] =\r\n DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]_DispatchCreateClose;\r\n DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = [!output PROJECT_PREFIX]_DispatchDeviceControl;\r\n DriverObject->DriverUnload = [!output PROJECT_PREFIX]_DriverUnload;\r\n\r\n return STATUS_SUCCESS;\r\n}", "parent": 0, "children": [235, 236], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 137, "column": 1}}, {"id": 235, "type": "type_identifier", "text": "NTSTATUS", "parent": 234, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 8}}, {"id": 236, "type": "function_declarator", "text": "DriverEntry(\r\n IN OUT PDRIVER_OBJECT DriverObject,\r\n IN PUNICODE_STRING RegistryPath\r\n )", "parent": 234, "children": [237, 238], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 97, "column": 5}}, {"id": 237, "type": "identifier", "text": "DriverEntry", "parent": 236, "children": [], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 20}}, {"id": 238, "type": "parameter_list", "text": "(\r\n IN OUT PDRIVER_OBJECT DriverObject,\r\n IN PUNICODE_STRING RegistryPath\r\n )", "parent": 236, "children": [239, 245, 248], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 97, "column": 5}}, {"id": 239, "type": "parameter_declaration", "text": "IN OUT PDRIVER_OBJECT DriverObject", "parent": 238, "children": [240, 241, 244], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 40}}, {"id": 240, "type": "type_identifier", "text": "IN", "parent": 239, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 6}}, {"id": 241, "type": "ERROR", "text": "OUT PDRIVER_OBJECT", "parent": 239, "children": [242, 243], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 25}}, {"id": 242, "type": "identifier", "text": "OUT", "parent": 241, "children": [], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 10}}, {"id": 243, "type": "identifier", "text": "PDRIVER_OBJECT", "parent": 241, "children": [], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 25}}, {"id": 244, "type": "identifier", "text": "DriverObject", "parent": 239, "children": [], "start_point": {"row": 95, "column": 28}, "end_point": {"row": 95, "column": 40}}, {"id": 245, "type": "parameter_declaration", "text": "IN PUNICODE_STRING", "parent": 238, "children": [246, 247], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 22}}, {"id": 246, "type": "type_identifier", "text": "IN", "parent": 245, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 6}}, {"id": 247, "type": "identifier", "text": "PUNICODE_STRING", "parent": 245, "children": [], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 22}}, {"id": 248, "type": "ERROR", "text": "RegistryPath", "parent": 238, "children": [249], "start_point": {"row": 96, "column": 28}, "end_point": {"row": 96, "column": 40}}, {"id": 249, "type": "identifier", "text": "RegistryPath", "parent": 248, "children": [], "start_point": {"row": 96, "column": 28}, "end_point": {"row": 96, "column": 40}}, {"id": 250, "type": "declaration", "text": "PDEVICE_OBJECT pdoDeviceObj = 0;", "parent": 234, "children": [251, 252], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 36}}, {"id": 251, "type": "type_identifier", "text": "PDEVICE_OBJECT", "parent": 250, "children": [], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 18}}, {"id": 252, "type": "init_declarator", "text": "pdoDeviceObj = 0", "parent": 250, "children": [253, 254, 255], "start_point": {"row": 99, "column": 19}, "end_point": {"row": 99, "column": 35}}, {"id": 253, "type": "identifier", "text": "pdoDeviceObj", "parent": 252, "children": [], "start_point": {"row": 99, "column": 19}, "end_point": {"row": 99, "column": 31}}, {"id": 254, "type": "=", "text": "=", "parent": 252, "children": [], "start_point": {"row": 99, "column": 32}, "end_point": {"row": 99, "column": 33}}, {"id": 255, "type": "number_literal", "text": "0", "parent": 252, "children": [], "start_point": {"row": 99, "column": 34}, "end_point": {"row": 99, "column": 35}}, {"id": 256, "type": "declaration", "text": "NTSTATUS status = STATUS_UNSUCCESSFUL;", "parent": 234, "children": [257, 258], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 42}}, {"id": 257, "type": "type_identifier", "text": "NTSTATUS", "parent": 256, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 12}}, {"id": 258, "type": "init_declarator", "text": "status = STATUS_UNSUCCESSFUL", "parent": 256, "children": [259, 260, 261], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 41}}, {"id": 259, "type": "identifier", "text": "status", "parent": 258, "children": [], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 19}}, {"id": 260, "type": "=", "text": "=", "parent": 258, "children": [], "start_point": {"row": 100, "column": 20}, "end_point": {"row": 100, "column": 21}}, {"id": 261, "type": "identifier", "text": "STATUS_UNSUCCESSFUL", "parent": 258, "children": [], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 41}}, {"id": 262, "type": "assignment_expression", "text": "pdoGlobalDrvObj = DriverObject", "parent": 234, "children": [263, 264, 265], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 34}}, {"id": 263, "type": "identifier", "text": "pdoGlobalDrvObj", "parent": 262, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 19}}, {"id": 264, "type": "=", "text": "=", "parent": 262, "children": [], "start_point": {"row": 101, "column": 20}, "end_point": {"row": 101, "column": 21}}, {"id": 265, "type": "identifier", "text": "DriverObject", "parent": 262, "children": [], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 34}}, {"id": 266, "type": "if_statement", "text": "if(!NT_SUCCESS(status = IoCreateDevice(\r\n DriverObject,\r\n 0,\r\n &usDeviceName,\r\n FILE_DEVICE_UNKNOWN,\r\n FILE_DEVICE_SECURE_OPEN,\r\n FALSE,\r\n &pdoDeviceObj\r\n )))\r\n {\r\n // Bail out (implicitly forces the driver to unload).\r\n return status;\r\n }", "parent": 234, "children": [267], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 116, "column": 5}}, {"id": 267, "type": "parenthesized_expression", "text": "(!NT_SUCCESS(status = IoCreateDevice(\r\n DriverObject,\r\n 0,\r\n &usDeviceName,\r\n FILE_DEVICE_UNKNOWN,\r\n FILE_DEVICE_SECURE_OPEN,\r\n FALSE,\r\n &pdoDeviceObj\r\n )))", "parent": 266, "children": [268], "start_point": {"row": 104, "column": 6}, "end_point": {"row": 112, "column": 11}}, {"id": 268, "type": "unary_expression", "text": "!NT_SUCCESS(status = IoCreateDevice(\r\n DriverObject,\r\n 0,\r\n &usDeviceName,\r\n FILE_DEVICE_UNKNOWN,\r\n FILE_DEVICE_SECURE_OPEN,\r\n FALSE,\r\n &pdoDeviceObj\r\n ))", "parent": 267, "children": [269, 270], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 112, "column": 10}}, {"id": 269, "type": "!", "text": "!", "parent": 268, "children": [], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 104, "column": 8}}, {"id": 270, "type": "call_expression", "text": "NT_SUCCESS(status = IoCreateDevice(\r\n DriverObject,\r\n 0,\r\n &usDeviceName,\r\n FILE_DEVICE_UNKNOWN,\r\n FILE_DEVICE_SECURE_OPEN,\r\n FALSE,\r\n &pdoDeviceObj\r\n ))", "parent": 268, "children": [271, 272], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 112, "column": 10}}, {"id": 271, "type": "identifier", "text": "NT_SUCCESS", "parent": 270, "children": [], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 18}}, {"id": 272, "type": "argument_list", "text": "(status = IoCreateDevice(\r\n DriverObject,\r\n 0,\r\n &usDeviceName,\r\n FILE_DEVICE_UNKNOWN,\r\n FILE_DEVICE_SECURE_OPEN,\r\n FALSE,\r\n &pdoDeviceObj\r\n ))", "parent": 270, "children": [273], "start_point": {"row": 104, "column": 18}, "end_point": {"row": 112, "column": 10}}, {"id": 273, "type": "assignment_expression", "text": "status = IoCreateDevice(\r\n DriverObject,\r\n 0,\r\n &usDeviceName,\r\n FILE_DEVICE_UNKNOWN,\r\n FILE_DEVICE_SECURE_OPEN,\r\n FALSE,\r\n &pdoDeviceObj\r\n )", "parent": 272, "children": [274, 275, 276], "start_point": {"row": 104, "column": 19}, "end_point": {"row": 112, "column": 9}}, {"id": 274, "type": "identifier", "text": "status", "parent": 273, "children": [], "start_point": {"row": 104, "column": 19}, "end_point": {"row": 104, "column": 25}}, {"id": 275, "type": "=", "text": "=", "parent": 273, "children": [], "start_point": {"row": 104, "column": 26}, "end_point": {"row": 104, "column": 27}}, {"id": 276, "type": "call_expression", "text": "IoCreateDevice(\r\n DriverObject,\r\n 0,\r\n &usDeviceName,\r\n FILE_DEVICE_UNKNOWN,\r\n FILE_DEVICE_SECURE_OPEN,\r\n FALSE,\r\n &pdoDeviceObj\r\n )", "parent": 273, "children": [277, 278], "start_point": {"row": 104, "column": 28}, "end_point": {"row": 112, "column": 9}}, {"id": 277, "type": "identifier", "text": "IoCreateDevice", "parent": 276, "children": [], "start_point": {"row": 104, "column": 28}, "end_point": {"row": 104, "column": 42}}, {"id": 278, "type": "argument_list", "text": "(\r\n DriverObject,\r\n 0,\r\n &usDeviceName,\r\n FILE_DEVICE_UNKNOWN,\r\n FILE_DEVICE_SECURE_OPEN,\r\n FALSE,\r\n &pdoDeviceObj\r\n )", "parent": 276, "children": [279, 280, 281, 283, 284, 285, 286], "start_point": {"row": 104, "column": 42}, "end_point": {"row": 112, "column": 9}}, {"id": 279, "type": "identifier", "text": "DriverObject", "parent": 278, "children": [], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 20}}, {"id": 280, "type": "number_literal", "text": "0", "parent": 278, "children": [], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 9}}, {"id": 281, "type": "pointer_expression", "text": "&usDeviceName", "parent": 278, "children": [282], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 21}}, {"id": 282, "type": "identifier", "text": "usDeviceName", "parent": 281, "children": [], "start_point": {"row": 107, "column": 9}, "end_point": {"row": 107, "column": 21}}, {"id": 283, "type": "identifier", "text": "FILE_DEVICE_UNKNOWN", "parent": 278, "children": [], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 27}}, {"id": 284, "type": "identifier", "text": "FILE_DEVICE_SECURE_OPEN", "parent": 278, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 31}}, {"id": 285, "type": "false", "text": "FALSE", "parent": 278, "children": [], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 13}}, {"id": 286, "type": "pointer_expression", "text": "&pdoDeviceObj", "parent": 278, "children": [287], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 21}}, {"id": 287, "type": "identifier", "text": "pdoDeviceObj", "parent": 286, "children": [], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 21}}, {"id": 288, "type": "return_statement", "text": "return status;", "parent": 266, "children": [289], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 22}}, {"id": 289, "type": "identifier", "text": "status", "parent": 288, "children": [], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 21}}, {"id": 290, "type": "if_statement", "text": "if(!NT_SUCCESS(status = IoCreateSymbolicLink(\r\n &usSymlinkName,\r\n &usDeviceName\r\n )))\r\n {\r\n IoDeleteDevice(pdoDeviceObj);\r\n return status;\r\n }", "parent": 234, "children": [291], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 126, "column": 5}}, {"id": 291, "type": "parenthesized_expression", "text": "(!NT_SUCCESS(status = IoCreateSymbolicLink(\r\n &usSymlinkName,\r\n &usDeviceName\r\n )))", "parent": 290, "children": [292], "start_point": {"row": 119, "column": 6}, "end_point": {"row": 122, "column": 11}}, {"id": 292, "type": "unary_expression", "text": "!NT_SUCCESS(status = IoCreateSymbolicLink(\r\n &usSymlinkName,\r\n &usDeviceName\r\n ))", "parent": 291, "children": [293, 294], "start_point": {"row": 119, "column": 7}, "end_point": {"row": 122, "column": 10}}, {"id": 293, "type": "!", "text": "!", "parent": 292, "children": [], "start_point": {"row": 119, "column": 7}, "end_point": {"row": 119, "column": 8}}, {"id": 294, "type": "call_expression", "text": "NT_SUCCESS(status = IoCreateSymbolicLink(\r\n &usSymlinkName,\r\n &usDeviceName\r\n ))", "parent": 292, "children": [295, 296], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 122, "column": 10}}, {"id": 295, "type": "identifier", "text": "NT_SUCCESS", "parent": 294, "children": [], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 119, "column": 18}}, {"id": 296, "type": "argument_list", "text": "(status = IoCreateSymbolicLink(\r\n &usSymlinkName,\r\n &usDeviceName\r\n ))", "parent": 294, "children": [297], "start_point": {"row": 119, "column": 18}, "end_point": {"row": 122, "column": 10}}, {"id": 297, "type": "assignment_expression", "text": "status = IoCreateSymbolicLink(\r\n &usSymlinkName,\r\n &usDeviceName\r\n )", "parent": 296, "children": [298, 299, 300], "start_point": {"row": 119, "column": 19}, "end_point": {"row": 122, "column": 9}}, {"id": 298, "type": "identifier", "text": "status", "parent": 297, "children": [], "start_point": {"row": 119, "column": 19}, "end_point": {"row": 119, "column": 25}}, {"id": 299, "type": "=", "text": "=", "parent": 297, "children": [], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 27}}, {"id": 300, "type": "call_expression", "text": "IoCreateSymbolicLink(\r\n &usSymlinkName,\r\n &usDeviceName\r\n )", "parent": 297, "children": [301, 302], "start_point": {"row": 119, "column": 28}, "end_point": {"row": 122, "column": 9}}, {"id": 301, "type": "identifier", "text": "IoCreateSymbolicLink", "parent": 300, "children": [], "start_point": {"row": 119, "column": 28}, "end_point": {"row": 119, "column": 48}}, {"id": 302, "type": "argument_list", "text": "(\r\n &usSymlinkName,\r\n &usDeviceName\r\n )", "parent": 300, "children": [303, 305], "start_point": {"row": 119, "column": 48}, "end_point": {"row": 122, "column": 9}}, {"id": 303, "type": "pointer_expression", "text": "&usSymlinkName", "parent": 302, "children": [304], "start_point": {"row": 120, "column": 8}, "end_point": {"row": 120, "column": 22}}, {"id": 304, "type": "identifier", "text": "usSymlinkName", "parent": 303, "children": [], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 22}}, {"id": 305, "type": "pointer_expression", "text": "&usDeviceName", "parent": 302, "children": [306], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 21}}, {"id": 306, "type": "identifier", "text": "usDeviceName", "parent": 305, "children": [], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 21}}, {"id": 307, "type": "call_expression", "text": "IoDeleteDevice(pdoDeviceObj)", "parent": 290, "children": [308, 309], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 36}}, {"id": 308, "type": "identifier", "text": "IoDeleteDevice", "parent": 307, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 22}}, {"id": 309, "type": "argument_list", "text": "(pdoDeviceObj)", "parent": 307, "children": [310], "start_point": {"row": 124, "column": 22}, "end_point": {"row": 124, "column": 36}}, {"id": 310, "type": "identifier", "text": "pdoDeviceObj", "parent": 309, "children": [], "start_point": {"row": 124, "column": 23}, "end_point": {"row": 124, "column": 35}}, {"id": 311, "type": "return_statement", "text": "return status;", "parent": 290, "children": [312], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 22}}, {"id": 312, "type": "identifier", "text": "status", "parent": 311, "children": [], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 21}}, {"id": 313, "type": "assignment_expression", "text": "DriverObject->MajorFunction[IRP_MJ_CREATE] =\r\n DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]", "parent": 234, "children": [314, 319, 320], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 132, "column": 72}}, {"id": 314, "type": "subscript_expression", "text": "DriverObject->MajorFunction[IRP_MJ_CREATE]", "parent": 313, "children": [315, 318], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 46}}, {"id": 315, "type": "field_expression", "text": "DriverObject->MajorFunction", "parent": 314, "children": [316, 317], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 31}}, {"id": 316, "type": "identifier", "text": "DriverObject", "parent": 315, "children": [], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 16}}, {"id": 317, "type": "field_identifier", "text": "MajorFunction", "parent": 315, "children": [], "start_point": {"row": 131, "column": 18}, "end_point": {"row": 131, "column": 31}}, {"id": 318, "type": "identifier", "text": "IRP_MJ_CREATE", "parent": 314, "children": [], "start_point": {"row": 131, "column": 32}, "end_point": {"row": 131, "column": 45}}, {"id": 319, "type": "=", "text": "=", "parent": 313, "children": [], "start_point": {"row": 131, "column": 47}, "end_point": {"row": 131, "column": 48}}, {"id": 320, "type": "subscript_expression", "text": "DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]", "parent": 313, "children": [321, 326, 328], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 72}}, {"id": 321, "type": "subscript_expression", "text": "DriverObject->MajorFunction[IRP_MJ_CLOSE]", "parent": 320, "children": [322, 325], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 45}}, {"id": 322, "type": "field_expression", "text": "DriverObject->MajorFunction", "parent": 321, "children": [323, 324], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 31}}, {"id": 323, "type": "identifier", "text": "DriverObject", "parent": 322, "children": [], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 16}}, {"id": 324, "type": "field_identifier", "text": "MajorFunction", "parent": 322, "children": [], "start_point": {"row": 132, "column": 18}, "end_point": {"row": 132, "column": 31}}, {"id": 325, "type": "identifier", "text": "IRP_MJ_CLOSE", "parent": 321, "children": [], "start_point": {"row": 132, "column": 32}, "end_point": {"row": 132, "column": 44}}, {"id": 326, "type": "ERROR", "text": "=", "parent": 320, "children": [327], "start_point": {"row": 132, "column": 46}, "end_point": {"row": 132, "column": 47}}, {"id": 327, "type": "=", "text": "=", "parent": 326, "children": [], "start_point": {"row": 132, "column": 46}, "end_point": {"row": 132, "column": 47}}, {"id": 328, "type": "unary_expression", "text": "!output PROJECT_PREFIX", "parent": 320, "children": [329, 330, 332], "start_point": {"row": 132, "column": 49}, "end_point": {"row": 132, "column": 71}}, {"id": 329, "type": "!", "text": "!", "parent": 328, "children": [], "start_point": {"row": 132, "column": 49}, "end_point": {"row": 132, "column": 50}}, {"id": 330, "type": "ERROR", "text": "output", "parent": 328, "children": [331], "start_point": {"row": 132, "column": 50}, "end_point": {"row": 132, "column": 56}}, {"id": 331, "type": "identifier", "text": "output", "parent": 330, "children": [], "start_point": {"row": 132, "column": 50}, "end_point": {"row": 132, "column": 56}}, {"id": 332, "type": "identifier", "text": "PROJECT_PREFIX", "parent": 328, "children": [], "start_point": {"row": 132, "column": 57}, "end_point": {"row": 132, "column": 71}}, {"id": 333, "type": "identifier", "text": "_DispatchCreateClose", "parent": 234, "children": [], "start_point": {"row": 132, "column": 72}, "end_point": {"row": 132, "column": 92}}, {"id": 334, "type": "subscript_expression", "text": "DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = [!output PROJECT_PREFIX]", "parent": 234, "children": [335, 340, 342], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 81}}, {"id": 335, "type": "subscript_expression", "text": "DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL]", "parent": 334, "children": [336, 339], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 54}}, {"id": 336, "type": "field_expression", "text": "DriverObject->MajorFunction", "parent": 335, "children": [337, 338], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 31}}, {"id": 337, "type": "identifier", "text": "DriverObject", "parent": 336, "children": [], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 16}}, {"id": 338, "type": "field_identifier", "text": "MajorFunction", "parent": 336, "children": [], "start_point": {"row": 133, "column": 18}, "end_point": {"row": 133, "column": 31}}, {"id": 339, "type": "identifier", "text": "IRP_MJ_DEVICE_CONTROL", "parent": 335, "children": [], "start_point": {"row": 133, "column": 32}, "end_point": {"row": 133, "column": 53}}, {"id": 340, "type": "ERROR", "text": "=", "parent": 334, "children": [341], "start_point": {"row": 133, "column": 55}, "end_point": {"row": 133, "column": 56}}, {"id": 341, "type": "=", "text": "=", "parent": 340, "children": [], "start_point": {"row": 133, "column": 55}, "end_point": {"row": 133, "column": 56}}, {"id": 342, "type": "unary_expression", "text": "!output PROJECT_PREFIX", "parent": 334, "children": [343, 344, 346], "start_point": {"row": 133, "column": 58}, "end_point": {"row": 133, "column": 80}}, {"id": 343, "type": "!", "text": "!", "parent": 342, "children": [], "start_point": {"row": 133, "column": 58}, "end_point": {"row": 133, "column": 59}}, {"id": 344, "type": "ERROR", "text": "output", "parent": 342, "children": [345], "start_point": {"row": 133, "column": 59}, "end_point": {"row": 133, "column": 65}}, {"id": 345, "type": "identifier", "text": "output", "parent": 344, "children": [], "start_point": {"row": 133, "column": 59}, "end_point": {"row": 133, "column": 65}}, {"id": 346, "type": "identifier", "text": "PROJECT_PREFIX", "parent": 342, "children": [], "start_point": {"row": 133, "column": 66}, "end_point": {"row": 133, "column": 80}}, {"id": 347, "type": "identifier", "text": "_DispatchDeviceControl", "parent": 234, "children": [], "start_point": {"row": 133, "column": 81}, "end_point": {"row": 133, "column": 103}}, {"id": 348, "type": "subscript_expression", "text": "DriverObject->DriverUnload = [!output PROJECT_PREFIX]", "parent": 234, "children": [349, 352, 354], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 57}}, {"id": 349, "type": "field_expression", "text": "DriverObject->DriverUnload", "parent": 348, "children": [350, 351], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 30}}, {"id": 350, "type": "identifier", "text": "DriverObject", "parent": 349, "children": [], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 16}}, {"id": 351, "type": "field_identifier", "text": "DriverUnload", "parent": 349, "children": [], "start_point": {"row": 134, "column": 18}, "end_point": {"row": 134, "column": 30}}, {"id": 352, "type": "ERROR", "text": "=", "parent": 348, "children": [353], "start_point": {"row": 134, "column": 31}, "end_point": {"row": 134, "column": 32}}, {"id": 353, "type": "=", "text": "=", "parent": 352, "children": [], "start_point": {"row": 134, "column": 31}, "end_point": {"row": 134, "column": 32}}, {"id": 354, "type": "unary_expression", "text": "!output PROJECT_PREFIX", "parent": 348, "children": [355, 356, 358], "start_point": {"row": 134, "column": 34}, "end_point": {"row": 134, "column": 56}}, {"id": 355, "type": "!", "text": "!", "parent": 354, "children": [], "start_point": {"row": 134, "column": 34}, "end_point": {"row": 134, "column": 35}}, {"id": 356, "type": "ERROR", "text": "output", "parent": 354, "children": [357], "start_point": {"row": 134, "column": 35}, "end_point": {"row": 134, "column": 41}}, {"id": 357, "type": "identifier", "text": "output", "parent": 356, "children": [], "start_point": {"row": 134, "column": 35}, "end_point": {"row": 134, "column": 41}}, {"id": 358, "type": "identifier", "text": "PROJECT_PREFIX", "parent": 354, "children": [], "start_point": {"row": 134, "column": 42}, "end_point": {"row": 134, "column": 56}}, {"id": 359, "type": "identifier", "text": "_DriverUnload", "parent": 234, "children": [], "start_point": {"row": 134, "column": 57}, "end_point": {"row": 134, "column": 70}}, {"id": 360, "type": "return_statement", "text": "return STATUS_SUCCESS;", "parent": 234, "children": [361], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 26}}, {"id": 361, "type": "identifier", "text": "STATUS_SUCCESS", "parent": 360, "children": [], "start_point": {"row": 136, "column": 11}, "end_point": {"row": 136, "column": 25}}, {"id": 362, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\r\n}; // extern \"C\"\r\n#endif", "parent": 0, "children": [363, 364, 365], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 140, "column": 6}}, {"id": 363, "type": "#ifdef", "text": "#ifdef", "parent": 362, "children": [], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 138, "column": 6}}, {"id": 364, "type": "identifier", "text": "__cplusplus", "parent": 362, "children": [], "start_point": {"row": 138, "column": 7}, "end_point": {"row": 138, "column": 18}}, {"id": 365, "type": "#endif", "text": "#endif", "parent": 362, "children": [], "start_point": {"row": 140, "column": 0}, "end_point": {"row": 140, "column": 6}}]}, "node_categories": {"declarations": {"functions": [234, 236], "variables": [26, 54, 101, 107, 196, 212, 239, 245, 250, 256], "classes": [], "imports": [7, 8, 10, 11, 17, 18], "modules": [], "enums": []}, "statements": {"expressions": [36, 38, 61, 62, 69, 70, 76, 83, 85, 112, 118, 119, 120, 121, 127, 132, 133, 135, 144, 150, 151, 158, 159, 170, 171, 175, 182, 184, 201, 204, 207, 210, 221, 224, 267, 268, 270, 276, 281, 286, 291, 292, 294, 300, 303, 305, 307, 314, 315, 320, 321, 322, 328, 334, 335, 336, 342, 348, 349, 354], "assignments": [60, 68, 149, 157, 167, 218, 262, 273, 297, 313], "loops": [209], "conditionals": [1, 2, 13, 14, 15, 16, 20, 21, 23, 27, 29, 32, 33, 34, 35, 37, 41, 42, 43, 44, 46, 47, 49, 50, 51, 53, 55, 57, 59, 63, 64, 65, 67, 71, 72, 73, 77, 79, 80, 82, 84, 88, 89, 90, 91, 93, 94, 96, 97, 98, 100, 102, 104, 106, 108, 110, 113, 115, 116, 117, 122, 123, 124, 125, 129, 130, 131, 134, 138, 139, 141, 146, 148, 152, 153, 154, 156, 160, 161, 162, 168, 172, 173, 174, 176, 178, 179, 181, 183, 187, 188, 189, 190, 192, 193, 195, 197, 199, 202, 203, 205, 208, 211, 213, 215, 217, 219, 222, 223, 225, 227, 228, 229, 235, 237, 240, 242, 243, 244, 246, 247, 249, 251, 253, 257, 259, 261, 263, 265, 266, 271, 274, 277, 279, 282, 283, 284, 287, 289, 290, 295, 298, 301, 304, 306, 308, 310, 312, 316, 317, 318, 323, 324, 325, 331, 332, 333, 337, 338, 339, 345, 346, 347, 350, 351, 357, 358, 359, 361, 362, 363, 364, 365], "returns": [81, 180, 288, 311, 360], "exceptions": []}, "expressions": {"calls": [5, 24, 232], "literals": [4, 9, 12, 19, 31, 75, 164, 231, 255, 280], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 234, "universal_type": "function", "name": "unknown", "text_snippet": "NTSTATUS DriverEntry(\r\n IN OUT PDRIVER_OBJECT DriverObject,\r\n IN PUNICODE_STRING Regist"}, {"node_id": 236, "universal_type": "function", "name": "unknown", "text_snippet": "DriverEntry(\r\n IN OUT PDRIVER_OBJECT DriverObject,\r\n IN PUNICODE_STRING RegistryPath\r\n "}], "class_declarations": [], "import_statements": [{"node_id": 7, "text": "#include <ntddk.h>\r\n"}, {"node_id": 8, "text": "#include"}, {"node_id": 10, "text": "#include <string.h>\r\n"}, {"node_id": 11, "text": "#include"}, {"node_id": 17, "text": "#include \"[!output PROJECT_NAME].h\"\r\n"}, {"node_id": 18, "text": "#include"}]}, "original_source_code": "///////////////////////////////////////////////////////////////////////////////\r\n///\r\n/// Copyright (c) [!output PROJECT_YEAR] - [!output DDKWIZ_USERVARIABLE_COMPANY]\r\n///\r\n/// Original filename: [!output PROJECT_FILENAME]\r\n/// Project : [!output PROJECT_NAME]\r\n/// Date of creation : [!output PROJECT_DATE]\r\n/// Author(s) : [!output DDKWIZ_USERVARIABLE_AUTHOR]\r\n///\r\n/// Purpose : <description>\r\n///\r\n/// Revisions:\r\n/// 0000 [[!output PROJECT_DATE]] Initial revision.\r\n///\r\n///////////////////////////////////////////////////////////////////////////////\r\n\r\n// $Id$\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n#include <ntddk.h>\r\n#include <string.h>\r\n#ifdef __cplusplus\r\n}; // extern \"C\"\r\n#endif\r\n\r\n#include \"[!output PROJECT_NAME].h\"\r\n\r\n#ifdef __cplusplus\r\nnamespace { // anonymous namespace to limit the scope of this global variable!\r\n#endif\r\nPDRIVER_OBJECT pdoGlobalDrvObj = 0;\r\n#ifdef __cplusplus\r\n}; // anonymous namespace\r\n#endif\r\n\r\nNTSTATUS [!output PROJECT_PREFIX]_DispatchCreateClose(\r\n IN PDEVICE_OBJECT\t\tDeviceObject,\r\n IN PIRP\t\t\t\t\tIrp\r\n )\r\n{\r\n NTSTATUS status = STATUS_SUCCESS;\r\n Irp->IoStatus.Status = status;\r\n Irp->IoStatus.Information = 0;\r\n IoCompleteRequest(Irp, IO_NO_INCREMENT);\r\n return status;\r\n}\r\n\r\nNTSTATUS [!output PROJECT_PREFIX]_DispatchDeviceControl(\r\n IN PDEVICE_OBJECT\t\tDeviceObject,\r\n IN PIRP\t\t\t\t\tIrp\r\n )\r\n{\r\n NTSTATUS status = STATUS_SUCCESS;\r\n PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation(Irp);\r\n\r\n switch(irpSp->Parameters.DeviceIoControl.IoControlCode)\r\n {\r\n[!if STRICTERCPP_CHECKBOX]\r\n case IOCTL_[!output PROJECT_PREFIX]_OPERATION:\r\n // status = SomeHandlerFunction(irpSp);\r\n break;\r\n[!endif]\r\n default:\r\n Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST;\r\n Irp->IoStatus.Information = 0;\r\n break;\r\n }\r\n\r\n status = Irp->IoStatus.Status;\r\n IoCompleteRequest(Irp, IO_NO_INCREMENT);\r\n return status;\r\n}\r\n\r\nVOID [!output PROJECT_PREFIX]_DriverUnload(\r\n IN PDRIVER_OBJECT\t\tDriverObject\r\n )\r\n{\r\n PDEVICE_OBJECT pdoNextDeviceObj = pdoGlobalDrvObj->DeviceObject;\r\n IoDeleteSymbolicLink(&usSymlinkName);\r\n\r\n // Delete all the device objects\r\n while(pdoNextDeviceObj)\r\n {\r\n PDEVICE_OBJECT pdoThisDeviceObj = pdoNextDeviceObj;\r\n pdoNextDeviceObj = pdoThisDeviceObj->NextDevice;\r\n IoDeleteDevice(pdoThisDeviceObj);\r\n }\r\n}\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\nNTSTATUS DriverEntry(\r\n IN OUT PDRIVER_OBJECT DriverObject,\r\n IN PUNICODE_STRING RegistryPath\r\n )\r\n{\r\n PDEVICE_OBJECT pdoDeviceObj = 0;\r\n NTSTATUS status = STATUS_UNSUCCESSFUL;\r\n pdoGlobalDrvObj = DriverObject;\r\n\r\n // Create the device object.\r\n if(!NT_SUCCESS(status = IoCreateDevice(\r\n DriverObject,\r\n 0,\r\n &usDeviceName,\r\n FILE_DEVICE_UNKNOWN,\r\n FILE_DEVICE_SECURE_OPEN,\r\n FALSE,\r\n &pdoDeviceObj\r\n )))\r\n {\r\n // Bail out (implicitly forces the driver to unload).\r\n return status;\r\n };\r\n\r\n // Now create the respective symbolic link object\r\n if(!NT_SUCCESS(status = IoCreateSymbolicLink(\r\n &usSymlinkName,\r\n &usDeviceName\r\n )))\r\n {\r\n IoDeleteDevice(pdoDeviceObj);\r\n return status;\r\n }\r\n\r\n // NOTE: You need not provide your own implementation for any major function that\r\n // you do not want to handle. I have seen code using DDKWizard that left the\r\n // *empty* dispatch routines intact. This is not necessary at all!\r\n DriverObject->MajorFunction[IRP_MJ_CREATE] =\r\n DriverObject->MajorFunction[IRP_MJ_CLOSE] = [!output PROJECT_PREFIX]_DispatchCreateClose;\r\n DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = [!output PROJECT_PREFIX]_DispatchDeviceControl;\r\n DriverObject->DriverUnload = [!output PROJECT_PREFIX]_DriverUnload;\r\n\r\n return STATUS_SUCCESS;\r\n}\r\n#ifdef __cplusplus\r\n}; // extern \"C\"\r\n#endif\r\n"}
395
c
// // ChatEmojView.h // TIMChat // // Created by AlexiChen on 16/3/21. // Copyright © 2016年 AlexiChen. All rights reserved. // #import "MyEmojView.h" @interface ChatEmojView : MyEmojView<ChatInputAbleView> { @protected __weak id<ChatInputAbleViewDelegate> _chatDelegate; @protected NSInteger _contentHeight; } @property (nonatomic, weak) id<ChatInputAbleViewDelegate> chatDelegate; @property (nonatomic, assign) NSInteger contentHeight; @end
21.24
21
(translation_unit) "//\n// ChatEmojView.h\n// TIMChat\n//\n// Created by AlexiChen on 16/3/21.\n// Copyright © 2016年 AlexiChen. All rights reserved.\n//\n\n#import "MyEmojView.h"\n\n@interface ChatEmojView : MyEmojView<ChatInputAbleView>\n{\n@protected\n __weak id<ChatInputAbleViewDelegate> _chatDelegate;\n \n@protected\n NSInteger _contentHeight;\n \n}\n\n@property (nonatomic, weak) id<ChatInputAbleViewDelegate> chatDelegate;\n@property (nonatomic, assign) NSInteger contentHeight;\n\n\n@end\n" (comment) "//" (comment) "// ChatEmojView.h" (comment) "// TIMChat" (comment) "//" (comment) "// Created by AlexiChen on 16/3/21." (comment) "// Copyright © 2016年 AlexiChen. All rights reserved.\n//" (comment) "\n#" (preproc_call) "port "MyEmojView.h"\n\n@i" (preproc_directive) "port "M" (preproc_arg) "EmojView.h"\n\n@" (ERROR) "t" (ERROR) "t" (function_definition) "erface ChatEmojView : MyEmojView<ChatInputAbleView>\n{\n@protected\n __weak id<ChatInputAbleViewDelegate> _chatDelegate;\n \n@protected\n NSInteger _contentHeight;\n \n}\n\n@" (type_identifier) "erface Ch" (ERROR) "tEmojView : MyEmojView<Cha" (identifier) "tEmojView : " (:) "y" (identifier) "mojView<Ch" (<) "a" (identifier) "tInputAbleView>\n{" (ERROR) "\n" (>) "\n" (compound_statement) "protected\n __weak id<ChatInputAbleViewDelegate> _chatDelegate;\n \n@protected\n NSInteger _contentHeight;\n \n}\n\n@" ({) "p" (ERROR) "o" (ERROR) "o" (declaration) "tected\n __weak id" (type_identifier) "tected\n " (identifier) "eak id" (;) "" (expression_statement) "ChatInputAbleViewDelegate> _chatDelegate;\n " (binary_expression) "ChatInputAbleViewDelegate> _chatDelegate;\n " (binary_expression) "ChatInputAbleViewDelegate> _" (identifier) "Ch" (<) "a" (identifier) "tInputAbleViewDelegate> _" (>) "c" (identifier) "atDelegate;\n " (;) " " (ERROR) "o" (ERROR) "o" (declaration) "tected\n NSInteger _contentHeight;\n " (type_identifier) "tected\n " (ERROR) "nteger " (identifier) "nteger " (identifier) "ntentHeight;\n " (;) " " (}) "@" (ERROR) "operty (nonatomic, weak) id<ChatInputAbleViewDelegate> chatDelegate;\n@property (nonatomic, assign) NSInteger co" (ERROR) "o" (binary_expression) "perty (nonatomic, weak) id<ChatInputAbleViewDelegate> chatDelegate;\n@" (binary_expression) "perty (nonatomic, weak) id<ChatInputAbleViewDelegate> c" (call_expression) "perty (nonatomic, weak) id" (identifier) "perty (n" (argument_list) "natomic, weak) id" (() "n" (identifier) "atomic, w" (,) "e" (identifier) "k) i" ()) "d" (ERROR) "Ch" (identifier) "Ch" (<) "a" (identifier) "tInputAbleViewDelegate> c" (>) "h" (identifier) "tDelegate;\n@" (;) "p" (ERROR) "o" (call_expression) "perty (nonatomic, assign) NS" (identifier) "perty (n" (argument_list) "natomic, assign) NS" (() "n" (identifier) "atomic, a" (,) "s" (identifier) "ign) N" ()) "S" (identifier) "nteger co" (expression_statement) "tentHeight;\n\n\n" (identifier) "tentHeight;\n\n" (;) "\n" (ERROR) "d" (ERROR) "d" (expression_statement) "\n" (identifier) "\n" (;) ""
86
15
{"language": "c", "success": true, "metadata": {"lines": 21, "avg_line_length": 21.24, "nodes": 59, "errors": 0, "source_hash": "5e5ebbcba49be2e010b3b0d48725c0a225a264ab27eb3a61ccb6fbf0a0688d68", "categorized_nodes": 34}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "port \"MyEmojView.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 \"M", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "EmojView.h\"\n\n@", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 22}}, {"id": 3, "type": "ERROR", "text": "t", "parent": null, "children": [4], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 4, "type": "ERROR", "text": "t", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "function_definition", "text": "erface ChatEmojView : MyEmojView<ChatInputAbleView>\n{\n@protected\n __weak id<ChatInputAbleViewDelegate> _chatDelegate;\n \n@protected\n NSInteger _contentHeight;\n \n}\n\n@", "parent": null, "children": [6, 7, 11, 12], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 18, "column": 1}}, {"id": 6, "type": "type_identifier", "text": "erface Ch", "parent": 5, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 7, "type": "ERROR", "text": "tEmojView : MyEmojView<Cha", "parent": 5, "children": [8, 9, 10], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 37}}, {"id": 8, "type": "identifier", "text": "tEmojView : ", "parent": 7, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 23}}, {"id": 9, "type": "identifier", "text": "mojView<Ch", "parent": 7, "children": [], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 36}}, {"id": 10, "type": "<", "text": "a", "parent": 7, "children": [], "start_point": {"row": 10, "column": 36}, "end_point": {"row": 10, "column": 37}}, {"id": 11, "type": "identifier", "text": "tInputAbleView>\n{", "parent": 5, "children": [], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 54}}, {"id": 12, "type": "ERROR", "text": "\n", "parent": 5, "children": [13], "start_point": {"row": 10, "column": 54}, "end_point": {"row": 10, "column": 55}}, {"id": 13, "type": ">", "text": "\n", "parent": 12, "children": [], "start_point": {"row": 10, "column": 54}, "end_point": {"row": 10, "column": 55}}, {"id": 14, "type": "ERROR", "text": "o", "parent": 5, "children": [15], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 15, "type": "ERROR", "text": "o", "parent": 14, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 16, "type": "declaration", "text": "tected\n __weak id", "parent": 5, "children": [17, 18], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 13, "column": 10}}, {"id": 17, "type": "type_identifier", "text": "tected\n ", "parent": 16, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 10}}, {"id": 18, "type": "identifier", "text": "eak id", "parent": 16, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 10}}, {"id": 19, "type": "binary_expression", "text": "ChatInputAbleViewDelegate> _chatDelegate;\n ", "parent": 5, "children": [20, 24, 25], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 54}}, {"id": 20, "type": "binary_expression", "text": "ChatInputAbleViewDelegate> _", "parent": 19, "children": [21, 22, 23], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 39}}, {"id": 21, "type": "identifier", "text": "Ch", "parent": 20, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 13}}, {"id": 22, "type": "<", "text": "a", "parent": 20, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 14}}, {"id": 23, "type": "identifier", "text": "tInputAbleViewDelegate> _", "parent": 20, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 39}}, {"id": 24, "type": ">", "text": "c", "parent": 19, "children": [], "start_point": {"row": 13, "column": 39}, "end_point": {"row": 13, "column": 40}}, {"id": 25, "type": "identifier", "text": "atDelegate;\n ", "parent": 19, "children": [], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 54}}, {"id": 26, "type": "ERROR", "text": "o", "parent": 5, "children": [27], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 27, "type": "ERROR", "text": "o", "parent": 26, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 28, "type": "declaration", "text": "tected\n NSInteger _contentHeight;\n ", "parent": 5, "children": [29, 30, 32], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 16, "column": 31}}, {"id": 29, "type": "type_identifier", "text": "tected\n ", "parent": 28, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 10}}, {"id": 30, "type": "ERROR", "text": "nteger ", "parent": 28, "children": [31], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 13}}, {"id": 31, "type": "identifier", "text": "nteger ", "parent": 30, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 13}}, {"id": 32, "type": "identifier", "text": "ntentHeight;\n ", "parent": 28, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 30}}, {"id": 33, "type": "ERROR", "text": "operty (nonatomic, weak) id<ChatInputAbleViewDelegate> chatDelegate;\n@property (nonatomic, assign) NSInteger co", "parent": null, "children": [34, 35, 48, 49, 54], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 39}}, {"id": 34, "type": "ERROR", "text": "o", "parent": 33, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 35, "type": "binary_expression", "text": "perty (nonatomic, weak) id<ChatInputAbleViewDelegate> chatDelegate;\n@", "parent": 33, "children": [36, 46, 47], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 70}}, {"id": 36, "type": "binary_expression", "text": "perty (nonatomic, weak) id<ChatInputAbleViewDelegate> c", "parent": 35, "children": [37, 42, 44, 45], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 56}}, {"id": 37, "type": "call_expression", "text": "perty (nonatomic, weak) id", "parent": 36, "children": [38, 39], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 27}}, {"id": 38, "type": "identifier", "text": "perty (n", "parent": 37, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 39, "type": "argument_list", "text": "natomic, weak) id", "parent": 37, "children": [40, 41], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 27}}, {"id": 40, "type": "identifier", "text": "atomic, w", "parent": 39, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 20}}, {"id": 41, "type": "identifier", "text": "k) i", "parent": 39, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 26}}, {"id": 42, "type": "ERROR", "text": "Ch", "parent": 36, "children": [43], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 30}}, {"id": 43, "type": "identifier", "text": "Ch", "parent": 42, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 30}}, {"id": 44, "type": "<", "text": "a", "parent": 36, "children": [], "start_point": {"row": 20, "column": 30}, "end_point": {"row": 20, "column": 31}}, {"id": 45, "type": "identifier", "text": "tInputAbleViewDelegate> c", "parent": 36, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 56}}, {"id": 46, "type": ">", "text": "h", "parent": 35, "children": [], "start_point": {"row": 20, "column": 56}, "end_point": {"row": 20, "column": 57}}, {"id": 47, "type": "identifier", "text": "tDelegate;\n@", "parent": 35, "children": [], "start_point": {"row": 20, "column": 58}, "end_point": {"row": 20, "column": 70}}, {"id": 48, "type": "ERROR", "text": "o", "parent": 33, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 49, "type": "call_expression", "text": "perty (nonatomic, assign) NS", "parent": 33, "children": [50, 51], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 29}}, {"id": 50, "type": "identifier", "text": "perty (n", "parent": 49, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 9}}, {"id": 51, "type": "argument_list", "text": "natomic, assign) NS", "parent": 49, "children": [52, 53], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 29}}, {"id": 52, "type": "identifier", "text": "atomic, a", "parent": 51, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 20}}, {"id": 53, "type": "identifier", "text": "ign) N", "parent": 51, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 28}}, {"id": 54, "type": "identifier", "text": "nteger co", "parent": 33, "children": [], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 39}}, {"id": 55, "type": "identifier", "text": "tentHeight;\n\n", "parent": null, "children": [], "start_point": {"row": 21, "column": 40}, "end_point": {"row": 21, "column": 53}}, {"id": 56, "type": "ERROR", "text": "d", "parent": null, "children": [57], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 57, "type": "ERROR", "text": "d", "parent": 56, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 58, "type": "identifier", "text": "\n", "parent": null, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 4}}]}, "node_categories": {"declarations": {"functions": [5], "variables": [16, 28], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [19, 20, 35, 36, 37, 49], "assignments": [], "loops": [], "conditionals": [6, 8, 9, 11, 17, 18, 21, 23, 25, 29, 31, 32, 38, 40, 41, 43, 45, 47, 50, 52, 53, 54, 55, 58], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "erface ChatEmojView : MyEmojView<ChatInputAbleView>\n{\n@protected\n __weak id<ChatInputAbleViewDele"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// ChatEmojView.h\n// TIMChat\n//\n// Created by AlexiChen on 16/3/21.\n// Copyright \u00a9 2016\u5e74 AlexiChen. All rights reserved.\n//\n\n#import \"MyEmojView.h\"\n\n@interface ChatEmojView : MyEmojView<ChatInputAbleView>\n{\n@protected\n __weak id<ChatInputAbleViewDelegate> _chatDelegate;\n \n@protected\n NSInteger _contentHeight;\n \n}\n\n@property (nonatomic, weak) id<ChatInputAbleViewDelegate> chatDelegate;\n@property (nonatomic, assign) NSInteger contentHeight;\n\n\n@end\n"}
396
c
/* stack.c: Kwdikas tis vivliothikis stoivas */ #include "stack.h" /* ST_init(): arxikopoiei ti lista */ void ST_init(STACK *s) { //s->top=-1; (*s).top=-1; } /* ST_empty(): epistrefei TRUE/FALSE * analoga me to an i stoiva einai adeia */ int ST_empty(STACK s) { return s.top==-1; } /* ST_full(): epistrefei TRUE/FALSE * analoga me to an i stoiva einai gemati */ int ST_full(STACK s) { return s.top==STACK_SIZE-1; } /* ST_push(): Eisagei to x sti stoiva s * epistrefei TRUE: se periptwsi epitixias * FALSE: se periptwsi apotixias */ int ST_push(STACK *s,elem x) { if (ST_full(*s)) return FALSE; else { s->top++; s->array[s->top]=x; return TRUE; } } /* ST_pop(): Kanei eksagwgi poy einai stin korifi tis listas * epistrefei TRUE: se periptwsi epitixias * FALSE: se periptwsi apotixias */ int ST_pop(STACK *s,elem *x) { if (ST_empty(*s)) return FALSE; else { *x=s->array[s->top]; s->top--; return TRUE; } }
17.48
56
(translation_unit) "/* stack.c: Kwdikas tis vivliothikis stoivas */ \n#include "stack.h" \n \n \n \n/* ST_init(): arxikopoiei ti lista */ \nvoid ST_init(STACK *s) \n{ \n //s->top=-1; \n (*s).top=-1; \n} \n \n/* ST_empty(): epistrefei TRUE/FALSE \n * analoga me to an i stoiva einai adeia */ \nint ST_empty(STACK s) \n{ \n return s.top==-1; \n} \n \n/* ST_full(): epistrefei TRUE/FALSE \n * analoga me to an i stoiva einai gemati */ \nint ST_full(STACK s) \n{ \n return s.top==STACK_SIZE-1; \n} \n \n/* ST_push(): Eisagei to x sti stoiva s \n * epistrefei TRUE: se periptwsi epitixias \n * FALSE: se periptwsi apotixias */ \nint ST_push(STACK *s,elem x) \n{ \n if (ST_full(*s)) \n return FALSE; \n else \n { \n s->top++; \n s->array[s->top]=x; \n return TRUE; \n } \n} \n \n \n/* ST_pop(): Kanei eksagwgi poy einai stin korifi tis listas \n * epistrefei TRUE: se periptwsi epitixias \n * FALSE: se periptwsi apotixias */ \nint ST_pop(STACK *s,elem *x) \n{ \n if (ST_empty(*s)) \n return FALSE; \n else \n { \n *x=s->array[s->top]; \n s->top--; \n return TRUE; \n } \n} \n" (comment) "/* stack.c: Kwdikas tis vivliothikis stoivas */" (preproc_include) "#include "stack.h" \n" (#include) "#include" (string_literal) ""stack.h"" (") """ (string_content) "stack.h" (") """ (comment) "/* ST_init(): arxikopoiei ti lista */" (function_definition) "void ST_init(STACK *s) \n{ \n //s->top=-1; \n (*s).top=-1; \n}" (primitive_type) "void" (function_declarator) "ST_init(STACK *s)" (identifier) "ST_init" (parameter_list) "(STACK *s)" (() "(" (parameter_declaration) "STACK *s" (type_identifier) "STACK" (pointer_declarator) "*s" (*) "*" (identifier) "s" ()) ")" (compound_statement) "{ \n //s->top=-1; \n (*s).top=-1; \n}" ({) "{" (comment) "//s->top=-1; " (expression_statement) "(*s).top=-1;" (assignment_expression) "(*s).top=-1" (field_expression) "(*s).top" (parenthesized_expression) "(*s)" (() "(" (pointer_expression) "*s" (*) "*" (identifier) "s" ()) ")" (.) "." (field_identifier) "top" (=) "=" (number_literal) "-1" (;) ";" (}) "}" (comment) "/* ST_empty(): epistrefei TRUE/FALSE \n * analoga me to an i stoiva einai adeia */" (function_definition) "int ST_empty(STACK s) \n{ \n return s.top==-1; \n}" (primitive_type) "int" (function_declarator) "ST_empty(STACK s)" (identifier) "ST_empty" (parameter_list) "(STACK s)" (() "(" (parameter_declaration) "STACK s" (type_identifier) "STACK" (identifier) "s" ()) ")" (compound_statement) "{ \n return s.top==-1; \n}" ({) "{" (return_statement) "return s.top==-1;" (return) "return" (binary_expression) "s.top==-1" (field_expression) "s.top" (identifier) "s" (.) "." (field_identifier) "top" (==) "==" (number_literal) "-1" (;) ";" (}) "}" (comment) "/* ST_full(): epistrefei TRUE/FALSE \n * analoga me to an i stoiva einai gemati */" (function_definition) "int ST_full(STACK s) \n{ \n return s.top==STACK_SIZE-1; \n}" (primitive_type) "int" (function_declarator) "ST_full(STACK s)" (identifier) "ST_full" (parameter_list) "(STACK s)" (() "(" (parameter_declaration) "STACK s" (type_identifier) "STACK" (identifier) "s" ()) ")" (compound_statement) "{ \n return s.top==STACK_SIZE-1; \n}" ({) "{" (return_statement) "return s.top==STACK_SIZE-1;" (return) "return" (binary_expression) "s.top==STACK_SIZE-1" (field_expression) "s.top" (identifier) "s" (.) "." (field_identifier) "top" (==) "==" (binary_expression) "STACK_SIZE-1" (identifier) "STACK_SIZE" (-) "-" (number_literal) "1" (;) ";" (}) "}" (comment) "/* ST_push(): Eisagei to x sti stoiva s \n * epistrefei TRUE: se periptwsi epitixias \n * FALSE: se periptwsi apotixias */" (function_definition) "int ST_push(STACK *s,elem x) \n{ \n if (ST_full(*s)) \n return FALSE; \n else \n { \n s->top++; \n s->array[s->top]=x; \n return TRUE; \n } \n}" (primitive_type) "int" (function_declarator) "ST_push(STACK *s,elem x)" (identifier) "ST_push" (parameter_list) "(STACK *s,elem x)" (() "(" (parameter_declaration) "STACK *s" (type_identifier) "STACK" (pointer_declarator) "*s" (*) "*" (identifier) "s" (,) "," (parameter_declaration) "elem x" (type_identifier) "elem" (identifier) "x" ()) ")" (compound_statement) "{ \n if (ST_full(*s)) \n return FALSE; \n else \n { \n s->top++; \n s->array[s->top]=x; \n return TRUE; \n } \n}" ({) "{" (if_statement) "if (ST_full(*s)) \n return FALSE; \n else \n { \n s->top++; \n s->array[s->top]=x; \n return TRUE; \n }" (if) "if" (parenthesized_expression) "(ST_full(*s))" (() "(" (call_expression) "ST_full(*s)" (identifier) "ST_full" (argument_list) "(*s)" (() "(" (pointer_expression) "*s" (*) "*" (identifier) "s" ()) ")" ()) ")" (return_statement) "return FALSE;" (return) "return" (false) "FALSE" (;) ";" (else_clause) "else \n { \n s->top++; \n s->array[s->top]=x; \n return TRUE; \n }" (else) "else" (compound_statement) "{ \n s->top++; \n s->array[s->top]=x; \n return TRUE; \n }" ({) "{" (expression_statement) "s->top++;" (update_expression) "s->top++" (field_expression) "s->top" (identifier) "s" (->) "->" (field_identifier) "top" (++) "++" (;) ";" (expression_statement) "s->array[s->top]=x;" (assignment_expression) "s->array[s->top]=x" (subscript_expression) "s->array[s->top]" (field_expression) "s->array" (identifier) "s" (->) "->" (field_identifier) "array" ([) "[" (field_expression) "s->top" (identifier) "s" (->) "->" (field_identifier) "top" (]) "]" (=) "=" (identifier) "x" (;) ";" (return_statement) "return TRUE;" (return) "return" (true) "TRUE" (;) ";" (}) "}" (}) "}" (comment) "/* ST_pop(): Kanei eksagwgi poy einai stin korifi tis listas \n * epistrefei TRUE: se periptwsi epitixias \n * FALSE: se periptwsi apotixias */" (function_definition) "int ST_pop(STACK *s,elem *x) \n{ \n if (ST_empty(*s)) \n return FALSE; \n else \n { \n *x=s->array[s->top]; \n s->top--; \n return TRUE; \n } \n}" (primitive_type) "int" (function_declarator) "ST_pop(STACK *s,elem *x)" (identifier) "ST_pop" (parameter_list) "(STACK *s,elem *x)" (() "(" (parameter_declaration) "STACK *s" (type_identifier) "STACK" (pointer_declarator) "*s" (*) "*" (identifier) "s" (,) "," (parameter_declaration) "elem *x" (type_identifier) "elem" (pointer_declarator) "*x" (*) "*" (identifier) "x" ()) ")" (compound_statement) "{ \n if (ST_empty(*s)) \n return FALSE; \n else \n { \n *x=s->array[s->top]; \n s->top--; \n return TRUE; \n } \n}" ({) "{" (if_statement) "if (ST_empty(*s)) \n return FALSE; \n else \n { \n *x=s->array[s->top]; \n s->top--; \n return TRUE; \n }" (if) "if" (parenthesized_expression) "(ST_empty(*s))" (() "(" (call_expression) "ST_empty(*s)" (identifier) "ST_empty" (argument_list) "(*s)" (() "(" (pointer_expression) "*s" (*) "*" (identifier) "s" ()) ")" ()) ")" (return_statement) "return FALSE;" (return) "return" (false) "FALSE" (;) ";" (else_clause) "else \n { \n *x=s->array[s->top]; \n s->top--; \n return TRUE; \n }" (else) "else" (compound_statement) "{ \n *x=s->array[s->top]; \n s->top--; \n return TRUE; \n }" ({) "{" (expression_statement) "*x=s->array[s->top];" (assignment_expression) "*x=s->array[s->top]" (pointer_expression) "*x" (*) "*" (identifier) "x" (=) "=" (subscript_expression) "s->array[s->top]" (field_expression) "s->array" (identifier) "s" (->) "->" (field_identifier) "array" ([) "[" (field_expression) "s->top" (identifier) "s" (->) "->" (field_identifier) "top" (]) "]" (;) ";" (expression_statement) "s->top--;" (update_expression) "s->top--" (field_expression) "s->top" (identifier) "s" (->) "->" (field_identifier) "top" (--) "--" (;) ";" (return_statement) "return TRUE;" (return) "return" (true) "TRUE" (;) ";" (}) "}" (}) "}"
234
0
{"language": "c", "success": true, "metadata": {"lines": 56, "avg_line_length": 17.48, "nodes": 141, "errors": 0, "source_hash": "edeccfe2d7a1f1b095ff7b7569fa27a10959a05726c3a2fccdc133f02888ec58", "categorized_nodes": 103}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"stack.h\"\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"stack.h\"", "parent": 0, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 18}}, {"id": 3, "type": "function_definition", "text": "void ST_init(STACK *s)\r\n{\r\n\t//s->top=-1;\r\n\t(*s).top=-1;\r\n}", "parent": null, "children": [4, 5], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "void", "parent": 3, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 4}}, {"id": 5, "type": "function_declarator", "text": "ST_init(STACK *s)", "parent": 3, "children": [6, 7], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 22}}, {"id": 6, "type": "identifier", "text": "ST_init", "parent": 5, "children": [], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 12}}, {"id": 7, "type": "parameter_list", "text": "(STACK *s)", "parent": 5, "children": [8], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 22}}, {"id": 8, "type": "parameter_declaration", "text": "STACK *s", "parent": 7, "children": [9, 10], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 21}}, {"id": 9, "type": "type_identifier", "text": "STACK", "parent": 8, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 18}}, {"id": 10, "type": "pointer_declarator", "text": "*s", "parent": 8, "children": [11, 12], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 21}}, {"id": 11, "type": "*", "text": "*", "parent": 10, "children": [], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 20}}, {"id": 12, "type": "identifier", "text": "s", "parent": 10, "children": [], "start_point": {"row": 6, "column": 20}, "end_point": {"row": 6, "column": 21}}, {"id": 13, "type": "assignment_expression", "text": "(*s).top=-1", "parent": 3, "children": [14, 20, 21], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 12}}, {"id": 14, "type": "field_expression", "text": "(*s).top", "parent": 13, "children": [15, 19], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 9}}, {"id": 15, "type": "parenthesized_expression", "text": "(*s)", "parent": 14, "children": [16], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 5}}, {"id": 16, "type": "pointer_expression", "text": "*s", "parent": 15, "children": [17, 18], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 4}}, {"id": 17, "type": "*", "text": "*", "parent": 16, "children": [], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 3}}, {"id": 18, "type": "identifier", "text": "s", "parent": 16, "children": [], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 9, "column": 4}}, {"id": 19, "type": "field_identifier", "text": "top", "parent": 14, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 9}}, {"id": 20, "type": "=", "text": "=", "parent": 13, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 10}}, {"id": 21, "type": "number_literal", "text": "-1", "parent": 13, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 12}}, {"id": 22, "type": "function_definition", "text": "int ST_empty(STACK s)\r\n{\r\n\treturn s.top==-1;\r\n}", "parent": null, "children": [23, 24], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 23, "type": "primitive_type", "text": "int", "parent": 22, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 3}}, {"id": 24, "type": "function_declarator", "text": "ST_empty(STACK s)", "parent": 22, "children": [25, 26], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 21}}, {"id": 25, "type": "identifier", "text": "ST_empty", "parent": 24, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 12}}, {"id": 26, "type": "parameter_list", "text": "(STACK s)", "parent": 24, "children": [27], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 21}}, {"id": 27, "type": "parameter_declaration", "text": "STACK s", "parent": 26, "children": [28, 29], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 20}}, {"id": 28, "type": "type_identifier", "text": "STACK", "parent": 27, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 18}}, {"id": 29, "type": "identifier", "text": "s", "parent": 27, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 20}}, {"id": 30, "type": "return_statement", "text": "return s.top==-1;", "parent": 22, "children": [31], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 18}}, {"id": 31, "type": "binary_expression", "text": "s.top==-1", "parent": 30, "children": [32, 35, 36], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 17}}, {"id": 32, "type": "field_expression", "text": "s.top", "parent": 31, "children": [33, 34], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 13}}, {"id": 33, "type": "identifier", "text": "s", "parent": 32, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 9}}, {"id": 34, "type": "field_identifier", "text": "top", "parent": 32, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 13}}, {"id": 35, "type": "==", "text": "==", "parent": 31, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 15}}, {"id": 36, "type": "number_literal", "text": "-1", "parent": 31, "children": [], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 17}}, {"id": 37, "type": "function_definition", "text": "int ST_full(STACK s)\r\n{\r\n\treturn s.top==STACK_SIZE-1;\r\n}", "parent": null, "children": [38, 39], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 38, "type": "primitive_type", "text": "int", "parent": 37, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 3}}, {"id": 39, "type": "function_declarator", "text": "ST_full(STACK s)", "parent": 37, "children": [40, 41], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 20}}, {"id": 40, "type": "identifier", "text": "ST_full", "parent": 39, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 11}}, {"id": 41, "type": "parameter_list", "text": "(STACK s)", "parent": 39, "children": [42], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 20}}, {"id": 42, "type": "parameter_declaration", "text": "STACK s", "parent": 41, "children": [43, 44], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 19}}, {"id": 43, "type": "type_identifier", "text": "STACK", "parent": 42, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 17}}, {"id": 44, "type": "identifier", "text": "s", "parent": 42, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 19}}, {"id": 45, "type": "return_statement", "text": "return s.top==STACK_SIZE-1;", "parent": 37, "children": [46], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 28}}, {"id": 46, "type": "binary_expression", "text": "s.top==STACK_SIZE-1", "parent": 45, "children": [47, 50, 51], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 27}}, {"id": 47, "type": "field_expression", "text": "s.top", "parent": 46, "children": [48, 49], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 13}}, {"id": 48, "type": "identifier", "text": "s", "parent": 47, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 9}}, {"id": 49, "type": "field_identifier", "text": "top", "parent": 47, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 13}}, {"id": 50, "type": "==", "text": "==", "parent": 46, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 15}}, {"id": 51, "type": "binary_expression", "text": "STACK_SIZE-1", "parent": 46, "children": [52, 53, 54], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 27}}, {"id": 52, "type": "identifier", "text": "STACK_SIZE", "parent": 51, "children": [], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 25}}, {"id": 53, "type": "-", "text": "-", "parent": 51, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 26}}, {"id": 54, "type": "number_literal", "text": "1", "parent": 51, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 27}}, {"id": 55, "type": "function_definition", "text": "int ST_push(STACK *s,elem x)\r\n{\r\n\tif (ST_full(*s))\r\n\t\treturn FALSE;\r\n\telse\r\n\t{\r\n\t\ts->top++;\r\n\t\ts->array[s->top]=x;\r\n\t\treturn TRUE;\r\n\t}\r\n}", "parent": null, "children": [56, 57], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 56, "type": "primitive_type", "text": "int", "parent": 55, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 3}}, {"id": 57, "type": "function_declarator", "text": "ST_push(STACK *s,elem x)", "parent": 55, "children": [58, 59], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 28}}, {"id": 58, "type": "identifier", "text": "ST_push", "parent": 57, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 11}}, {"id": 59, "type": "parameter_list", "text": "(STACK *s,elem x)", "parent": 57, "children": [60, 65], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 28}}, {"id": 60, "type": "parameter_declaration", "text": "STACK *s", "parent": 59, "children": [61, 62], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 20}}, {"id": 61, "type": "type_identifier", "text": "STACK", "parent": 60, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 17}}, {"id": 62, "type": "pointer_declarator", "text": "*s", "parent": 60, "children": [63, 64], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 20}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 19}}, {"id": 64, "type": "identifier", "text": "s", "parent": 62, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 20}}, {"id": 65, "type": "parameter_declaration", "text": "elem x", "parent": 59, "children": [66, 67], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 27}}, {"id": 66, "type": "type_identifier", "text": "elem", "parent": 65, "children": [], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 25}}, {"id": 67, "type": "identifier", "text": "x", "parent": 65, "children": [], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 27}}, {"id": 68, "type": "if_statement", "text": "if (ST_full(*s))\r\n\t\treturn FALSE;\r\n\telse\r\n\t{\r\n\t\ts->top++;\r\n\t\ts->array[s->top]=x;\r\n\t\treturn TRUE;\r\n\t}", "parent": 55, "children": [69, 76, 78], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 38, "column": 2}}, {"id": 69, "type": "parenthesized_expression", "text": "(ST_full(*s))", "parent": 68, "children": [70], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 17}}, {"id": 70, "type": "call_expression", "text": "ST_full(*s)", "parent": 69, "children": [71, 72], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 16}}, {"id": 71, "type": "identifier", "text": "ST_full", "parent": 70, "children": [], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 12}}, {"id": 72, "type": "argument_list", "text": "(*s)", "parent": 70, "children": [73], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 16}}, {"id": 73, "type": "pointer_expression", "text": "*s", "parent": 72, "children": [74, 75], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 15}}, {"id": 74, "type": "*", "text": "*", "parent": 73, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 14}}, {"id": 75, "type": "identifier", "text": "s", "parent": 73, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 15}}, {"id": 76, "type": "return_statement", "text": "return FALSE;", "parent": 68, "children": [77], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 15}}, {"id": 77, "type": "false", "text": "FALSE", "parent": 76, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 14}}, {"id": 78, "type": "else_clause", "text": "else\r\n\t{\r\n\t\ts->top++;\r\n\t\ts->array[s->top]=x;\r\n\t\treturn TRUE;\r\n\t}", "parent": 68, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 38, "column": 2}}, {"id": 79, "type": "update_expression", "text": "s->top++", "parent": 78, "children": [80, 83], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 10}}, {"id": 80, "type": "field_expression", "text": "s->top", "parent": 79, "children": [81, 82], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 8}}, {"id": 81, "type": "identifier", "text": "s", "parent": 80, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 3}}, {"id": 82, "type": "field_identifier", "text": "top", "parent": 80, "children": [], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 8}}, {"id": 83, "type": "++", "text": "++", "parent": 79, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 10}}, {"id": 84, "type": "assignment_expression", "text": "s->array[s->top]=x", "parent": 78, "children": [85, 92, 93], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 20}}, {"id": 85, "type": "subscript_expression", "text": "s->array[s->top]", "parent": 84, "children": [86, 89], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 18}}, {"id": 86, "type": "field_expression", "text": "s->array", "parent": 85, "children": [87, 88], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 10}}, {"id": 87, "type": "identifier", "text": "s", "parent": 86, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 3}}, {"id": 88, "type": "field_identifier", "text": "array", "parent": 86, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 10}}, {"id": 89, "type": "field_expression", "text": "s->top", "parent": 85, "children": [90, 91], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 17}}, {"id": 90, "type": "identifier", "text": "s", "parent": 89, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 12}}, {"id": 91, "type": "field_identifier", "text": "top", "parent": 89, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 17}}, {"id": 92, "type": "=", "text": "=", "parent": 84, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 19}}, {"id": 93, "type": "identifier", "text": "x", "parent": 84, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 20}}, {"id": 94, "type": "return_statement", "text": "return TRUE;", "parent": 78, "children": [95], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 14}}, {"id": 95, "type": "true", "text": "TRUE", "parent": 94, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 13}}, {"id": 96, "type": "function_definition", "text": "int ST_pop(STACK *s,elem *x)\r\n{\r\n\tif (ST_empty(*s))\r\n\t\treturn FALSE;\r\n\telse\r\n\t{\r\n\t\t*x=s->array[s->top];\r\n\t\ts->top--;\r\n\t\treturn TRUE;\r\n\t}\r\n}", "parent": null, "children": [97, 98], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 97, "type": "primitive_type", "text": "int", "parent": 96, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 3}}, {"id": 98, "type": "function_declarator", "text": "ST_pop(STACK *s,elem *x)", "parent": 96, "children": [99, 100], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 28}}, {"id": 99, "type": "identifier", "text": "ST_pop", "parent": 98, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 10}}, {"id": 100, "type": "parameter_list", "text": "(STACK *s,elem *x)", "parent": 98, "children": [101, 106], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 28}}, {"id": 101, "type": "parameter_declaration", "text": "STACK *s", "parent": 100, "children": [102, 103], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 19}}, {"id": 102, "type": "type_identifier", "text": "STACK", "parent": 101, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 16}}, {"id": 103, "type": "pointer_declarator", "text": "*s", "parent": 101, "children": [104, 105], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 19}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 18}}, {"id": 105, "type": "identifier", "text": "s", "parent": 103, "children": [], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 19}}, {"id": 106, "type": "parameter_declaration", "text": "elem *x", "parent": 100, "children": [107, 108], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 27}}, {"id": 107, "type": "type_identifier", "text": "elem", "parent": 106, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 24}}, {"id": 108, "type": "pointer_declarator", "text": "*x", "parent": 106, "children": [109, 110], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 27}}, {"id": 109, "type": "*", "text": "*", "parent": 108, "children": [], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 26}}, {"id": 110, "type": "identifier", "text": "x", "parent": 108, "children": [], "start_point": {"row": 45, "column": 26}, "end_point": {"row": 45, "column": 27}}, {"id": 111, "type": "if_statement", "text": "if (ST_empty(*s))\r\n\t\treturn FALSE;\r\n\telse\r\n\t{\r\n\t\t*x=s->array[s->top];\r\n\t\ts->top--;\r\n\t\treturn TRUE;\r\n\t}", "parent": 96, "children": [112, 119, 121], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 54, "column": 2}}, {"id": 112, "type": "parenthesized_expression", "text": "(ST_empty(*s))", "parent": 111, "children": [113], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 18}}, {"id": 113, "type": "call_expression", "text": "ST_empty(*s)", "parent": 112, "children": [114, 115], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 17}}, {"id": 114, "type": "identifier", "text": "ST_empty", "parent": 113, "children": [], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 13}}, {"id": 115, "type": "argument_list", "text": "(*s)", "parent": 113, "children": [116], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 17}}, {"id": 116, "type": "pointer_expression", "text": "*s", "parent": 115, "children": [117, 118], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 16}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 15}}, {"id": 118, "type": "identifier", "text": "s", "parent": 116, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 16}}, {"id": 119, "type": "return_statement", "text": "return FALSE;", "parent": 111, "children": [120], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 15}}, {"id": 120, "type": "false", "text": "FALSE", "parent": 119, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 14}}, {"id": 121, "type": "else_clause", "text": "else\r\n\t{\r\n\t\t*x=s->array[s->top];\r\n\t\ts->top--;\r\n\t\treturn TRUE;\r\n\t}", "parent": 111, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 54, "column": 2}}, {"id": 122, "type": "assignment_expression", "text": "*x=s->array[s->top]", "parent": 121, "children": [123, 126, 127], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 21}}, {"id": 123, "type": "pointer_expression", "text": "*x", "parent": 122, "children": [124, 125], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 4}}, {"id": 124, "type": "*", "text": "*", "parent": 123, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 3}}, {"id": 125, "type": "identifier", "text": "x", "parent": 123, "children": [], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 4}}, {"id": 126, "type": "=", "text": "=", "parent": 122, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 5}}, {"id": 127, "type": "subscript_expression", "text": "s->array[s->top]", "parent": 122, "children": [128, 131], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 21}}, {"id": 128, "type": "field_expression", "text": "s->array", "parent": 127, "children": [129, 130], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 13}}, {"id": 129, "type": "identifier", "text": "s", "parent": 128, "children": [], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 6}}, {"id": 130, "type": "field_identifier", "text": "array", "parent": 128, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 13}}, {"id": 131, "type": "field_expression", "text": "s->top", "parent": 127, "children": [132, 133], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 20}}, {"id": 132, "type": "identifier", "text": "s", "parent": 131, "children": [], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 15}}, {"id": 133, "type": "field_identifier", "text": "top", "parent": 131, "children": [], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 20}}, {"id": 134, "type": "update_expression", "text": "s->top--", "parent": 121, "children": [135, 138], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 10}}, {"id": 135, "type": "field_expression", "text": "s->top", "parent": 134, "children": [136, 137], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 8}}, {"id": 136, "type": "identifier", "text": "s", "parent": 135, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 3}}, {"id": 137, "type": "field_identifier", "text": "top", "parent": 135, "children": [], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 8}}, {"id": 138, "type": "--", "text": "--", "parent": 134, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 10}}, {"id": 139, "type": "return_statement", "text": "return TRUE;", "parent": 121, "children": [140], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 14}}, {"id": 140, "type": "true", "text": "TRUE", "parent": 139, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 13}}]}, "node_categories": {"declarations": {"functions": [3, 5, 22, 24, 37, 39, 55, 57, 96, 98], "variables": [8, 27, 42, 60, 65, 101, 106], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [14, 15, 16, 31, 32, 46, 47, 51, 69, 70, 73, 79, 80, 85, 86, 89, 112, 113, 116, 123, 127, 128, 131, 134, 135], "assignments": [13, 84, 122], "loops": [], "conditionals": [6, 9, 12, 18, 19, 25, 28, 29, 33, 34, 40, 43, 44, 48, 49, 52, 58, 61, 64, 66, 67, 68, 71, 75, 81, 82, 87, 88, 90, 91, 93, 99, 102, 105, 107, 110, 111, 114, 118, 125, 129, 130, 132, 133, 136, 137], "returns": [30, 45, 76, 94, 119, 139], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 21, 36, 54], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "ST_init", "text_snippet": "void ST_init(STACK *s)\r\n{\r\n\t//s->top=-1;\r\n\t(*s).top=-1;\r\n}"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "ST_init(STACK *s)"}, {"node_id": 22, "universal_type": "function", "name": "ST_empty", "text_snippet": "int ST_empty(STACK s)\r\n{\r\n\treturn s.top==-1;\r\n}"}, {"node_id": 24, "universal_type": "function", "name": "unknown", "text_snippet": "ST_empty(STACK s)"}, {"node_id": 37, "universal_type": "function", "name": "ST_full", "text_snippet": "int ST_full(STACK s)\r\n{\r\n\treturn s.top==STACK_SIZE-1;\r\n}"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "ST_full(STACK s)"}, {"node_id": 55, "universal_type": "function", "name": "ST_push", "text_snippet": "int ST_push(STACK *s,elem x)\r\n{\r\n\tif (ST_full(*s))\r\n\t\treturn FALSE;\r\n\telse\r\n\t{\r\n\t\ts->top++;\r\n\t\ts->ar"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "ST_push(STACK *s,elem x)"}, {"node_id": 96, "universal_type": "function", "name": "ST_pop", "text_snippet": "int ST_pop(STACK *s,elem *x)\r\n{\r\n\tif (ST_empty(*s))\r\n\t\treturn FALSE;\r\n\telse\r\n\t{\r\n\t\t*x=s->array[s->to"}, {"node_id": 98, "universal_type": "function", "name": "unknown", "text_snippet": "ST_pop(STACK *s,elem *x)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"stack.h\"\r\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/* stack.c: Kwdikas tis vivliothikis stoivas */\r\n#include \"stack.h\"\r\n\r\n\r\n\r\n/* ST_init(): arxikopoiei ti lista */\r\nvoid ST_init(STACK *s)\r\n{\r\n\t//s->top=-1;\r\n\t(*s).top=-1;\r\n}\r\n\r\n/* ST_empty(): epistrefei TRUE/FALSE\r\n * analoga me to an i stoiva einai adeia */\r\nint ST_empty(STACK s)\r\n{\r\n\treturn s.top==-1;\r\n}\r\n\r\n/* ST_full(): epistrefei TRUE/FALSE\r\n * analoga me to an i stoiva einai gemati */\r\nint ST_full(STACK s)\r\n{\r\n\treturn s.top==STACK_SIZE-1;\r\n}\r\n\r\n/* ST_push(): Eisagei to x sti stoiva s\r\n *\tepistrefei TRUE: se periptwsi epitixias\r\n *\t\t FALSE: se periptwsi apotixias */\r\nint ST_push(STACK *s,elem x)\r\n{\r\n\tif (ST_full(*s))\r\n\t\treturn FALSE;\r\n\telse\r\n\t{\r\n\t\ts->top++;\r\n\t\ts->array[s->top]=x;\r\n\t\treturn TRUE;\r\n\t}\r\n}\r\n\r\n\r\n/* ST_pop(): Kanei eksagwgi poy einai stin korifi tis listas\r\n *\tepistrefei TRUE: se periptwsi epitixias\r\n *\t\t FALSE: se periptwsi apotixias */\r\nint ST_pop(STACK *s,elem *x)\r\n{\r\n\tif (ST_empty(*s))\r\n\t\treturn FALSE;\r\n\telse\r\n\t{\r\n\t\t*x=s->array[s->top];\r\n\t\ts->top--;\r\n\t\treturn TRUE;\r\n\t}\r\n}\r\n"}
397
c
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=8 sts=4 et sw=4 tw=99: * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef gc_GC_inl_h #define gc_GC_inl_h #include "gc/GC.h" #include "mozilla/DebugOnly.h" #include "mozilla/Maybe.h" #include "gc/Zone.h" #include "gc/ArenaList-inl.h" namespace js { namespace gc { class AutoAssertEmptyNursery; class ArenaIter { Arena* arena; Arena* unsweptArena; Arena* sweptArena; mozilla::DebugOnly<bool> initialized; public: ArenaIter() : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {} ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); } void init(JS::Zone* zone, AllocKind kind) { MOZ_ASSERT(!initialized); MOZ_ASSERT(zone); initialized = true; arena = zone->arenas.getFirstArena(kind); unsweptArena = zone->arenas.getFirstArenaToSweep(kind); sweptArena = zone->arenas.getFirstSweptArena(kind); if (!unsweptArena) { unsweptArena = sweptArena; sweptArena = nullptr; } if (!arena) { arena = unsweptArena; unsweptArena = sweptArena; sweptArena = nullptr; } } bool done() const { MOZ_ASSERT(initialized); return !arena; } Arena* get() const { MOZ_ASSERT(!done()); return arena; } void next() { MOZ_ASSERT(!done()); arena = arena->next; if (!arena) { arena = unsweptArena; unsweptArena = sweptArena; sweptArena = nullptr; } } }; enum CellIterNeedsBarrier : uint8_t { CellIterDoesntNeedBarrier = 0, CellIterMayNeedBarrier = 1 }; class ArenaCellIterImpl { size_t firstThingOffset; size_t thingSize; Arena* arenaAddr; FreeSpan span; uint_fast16_t thing; JS::TraceKind traceKind; bool needsBarrier; mozilla::DebugOnly<bool> initialized; // Upon entry, |thing| points to any thing (free or used) and finds the // first used thing, which may be |thing|. void moveForwardIfFree() { MOZ_ASSERT(!done()); MOZ_ASSERT(thing); // Note: if |span| is empty, this test will fail, which is what we want // -- |span| being empty means that we're past the end of the last free // thing, all the remaining things in the arena are used, and we'll // never need to move forward. if (thing == span.first) { thing = span.last + thingSize; span = *span.nextSpan(arenaAddr); } } public: ArenaCellIterImpl() : firstThingOffset(0), thingSize(0), arenaAddr(nullptr), thing(0), traceKind(JS::TraceKind::Null), needsBarrier(false), initialized(false) {} explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) : initialized(false) { init(arena, mayNeedBarrier); } void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) { MOZ_ASSERT(!initialized); MOZ_ASSERT(arena); initialized = true; AllocKind kind = arena->getAllocKind(); firstThingOffset = Arena::firstThingOffset(kind); thingSize = Arena::thingSize(kind); traceKind = MapAllocToTraceKind(kind); needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting(); reset(arena); } // Use this to move from an Arena of a particular kind to another Arena of // the same kind. void reset(Arena* arena) { MOZ_ASSERT(initialized); MOZ_ASSERT(arena); arenaAddr = arena; span = *arena->getFirstFreeSpan(); thing = firstThingOffset; moveForwardIfFree(); } bool done() const { MOZ_ASSERT(initialized); MOZ_ASSERT(thing <= ArenaSize); return thing == ArenaSize; } TenuredCell* getCell() const { MOZ_ASSERT(!done()); TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing); // This can result in a a new reference being created to an object that // an ongoing incremental GC may find to be unreachable, so we may need // a barrier here. if (needsBarrier) { ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind)); } return cell; } template<typename T> T* get() const { MOZ_ASSERT(!done()); MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind); return reinterpret_cast<T*>(getCell()); } void next() { MOZ_ASSERT(!done()); thing += thingSize; if (thing < ArenaSize) { moveForwardIfFree(); } } }; template<> JSObject* ArenaCellIterImpl::get<JSObject>() const; class ArenaCellIter : public ArenaCellIterImpl { public: explicit ArenaCellIter(Arena* arena) : ArenaCellIterImpl(arena, CellIterMayNeedBarrier) { MOZ_ASSERT(JS::RuntimeHeapIsTracing()); } }; template <typename T> class ZoneCellIter; template <> class ZoneCellIter<TenuredCell> { ArenaIter arenaIter; ArenaCellIterImpl cellIter; mozilla::Maybe<JS::AutoAssertNoGC> nogc; protected: // For use when a subclass wants to insert some setup before init(). ZoneCellIter() {} void init(JS::Zone* zone, AllocKind kind) { MOZ_ASSERT_IF(IsNurseryAllocable(kind), (zone->isAtomsZone() || zone->runtimeFromMainThread()->gc.nursery().isEmpty())); initForTenuredIteration(zone, kind); } void initForTenuredIteration(JS::Zone* zone, AllocKind kind) { JSRuntime* rt = zone->runtimeFromAnyThread(); // If called from outside a GC, ensure that the heap is in a state // that allows us to iterate. if (!JS::RuntimeHeapIsBusy()) { // Assert that no GCs can occur while a ZoneCellIter is live. nogc.emplace(); } // We have a single-threaded runtime, so there's no need to protect // against other threads iterating or allocating. However, we do have // background finalization; we may have to wait for this to finish if // it's currently active. if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) { rt->gc.waitBackgroundSweepEnd(); } arenaIter.init(zone, kind); if (!arenaIter.done()) { cellIter.init(arenaIter.get(), CellIterMayNeedBarrier); settle(); } } public: ZoneCellIter(JS::Zone* zone, AllocKind kind) { // If we are iterating a nursery-allocated kind then we need to // evict first so that we can see all things. if (IsNurseryAllocable(kind)) { zone->runtimeFromMainThread()->gc.evictNursery(); } init(zone, kind); } ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery&) { // No need to evict the nursery. (This constructor is known statically // to not GC.) init(zone, kind); } bool done() const { return arenaIter.done(); } template<typename T> T* get() const { MOZ_ASSERT(!done()); return cellIter.get<T>(); } TenuredCell* getCell() const { MOZ_ASSERT(!done()); return cellIter.getCell(); } void settle() { while (cellIter.done() && !arenaIter.done()) { arenaIter.next(); if (!arenaIter.done()) { cellIter.reset(arenaIter.get()); } } } void next() { MOZ_ASSERT(!done()); cellIter.next(); settle(); } }; // Iterator over the cells in a Zone, where the GC type (JSString, JSObject) is // known, for a single AllocKind. Example usages: // // for (auto obj = zone->cellIter<JSObject>(AllocKind::OBJECT0); !obj.done(); obj.next()) { // ... // } // // for (auto script = zone->cellIter<JSScript>(); !script.done(); script.next()) { // f(script->code()); // } // // As this code demonstrates, you can use 'script' as if it were a JSScript*. // Its actual type is ZoneCellIter<JSScript>, but for most purposes it will // autoconvert to JSScript*. // // Note that in the JSScript case, ZoneCellIter is able to infer the AllocKind // from the type 'JSScript', whereas in the JSObject case, the kind must be // given (because there are multiple AllocKinds for objects). // // Also, the static rooting hazard analysis knows that the JSScript case will // not GC during construction. The JSObject case needs to GC, or more precisely // to empty the nursery and clear out the store buffer, so that it can see all // objects to iterate over (the nursery is not iterable) and remove the // possibility of having pointers from the store buffer to data hanging off // stuff we're iterating over that we are going to delete. (The latter should // not be a problem, since such instances should be using RelocatablePtr do // remove themselves from the store buffer on deletion, but currently for // subtle reasons that isn't good enough.) // // If the iterator is used within a GC, then there is no need to evict the // nursery (again). You may select a variant that will skip the eviction either // by specializing on a GCType that is never allocated in the nursery, or // explicitly by passing in a trailing AutoAssertEmptyNursery argument. // template <typename GCType> class ZoneCellIter : public ZoneCellIter<TenuredCell> { public: // Non-nursery allocated (equivalent to having an entry in // MapTypeToFinalizeKind). The template declaration here is to discard this // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not // exist. Note that there will be no remaining overloads that will work, // which makes sense given that you haven't specified which of the // AllocKinds to use for GCType. // // If we later add a nursery allocable GCType with a single AllocKind, we // will want to add an overload of this constructor that does the right // thing (ie, it empties the nursery before iterating.) explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() { init(zone, MapTypeToFinalizeKind<GCType>::kind); } // Non-nursery allocated, nursery is known to be empty: same behavior as above. ZoneCellIter(JS::Zone* zone, const js::gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) { } // Arbitrary kind, which will be assumed to be nursery allocable (and // therefore the nursery will be emptied before iterating.) ZoneCellIter(JS::Zone* zone, AllocKind kind) : ZoneCellIter<TenuredCell>(zone, kind) { } // Arbitrary kind, which will be assumed to be nursery allocable, but the // nursery is known to be empty already: same behavior as non-nursery types. ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery& empty) : ZoneCellIter<TenuredCell>(zone, kind, empty) { } GCType* get() const { return ZoneCellIter<TenuredCell>::get<GCType>(); } operator GCType*() const { return get(); } GCType* operator ->() const { return get(); } }; } /* namespace gc */ } /* namespace js */ #endif /* gc_GC_inl_h */
35.78
313
(translation_unit) "/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-\n* vim: set ts=8 sts=4 et sw=4 tw=99:\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n#ifndef gc_GC_inl_h\n#define gc_GC_inl_h\n\n#include "gc/GC.h"\n\n#include "mozilla/DebugOnly.h"\n#include "mozilla/Maybe.h"\n\n#include "gc/Zone.h"\n\n#include "gc/ArenaList-inl.h"\n\nnamespace js {\nnamespace gc {\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }\n\n void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n};\n\nenum CellIterNeedsBarrier : uint8_t\n{\n CellIterDoesntNeedBarrier = 0,\n CellIterMayNeedBarrier = 1\n};\n\nclass ArenaCellIterImpl\n{\n size_t firstThingOffset;\n size_t thingSize;\n Arena* arenaAddr;\n FreeSpan span;\n uint_fast16_t thing;\n JS::TraceKind traceKind;\n bool needsBarrier;\n mozilla::DebugOnly<bool> initialized;\n\n // Upon entry, |thing| points to any thing (free or used) and finds the\n // first used thing, which may be |thing|.\n void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }\n\n public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}\n\n explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }\n\n void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }\n\n // Use this to move from an Arena of a particular kind to another Arena of\n // the same kind.\n void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }\n\n template<typename T> T* get() const {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);\n return reinterpret_cast<T*>(getCell());\n }\n\n void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }\n};\n\ntemplate<>\nJSObject*\nArenaCellIterImpl::get<JSObject>() const;\n\nclass ArenaCellIter : public ArenaCellIterImpl\n{\n public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }\n};\n\ntemplate <typename T>\nclass ZoneCellIter;\n\ntemplate <>\nclass ZoneCellIter<TenuredCell> {\n ArenaIter arenaIter;\n ArenaCellIterImpl cellIter;\n mozilla::Maybe<JS::AutoAssertNoGC> nogc;\n\n protected:\n // For use when a subclass wants to insert some setup before init().\n ZoneCellIter() {}\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));\n initForTenuredIteration(zone, kind);\n }\n\n void initForTenuredIteration(JS::Zone* zone, AllocKind kind) {\n JSRuntime* rt = zone->runtimeFromAnyThread();\n\n // If called from outside a GC, ensure that the heap is in a state\n // that allows us to iterate.\n if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }\n\n // We have a single-threaded runtime, so there's no need to protect\n // against other threads iterating or allocating. However, we do have\n // background finalization; we may have to wait for this to finish if\n // it's currently active.\n if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }\n arenaIter.init(zone, kind);\n if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }\n }\n\n public:\n ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }\n\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }\n\n bool done() const {\n return arenaIter.done();\n }\n\n template<typename T>\n T* get() const {\n MOZ_ASSERT(!done());\n return cellIter.get<T>();\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }\n\n void settle() {\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }\n }\n\n void next() {\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }\n};\n\n// Iterator over the cells in a Zone, where the GC type (JSString, JSObject) is\n// known, for a single AllocKind. Example usages:\n//\n// for (auto obj = zone->cellIter<JSObject>(AllocKind::OBJECT0); !obj.done(); obj.next()) {\n// ...\n// }\n//\n// for (auto script = zone->cellIter<JSScript>(); !script.done(); script.next()) {\n// f(script->code());\n// }\n//\n// As this code demonstrates, you can use 'script' as if it were a JSScript*.\n// Its actual type is ZoneCellIter<JSScript>, but for most purposes it will\n// autoconvert to JSScript*.\n//\n// Note that in the JSScript case, ZoneCellIter is able to infer the AllocKind\n// from the type 'JSScript', whereas in the JSObject case, the kind must be\n// given (because there are multiple AllocKinds for objects).\n//\n// Also, the static rooting hazard analysis knows that the JSScript case will\n// not GC during construction. The JSObject case needs to GC, or more precisely\n// to empty the nursery and clear out the store buffer, so that it can see all\n// objects to iterate over (the nursery is not iterable) and remove the\n// possibility of having pointers from the store buffer to data hanging off\n// stuff we're iterating over that we are going to delete. (The latter should\n// not be a problem, since such instances should be using RelocatablePtr do\n// remove themselves from the store buffer on deletion, but currently for\n// subtle reasons that isn't good enough.)\n//\n// If the iterator is used within a GC, then there is no need to evict the\n// nursery (again). You may select a variant that will skip the eviction either\n// by specializing on a GCType that is never allocated in the nursery, or\n// explicitly by passing in a trailing AutoAssertEmptyNursery argument.\n//\ntemplate <typename GCType>\nclass ZoneCellIter : public ZoneCellIter<TenuredCell> {\n public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);\n }\n\n // Non-nursery allocated, nursery is known to be empty: same behavior as above.\n ZoneCellIter(JS::Zone* zone, const js::gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable (and\n // therefore the nursery will be emptied before iterating.)\n ZoneCellIter(JS::Zone* zone, AllocKind kind) : ZoneCellIter<TenuredCell>(zone, kind) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable, but the\n // nursery is known to be empty already: same behavior as non-nursery types.\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery& empty)\n : ZoneCellIter<TenuredCell>(zone, kind, empty)\n {\n }\n\n GCType* get() const { return ZoneCellIter<TenuredCell>::get<GCType>(); }\n operator GCType*() const { return get(); }\n GCType* operator ->() const { return get(); }\n};\n\n} /* namespace gc */\n} /* namespace js */\n\n#endif /* gc_GC_inl_h */\n" (comment) "/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-\n* vim: set ts=8 sts=4 et sw=4 tw=99:\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */" (preproc_ifdef) "#ifndef gc_GC_inl_h\n#define gc_GC_inl_h\n\n#include "gc/GC.h"\n\n#include "mozilla/DebugOnly.h"\n#include "mozilla/Maybe.h"\n\n#include "gc/Zone.h"\n\n#include "gc/ArenaList-inl.h"\n\nnamespace js {\nnamespace gc {\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }\n\n void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n};\n\nenum CellIterNeedsBarrier : uint8_t\n{\n CellIterDoesntNeedBarrier = 0,\n CellIterMayNeedBarrier = 1\n};\n\nclass ArenaCellIterImpl\n{\n size_t firstThingOffset;\n size_t thingSize;\n Arena* arenaAddr;\n FreeSpan span;\n uint_fast16_t thing;\n JS::TraceKind traceKind;\n bool needsBarrier;\n mozilla::DebugOnly<bool> initialized;\n\n // Upon entry, |thing| points to any thing (free or used) and finds the\n // first used thing, which may be |thing|.\n void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }\n\n public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}\n\n explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }\n\n void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }\n\n // Use this to move from an Arena of a particular kind to another Arena of\n // the same kind.\n void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }\n\n template<typename T> T* get() const {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);\n return reinterpret_cast<T*>(getCell());\n }\n\n void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }\n};\n\ntemplate<>\nJSObject*\nArenaCellIterImpl::get<JSObject>() const;\n\nclass ArenaCellIter : public ArenaCellIterImpl\n{\n public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }\n};\n\ntemplate <typename T>\nclass ZoneCellIter;\n\ntemplate <>\nclass ZoneCellIter<TenuredCell> {\n ArenaIter arenaIter;\n ArenaCellIterImpl cellIter;\n mozilla::Maybe<JS::AutoAssertNoGC> nogc;\n\n protected:\n // For use when a subclass wants to insert some setup before init().\n ZoneCellIter() {}\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));\n initForTenuredIteration(zone, kind);\n }\n\n void initForTenuredIteration(JS::Zone* zone, AllocKind kind) {\n JSRuntime* rt = zone->runtimeFromAnyThread();\n\n // If called from outside a GC, ensure that the heap is in a state\n // that allows us to iterate.\n if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }\n\n // We have a single-threaded runtime, so there's no need to protect\n // against other threads iterating or allocating. However, we do have\n // background finalization; we may have to wait for this to finish if\n // it's currently active.\n if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }\n arenaIter.init(zone, kind);\n if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }\n }\n\n public:\n ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }\n\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }\n\n bool done() const {\n return arenaIter.done();\n }\n\n template<typename T>\n T* get() const {\n MOZ_ASSERT(!done());\n return cellIter.get<T>();\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }\n\n void settle() {\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }\n }\n\n void next() {\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }\n};\n\n// Iterator over the cells in a Zone, where the GC type (JSString, JSObject) is\n// known, for a single AllocKind. Example usages:\n//\n// for (auto obj = zone->cellIter<JSObject>(AllocKind::OBJECT0); !obj.done(); obj.next()) {\n// ...\n// }\n//\n// for (auto script = zone->cellIter<JSScript>(); !script.done(); script.next()) {\n// f(script->code());\n// }\n//\n// As this code demonstrates, you can use 'script' as if it were a JSScript*.\n// Its actual type is ZoneCellIter<JSScript>, but for most purposes it will\n// autoconvert to JSScript*.\n//\n// Note that in the JSScript case, ZoneCellIter is able to infer the AllocKind\n// from the type 'JSScript', whereas in the JSObject case, the kind must be\n// given (because there are multiple AllocKinds for objects).\n//\n// Also, the static rooting hazard analysis knows that the JSScript case will\n// not GC during construction. The JSObject case needs to GC, or more precisely\n// to empty the nursery and clear out the store buffer, so that it can see all\n// objects to iterate over (the nursery is not iterable) and remove the\n// possibility of having pointers from the store buffer to data hanging off\n// stuff we're iterating over that we are going to delete. (The latter should\n// not be a problem, since such instances should be using RelocatablePtr do\n// remove themselves from the store buffer on deletion, but currently for\n// subtle reasons that isn't good enough.)\n//\n// If the iterator is used within a GC, then there is no need to evict the\n// nursery (again). You may select a variant that will skip the eviction either\n// by specializing on a GCType that is never allocated in the nursery, or\n// explicitly by passing in a trailing AutoAssertEmptyNursery argument.\n//\ntemplate <typename GCType>\nclass ZoneCellIter : public ZoneCellIter<TenuredCell> {\n public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);\n }\n\n // Non-nursery allocated, nursery is known to be empty: same behavior as above.\n ZoneCellIter(JS::Zone* zone, const js::gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable (and\n // therefore the nursery will be emptied before iterating.)\n ZoneCellIter(JS::Zone* zone, AllocKind kind) : ZoneCellIter<TenuredCell>(zone, kind) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable, but the\n // nursery is known to be empty already: same behavior as non-nursery types.\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery& empty)\n : ZoneCellIter<TenuredCell>(zone, kind, empty)\n {\n }\n\n GCType* get() const { return ZoneCellIter<TenuredCell>::get<GCType>(); }\n operator GCType*() const { return get(); }\n GCType* operator ->() const { return get(); }\n};\n\n} /* namespace gc */\n} /* namespace js */\n\n#endif" (#ifndef) "#ifndef" (identifier) "gc_GC_inl_h" (preproc_def) "#define gc_GC_inl_h\n" (#define) "#define" (identifier) "gc_GC_inl_h" (preproc_include) "#include "gc/GC.h"\n" (#include) "#include" (string_literal) ""gc/GC.h"" (") """ (string_content) "gc/GC.h" (") """ (preproc_include) "#include "mozilla/DebugOnly.h"\n" (#include) "#include" (string_literal) ""mozilla/DebugOnly.h"" (") """ (string_content) "mozilla/DebugOnly.h" (") """ (preproc_include) "#include "mozilla/Maybe.h"\n" (#include) "#include" (string_literal) ""mozilla/Maybe.h"" (") """ (string_content) "mozilla/Maybe.h" (") """ (preproc_include) "#include "gc/Zone.h"\n" (#include) "#include" (string_literal) ""gc/Zone.h"" (") """ (string_content) "gc/Zone.h" (") """ (preproc_include) "#include "gc/ArenaList-inl.h"\n" (#include) "#include" (string_literal) ""gc/ArenaList-inl.h"" (") """ (string_content) "gc/ArenaList-inl.h" (") """ (function_definition) "namespace js {\nnamespace gc {\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }\n\n void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n};\n\nenum CellIterNeedsBarrier : uint8_t\n{\n CellIterDoesntNeedBarrier = 0,\n CellIterMayNeedBarrier = 1\n};\n\nclass ArenaCellIterImpl\n{\n size_t firstThingOffset;\n size_t thingSize;\n Arena* arenaAddr;\n FreeSpan span;\n uint_fast16_t thing;\n JS::TraceKind traceKind;\n bool needsBarrier;\n mozilla::DebugOnly<bool> initialized;\n\n // Upon entry, |thing| points to any thing (free or used) and finds the\n // first used thing, which may be |thing|.\n void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }\n\n public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}\n\n explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }\n\n void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }\n\n // Use this to move from an Arena of a particular kind to another Arena of\n // the same kind.\n void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }\n\n template<typename T> T* get() const {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);\n return reinterpret_cast<T*>(getCell());\n }\n\n void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }\n};\n\ntemplate<>\nJSObject*\nArenaCellIterImpl::get<JSObject>() const;\n\nclass ArenaCellIter : public ArenaCellIterImpl\n{\n public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }\n};\n\ntemplate <typename T>\nclass ZoneCellIter;\n\ntemplate <>\nclass ZoneCellIter<TenuredCell> {\n ArenaIter arenaIter;\n ArenaCellIterImpl cellIter;\n mozilla::Maybe<JS::AutoAssertNoGC> nogc;\n\n protected:\n // For use when a subclass wants to insert some setup before init().\n ZoneCellIter() {}\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));\n initForTenuredIteration(zone, kind);\n }\n\n void initForTenuredIteration(JS::Zone* zone, AllocKind kind) {\n JSRuntime* rt = zone->runtimeFromAnyThread();\n\n // If called from outside a GC, ensure that the heap is in a state\n // that allows us to iterate.\n if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }\n\n // We have a single-threaded runtime, so there's no need to protect\n // against other threads iterating or allocating. However, we do have\n // background finalization; we may have to wait for this to finish if\n // it's currently active.\n if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }\n arenaIter.init(zone, kind);\n if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }\n }\n\n public:\n ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }\n\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }\n\n bool done() const {\n return arenaIter.done();\n }\n\n template<typename T>\n T* get() const {\n MOZ_ASSERT(!done());\n return cellIter.get<T>();\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }\n\n void settle() {\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }\n }\n\n void next() {\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }\n};\n\n// Iterator over the cells in a Zone, where the GC type (JSString, JSObject) is\n// known, for a single AllocKind. Example usages:\n//\n// for (auto obj = zone->cellIter<JSObject>(AllocKind::OBJECT0); !obj.done(); obj.next()) {\n// ...\n// }\n//\n// for (auto script = zone->cellIter<JSScript>(); !script.done(); script.next()) {\n// f(script->code());\n// }\n//\n// As this code demonstrates, you can use 'script' as if it were a JSScript*.\n// Its actual type is ZoneCellIter<JSScript>, but for most purposes it will\n// autoconvert to JSScript*.\n//\n// Note that in the JSScript case, ZoneCellIter is able to infer the AllocKind\n// from the type 'JSScript', whereas in the JSObject case, the kind must be\n// given (because there are multiple AllocKinds for objects).\n//\n// Also, the static rooting hazard analysis knows that the JSScript case will\n// not GC during construction. The JSObject case needs to GC, or more precisely\n// to empty the nursery and clear out the store buffer, so that it can see all\n// objects to iterate over (the nursery is not iterable) and remove the\n// possibility of having pointers from the store buffer to data hanging off\n// stuff we're iterating over that we are going to delete. (The latter should\n// not be a problem, since such instances should be using RelocatablePtr do\n// remove themselves from the store buffer on deletion, but currently for\n// subtle reasons that isn't good enough.)\n//\n// If the iterator is used within a GC, then there is no need to evict the\n// nursery (again). You may select a variant that will skip the eviction either\n// by specializing on a GCType that is never allocated in the nursery, or\n// explicitly by passing in a trailing AutoAssertEmptyNursery argument.\n//\ntemplate <typename GCType>\nclass ZoneCellIter : public ZoneCellIter<TenuredCell> {\n public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);\n }\n\n // Non-nursery allocated, nursery is known to be empty: same behavior as above.\n ZoneCellIter(JS::Zone* zone, const js::gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable (and\n // therefore the nursery will be emptied before iterating.)\n ZoneCellIter(JS::Zone* zone, AllocKind kind) : ZoneCellIter<TenuredCell>(zone, kind) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable, but the\n // nursery is known to be empty already: same behavior as non-nursery types.\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery& empty)\n : ZoneCellIter<TenuredCell>(zone, kind, empty)\n {\n }\n\n GCType* get() const { return ZoneCellIter<TenuredCell>::get<GCType>(); }\n operator GCType*() const { return get(); }\n GCType* operator ->() const { return get(); }\n}" (type_identifier) "namespace" (identifier) "js" (compound_statement) "{\nnamespace gc {\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }\n\n void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n};\n\nenum CellIterNeedsBarrier : uint8_t\n{\n CellIterDoesntNeedBarrier = 0,\n CellIterMayNeedBarrier = 1\n};\n\nclass ArenaCellIterImpl\n{\n size_t firstThingOffset;\n size_t thingSize;\n Arena* arenaAddr;\n FreeSpan span;\n uint_fast16_t thing;\n JS::TraceKind traceKind;\n bool needsBarrier;\n mozilla::DebugOnly<bool> initialized;\n\n // Upon entry, |thing| points to any thing (free or used) and finds the\n // first used thing, which may be |thing|.\n void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }\n\n public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}\n\n explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }\n\n void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }\n\n // Use this to move from an Arena of a particular kind to another Arena of\n // the same kind.\n void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }\n\n template<typename T> T* get() const {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);\n return reinterpret_cast<T*>(getCell());\n }\n\n void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }\n};\n\ntemplate<>\nJSObject*\nArenaCellIterImpl::get<JSObject>() const;\n\nclass ArenaCellIter : public ArenaCellIterImpl\n{\n public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }\n};\n\ntemplate <typename T>\nclass ZoneCellIter;\n\ntemplate <>\nclass ZoneCellIter<TenuredCell> {\n ArenaIter arenaIter;\n ArenaCellIterImpl cellIter;\n mozilla::Maybe<JS::AutoAssertNoGC> nogc;\n\n protected:\n // For use when a subclass wants to insert some setup before init().\n ZoneCellIter() {}\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));\n initForTenuredIteration(zone, kind);\n }\n\n void initForTenuredIteration(JS::Zone* zone, AllocKind kind) {\n JSRuntime* rt = zone->runtimeFromAnyThread();\n\n // If called from outside a GC, ensure that the heap is in a state\n // that allows us to iterate.\n if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }\n\n // We have a single-threaded runtime, so there's no need to protect\n // against other threads iterating or allocating. However, we do have\n // background finalization; we may have to wait for this to finish if\n // it's currently active.\n if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }\n arenaIter.init(zone, kind);\n if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }\n }\n\n public:\n ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }\n\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }\n\n bool done() const {\n return arenaIter.done();\n }\n\n template<typename T>\n T* get() const {\n MOZ_ASSERT(!done());\n return cellIter.get<T>();\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }\n\n void settle() {\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }\n }\n\n void next() {\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }\n};\n\n// Iterator over the cells in a Zone, where the GC type (JSString, JSObject) is\n// known, for a single AllocKind. Example usages:\n//\n// for (auto obj = zone->cellIter<JSObject>(AllocKind::OBJECT0); !obj.done(); obj.next()) {\n// ...\n// }\n//\n// for (auto script = zone->cellIter<JSScript>(); !script.done(); script.next()) {\n// f(script->code());\n// }\n//\n// As this code demonstrates, you can use 'script' as if it were a JSScript*.\n// Its actual type is ZoneCellIter<JSScript>, but for most purposes it will\n// autoconvert to JSScript*.\n//\n// Note that in the JSScript case, ZoneCellIter is able to infer the AllocKind\n// from the type 'JSScript', whereas in the JSObject case, the kind must be\n// given (because there are multiple AllocKinds for objects).\n//\n// Also, the static rooting hazard analysis knows that the JSScript case will\n// not GC during construction. The JSObject case needs to GC, or more precisely\n// to empty the nursery and clear out the store buffer, so that it can see all\n// objects to iterate over (the nursery is not iterable) and remove the\n// possibility of having pointers from the store buffer to data hanging off\n// stuff we're iterating over that we are going to delete. (The latter should\n// not be a problem, since such instances should be using RelocatablePtr do\n// remove themselves from the store buffer on deletion, but currently for\n// subtle reasons that isn't good enough.)\n//\n// If the iterator is used within a GC, then there is no need to evict the\n// nursery (again). You may select a variant that will skip the eviction either\n// by specializing on a GCType that is never allocated in the nursery, or\n// explicitly by passing in a trailing AutoAssertEmptyNursery argument.\n//\ntemplate <typename GCType>\nclass ZoneCellIter : public ZoneCellIter<TenuredCell> {\n public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);\n }\n\n // Non-nursery allocated, nursery is known to be empty: same behavior as above.\n ZoneCellIter(JS::Zone* zone, const js::gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable (and\n // therefore the nursery will be emptied before iterating.)\n ZoneCellIter(JS::Zone* zone, AllocKind kind) : ZoneCellIter<TenuredCell>(zone, kind) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable, but the\n // nursery is known to be empty already: same behavior as non-nursery types.\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery& empty)\n : ZoneCellIter<TenuredCell>(zone, kind, empty)\n {\n }\n\n GCType* get() const { return ZoneCellIter<TenuredCell>::get<GCType>(); }\n operator GCType*() const { return get(); }\n GCType* operator ->() const { return get(); }\n}" ({) "{" (function_definition) "namespace gc {\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }\n\n void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n}" (type_identifier) "namespace" (identifier) "gc" (compound_statement) "{\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }\n\n void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n}" ({) "{" (declaration) "class AutoAssertEmptyNursery;" (type_identifier) "class" (identifier) "AutoAssertEmptyNursery" (;) ";" (function_definition) "class ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }" (type_identifier) "class" (identifier) "ArenaIter" (compound_statement) "{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }" ({) "{" (declaration) "Arena* arena;" (type_identifier) "Arena" (pointer_declarator) "* arena" (*) "*" (identifier) "arena" (;) ";" (declaration) "Arena* unsweptArena;" (type_identifier) "Arena" (pointer_declarator) "* unsweptArena" (*) "*" (identifier) "unsweptArena" (;) ";" (declaration) "Arena* sweptArena;" (type_identifier) "Arena" (pointer_declarator) "* sweptArena" (*) "*" (identifier) "sweptArena" (;) ";" (labeled_statement) "mozilla::DebugOnly<bool> initialized;" (statement_identifier) "mozilla" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "DebugOnly<bool> initialized;" (binary_expression) "DebugOnly<bool> initialized" (binary_expression) "DebugOnly<bool" (identifier) "DebugOnly" (<) "<" (identifier) "bool" (>) ">" (identifier) "initialized" (;) ";" (labeled_statement) "public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false)" (statement_identifier) "public" (ERROR) ":\n ArenaIter()" (:) ":" (call_expression) "ArenaIter()" (identifier) "ArenaIter" (argument_list) "()" (() "(" ()) ")" (:) ":" (expression_statement) "arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false)" (comma_expression) "arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false)" (call_expression) "arena(nullptr)" (identifier) "arena" (argument_list) "(nullptr)" (() "(" (null) "nullptr" (nullptr) "nullptr" ()) ")" (,) "," (comma_expression) "unsweptArena(nullptr), sweptArena(nullptr), initialized(false)" (call_expression) "unsweptArena(nullptr)" (identifier) "unsweptArena" (argument_list) "(nullptr)" (() "(" (null) "nullptr" (nullptr) "nullptr" ()) ")" (,) "," (comma_expression) "sweptArena(nullptr), initialized(false)" (call_expression) "sweptArena(nullptr)" (identifier) "sweptArena" (argument_list) "(nullptr)" (() "(" (null) "nullptr" (nullptr) "nullptr" ()) ")" (,) "," (call_expression) "initialized(false)" (identifier) "initialized" (argument_list) "(false)" (() "(" (false) "false" ()) ")" (;) "" (compound_statement) "{}" ({) "{" (}) "}" (labeled_statement) "ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind);" (statement_identifier) "ArenaIter" (ERROR) "(JS::Zone* zone, AllocKind kind)" (() "(" (type_descriptor) "JS" (type_identifier) "JS" (:) ":" (:) ":" (type_identifier) "Zone" (pointer_declarator) "* zone" (*) "*" (identifier) "zone" (,) "," (identifier) "AllocKind" (identifier) "kind" ()) ")" (:) ":" (declaration) "initialized(false) { init(zone, kind);" (macro_type_specifier) "initialized(false)" (identifier) "initialized" (() "(" (type_descriptor) "false" (type_identifier) "false" ()) ")" (ERROR) "{" ({) "{" (function_declarator) "init(zone, kind)" (identifier) "init" (parameter_list) "(zone, kind)" (() "(" (parameter_declaration) "zone" (type_identifier) "zone" (,) "," (parameter_declaration) "kind" (type_identifier) "kind" ()) ")" (;) ";" (}) "}" (function_definition) "void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }" (primitive_type) "void" (function_declarator) "init(JS::Zone* zone, AllocKind kind)" (identifier) "init" (parameter_list) "(JS::Zone* zone, AllocKind kind)" (() "(" (parameter_declaration) "JS::Zone* zone" (type_identifier) "JS" (ERROR) "::Zone" (:) ":" (:) ":" (identifier) "Zone" (pointer_declarator) "* zone" (*) "*" (identifier) "zone" (,) "," (parameter_declaration) "AllocKind kind" (type_identifier) "AllocKind" (identifier) "kind" ()) ")" (compound_statement) "{\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }" ({) "{" (expression_statement) "MOZ_ASSERT(!initialized);" (call_expression) "MOZ_ASSERT(!initialized)" (identifier) "MOZ_ASSERT" (argument_list) "(!initialized)" (() "(" (unary_expression) "!initialized" (!) "!" (identifier) "initialized" ()) ")" (;) ";" (expression_statement) "MOZ_ASSERT(zone);" (call_expression) "MOZ_ASSERT(zone)" (identifier) "MOZ_ASSERT" (argument_list) "(zone)" (() "(" (identifier) "zone" ()) ")" (;) ";" (expression_statement) "initialized = true;" (assignment_expression) "initialized = true" (identifier) "initialized" (=) "=" (true) "true" (;) ";" (expression_statement) "arena = zone->arenas.getFirstArena(kind);" (assignment_expression) "arena = zone->arenas.getFirstArena(kind)" (identifier) "arena" (=) "=" (call_expression) "zone->arenas.getFirstArena(kind)" (field_expression) "zone->arenas.getFirstArena" (field_expression) "zone->arenas" (identifier) "zone" (->) "->" (field_identifier) "arenas" (.) "." (field_identifier) "getFirstArena" (argument_list) "(kind)" (() "(" (identifier) "kind" ()) ")" (;) ";" (expression_statement) "unsweptArena = zone->arenas.getFirstArenaToSweep(kind);" (assignment_expression) "unsweptArena = zone->arenas.getFirstArenaToSweep(kind)" (identifier) "unsweptArena" (=) "=" (call_expression) "zone->arenas.getFirstArenaToSweep(kind)" (field_expression) "zone->arenas.getFirstArenaToSweep" (field_expression) "zone->arenas" (identifier) "zone" (->) "->" (field_identifier) "arenas" (.) "." (field_identifier) "getFirstArenaToSweep" (argument_list) "(kind)" (() "(" (identifier) "kind" ()) ")" (;) ";" (expression_statement) "sweptArena = zone->arenas.getFirstSweptArena(kind);" (assignment_expression) "sweptArena = zone->arenas.getFirstSweptArena(kind)" (identifier) "sweptArena" (=) "=" (call_expression) "zone->arenas.getFirstSweptArena(kind)" (field_expression) "zone->arenas.getFirstSweptArena" (field_expression) "zone->arenas" (identifier) "zone" (->) "->" (field_identifier) "arenas" (.) "." (field_identifier) "getFirstSweptArena" (argument_list) "(kind)" (() "(" (identifier) "kind" ()) ")" (;) ";" (if_statement) "if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }" (if) "if" (parenthesized_expression) "(!unsweptArena)" (() "(" (unary_expression) "!unsweptArena" (!) "!" (identifier) "unsweptArena" ()) ")" (compound_statement) "{\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }" ({) "{" (expression_statement) "unsweptArena = sweptArena;" (assignment_expression) "unsweptArena = sweptArena" (identifier) "unsweptArena" (=) "=" (identifier) "sweptArena" (;) ";" (expression_statement) "sweptArena = nullptr;" (assignment_expression) "sweptArena = nullptr" (identifier) "sweptArena" (=) "=" (null) "nullptr" (nullptr) "nullptr" (;) ";" (}) "}" (if_statement) "if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }" (if) "if" (parenthesized_expression) "(!arena)" (() "(" (unary_expression) "!arena" (!) "!" (identifier) "arena" ()) ")" (compound_statement) "{\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }" ({) "{" (expression_statement) "arena = unsweptArena;" (assignment_expression) "arena = unsweptArena" (identifier) "arena" (=) "=" (identifier) "unsweptArena" (;) ";" (expression_statement) "unsweptArena = sweptArena;" (assignment_expression) "unsweptArena = sweptArena" (identifier) "unsweptArena" (=) "=" (identifier) "sweptArena" (;) ";" (expression_statement) "sweptArena = nullptr;" (assignment_expression) "sweptArena = nullptr" (identifier) "sweptArena" (=) "=" (null) "nullptr" (nullptr) "nullptr" (;) ";" (}) "}" (}) "}" (function_definition) "bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }" (primitive_type) "bool" (function_declarator) "done()" (identifier) "done" (parameter_list) "()" (() "(" ()) ")" (declaration) "const {\n MOZ_ASSERT(initialized);" (type_qualifier) "const" (const) "const" (ERROR) "{" ({) "{" (type_identifier) "MOZ_ASSERT" (parenthesized_declarator) "(initialized)" (() "(" (identifier) "initialized" ()) ")" (;) ";" (declaration) "return !arena;" (type_identifier) "return" (ERROR) "!" (!) "!" (identifier) "arena" (;) ";" (ERROR) "}\n\n Arena* get() const" (}) "}" (type_identifier) "Arena" (pointer_declarator) "* get() const" (*) "*" (function_declarator) "get() const" (identifier) "get" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{\n MOZ_ASSERT(!done());\n return arena;\n }" ({) "{" (expression_statement) "MOZ_ASSERT(!done());" (call_expression) "MOZ_ASSERT(!done())" (identifier) "MOZ_ASSERT" (argument_list) "(!done())" (() "(" (unary_expression) "!done()" (!) "!" (call_expression) "done()" (identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (return_statement) "return arena;" (return) "return" (identifier) "arena" (;) ";" (}) "}" (function_definition) "void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }" (primitive_type) "void" (function_declarator) "next()" (identifier) "next" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }" ({) "{" (expression_statement) "MOZ_ASSERT(!done());" (call_expression) "MOZ_ASSERT(!done())" (identifier) "MOZ_ASSERT" (argument_list) "(!done())" (() "(" (unary_expression) "!done()" (!) "!" (call_expression) "done()" (identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (expression_statement) "arena = arena->next;" (assignment_expression) "arena = arena->next" (identifier) "arena" (=) "=" (field_expression) "arena->next" (identifier) "arena" (->) "->" (field_identifier) "next" (;) ";" (if_statement) "if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }" (if) "if" (parenthesized_expression) "(!arena)" (() "(" (unary_expression) "!arena" (!) "!" (identifier) "arena" ()) ")" (compound_statement) "{\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }" ({) "{" (expression_statement) "arena = unsweptArena;" (assignment_expression) "arena = unsweptArena" (identifier) "arena" (=) "=" (identifier) "unsweptArena" (;) ";" (expression_statement) "unsweptArena = sweptArena;" (assignment_expression) "unsweptArena = sweptArena" (identifier) "unsweptArena" (=) "=" (identifier) "sweptArena" (;) ";" (expression_statement) "sweptArena = nullptr;" (assignment_expression) "sweptArena = nullptr" (identifier) "sweptArena" (=) "=" (null) "nullptr" (nullptr) "nullptr" (;) ";" (}) "}" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (enum_specifier) "enum CellIterNeedsBarrier : uint8_t\n{\n CellIterDoesntNeedBarrier = 0,\n CellIterMayNeedBarrier = 1\n}" (enum) "enum" (type_identifier) "CellIterNeedsBarrier" (:) ":" (primitive_type) "uint8_t" (enumerator_list) "{\n CellIterDoesntNeedBarrier = 0,\n CellIterMayNeedBarrier = 1\n}" ({) "{" (enumerator) "CellIterDoesntNeedBarrier = 0" (identifier) "CellIterDoesntNeedBarrier" (=) "=" (number_literal) "0" (,) "," (enumerator) "CellIterMayNeedBarrier = 1" (identifier) "CellIterMayNeedBarrier" (=) "=" (number_literal) "1" (}) "}" (;) ";" (function_definition) "class ArenaCellIterImpl\n{\n size_t firstThingOffset;\n size_t thingSize;\n Arena* arenaAddr;\n FreeSpan span;\n uint_fast16_t thing;\n JS::TraceKind traceKind;\n bool needsBarrier;\n mozilla::DebugOnly<bool> initialized;\n\n // Upon entry, |thing| points to any thing (free or used) and finds the\n // first used thing, which may be |thing|.\n void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }\n\n public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}\n\n explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }\n\n void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }\n\n // Use this to move from an Arena of a particular kind to another Arena of\n // the same kind.\n void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }\n\n template<typename T> T* get() const {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);\n return reinterpret_cast<T*>(getCell());\n }\n\n void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }\n}" (type_identifier) "class" (identifier) "ArenaCellIterImpl" (compound_statement) "{\n size_t firstThingOffset;\n size_t thingSize;\n Arena* arenaAddr;\n FreeSpan span;\n uint_fast16_t thing;\n JS::TraceKind traceKind;\n bool needsBarrier;\n mozilla::DebugOnly<bool> initialized;\n\n // Upon entry, |thing| points to any thing (free or used) and finds the\n // first used thing, which may be |thing|.\n void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }\n\n public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}\n\n explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }\n\n void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }\n\n // Use this to move from an Arena of a particular kind to another Arena of\n // the same kind.\n void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }\n\n template<typename T> T* get() const {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);\n return reinterpret_cast<T*>(getCell());\n }\n\n void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }\n}" ({) "{" (declaration) "size_t firstThingOffset;" (primitive_type) "size_t" (identifier) "firstThingOffset" (;) ";" (declaration) "size_t thingSize;" (primitive_type) "size_t" (identifier) "thingSize" (;) ";" (declaration) "Arena* arenaAddr;" (type_identifier) "Arena" (pointer_declarator) "* arenaAddr" (*) "*" (identifier) "arenaAddr" (;) ";" (declaration) "FreeSpan span;" (type_identifier) "FreeSpan" (identifier) "span" (;) ";" (declaration) "uint_fast16_t thing;" (type_identifier) "uint_fast16_t" (identifier) "thing" (;) ";" (labeled_statement) "JS::TraceKind traceKind;" (statement_identifier) "JS" (:) ":" (ERROR) ":" (:) ":" (declaration) "TraceKind traceKind;" (type_identifier) "TraceKind" (identifier) "traceKind" (;) ";" (declaration) "bool needsBarrier;" (primitive_type) "bool" (identifier) "needsBarrier" (;) ";" (labeled_statement) "mozilla::DebugOnly<bool> initialized;" (statement_identifier) "mozilla" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "DebugOnly<bool> initialized;" (binary_expression) "DebugOnly<bool> initialized" (binary_expression) "DebugOnly<bool" (identifier) "DebugOnly" (<) "<" (identifier) "bool" (>) ">" (identifier) "initialized" (;) ";" (comment) "// Upon entry, |thing| points to any thing (free or used) and finds the" (comment) "// first used thing, which may be |thing|." (function_definition) "void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }" (primitive_type) "void" (function_declarator) "moveForwardIfFree()" (identifier) "moveForwardIfFree" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }" ({) "{" (expression_statement) "MOZ_ASSERT(!done());" (call_expression) "MOZ_ASSERT(!done())" (identifier) "MOZ_ASSERT" (argument_list) "(!done())" (() "(" (unary_expression) "!done()" (!) "!" (call_expression) "done()" (identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (expression_statement) "MOZ_ASSERT(thing);" (call_expression) "MOZ_ASSERT(thing)" (identifier) "MOZ_ASSERT" (argument_list) "(thing)" (() "(" (identifier) "thing" ()) ")" (;) ";" (comment) "// Note: if |span| is empty, this test will fail, which is what we want" (comment) "// -- |span| being empty means that we're past the end of the last free" (comment) "// thing, all the remaining things in the arena are used, and we'll" (comment) "// never need to move forward." (if_statement) "if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }" (if) "if" (parenthesized_expression) "(thing == span.first)" (() "(" (binary_expression) "thing == span.first" (identifier) "thing" (==) "==" (field_expression) "span.first" (identifier) "span" (.) "." (field_identifier) "first" ()) ")" (compound_statement) "{\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }" ({) "{" (expression_statement) "thing = span.last + thingSize;" (assignment_expression) "thing = span.last + thingSize" (identifier) "thing" (=) "=" (binary_expression) "span.last + thingSize" (field_expression) "span.last" (identifier) "span" (.) "." (field_identifier) "last" (+) "+" (identifier) "thingSize" (;) ";" (expression_statement) "span = *span.nextSpan(arenaAddr);" (assignment_expression) "span = *span.nextSpan(arenaAddr)" (identifier) "span" (=) "=" (pointer_expression) "*span.nextSpan(arenaAddr)" (*) "*" (call_expression) "span.nextSpan(arenaAddr)" (field_expression) "span.nextSpan" (identifier) "span" (.) "." (field_identifier) "nextSpan" (argument_list) "(arenaAddr)" (() "(" (identifier) "arenaAddr" ()) ")" (;) ";" (}) "}" (}) "}" (labeled_statement) "public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}" (statement_identifier) "public" (ERROR) ":\n ArenaCellIterImpl()" (:) ":" (call_expression) "ArenaCellIterImpl()" (identifier) "ArenaCellIterImpl" (argument_list) "()" (() "(" ()) ")" (:) ":" (ERROR) "firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)" (call_expression) "firstThingOffset(0)" (identifier) "firstThingOffset" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (,) "," (call_expression) "thingSize(0)" (identifier) "thingSize" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (,) "," (comma_expression) "arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)" (call_expression) "arenaAddr(nullptr)" (identifier) "arenaAddr" (argument_list) "(nullptr)" (() "(" (null) "nullptr" (nullptr) "nullptr" ()) ")" (,) "," (comma_expression) "thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)" (call_expression) "thing(0)" (identifier) "thing" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (,) "," (comma_expression) "traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)" (call_expression) "traceKind(JS::TraceKind::Null)" (identifier) "traceKind" (argument_list) "(JS::TraceKind::Null)" (() "(" (ERROR) "JS::TraceKind::" (identifier) "JS" (:) ":" (:) ":" (identifier) "TraceKind" (:) ":" (:) ":" (identifier) "Null" ()) ")" (,) "," (comma_expression) "needsBarrier(false),\n initialized(false)" (call_expression) "needsBarrier(false)" (identifier) "needsBarrier" (argument_list) "(false)" (() "(" (false) "false" ()) ")" (,) "," (call_expression) "initialized(false)" (identifier) "initialized" (argument_list) "(false)" (() "(" (false) "false" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }" (type_identifier) "explicit" (function_declarator) "ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)" (identifier) "ArenaCellIterImpl" (parameter_list) "(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)" (() "(" (parameter_declaration) "Arena* arena" (type_identifier) "Arena" (pointer_declarator) "* arena" (*) "*" (identifier) "arena" (,) "," (parameter_declaration) "CellIterNeedsBarrier mayNeedBarrier" (type_identifier) "CellIterNeedsBarrier" (identifier) "mayNeedBarrier" ()) ")" (ERROR) ":" (:) ":" (call_expression) "initialized(false)" (identifier) "initialized" (argument_list) "(false)" (() "(" (identifier) "false" ()) ")" (compound_statement) "{\n init(arena, mayNeedBarrier);\n }" ({) "{" (expression_statement) "init(arena, mayNeedBarrier);" (call_expression) "init(arena, mayNeedBarrier)" (identifier) "init" (argument_list) "(arena, mayNeedBarrier)" (() "(" (identifier) "arena" (,) "," (identifier) "mayNeedBarrier" ()) ")" (;) ";" (}) "}" (function_definition) "void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }" (primitive_type) "void" (function_declarator) "init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)" (identifier) "init" (parameter_list) "(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)" (() "(" (parameter_declaration) "Arena* arena" (type_identifier) "Arena" (pointer_declarator) "* arena" (*) "*" (identifier) "arena" (,) "," (parameter_declaration) "CellIterNeedsBarrier mayNeedBarrier" (type_identifier) "CellIterNeedsBarrier" (identifier) "mayNeedBarrier" ()) ")" (compound_statement) "{\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }" ({) "{" (expression_statement) "MOZ_ASSERT(!initialized);" (call_expression) "MOZ_ASSERT(!initialized)" (identifier) "MOZ_ASSERT" (argument_list) "(!initialized)" (() "(" (unary_expression) "!initialized" (!) "!" (identifier) "initialized" ()) ")" (;) ";" (expression_statement) "MOZ_ASSERT(arena);" (call_expression) "MOZ_ASSERT(arena)" (identifier) "MOZ_ASSERT" (argument_list) "(arena)" (() "(" (identifier) "arena" ()) ")" (;) ";" (expression_statement) "initialized = true;" (assignment_expression) "initialized = true" (identifier) "initialized" (=) "=" (true) "true" (;) ";" (declaration) "AllocKind kind = arena->getAllocKind();" (type_identifier) "AllocKind" (init_declarator) "kind = arena->getAllocKind()" (identifier) "kind" (=) "=" (call_expression) "arena->getAllocKind()" (field_expression) "arena->getAllocKind" (identifier) "arena" (->) "->" (field_identifier) "getAllocKind" (argument_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "firstThingOffset = Arena::" (assignment_expression) "firstThingOffset = Arena" (identifier) "firstThingOffset" (=) "=" (identifier) "Arena" (:) ":" (:) ":" (expression_statement) "firstThingOffset(kind);" (call_expression) "firstThingOffset(kind)" (identifier) "firstThingOffset" (argument_list) "(kind)" (() "(" (identifier) "kind" ()) ")" (;) ";" (ERROR) "thingSize = Arena::" (assignment_expression) "thingSize = Arena" (identifier) "thingSize" (=) "=" (identifier) "Arena" (:) ":" (:) ":" (expression_statement) "thingSize(kind);" (call_expression) "thingSize(kind)" (identifier) "thingSize" (argument_list) "(kind)" (() "(" (identifier) "kind" ()) ")" (;) ";" (expression_statement) "traceKind = MapAllocToTraceKind(kind);" (assignment_expression) "traceKind = MapAllocToTraceKind(kind)" (identifier) "traceKind" (=) "=" (call_expression) "MapAllocToTraceKind(kind)" (identifier) "MapAllocToTraceKind" (argument_list) "(kind)" (() "(" (identifier) "kind" ()) ")" (;) ";" (ERROR) "needsBarrier = mayNeedBarrier && !JS::" (assignment_expression) "needsBarrier = mayNeedBarrier && !JS" (identifier) "needsBarrier" (=) "=" (binary_expression) "mayNeedBarrier && !JS" (identifier) "mayNeedBarrier" (&&) "&&" (unary_expression) "!JS" (!) "!" (identifier) "JS" (:) ":" (:) ":" (expression_statement) "RuntimeHeapIsCollecting();" (call_expression) "RuntimeHeapIsCollecting()" (identifier) "RuntimeHeapIsCollecting" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "reset(arena);" (call_expression) "reset(arena)" (identifier) "reset" (argument_list) "(arena)" (() "(" (identifier) "arena" ()) ")" (;) ";" (}) "}" (comment) "// Use this to move from an Arena of a particular kind to another Arena of" (comment) "// the same kind." (function_definition) "void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }" (primitive_type) "void" (function_declarator) "reset(Arena* arena)" (identifier) "reset" (parameter_list) "(Arena* arena)" (() "(" (parameter_declaration) "Arena* arena" (type_identifier) "Arena" (pointer_declarator) "* arena" (*) "*" (identifier) "arena" ()) ")" (compound_statement) "{\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }" ({) "{" (expression_statement) "MOZ_ASSERT(initialized);" (call_expression) "MOZ_ASSERT(initialized)" (identifier) "MOZ_ASSERT" (argument_list) "(initialized)" (() "(" (identifier) "initialized" ()) ")" (;) ";" (expression_statement) "MOZ_ASSERT(arena);" (call_expression) "MOZ_ASSERT(arena)" (identifier) "MOZ_ASSERT" (argument_list) "(arena)" (() "(" (identifier) "arena" ()) ")" (;) ";" (expression_statement) "arenaAddr = arena;" (assignment_expression) "arenaAddr = arena" (identifier) "arenaAddr" (=) "=" (identifier) "arena" (;) ";" (expression_statement) "span = *arena->getFirstFreeSpan();" (assignment_expression) "span = *arena->getFirstFreeSpan()" (identifier) "span" (=) "=" (pointer_expression) "*arena->getFirstFreeSpan()" (*) "*" (call_expression) "arena->getFirstFreeSpan()" (field_expression) "arena->getFirstFreeSpan" (identifier) "arena" (->) "->" (field_identifier) "getFirstFreeSpan" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "thing = firstThingOffset;" (assignment_expression) "thing = firstThingOffset" (identifier) "thing" (=) "=" (identifier) "firstThingOffset" (;) ";" (expression_statement) "moveForwardIfFree();" (call_expression) "moveForwardIfFree()" (identifier) "moveForwardIfFree" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }" (primitive_type) "bool" (function_declarator) "done()" (identifier) "done" (parameter_list) "()" (() "(" ()) ")" (declaration) "const {\n MOZ_ASSERT(initialized);" (type_qualifier) "const" (const) "const" (ERROR) "{" ({) "{" (type_identifier) "MOZ_ASSERT" (parenthesized_declarator) "(initialized)" (() "(" (identifier) "initialized" ()) ")" (;) ";" (declaration) "MOZ_ASSERT(thing <= ArenaSize);" (macro_type_specifier) "MOZ_ASSERT(thing <= ArenaSize)" (identifier) "MOZ_ASSERT" (() "(" (type_descriptor) "thing" (type_identifier) "thing" (ERROR) "<= ArenaSize" (<=) "<=" (identifier) "ArenaSize" ()) ")" (identifier) "" (;) ";" (declaration) "return thing == ArenaSize;" (type_identifier) "return" (ERROR) "thing ==" (identifier) "thing" (==) "==" (identifier) "ArenaSize" (;) ";" (ERROR) "}\n\n TenuredCell* getCell() const" (}) "}" (type_identifier) "TenuredCell" (pointer_declarator) "* getCell() const" (*) "*" (function_declarator) "getCell() const" (identifier) "getCell" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }" ({) "{" (expression_statement) "MOZ_ASSERT(!done());" (call_expression) "MOZ_ASSERT(!done())" (identifier) "MOZ_ASSERT" (argument_list) "(!done())" (() "(" (unary_expression) "!done()" (!) "!" (call_expression) "done()" (identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (declaration) "TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);" (type_identifier) "TenuredCell" (init_declarator) "* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing)" (pointer_declarator) "* cell" (*) "*" (identifier) "cell" (=) "=" (binary_expression) "reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing)" (binary_expression) "reinterpret_cast<TenuredCell" (identifier) "reinterpret_cast" (<) "<" (identifier) "TenuredCell" (ERROR) "*" (*) "*" (>) ">" (parenthesized_expression) "(uintptr_t(arenaAddr) + thing)" (() "(" (ERROR) "uintptr_t(arenaAddr)" (type_descriptor) "uintptr_t(arenaAddr)" (primitive_type) "uintptr_t" (abstract_function_declarator) "(arenaAddr)" (parameter_list) "(arenaAddr)" (() "(" (parameter_declaration) "arenaAddr" (type_identifier) "arenaAddr" ()) ")" (unary_expression) "+ thing" (+) "+" (identifier) "thing" ()) ")" (;) ";" (comment) "// This can result in a a new reference being created to an object that" (comment) "// an ongoing incremental GC may find to be unreachable, so we may need" (comment) "// a barrier here." (if_statement) "if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }" (if) "if" (parenthesized_expression) "(needsBarrier)" (() "(" (identifier) "needsBarrier" ()) ")" (compound_statement) "{\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }" ({) "{" (macro_type_specifier) "ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind))" (identifier) "ExposeGCThingToActiveJS" (() "(" (ERROR) "JS::" (type_descriptor) "JS" (type_identifier) "JS" (:) ":" (:) ":" (type_descriptor) "GCCellPtr(cell, traceKind)" (type_identifier) "GCCellPtr" (abstract_function_declarator) "(cell, traceKind)" (parameter_list) "(cell, traceKind)" (() "(" (parameter_declaration) "cell" (type_identifier) "cell" (,) "," (parameter_declaration) "traceKind" (type_identifier) "traceKind" ()) ")" ()) ")" (;) ";" (}) "}" (return_statement) "return cell;" (return) "return" (identifier) "cell" (;) ";" (}) "}" (ERROR) "template<typename T> T* get() const" (binary_expression) "template<typename T> T* get()" (binary_expression) "template<typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (binary_expression) "T* get()" (identifier) "T" (*) "*" (call_expression) "get()" (identifier) "get" (argument_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{\n MOZ_ASSERT(!done());\n MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);\n return reinterpret_cast<T*>(getCell());\n }" ({) "{" (expression_statement) "MOZ_ASSERT(!done());" (call_expression) "MOZ_ASSERT(!done())" (identifier) "MOZ_ASSERT" (argument_list) "(!done())" (() "(" (unary_expression) "!done()" (!) "!" (call_expression) "done()" (identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (labeled_statement) "MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);" (statement_identifier) "MOZ_ASSERT" (ERROR) "(JS::MapTypeToTraceKind<T>:" (() "(" (type_descriptor) "JS" (type_identifier) "JS" (:) ":" (:) ":" (binary_expression) "MapTypeToTraceKind<T" (identifier) "MapTypeToTraceKind" (<) "<" (identifier) "T" (>) ">" (:) ":" (:) ":" (expression_statement) "kind == traceKind);" (binary_expression) "kind == traceKind" (identifier) "kind" (==) "==" (identifier) "traceKind" (ERROR) ")" ()) ")" (;) ";" (return_statement) "return reinterpret_cast<T*>(getCell());" (return) "return" (binary_expression) "reinterpret_cast<T*>(getCell())" (binary_expression) "reinterpret_cast<T" (identifier) "reinterpret_cast" (<) "<" (identifier) "T" (ERROR) "*" (*) "*" (>) ">" (parenthesized_expression) "(getCell())" (() "(" (call_expression) "getCell()" (identifier) "getCell" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }" (primitive_type) "void" (function_declarator) "next()" (identifier) "next" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }" ({) "{" (expression_statement) "MOZ_ASSERT(!done());" (call_expression) "MOZ_ASSERT(!done())" (identifier) "MOZ_ASSERT" (argument_list) "(!done())" (() "(" (unary_expression) "!done()" (!) "!" (call_expression) "done()" (identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (expression_statement) "thing += thingSize;" (assignment_expression) "thing += thingSize" (identifier) "thing" (+=) "+=" (identifier) "thingSize" (;) ";" (if_statement) "if (thing < ArenaSize) {\n moveForwardIfFree();\n }" (if) "if" (parenthesized_expression) "(thing < ArenaSize)" (() "(" (binary_expression) "thing < ArenaSize" (identifier) "thing" (<) "<" (identifier) "ArenaSize" ()) ")" (compound_statement) "{\n moveForwardIfFree();\n }" ({) "{" (expression_statement) "moveForwardIfFree();" (call_expression) "moveForwardIfFree()" (identifier) "moveForwardIfFree" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (expression_statement) "template<>\nJSObject*\nArenaCellIterImpl::get<JSObject>() const;" (binary_expression) "template<>\nJSObject*\nArenaCellIterImpl::get<JSObject>() const" (binary_expression) "template<>\nJSObject*\nArenaCellIterImpl::get<JSObject" (binary_expression) "template<>\nJSObject*\nArenaCellIterImpl" (identifier) "template" (<) "<" (ERROR) ">" (>) ">" (binary_expression) "JSObject*\nArenaCellIterImpl" (identifier) "JSObject" (*) "*" (identifier) "ArenaCellIterImpl" (ERROR) "::get" (:) ":" (:) ":" (identifier) "get" (<) "<" (identifier) "JSObject" (>) ">" (cast_expression) "() const" (() "(" (type_descriptor) "" (type_identifier) "" ()) ")" (identifier) "const" (;) ";" (function_definition) "class ArenaCellIter : public ArenaCellIterImpl\n{\n public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }\n}" (type_identifier) "class" (ERROR) "ArenaCellIter : public" (identifier) "ArenaCellIter" (:) ":" (identifier) "public" (identifier) "ArenaCellIterImpl" (compound_statement) "{\n public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }\n}" ({) "{" (labeled_statement) "public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }" (statement_identifier) "public" (:) ":" (ERROR) "explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)" (type_identifier) "explicit" (function_declarator) "ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)" (identifier) "ArenaCellIter" (parameter_list) "(Arena* arena)" (() "(" (parameter_declaration) "Arena* arena" (type_identifier) "Arena" (pointer_declarator) "* arena" (*) "*" (identifier) "arena" ()) ")" (ERROR) ":" (:) ":" (call_expression) "ArenaCellIterImpl(arena, CellIterMayNeedBarrier)" (identifier) "ArenaCellIterImpl" (argument_list) "(arena, CellIterMayNeedBarrier)" (() "(" (identifier) "arena" (,) "," (identifier) "CellIterMayNeedBarrier" ()) ")" (compound_statement) "{\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }" ({) "{" (macro_type_specifier) "MOZ_ASSERT(JS::RuntimeHeapIsTracing())" (identifier) "MOZ_ASSERT" (() "(" (ERROR) "JS::" (type_descriptor) "JS" (type_identifier) "JS" (:) ":" (:) ":" (type_descriptor) "RuntimeHeapIsTracing()" (type_identifier) "RuntimeHeapIsTracing" (abstract_function_declarator) "()" (parameter_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (expression_statement) "template <typename T>\nclass ZoneCellIter;" (binary_expression) "template <typename T>\nclass ZoneCellIter" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "class" (identifier) "class" (identifier) "ZoneCellIter" (;) ";" (ERROR) "template <>\nclass ZoneCellIter<TenuredCell>" (binary_expression) "template <>\nclass ZoneCellIter<TenuredCell" (binary_expression) "template <>\nclass ZoneCellIter" (identifier) "template" (<) "<" (ERROR) ">\nclass" (>) ">" (identifier) "class" (identifier) "ZoneCellIter" (<) "<" (identifier) "TenuredCell" (>) ">" (compound_statement) "{\n ArenaIter arenaIter;\n ArenaCellIterImpl cellIter;\n mozilla::Maybe<JS::AutoAssertNoGC> nogc;\n\n protected:\n // For use when a subclass wants to insert some setup before init().\n ZoneCellIter() {}\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));\n initForTenuredIteration(zone, kind);\n }\n\n void initForTenuredIteration(JS::Zone* zone, AllocKind kind) {\n JSRuntime* rt = zone->runtimeFromAnyThread();\n\n // If called from outside a GC, ensure that the heap is in a state\n // that allows us to iterate.\n if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }\n\n // We have a single-threaded runtime, so there's no need to protect\n // against other threads iterating or allocating. However, we do have\n // background finalization; we may have to wait for this to finish if\n // it's currently active.\n if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }\n arenaIter.init(zone, kind);\n if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }\n }\n\n public:\n ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }\n\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }\n\n bool done() const {\n return arenaIter.done();\n }\n\n template<typename T>\n T* get() const {\n MOZ_ASSERT(!done());\n return cellIter.get<T>();\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }\n\n void settle() {\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }\n }\n\n void next() {\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }\n}" ({) "{" (declaration) "ArenaIter arenaIter;" (type_identifier) "ArenaIter" (identifier) "arenaIter" (;) ";" (declaration) "ArenaCellIterImpl cellIter;" (type_identifier) "ArenaCellIterImpl" (identifier) "cellIter" (;) ";" (labeled_statement) "mozilla::Maybe<JS::AutoAssertNoGC> nogc;" (statement_identifier) "mozilla" (ERROR) "::Maybe<JS:" (:) ":" (:) ":" (binary_expression) "Maybe<JS" (identifier) "Maybe" (<) "<" (identifier) "JS" (:) ":" (:) ":" (expression_statement) "AutoAssertNoGC> nogc;" (binary_expression) "AutoAssertNoGC> nogc" (identifier) "AutoAssertNoGC" (>) ">" (identifier) "nogc" (;) ";" (labeled_statement) "protected:\n // For use when a subclass wants to insert some setup before init().\n ZoneCellIter()" (statement_identifier) "protected" (:) ":" (comment) "// For use when a subclass wants to insert some setup before init()." (expression_statement) "ZoneCellIter()" (call_expression) "ZoneCellIter()" (identifier) "ZoneCellIter" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));\n initForTenuredIteration(zone, kind);\n }" (primitive_type) "void" (function_declarator) "init(JS::Zone* zone, AllocKind kind)" (identifier) "init" (parameter_list) "(JS::Zone* zone, AllocKind kind)" (() "(" (parameter_declaration) "JS::Zone* zone" (type_identifier) "JS" (ERROR) "::Zone" (:) ":" (:) ":" (identifier) "Zone" (pointer_declarator) "* zone" (*) "*" (identifier) "zone" (,) "," (parameter_declaration) "AllocKind kind" (type_identifier) "AllocKind" (identifier) "kind" ()) ")" (compound_statement) "{\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));\n initForTenuredIteration(zone, kind);\n }" ({) "{" (expression_statement) "MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));" (call_expression) "MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()))" (identifier) "MOZ_ASSERT_IF" (argument_list) "(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()))" (() "(" (call_expression) "IsNurseryAllocable(kind)" (identifier) "IsNurseryAllocable" (argument_list) "(kind)" (() "(" (identifier) "kind" ()) ")" (,) "," (parenthesized_expression) "(zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty())" (() "(" (binary_expression) "zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()" (call_expression) "zone->isAtomsZone()" (field_expression) "zone->isAtomsZone" (identifier) "zone" (->) "->" (field_identifier) "isAtomsZone" (argument_list) "()" (() "(" ()) ")" (||) "||" (call_expression) "zone->runtimeFromMainThread()->gc.nursery().isEmpty()" (field_expression) "zone->runtimeFromMainThread()->gc.nursery().isEmpty" (call_expression) "zone->runtimeFromMainThread()->gc.nursery()" (field_expression) "zone->runtimeFromMainThread()->gc.nursery" (field_expression) "zone->runtimeFromMainThread()->gc" (call_expression) "zone->runtimeFromMainThread()" (field_expression) "zone->runtimeFromMainThread" (identifier) "zone" (->) "->" (field_identifier) "runtimeFromMainThread" (argument_list) "()" (() "(" ()) ")" (->) "->" (field_identifier) "gc" (.) "." (field_identifier) "nursery" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "isEmpty" (argument_list) "()" (() "(" ()) ")" ()) ")" ()) ")" (;) ";" (expression_statement) "initForTenuredIteration(zone, kind);" (call_expression) "initForTenuredIteration(zone, kind)" (identifier) "initForTenuredIteration" (argument_list) "(zone, kind)" (() "(" (identifier) "zone" (,) "," (identifier) "kind" ()) ")" (;) ";" (}) "}" (function_definition) "void initForTenuredIteration(JS::Zone* zone, AllocKind kind) {\n JSRuntime* rt = zone->runtimeFromAnyThread();\n\n // If called from outside a GC, ensure that the heap is in a state\n // that allows us to iterate.\n if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }\n\n // We have a single-threaded runtime, so there's no need to protect\n // against other threads iterating or allocating. However, we do have\n // background finalization; we may have to wait for this to finish if\n // it's currently active.\n if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }\n arenaIter.init(zone, kind);\n if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }\n }" (primitive_type) "void" (function_declarator) "initForTenuredIteration(JS::Zone* zone, AllocKind kind)" (identifier) "initForTenuredIteration" (parameter_list) "(JS::Zone* zone, AllocKind kind)" (() "(" (parameter_declaration) "JS::Zone* zone" (type_identifier) "JS" (ERROR) "::Zone" (:) ":" (:) ":" (identifier) "Zone" (pointer_declarator) "* zone" (*) "*" (identifier) "zone" (,) "," (parameter_declaration) "AllocKind kind" (type_identifier) "AllocKind" (identifier) "kind" ()) ")" (compound_statement) "{\n JSRuntime* rt = zone->runtimeFromAnyThread();\n\n // If called from outside a GC, ensure that the heap is in a state\n // that allows us to iterate.\n if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }\n\n // We have a single-threaded runtime, so there's no need to protect\n // against other threads iterating or allocating. However, we do have\n // background finalization; we may have to wait for this to finish if\n // it's currently active.\n if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }\n arenaIter.init(zone, kind);\n if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }\n }" ({) "{" (declaration) "JSRuntime* rt = zone->runtimeFromAnyThread();" (type_identifier) "JSRuntime" (init_declarator) "* rt = zone->runtimeFromAnyThread()" (pointer_declarator) "* rt" (*) "*" (identifier) "rt" (=) "=" (call_expression) "zone->runtimeFromAnyThread()" (field_expression) "zone->runtimeFromAnyThread" (identifier) "zone" (->) "->" (field_identifier) "runtimeFromAnyThread" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "// If called from outside a GC, ensure that the heap is in a state" (comment) "// that allows us to iterate." (if_statement) "if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }" (if) "if" (parenthesized_expression) "(!JS::RuntimeHeapIsBusy())" (() "(" (ERROR) "!JS::" (unary_expression) "!JS" (!) "!" (identifier) "JS" (:) ":" (:) ":" (call_expression) "RuntimeHeapIsBusy()" (identifier) "RuntimeHeapIsBusy" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }" ({) "{" (comment) "// Assert that no GCs can occur while a ZoneCellIter is live." (expression_statement) "nogc.emplace();" (call_expression) "nogc.emplace()" (field_expression) "nogc.emplace" (identifier) "nogc" (.) "." (field_identifier) "emplace" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "// We have a single-threaded runtime, so there's no need to protect" (comment) "// against other threads iterating or allocating. However, we do have" (comment) "// background finalization; we may have to wait for this to finish if" (comment) "// it's currently active." (if_statement) "if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }" (if) "if" (parenthesized_expression) "(IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind))" (() "(" (binary_expression) "IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)" (call_expression) "IsBackgroundFinalized(kind)" (identifier) "IsBackgroundFinalized" (argument_list) "(kind)" (() "(" (identifier) "kind" ()) ")" (&&) "&&" (call_expression) "zone->arenas.needBackgroundFinalizeWait(kind)" (field_expression) "zone->arenas.needBackgroundFinalizeWait" (field_expression) "zone->arenas" (identifier) "zone" (->) "->" (field_identifier) "arenas" (.) "." (field_identifier) "needBackgroundFinalizeWait" (argument_list) "(kind)" (() "(" (identifier) "kind" ()) ")" ()) ")" (compound_statement) "{\n rt->gc.waitBackgroundSweepEnd();\n }" ({) "{" (expression_statement) "rt->gc.waitBackgroundSweepEnd();" (call_expression) "rt->gc.waitBackgroundSweepEnd()" (field_expression) "rt->gc.waitBackgroundSweepEnd" (field_expression) "rt->gc" (identifier) "rt" (->) "->" (field_identifier) "gc" (.) "." (field_identifier) "waitBackgroundSweepEnd" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) "arenaIter.init(zone, kind);" (call_expression) "arenaIter.init(zone, kind)" (field_expression) "arenaIter.init" (identifier) "arenaIter" (.) "." (field_identifier) "init" (argument_list) "(zone, kind)" (() "(" (identifier) "zone" (,) "," (identifier) "kind" ()) ")" (;) ";" (if_statement) "if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }" (if) "if" (parenthesized_expression) "(!arenaIter.done())" (() "(" (unary_expression) "!arenaIter.done()" (!) "!" (call_expression) "arenaIter.done()" (field_expression) "arenaIter.done" (identifier) "arenaIter" (.) "." (field_identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }" ({) "{" (expression_statement) "cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);" (call_expression) "cellIter.init(arenaIter.get(), CellIterMayNeedBarrier)" (field_expression) "cellIter.init" (identifier) "cellIter" (.) "." (field_identifier) "init" (argument_list) "(arenaIter.get(), CellIterMayNeedBarrier)" (() "(" (call_expression) "arenaIter.get()" (field_expression) "arenaIter.get" (identifier) "arenaIter" (.) "." (field_identifier) "get" (argument_list) "()" (() "(" ()) ")" (,) "," (identifier) "CellIterMayNeedBarrier" ()) ")" (;) ";" (expression_statement) "settle();" (call_expression) "settle()" (identifier) "settle" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (}) "}" (labeled_statement) "public:\n ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }" (statement_identifier) "public" (:) ":" (labeled_statement) "ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }" (statement_identifier) "ZoneCellIter" (ERROR) "(JS:" (() "(" (type_descriptor) "JS" (type_identifier) "JS" (:) ":" (:) ":" (ERROR) "Zone* zone, AllocKind kind)" (type_identifier) "Zone" (pointer_declarator) "* zone" (*) "*" (identifier) "zone" (,) "," (identifier) "AllocKind" (identifier) "kind" ()) ")" (compound_statement) "{\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }" ({) "{" (comment) "// If we are iterating a nursery-allocated kind then we need to" (comment) "// evict first so that we can see all things." (if_statement) "if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }" (if) "if" (parenthesized_expression) "(IsNurseryAllocable(kind))" (() "(" (call_expression) "IsNurseryAllocable(kind)" (identifier) "IsNurseryAllocable" (argument_list) "(kind)" (() "(" (identifier) "kind" ()) ")" ()) ")" (compound_statement) "{\n zone->runtimeFromMainThread()->gc.evictNursery();\n }" ({) "{" (expression_statement) "zone->runtimeFromMainThread()->gc.evictNursery();" (call_expression) "zone->runtimeFromMainThread()->gc.evictNursery()" (field_expression) "zone->runtimeFromMainThread()->gc.evictNursery" (field_expression) "zone->runtimeFromMainThread()->gc" (call_expression) "zone->runtimeFromMainThread()" (field_expression) "zone->runtimeFromMainThread" (identifier) "zone" (->) "->" (field_identifier) "runtimeFromMainThread" (argument_list) "()" (() "(" ()) ")" (->) "->" (field_identifier) "gc" (.) "." (field_identifier) "evictNursery" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) "init(zone, kind);" (call_expression) "init(zone, kind)" (identifier) "init" (argument_list) "(zone, kind)" (() "(" (identifier) "zone" (,) "," (identifier) "kind" ()) ")" (;) ";" (}) "}" (labeled_statement) "ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }" (statement_identifier) "ZoneCellIter" (ERROR) "(JS::Zone* zone, AllocKind kind, const js:" (() "(" (type_descriptor) "JS" (type_identifier) "JS" (:) ":" (:) ":" (type_identifier) "Zone" (pointer_declarator) "* zone" (*) "*" (identifier) "zone" (,) "," (identifier) "AllocKind" (ERROR) "kind" (identifier) "kind" (,) "," (identifier) "const" (identifier) "js" (:) ":" (:) ":" (labeled_statement) "gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }" (statement_identifier) "gc" (:) ":" (ERROR) ":AutoAssertEmptyNursery&)" (:) ":" (identifier) "AutoAssertEmptyNursery" (&) "&" ()) ")" (compound_statement) "{\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }" ({) "{" (comment) "// No need to evict the nursery. (This constructor is known statically" (comment) "// to not GC.)" (expression_statement) "init(zone, kind);" (call_expression) "init(zone, kind)" (identifier) "init" (argument_list) "(zone, kind)" (() "(" (identifier) "zone" (,) "," (identifier) "kind" ()) ")" (;) ";" (}) "}" (ERROR) "bool done() const" (primitive_type) "bool" (function_declarator) "done()" (identifier) "done" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return arenaIter.done();\n }" ({) "{" (return_statement) "return arenaIter.done();" (return) "return" (call_expression) "arenaIter.done()" (field_expression) "arenaIter.done" (identifier) "arenaIter" (.) "." (field_identifier) "done" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "template<typename T>\n T* get() const" (binary_expression) "template<typename T>\n T* get()" (binary_expression) "template<typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (binary_expression) "T* get()" (identifier) "T" (*) "*" (call_expression) "get()" (identifier) "get" (argument_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{\n MOZ_ASSERT(!done());\n return cellIter.get<T>();\n }" ({) "{" (expression_statement) "MOZ_ASSERT(!done());" (call_expression) "MOZ_ASSERT(!done())" (identifier) "MOZ_ASSERT" (argument_list) "(!done())" (() "(" (unary_expression) "!done()" (!) "!" (call_expression) "done()" (identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (return_statement) "return cellIter.get<T>();" (return) "return" (binary_expression) "cellIter.get<T>()" (binary_expression) "cellIter.get<T" (field_expression) "cellIter.get" (identifier) "cellIter" (.) "." (field_identifier) "get" (<) "<" (identifier) "T" (>) ">" (parenthesized_expression) "()" (() "(" (identifier) "" ()) ")" (;) ";" (}) "}" (function_definition) "TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }" (type_identifier) "TenuredCell" (pointer_declarator) "* getCell() const" (*) "*" (function_declarator) "getCell() const" (identifier) "getCell" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }" ({) "{" (expression_statement) "MOZ_ASSERT(!done());" (call_expression) "MOZ_ASSERT(!done())" (identifier) "MOZ_ASSERT" (argument_list) "(!done())" (() "(" (unary_expression) "!done()" (!) "!" (call_expression) "done()" (identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (return_statement) "return cellIter.getCell();" (return) "return" (call_expression) "cellIter.getCell()" (field_expression) "cellIter.getCell" (identifier) "cellIter" (.) "." (field_identifier) "getCell" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "void settle() {\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }\n }" (primitive_type) "void" (function_declarator) "settle()" (identifier) "settle" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }\n }" ({) "{" (while_statement) "while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }" (while) "while" (parenthesized_expression) "(cellIter.done() && !arenaIter.done())" (() "(" (binary_expression) "cellIter.done() && !arenaIter.done()" (call_expression) "cellIter.done()" (field_expression) "cellIter.done" (identifier) "cellIter" (.) "." (field_identifier) "done" (argument_list) "()" (() "(" ()) ")" (&&) "&&" (unary_expression) "!arenaIter.done()" (!) "!" (call_expression) "arenaIter.done()" (field_expression) "arenaIter.done" (identifier) "arenaIter" (.) "." (field_identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }" ({) "{" (expression_statement) "arenaIter.next();" (call_expression) "arenaIter.next()" (field_expression) "arenaIter.next" (identifier) "arenaIter" (.) "." (field_identifier) "next" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }" (if) "if" (parenthesized_expression) "(!arenaIter.done())" (() "(" (unary_expression) "!arenaIter.done()" (!) "!" (call_expression) "arenaIter.done()" (field_expression) "arenaIter.done" (identifier) "arenaIter" (.) "." (field_identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n cellIter.reset(arenaIter.get());\n }" ({) "{" (expression_statement) "cellIter.reset(arenaIter.get());" (call_expression) "cellIter.reset(arenaIter.get())" (field_expression) "cellIter.reset" (identifier) "cellIter" (.) "." (field_identifier) "reset" (argument_list) "(arenaIter.get())" (() "(" (call_expression) "arenaIter.get()" (field_expression) "arenaIter.get" (identifier) "arenaIter" (.) "." (field_identifier) "get" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (}) "}" (}) "}" (function_definition) "void next() {\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }" (primitive_type) "void" (function_declarator) "next()" (identifier) "next" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }" ({) "{" (expression_statement) "MOZ_ASSERT(!done());" (call_expression) "MOZ_ASSERT(!done())" (identifier) "MOZ_ASSERT" (argument_list) "(!done())" (() "(" (unary_expression) "!done()" (!) "!" (call_expression) "done()" (identifier) "done" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (expression_statement) "cellIter.next();" (call_expression) "cellIter.next()" (field_expression) "cellIter.next" (identifier) "cellIter" (.) "." (field_identifier) "next" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "settle();" (call_expression) "settle()" (identifier) "settle" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (comment) "// Iterator over the cells in a Zone, where the GC type (JSString, JSObject) is" (comment) "// known, for a single AllocKind. Example usages:" (comment) "//" (comment) "// for (auto obj = zone->cellIter<JSObject>(AllocKind::OBJECT0); !obj.done(); obj.next()) {" (comment) "// ..." (comment) "// }" (comment) "//" (comment) "// for (auto script = zone->cellIter<JSScript>(); !script.done(); script.next()) {" (comment) "// f(script->code());" (comment) "// }" (comment) "//" (comment) "// As this code demonstrates, you can use 'script' as if it were a JSScript*." (comment) "// Its actual type is ZoneCellIter<JSScript>, but for most purposes it will" (comment) "// autoconvert to JSScript*." (comment) "//" (comment) "// Note that in the JSScript case, ZoneCellIter is able to infer the AllocKind" (comment) "// from the type 'JSScript', whereas in the JSObject case, the kind must be" (comment) "// given (because there are multiple AllocKinds for objects)." (comment) "//" (comment) "// Also, the static rooting hazard analysis knows that the JSScript case will" (comment) "// not GC during construction. The JSObject case needs to GC, or more precisely" (comment) "// to empty the nursery and clear out the store buffer, so that it can see all" (comment) "// objects to iterate over (the nursery is not iterable) and remove the" (comment) "// possibility of having pointers from the store buffer to data hanging off" (comment) "// stuff we're iterating over that we are going to delete. (The latter should" (comment) "// not be a problem, since such instances should be using RelocatablePtr do" (comment) "// remove themselves from the store buffer on deletion, but currently for" (comment) "// subtle reasons that isn't good enough.)" (comment) "//" (comment) "// If the iterator is used within a GC, then there is no need to evict the" (comment) "// nursery (again). You may select a variant that will skip the eviction either" (comment) "// by specializing on a GCType that is never allocated in the nursery, or" (comment) "// explicitly by passing in a trailing AutoAssertEmptyNursery argument." (comment) "//" (expression_statement) "template <typename GCType>\nclass" (binary_expression) "template <typename GCType>\nclass" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "GCType" (identifier) "GCType" (>) ">" (identifier) "class" (;) "" (labeled_statement) "ZoneCellIter : public ZoneCellIter<TenuredCell> {\n public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);\n }" (statement_identifier) "ZoneCellIter" (:) ":" (ERROR) "public ZoneCellIter<TenuredCell>" (type_identifier) "public" (identifier) "ZoneCellIter" (<) "<" (identifier) "TenuredCell" (>) ">" (compound_statement) "{\n public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);\n }" ({) "{" (labeled_statement) "public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);" (statement_identifier) "public" (:) ":" (comment) "// Non-nursery allocated (equivalent to having an entry in" (comment) "// MapTypeToFinalizeKind). The template declaration here is to discard this" (comment) "// constructor overload if MapTypeToFinalizeKind<GCType>::kind does not" (comment) "// exist. Note that there will be no remaining overloads that will work," (comment) "// which makes sense given that you haven't specified which of the" (comment) "// AllocKinds to use for GCType." (comment) "//" (comment) "// If we later add a nursery allocable GCType with a single AllocKind, we" (comment) "// will want to add an overload of this constructor that does the right" (comment) "// thing (ie, it empties the nursery before iterating.)" (ERROR) "explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind)" (type_identifier) "explicit" (function_declarator) "ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind)" (identifier) "ZoneCellIter" (parameter_list) "(JS::Zone* zone)" (() "(" (parameter_declaration) "JS::Zone* zone" (type_identifier) "JS" (ERROR) "::Zone" (:) ":" (:) ":" (identifier) "Zone" (pointer_declarator) "* zone" (*) "*" (identifier) "zone" ()) ")" (ERROR) ":" (:) ":" (identifier) "ZoneCellIter" (ERROR) "<" (<) "<" (identifier) "TenuredCell" (ERROR) ">() {" (>) ">" (() "(" ()) ")" ({) "{" (call_expression) "init(zone, MapTypeToFinalizeKind<GCType>::kind)" (identifier) "init" (argument_list) "(zone, MapTypeToFinalizeKind<GCType>::kind)" (() "(" (identifier) "zone" (,) "," (binary_expression) "MapTypeToFinalizeKind<GCType>::kind" (binary_expression) "MapTypeToFinalizeKind<GCType" (identifier) "MapTypeToFinalizeKind" (<) "<" (identifier) "GCType" (>) ">" (ERROR) "::" (:) ":" (:) ":" (identifier) "kind" ()) ")" (expression_statement) ";" (;) ";" (}) "}" (comment) "// Non-nursery allocated, nursery is known to be empty: same behavior as above." (labeled_statement) "ZoneCellIter(JS::Zone* zone, const js::gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) {\n }" (statement_identifier) "ZoneCellIter" (ERROR) "(JS::Zone* zone, const js:" (() "(" (type_descriptor) "JS" (type_identifier) "JS" (:) ":" (:) ":" (type_identifier) "Zone" (pointer_declarator) "* zone" (*) "*" (identifier) "zone" (,) "," (identifier) "const" (identifier) "js" (:) ":" (:) ":" (labeled_statement) "gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) {\n }" (statement_identifier) "gc" (ERROR) "::AutoAssertEmptyNursery&)" (:) ":" (:) ":" (identifier) "AutoAssertEmptyNursery" (&) "&" ()) ")" (:) ":" (ERROR) "ZoneCellIter(zone)" (macro_type_specifier) "ZoneCellIter(zone)" (identifier) "ZoneCellIter" (() "(" (type_descriptor) "zone" (type_identifier) "zone" ()) ")" (compound_statement) "{\n }" ({) "{" (}) "}" (comment) "// Arbitrary kind, which will be assumed to be nursery allocable (and" (comment) "// therefore the nursery will be emptied before iterating.)" (labeled_statement) "ZoneCellIter(JS::Zone* zone, AllocKind kind) : ZoneCellIter<TenuredCell>(zone, kind)" (statement_identifier) "ZoneCellIter" (ERROR) "(JS::Zone* zone, AllocKind kind)" (() "(" (type_descriptor) "JS" (type_identifier) "JS" (:) ":" (:) ":" (type_identifier) "Zone" (pointer_declarator) "* zone" (*) "*" (identifier) "zone" (,) "," (identifier) "AllocKind" (identifier) "kind" ()) ")" (:) ":" (expression_statement) "ZoneCellIter<TenuredCell>(zone, kind)" (binary_expression) "ZoneCellIter<TenuredCell>(zone, kind)" (binary_expression) "ZoneCellIter<TenuredCell" (identifier) "ZoneCellIter" (<) "<" (identifier) "TenuredCell" (>) ">" (parenthesized_expression) "(zone, kind)" (() "(" (comma_expression) "zone, kind" (identifier) "zone" (,) "," (identifier) "kind" ()) ")" (;) "" (compound_statement) "{\n }" ({) "{" (}) "}" (comment) "// Arbitrary kind, which will be assumed to be nursery allocable, but the" (comment) "// nursery is known to be empty already: same behavior as non-nursery types." (labeled_statement) "ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery& empty)\n : ZoneCellIter<TenuredCell>(zone, kind, empty)" (statement_identifier) "ZoneCellIter" (ERROR) "(JS::Zone* zone, AllocKind kind, const js:" (() "(" (type_descriptor) "JS" (type_identifier) "JS" (:) ":" (:) ":" (type_identifier) "Zone" (pointer_declarator) "* zone" (*) "*" (identifier) "zone" (,) "," (identifier) "AllocKind" (ERROR) "kind" (identifier) "kind" (,) "," (identifier) "const" (identifier) "js" (:) ":" (:) ":" (labeled_statement) "gc::AutoAssertEmptyNursery& empty)\n : ZoneCellIter<TenuredCell>(zone, kind, empty)" (statement_identifier) "gc" (ERROR) "::AutoAssertEmptyNursery& empty)" (:) ":" (:) ":" (binary_expression) "AutoAssertEmptyNursery& empty" (identifier) "AutoAssertEmptyNursery" (&) "&" (identifier) "empty" ()) ")" (:) ":" (expression_statement) "ZoneCellIter<TenuredCell>(zone, kind, empty)" (binary_expression) "ZoneCellIter<TenuredCell>(zone, kind, empty)" (binary_expression) "ZoneCellIter<TenuredCell" (identifier) "ZoneCellIter" (<) "<" (identifier) "TenuredCell" (>) ">" (parenthesized_expression) "(zone, kind, empty)" (() "(" (comma_expression) "zone, kind, empty" (identifier) "zone" (,) "," (comma_expression) "kind, empty" (identifier) "kind" (,) "," (identifier) "empty" ()) ")" (;) "" (compound_statement) "{\n }" ({) "{" (}) "}" (function_definition) "GCType* get() const { return ZoneCellIter<TenuredCell>::get<GCType>(); }" (type_identifier) "GCType" (pointer_declarator) "* get() const" (*) "*" (function_declarator) "get() const" (identifier) "get" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return ZoneCellIter<TenuredCell>::get<GCType>(); }" ({) "{" (return_statement) "return ZoneCellIter<TenuredCell>::get<GCType>();" (return) "return" (binary_expression) "ZoneCellIter<TenuredCell>::get<GCType>()" (binary_expression) "ZoneCellIter<TenuredCell>::get<GCType" (binary_expression) "ZoneCellIter<TenuredCell>::get" (binary_expression) "ZoneCellIter<TenuredCell" (identifier) "ZoneCellIter" (<) "<" (identifier) "TenuredCell" (>) ">" (ERROR) "::" (:) ":" (:) ":" (identifier) "get" (<) "<" (identifier) "GCType" (>) ">" (parenthesized_expression) "()" (() "(" (identifier) "" ()) ")" (;) ";" (}) "}" (function_definition) "operator GCType*() const { return get(); }" (type_identifier) "operator" (ERROR) "GCType" (identifier) "GCType" (pointer_declarator) "*() const" (*) "*" (ERROR) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (identifier) "" (compound_statement) "{ return get(); }" ({) "{" (return_statement) "return get();" (return) "return" (call_expression) "get()" (identifier) "get" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "GCType* operator ->() const" (binary_expression) "GCType* operator ->()" (identifier) "GCType" (*) "*" (call_expression) "operator ->()" (field_expression) "operator ->" (identifier) "operator" (->) "->" (field_identifier) "" (argument_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return get(); }" ({) "{" (return_statement) "return get();" (return) "return" (call_expression) "get()" (identifier) "get" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (ERROR) "} /* namespace gc */\n}" (}) "}" (comment) "/* namespace gc */" (}) "}" (comment) "/* namespace js */" (#endif) "#endif" (comment) "/* gc_GC_inl_h */"
2,264
71
{"language": "c", "success": true, "metadata": {"lines": 313, "avg_line_length": 35.78, "nodes": 1287, "errors": 0, "source_hash": "0613dd3956973a29a8bb5f00c57d0f18c4be27f83e6a1deda7fc2a920953388f", "categorized_nodes": 867}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef gc_GC_inl_h\n#define gc_GC_inl_h\n\n#include \"gc/GC.h\"\n\n#include \"mozilla/DebugOnly.h\"\n#include \"mozilla/Maybe.h\"\n\n#include \"gc/Zone.h\"\n\n#include \"gc/ArenaList-inl.h\"\n\nnamespace js {\nnamespace gc {\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }\n\n void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n};\n\nenum CellIterNeedsBarrier : uint8_t\n{\n CellIterDoesntNeedBarrier = 0,\n CellIterMayNeedBarrier = 1\n};\n\nclass ArenaCellIterImpl\n{\n size_t firstThingOffset;\n size_t thingSize;\n Arena* arenaAddr;\n FreeSpan span;\n uint_fast16_t thing;\n JS::TraceKind traceKind;\n bool needsBarrier;\n mozilla::DebugOnly<bool> initialized;\n\n // Upon entry, |thing| points to any thing (free or used) and finds the\n // first used thing, which may be |thing|.\n void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }\n\n public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}\n\n explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }\n\n void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }\n\n // Use this to move from an Arena of a particular kind to another Arena of\n // the same kind.\n void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }\n\n template<typename T> T* get() const {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);\n return reinterpret_cast<T*>(getCell());\n }\n\n void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }\n};\n\ntemplate<>\nJSObject*\nArenaCellIterImpl::get<JSObject>() const;\n\nclass ArenaCellIter : public ArenaCellIterImpl\n{\n public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }\n};\n\ntemplate <typename T>\nclass ZoneCellIter;\n\ntemplate <>\nclass ZoneCellIter<TenuredCell> {\n ArenaIter arenaIter;\n ArenaCellIterImpl cellIter;\n mozilla::Maybe<JS::AutoAssertNoGC> nogc;\n\n protected:\n // For use when a subclass wants to insert some setup before init().\n ZoneCellIter() {}\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));\n initForTenuredIteration(zone, kind);\n }\n\n void initForTenuredIteration(JS::Zone* zone, AllocKind kind) {\n JSRuntime* rt = zone->runtimeFromAnyThread();\n\n // If called from outside a GC, ensure that the heap is in a state\n // that allows us to iterate.\n if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }\n\n // We have a single-threaded runtime, so there's no need to protect\n // against other threads iterating or allocating. However, we do have\n // background finalization; we may have to wait for this to finish if\n // it's currently active.\n if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }\n arenaIter.init(zone, kind);\n if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }\n }\n\n public:\n ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }\n\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }\n\n bool done() const {\n return arenaIter.done();\n }\n\n template<typename T>\n T* get() const {\n MOZ_ASSERT(!done());\n return cellIter.get<T>();\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }\n\n void settle() {\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }\n }\n\n void next() {\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }\n};\n\n// Iterator over the cells in a Zone, where the GC type (JSString, JSObject) is\n// known, for a single AllocKind. Example usages:\n//\n// for (auto obj = zone->cellIter<JSObject>(AllocKind::OBJECT0); !obj.done(); obj.next()) {\n// ...\n// }\n//\n// for (auto script = zone->cellIter<JSScript>(); !script.done(); script.next()) {\n// f(script->code());\n// }\n//\n// As this code demonstrates, you can use 'script' as if it were a JSScript*.\n// Its actual type is ZoneCellIter<JSScript>, but for most purposes it will\n// autoconvert to JSScript*.\n//\n// Note that in the JSScript case, ZoneCellIter is able to infer the AllocKind\n// from the type 'JSScript', whereas in the JSObject case, the kind must be\n// given (because there are multiple AllocKinds for objects).\n//\n// Also, the static rooting hazard analysis knows that the JSScript case will\n// not GC during construction. The JSObject case needs to GC, or more precisely\n// to empty the nursery and clear out the store buffer, so that it can see all\n// objects to iterate over (the nursery is not iterable) and remove the\n// possibility of having pointers from the store buffer to data hanging off\n// stuff we're iterating over that we are going to delete. (The latter should\n// not be a problem, since such instances should be using RelocatablePtr do\n// remove themselves from the store buffer on deletion, but currently for\n// subtle reasons that isn't good enough.)\n//\n// If the iterator is used within a GC, then there is no need to evict the\n// nursery (again). You may select a variant that will skip the eviction either\n// by specializing on a GCType that is never allocated in the nursery, or\n// explicitly by passing in a trailing AutoAssertEmptyNursery argument.\n//\ntemplate <typename GCType>\nclass ZoneCellIter : public ZoneCellIter<TenuredCell> {\n public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);\n }\n\n // Non-nursery allocated, nursery is known to be empty: same behavior as above.\n ZoneCellIter(JS::Zone* zone, const js::gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable (and\n // therefore the nursery will be emptied before iterating.)\n ZoneCellIter(JS::Zone* zone, AllocKind kind) : ZoneCellIter<TenuredCell>(zone, kind) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable, but the\n // nursery is known to be empty already: same behavior as non-nursery types.\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery& empty)\n : ZoneCellIter<TenuredCell>(zone, kind, empty)\n {\n }\n\n GCType* get() const { return ZoneCellIter<TenuredCell>::get<GCType>(); }\n operator GCType*() const { return get(); }\n GCType* operator ->() const { return get(); }\n};\n\n} /* namespace gc */\n} /* namespace js */\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 1285, 1286], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 363, "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": "gc_GC_inl_h", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 19}}, {"id": 3, "type": "preproc_def", "text": "#define gc_GC_inl_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": "gc_GC_inl_h", "parent": 3, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include \"gc/GC.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": "\"gc/GC.h\"", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include \"mozilla/DebugOnly.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"mozilla/DebugOnly.h\"", "parent": 9, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 30}}, {"id": 12, "type": "preproc_include", "text": "#include \"mozilla/Maybe.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"mozilla/Maybe.h\"", "parent": 12, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 26}}, {"id": 15, "type": "preproc_include", "text": "#include \"gc/Zone.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"gc/Zone.h\"", "parent": 15, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 20}}, {"id": 18, "type": "preproc_include", "text": "#include \"gc/ArenaList-inl.h\"\n", "parent": 0, "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": "\"gc/ArenaList-inl.h\"", "parent": 18, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 29}}, {"id": 21, "type": "function_definition", "text": "namespace js {\nnamespace gc {\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }\n\n void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n};\n\nenum CellIterNeedsBarrier : uint8_t\n{\n CellIterDoesntNeedBarrier = 0,\n CellIterMayNeedBarrier = 1\n};\n\nclass ArenaCellIterImpl\n{\n size_t firstThingOffset;\n size_t thingSize;\n Arena* arenaAddr;\n FreeSpan span;\n uint_fast16_t thing;\n JS::TraceKind traceKind;\n bool needsBarrier;\n mozilla::DebugOnly<bool> initialized;\n\n // Upon entry, |thing| points to any thing (free or used) and finds the\n // first used thing, which may be |thing|.\n void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }\n\n public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}\n\n explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }\n\n void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }\n\n // Use this to move from an Arena of a particular kind to another Arena of\n // the same kind.\n void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }\n\n template<typename T> T* get() const {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);\n return reinterpret_cast<T*>(getCell());\n }\n\n void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }\n};\n\ntemplate<>\nJSObject*\nArenaCellIterImpl::get<JSObject>() const;\n\nclass ArenaCellIter : public ArenaCellIterImpl\n{\n public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }\n};\n\ntemplate <typename T>\nclass ZoneCellIter;\n\ntemplate <>\nclass ZoneCellIter<TenuredCell> {\n ArenaIter arenaIter;\n ArenaCellIterImpl cellIter;\n mozilla::Maybe<JS::AutoAssertNoGC> nogc;\n\n protected:\n // For use when a subclass wants to insert some setup before init().\n ZoneCellIter() {}\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));\n initForTenuredIteration(zone, kind);\n }\n\n void initForTenuredIteration(JS::Zone* zone, AllocKind kind) {\n JSRuntime* rt = zone->runtimeFromAnyThread();\n\n // If called from outside a GC, ensure that the heap is in a state\n // that allows us to iterate.\n if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }\n\n // We have a single-threaded runtime, so there's no need to protect\n // against other threads iterating or allocating. However, we do have\n // background finalization; we may have to wait for this to finish if\n // it's currently active.\n if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }\n arenaIter.init(zone, kind);\n if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }\n }\n\n public:\n ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }\n\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }\n\n bool done() const {\n return arenaIter.done();\n }\n\n template<typename T>\n T* get() const {\n MOZ_ASSERT(!done());\n return cellIter.get<T>();\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }\n\n void settle() {\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }\n }\n\n void next() {\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }\n};\n\n// Iterator over the cells in a Zone, where the GC type (JSString, JSObject) is\n// known, for a single AllocKind. Example usages:\n//\n// for (auto obj = zone->cellIter<JSObject>(AllocKind::OBJECT0); !obj.done(); obj.next()) {\n// ...\n// }\n//\n// for (auto script = zone->cellIter<JSScript>(); !script.done(); script.next()) {\n// f(script->code());\n// }\n//\n// As this code demonstrates, you can use 'script' as if it were a JSScript*.\n// Its actual type is ZoneCellIter<JSScript>, but for most purposes it will\n// autoconvert to JSScript*.\n//\n// Note that in the JSScript case, ZoneCellIter is able to infer the AllocKind\n// from the type 'JSScript', whereas in the JSObject case, the kind must be\n// given (because there are multiple AllocKinds for objects).\n//\n// Also, the static rooting hazard analysis knows that the JSScript case will\n// not GC during construction. The JSObject case needs to GC, or more precisely\n// to empty the nursery and clear out the store buffer, so that it can see all\n// objects to iterate over (the nursery is not iterable) and remove the\n// possibility of having pointers from the store buffer to data hanging off\n// stuff we're iterating over that we are going to delete. (The latter should\n// not be a problem, since such instances should be using RelocatablePtr do\n// remove themselves from the store buffer on deletion, but currently for\n// subtle reasons that isn't good enough.)\n//\n// If the iterator is used within a GC, then there is no need to evict the\n// nursery (again). You may select a variant that will skip the eviction either\n// by specializing on a GCType that is never allocated in the nursery, or\n// explicitly by passing in a trailing AutoAssertEmptyNursery argument.\n//\ntemplate <typename GCType>\nclass ZoneCellIter : public ZoneCellIter<TenuredCell> {\n public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);\n }\n\n // Non-nursery allocated, nursery is known to be empty: same behavior as above.\n ZoneCellIter(JS::Zone* zone, const js::gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable (and\n // therefore the nursery will be emptied before iterating.)\n ZoneCellIter(JS::Zone* zone, AllocKind kind) : ZoneCellIter<TenuredCell>(zone, kind) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable, but the\n // nursery is known to be empty already: same behavior as non-nursery types.\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery& empty)\n : ZoneCellIter<TenuredCell>(zone, kind, empty)\n {\n }\n\n GCType* get() const { return ZoneCellIter<TenuredCell>::get<GCType>(); }\n operator GCType*() const { return get(); }\n GCType* operator ->() const { return get(); }\n}", "parent": 0, "children": [22, 23], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 358, "column": 1}}, {"id": 22, "type": "type_identifier", "text": "namespace", "parent": 21, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 9}}, {"id": 23, "type": "identifier", "text": "js", "parent": 21, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 12}}, {"id": 24, "type": "function_definition", "text": "namespace gc {\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }\n\n void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n}", "parent": 21, "children": [25, 26], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 73, "column": 1}}, {"id": 25, "type": "type_identifier", "text": "namespace", "parent": 24, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 9}}, {"id": 26, "type": "identifier", "text": "gc", "parent": 24, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 12}}, {"id": 27, "type": "declaration", "text": "class AutoAssertEmptyNursery;", "parent": 24, "children": [28], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 29}}, {"id": 28, "type": "identifier", "text": "AutoAssertEmptyNursery", "parent": 27, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 28}}, {"id": 29, "type": "function_definition", "text": "class ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }", "parent": 24, "children": [30], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 34, "column": 88}}, {"id": 30, "type": "identifier", "text": "ArenaIter", "parent": 29, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 15}}, {"id": 31, "type": "declaration", "text": "Arena* arena;", "parent": 29, "children": [32, 33], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 17}}, {"id": 32, "type": "type_identifier", "text": "Arena", "parent": 31, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 9}}, {"id": 33, "type": "pointer_declarator", "text": "* arena", "parent": 31, "children": [34, 35], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 16}}, {"id": 34, "type": "*", "text": "*", "parent": 33, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 10}}, {"id": 35, "type": "identifier", "text": "arena", "parent": 33, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 16}}, {"id": 36, "type": "declaration", "text": "Arena* unsweptArena;", "parent": 29, "children": [37, 38], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 24}}, {"id": 37, "type": "type_identifier", "text": "Arena", "parent": 36, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 9}}, {"id": 38, "type": "pointer_declarator", "text": "* unsweptArena", "parent": 36, "children": [39, 40], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 23}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 10}}, {"id": 40, "type": "identifier", "text": "unsweptArena", "parent": 38, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 23}}, {"id": 41, "type": "declaration", "text": "Arena* sweptArena;", "parent": 29, "children": [42, 43], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 22}}, {"id": 42, "type": "type_identifier", "text": "Arena", "parent": 41, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 9}}, {"id": 43, "type": "pointer_declarator", "text": "* sweptArena", "parent": 41, "children": [44, 45], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 21}}, {"id": 44, "type": "*", "text": "*", "parent": 43, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 10}}, {"id": 45, "type": "identifier", "text": "sweptArena", "parent": 43, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 21}}, {"id": 46, "type": "labeled_statement", "text": "mozilla::DebugOnly<bool> initialized;", "parent": 29, "children": [47], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 41}}, {"id": 47, "type": "statement_identifier", "text": "mozilla", "parent": 46, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 11}}, {"id": 48, "type": "binary_expression", "text": "DebugOnly<bool> initialized", "parent": 46, "children": [49, 53, 54], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 40}}, {"id": 49, "type": "binary_expression", "text": "DebugOnly<bool", "parent": 48, "children": [50, 51, 52], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 27}}, {"id": 50, "type": "identifier", "text": "DebugOnly", "parent": 49, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 22}}, {"id": 51, "type": "<", "text": "<", "parent": 49, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 23}}, {"id": 52, "type": "identifier", "text": "bool", "parent": 49, "children": [], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 27}}, {"id": 53, "type": ">", "text": ">", "parent": 48, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 28}}, {"id": 54, "type": "identifier", "text": "initialized", "parent": 48, "children": [], "start_point": {"row": 28, "column": 29}, "end_point": {"row": 28, "column": 40}}, {"id": 55, "type": "labeled_statement", "text": "public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false)", "parent": 29, "children": [56], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 32, "column": 86}}, {"id": 56, "type": "ERROR", "text": ":\n ArenaIter()", "parent": 55, "children": [57], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 31, "column": 15}}, {"id": 57, "type": "call_expression", "text": "ArenaIter()", "parent": 56, "children": [58, 59], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 15}}, {"id": 58, "type": "identifier", "text": "ArenaIter", "parent": 57, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 13}}, {"id": 59, "type": "argument_list", "text": "()", "parent": 57, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 15}}, {"id": 60, "type": "comma_expression", "text": "arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false)", "parent": 55, "children": [61, 66], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 86}}, {"id": 61, "type": "call_expression", "text": "arena(nullptr)", "parent": 60, "children": [62, 63], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 22}}, {"id": 62, "type": "identifier", "text": "arena", "parent": 61, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 13}}, {"id": 63, "type": "argument_list", "text": "(nullptr)", "parent": 61, "children": [64], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 22}}, {"id": 64, "type": "null", "text": "nullptr", "parent": 63, "children": [65], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 21}}, {"id": 65, "type": "nullptr", "text": "nullptr", "parent": 64, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 21}}, {"id": 66, "type": "comma_expression", "text": "unsweptArena(nullptr), sweptArena(nullptr), initialized(false)", "parent": 60, "children": [67, 72], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 86}}, {"id": 67, "type": "call_expression", "text": "unsweptArena(nullptr)", "parent": 66, "children": [68, 69], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 45}}, {"id": 68, "type": "identifier", "text": "unsweptArena", "parent": 67, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 36}}, {"id": 69, "type": "argument_list", "text": "(nullptr)", "parent": 67, "children": [70], "start_point": {"row": 32, "column": 36}, "end_point": {"row": 32, "column": 45}}, {"id": 70, "type": "null", "text": "nullptr", "parent": 69, "children": [71], "start_point": {"row": 32, "column": 37}, "end_point": {"row": 32, "column": 44}}, {"id": 71, "type": "nullptr", "text": "nullptr", "parent": 70, "children": [], "start_point": {"row": 32, "column": 37}, "end_point": {"row": 32, "column": 44}}, {"id": 72, "type": "comma_expression", "text": "sweptArena(nullptr), initialized(false)", "parent": 66, "children": [73, 78], "start_point": {"row": 32, "column": 47}, "end_point": {"row": 32, "column": 86}}, {"id": 73, "type": "call_expression", "text": "sweptArena(nullptr)", "parent": 72, "children": [74, 75], "start_point": {"row": 32, "column": 47}, "end_point": {"row": 32, "column": 66}}, {"id": 74, "type": "identifier", "text": "sweptArena", "parent": 73, "children": [], "start_point": {"row": 32, "column": 47}, "end_point": {"row": 32, "column": 57}}, {"id": 75, "type": "argument_list", "text": "(nullptr)", "parent": 73, "children": [76], "start_point": {"row": 32, "column": 57}, "end_point": {"row": 32, "column": 66}}, {"id": 76, "type": "null", "text": "nullptr", "parent": 75, "children": [77], "start_point": {"row": 32, "column": 58}, "end_point": {"row": 32, "column": 65}}, {"id": 77, "type": "nullptr", "text": "nullptr", "parent": 76, "children": [], "start_point": {"row": 32, "column": 58}, "end_point": {"row": 32, "column": 65}}, {"id": 78, "type": "call_expression", "text": "initialized(false)", "parent": 72, "children": [79, 80], "start_point": {"row": 32, "column": 68}, "end_point": {"row": 32, "column": 86}}, {"id": 79, "type": "identifier", "text": "initialized", "parent": 78, "children": [], "start_point": {"row": 32, "column": 68}, "end_point": {"row": 32, "column": 79}}, {"id": 80, "type": "argument_list", "text": "(false)", "parent": 78, "children": [81], "start_point": {"row": 32, "column": 79}, "end_point": {"row": 32, "column": 86}}, {"id": 81, "type": "false", "text": "false", "parent": 80, "children": [], "start_point": {"row": 32, "column": 80}, "end_point": {"row": 32, "column": 85}}, {"id": 82, "type": "labeled_statement", "text": "ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind);", "parent": 29, "children": [83, 84, 93], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 86}}, {"id": 83, "type": "statement_identifier", "text": "ArenaIter", "parent": 82, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 13}}, {"id": 84, "type": "ERROR", "text": "(JS::Zone* zone, AllocKind kind)", "parent": 82, "children": [85, 87, 88, 91, 92], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 45}}, {"id": 85, "type": "type_descriptor", "text": "JS", "parent": 84, "children": [86], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 16}}, {"id": 86, "type": "type_identifier", "text": "JS", "parent": 85, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 16}}, {"id": 87, "type": "type_identifier", "text": "Zone", "parent": 84, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 22}}, {"id": 88, "type": "pointer_declarator", "text": "* zone", "parent": 84, "children": [89, 90], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 28}}, {"id": 89, "type": "*", "text": "*", "parent": 88, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 23}}, {"id": 90, "type": "identifier", "text": "zone", "parent": 88, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 28}}, {"id": 91, "type": "identifier", "text": "AllocKind", "parent": 84, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 39}}, {"id": 92, "type": "identifier", "text": "kind", "parent": 84, "children": [], "start_point": {"row": 34, "column": 40}, "end_point": {"row": 34, "column": 44}}, {"id": 93, "type": "declaration", "text": "initialized(false) { init(zone, kind);", "parent": 82, "children": [94, 98], "start_point": {"row": 34, "column": 48}, "end_point": {"row": 34, "column": 86}}, {"id": 94, "type": "macro_type_specifier", "text": "initialized(false)", "parent": 93, "children": [95, 96], "start_point": {"row": 34, "column": 48}, "end_point": {"row": 34, "column": 66}}, {"id": 95, "type": "identifier", "text": "initialized", "parent": 94, "children": [], "start_point": {"row": 34, "column": 48}, "end_point": {"row": 34, "column": 59}}, {"id": 96, "type": "type_descriptor", "text": "false", "parent": 94, "children": [97], "start_point": {"row": 34, "column": 60}, "end_point": {"row": 34, "column": 65}}, {"id": 97, "type": "type_identifier", "text": "false", "parent": 96, "children": [], "start_point": {"row": 34, "column": 60}, "end_point": {"row": 34, "column": 65}}, {"id": 98, "type": "function_declarator", "text": "init(zone, kind)", "parent": 93, "children": [99, 100], "start_point": {"row": 34, "column": 69}, "end_point": {"row": 34, "column": 85}}, {"id": 99, "type": "identifier", "text": "init", "parent": 98, "children": [], "start_point": {"row": 34, "column": 69}, "end_point": {"row": 34, "column": 73}}, {"id": 100, "type": "parameter_list", "text": "(zone, kind)", "parent": 98, "children": [101, 103], "start_point": {"row": 34, "column": 73}, "end_point": {"row": 34, "column": 85}}, {"id": 101, "type": "parameter_declaration", "text": "zone", "parent": 100, "children": [102], "start_point": {"row": 34, "column": 74}, "end_point": {"row": 34, "column": 78}}, {"id": 102, "type": "type_identifier", "text": "zone", "parent": 101, "children": [], "start_point": {"row": 34, "column": 74}, "end_point": {"row": 34, "column": 78}}, {"id": 103, "type": "parameter_declaration", "text": "kind", "parent": 100, "children": [104], "start_point": {"row": 34, "column": 80}, "end_point": {"row": 34, "column": 84}}, {"id": 104, "type": "type_identifier", "text": "kind", "parent": 103, "children": [], "start_point": {"row": 34, "column": 80}, "end_point": {"row": 34, "column": 84}}, {"id": 105, "type": "function_definition", "text": "void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }", "parent": 24, "children": [106, 107], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 52, "column": 5}}, {"id": 106, "type": "primitive_type", "text": "void", "parent": 105, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 107, "type": "function_declarator", "text": "init(JS::Zone* zone, AllocKind kind)", "parent": 105, "children": [108, 109], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 45}}, {"id": 108, "type": "identifier", "text": "init", "parent": 107, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 13}}, {"id": 109, "type": "parameter_list", "text": "(JS::Zone* zone, AllocKind kind)", "parent": 107, "children": [110, 117], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 45}}, {"id": 110, "type": "parameter_declaration", "text": "JS::Zone* zone", "parent": 109, "children": [111, 112, 114], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 28}}, {"id": 111, "type": "type_identifier", "text": "JS", "parent": 110, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 16}}, {"id": 112, "type": "ERROR", "text": "::Zone", "parent": 110, "children": [113], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 22}}, {"id": 113, "type": "identifier", "text": "Zone", "parent": 112, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 22}}, {"id": 114, "type": "pointer_declarator", "text": "* zone", "parent": 110, "children": [115, 116], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 28}}, {"id": 115, "type": "*", "text": "*", "parent": 114, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 23}}, {"id": 116, "type": "identifier", "text": "zone", "parent": 114, "children": [], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 28}}, {"id": 117, "type": "parameter_declaration", "text": "AllocKind kind", "parent": 109, "children": [118, 119], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 44}}, {"id": 118, "type": "type_identifier", "text": "AllocKind", "parent": 117, "children": [], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 39}}, {"id": 119, "type": "identifier", "text": "kind", "parent": 117, "children": [], "start_point": {"row": 36, "column": 40}, "end_point": {"row": 36, "column": 44}}, {"id": 120, "type": "call_expression", "text": "MOZ_ASSERT(!initialized)", "parent": 105, "children": [121, 122], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 32}}, {"id": 121, "type": "identifier", "text": "MOZ_ASSERT", "parent": 120, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 18}}, {"id": 122, "type": "argument_list", "text": "(!initialized)", "parent": 120, "children": [123], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 32}}, {"id": 123, "type": "unary_expression", "text": "!initialized", "parent": 122, "children": [124, 125], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 31}}, {"id": 124, "type": "!", "text": "!", "parent": 123, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 20}}, {"id": 125, "type": "identifier", "text": "initialized", "parent": 123, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 31}}, {"id": 126, "type": "call_expression", "text": "MOZ_ASSERT(zone)", "parent": 105, "children": [127, 128], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 24}}, {"id": 127, "type": "identifier", "text": "MOZ_ASSERT", "parent": 126, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 18}}, {"id": 128, "type": "argument_list", "text": "(zone)", "parent": 126, "children": [129], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 24}}, {"id": 129, "type": "identifier", "text": "zone", "parent": 128, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 23}}, {"id": 130, "type": "assignment_expression", "text": "initialized = true", "parent": 105, "children": [131, 132, 133], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 26}}, {"id": 131, "type": "identifier", "text": "initialized", "parent": 130, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 19}}, {"id": 132, "type": "=", "text": "=", "parent": 130, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 21}}, {"id": 133, "type": "true", "text": "true", "parent": 130, "children": [], "start_point": {"row": 39, "column": 22}, "end_point": {"row": 39, "column": 26}}, {"id": 134, "type": "assignment_expression", "text": "arena = zone->arenas.getFirstArena(kind)", "parent": 105, "children": [135, 136, 137], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 48}}, {"id": 135, "type": "identifier", "text": "arena", "parent": 134, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 13}}, {"id": 136, "type": "=", "text": "=", "parent": 134, "children": [], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 15}}, {"id": 137, "type": "call_expression", "text": "zone->arenas.getFirstArena(kind)", "parent": 134, "children": [138, 143], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 48}}, {"id": 138, "type": "field_expression", "text": "zone->arenas.getFirstArena", "parent": 137, "children": [139, 142], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 42}}, {"id": 139, "type": "field_expression", "text": "zone->arenas", "parent": 138, "children": [140, 141], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 28}}, {"id": 140, "type": "identifier", "text": "zone", "parent": 139, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 20}}, {"id": 141, "type": "field_identifier", "text": "arenas", "parent": 139, "children": [], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 28}}, {"id": 142, "type": "field_identifier", "text": "getFirstArena", "parent": 138, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 42}}, {"id": 143, "type": "argument_list", "text": "(kind)", "parent": 137, "children": [144], "start_point": {"row": 40, "column": 42}, "end_point": {"row": 40, "column": 48}}, {"id": 144, "type": "identifier", "text": "kind", "parent": 143, "children": [], "start_point": {"row": 40, "column": 43}, "end_point": {"row": 40, "column": 47}}, {"id": 145, "type": "assignment_expression", "text": "unsweptArena = zone->arenas.getFirstArenaToSweep(kind)", "parent": 105, "children": [146, 147, 148], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 62}}, {"id": 146, "type": "identifier", "text": "unsweptArena", "parent": 145, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 20}}, {"id": 147, "type": "=", "text": "=", "parent": 145, "children": [], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 22}}, {"id": 148, "type": "call_expression", "text": "zone->arenas.getFirstArenaToSweep(kind)", "parent": 145, "children": [149, 154], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 62}}, {"id": 149, "type": "field_expression", "text": "zone->arenas.getFirstArenaToSweep", "parent": 148, "children": [150, 153], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 56}}, {"id": 150, "type": "field_expression", "text": "zone->arenas", "parent": 149, "children": [151, 152], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 35}}, {"id": 151, "type": "identifier", "text": "zone", "parent": 150, "children": [], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 27}}, {"id": 152, "type": "field_identifier", "text": "arenas", "parent": 150, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 35}}, {"id": 153, "type": "field_identifier", "text": "getFirstArenaToSweep", "parent": 149, "children": [], "start_point": {"row": 41, "column": 36}, "end_point": {"row": 41, "column": 56}}, {"id": 154, "type": "argument_list", "text": "(kind)", "parent": 148, "children": [155], "start_point": {"row": 41, "column": 56}, "end_point": {"row": 41, "column": 62}}, {"id": 155, "type": "identifier", "text": "kind", "parent": 154, "children": [], "start_point": {"row": 41, "column": 57}, "end_point": {"row": 41, "column": 61}}, {"id": 156, "type": "assignment_expression", "text": "sweptArena = zone->arenas.getFirstSweptArena(kind)", "parent": 105, "children": [157, 158, 159], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 58}}, {"id": 157, "type": "identifier", "text": "sweptArena", "parent": 156, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 18}}, {"id": 158, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 20}}, {"id": 159, "type": "call_expression", "text": "zone->arenas.getFirstSweptArena(kind)", "parent": 156, "children": [160, 165], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 58}}, {"id": 160, "type": "field_expression", "text": "zone->arenas.getFirstSweptArena", "parent": 159, "children": [161, 164], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 52}}, {"id": 161, "type": "field_expression", "text": "zone->arenas", "parent": 160, "children": [162, 163], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 33}}, {"id": 162, "type": "identifier", "text": "zone", "parent": 161, "children": [], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 25}}, {"id": 163, "type": "field_identifier", "text": "arenas", "parent": 161, "children": [], "start_point": {"row": 42, "column": 27}, "end_point": {"row": 42, "column": 33}}, {"id": 164, "type": "field_identifier", "text": "getFirstSweptArena", "parent": 160, "children": [], "start_point": {"row": 42, "column": 34}, "end_point": {"row": 42, "column": 52}}, {"id": 165, "type": "argument_list", "text": "(kind)", "parent": 159, "children": [166], "start_point": {"row": 42, "column": 52}, "end_point": {"row": 42, "column": 58}}, {"id": 166, "type": "identifier", "text": "kind", "parent": 165, "children": [], "start_point": {"row": 42, "column": 53}, "end_point": {"row": 42, "column": 57}}, {"id": 167, "type": "if_statement", "text": "if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }", "parent": 105, "children": [168], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 46, "column": 9}}, {"id": 168, "type": "parenthesized_expression", "text": "(!unsweptArena)", "parent": 167, "children": [169], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 26}}, {"id": 169, "type": "unary_expression", "text": "!unsweptArena", "parent": 168, "children": [170, 171], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 25}}, {"id": 170, "type": "!", "text": "!", "parent": 169, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 13}}, {"id": 171, "type": "identifier", "text": "unsweptArena", "parent": 169, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 25}}, {"id": 172, "type": "assignment_expression", "text": "unsweptArena = sweptArena", "parent": 167, "children": [173, 174, 175], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 37}}, {"id": 173, "type": "identifier", "text": "unsweptArena", "parent": 172, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 24}}, {"id": 174, "type": "=", "text": "=", "parent": 172, "children": [], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 26}}, {"id": 175, "type": "identifier", "text": "sweptArena", "parent": 172, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 37}}, {"id": 176, "type": "assignment_expression", "text": "sweptArena = nullptr", "parent": 167, "children": [177, 178, 179], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 32}}, {"id": 177, "type": "identifier", "text": "sweptArena", "parent": 176, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 22}}, {"id": 178, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 45, "column": 23}, "end_point": {"row": 45, "column": 24}}, {"id": 179, "type": "null", "text": "nullptr", "parent": 176, "children": [180], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 32}}, {"id": 180, "type": "nullptr", "text": "nullptr", "parent": 179, "children": [], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 32}}, {"id": 181, "type": "if_statement", "text": "if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }", "parent": 105, "children": [182], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 51, "column": 9}}, {"id": 182, "type": "parenthesized_expression", "text": "(!arena)", "parent": 181, "children": [183], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 19}}, {"id": 183, "type": "unary_expression", "text": "!arena", "parent": 182, "children": [184, 185], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 18}}, {"id": 184, "type": "!", "text": "!", "parent": 183, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 13}}, {"id": 185, "type": "identifier", "text": "arena", "parent": 183, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 18}}, {"id": 186, "type": "assignment_expression", "text": "arena = unsweptArena", "parent": 181, "children": [187, 188, 189], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 32}}, {"id": 187, "type": "identifier", "text": "arena", "parent": 186, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 17}}, {"id": 188, "type": "=", "text": "=", "parent": 186, "children": [], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 19}}, {"id": 189, "type": "identifier", "text": "unsweptArena", "parent": 186, "children": [], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 32}}, {"id": 190, "type": "assignment_expression", "text": "unsweptArena = sweptArena", "parent": 181, "children": [191, 192, 193], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 37}}, {"id": 191, "type": "identifier", "text": "unsweptArena", "parent": 190, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 24}}, {"id": 192, "type": "=", "text": "=", "parent": 190, "children": [], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 26}}, {"id": 193, "type": "identifier", "text": "sweptArena", "parent": 190, "children": [], "start_point": {"row": 49, "column": 27}, "end_point": {"row": 49, "column": 37}}, {"id": 194, "type": "assignment_expression", "text": "sweptArena = nullptr", "parent": 181, "children": [195, 196, 197], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 32}}, {"id": 195, "type": "identifier", "text": "sweptArena", "parent": 194, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 22}}, {"id": 196, "type": "=", "text": "=", "parent": 194, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 24}}, {"id": 197, "type": "null", "text": "nullptr", "parent": 194, "children": [198], "start_point": {"row": 50, "column": 25}, "end_point": {"row": 50, "column": 32}}, {"id": 198, "type": "nullptr", "text": "nullptr", "parent": 197, "children": [], "start_point": {"row": 50, "column": 25}, "end_point": {"row": 50, "column": 32}}, {"id": 199, "type": "function_definition", "text": "bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }", "parent": 24, "children": [200, 201, 204, 208, 212], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 62, "column": 5}}, {"id": 200, "type": "primitive_type", "text": "bool", "parent": 199, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 8}}, {"id": 201, "type": "function_declarator", "text": "done()", "parent": 199, "children": [202, 203], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 15}}, {"id": 202, "type": "identifier", "text": "done", "parent": 201, "children": [], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 13}}, {"id": 203, "type": "parameter_list", "text": "()", "parent": 201, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 15}}, {"id": 204, "type": "declaration", "text": "const {\n MOZ_ASSERT(initialized);", "parent": 199, "children": [205, 206], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 55, "column": 32}}, {"id": 205, "type": "type_identifier", "text": "MOZ_ASSERT", "parent": 204, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 18}}, {"id": 206, "type": "parenthesized_declarator", "text": "(initialized)", "parent": 204, "children": [207], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 31}}, {"id": 207, "type": "identifier", "text": "initialized", "parent": 206, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 30}}, {"id": 208, "type": "declaration", "text": "return !arena;", "parent": 199, "children": [209, 211], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 22}}, {"id": 209, "type": "ERROR", "text": "!", "parent": 208, "children": [210], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 16}}, {"id": 210, "type": "!", "text": "!", "parent": 209, "children": [], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 16}}, {"id": 211, "type": "identifier", "text": "arena", "parent": 208, "children": [], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 21}}, {"id": 212, "type": "ERROR", "text": "}\n\n Arena* get() const", "parent": 199, "children": [213, 214], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 59, "column": 22}}, {"id": 213, "type": "type_identifier", "text": "Arena", "parent": 212, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 9}}, {"id": 214, "type": "pointer_declarator", "text": "* get() const", "parent": 212, "children": [215, 216], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 22}}, {"id": 215, "type": "*", "text": "*", "parent": 214, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 10}}, {"id": 216, "type": "function_declarator", "text": "get() const", "parent": 214, "children": [217, 218], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 22}}, {"id": 217, "type": "identifier", "text": "get", "parent": 216, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 14}}, {"id": 218, "type": "parameter_list", "text": "()", "parent": 216, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 16}}, {"id": 219, "type": "call_expression", "text": "MOZ_ASSERT(!done())", "parent": 199, "children": [220, 221], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 27}}, {"id": 220, "type": "identifier", "text": "MOZ_ASSERT", "parent": 219, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 18}}, {"id": 221, "type": "argument_list", "text": "(!done())", "parent": 219, "children": [222], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 27}}, {"id": 222, "type": "unary_expression", "text": "!done()", "parent": 221, "children": [223, 224], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 26}}, {"id": 223, "type": "!", "text": "!", "parent": 222, "children": [], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 20}}, {"id": 224, "type": "call_expression", "text": "done()", "parent": 222, "children": [225, 226], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 26}}, {"id": 225, "type": "identifier", "text": "done", "parent": 224, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 24}}, {"id": 226, "type": "argument_list", "text": "()", "parent": 224, "children": [], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 26}}, {"id": 227, "type": "return_statement", "text": "return arena;", "parent": 199, "children": [228], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 21}}, {"id": 228, "type": "identifier", "text": "arena", "parent": 227, "children": [], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 20}}, {"id": 229, "type": "function_definition", "text": "void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }", "parent": 24, "children": [230, 231], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 72, "column": 5}}, {"id": 230, "type": "primitive_type", "text": "void", "parent": 229, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 8}}, {"id": 231, "type": "function_declarator", "text": "next()", "parent": 229, "children": [232, 233], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 15}}, {"id": 232, "type": "identifier", "text": "next", "parent": 231, "children": [], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 13}}, {"id": 233, "type": "parameter_list", "text": "()", "parent": 231, "children": [], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 15}}, {"id": 234, "type": "call_expression", "text": "MOZ_ASSERT(!done())", "parent": 229, "children": [235, 236], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 27}}, {"id": 235, "type": "identifier", "text": "MOZ_ASSERT", "parent": 234, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 18}}, {"id": 236, "type": "argument_list", "text": "(!done())", "parent": 234, "children": [237], "start_point": {"row": 65, "column": 18}, "end_point": {"row": 65, "column": 27}}, {"id": 237, "type": "unary_expression", "text": "!done()", "parent": 236, "children": [238, 239], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 26}}, {"id": 238, "type": "!", "text": "!", "parent": 237, "children": [], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 20}}, {"id": 239, "type": "call_expression", "text": "done()", "parent": 237, "children": [240, 241], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 26}}, {"id": 240, "type": "identifier", "text": "done", "parent": 239, "children": [], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 24}}, {"id": 241, "type": "argument_list", "text": "()", "parent": 239, "children": [], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 26}}, {"id": 242, "type": "assignment_expression", "text": "arena = arena->next", "parent": 229, "children": [243, 244, 245], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 27}}, {"id": 243, "type": "identifier", "text": "arena", "parent": 242, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 13}}, {"id": 244, "type": "=", "text": "=", "parent": 242, "children": [], "start_point": {"row": 66, "column": 14}, "end_point": {"row": 66, "column": 15}}, {"id": 245, "type": "field_expression", "text": "arena->next", "parent": 242, "children": [246, 247], "start_point": {"row": 66, "column": 16}, "end_point": {"row": 66, "column": 27}}, {"id": 246, "type": "identifier", "text": "arena", "parent": 245, "children": [], "start_point": {"row": 66, "column": 16}, "end_point": {"row": 66, "column": 21}}, {"id": 247, "type": "field_identifier", "text": "next", "parent": 245, "children": [], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 27}}, {"id": 248, "type": "if_statement", "text": "if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }", "parent": 229, "children": [249], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 71, "column": 9}}, {"id": 249, "type": "parenthesized_expression", "text": "(!arena)", "parent": 248, "children": [250], "start_point": {"row": 67, "column": 11}, "end_point": {"row": 67, "column": 19}}, {"id": 250, "type": "unary_expression", "text": "!arena", "parent": 249, "children": [251, 252], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 18}}, {"id": 251, "type": "!", "text": "!", "parent": 250, "children": [], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 13}}, {"id": 252, "type": "identifier", "text": "arena", "parent": 250, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 18}}, {"id": 253, "type": "assignment_expression", "text": "arena = unsweptArena", "parent": 248, "children": [254, 255, 256], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 32}}, {"id": 254, "type": "identifier", "text": "arena", "parent": 253, "children": [], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 17}}, {"id": 255, "type": "=", "text": "=", "parent": 253, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 19}}, {"id": 256, "type": "identifier", "text": "unsweptArena", "parent": 253, "children": [], "start_point": {"row": 68, "column": 20}, "end_point": {"row": 68, "column": 32}}, {"id": 257, "type": "assignment_expression", "text": "unsweptArena = sweptArena", "parent": 248, "children": [258, 259, 260], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 37}}, {"id": 258, "type": "identifier", "text": "unsweptArena", "parent": 257, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 24}}, {"id": 259, "type": "=", "text": "=", "parent": 257, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 26}}, {"id": 260, "type": "identifier", "text": "sweptArena", "parent": 257, "children": [], "start_point": {"row": 69, "column": 27}, "end_point": {"row": 69, "column": 37}}, {"id": 261, "type": "assignment_expression", "text": "sweptArena = nullptr", "parent": 248, "children": [262, 263, 264], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 32}}, {"id": 262, "type": "identifier", "text": "sweptArena", "parent": 261, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 22}}, {"id": 263, "type": "=", "text": "=", "parent": 261, "children": [], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 24}}, {"id": 264, "type": "null", "text": "nullptr", "parent": 261, "children": [265], "start_point": {"row": 70, "column": 25}, "end_point": {"row": 70, "column": 32}}, {"id": 265, "type": "nullptr", "text": "nullptr", "parent": 264, "children": [], "start_point": {"row": 70, "column": 25}, "end_point": {"row": 70, "column": 32}}, {"id": 266, "type": "enum_specifier", "text": "enum CellIterNeedsBarrier : uint8_t\n{\n CellIterDoesntNeedBarrier = 0,\n CellIterMayNeedBarrier = 1\n}", "parent": 21, "children": [267, 268, 269, 270], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 79, "column": 1}}, {"id": 267, "type": "enum", "text": "enum", "parent": 266, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 4}}, {"id": 268, "type": "type_identifier", "text": "CellIterNeedsBarrier", "parent": 266, "children": [], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 25}}, {"id": 269, "type": "primitive_type", "text": "uint8_t", "parent": 266, "children": [], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 35}}, {"id": 270, "type": "enumerator_list", "text": "{\n CellIterDoesntNeedBarrier = 0,\n CellIterMayNeedBarrier = 1\n}", "parent": 266, "children": [271, 275], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 79, "column": 1}}, {"id": 271, "type": "enumerator", "text": "CellIterDoesntNeedBarrier = 0", "parent": 270, "children": [272, 273, 274], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 33}}, {"id": 272, "type": "identifier", "text": "CellIterDoesntNeedBarrier", "parent": 271, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 29}}, {"id": 273, "type": "=", "text": "=", "parent": 271, "children": [], "start_point": {"row": 77, "column": 30}, "end_point": {"row": 77, "column": 31}}, {"id": 274, "type": "number_literal", "text": "0", "parent": 271, "children": [], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 77, "column": 33}}, {"id": 275, "type": "enumerator", "text": "CellIterMayNeedBarrier = 1", "parent": 270, "children": [276, 277, 278], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 30}}, {"id": 276, "type": "identifier", "text": "CellIterMayNeedBarrier", "parent": 275, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 26}}, {"id": 277, "type": "=", "text": "=", "parent": 275, "children": [], "start_point": {"row": 78, "column": 27}, "end_point": {"row": 78, "column": 28}}, {"id": 278, "type": "number_literal", "text": "1", "parent": 275, "children": [], "start_point": {"row": 78, "column": 29}, "end_point": {"row": 78, "column": 30}}, {"id": 279, "type": "function_definition", "text": "class ArenaCellIterImpl\n{\n size_t firstThingOffset;\n size_t thingSize;\n Arena* arenaAddr;\n FreeSpan span;\n uint_fast16_t thing;\n JS::TraceKind traceKind;\n bool needsBarrier;\n mozilla::DebugOnly<bool> initialized;\n\n // Upon entry, |thing| points to any thing (free or used) and finds the\n // first used thing, which may be |thing|.\n void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }\n\n public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}\n\n explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }\n\n void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }\n\n // Use this to move from an Arena of a particular kind to another Arena of\n // the same kind.\n void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }\n\n template<typename T> T* get() const {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);\n return reinterpret_cast<T*>(getCell());\n }\n\n void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }\n}", "parent": 21, "children": [280], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 180, "column": 1}}, {"id": 280, "type": "identifier", "text": "ArenaCellIterImpl", "parent": 279, "children": [], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 23}}, {"id": 281, "type": "declaration", "text": "size_t firstThingOffset;", "parent": 279, "children": [282, 283], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 28}}, {"id": 282, "type": "primitive_type", "text": "size_t", "parent": 281, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 10}}, {"id": 283, "type": "identifier", "text": "firstThingOffset", "parent": 281, "children": [], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 27}}, {"id": 284, "type": "declaration", "text": "size_t thingSize;", "parent": 279, "children": [285, 286], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 21}}, {"id": 285, "type": "primitive_type", "text": "size_t", "parent": 284, "children": [], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 10}}, {"id": 286, "type": "identifier", "text": "thingSize", "parent": 284, "children": [], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 20}}, {"id": 287, "type": "declaration", "text": "Arena* arenaAddr;", "parent": 279, "children": [288, 289], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 21}}, {"id": 288, "type": "type_identifier", "text": "Arena", "parent": 287, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 9}}, {"id": 289, "type": "pointer_declarator", "text": "* arenaAddr", "parent": 287, "children": [290, 291], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 20}}, {"id": 290, "type": "*", "text": "*", "parent": 289, "children": [], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 10}}, {"id": 291, "type": "identifier", "text": "arenaAddr", "parent": 289, "children": [], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 85, "column": 20}}, {"id": 292, "type": "declaration", "text": "FreeSpan span;", "parent": 279, "children": [293, 294], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 18}}, {"id": 293, "type": "type_identifier", "text": "FreeSpan", "parent": 292, "children": [], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 12}}, {"id": 294, "type": "identifier", "text": "span", "parent": 292, "children": [], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 17}}, {"id": 295, "type": "declaration", "text": "uint_fast16_t thing;", "parent": 279, "children": [296, 297], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 24}}, {"id": 296, "type": "type_identifier", "text": "uint_fast16_t", "parent": 295, "children": [], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 17}}, {"id": 297, "type": "identifier", "text": "thing", "parent": 295, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 23}}, {"id": 298, "type": "labeled_statement", "text": "JS::TraceKind traceKind;", "parent": 279, "children": [299, 300], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 28}}, {"id": 299, "type": "statement_identifier", "text": "JS", "parent": 298, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 6}}, {"id": 300, "type": "declaration", "text": "TraceKind traceKind;", "parent": 298, "children": [301, 302], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 28}}, {"id": 301, "type": "type_identifier", "text": "TraceKind", "parent": 300, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 17}}, {"id": 302, "type": "identifier", "text": "traceKind", "parent": 300, "children": [], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 27}}, {"id": 303, "type": "declaration", "text": "bool needsBarrier;", "parent": 279, "children": [304, 305], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 22}}, {"id": 304, "type": "primitive_type", "text": "bool", "parent": 303, "children": [], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 8}}, {"id": 305, "type": "identifier", "text": "needsBarrier", "parent": 303, "children": [], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 21}}, {"id": 306, "type": "labeled_statement", "text": "mozilla::DebugOnly<bool> initialized;", "parent": 279, "children": [307], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 41}}, {"id": 307, "type": "statement_identifier", "text": "mozilla", "parent": 306, "children": [], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 11}}, {"id": 308, "type": "binary_expression", "text": "DebugOnly<bool> initialized", "parent": 306, "children": [309, 313, 314], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 40}}, {"id": 309, "type": "binary_expression", "text": "DebugOnly<bool", "parent": 308, "children": [310, 311, 312], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 27}}, {"id": 310, "type": "identifier", "text": "DebugOnly", "parent": 309, "children": [], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 22}}, {"id": 311, "type": "<", "text": "<", "parent": 309, "children": [], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 23}}, {"id": 312, "type": "identifier", "text": "bool", "parent": 309, "children": [], "start_point": {"row": 90, "column": 23}, "end_point": {"row": 90, "column": 27}}, {"id": 313, "type": ">", "text": ">", "parent": 308, "children": [], "start_point": {"row": 90, "column": 27}, "end_point": {"row": 90, "column": 28}}, {"id": 314, "type": "identifier", "text": "initialized", "parent": 308, "children": [], "start_point": {"row": 90, "column": 29}, "end_point": {"row": 90, "column": 40}}, {"id": 315, "type": "function_definition", "text": "void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }", "parent": 279, "children": [316, 317], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 105, "column": 5}}, {"id": 316, "type": "primitive_type", "text": "void", "parent": 315, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 8}}, {"id": 317, "type": "function_declarator", "text": "moveForwardIfFree()", "parent": 315, "children": [318, 319], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 28}}, {"id": 318, "type": "identifier", "text": "moveForwardIfFree", "parent": 317, "children": [], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 26}}, {"id": 319, "type": "parameter_list", "text": "()", "parent": 317, "children": [], "start_point": {"row": 94, "column": 26}, "end_point": {"row": 94, "column": 28}}, {"id": 320, "type": "call_expression", "text": "MOZ_ASSERT(!done())", "parent": 315, "children": [321, 322], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 27}}, {"id": 321, "type": "identifier", "text": "MOZ_ASSERT", "parent": 320, "children": [], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 18}}, {"id": 322, "type": "argument_list", "text": "(!done())", "parent": 320, "children": [323], "start_point": {"row": 95, "column": 18}, "end_point": {"row": 95, "column": 27}}, {"id": 323, "type": "unary_expression", "text": "!done()", "parent": 322, "children": [324, 325], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 26}}, {"id": 324, "type": "!", "text": "!", "parent": 323, "children": [], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 20}}, {"id": 325, "type": "call_expression", "text": "done()", "parent": 323, "children": [326, 327], "start_point": {"row": 95, "column": 20}, "end_point": {"row": 95, "column": 26}}, {"id": 326, "type": "identifier", "text": "done", "parent": 325, "children": [], "start_point": {"row": 95, "column": 20}, "end_point": {"row": 95, "column": 24}}, {"id": 327, "type": "argument_list", "text": "()", "parent": 325, "children": [], "start_point": {"row": 95, "column": 24}, "end_point": {"row": 95, "column": 26}}, {"id": 328, "type": "call_expression", "text": "MOZ_ASSERT(thing)", "parent": 315, "children": [329, 330], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 25}}, {"id": 329, "type": "identifier", "text": "MOZ_ASSERT", "parent": 328, "children": [], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 18}}, {"id": 330, "type": "argument_list", "text": "(thing)", "parent": 328, "children": [331], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 25}}, {"id": 331, "type": "identifier", "text": "thing", "parent": 330, "children": [], "start_point": {"row": 96, "column": 19}, "end_point": {"row": 96, "column": 24}}, {"id": 332, "type": "if_statement", "text": "if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }", "parent": 315, "children": [333], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 104, "column": 9}}, {"id": 333, "type": "parenthesized_expression", "text": "(thing == span.first)", "parent": 332, "children": [334], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 32}}, {"id": 334, "type": "binary_expression", "text": "thing == span.first", "parent": 333, "children": [335, 336, 337], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 31}}, {"id": 335, "type": "identifier", "text": "thing", "parent": 334, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 17}}, {"id": 336, "type": "==", "text": "==", "parent": 334, "children": [], "start_point": {"row": 101, "column": 18}, "end_point": {"row": 101, "column": 20}}, {"id": 337, "type": "field_expression", "text": "span.first", "parent": 334, "children": [338, 339], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 31}}, {"id": 338, "type": "identifier", "text": "span", "parent": 337, "children": [], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 25}}, {"id": 339, "type": "field_identifier", "text": "first", "parent": 337, "children": [], "start_point": {"row": 101, "column": 26}, "end_point": {"row": 101, "column": 31}}, {"id": 340, "type": "assignment_expression", "text": "thing = span.last + thingSize", "parent": 332, "children": [341, 342, 343], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 41}}, {"id": 341, "type": "identifier", "text": "thing", "parent": 340, "children": [], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 17}}, {"id": 342, "type": "=", "text": "=", "parent": 340, "children": [], "start_point": {"row": 102, "column": 18}, "end_point": {"row": 102, "column": 19}}, {"id": 343, "type": "binary_expression", "text": "span.last + thingSize", "parent": 340, "children": [344, 347, 348], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 41}}, {"id": 344, "type": "field_expression", "text": "span.last", "parent": 343, "children": [345, 346], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 29}}, {"id": 345, "type": "identifier", "text": "span", "parent": 344, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 24}}, {"id": 346, "type": "field_identifier", "text": "last", "parent": 344, "children": [], "start_point": {"row": 102, "column": 25}, "end_point": {"row": 102, "column": 29}}, {"id": 347, "type": "+", "text": "+", "parent": 343, "children": [], "start_point": {"row": 102, "column": 30}, "end_point": {"row": 102, "column": 31}}, {"id": 348, "type": "identifier", "text": "thingSize", "parent": 343, "children": [], "start_point": {"row": 102, "column": 32}, "end_point": {"row": 102, "column": 41}}, {"id": 349, "type": "assignment_expression", "text": "span = *span.nextSpan(arenaAddr)", "parent": 332, "children": [350, 351, 352], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 103, "column": 44}}, {"id": 350, "type": "identifier", "text": "span", "parent": 349, "children": [], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 103, "column": 16}}, {"id": 351, "type": "=", "text": "=", "parent": 349, "children": [], "start_point": {"row": 103, "column": 17}, "end_point": {"row": 103, "column": 18}}, {"id": 352, "type": "pointer_expression", "text": "*span.nextSpan(arenaAddr)", "parent": 349, "children": [353, 354], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 44}}, {"id": 353, "type": "*", "text": "*", "parent": 352, "children": [], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 20}}, {"id": 354, "type": "call_expression", "text": "span.nextSpan(arenaAddr)", "parent": 352, "children": [355, 358], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 44}}, {"id": 355, "type": "field_expression", "text": "span.nextSpan", "parent": 354, "children": [356, 357], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 33}}, {"id": 356, "type": "identifier", "text": "span", "parent": 355, "children": [], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 24}}, {"id": 357, "type": "field_identifier", "text": "nextSpan", "parent": 355, "children": [], "start_point": {"row": 103, "column": 25}, "end_point": {"row": 103, "column": 33}}, {"id": 358, "type": "argument_list", "text": "(arenaAddr)", "parent": 354, "children": [359], "start_point": {"row": 103, "column": 33}, "end_point": {"row": 103, "column": 44}}, {"id": 359, "type": "identifier", "text": "arenaAddr", "parent": 358, "children": [], "start_point": {"row": 103, "column": 34}, "end_point": {"row": 103, "column": 43}}, {"id": 360, "type": "labeled_statement", "text": "public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}", "parent": 279, "children": [361, 365], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 116, "column": 6}}, {"id": 361, "type": "ERROR", "text": ":\n ArenaCellIterImpl()", "parent": 360, "children": [362], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 108, "column": 23}}, {"id": 362, "type": "call_expression", "text": "ArenaCellIterImpl()", "parent": 361, "children": [363, 364], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 23}}, {"id": 363, "type": "identifier", "text": "ArenaCellIterImpl", "parent": 362, "children": [], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 21}}, {"id": 364, "type": "argument_list", "text": "()", "parent": 362, "children": [], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 23}}, {"id": 365, "type": "ERROR", "text": "firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)", "parent": 360, "children": [366, 370, 374], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 115, "column": 26}}, {"id": 366, "type": "call_expression", "text": "firstThingOffset(0)", "parent": 365, "children": [367, 368], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 27}}, {"id": 367, "type": "identifier", "text": "firstThingOffset", "parent": 366, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 24}}, {"id": 368, "type": "argument_list", "text": "(0)", "parent": 366, "children": [369], "start_point": {"row": 109, "column": 24}, "end_point": {"row": 109, "column": 27}}, {"id": 369, "type": "number_literal", "text": "0", "parent": 368, "children": [], "start_point": {"row": 109, "column": 25}, "end_point": {"row": 109, "column": 26}}, {"id": 370, "type": "call_expression", "text": "thingSize(0)", "parent": 365, "children": [371, 372], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 20}}, {"id": 371, "type": "identifier", "text": "thingSize", "parent": 370, "children": [], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 17}}, {"id": 372, "type": "argument_list", "text": "(0)", "parent": 370, "children": [373], "start_point": {"row": 110, "column": 17}, "end_point": {"row": 110, "column": 20}}, {"id": 373, "type": "number_literal", "text": "0", "parent": 372, "children": [], "start_point": {"row": 110, "column": 18}, "end_point": {"row": 110, "column": 19}}, {"id": 374, "type": "comma_expression", "text": "arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)", "parent": 365, "children": [375, 380], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 115, "column": 26}}, {"id": 375, "type": "call_expression", "text": "arenaAddr(nullptr)", "parent": 374, "children": [376, 377], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 26}}, {"id": 376, "type": "identifier", "text": "arenaAddr", "parent": 375, "children": [], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 17}}, {"id": 377, "type": "argument_list", "text": "(nullptr)", "parent": 375, "children": [378], "start_point": {"row": 111, "column": 17}, "end_point": {"row": 111, "column": 26}}, {"id": 378, "type": "null", "text": "nullptr", "parent": 377, "children": [379], "start_point": {"row": 111, "column": 18}, "end_point": {"row": 111, "column": 25}}, {"id": 379, "type": "nullptr", "text": "nullptr", "parent": 378, "children": [], "start_point": {"row": 111, "column": 18}, "end_point": {"row": 111, "column": 25}}, {"id": 380, "type": "comma_expression", "text": "thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)", "parent": 374, "children": [381, 385], "start_point": {"row": 112, "column": 8}, "end_point": {"row": 115, "column": 26}}, {"id": 381, "type": "call_expression", "text": "thing(0)", "parent": 380, "children": [382, 383], "start_point": {"row": 112, "column": 8}, "end_point": {"row": 112, "column": 16}}, {"id": 382, "type": "identifier", "text": "thing", "parent": 381, "children": [], "start_point": {"row": 112, "column": 8}, "end_point": {"row": 112, "column": 13}}, {"id": 383, "type": "argument_list", "text": "(0)", "parent": 381, "children": [384], "start_point": {"row": 112, "column": 13}, "end_point": {"row": 112, "column": 16}}, {"id": 384, "type": "number_literal", "text": "0", "parent": 383, "children": [], "start_point": {"row": 112, "column": 14}, "end_point": {"row": 112, "column": 15}}, {"id": 385, "type": "comma_expression", "text": "traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)", "parent": 380, "children": [386, 393], "start_point": {"row": 113, "column": 8}, "end_point": {"row": 115, "column": 26}}, {"id": 386, "type": "call_expression", "text": "traceKind(JS::TraceKind::Null)", "parent": 385, "children": [387, 388], "start_point": {"row": 113, "column": 8}, "end_point": {"row": 113, "column": 38}}, {"id": 387, "type": "identifier", "text": "traceKind", "parent": 386, "children": [], "start_point": {"row": 113, "column": 8}, "end_point": {"row": 113, "column": 17}}, {"id": 388, "type": "argument_list", "text": "(JS::TraceKind::Null)", "parent": 386, "children": [389, 392], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 38}}, {"id": 389, "type": "ERROR", "text": "JS::TraceKind::", "parent": 388, "children": [390, 391], "start_point": {"row": 113, "column": 18}, "end_point": {"row": 113, "column": 33}}, {"id": 390, "type": "identifier", "text": "JS", "parent": 389, "children": [], "start_point": {"row": 113, "column": 18}, "end_point": {"row": 113, "column": 20}}, {"id": 391, "type": "identifier", "text": "TraceKind", "parent": 389, "children": [], "start_point": {"row": 113, "column": 22}, "end_point": {"row": 113, "column": 31}}, {"id": 392, "type": "identifier", "text": "Null", "parent": 388, "children": [], "start_point": {"row": 113, "column": 33}, "end_point": {"row": 113, "column": 37}}, {"id": 393, "type": "comma_expression", "text": "needsBarrier(false),\n initialized(false)", "parent": 385, "children": [394, 398], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 115, "column": 26}}, {"id": 394, "type": "call_expression", "text": "needsBarrier(false)", "parent": 393, "children": [395, 396], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 27}}, {"id": 395, "type": "identifier", "text": "needsBarrier", "parent": 394, "children": [], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 20}}, {"id": 396, "type": "argument_list", "text": "(false)", "parent": 394, "children": [397], "start_point": {"row": 114, "column": 20}, "end_point": {"row": 114, "column": 27}}, {"id": 397, "type": "false", "text": "false", "parent": 396, "children": [], "start_point": {"row": 114, "column": 21}, "end_point": {"row": 114, "column": 26}}, {"id": 398, "type": "call_expression", "text": "initialized(false)", "parent": 393, "children": [399, 400], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 26}}, {"id": 399, "type": "identifier", "text": "initialized", "parent": 398, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 19}}, {"id": 400, "type": "argument_list", "text": "(false)", "parent": 398, "children": [401], "start_point": {"row": 115, "column": 19}, "end_point": {"row": 115, "column": 26}}, {"id": 401, "type": "false", "text": "false", "parent": 400, "children": [], "start_point": {"row": 115, "column": 20}, "end_point": {"row": 115, "column": 25}}, {"id": 402, "type": "function_definition", "text": "explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }", "parent": 279, "children": [403, 404], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 122, "column": 5}}, {"id": 403, "type": "type_identifier", "text": "explicit", "parent": 402, "children": [], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 12}}, {"id": 404, "type": "function_declarator", "text": "ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)", "parent": 402, "children": [405, 406, 415], "start_point": {"row": 118, "column": 13}, "end_point": {"row": 119, "column": 26}}, {"id": 405, "type": "identifier", "text": "ArenaCellIterImpl", "parent": 404, "children": [], "start_point": {"row": 118, "column": 13}, "end_point": {"row": 118, "column": 30}}, {"id": 406, "type": "parameter_list", "text": "(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)", "parent": 404, "children": [407, 412], "start_point": {"row": 118, "column": 30}, "end_point": {"row": 118, "column": 81}}, {"id": 407, "type": "parameter_declaration", "text": "Arena* arena", "parent": 406, "children": [408, 409], "start_point": {"row": 118, "column": 31}, "end_point": {"row": 118, "column": 43}}, {"id": 408, "type": "type_identifier", "text": "Arena", "parent": 407, "children": [], "start_point": {"row": 118, "column": 31}, "end_point": {"row": 118, "column": 36}}, {"id": 409, "type": "pointer_declarator", "text": "* arena", "parent": 407, "children": [410, 411], "start_point": {"row": 118, "column": 36}, "end_point": {"row": 118, "column": 43}}, {"id": 410, "type": "*", "text": "*", "parent": 409, "children": [], "start_point": {"row": 118, "column": 36}, "end_point": {"row": 118, "column": 37}}, {"id": 411, "type": "identifier", "text": "arena", "parent": 409, "children": [], "start_point": {"row": 118, "column": 38}, "end_point": {"row": 118, "column": 43}}, {"id": 412, "type": "parameter_declaration", "text": "CellIterNeedsBarrier mayNeedBarrier", "parent": 406, "children": [413, 414], "start_point": {"row": 118, "column": 45}, "end_point": {"row": 118, "column": 80}}, {"id": 413, "type": "type_identifier", "text": "CellIterNeedsBarrier", "parent": 412, "children": [], "start_point": {"row": 118, "column": 45}, "end_point": {"row": 118, "column": 65}}, {"id": 414, "type": "identifier", "text": "mayNeedBarrier", "parent": 412, "children": [], "start_point": {"row": 118, "column": 66}, "end_point": {"row": 118, "column": 80}}, {"id": 415, "type": "call_expression", "text": "initialized(false)", "parent": 404, "children": [416, 417], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 119, "column": 26}}, {"id": 416, "type": "identifier", "text": "initialized", "parent": 415, "children": [], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 119, "column": 19}}, {"id": 417, "type": "argument_list", "text": "(false)", "parent": 415, "children": [418], "start_point": {"row": 119, "column": 19}, "end_point": {"row": 119, "column": 26}}, {"id": 418, "type": "identifier", "text": "false", "parent": 417, "children": [], "start_point": {"row": 119, "column": 20}, "end_point": {"row": 119, "column": 25}}, {"id": 419, "type": "call_expression", "text": "init(arena, mayNeedBarrier)", "parent": 402, "children": [420, 421], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 35}}, {"id": 420, "type": "identifier", "text": "init", "parent": 419, "children": [], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 12}}, {"id": 421, "type": "argument_list", "text": "(arena, mayNeedBarrier)", "parent": 419, "children": [422, 423], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 35}}, {"id": 422, "type": "identifier", "text": "arena", "parent": 421, "children": [], "start_point": {"row": 121, "column": 13}, "end_point": {"row": 121, "column": 18}}, {"id": 423, "type": "identifier", "text": "mayNeedBarrier", "parent": 421, "children": [], "start_point": {"row": 121, "column": 20}, "end_point": {"row": 121, "column": 34}}, {"id": 424, "type": "function_definition", "text": "void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }", "parent": 279, "children": [425, 426], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 134, "column": 5}}, {"id": 425, "type": "primitive_type", "text": "void", "parent": 424, "children": [], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 8}}, {"id": 426, "type": "function_declarator", "text": "init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)", "parent": 424, "children": [427, 428], "start_point": {"row": 124, "column": 9}, "end_point": {"row": 124, "column": 64}}, {"id": 427, "type": "identifier", "text": "init", "parent": 426, "children": [], "start_point": {"row": 124, "column": 9}, "end_point": {"row": 124, "column": 13}}, {"id": 428, "type": "parameter_list", "text": "(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)", "parent": 426, "children": [429, 434], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 64}}, {"id": 429, "type": "parameter_declaration", "text": "Arena* arena", "parent": 428, "children": [430, 431], "start_point": {"row": 124, "column": 14}, "end_point": {"row": 124, "column": 26}}, {"id": 430, "type": "type_identifier", "text": "Arena", "parent": 429, "children": [], "start_point": {"row": 124, "column": 14}, "end_point": {"row": 124, "column": 19}}, {"id": 431, "type": "pointer_declarator", "text": "* arena", "parent": 429, "children": [432, 433], "start_point": {"row": 124, "column": 19}, "end_point": {"row": 124, "column": 26}}, {"id": 432, "type": "*", "text": "*", "parent": 431, "children": [], "start_point": {"row": 124, "column": 19}, "end_point": {"row": 124, "column": 20}}, {"id": 433, "type": "identifier", "text": "arena", "parent": 431, "children": [], "start_point": {"row": 124, "column": 21}, "end_point": {"row": 124, "column": 26}}, {"id": 434, "type": "parameter_declaration", "text": "CellIterNeedsBarrier mayNeedBarrier", "parent": 428, "children": [435, 436], "start_point": {"row": 124, "column": 28}, "end_point": {"row": 124, "column": 63}}, {"id": 435, "type": "type_identifier", "text": "CellIterNeedsBarrier", "parent": 434, "children": [], "start_point": {"row": 124, "column": 28}, "end_point": {"row": 124, "column": 48}}, {"id": 436, "type": "identifier", "text": "mayNeedBarrier", "parent": 434, "children": [], "start_point": {"row": 124, "column": 49}, "end_point": {"row": 124, "column": 63}}, {"id": 437, "type": "call_expression", "text": "MOZ_ASSERT(!initialized)", "parent": 424, "children": [438, 439], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 32}}, {"id": 438, "type": "identifier", "text": "MOZ_ASSERT", "parent": 437, "children": [], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 18}}, {"id": 439, "type": "argument_list", "text": "(!initialized)", "parent": 437, "children": [440], "start_point": {"row": 125, "column": 18}, "end_point": {"row": 125, "column": 32}}, {"id": 440, "type": "unary_expression", "text": "!initialized", "parent": 439, "children": [441, 442], "start_point": {"row": 125, "column": 19}, "end_point": {"row": 125, "column": 31}}, {"id": 441, "type": "!", "text": "!", "parent": 440, "children": [], "start_point": {"row": 125, "column": 19}, "end_point": {"row": 125, "column": 20}}, {"id": 442, "type": "identifier", "text": "initialized", "parent": 440, "children": [], "start_point": {"row": 125, "column": 20}, "end_point": {"row": 125, "column": 31}}, {"id": 443, "type": "call_expression", "text": "MOZ_ASSERT(arena)", "parent": 424, "children": [444, 445], "start_point": {"row": 126, "column": 8}, "end_point": {"row": 126, "column": 25}}, {"id": 444, "type": "identifier", "text": "MOZ_ASSERT", "parent": 443, "children": [], "start_point": {"row": 126, "column": 8}, "end_point": {"row": 126, "column": 18}}, {"id": 445, "type": "argument_list", "text": "(arena)", "parent": 443, "children": [446], "start_point": {"row": 126, "column": 18}, "end_point": {"row": 126, "column": 25}}, {"id": 446, "type": "identifier", "text": "arena", "parent": 445, "children": [], "start_point": {"row": 126, "column": 19}, "end_point": {"row": 126, "column": 24}}, {"id": 447, "type": "assignment_expression", "text": "initialized = true", "parent": 424, "children": [448, 449, 450], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 26}}, {"id": 448, "type": "identifier", "text": "initialized", "parent": 447, "children": [], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 19}}, {"id": 449, "type": "=", "text": "=", "parent": 447, "children": [], "start_point": {"row": 127, "column": 20}, "end_point": {"row": 127, "column": 21}}, {"id": 450, "type": "true", "text": "true", "parent": 447, "children": [], "start_point": {"row": 127, "column": 22}, "end_point": {"row": 127, "column": 26}}, {"id": 451, "type": "declaration", "text": "AllocKind kind = arena->getAllocKind();", "parent": 424, "children": [452, 453], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 47}}, {"id": 452, "type": "type_identifier", "text": "AllocKind", "parent": 451, "children": [], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 17}}, {"id": 453, "type": "init_declarator", "text": "kind = arena->getAllocKind()", "parent": 451, "children": [454, 455, 456], "start_point": {"row": 128, "column": 18}, "end_point": {"row": 128, "column": 46}}, {"id": 454, "type": "identifier", "text": "kind", "parent": 453, "children": [], "start_point": {"row": 128, "column": 18}, "end_point": {"row": 128, "column": 22}}, {"id": 455, "type": "=", "text": "=", "parent": 453, "children": [], "start_point": {"row": 128, "column": 23}, "end_point": {"row": 128, "column": 24}}, {"id": 456, "type": "call_expression", "text": "arena->getAllocKind()", "parent": 453, "children": [457, 460], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 46}}, {"id": 457, "type": "field_expression", "text": "arena->getAllocKind", "parent": 456, "children": [458, 459], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 44}}, {"id": 458, "type": "identifier", "text": "arena", "parent": 457, "children": [], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 30}}, {"id": 459, "type": "field_identifier", "text": "getAllocKind", "parent": 457, "children": [], "start_point": {"row": 128, "column": 32}, "end_point": {"row": 128, "column": 44}}, {"id": 460, "type": "argument_list", "text": "()", "parent": 456, "children": [], "start_point": {"row": 128, "column": 44}, "end_point": {"row": 128, "column": 46}}, {"id": 461, "type": "ERROR", "text": "firstThingOffset = Arena::", "parent": 424, "children": [462], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 34}}, {"id": 462, "type": "assignment_expression", "text": "firstThingOffset = Arena", "parent": 461, "children": [463, 464, 465], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 32}}, {"id": 463, "type": "identifier", "text": "firstThingOffset", "parent": 462, "children": [], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 24}}, {"id": 464, "type": "=", "text": "=", "parent": 462, "children": [], "start_point": {"row": 129, "column": 25}, "end_point": {"row": 129, "column": 26}}, {"id": 465, "type": "identifier", "text": "Arena", "parent": 462, "children": [], "start_point": {"row": 129, "column": 27}, "end_point": {"row": 129, "column": 32}}, {"id": 466, "type": "call_expression", "text": "firstThingOffset(kind)", "parent": 424, "children": [467, 468], "start_point": {"row": 129, "column": 34}, "end_point": {"row": 129, "column": 56}}, {"id": 467, "type": "identifier", "text": "firstThingOffset", "parent": 466, "children": [], "start_point": {"row": 129, "column": 34}, "end_point": {"row": 129, "column": 50}}, {"id": 468, "type": "argument_list", "text": "(kind)", "parent": 466, "children": [469], "start_point": {"row": 129, "column": 50}, "end_point": {"row": 129, "column": 56}}, {"id": 469, "type": "identifier", "text": "kind", "parent": 468, "children": [], "start_point": {"row": 129, "column": 51}, "end_point": {"row": 129, "column": 55}}, {"id": 470, "type": "ERROR", "text": "thingSize = Arena::", "parent": 424, "children": [471], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 27}}, {"id": 471, "type": "assignment_expression", "text": "thingSize = Arena", "parent": 470, "children": [472, 473, 474], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 25}}, {"id": 472, "type": "identifier", "text": "thingSize", "parent": 471, "children": [], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 17}}, {"id": 473, "type": "=", "text": "=", "parent": 471, "children": [], "start_point": {"row": 130, "column": 18}, "end_point": {"row": 130, "column": 19}}, {"id": 474, "type": "identifier", "text": "Arena", "parent": 471, "children": [], "start_point": {"row": 130, "column": 20}, "end_point": {"row": 130, "column": 25}}, {"id": 475, "type": "call_expression", "text": "thingSize(kind)", "parent": 424, "children": [476, 477], "start_point": {"row": 130, "column": 27}, "end_point": {"row": 130, "column": 42}}, {"id": 476, "type": "identifier", "text": "thingSize", "parent": 475, "children": [], "start_point": {"row": 130, "column": 27}, "end_point": {"row": 130, "column": 36}}, {"id": 477, "type": "argument_list", "text": "(kind)", "parent": 475, "children": [478], "start_point": {"row": 130, "column": 36}, "end_point": {"row": 130, "column": 42}}, {"id": 478, "type": "identifier", "text": "kind", "parent": 477, "children": [], "start_point": {"row": 130, "column": 37}, "end_point": {"row": 130, "column": 41}}, {"id": 479, "type": "assignment_expression", "text": "traceKind = MapAllocToTraceKind(kind)", "parent": 424, "children": [480, 481, 482], "start_point": {"row": 131, "column": 8}, "end_point": {"row": 131, "column": 45}}, {"id": 480, "type": "identifier", "text": "traceKind", "parent": 479, "children": [], "start_point": {"row": 131, "column": 8}, "end_point": {"row": 131, "column": 17}}, {"id": 481, "type": "=", "text": "=", "parent": 479, "children": [], "start_point": {"row": 131, "column": 18}, "end_point": {"row": 131, "column": 19}}, {"id": 482, "type": "call_expression", "text": "MapAllocToTraceKind(kind)", "parent": 479, "children": [483, 484], "start_point": {"row": 131, "column": 20}, "end_point": {"row": 131, "column": 45}}, {"id": 483, "type": "identifier", "text": "MapAllocToTraceKind", "parent": 482, "children": [], "start_point": {"row": 131, "column": 20}, "end_point": {"row": 131, "column": 39}}, {"id": 484, "type": "argument_list", "text": "(kind)", "parent": 482, "children": [485], "start_point": {"row": 131, "column": 39}, "end_point": {"row": 131, "column": 45}}, {"id": 485, "type": "identifier", "text": "kind", "parent": 484, "children": [], "start_point": {"row": 131, "column": 40}, "end_point": {"row": 131, "column": 44}}, {"id": 486, "type": "ERROR", "text": "needsBarrier = mayNeedBarrier && !JS::", "parent": 424, "children": [487], "start_point": {"row": 132, "column": 8}, "end_point": {"row": 132, "column": 46}}, {"id": 487, "type": "assignment_expression", "text": "needsBarrier = mayNeedBarrier && !JS", "parent": 486, "children": [488, 489, 490], "start_point": {"row": 132, "column": 8}, "end_point": {"row": 132, "column": 44}}, {"id": 488, "type": "identifier", "text": "needsBarrier", "parent": 487, "children": [], "start_point": {"row": 132, "column": 8}, "end_point": {"row": 132, "column": 20}}, {"id": 489, "type": "=", "text": "=", "parent": 487, "children": [], "start_point": {"row": 132, "column": 21}, "end_point": {"row": 132, "column": 22}}, {"id": 490, "type": "binary_expression", "text": "mayNeedBarrier && !JS", "parent": 487, "children": [491, 492, 493], "start_point": {"row": 132, "column": 23}, "end_point": {"row": 132, "column": 44}}, {"id": 491, "type": "identifier", "text": "mayNeedBarrier", "parent": 490, "children": [], "start_point": {"row": 132, "column": 23}, "end_point": {"row": 132, "column": 37}}, {"id": 492, "type": "&&", "text": "&&", "parent": 490, "children": [], "start_point": {"row": 132, "column": 38}, "end_point": {"row": 132, "column": 40}}, {"id": 493, "type": "unary_expression", "text": "!JS", "parent": 490, "children": [494, 495], "start_point": {"row": 132, "column": 41}, "end_point": {"row": 132, "column": 44}}, {"id": 494, "type": "!", "text": "!", "parent": 493, "children": [], "start_point": {"row": 132, "column": 41}, "end_point": {"row": 132, "column": 42}}, {"id": 495, "type": "identifier", "text": "JS", "parent": 493, "children": [], "start_point": {"row": 132, "column": 42}, "end_point": {"row": 132, "column": 44}}, {"id": 496, "type": "call_expression", "text": "RuntimeHeapIsCollecting()", "parent": 424, "children": [497, 498], "start_point": {"row": 132, "column": 46}, "end_point": {"row": 132, "column": 71}}, {"id": 497, "type": "identifier", "text": "RuntimeHeapIsCollecting", "parent": 496, "children": [], "start_point": {"row": 132, "column": 46}, "end_point": {"row": 132, "column": 69}}, {"id": 498, "type": "argument_list", "text": "()", "parent": 496, "children": [], "start_point": {"row": 132, "column": 69}, "end_point": {"row": 132, "column": 71}}, {"id": 499, "type": "call_expression", "text": "reset(arena)", "parent": 424, "children": [500, 501], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 20}}, {"id": 500, "type": "identifier", "text": "reset", "parent": 499, "children": [], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 13}}, {"id": 501, "type": "argument_list", "text": "(arena)", "parent": 499, "children": [502], "start_point": {"row": 133, "column": 13}, "end_point": {"row": 133, "column": 20}}, {"id": 502, "type": "identifier", "text": "arena", "parent": 501, "children": [], "start_point": {"row": 133, "column": 14}, "end_point": {"row": 133, "column": 19}}, {"id": 503, "type": "function_definition", "text": "void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }", "parent": 279, "children": [504, 505], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 145, "column": 5}}, {"id": 504, "type": "primitive_type", "text": "void", "parent": 503, "children": [], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 8}}, {"id": 505, "type": "function_declarator", "text": "reset(Arena* arena)", "parent": 503, "children": [506, 507], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 138, "column": 28}}, {"id": 506, "type": "identifier", "text": "reset", "parent": 505, "children": [], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 138, "column": 14}}, {"id": 507, "type": "parameter_list", "text": "(Arena* arena)", "parent": 505, "children": [508], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 28}}, {"id": 508, "type": "parameter_declaration", "text": "Arena* arena", "parent": 507, "children": [509, 510], "start_point": {"row": 138, "column": 15}, "end_point": {"row": 138, "column": 27}}, {"id": 509, "type": "type_identifier", "text": "Arena", "parent": 508, "children": [], "start_point": {"row": 138, "column": 15}, "end_point": {"row": 138, "column": 20}}, {"id": 510, "type": "pointer_declarator", "text": "* arena", "parent": 508, "children": [511, 512], "start_point": {"row": 138, "column": 20}, "end_point": {"row": 138, "column": 27}}, {"id": 511, "type": "*", "text": "*", "parent": 510, "children": [], "start_point": {"row": 138, "column": 20}, "end_point": {"row": 138, "column": 21}}, {"id": 512, "type": "identifier", "text": "arena", "parent": 510, "children": [], "start_point": {"row": 138, "column": 22}, "end_point": {"row": 138, "column": 27}}, {"id": 513, "type": "call_expression", "text": "MOZ_ASSERT(initialized)", "parent": 503, "children": [514, 515], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 31}}, {"id": 514, "type": "identifier", "text": "MOZ_ASSERT", "parent": 513, "children": [], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 18}}, {"id": 515, "type": "argument_list", "text": "(initialized)", "parent": 513, "children": [516], "start_point": {"row": 139, "column": 18}, "end_point": {"row": 139, "column": 31}}, {"id": 516, "type": "identifier", "text": "initialized", "parent": 515, "children": [], "start_point": {"row": 139, "column": 19}, "end_point": {"row": 139, "column": 30}}, {"id": 517, "type": "call_expression", "text": "MOZ_ASSERT(arena)", "parent": 503, "children": [518, 519], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 25}}, {"id": 518, "type": "identifier", "text": "MOZ_ASSERT", "parent": 517, "children": [], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 18}}, {"id": 519, "type": "argument_list", "text": "(arena)", "parent": 517, "children": [520], "start_point": {"row": 140, "column": 18}, "end_point": {"row": 140, "column": 25}}, {"id": 520, "type": "identifier", "text": "arena", "parent": 519, "children": [], "start_point": {"row": 140, "column": 19}, "end_point": {"row": 140, "column": 24}}, {"id": 521, "type": "assignment_expression", "text": "arenaAddr = arena", "parent": 503, "children": [522, 523, 524], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 25}}, {"id": 522, "type": "identifier", "text": "arenaAddr", "parent": 521, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 17}}, {"id": 523, "type": "=", "text": "=", "parent": 521, "children": [], "start_point": {"row": 141, "column": 18}, "end_point": {"row": 141, "column": 19}}, {"id": 524, "type": "identifier", "text": "arena", "parent": 521, "children": [], "start_point": {"row": 141, "column": 20}, "end_point": {"row": 141, "column": 25}}, {"id": 525, "type": "assignment_expression", "text": "span = *arena->getFirstFreeSpan()", "parent": 503, "children": [526, 527, 528], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 41}}, {"id": 526, "type": "identifier", "text": "span", "parent": 525, "children": [], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 12}}, {"id": 527, "type": "=", "text": "=", "parent": 525, "children": [], "start_point": {"row": 142, "column": 13}, "end_point": {"row": 142, "column": 14}}, {"id": 528, "type": "pointer_expression", "text": "*arena->getFirstFreeSpan()", "parent": 525, "children": [529, 530], "start_point": {"row": 142, "column": 15}, "end_point": {"row": 142, "column": 41}}, {"id": 529, "type": "*", "text": "*", "parent": 528, "children": [], "start_point": {"row": 142, "column": 15}, "end_point": {"row": 142, "column": 16}}, {"id": 530, "type": "call_expression", "text": "arena->getFirstFreeSpan()", "parent": 528, "children": [531, 534], "start_point": {"row": 142, "column": 16}, "end_point": {"row": 142, "column": 41}}, {"id": 531, "type": "field_expression", "text": "arena->getFirstFreeSpan", "parent": 530, "children": [532, 533], "start_point": {"row": 142, "column": 16}, "end_point": {"row": 142, "column": 39}}, {"id": 532, "type": "identifier", "text": "arena", "parent": 531, "children": [], "start_point": {"row": 142, "column": 16}, "end_point": {"row": 142, "column": 21}}, {"id": 533, "type": "field_identifier", "text": "getFirstFreeSpan", "parent": 531, "children": [], "start_point": {"row": 142, "column": 23}, "end_point": {"row": 142, "column": 39}}, {"id": 534, "type": "argument_list", "text": "()", "parent": 530, "children": [], "start_point": {"row": 142, "column": 39}, "end_point": {"row": 142, "column": 41}}, {"id": 535, "type": "assignment_expression", "text": "thing = firstThingOffset", "parent": 503, "children": [536, 537, 538], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 32}}, {"id": 536, "type": "identifier", "text": "thing", "parent": 535, "children": [], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 13}}, {"id": 537, "type": "=", "text": "=", "parent": 535, "children": [], "start_point": {"row": 143, "column": 14}, "end_point": {"row": 143, "column": 15}}, {"id": 538, "type": "identifier", "text": "firstThingOffset", "parent": 535, "children": [], "start_point": {"row": 143, "column": 16}, "end_point": {"row": 143, "column": 32}}, {"id": 539, "type": "call_expression", "text": "moveForwardIfFree()", "parent": 503, "children": [540, 541], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 27}}, {"id": 540, "type": "identifier", "text": "moveForwardIfFree", "parent": 539, "children": [], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 25}}, {"id": 541, "type": "argument_list", "text": "()", "parent": 539, "children": [], "start_point": {"row": 144, "column": 25}, "end_point": {"row": 144, "column": 27}}, {"id": 542, "type": "function_definition", "text": "bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }", "parent": 279, "children": [543, 544, 547, 551, 560, 565], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 165, "column": 5}}, {"id": 543, "type": "primitive_type", "text": "bool", "parent": 542, "children": [], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 8}}, {"id": 544, "type": "function_declarator", "text": "done()", "parent": 542, "children": [545, 546], "start_point": {"row": 147, "column": 9}, "end_point": {"row": 147, "column": 15}}, {"id": 545, "type": "identifier", "text": "done", "parent": 544, "children": [], "start_point": {"row": 147, "column": 9}, "end_point": {"row": 147, "column": 13}}, {"id": 546, "type": "parameter_list", "text": "()", "parent": 544, "children": [], "start_point": {"row": 147, "column": 13}, "end_point": {"row": 147, "column": 15}}, {"id": 547, "type": "declaration", "text": "const {\n MOZ_ASSERT(initialized);", "parent": 542, "children": [548, 549], "start_point": {"row": 147, "column": 16}, "end_point": {"row": 148, "column": 32}}, {"id": 548, "type": "type_identifier", "text": "MOZ_ASSERT", "parent": 547, "children": [], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 18}}, {"id": 549, "type": "parenthesized_declarator", "text": "(initialized)", "parent": 547, "children": [550], "start_point": {"row": 148, "column": 18}, "end_point": {"row": 148, "column": 31}}, {"id": 550, "type": "identifier", "text": "initialized", "parent": 549, "children": [], "start_point": {"row": 148, "column": 19}, "end_point": {"row": 148, "column": 30}}, {"id": 551, "type": "declaration", "text": "MOZ_ASSERT(thing <= ArenaSize);", "parent": 542, "children": [552, 559], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 39}}, {"id": 552, "type": "macro_type_specifier", "text": "MOZ_ASSERT(thing <= ArenaSize)", "parent": 551, "children": [553, 554, 556], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 38}}, {"id": 553, "type": "identifier", "text": "MOZ_ASSERT", "parent": 552, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 18}}, {"id": 554, "type": "type_descriptor", "text": "thing", "parent": 552, "children": [555], "start_point": {"row": 149, "column": 19}, "end_point": {"row": 149, "column": 24}}, {"id": 555, "type": "type_identifier", "text": "thing", "parent": 554, "children": [], "start_point": {"row": 149, "column": 19}, "end_point": {"row": 149, "column": 24}}, {"id": 556, "type": "ERROR", "text": "<= ArenaSize", "parent": 552, "children": [557, 558], "start_point": {"row": 149, "column": 25}, "end_point": {"row": 149, "column": 37}}, {"id": 557, "type": "<=", "text": "<=", "parent": 556, "children": [], "start_point": {"row": 149, "column": 25}, "end_point": {"row": 149, "column": 27}}, {"id": 558, "type": "identifier", "text": "ArenaSize", "parent": 556, "children": [], "start_point": {"row": 149, "column": 28}, "end_point": {"row": 149, "column": 37}}, {"id": 559, "type": "identifier", "text": "", "parent": 551, "children": [], "start_point": {"row": 149, "column": 38}, "end_point": {"row": 149, "column": 38}}, {"id": 560, "type": "declaration", "text": "return thing == ArenaSize;", "parent": 542, "children": [561, 564], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 34}}, {"id": 561, "type": "ERROR", "text": "thing ==", "parent": 560, "children": [562, 563], "start_point": {"row": 150, "column": 15}, "end_point": {"row": 150, "column": 23}}, {"id": 562, "type": "identifier", "text": "thing", "parent": 561, "children": [], "start_point": {"row": 150, "column": 15}, "end_point": {"row": 150, "column": 20}}, {"id": 563, "type": "==", "text": "==", "parent": 561, "children": [], "start_point": {"row": 150, "column": 21}, "end_point": {"row": 150, "column": 23}}, {"id": 564, "type": "identifier", "text": "ArenaSize", "parent": 560, "children": [], "start_point": {"row": 150, "column": 24}, "end_point": {"row": 150, "column": 33}}, {"id": 565, "type": "ERROR", "text": "}\n\n TenuredCell* getCell() const", "parent": 542, "children": [566, 567], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 153, "column": 32}}, {"id": 566, "type": "type_identifier", "text": "TenuredCell", "parent": 565, "children": [], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 15}}, {"id": 567, "type": "pointer_declarator", "text": "* getCell() const", "parent": 565, "children": [568, 569], "start_point": {"row": 153, "column": 15}, "end_point": {"row": 153, "column": 32}}, {"id": 568, "type": "*", "text": "*", "parent": 567, "children": [], "start_point": {"row": 153, "column": 15}, "end_point": {"row": 153, "column": 16}}, {"id": 569, "type": "function_declarator", "text": "getCell() const", "parent": 567, "children": [570, 571], "start_point": {"row": 153, "column": 17}, "end_point": {"row": 153, "column": 32}}, {"id": 570, "type": "identifier", "text": "getCell", "parent": 569, "children": [], "start_point": {"row": 153, "column": 17}, "end_point": {"row": 153, "column": 24}}, {"id": 571, "type": "parameter_list", "text": "()", "parent": 569, "children": [], "start_point": {"row": 153, "column": 24}, "end_point": {"row": 153, "column": 26}}, {"id": 572, "type": "call_expression", "text": "MOZ_ASSERT(!done())", "parent": 542, "children": [573, 574], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 27}}, {"id": 573, "type": "identifier", "text": "MOZ_ASSERT", "parent": 572, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 18}}, {"id": 574, "type": "argument_list", "text": "(!done())", "parent": 572, "children": [575], "start_point": {"row": 154, "column": 18}, "end_point": {"row": 154, "column": 27}}, {"id": 575, "type": "unary_expression", "text": "!done()", "parent": 574, "children": [576, 577], "start_point": {"row": 154, "column": 19}, "end_point": {"row": 154, "column": 26}}, {"id": 576, "type": "!", "text": "!", "parent": 575, "children": [], "start_point": {"row": 154, "column": 19}, "end_point": {"row": 154, "column": 20}}, {"id": 577, "type": "call_expression", "text": "done()", "parent": 575, "children": [578, 579], "start_point": {"row": 154, "column": 20}, "end_point": {"row": 154, "column": 26}}, {"id": 578, "type": "identifier", "text": "done", "parent": 577, "children": [], "start_point": {"row": 154, "column": 20}, "end_point": {"row": 154, "column": 24}}, {"id": 579, "type": "argument_list", "text": "()", "parent": 577, "children": [], "start_point": {"row": 154, "column": 24}, "end_point": {"row": 154, "column": 26}}, {"id": 580, "type": "declaration", "text": "TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);", "parent": 542, "children": [581, 582], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 89}}, {"id": 581, "type": "type_identifier", "text": "TenuredCell", "parent": 580, "children": [], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 19}}, {"id": 582, "type": "init_declarator", "text": "* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing)", "parent": 580, "children": [583, 586, 587], "start_point": {"row": 155, "column": 19}, "end_point": {"row": 155, "column": 88}}, {"id": 583, "type": "pointer_declarator", "text": "* cell", "parent": 582, "children": [584, 585], "start_point": {"row": 155, "column": 19}, "end_point": {"row": 155, "column": 25}}, {"id": 584, "type": "*", "text": "*", "parent": 583, "children": [], "start_point": {"row": 155, "column": 19}, "end_point": {"row": 155, "column": 20}}, {"id": 585, "type": "identifier", "text": "cell", "parent": 583, "children": [], "start_point": {"row": 155, "column": 21}, "end_point": {"row": 155, "column": 25}}, {"id": 586, "type": "=", "text": "=", "parent": 582, "children": [], "start_point": {"row": 155, "column": 26}, "end_point": {"row": 155, "column": 27}}, {"id": 587, "type": "binary_expression", "text": "reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing)", "parent": 582, "children": [588, 592, 594, 595], "start_point": {"row": 155, "column": 28}, "end_point": {"row": 155, "column": 88}}, {"id": 588, "type": "binary_expression", "text": "reinterpret_cast<TenuredCell", "parent": 587, "children": [589, 590, 591], "start_point": {"row": 155, "column": 28}, "end_point": {"row": 155, "column": 56}}, {"id": 589, "type": "identifier", "text": "reinterpret_cast", "parent": 588, "children": [], "start_point": {"row": 155, "column": 28}, "end_point": {"row": 155, "column": 44}}, {"id": 590, "type": "<", "text": "<", "parent": 588, "children": [], "start_point": {"row": 155, "column": 44}, "end_point": {"row": 155, "column": 45}}, {"id": 591, "type": "identifier", "text": "TenuredCell", "parent": 588, "children": [], "start_point": {"row": 155, "column": 45}, "end_point": {"row": 155, "column": 56}}, {"id": 592, "type": "ERROR", "text": "*", "parent": 587, "children": [593], "start_point": {"row": 155, "column": 56}, "end_point": {"row": 155, "column": 57}}, {"id": 593, "type": "*", "text": "*", "parent": 592, "children": [], "start_point": {"row": 155, "column": 56}, "end_point": {"row": 155, "column": 57}}, {"id": 594, "type": ">", "text": ">", "parent": 587, "children": [], "start_point": {"row": 155, "column": 57}, "end_point": {"row": 155, "column": 58}}, {"id": 595, "type": "parenthesized_expression", "text": "(uintptr_t(arenaAddr) + thing)", "parent": 587, "children": [596, 603], "start_point": {"row": 155, "column": 58}, "end_point": {"row": 155, "column": 88}}, {"id": 596, "type": "ERROR", "text": "uintptr_t(arenaAddr)", "parent": 595, "children": [597], "start_point": {"row": 155, "column": 59}, "end_point": {"row": 155, "column": 79}}, {"id": 597, "type": "type_descriptor", "text": "uintptr_t(arenaAddr)", "parent": 596, "children": [598, 599], "start_point": {"row": 155, "column": 59}, "end_point": {"row": 155, "column": 79}}, {"id": 598, "type": "primitive_type", "text": "uintptr_t", "parent": 597, "children": [], "start_point": {"row": 155, "column": 59}, "end_point": {"row": 155, "column": 68}}, {"id": 599, "type": "abstract_function_declarator", "text": "(arenaAddr)", "parent": 597, "children": [600], "start_point": {"row": 155, "column": 68}, "end_point": {"row": 155, "column": 79}}, {"id": 600, "type": "parameter_list", "text": "(arenaAddr)", "parent": 599, "children": [601], "start_point": {"row": 155, "column": 68}, "end_point": {"row": 155, "column": 79}}, {"id": 601, "type": "parameter_declaration", "text": "arenaAddr", "parent": 600, "children": [602], "start_point": {"row": 155, "column": 69}, "end_point": {"row": 155, "column": 78}}, {"id": 602, "type": "type_identifier", "text": "arenaAddr", "parent": 601, "children": [], "start_point": {"row": 155, "column": 69}, "end_point": {"row": 155, "column": 78}}, {"id": 603, "type": "unary_expression", "text": "+ thing", "parent": 595, "children": [604, 605], "start_point": {"row": 155, "column": 80}, "end_point": {"row": 155, "column": 87}}, {"id": 604, "type": "+", "text": "+", "parent": 603, "children": [], "start_point": {"row": 155, "column": 80}, "end_point": {"row": 155, "column": 81}}, {"id": 605, "type": "identifier", "text": "thing", "parent": 603, "children": [], "start_point": {"row": 155, "column": 82}, "end_point": {"row": 155, "column": 87}}, {"id": 606, "type": "if_statement", "text": "if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }", "parent": 542, "children": [607], "start_point": {"row": 160, "column": 8}, "end_point": {"row": 162, "column": 9}}, {"id": 607, "type": "parenthesized_expression", "text": "(needsBarrier)", "parent": 606, "children": [608], "start_point": {"row": 160, "column": 11}, "end_point": {"row": 160, "column": 25}}, {"id": 608, "type": "identifier", "text": "needsBarrier", "parent": 607, "children": [], "start_point": {"row": 160, "column": 12}, "end_point": {"row": 160, "column": 24}}, {"id": 609, "type": "macro_type_specifier", "text": "ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind))", "parent": 606, "children": [610, 611, 614], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 67}}, {"id": 610, "type": "identifier", "text": "ExposeGCThingToActiveJS", "parent": 609, "children": [], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 35}}, {"id": 611, "type": "ERROR", "text": "JS::", "parent": 609, "children": [612], "start_point": {"row": 161, "column": 36}, "end_point": {"row": 161, "column": 40}}, {"id": 612, "type": "type_descriptor", "text": "JS", "parent": 611, "children": [613], "start_point": {"row": 161, "column": 36}, "end_point": {"row": 161, "column": 38}}, {"id": 613, "type": "type_identifier", "text": "JS", "parent": 612, "children": [], "start_point": {"row": 161, "column": 36}, "end_point": {"row": 161, "column": 38}}, {"id": 614, "type": "type_descriptor", "text": "GCCellPtr(cell, traceKind)", "parent": 609, "children": [615, 616], "start_point": {"row": 161, "column": 40}, "end_point": {"row": 161, "column": 66}}, {"id": 615, "type": "type_identifier", "text": "GCCellPtr", "parent": 614, "children": [], "start_point": {"row": 161, "column": 40}, "end_point": {"row": 161, "column": 49}}, {"id": 616, "type": "abstract_function_declarator", "text": "(cell, traceKind)", "parent": 614, "children": [617], "start_point": {"row": 161, "column": 49}, "end_point": {"row": 161, "column": 66}}, {"id": 617, "type": "parameter_list", "text": "(cell, traceKind)", "parent": 616, "children": [618, 620], "start_point": {"row": 161, "column": 49}, "end_point": {"row": 161, "column": 66}}, {"id": 618, "type": "parameter_declaration", "text": "cell", "parent": 617, "children": [619], "start_point": {"row": 161, "column": 50}, "end_point": {"row": 161, "column": 54}}, {"id": 619, "type": "type_identifier", "text": "cell", "parent": 618, "children": [], "start_point": {"row": 161, "column": 50}, "end_point": {"row": 161, "column": 54}}, {"id": 620, "type": "parameter_declaration", "text": "traceKind", "parent": 617, "children": [621], "start_point": {"row": 161, "column": 56}, "end_point": {"row": 161, "column": 65}}, {"id": 621, "type": "type_identifier", "text": "traceKind", "parent": 620, "children": [], "start_point": {"row": 161, "column": 56}, "end_point": {"row": 161, "column": 65}}, {"id": 622, "type": "return_statement", "text": "return cell;", "parent": 542, "children": [623], "start_point": {"row": 164, "column": 8}, "end_point": {"row": 164, "column": 20}}, {"id": 623, "type": "identifier", "text": "cell", "parent": 622, "children": [], "start_point": {"row": 164, "column": 15}, "end_point": {"row": 164, "column": 19}}, {"id": 624, "type": "ERROR", "text": "template<typename T> T* get() const", "parent": 279, "children": [625], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 39}}, {"id": 625, "type": "binary_expression", "text": "template<typename T> T* get()", "parent": 624, "children": [626, 630, 632, 633], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 33}}, {"id": 626, "type": "binary_expression", "text": "template<typename", "parent": 625, "children": [627, 628, 629], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 21}}, {"id": 627, "type": "identifier", "text": "template", "parent": 626, "children": [], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 12}}, {"id": 628, "type": "<", "text": "<", "parent": 626, "children": [], "start_point": {"row": 167, "column": 12}, "end_point": {"row": 167, "column": 13}}, {"id": 629, "type": "identifier", "text": "typename", "parent": 626, "children": [], "start_point": {"row": 167, "column": 13}, "end_point": {"row": 167, "column": 21}}, {"id": 630, "type": "ERROR", "text": "T", "parent": 625, "children": [631], "start_point": {"row": 167, "column": 22}, "end_point": {"row": 167, "column": 23}}, {"id": 631, "type": "identifier", "text": "T", "parent": 630, "children": [], "start_point": {"row": 167, "column": 22}, "end_point": {"row": 167, "column": 23}}, {"id": 632, "type": ">", "text": ">", "parent": 625, "children": [], "start_point": {"row": 167, "column": 23}, "end_point": {"row": 167, "column": 24}}, {"id": 633, "type": "binary_expression", "text": "T* get()", "parent": 625, "children": [634, 635, 636], "start_point": {"row": 167, "column": 25}, "end_point": {"row": 167, "column": 33}}, {"id": 634, "type": "identifier", "text": "T", "parent": 633, "children": [], "start_point": {"row": 167, "column": 25}, "end_point": {"row": 167, "column": 26}}, {"id": 635, "type": "*", "text": "*", "parent": 633, "children": [], "start_point": {"row": 167, "column": 26}, "end_point": {"row": 167, "column": 27}}, {"id": 636, "type": "call_expression", "text": "get()", "parent": 633, "children": [637, 638], "start_point": {"row": 167, "column": 28}, "end_point": {"row": 167, "column": 33}}, {"id": 637, "type": "identifier", "text": "get", "parent": 636, "children": [], "start_point": {"row": 167, "column": 28}, "end_point": {"row": 167, "column": 31}}, {"id": 638, "type": "argument_list", "text": "()", "parent": 636, "children": [], "start_point": {"row": 167, "column": 31}, "end_point": {"row": 167, "column": 33}}, {"id": 639, "type": "call_expression", "text": "MOZ_ASSERT(!done())", "parent": 279, "children": [640, 641], "start_point": {"row": 168, "column": 8}, "end_point": {"row": 168, "column": 27}}, {"id": 640, "type": "identifier", "text": "MOZ_ASSERT", "parent": 639, "children": [], "start_point": {"row": 168, "column": 8}, "end_point": {"row": 168, "column": 18}}, {"id": 641, "type": "argument_list", "text": "(!done())", "parent": 639, "children": [642], "start_point": {"row": 168, "column": 18}, "end_point": {"row": 168, "column": 27}}, {"id": 642, "type": "unary_expression", "text": "!done()", "parent": 641, "children": [643, 644], "start_point": {"row": 168, "column": 19}, "end_point": {"row": 168, "column": 26}}, {"id": 643, "type": "!", "text": "!", "parent": 642, "children": [], "start_point": {"row": 168, "column": 19}, "end_point": {"row": 168, "column": 20}}, {"id": 644, "type": "call_expression", "text": "done()", "parent": 642, "children": [645, 646], "start_point": {"row": 168, "column": 20}, "end_point": {"row": 168, "column": 26}}, {"id": 645, "type": "identifier", "text": "done", "parent": 644, "children": [], "start_point": {"row": 168, "column": 20}, "end_point": {"row": 168, "column": 24}}, {"id": 646, "type": "argument_list", "text": "()", "parent": 644, "children": [], "start_point": {"row": 168, "column": 24}, "end_point": {"row": 168, "column": 26}}, {"id": 647, "type": "labeled_statement", "text": "MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);", "parent": 279, "children": [648, 649], "start_point": {"row": 169, "column": 8}, "end_point": {"row": 169, "column": 65}}, {"id": 648, "type": "statement_identifier", "text": "MOZ_ASSERT", "parent": 647, "children": [], "start_point": {"row": 169, "column": 8}, "end_point": {"row": 169, "column": 18}}, {"id": 649, "type": "ERROR", "text": "(JS::MapTypeToTraceKind<T>:", "parent": 647, "children": [650, 652, 656], "start_point": {"row": 169, "column": 18}, "end_point": {"row": 169, "column": 45}}, {"id": 650, "type": "type_descriptor", "text": "JS", "parent": 649, "children": [651], "start_point": {"row": 169, "column": 19}, "end_point": {"row": 169, "column": 21}}, {"id": 651, "type": "type_identifier", "text": "JS", "parent": 650, "children": [], "start_point": {"row": 169, "column": 19}, "end_point": {"row": 169, "column": 21}}, {"id": 652, "type": "binary_expression", "text": "MapTypeToTraceKind<T", "parent": 649, "children": [653, 654, 655], "start_point": {"row": 169, "column": 23}, "end_point": {"row": 169, "column": 43}}, {"id": 653, "type": "identifier", "text": "MapTypeToTraceKind", "parent": 652, "children": [], "start_point": {"row": 169, "column": 23}, "end_point": {"row": 169, "column": 41}}, {"id": 654, "type": "<", "text": "<", "parent": 652, "children": [], "start_point": {"row": 169, "column": 41}, "end_point": {"row": 169, "column": 42}}, {"id": 655, "type": "identifier", "text": "T", "parent": 652, "children": [], "start_point": {"row": 169, "column": 42}, "end_point": {"row": 169, "column": 43}}, {"id": 656, "type": ">", "text": ">", "parent": 649, "children": [], "start_point": {"row": 169, "column": 43}, "end_point": {"row": 169, "column": 44}}, {"id": 657, "type": "binary_expression", "text": "kind == traceKind", "parent": 647, "children": [658, 659, 660], "start_point": {"row": 169, "column": 46}, "end_point": {"row": 169, "column": 63}}, {"id": 658, "type": "identifier", "text": "kind", "parent": 657, "children": [], "start_point": {"row": 169, "column": 46}, "end_point": {"row": 169, "column": 50}}, {"id": 659, "type": "==", "text": "==", "parent": 657, "children": [], "start_point": {"row": 169, "column": 51}, "end_point": {"row": 169, "column": 53}}, {"id": 660, "type": "identifier", "text": "traceKind", "parent": 657, "children": [], "start_point": {"row": 169, "column": 54}, "end_point": {"row": 169, "column": 63}}, {"id": 661, "type": "return_statement", "text": "return reinterpret_cast<T*>(getCell());", "parent": 279, "children": [662], "start_point": {"row": 170, "column": 8}, "end_point": {"row": 170, "column": 47}}, {"id": 662, "type": "binary_expression", "text": "reinterpret_cast<T*>(getCell())", "parent": 661, "children": [663, 667, 669, 670], "start_point": {"row": 170, "column": 15}, "end_point": {"row": 170, "column": 46}}, {"id": 663, "type": "binary_expression", "text": "reinterpret_cast<T", "parent": 662, "children": [664, 665, 666], "start_point": {"row": 170, "column": 15}, "end_point": {"row": 170, "column": 33}}, {"id": 664, "type": "identifier", "text": "reinterpret_cast", "parent": 663, "children": [], "start_point": {"row": 170, "column": 15}, "end_point": {"row": 170, "column": 31}}, {"id": 665, "type": "<", "text": "<", "parent": 663, "children": [], "start_point": {"row": 170, "column": 31}, "end_point": {"row": 170, "column": 32}}, {"id": 666, "type": "identifier", "text": "T", "parent": 663, "children": [], "start_point": {"row": 170, "column": 32}, "end_point": {"row": 170, "column": 33}}, {"id": 667, "type": "ERROR", "text": "*", "parent": 662, "children": [668], "start_point": {"row": 170, "column": 33}, "end_point": {"row": 170, "column": 34}}, {"id": 668, "type": "*", "text": "*", "parent": 667, "children": [], "start_point": {"row": 170, "column": 33}, "end_point": {"row": 170, "column": 34}}, {"id": 669, "type": ">", "text": ">", "parent": 662, "children": [], "start_point": {"row": 170, "column": 34}, "end_point": {"row": 170, "column": 35}}, {"id": 670, "type": "parenthesized_expression", "text": "(getCell())", "parent": 662, "children": [671], "start_point": {"row": 170, "column": 35}, "end_point": {"row": 170, "column": 46}}, {"id": 671, "type": "call_expression", "text": "getCell()", "parent": 670, "children": [672, 673], "start_point": {"row": 170, "column": 36}, "end_point": {"row": 170, "column": 45}}, {"id": 672, "type": "identifier", "text": "getCell", "parent": 671, "children": [], "start_point": {"row": 170, "column": 36}, "end_point": {"row": 170, "column": 43}}, {"id": 673, "type": "argument_list", "text": "()", "parent": 671, "children": [], "start_point": {"row": 170, "column": 43}, "end_point": {"row": 170, "column": 45}}, {"id": 674, "type": "function_definition", "text": "void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }", "parent": 279, "children": [675, 676], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 179, "column": 5}}, {"id": 675, "type": "primitive_type", "text": "void", "parent": 674, "children": [], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 8}}, {"id": 676, "type": "function_declarator", "text": "next()", "parent": 674, "children": [677, 678], "start_point": {"row": 173, "column": 9}, "end_point": {"row": 173, "column": 15}}, {"id": 677, "type": "identifier", "text": "next", "parent": 676, "children": [], "start_point": {"row": 173, "column": 9}, "end_point": {"row": 173, "column": 13}}, {"id": 678, "type": "parameter_list", "text": "()", "parent": 676, "children": [], "start_point": {"row": 173, "column": 13}, "end_point": {"row": 173, "column": 15}}, {"id": 679, "type": "call_expression", "text": "MOZ_ASSERT(!done())", "parent": 674, "children": [680, 681], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 27}}, {"id": 680, "type": "identifier", "text": "MOZ_ASSERT", "parent": 679, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 18}}, {"id": 681, "type": "argument_list", "text": "(!done())", "parent": 679, "children": [682], "start_point": {"row": 174, "column": 18}, "end_point": {"row": 174, "column": 27}}, {"id": 682, "type": "unary_expression", "text": "!done()", "parent": 681, "children": [683, 684], "start_point": {"row": 174, "column": 19}, "end_point": {"row": 174, "column": 26}}, {"id": 683, "type": "!", "text": "!", "parent": 682, "children": [], "start_point": {"row": 174, "column": 19}, "end_point": {"row": 174, "column": 20}}, {"id": 684, "type": "call_expression", "text": "done()", "parent": 682, "children": [685, 686], "start_point": {"row": 174, "column": 20}, "end_point": {"row": 174, "column": 26}}, {"id": 685, "type": "identifier", "text": "done", "parent": 684, "children": [], "start_point": {"row": 174, "column": 20}, "end_point": {"row": 174, "column": 24}}, {"id": 686, "type": "argument_list", "text": "()", "parent": 684, "children": [], "start_point": {"row": 174, "column": 24}, "end_point": {"row": 174, "column": 26}}, {"id": 687, "type": "assignment_expression", "text": "thing += thingSize", "parent": 674, "children": [688, 689, 690], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 26}}, {"id": 688, "type": "identifier", "text": "thing", "parent": 687, "children": [], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 13}}, {"id": 689, "type": "+=", "text": "+=", "parent": 687, "children": [], "start_point": {"row": 175, "column": 14}, "end_point": {"row": 175, "column": 16}}, {"id": 690, "type": "identifier", "text": "thingSize", "parent": 687, "children": [], "start_point": {"row": 175, "column": 17}, "end_point": {"row": 175, "column": 26}}, {"id": 691, "type": "if_statement", "text": "if (thing < ArenaSize) {\n moveForwardIfFree();\n }", "parent": 674, "children": [692], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 178, "column": 9}}, {"id": 692, "type": "parenthesized_expression", "text": "(thing < ArenaSize)", "parent": 691, "children": [693], "start_point": {"row": 176, "column": 11}, "end_point": {"row": 176, "column": 30}}, {"id": 693, "type": "binary_expression", "text": "thing < ArenaSize", "parent": 692, "children": [694, 695, 696], "start_point": {"row": 176, "column": 12}, "end_point": {"row": 176, "column": 29}}, {"id": 694, "type": "identifier", "text": "thing", "parent": 693, "children": [], "start_point": {"row": 176, "column": 12}, "end_point": {"row": 176, "column": 17}}, {"id": 695, "type": "<", "text": "<", "parent": 693, "children": [], "start_point": {"row": 176, "column": 18}, "end_point": {"row": 176, "column": 19}}, {"id": 696, "type": "identifier", "text": "ArenaSize", "parent": 693, "children": [], "start_point": {"row": 176, "column": 20}, "end_point": {"row": 176, "column": 29}}, {"id": 697, "type": "call_expression", "text": "moveForwardIfFree()", "parent": 691, "children": [698, 699], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 177, "column": 31}}, {"id": 698, "type": "identifier", "text": "moveForwardIfFree", "parent": 697, "children": [], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 177, "column": 29}}, {"id": 699, "type": "argument_list", "text": "()", "parent": 697, "children": [], "start_point": {"row": 177, "column": 29}, "end_point": {"row": 177, "column": 31}}, {"id": 700, "type": "binary_expression", "text": "template<>\nJSObject*\nArenaCellIterImpl::get<JSObject>() const", "parent": 21, "children": [701, 715, 716], "start_point": {"row": 182, "column": 0}, "end_point": {"row": 184, "column": 40}}, {"id": 701, "type": "binary_expression", "text": "template<>\nJSObject*\nArenaCellIterImpl::get<JSObject", "parent": 700, "children": [702, 711, 713, 714], "start_point": {"row": 182, "column": 0}, "end_point": {"row": 184, "column": 31}}, {"id": 702, "type": "binary_expression", "text": "template<>\nJSObject*\nArenaCellIterImpl", "parent": 701, "children": [703, 704, 705, 707], "start_point": {"row": 182, "column": 0}, "end_point": {"row": 184, "column": 17}}, {"id": 703, "type": "identifier", "text": "template", "parent": 702, "children": [], "start_point": {"row": 182, "column": 0}, "end_point": {"row": 182, "column": 8}}, {"id": 704, "type": "<", "text": "<", "parent": 702, "children": [], "start_point": {"row": 182, "column": 8}, "end_point": {"row": 182, "column": 9}}, {"id": 705, "type": "ERROR", "text": ">", "parent": 702, "children": [706], "start_point": {"row": 182, "column": 9}, "end_point": {"row": 182, "column": 10}}, {"id": 706, "type": ">", "text": ">", "parent": 705, "children": [], "start_point": {"row": 182, "column": 9}, "end_point": {"row": 182, "column": 10}}, {"id": 707, "type": "binary_expression", "text": "JSObject*\nArenaCellIterImpl", "parent": 702, "children": [708, 709, 710], "start_point": {"row": 183, "column": 0}, "end_point": {"row": 184, "column": 17}}, {"id": 708, "type": "identifier", "text": "JSObject", "parent": 707, "children": [], "start_point": {"row": 183, "column": 0}, "end_point": {"row": 183, "column": 8}}, {"id": 709, "type": "*", "text": "*", "parent": 707, "children": [], "start_point": {"row": 183, "column": 8}, "end_point": {"row": 183, "column": 9}}, {"id": 710, "type": "identifier", "text": "ArenaCellIterImpl", "parent": 707, "children": [], "start_point": {"row": 184, "column": 0}, "end_point": {"row": 184, "column": 17}}, {"id": 711, "type": "ERROR", "text": "::get", "parent": 701, "children": [712], "start_point": {"row": 184, "column": 17}, "end_point": {"row": 184, "column": 22}}, {"id": 712, "type": "identifier", "text": "get", "parent": 711, "children": [], "start_point": {"row": 184, "column": 19}, "end_point": {"row": 184, "column": 22}}, {"id": 713, "type": "<", "text": "<", "parent": 701, "children": [], "start_point": {"row": 184, "column": 22}, "end_point": {"row": 184, "column": 23}}, {"id": 714, "type": "identifier", "text": "JSObject", "parent": 701, "children": [], "start_point": {"row": 184, "column": 23}, "end_point": {"row": 184, "column": 31}}, {"id": 715, "type": ">", "text": ">", "parent": 700, "children": [], "start_point": {"row": 184, "column": 31}, "end_point": {"row": 184, "column": 32}}, {"id": 716, "type": "cast_expression", "text": "() const", "parent": 700, "children": [717], "start_point": {"row": 184, "column": 32}, "end_point": {"row": 184, "column": 40}}, {"id": 717, "type": "type_descriptor", "text": "", "parent": 716, "children": [718], "start_point": {"row": 184, "column": 33}, "end_point": {"row": 184, "column": 33}}, {"id": 718, "type": "type_identifier", "text": "", "parent": 717, "children": [], "start_point": {"row": 184, "column": 33}, "end_point": {"row": 184, "column": 33}}, {"id": 719, "type": "function_definition", "text": "class ArenaCellIter : public ArenaCellIterImpl\n{\n public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }\n}", "parent": 21, "children": [720, 722], "start_point": {"row": 186, "column": 0}, "end_point": {"row": 194, "column": 1}}, {"id": 720, "type": "ERROR", "text": "ArenaCellIter : public", "parent": 719, "children": [721], "start_point": {"row": 186, "column": 6}, "end_point": {"row": 186, "column": 28}}, {"id": 721, "type": "identifier", "text": "ArenaCellIter", "parent": 720, "children": [], "start_point": {"row": 186, "column": 6}, "end_point": {"row": 186, "column": 19}}, {"id": 722, "type": "identifier", "text": "ArenaCellIterImpl", "parent": 719, "children": [], "start_point": {"row": 186, "column": 29}, "end_point": {"row": 186, "column": 46}}, {"id": 723, "type": "labeled_statement", "text": "public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }", "parent": 719, "children": [724], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 193, "column": 5}}, {"id": 724, "type": "ERROR", "text": "explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)", "parent": 723, "children": [725, 726], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 190, "column": 56}}, {"id": 725, "type": "type_identifier", "text": "explicit", "parent": 724, "children": [], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 12}}, {"id": 726, "type": "function_declarator", "text": "ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)", "parent": 724, "children": [727, 728, 734], "start_point": {"row": 189, "column": 13}, "end_point": {"row": 190, "column": 56}}, {"id": 727, "type": "identifier", "text": "ArenaCellIter", "parent": 726, "children": [], "start_point": {"row": 189, "column": 13}, "end_point": {"row": 189, "column": 26}}, {"id": 728, "type": "parameter_list", "text": "(Arena* arena)", "parent": 726, "children": [729], "start_point": {"row": 189, "column": 26}, "end_point": {"row": 189, "column": 40}}, {"id": 729, "type": "parameter_declaration", "text": "Arena* arena", "parent": 728, "children": [730, 731], "start_point": {"row": 189, "column": 27}, "end_point": {"row": 189, "column": 39}}, {"id": 730, "type": "type_identifier", "text": "Arena", "parent": 729, "children": [], "start_point": {"row": 189, "column": 27}, "end_point": {"row": 189, "column": 32}}, {"id": 731, "type": "pointer_declarator", "text": "* arena", "parent": 729, "children": [732, 733], "start_point": {"row": 189, "column": 32}, "end_point": {"row": 189, "column": 39}}, {"id": 732, "type": "*", "text": "*", "parent": 731, "children": [], "start_point": {"row": 189, "column": 32}, "end_point": {"row": 189, "column": 33}}, {"id": 733, "type": "identifier", "text": "arena", "parent": 731, "children": [], "start_point": {"row": 189, "column": 34}, "end_point": {"row": 189, "column": 39}}, {"id": 734, "type": "call_expression", "text": "ArenaCellIterImpl(arena, CellIterMayNeedBarrier)", "parent": 726, "children": [735, 736], "start_point": {"row": 190, "column": 8}, "end_point": {"row": 190, "column": 56}}, {"id": 735, "type": "identifier", "text": "ArenaCellIterImpl", "parent": 734, "children": [], "start_point": {"row": 190, "column": 8}, "end_point": {"row": 190, "column": 25}}, {"id": 736, "type": "argument_list", "text": "(arena, CellIterMayNeedBarrier)", "parent": 734, "children": [737, 738], "start_point": {"row": 190, "column": 25}, "end_point": {"row": 190, "column": 56}}, {"id": 737, "type": "identifier", "text": "arena", "parent": 736, "children": [], "start_point": {"row": 190, "column": 26}, "end_point": {"row": 190, "column": 31}}, {"id": 738, "type": "identifier", "text": "CellIterMayNeedBarrier", "parent": 736, "children": [], "start_point": {"row": 190, "column": 33}, "end_point": {"row": 190, "column": 55}}, {"id": 739, "type": "macro_type_specifier", "text": "MOZ_ASSERT(JS::RuntimeHeapIsTracing())", "parent": 723, "children": [740, 741, 744], "start_point": {"row": 192, "column": 8}, "end_point": {"row": 192, "column": 46}}, {"id": 740, "type": "identifier", "text": "MOZ_ASSERT", "parent": 739, "children": [], "start_point": {"row": 192, "column": 8}, "end_point": {"row": 192, "column": 18}}, {"id": 741, "type": "ERROR", "text": "JS::", "parent": 739, "children": [742], "start_point": {"row": 192, "column": 19}, "end_point": {"row": 192, "column": 23}}, {"id": 742, "type": "type_descriptor", "text": "JS", "parent": 741, "children": [743], "start_point": {"row": 192, "column": 19}, "end_point": {"row": 192, "column": 21}}, {"id": 743, "type": "type_identifier", "text": "JS", "parent": 742, "children": [], "start_point": {"row": 192, "column": 19}, "end_point": {"row": 192, "column": 21}}, {"id": 744, "type": "type_descriptor", "text": "RuntimeHeapIsTracing()", "parent": 739, "children": [745, 746], "start_point": {"row": 192, "column": 23}, "end_point": {"row": 192, "column": 45}}, {"id": 745, "type": "type_identifier", "text": "RuntimeHeapIsTracing", "parent": 744, "children": [], "start_point": {"row": 192, "column": 23}, "end_point": {"row": 192, "column": 43}}, {"id": 746, "type": "abstract_function_declarator", "text": "()", "parent": 744, "children": [747], "start_point": {"row": 192, "column": 43}, "end_point": {"row": 192, "column": 45}}, {"id": 747, "type": "parameter_list", "text": "()", "parent": 746, "children": [], "start_point": {"row": 192, "column": 43}, "end_point": {"row": 192, "column": 45}}, {"id": 748, "type": "binary_expression", "text": "template <typename T>\nclass ZoneCellIter", "parent": 21, "children": [749, 753, 755, 756], "start_point": {"row": 196, "column": 0}, "end_point": {"row": 197, "column": 18}}, {"id": 749, "type": "binary_expression", "text": "template <typename", "parent": 748, "children": [750, 751, 752], "start_point": {"row": 196, "column": 0}, "end_point": {"row": 196, "column": 18}}, {"id": 750, "type": "identifier", "text": "template", "parent": 749, "children": [], "start_point": {"row": 196, "column": 0}, "end_point": {"row": 196, "column": 8}}, {"id": 751, "type": "<", "text": "<", "parent": 749, "children": [], "start_point": {"row": 196, "column": 9}, "end_point": {"row": 196, "column": 10}}, {"id": 752, "type": "identifier", "text": "typename", "parent": 749, "children": [], "start_point": {"row": 196, "column": 10}, "end_point": {"row": 196, "column": 18}}, {"id": 753, "type": "ERROR", "text": "T", "parent": 748, "children": [754], "start_point": {"row": 196, "column": 19}, "end_point": {"row": 196, "column": 20}}, {"id": 754, "type": "identifier", "text": "T", "parent": 753, "children": [], "start_point": {"row": 196, "column": 19}, "end_point": {"row": 196, "column": 20}}, {"id": 755, "type": ">", "text": ">", "parent": 748, "children": [], "start_point": {"row": 196, "column": 20}, "end_point": {"row": 196, "column": 21}}, {"id": 756, "type": "identifier", "text": "ZoneCellIter", "parent": 748, "children": [], "start_point": {"row": 197, "column": 6}, "end_point": {"row": 197, "column": 18}}, {"id": 757, "type": "ERROR", "text": "template <>\nclass ZoneCellIter<TenuredCell>", "parent": 21, "children": [758, 767], "start_point": {"row": 199, "column": 0}, "end_point": {"row": 200, "column": 31}}, {"id": 758, "type": "binary_expression", "text": "template <>\nclass ZoneCellIter<TenuredCell", "parent": 757, "children": [759, 765, 766], "start_point": {"row": 199, "column": 0}, "end_point": {"row": 200, "column": 30}}, {"id": 759, "type": "binary_expression", "text": "template <>\nclass ZoneCellIter", "parent": 758, "children": [760, 761, 762, 764], "start_point": {"row": 199, "column": 0}, "end_point": {"row": 200, "column": 18}}, {"id": 760, "type": "identifier", "text": "template", "parent": 759, "children": [], "start_point": {"row": 199, "column": 0}, "end_point": {"row": 199, "column": 8}}, {"id": 761, "type": "<", "text": "<", "parent": 759, "children": [], "start_point": {"row": 199, "column": 9}, "end_point": {"row": 199, "column": 10}}, {"id": 762, "type": "ERROR", "text": ">\nclass", "parent": 759, "children": [763], "start_point": {"row": 199, "column": 10}, "end_point": {"row": 200, "column": 5}}, {"id": 763, "type": ">", "text": ">", "parent": 762, "children": [], "start_point": {"row": 199, "column": 10}, "end_point": {"row": 199, "column": 11}}, {"id": 764, "type": "identifier", "text": "ZoneCellIter", "parent": 759, "children": [], "start_point": {"row": 200, "column": 6}, "end_point": {"row": 200, "column": 18}}, {"id": 765, "type": "<", "text": "<", "parent": 758, "children": [], "start_point": {"row": 200, "column": 18}, "end_point": {"row": 200, "column": 19}}, {"id": 766, "type": "identifier", "text": "TenuredCell", "parent": 758, "children": [], "start_point": {"row": 200, "column": 19}, "end_point": {"row": 200, "column": 30}}, {"id": 767, "type": ">", "text": ">", "parent": 757, "children": [], "start_point": {"row": 200, "column": 30}, "end_point": {"row": 200, "column": 31}}, {"id": 768, "type": "declaration", "text": "ArenaIter arenaIter;", "parent": 21, "children": [769, 770], "start_point": {"row": 201, "column": 4}, "end_point": {"row": 201, "column": 24}}, {"id": 769, "type": "type_identifier", "text": "ArenaIter", "parent": 768, "children": [], "start_point": {"row": 201, "column": 4}, "end_point": {"row": 201, "column": 13}}, {"id": 770, "type": "identifier", "text": "arenaIter", "parent": 768, "children": [], "start_point": {"row": 201, "column": 14}, "end_point": {"row": 201, "column": 23}}, {"id": 771, "type": "declaration", "text": "ArenaCellIterImpl cellIter;", "parent": 21, "children": [772, 773], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 31}}, {"id": 772, "type": "type_identifier", "text": "ArenaCellIterImpl", "parent": 771, "children": [], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 21}}, {"id": 773, "type": "identifier", "text": "cellIter", "parent": 771, "children": [], "start_point": {"row": 202, "column": 22}, "end_point": {"row": 202, "column": 30}}, {"id": 774, "type": "labeled_statement", "text": "mozilla::Maybe<JS::AutoAssertNoGC> nogc;", "parent": 21, "children": [775, 776], "start_point": {"row": 203, "column": 4}, "end_point": {"row": 203, "column": 44}}, {"id": 775, "type": "statement_identifier", "text": "mozilla", "parent": 774, "children": [], "start_point": {"row": 203, "column": 4}, "end_point": {"row": 203, "column": 11}}, {"id": 776, "type": "ERROR", "text": "::Maybe<JS:", "parent": 774, "children": [777], "start_point": {"row": 203, "column": 11}, "end_point": {"row": 203, "column": 22}}, {"id": 777, "type": "binary_expression", "text": "Maybe<JS", "parent": 776, "children": [778, 779, 780], "start_point": {"row": 203, "column": 13}, "end_point": {"row": 203, "column": 21}}, {"id": 778, "type": "identifier", "text": "Maybe", "parent": 777, "children": [], "start_point": {"row": 203, "column": 13}, "end_point": {"row": 203, "column": 18}}, {"id": 779, "type": "<", "text": "<", "parent": 777, "children": [], "start_point": {"row": 203, "column": 18}, "end_point": {"row": 203, "column": 19}}, {"id": 780, "type": "identifier", "text": "JS", "parent": 777, "children": [], "start_point": {"row": 203, "column": 19}, "end_point": {"row": 203, "column": 21}}, {"id": 781, "type": "binary_expression", "text": "AutoAssertNoGC> nogc", "parent": 774, "children": [782, 783, 784], "start_point": {"row": 203, "column": 23}, "end_point": {"row": 203, "column": 43}}, {"id": 782, "type": "identifier", "text": "AutoAssertNoGC", "parent": 781, "children": [], "start_point": {"row": 203, "column": 23}, "end_point": {"row": 203, "column": 37}}, {"id": 783, "type": ">", "text": ">", "parent": 781, "children": [], "start_point": {"row": 203, "column": 37}, "end_point": {"row": 203, "column": 38}}, {"id": 784, "type": "identifier", "text": "nogc", "parent": 781, "children": [], "start_point": {"row": 203, "column": 39}, "end_point": {"row": 203, "column": 43}}, {"id": 785, "type": "labeled_statement", "text": "protected:\n // For use when a subclass wants to insert some setup before init().\n ZoneCellIter()", "parent": 21, "children": [], "start_point": {"row": 205, "column": 2}, "end_point": {"row": 207, "column": 18}}, {"id": 786, "type": "call_expression", "text": "ZoneCellIter()", "parent": 785, "children": [787, 788], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 18}}, {"id": 787, "type": "identifier", "text": "ZoneCellIter", "parent": 786, "children": [], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 16}}, {"id": 788, "type": "argument_list", "text": "()", "parent": 786, "children": [], "start_point": {"row": 207, "column": 16}, "end_point": {"row": 207, "column": 18}}, {"id": 789, "type": "function_definition", "text": "void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));\n initForTenuredIteration(zone, kind);\n }", "parent": 21, "children": [790, 791], "start_point": {"row": 209, "column": 4}, "end_point": {"row": 214, "column": 5}}, {"id": 790, "type": "primitive_type", "text": "void", "parent": 789, "children": [], "start_point": {"row": 209, "column": 4}, "end_point": {"row": 209, "column": 8}}, {"id": 791, "type": "function_declarator", "text": "init(JS::Zone* zone, AllocKind kind)", "parent": 789, "children": [792, 793], "start_point": {"row": 209, "column": 9}, "end_point": {"row": 209, "column": 45}}, {"id": 792, "type": "identifier", "text": "init", "parent": 791, "children": [], "start_point": {"row": 209, "column": 9}, "end_point": {"row": 209, "column": 13}}, {"id": 793, "type": "parameter_list", "text": "(JS::Zone* zone, AllocKind kind)", "parent": 791, "children": [794, 801], "start_point": {"row": 209, "column": 13}, "end_point": {"row": 209, "column": 45}}, {"id": 794, "type": "parameter_declaration", "text": "JS::Zone* zone", "parent": 793, "children": [795, 796, 798], "start_point": {"row": 209, "column": 14}, "end_point": {"row": 209, "column": 28}}, {"id": 795, "type": "type_identifier", "text": "JS", "parent": 794, "children": [], "start_point": {"row": 209, "column": 14}, "end_point": {"row": 209, "column": 16}}, {"id": 796, "type": "ERROR", "text": "::Zone", "parent": 794, "children": [797], "start_point": {"row": 209, "column": 16}, "end_point": {"row": 209, "column": 22}}, {"id": 797, "type": "identifier", "text": "Zone", "parent": 796, "children": [], "start_point": {"row": 209, "column": 18}, "end_point": {"row": 209, "column": 22}}, {"id": 798, "type": "pointer_declarator", "text": "* zone", "parent": 794, "children": [799, 800], "start_point": {"row": 209, "column": 22}, "end_point": {"row": 209, "column": 28}}, {"id": 799, "type": "*", "text": "*", "parent": 798, "children": [], "start_point": {"row": 209, "column": 22}, "end_point": {"row": 209, "column": 23}}, {"id": 800, "type": "identifier", "text": "zone", "parent": 798, "children": [], "start_point": {"row": 209, "column": 24}, "end_point": {"row": 209, "column": 28}}, {"id": 801, "type": "parameter_declaration", "text": "AllocKind kind", "parent": 793, "children": [802, 803], "start_point": {"row": 209, "column": 30}, "end_point": {"row": 209, "column": 44}}, {"id": 802, "type": "type_identifier", "text": "AllocKind", "parent": 801, "children": [], "start_point": {"row": 209, "column": 30}, "end_point": {"row": 209, "column": 39}}, {"id": 803, "type": "identifier", "text": "kind", "parent": 801, "children": [], "start_point": {"row": 209, "column": 40}, "end_point": {"row": 209, "column": 44}}, {"id": 804, "type": "call_expression", "text": "MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()))", "parent": 789, "children": [805, 806], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 212, "column": 78}}, {"id": 805, "type": "identifier", "text": "MOZ_ASSERT_IF", "parent": 804, "children": [], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 210, "column": 21}}, {"id": 806, "type": "argument_list", "text": "(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()))", "parent": 804, "children": [807, 811], "start_point": {"row": 210, "column": 21}, "end_point": {"row": 212, "column": 78}}, {"id": 807, "type": "call_expression", "text": "IsNurseryAllocable(kind)", "parent": 806, "children": [808, 809], "start_point": {"row": 210, "column": 22}, "end_point": {"row": 210, "column": 46}}, {"id": 808, "type": "identifier", "text": "IsNurseryAllocable", "parent": 807, "children": [], "start_point": {"row": 210, "column": 22}, "end_point": {"row": 210, "column": 40}}, {"id": 809, "type": "argument_list", "text": "(kind)", "parent": 807, "children": [810], "start_point": {"row": 210, "column": 40}, "end_point": {"row": 210, "column": 46}}, {"id": 810, "type": "identifier", "text": "kind", "parent": 809, "children": [], "start_point": {"row": 210, "column": 41}, "end_point": {"row": 210, "column": 45}}, {"id": 811, "type": "parenthesized_expression", "text": "(zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty())", "parent": 806, "children": [812], "start_point": {"row": 211, "column": 22}, "end_point": {"row": 212, "column": 77}}, {"id": 812, "type": "binary_expression", "text": "zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()", "parent": 811, "children": [813, 818, 819], "start_point": {"row": 211, "column": 23}, "end_point": {"row": 212, "column": 76}}, {"id": 813, "type": "call_expression", "text": "zone->isAtomsZone()", "parent": 812, "children": [814, 817], "start_point": {"row": 211, "column": 23}, "end_point": {"row": 211, "column": 42}}, {"id": 814, "type": "field_expression", "text": "zone->isAtomsZone", "parent": 813, "children": [815, 816], "start_point": {"row": 211, "column": 23}, "end_point": {"row": 211, "column": 40}}, {"id": 815, "type": "identifier", "text": "zone", "parent": 814, "children": [], "start_point": {"row": 211, "column": 23}, "end_point": {"row": 211, "column": 27}}, {"id": 816, "type": "field_identifier", "text": "isAtomsZone", "parent": 814, "children": [], "start_point": {"row": 211, "column": 29}, "end_point": {"row": 211, "column": 40}}, {"id": 817, "type": "argument_list", "text": "()", "parent": 813, "children": [], "start_point": {"row": 211, "column": 40}, "end_point": {"row": 211, "column": 42}}, {"id": 818, "type": "||", "text": "||", "parent": 812, "children": [], "start_point": {"row": 211, "column": 43}, "end_point": {"row": 211, "column": 45}}, {"id": 819, "type": "call_expression", "text": "zone->runtimeFromMainThread()->gc.nursery().isEmpty()", "parent": 812, "children": [820, 833], "start_point": {"row": 212, "column": 23}, "end_point": {"row": 212, "column": 76}}, {"id": 820, "type": "field_expression", "text": "zone->runtimeFromMainThread()->gc.nursery().isEmpty", "parent": 819, "children": [821, 832], "start_point": {"row": 212, "column": 23}, "end_point": {"row": 212, "column": 74}}, {"id": 821, "type": "call_expression", "text": "zone->runtimeFromMainThread()->gc.nursery()", "parent": 820, "children": [822, 831], "start_point": {"row": 212, "column": 23}, "end_point": {"row": 212, "column": 66}}, {"id": 822, "type": "field_expression", "text": "zone->runtimeFromMainThread()->gc.nursery", "parent": 821, "children": [823, 830], "start_point": {"row": 212, "column": 23}, "end_point": {"row": 212, "column": 64}}, {"id": 823, "type": "field_expression", "text": "zone->runtimeFromMainThread()->gc", "parent": 822, "children": [824, 829], "start_point": {"row": 212, "column": 23}, "end_point": {"row": 212, "column": 56}}, {"id": 824, "type": "call_expression", "text": "zone->runtimeFromMainThread()", "parent": 823, "children": [825, 828], "start_point": {"row": 212, "column": 23}, "end_point": {"row": 212, "column": 52}}, {"id": 825, "type": "field_expression", "text": "zone->runtimeFromMainThread", "parent": 824, "children": [826, 827], "start_point": {"row": 212, "column": 23}, "end_point": {"row": 212, "column": 50}}, {"id": 826, "type": "identifier", "text": "zone", "parent": 825, "children": [], "start_point": {"row": 212, "column": 23}, "end_point": {"row": 212, "column": 27}}, {"id": 827, "type": "field_identifier", "text": "runtimeFromMainThread", "parent": 825, "children": [], "start_point": {"row": 212, "column": 29}, "end_point": {"row": 212, "column": 50}}, {"id": 828, "type": "argument_list", "text": "()", "parent": 824, "children": [], "start_point": {"row": 212, "column": 50}, "end_point": {"row": 212, "column": 52}}, {"id": 829, "type": "field_identifier", "text": "gc", "parent": 823, "children": [], "start_point": {"row": 212, "column": 54}, "end_point": {"row": 212, "column": 56}}, {"id": 830, "type": "field_identifier", "text": "nursery", "parent": 822, "children": [], "start_point": {"row": 212, "column": 57}, "end_point": {"row": 212, "column": 64}}, {"id": 831, "type": "argument_list", "text": "()", "parent": 821, "children": [], "start_point": {"row": 212, "column": 64}, "end_point": {"row": 212, "column": 66}}, {"id": 832, "type": "field_identifier", "text": "isEmpty", "parent": 820, "children": [], "start_point": {"row": 212, "column": 67}, "end_point": {"row": 212, "column": 74}}, {"id": 833, "type": "argument_list", "text": "()", "parent": 819, "children": [], "start_point": {"row": 212, "column": 74}, "end_point": {"row": 212, "column": 76}}, {"id": 834, "type": "call_expression", "text": "initForTenuredIteration(zone, kind)", "parent": 789, "children": [835, 836], "start_point": {"row": 213, "column": 8}, "end_point": {"row": 213, "column": 43}}, {"id": 835, "type": "identifier", "text": "initForTenuredIteration", "parent": 834, "children": [], "start_point": {"row": 213, "column": 8}, "end_point": {"row": 213, "column": 31}}, {"id": 836, "type": "argument_list", "text": "(zone, kind)", "parent": 834, "children": [837, 838], "start_point": {"row": 213, "column": 31}, "end_point": {"row": 213, "column": 43}}, {"id": 837, "type": "identifier", "text": "zone", "parent": 836, "children": [], "start_point": {"row": 213, "column": 32}, "end_point": {"row": 213, "column": 36}}, {"id": 838, "type": "identifier", "text": "kind", "parent": 836, "children": [], "start_point": {"row": 213, "column": 38}, "end_point": {"row": 213, "column": 42}}, {"id": 839, "type": "function_definition", "text": "void initForTenuredIteration(JS::Zone* zone, AllocKind kind) {\n JSRuntime* rt = zone->runtimeFromAnyThread();\n\n // If called from outside a GC, ensure that the heap is in a state\n // that allows us to iterate.\n if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }\n\n // We have a single-threaded runtime, so there's no need to protect\n // against other threads iterating or allocating. However, we do have\n // background finalization; we may have to wait for this to finish if\n // it's currently active.\n if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }\n arenaIter.init(zone, kind);\n if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }\n }", "parent": 21, "children": [840, 841], "start_point": {"row": 216, "column": 4}, "end_point": {"row": 238, "column": 5}}, {"id": 840, "type": "primitive_type", "text": "void", "parent": 839, "children": [], "start_point": {"row": 216, "column": 4}, "end_point": {"row": 216, "column": 8}}, {"id": 841, "type": "function_declarator", "text": "initForTenuredIteration(JS::Zone* zone, AllocKind kind)", "parent": 839, "children": [842, 843], "start_point": {"row": 216, "column": 9}, "end_point": {"row": 216, "column": 64}}, {"id": 842, "type": "identifier", "text": "initForTenuredIteration", "parent": 841, "children": [], "start_point": {"row": 216, "column": 9}, "end_point": {"row": 216, "column": 32}}, {"id": 843, "type": "parameter_list", "text": "(JS::Zone* zone, AllocKind kind)", "parent": 841, "children": [844, 851], "start_point": {"row": 216, "column": 32}, "end_point": {"row": 216, "column": 64}}, {"id": 844, "type": "parameter_declaration", "text": "JS::Zone* zone", "parent": 843, "children": [845, 846, 848], "start_point": {"row": 216, "column": 33}, "end_point": {"row": 216, "column": 47}}, {"id": 845, "type": "type_identifier", "text": "JS", "parent": 844, "children": [], "start_point": {"row": 216, "column": 33}, "end_point": {"row": 216, "column": 35}}, {"id": 846, "type": "ERROR", "text": "::Zone", "parent": 844, "children": [847], "start_point": {"row": 216, "column": 35}, "end_point": {"row": 216, "column": 41}}, {"id": 847, "type": "identifier", "text": "Zone", "parent": 846, "children": [], "start_point": {"row": 216, "column": 37}, "end_point": {"row": 216, "column": 41}}, {"id": 848, "type": "pointer_declarator", "text": "* zone", "parent": 844, "children": [849, 850], "start_point": {"row": 216, "column": 41}, "end_point": {"row": 216, "column": 47}}, {"id": 849, "type": "*", "text": "*", "parent": 848, "children": [], "start_point": {"row": 216, "column": 41}, "end_point": {"row": 216, "column": 42}}, {"id": 850, "type": "identifier", "text": "zone", "parent": 848, "children": [], "start_point": {"row": 216, "column": 43}, "end_point": {"row": 216, "column": 47}}, {"id": 851, "type": "parameter_declaration", "text": "AllocKind kind", "parent": 843, "children": [852, 853], "start_point": {"row": 216, "column": 49}, "end_point": {"row": 216, "column": 63}}, {"id": 852, "type": "type_identifier", "text": "AllocKind", "parent": 851, "children": [], "start_point": {"row": 216, "column": 49}, "end_point": {"row": 216, "column": 58}}, {"id": 853, "type": "identifier", "text": "kind", "parent": 851, "children": [], "start_point": {"row": 216, "column": 59}, "end_point": {"row": 216, "column": 63}}, {"id": 854, "type": "declaration", "text": "JSRuntime* rt = zone->runtimeFromAnyThread();", "parent": 839, "children": [855, 856], "start_point": {"row": 217, "column": 8}, "end_point": {"row": 217, "column": 53}}, {"id": 855, "type": "type_identifier", "text": "JSRuntime", "parent": 854, "children": [], "start_point": {"row": 217, "column": 8}, "end_point": {"row": 217, "column": 17}}, {"id": 856, "type": "init_declarator", "text": "* rt = zone->runtimeFromAnyThread()", "parent": 854, "children": [857, 860, 861], "start_point": {"row": 217, "column": 17}, "end_point": {"row": 217, "column": 52}}, {"id": 857, "type": "pointer_declarator", "text": "* rt", "parent": 856, "children": [858, 859], "start_point": {"row": 217, "column": 17}, "end_point": {"row": 217, "column": 21}}, {"id": 858, "type": "*", "text": "*", "parent": 857, "children": [], "start_point": {"row": 217, "column": 17}, "end_point": {"row": 217, "column": 18}}, {"id": 859, "type": "identifier", "text": "rt", "parent": 857, "children": [], "start_point": {"row": 217, "column": 19}, "end_point": {"row": 217, "column": 21}}, {"id": 860, "type": "=", "text": "=", "parent": 856, "children": [], "start_point": {"row": 217, "column": 22}, "end_point": {"row": 217, "column": 23}}, {"id": 861, "type": "call_expression", "text": "zone->runtimeFromAnyThread()", "parent": 856, "children": [862, 865], "start_point": {"row": 217, "column": 24}, "end_point": {"row": 217, "column": 52}}, {"id": 862, "type": "field_expression", "text": "zone->runtimeFromAnyThread", "parent": 861, "children": [863, 864], "start_point": {"row": 217, "column": 24}, "end_point": {"row": 217, "column": 50}}, {"id": 863, "type": "identifier", "text": "zone", "parent": 862, "children": [], "start_point": {"row": 217, "column": 24}, "end_point": {"row": 217, "column": 28}}, {"id": 864, "type": "field_identifier", "text": "runtimeFromAnyThread", "parent": 862, "children": [], "start_point": {"row": 217, "column": 30}, "end_point": {"row": 217, "column": 50}}, {"id": 865, "type": "argument_list", "text": "()", "parent": 861, "children": [], "start_point": {"row": 217, "column": 50}, "end_point": {"row": 217, "column": 52}}, {"id": 866, "type": "if_statement", "text": "if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }", "parent": 839, "children": [867], "start_point": {"row": 221, "column": 8}, "end_point": {"row": 224, "column": 9}}, {"id": 867, "type": "parenthesized_expression", "text": "(!JS::RuntimeHeapIsBusy())", "parent": 866, "children": [868, 872], "start_point": {"row": 221, "column": 11}, "end_point": {"row": 221, "column": 37}}, {"id": 868, "type": "ERROR", "text": "!JS::", "parent": 867, "children": [869], "start_point": {"row": 221, "column": 12}, "end_point": {"row": 221, "column": 17}}, {"id": 869, "type": "unary_expression", "text": "!JS", "parent": 868, "children": [870, 871], "start_point": {"row": 221, "column": 12}, "end_point": {"row": 221, "column": 15}}, {"id": 870, "type": "!", "text": "!", "parent": 869, "children": [], "start_point": {"row": 221, "column": 12}, "end_point": {"row": 221, "column": 13}}, {"id": 871, "type": "identifier", "text": "JS", "parent": 869, "children": [], "start_point": {"row": 221, "column": 13}, "end_point": {"row": 221, "column": 15}}, {"id": 872, "type": "call_expression", "text": "RuntimeHeapIsBusy()", "parent": 867, "children": [873, 874], "start_point": {"row": 221, "column": 17}, "end_point": {"row": 221, "column": 36}}, {"id": 873, "type": "identifier", "text": "RuntimeHeapIsBusy", "parent": 872, "children": [], "start_point": {"row": 221, "column": 17}, "end_point": {"row": 221, "column": 34}}, {"id": 874, "type": "argument_list", "text": "()", "parent": 872, "children": [], "start_point": {"row": 221, "column": 34}, "end_point": {"row": 221, "column": 36}}, {"id": 875, "type": "call_expression", "text": "nogc.emplace()", "parent": 866, "children": [876, 879], "start_point": {"row": 223, "column": 12}, "end_point": {"row": 223, "column": 26}}, {"id": 876, "type": "field_expression", "text": "nogc.emplace", "parent": 875, "children": [877, 878], "start_point": {"row": 223, "column": 12}, "end_point": {"row": 223, "column": 24}}, {"id": 877, "type": "identifier", "text": "nogc", "parent": 876, "children": [], "start_point": {"row": 223, "column": 12}, "end_point": {"row": 223, "column": 16}}, {"id": 878, "type": "field_identifier", "text": "emplace", "parent": 876, "children": [], "start_point": {"row": 223, "column": 17}, "end_point": {"row": 223, "column": 24}}, {"id": 879, "type": "argument_list", "text": "()", "parent": 875, "children": [], "start_point": {"row": 223, "column": 24}, "end_point": {"row": 223, "column": 26}}, {"id": 880, "type": "if_statement", "text": "if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }", "parent": 839, "children": [881], "start_point": {"row": 230, "column": 8}, "end_point": {"row": 232, "column": 9}}, {"id": 881, "type": "parenthesized_expression", "text": "(IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind))", "parent": 880, "children": [882], "start_point": {"row": 230, "column": 11}, "end_point": {"row": 230, "column": 89}}, {"id": 882, "type": "binary_expression", "text": "IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)", "parent": 881, "children": [883, 887, 888], "start_point": {"row": 230, "column": 12}, "end_point": {"row": 230, "column": 88}}, {"id": 883, "type": "call_expression", "text": "IsBackgroundFinalized(kind)", "parent": 882, "children": [884, 885], "start_point": {"row": 230, "column": 12}, "end_point": {"row": 230, "column": 39}}, {"id": 884, "type": "identifier", "text": "IsBackgroundFinalized", "parent": 883, "children": [], "start_point": {"row": 230, "column": 12}, "end_point": {"row": 230, "column": 33}}, {"id": 885, "type": "argument_list", "text": "(kind)", "parent": 883, "children": [886], "start_point": {"row": 230, "column": 33}, "end_point": {"row": 230, "column": 39}}, {"id": 886, "type": "identifier", "text": "kind", "parent": 885, "children": [], "start_point": {"row": 230, "column": 34}, "end_point": {"row": 230, "column": 38}}, {"id": 887, "type": "&&", "text": "&&", "parent": 882, "children": [], "start_point": {"row": 230, "column": 40}, "end_point": {"row": 230, "column": 42}}, {"id": 888, "type": "call_expression", "text": "zone->arenas.needBackgroundFinalizeWait(kind)", "parent": 882, "children": [889, 894], "start_point": {"row": 230, "column": 43}, "end_point": {"row": 230, "column": 88}}, {"id": 889, "type": "field_expression", "text": "zone->arenas.needBackgroundFinalizeWait", "parent": 888, "children": [890, 893], "start_point": {"row": 230, "column": 43}, "end_point": {"row": 230, "column": 82}}, {"id": 890, "type": "field_expression", "text": "zone->arenas", "parent": 889, "children": [891, 892], "start_point": {"row": 230, "column": 43}, "end_point": {"row": 230, "column": 55}}, {"id": 891, "type": "identifier", "text": "zone", "parent": 890, "children": [], "start_point": {"row": 230, "column": 43}, "end_point": {"row": 230, "column": 47}}, {"id": 892, "type": "field_identifier", "text": "arenas", "parent": 890, "children": [], "start_point": {"row": 230, "column": 49}, "end_point": {"row": 230, "column": 55}}, {"id": 893, "type": "field_identifier", "text": "needBackgroundFinalizeWait", "parent": 889, "children": [], "start_point": {"row": 230, "column": 56}, "end_point": {"row": 230, "column": 82}}, {"id": 894, "type": "argument_list", "text": "(kind)", "parent": 888, "children": [895], "start_point": {"row": 230, "column": 82}, "end_point": {"row": 230, "column": 88}}, {"id": 895, "type": "identifier", "text": "kind", "parent": 894, "children": [], "start_point": {"row": 230, "column": 83}, "end_point": {"row": 230, "column": 87}}, {"id": 896, "type": "call_expression", "text": "rt->gc.waitBackgroundSweepEnd()", "parent": 880, "children": [897, 902], "start_point": {"row": 231, "column": 12}, "end_point": {"row": 231, "column": 43}}, {"id": 897, "type": "field_expression", "text": "rt->gc.waitBackgroundSweepEnd", "parent": 896, "children": [898, 901], "start_point": {"row": 231, "column": 12}, "end_point": {"row": 231, "column": 41}}, {"id": 898, "type": "field_expression", "text": "rt->gc", "parent": 897, "children": [899, 900], "start_point": {"row": 231, "column": 12}, "end_point": {"row": 231, "column": 18}}, {"id": 899, "type": "identifier", "text": "rt", "parent": 898, "children": [], "start_point": {"row": 231, "column": 12}, "end_point": {"row": 231, "column": 14}}, {"id": 900, "type": "field_identifier", "text": "gc", "parent": 898, "children": [], "start_point": {"row": 231, "column": 16}, "end_point": {"row": 231, "column": 18}}, {"id": 901, "type": "field_identifier", "text": "waitBackgroundSweepEnd", "parent": 897, "children": [], "start_point": {"row": 231, "column": 19}, "end_point": {"row": 231, "column": 41}}, {"id": 902, "type": "argument_list", "text": "()", "parent": 896, "children": [], "start_point": {"row": 231, "column": 41}, "end_point": {"row": 231, "column": 43}}, {"id": 903, "type": "call_expression", "text": "arenaIter.init(zone, kind)", "parent": 839, "children": [904, 907], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 233, "column": 34}}, {"id": 904, "type": "field_expression", "text": "arenaIter.init", "parent": 903, "children": [905, 906], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 233, "column": 22}}, {"id": 905, "type": "identifier", "text": "arenaIter", "parent": 904, "children": [], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 233, "column": 17}}, {"id": 906, "type": "field_identifier", "text": "init", "parent": 904, "children": [], "start_point": {"row": 233, "column": 18}, "end_point": {"row": 233, "column": 22}}, {"id": 907, "type": "argument_list", "text": "(zone, kind)", "parent": 903, "children": [908, 909], "start_point": {"row": 233, "column": 22}, "end_point": {"row": 233, "column": 34}}, {"id": 908, "type": "identifier", "text": "zone", "parent": 907, "children": [], "start_point": {"row": 233, "column": 23}, "end_point": {"row": 233, "column": 27}}, {"id": 909, "type": "identifier", "text": "kind", "parent": 907, "children": [], "start_point": {"row": 233, "column": 29}, "end_point": {"row": 233, "column": 33}}, {"id": 910, "type": "if_statement", "text": "if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }", "parent": 839, "children": [911], "start_point": {"row": 234, "column": 8}, "end_point": {"row": 237, "column": 9}}, {"id": 911, "type": "parenthesized_expression", "text": "(!arenaIter.done())", "parent": 910, "children": [912], "start_point": {"row": 234, "column": 11}, "end_point": {"row": 234, "column": 30}}, {"id": 912, "type": "unary_expression", "text": "!arenaIter.done()", "parent": 911, "children": [913, 914], "start_point": {"row": 234, "column": 12}, "end_point": {"row": 234, "column": 29}}, {"id": 913, "type": "!", "text": "!", "parent": 912, "children": [], "start_point": {"row": 234, "column": 12}, "end_point": {"row": 234, "column": 13}}, {"id": 914, "type": "call_expression", "text": "arenaIter.done()", "parent": 912, "children": [915, 918], "start_point": {"row": 234, "column": 13}, "end_point": {"row": 234, "column": 29}}, {"id": 915, "type": "field_expression", "text": "arenaIter.done", "parent": 914, "children": [916, 917], "start_point": {"row": 234, "column": 13}, "end_point": {"row": 234, "column": 27}}, {"id": 916, "type": "identifier", "text": "arenaIter", "parent": 915, "children": [], "start_point": {"row": 234, "column": 13}, "end_point": {"row": 234, "column": 22}}, {"id": 917, "type": "field_identifier", "text": "done", "parent": 915, "children": [], "start_point": {"row": 234, "column": 23}, "end_point": {"row": 234, "column": 27}}, {"id": 918, "type": "argument_list", "text": "()", "parent": 914, "children": [], "start_point": {"row": 234, "column": 27}, "end_point": {"row": 234, "column": 29}}, {"id": 919, "type": "call_expression", "text": "cellIter.init(arenaIter.get(), CellIterMayNeedBarrier)", "parent": 910, "children": [920, 923], "start_point": {"row": 235, "column": 12}, "end_point": {"row": 235, "column": 66}}, {"id": 920, "type": "field_expression", "text": "cellIter.init", "parent": 919, "children": [921, 922], "start_point": {"row": 235, "column": 12}, "end_point": {"row": 235, "column": 25}}, {"id": 921, "type": "identifier", "text": "cellIter", "parent": 920, "children": [], "start_point": {"row": 235, "column": 12}, "end_point": {"row": 235, "column": 20}}, {"id": 922, "type": "field_identifier", "text": "init", "parent": 920, "children": [], "start_point": {"row": 235, "column": 21}, "end_point": {"row": 235, "column": 25}}, {"id": 923, "type": "argument_list", "text": "(arenaIter.get(), CellIterMayNeedBarrier)", "parent": 919, "children": [924, 929], "start_point": {"row": 235, "column": 25}, "end_point": {"row": 235, "column": 66}}, {"id": 924, "type": "call_expression", "text": "arenaIter.get()", "parent": 923, "children": [925, 928], "start_point": {"row": 235, "column": 26}, "end_point": {"row": 235, "column": 41}}, {"id": 925, "type": "field_expression", "text": "arenaIter.get", "parent": 924, "children": [926, 927], "start_point": {"row": 235, "column": 26}, "end_point": {"row": 235, "column": 39}}, {"id": 926, "type": "identifier", "text": "arenaIter", "parent": 925, "children": [], "start_point": {"row": 235, "column": 26}, "end_point": {"row": 235, "column": 35}}, {"id": 927, "type": "field_identifier", "text": "get", "parent": 925, "children": [], "start_point": {"row": 235, "column": 36}, "end_point": {"row": 235, "column": 39}}, {"id": 928, "type": "argument_list", "text": "()", "parent": 924, "children": [], "start_point": {"row": 235, "column": 39}, "end_point": {"row": 235, "column": 41}}, {"id": 929, "type": "identifier", "text": "CellIterMayNeedBarrier", "parent": 923, "children": [], "start_point": {"row": 235, "column": 43}, "end_point": {"row": 235, "column": 65}}, {"id": 930, "type": "call_expression", "text": "settle()", "parent": 910, "children": [931, 932], "start_point": {"row": 236, "column": 12}, "end_point": {"row": 236, "column": 20}}, {"id": 931, "type": "identifier", "text": "settle", "parent": 930, "children": [], "start_point": {"row": 236, "column": 12}, "end_point": {"row": 236, "column": 18}}, {"id": 932, "type": "argument_list", "text": "()", "parent": 930, "children": [], "start_point": {"row": 236, "column": 18}, "end_point": {"row": 236, "column": 20}}, {"id": 933, "type": "labeled_statement", "text": "public:\n ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }", "parent": 21, "children": [934], "start_point": {"row": 240, "column": 2}, "end_point": {"row": 249, "column": 5}}, {"id": 934, "type": "labeled_statement", "text": "ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }", "parent": 933, "children": [935, 936, 939], "start_point": {"row": 241, "column": 4}, "end_point": {"row": 249, "column": 5}}, {"id": 935, "type": "statement_identifier", "text": "ZoneCellIter", "parent": 934, "children": [], "start_point": {"row": 241, "column": 4}, "end_point": {"row": 241, "column": 16}}, {"id": 936, "type": "ERROR", "text": "(JS:", "parent": 934, "children": [937], "start_point": {"row": 241, "column": 16}, "end_point": {"row": 241, "column": 20}}, {"id": 937, "type": "type_descriptor", "text": "JS", "parent": 936, "children": [938], "start_point": {"row": 241, "column": 17}, "end_point": {"row": 241, "column": 19}}, {"id": 938, "type": "type_identifier", "text": "JS", "parent": 937, "children": [], "start_point": {"row": 241, "column": 17}, "end_point": {"row": 241, "column": 19}}, {"id": 939, "type": "ERROR", "text": "Zone* zone, AllocKind kind)", "parent": 934, "children": [940, 941, 944, 945], "start_point": {"row": 241, "column": 21}, "end_point": {"row": 241, "column": 48}}, {"id": 940, "type": "type_identifier", "text": "Zone", "parent": 939, "children": [], "start_point": {"row": 241, "column": 21}, "end_point": {"row": 241, "column": 25}}, {"id": 941, "type": "pointer_declarator", "text": "* zone", "parent": 939, "children": [942, 943], "start_point": {"row": 241, "column": 25}, "end_point": {"row": 241, "column": 31}}, {"id": 942, "type": "*", "text": "*", "parent": 941, "children": [], "start_point": {"row": 241, "column": 25}, "end_point": {"row": 241, "column": 26}}, {"id": 943, "type": "identifier", "text": "zone", "parent": 941, "children": [], "start_point": {"row": 241, "column": 27}, "end_point": {"row": 241, "column": 31}}, {"id": 944, "type": "identifier", "text": "AllocKind", "parent": 939, "children": [], "start_point": {"row": 241, "column": 33}, "end_point": {"row": 241, "column": 42}}, {"id": 945, "type": "identifier", "text": "kind", "parent": 939, "children": [], "start_point": {"row": 241, "column": 43}, "end_point": {"row": 241, "column": 47}}, {"id": 946, "type": "if_statement", "text": "if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }", "parent": 934, "children": [947], "start_point": {"row": 244, "column": 8}, "end_point": {"row": 246, "column": 9}}, {"id": 947, "type": "parenthesized_expression", "text": "(IsNurseryAllocable(kind))", "parent": 946, "children": [948], "start_point": {"row": 244, "column": 11}, "end_point": {"row": 244, "column": 37}}, {"id": 948, "type": "call_expression", "text": "IsNurseryAllocable(kind)", "parent": 947, "children": [949, 950], "start_point": {"row": 244, "column": 12}, "end_point": {"row": 244, "column": 36}}, {"id": 949, "type": "identifier", "text": "IsNurseryAllocable", "parent": 948, "children": [], "start_point": {"row": 244, "column": 12}, "end_point": {"row": 244, "column": 30}}, {"id": 950, "type": "argument_list", "text": "(kind)", "parent": 948, "children": [951], "start_point": {"row": 244, "column": 30}, "end_point": {"row": 244, "column": 36}}, {"id": 951, "type": "identifier", "text": "kind", "parent": 950, "children": [], "start_point": {"row": 244, "column": 31}, "end_point": {"row": 244, "column": 35}}, {"id": 952, "type": "call_expression", "text": "zone->runtimeFromMainThread()->gc.evictNursery()", "parent": 946, "children": [953, 962], "start_point": {"row": 245, "column": 12}, "end_point": {"row": 245, "column": 60}}, {"id": 953, "type": "field_expression", "text": "zone->runtimeFromMainThread()->gc.evictNursery", "parent": 952, "children": [954, 961], "start_point": {"row": 245, "column": 12}, "end_point": {"row": 245, "column": 58}}, {"id": 954, "type": "field_expression", "text": "zone->runtimeFromMainThread()->gc", "parent": 953, "children": [955, 960], "start_point": {"row": 245, "column": 12}, "end_point": {"row": 245, "column": 45}}, {"id": 955, "type": "call_expression", "text": "zone->runtimeFromMainThread()", "parent": 954, "children": [956, 959], "start_point": {"row": 245, "column": 12}, "end_point": {"row": 245, "column": 41}}, {"id": 956, "type": "field_expression", "text": "zone->runtimeFromMainThread", "parent": 955, "children": [957, 958], "start_point": {"row": 245, "column": 12}, "end_point": {"row": 245, "column": 39}}, {"id": 957, "type": "identifier", "text": "zone", "parent": 956, "children": [], "start_point": {"row": 245, "column": 12}, "end_point": {"row": 245, "column": 16}}, {"id": 958, "type": "field_identifier", "text": "runtimeFromMainThread", "parent": 956, "children": [], "start_point": {"row": 245, "column": 18}, "end_point": {"row": 245, "column": 39}}, {"id": 959, "type": "argument_list", "text": "()", "parent": 955, "children": [], "start_point": {"row": 245, "column": 39}, "end_point": {"row": 245, "column": 41}}, {"id": 960, "type": "field_identifier", "text": "gc", "parent": 954, "children": [], "start_point": {"row": 245, "column": 43}, "end_point": {"row": 245, "column": 45}}, {"id": 961, "type": "field_identifier", "text": "evictNursery", "parent": 953, "children": [], "start_point": {"row": 245, "column": 46}, "end_point": {"row": 245, "column": 58}}, {"id": 962, "type": "argument_list", "text": "()", "parent": 952, "children": [], "start_point": {"row": 245, "column": 58}, "end_point": {"row": 245, "column": 60}}, {"id": 963, "type": "call_expression", "text": "init(zone, kind)", "parent": 934, "children": [964, 965], "start_point": {"row": 248, "column": 8}, "end_point": {"row": 248, "column": 24}}, {"id": 964, "type": "identifier", "text": "init", "parent": 963, "children": [], "start_point": {"row": 248, "column": 8}, "end_point": {"row": 248, "column": 12}}, {"id": 965, "type": "argument_list", "text": "(zone, kind)", "parent": 963, "children": [966, 967], "start_point": {"row": 248, "column": 12}, "end_point": {"row": 248, "column": 24}}, {"id": 966, "type": "identifier", "text": "zone", "parent": 965, "children": [], "start_point": {"row": 248, "column": 13}, "end_point": {"row": 248, "column": 17}}, {"id": 967, "type": "identifier", "text": "kind", "parent": 965, "children": [], "start_point": {"row": 248, "column": 19}, "end_point": {"row": 248, "column": 23}}, {"id": 968, "type": "labeled_statement", "text": "ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }", "parent": 21, "children": [969, 970, 981], "start_point": {"row": 251, "column": 4}, "end_point": {"row": 255, "column": 5}}, {"id": 969, "type": "statement_identifier", "text": "ZoneCellIter", "parent": 968, "children": [], "start_point": {"row": 251, "column": 4}, "end_point": {"row": 251, "column": 16}}, {"id": 970, "type": "ERROR", "text": "(JS::Zone* zone, AllocKind kind, const js:", "parent": 968, "children": [971, 973, 974, 977, 978, 980], "start_point": {"row": 251, "column": 16}, "end_point": {"row": 251, "column": 58}}, {"id": 971, "type": "type_descriptor", "text": "JS", "parent": 970, "children": [972], "start_point": {"row": 251, "column": 17}, "end_point": {"row": 251, "column": 19}}, {"id": 972, "type": "type_identifier", "text": "JS", "parent": 971, "children": [], "start_point": {"row": 251, "column": 17}, "end_point": {"row": 251, "column": 19}}, {"id": 973, "type": "type_identifier", "text": "Zone", "parent": 970, "children": [], "start_point": {"row": 251, "column": 21}, "end_point": {"row": 251, "column": 25}}, {"id": 974, "type": "pointer_declarator", "text": "* zone", "parent": 970, "children": [975, 976], "start_point": {"row": 251, "column": 25}, "end_point": {"row": 251, "column": 31}}, {"id": 975, "type": "*", "text": "*", "parent": 974, "children": [], "start_point": {"row": 251, "column": 25}, "end_point": {"row": 251, "column": 26}}, {"id": 976, "type": "identifier", "text": "zone", "parent": 974, "children": [], "start_point": {"row": 251, "column": 27}, "end_point": {"row": 251, "column": 31}}, {"id": 977, "type": "identifier", "text": "AllocKind", "parent": 970, "children": [], "start_point": {"row": 251, "column": 33}, "end_point": {"row": 251, "column": 42}}, {"id": 978, "type": "ERROR", "text": "kind", "parent": 970, "children": [979], "start_point": {"row": 251, "column": 43}, "end_point": {"row": 251, "column": 47}}, {"id": 979, "type": "identifier", "text": "kind", "parent": 978, "children": [], "start_point": {"row": 251, "column": 43}, "end_point": {"row": 251, "column": 47}}, {"id": 980, "type": "identifier", "text": "js", "parent": 970, "children": [], "start_point": {"row": 251, "column": 55}, "end_point": {"row": 251, "column": 57}}, {"id": 981, "type": "labeled_statement", "text": "gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }", "parent": 968, "children": [982, 983], "start_point": {"row": 251, "column": 59}, "end_point": {"row": 255, "column": 5}}, {"id": 982, "type": "statement_identifier", "text": "gc", "parent": 981, "children": [], "start_point": {"row": 251, "column": 59}, "end_point": {"row": 251, "column": 61}}, {"id": 983, "type": "ERROR", "text": ":AutoAssertEmptyNursery&)", "parent": 981, "children": [984], "start_point": {"row": 251, "column": 62}, "end_point": {"row": 251, "column": 87}}, {"id": 984, "type": "identifier", "text": "AutoAssertEmptyNursery", "parent": 983, "children": [], "start_point": {"row": 251, "column": 63}, "end_point": {"row": 251, "column": 85}}, {"id": 985, "type": "call_expression", "text": "init(zone, kind)", "parent": 981, "children": [986, 987], "start_point": {"row": 254, "column": 8}, "end_point": {"row": 254, "column": 24}}, {"id": 986, "type": "identifier", "text": "init", "parent": 985, "children": [], "start_point": {"row": 254, "column": 8}, "end_point": {"row": 254, "column": 12}}, {"id": 987, "type": "argument_list", "text": "(zone, kind)", "parent": 985, "children": [988, 989], "start_point": {"row": 254, "column": 12}, "end_point": {"row": 254, "column": 24}}, {"id": 988, "type": "identifier", "text": "zone", "parent": 987, "children": [], "start_point": {"row": 254, "column": 13}, "end_point": {"row": 254, "column": 17}}, {"id": 989, "type": "identifier", "text": "kind", "parent": 987, "children": [], "start_point": {"row": 254, "column": 19}, "end_point": {"row": 254, "column": 23}}, {"id": 990, "type": "ERROR", "text": "bool done() const", "parent": 21, "children": [991, 992], "start_point": {"row": 257, "column": 4}, "end_point": {"row": 257, "column": 21}}, {"id": 991, "type": "primitive_type", "text": "bool", "parent": 990, "children": [], "start_point": {"row": 257, "column": 4}, "end_point": {"row": 257, "column": 8}}, {"id": 992, "type": "function_declarator", "text": "done()", "parent": 990, "children": [993, 994], "start_point": {"row": 257, "column": 9}, "end_point": {"row": 257, "column": 15}}, {"id": 993, "type": "identifier", "text": "done", "parent": 992, "children": [], "start_point": {"row": 257, "column": 9}, "end_point": {"row": 257, "column": 13}}, {"id": 994, "type": "parameter_list", "text": "()", "parent": 992, "children": [], "start_point": {"row": 257, "column": 13}, "end_point": {"row": 257, "column": 15}}, {"id": 995, "type": "return_statement", "text": "return arenaIter.done();", "parent": 21, "children": [996], "start_point": {"row": 258, "column": 8}, "end_point": {"row": 258, "column": 32}}, {"id": 996, "type": "call_expression", "text": "arenaIter.done()", "parent": 995, "children": [997, 1000], "start_point": {"row": 258, "column": 15}, "end_point": {"row": 258, "column": 31}}, {"id": 997, "type": "field_expression", "text": "arenaIter.done", "parent": 996, "children": [998, 999], "start_point": {"row": 258, "column": 15}, "end_point": {"row": 258, "column": 29}}, {"id": 998, "type": "identifier", "text": "arenaIter", "parent": 997, "children": [], "start_point": {"row": 258, "column": 15}, "end_point": {"row": 258, "column": 24}}, {"id": 999, "type": "field_identifier", "text": "done", "parent": 997, "children": [], "start_point": {"row": 258, "column": 25}, "end_point": {"row": 258, "column": 29}}, {"id": 1000, "type": "argument_list", "text": "()", "parent": 996, "children": [], "start_point": {"row": 258, "column": 29}, "end_point": {"row": 258, "column": 31}}, {"id": 1001, "type": "ERROR", "text": "template<typename T>\n T* get() const", "parent": 21, "children": [1002], "start_point": {"row": 261, "column": 4}, "end_point": {"row": 262, "column": 18}}, {"id": 1002, "type": "binary_expression", "text": "template<typename T>\n T* get()", "parent": 1001, "children": [1003, 1007, 1009, 1010], "start_point": {"row": 261, "column": 4}, "end_point": {"row": 262, "column": 12}}, {"id": 1003, "type": "binary_expression", "text": "template<typename", "parent": 1002, "children": [1004, 1005, 1006], "start_point": {"row": 261, "column": 4}, "end_point": {"row": 261, "column": 21}}, {"id": 1004, "type": "identifier", "text": "template", "parent": 1003, "children": [], "start_point": {"row": 261, "column": 4}, "end_point": {"row": 261, "column": 12}}, {"id": 1005, "type": "<", "text": "<", "parent": 1003, "children": [], "start_point": {"row": 261, "column": 12}, "end_point": {"row": 261, "column": 13}}, {"id": 1006, "type": "identifier", "text": "typename", "parent": 1003, "children": [], "start_point": {"row": 261, "column": 13}, "end_point": {"row": 261, "column": 21}}, {"id": 1007, "type": "ERROR", "text": "T", "parent": 1002, "children": [1008], "start_point": {"row": 261, "column": 22}, "end_point": {"row": 261, "column": 23}}, {"id": 1008, "type": "identifier", "text": "T", "parent": 1007, "children": [], "start_point": {"row": 261, "column": 22}, "end_point": {"row": 261, "column": 23}}, {"id": 1009, "type": ">", "text": ">", "parent": 1002, "children": [], "start_point": {"row": 261, "column": 23}, "end_point": {"row": 261, "column": 24}}, {"id": 1010, "type": "binary_expression", "text": "T* get()", "parent": 1002, "children": [1011, 1012, 1013], "start_point": {"row": 262, "column": 4}, "end_point": {"row": 262, "column": 12}}, {"id": 1011, "type": "identifier", "text": "T", "parent": 1010, "children": [], "start_point": {"row": 262, "column": 4}, "end_point": {"row": 262, "column": 5}}, {"id": 1012, "type": "*", "text": "*", "parent": 1010, "children": [], "start_point": {"row": 262, "column": 5}, "end_point": {"row": 262, "column": 6}}, {"id": 1013, "type": "call_expression", "text": "get()", "parent": 1010, "children": [1014, 1015], "start_point": {"row": 262, "column": 7}, "end_point": {"row": 262, "column": 12}}, {"id": 1014, "type": "identifier", "text": "get", "parent": 1013, "children": [], "start_point": {"row": 262, "column": 7}, "end_point": {"row": 262, "column": 10}}, {"id": 1015, "type": "argument_list", "text": "()", "parent": 1013, "children": [], "start_point": {"row": 262, "column": 10}, "end_point": {"row": 262, "column": 12}}, {"id": 1016, "type": "call_expression", "text": "MOZ_ASSERT(!done())", "parent": 21, "children": [1017, 1018], "start_point": {"row": 263, "column": 8}, "end_point": {"row": 263, "column": 27}}, {"id": 1017, "type": "identifier", "text": "MOZ_ASSERT", "parent": 1016, "children": [], "start_point": {"row": 263, "column": 8}, "end_point": {"row": 263, "column": 18}}, {"id": 1018, "type": "argument_list", "text": "(!done())", "parent": 1016, "children": [1019], "start_point": {"row": 263, "column": 18}, "end_point": {"row": 263, "column": 27}}, {"id": 1019, "type": "unary_expression", "text": "!done()", "parent": 1018, "children": [1020, 1021], "start_point": {"row": 263, "column": 19}, "end_point": {"row": 263, "column": 26}}, {"id": 1020, "type": "!", "text": "!", "parent": 1019, "children": [], "start_point": {"row": 263, "column": 19}, "end_point": {"row": 263, "column": 20}}, {"id": 1021, "type": "call_expression", "text": "done()", "parent": 1019, "children": [1022, 1023], "start_point": {"row": 263, "column": 20}, "end_point": {"row": 263, "column": 26}}, {"id": 1022, "type": "identifier", "text": "done", "parent": 1021, "children": [], "start_point": {"row": 263, "column": 20}, "end_point": {"row": 263, "column": 24}}, {"id": 1023, "type": "argument_list", "text": "()", "parent": 1021, "children": [], "start_point": {"row": 263, "column": 24}, "end_point": {"row": 263, "column": 26}}, {"id": 1024, "type": "return_statement", "text": "return cellIter.get<T>();", "parent": 21, "children": [1025], "start_point": {"row": 264, "column": 8}, "end_point": {"row": 264, "column": 33}}, {"id": 1025, "type": "binary_expression", "text": "cellIter.get<T>()", "parent": 1024, "children": [1026, 1032, 1033], "start_point": {"row": 264, "column": 15}, "end_point": {"row": 264, "column": 32}}, {"id": 1026, "type": "binary_expression", "text": "cellIter.get<T", "parent": 1025, "children": [1027, 1030, 1031], "start_point": {"row": 264, "column": 15}, "end_point": {"row": 264, "column": 29}}, {"id": 1027, "type": "field_expression", "text": "cellIter.get", "parent": 1026, "children": [1028, 1029], "start_point": {"row": 264, "column": 15}, "end_point": {"row": 264, "column": 27}}, {"id": 1028, "type": "identifier", "text": "cellIter", "parent": 1027, "children": [], "start_point": {"row": 264, "column": 15}, "end_point": {"row": 264, "column": 23}}, {"id": 1029, "type": "field_identifier", "text": "get", "parent": 1027, "children": [], "start_point": {"row": 264, "column": 24}, "end_point": {"row": 264, "column": 27}}, {"id": 1030, "type": "<", "text": "<", "parent": 1026, "children": [], "start_point": {"row": 264, "column": 27}, "end_point": {"row": 264, "column": 28}}, {"id": 1031, "type": "identifier", "text": "T", "parent": 1026, "children": [], "start_point": {"row": 264, "column": 28}, "end_point": {"row": 264, "column": 29}}, {"id": 1032, "type": ">", "text": ">", "parent": 1025, "children": [], "start_point": {"row": 264, "column": 29}, "end_point": {"row": 264, "column": 30}}, {"id": 1033, "type": "parenthesized_expression", "text": "()", "parent": 1025, "children": [1034], "start_point": {"row": 264, "column": 30}, "end_point": {"row": 264, "column": 32}}, {"id": 1034, "type": "identifier", "text": "", "parent": 1033, "children": [], "start_point": {"row": 264, "column": 31}, "end_point": {"row": 264, "column": 31}}, {"id": 1035, "type": "function_definition", "text": "TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }", "parent": 21, "children": [1036, 1037], "start_point": {"row": 267, "column": 4}, "end_point": {"row": 270, "column": 5}}, {"id": 1036, "type": "type_identifier", "text": "TenuredCell", "parent": 1035, "children": [], "start_point": {"row": 267, "column": 4}, "end_point": {"row": 267, "column": 15}}, {"id": 1037, "type": "pointer_declarator", "text": "* getCell() const", "parent": 1035, "children": [1038, 1039], "start_point": {"row": 267, "column": 15}, "end_point": {"row": 267, "column": 32}}, {"id": 1038, "type": "*", "text": "*", "parent": 1037, "children": [], "start_point": {"row": 267, "column": 15}, "end_point": {"row": 267, "column": 16}}, {"id": 1039, "type": "function_declarator", "text": "getCell() const", "parent": 1037, "children": [1040, 1041], "start_point": {"row": 267, "column": 17}, "end_point": {"row": 267, "column": 32}}, {"id": 1040, "type": "identifier", "text": "getCell", "parent": 1039, "children": [], "start_point": {"row": 267, "column": 17}, "end_point": {"row": 267, "column": 24}}, {"id": 1041, "type": "parameter_list", "text": "()", "parent": 1039, "children": [], "start_point": {"row": 267, "column": 24}, "end_point": {"row": 267, "column": 26}}, {"id": 1042, "type": "call_expression", "text": "MOZ_ASSERT(!done())", "parent": 1035, "children": [1043, 1044], "start_point": {"row": 268, "column": 8}, "end_point": {"row": 268, "column": 27}}, {"id": 1043, "type": "identifier", "text": "MOZ_ASSERT", "parent": 1042, "children": [], "start_point": {"row": 268, "column": 8}, "end_point": {"row": 268, "column": 18}}, {"id": 1044, "type": "argument_list", "text": "(!done())", "parent": 1042, "children": [1045], "start_point": {"row": 268, "column": 18}, "end_point": {"row": 268, "column": 27}}, {"id": 1045, "type": "unary_expression", "text": "!done()", "parent": 1044, "children": [1046, 1047], "start_point": {"row": 268, "column": 19}, "end_point": {"row": 268, "column": 26}}, {"id": 1046, "type": "!", "text": "!", "parent": 1045, "children": [], "start_point": {"row": 268, "column": 19}, "end_point": {"row": 268, "column": 20}}, {"id": 1047, "type": "call_expression", "text": "done()", "parent": 1045, "children": [1048, 1049], "start_point": {"row": 268, "column": 20}, "end_point": {"row": 268, "column": 26}}, {"id": 1048, "type": "identifier", "text": "done", "parent": 1047, "children": [], "start_point": {"row": 268, "column": 20}, "end_point": {"row": 268, "column": 24}}, {"id": 1049, "type": "argument_list", "text": "()", "parent": 1047, "children": [], "start_point": {"row": 268, "column": 24}, "end_point": {"row": 268, "column": 26}}, {"id": 1050, "type": "return_statement", "text": "return cellIter.getCell();", "parent": 1035, "children": [1051], "start_point": {"row": 269, "column": 8}, "end_point": {"row": 269, "column": 34}}, {"id": 1051, "type": "call_expression", "text": "cellIter.getCell()", "parent": 1050, "children": [1052, 1055], "start_point": {"row": 269, "column": 15}, "end_point": {"row": 269, "column": 33}}, {"id": 1052, "type": "field_expression", "text": "cellIter.getCell", "parent": 1051, "children": [1053, 1054], "start_point": {"row": 269, "column": 15}, "end_point": {"row": 269, "column": 31}}, {"id": 1053, "type": "identifier", "text": "cellIter", "parent": 1052, "children": [], "start_point": {"row": 269, "column": 15}, "end_point": {"row": 269, "column": 23}}, {"id": 1054, "type": "field_identifier", "text": "getCell", "parent": 1052, "children": [], "start_point": {"row": 269, "column": 24}, "end_point": {"row": 269, "column": 31}}, {"id": 1055, "type": "argument_list", "text": "()", "parent": 1051, "children": [], "start_point": {"row": 269, "column": 31}, "end_point": {"row": 269, "column": 33}}, {"id": 1056, "type": "function_definition", "text": "void settle() {\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }\n }", "parent": 21, "children": [1057, 1058], "start_point": {"row": 272, "column": 4}, "end_point": {"row": 279, "column": 5}}, {"id": 1057, "type": "primitive_type", "text": "void", "parent": 1056, "children": [], "start_point": {"row": 272, "column": 4}, "end_point": {"row": 272, "column": 8}}, {"id": 1058, "type": "function_declarator", "text": "settle()", "parent": 1056, "children": [1059, 1060], "start_point": {"row": 272, "column": 9}, "end_point": {"row": 272, "column": 17}}, {"id": 1059, "type": "identifier", "text": "settle", "parent": 1058, "children": [], "start_point": {"row": 272, "column": 9}, "end_point": {"row": 272, "column": 15}}, {"id": 1060, "type": "parameter_list", "text": "()", "parent": 1058, "children": [], "start_point": {"row": 272, "column": 15}, "end_point": {"row": 272, "column": 17}}, {"id": 1061, "type": "while_statement", "text": "while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }", "parent": 1056, "children": [1062], "start_point": {"row": 273, "column": 8}, "end_point": {"row": 278, "column": 9}}, {"id": 1062, "type": "parenthesized_expression", "text": "(cellIter.done() && !arenaIter.done())", "parent": 1061, "children": [1063], "start_point": {"row": 273, "column": 14}, "end_point": {"row": 273, "column": 52}}, {"id": 1063, "type": "binary_expression", "text": "cellIter.done() && !arenaIter.done()", "parent": 1062, "children": [1064, 1069, 1070], "start_point": {"row": 273, "column": 15}, "end_point": {"row": 273, "column": 51}}, {"id": 1064, "type": "call_expression", "text": "cellIter.done()", "parent": 1063, "children": [1065, 1068], "start_point": {"row": 273, "column": 15}, "end_point": {"row": 273, "column": 30}}, {"id": 1065, "type": "field_expression", "text": "cellIter.done", "parent": 1064, "children": [1066, 1067], "start_point": {"row": 273, "column": 15}, "end_point": {"row": 273, "column": 28}}, {"id": 1066, "type": "identifier", "text": "cellIter", "parent": 1065, "children": [], "start_point": {"row": 273, "column": 15}, "end_point": {"row": 273, "column": 23}}, {"id": 1067, "type": "field_identifier", "text": "done", "parent": 1065, "children": [], "start_point": {"row": 273, "column": 24}, "end_point": {"row": 273, "column": 28}}, {"id": 1068, "type": "argument_list", "text": "()", "parent": 1064, "children": [], "start_point": {"row": 273, "column": 28}, "end_point": {"row": 273, "column": 30}}, {"id": 1069, "type": "&&", "text": "&&", "parent": 1063, "children": [], "start_point": {"row": 273, "column": 31}, "end_point": {"row": 273, "column": 33}}, {"id": 1070, "type": "unary_expression", "text": "!arenaIter.done()", "parent": 1063, "children": [1071, 1072], "start_point": {"row": 273, "column": 34}, "end_point": {"row": 273, "column": 51}}, {"id": 1071, "type": "!", "text": "!", "parent": 1070, "children": [], "start_point": {"row": 273, "column": 34}, "end_point": {"row": 273, "column": 35}}, {"id": 1072, "type": "call_expression", "text": "arenaIter.done()", "parent": 1070, "children": [1073, 1076], "start_point": {"row": 273, "column": 35}, "end_point": {"row": 273, "column": 51}}, {"id": 1073, "type": "field_expression", "text": "arenaIter.done", "parent": 1072, "children": [1074, 1075], "start_point": {"row": 273, "column": 35}, "end_point": {"row": 273, "column": 49}}, {"id": 1074, "type": "identifier", "text": "arenaIter", "parent": 1073, "children": [], "start_point": {"row": 273, "column": 35}, "end_point": {"row": 273, "column": 44}}, {"id": 1075, "type": "field_identifier", "text": "done", "parent": 1073, "children": [], "start_point": {"row": 273, "column": 45}, "end_point": {"row": 273, "column": 49}}, {"id": 1076, "type": "argument_list", "text": "()", "parent": 1072, "children": [], "start_point": {"row": 273, "column": 49}, "end_point": {"row": 273, "column": 51}}, {"id": 1077, "type": "call_expression", "text": "arenaIter.next()", "parent": 1061, "children": [1078, 1081], "start_point": {"row": 274, "column": 12}, "end_point": {"row": 274, "column": 28}}, {"id": 1078, "type": "field_expression", "text": "arenaIter.next", "parent": 1077, "children": [1079, 1080], "start_point": {"row": 274, "column": 12}, "end_point": {"row": 274, "column": 26}}, {"id": 1079, "type": "identifier", "text": "arenaIter", "parent": 1078, "children": [], "start_point": {"row": 274, "column": 12}, "end_point": {"row": 274, "column": 21}}, {"id": 1080, "type": "field_identifier", "text": "next", "parent": 1078, "children": [], "start_point": {"row": 274, "column": 22}, "end_point": {"row": 274, "column": 26}}, {"id": 1081, "type": "argument_list", "text": "()", "parent": 1077, "children": [], "start_point": {"row": 274, "column": 26}, "end_point": {"row": 274, "column": 28}}, {"id": 1082, "type": "if_statement", "text": "if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }", "parent": 1061, "children": [1083], "start_point": {"row": 275, "column": 12}, "end_point": {"row": 277, "column": 13}}, {"id": 1083, "type": "parenthesized_expression", "text": "(!arenaIter.done())", "parent": 1082, "children": [1084], "start_point": {"row": 275, "column": 15}, "end_point": {"row": 275, "column": 34}}, {"id": 1084, "type": "unary_expression", "text": "!arenaIter.done()", "parent": 1083, "children": [1085, 1086], "start_point": {"row": 275, "column": 16}, "end_point": {"row": 275, "column": 33}}, {"id": 1085, "type": "!", "text": "!", "parent": 1084, "children": [], "start_point": {"row": 275, "column": 16}, "end_point": {"row": 275, "column": 17}}, {"id": 1086, "type": "call_expression", "text": "arenaIter.done()", "parent": 1084, "children": [1087, 1090], "start_point": {"row": 275, "column": 17}, "end_point": {"row": 275, "column": 33}}, {"id": 1087, "type": "field_expression", "text": "arenaIter.done", "parent": 1086, "children": [1088, 1089], "start_point": {"row": 275, "column": 17}, "end_point": {"row": 275, "column": 31}}, {"id": 1088, "type": "identifier", "text": "arenaIter", "parent": 1087, "children": [], "start_point": {"row": 275, "column": 17}, "end_point": {"row": 275, "column": 26}}, {"id": 1089, "type": "field_identifier", "text": "done", "parent": 1087, "children": [], "start_point": {"row": 275, "column": 27}, "end_point": {"row": 275, "column": 31}}, {"id": 1090, "type": "argument_list", "text": "()", "parent": 1086, "children": [], "start_point": {"row": 275, "column": 31}, "end_point": {"row": 275, "column": 33}}, {"id": 1091, "type": "call_expression", "text": "cellIter.reset(arenaIter.get())", "parent": 1082, "children": [1092, 1095], "start_point": {"row": 276, "column": 16}, "end_point": {"row": 276, "column": 47}}, {"id": 1092, "type": "field_expression", "text": "cellIter.reset", "parent": 1091, "children": [1093, 1094], "start_point": {"row": 276, "column": 16}, "end_point": {"row": 276, "column": 30}}, {"id": 1093, "type": "identifier", "text": "cellIter", "parent": 1092, "children": [], "start_point": {"row": 276, "column": 16}, "end_point": {"row": 276, "column": 24}}, {"id": 1094, "type": "field_identifier", "text": "reset", "parent": 1092, "children": [], "start_point": {"row": 276, "column": 25}, "end_point": {"row": 276, "column": 30}}, {"id": 1095, "type": "argument_list", "text": "(arenaIter.get())", "parent": 1091, "children": [1096], "start_point": {"row": 276, "column": 30}, "end_point": {"row": 276, "column": 47}}, {"id": 1096, "type": "call_expression", "text": "arenaIter.get()", "parent": 1095, "children": [1097, 1100], "start_point": {"row": 276, "column": 31}, "end_point": {"row": 276, "column": 46}}, {"id": 1097, "type": "field_expression", "text": "arenaIter.get", "parent": 1096, "children": [1098, 1099], "start_point": {"row": 276, "column": 31}, "end_point": {"row": 276, "column": 44}}, {"id": 1098, "type": "identifier", "text": "arenaIter", "parent": 1097, "children": [], "start_point": {"row": 276, "column": 31}, "end_point": {"row": 276, "column": 40}}, {"id": 1099, "type": "field_identifier", "text": "get", "parent": 1097, "children": [], "start_point": {"row": 276, "column": 41}, "end_point": {"row": 276, "column": 44}}, {"id": 1100, "type": "argument_list", "text": "()", "parent": 1096, "children": [], "start_point": {"row": 276, "column": 44}, "end_point": {"row": 276, "column": 46}}, {"id": 1101, "type": "function_definition", "text": "void next() {\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }", "parent": 21, "children": [1102, 1103], "start_point": {"row": 281, "column": 4}, "end_point": {"row": 285, "column": 5}}, {"id": 1102, "type": "primitive_type", "text": "void", "parent": 1101, "children": [], "start_point": {"row": 281, "column": 4}, "end_point": {"row": 281, "column": 8}}, {"id": 1103, "type": "function_declarator", "text": "next()", "parent": 1101, "children": [1104, 1105], "start_point": {"row": 281, "column": 9}, "end_point": {"row": 281, "column": 15}}, {"id": 1104, "type": "identifier", "text": "next", "parent": 1103, "children": [], "start_point": {"row": 281, "column": 9}, "end_point": {"row": 281, "column": 13}}, {"id": 1105, "type": "parameter_list", "text": "()", "parent": 1103, "children": [], "start_point": {"row": 281, "column": 13}, "end_point": {"row": 281, "column": 15}}, {"id": 1106, "type": "call_expression", "text": "MOZ_ASSERT(!done())", "parent": 1101, "children": [1107, 1108], "start_point": {"row": 282, "column": 8}, "end_point": {"row": 282, "column": 27}}, {"id": 1107, "type": "identifier", "text": "MOZ_ASSERT", "parent": 1106, "children": [], "start_point": {"row": 282, "column": 8}, "end_point": {"row": 282, "column": 18}}, {"id": 1108, "type": "argument_list", "text": "(!done())", "parent": 1106, "children": [1109], "start_point": {"row": 282, "column": 18}, "end_point": {"row": 282, "column": 27}}, {"id": 1109, "type": "unary_expression", "text": "!done()", "parent": 1108, "children": [1110, 1111], "start_point": {"row": 282, "column": 19}, "end_point": {"row": 282, "column": 26}}, {"id": 1110, "type": "!", "text": "!", "parent": 1109, "children": [], "start_point": {"row": 282, "column": 19}, "end_point": {"row": 282, "column": 20}}, {"id": 1111, "type": "call_expression", "text": "done()", "parent": 1109, "children": [1112, 1113], "start_point": {"row": 282, "column": 20}, "end_point": {"row": 282, "column": 26}}, {"id": 1112, "type": "identifier", "text": "done", "parent": 1111, "children": [], "start_point": {"row": 282, "column": 20}, "end_point": {"row": 282, "column": 24}}, {"id": 1113, "type": "argument_list", "text": "()", "parent": 1111, "children": [], "start_point": {"row": 282, "column": 24}, "end_point": {"row": 282, "column": 26}}, {"id": 1114, "type": "call_expression", "text": "cellIter.next()", "parent": 1101, "children": [1115, 1118], "start_point": {"row": 283, "column": 8}, "end_point": {"row": 283, "column": 23}}, {"id": 1115, "type": "field_expression", "text": "cellIter.next", "parent": 1114, "children": [1116, 1117], "start_point": {"row": 283, "column": 8}, "end_point": {"row": 283, "column": 21}}, {"id": 1116, "type": "identifier", "text": "cellIter", "parent": 1115, "children": [], "start_point": {"row": 283, "column": 8}, "end_point": {"row": 283, "column": 16}}, {"id": 1117, "type": "field_identifier", "text": "next", "parent": 1115, "children": [], "start_point": {"row": 283, "column": 17}, "end_point": {"row": 283, "column": 21}}, {"id": 1118, "type": "argument_list", "text": "()", "parent": 1114, "children": [], "start_point": {"row": 283, "column": 21}, "end_point": {"row": 283, "column": 23}}, {"id": 1119, "type": "call_expression", "text": "settle()", "parent": 1101, "children": [1120, 1121], "start_point": {"row": 284, "column": 8}, "end_point": {"row": 284, "column": 16}}, {"id": 1120, "type": "identifier", "text": "settle", "parent": 1119, "children": [], "start_point": {"row": 284, "column": 8}, "end_point": {"row": 284, "column": 14}}, {"id": 1121, "type": "argument_list", "text": "()", "parent": 1119, "children": [], "start_point": {"row": 284, "column": 14}, "end_point": {"row": 284, "column": 16}}, {"id": 1122, "type": "binary_expression", "text": "template <typename GCType>\nclass", "parent": 21, "children": [1123, 1127, 1129], "start_point": {"row": 322, "column": 0}, "end_point": {"row": 323, "column": 5}}, {"id": 1123, "type": "binary_expression", "text": "template <typename", "parent": 1122, "children": [1124, 1125, 1126], "start_point": {"row": 322, "column": 0}, "end_point": {"row": 322, "column": 18}}, {"id": 1124, "type": "identifier", "text": "template", "parent": 1123, "children": [], "start_point": {"row": 322, "column": 0}, "end_point": {"row": 322, "column": 8}}, {"id": 1125, "type": "<", "text": "<", "parent": 1123, "children": [], "start_point": {"row": 322, "column": 9}, "end_point": {"row": 322, "column": 10}}, {"id": 1126, "type": "identifier", "text": "typename", "parent": 1123, "children": [], "start_point": {"row": 322, "column": 10}, "end_point": {"row": 322, "column": 18}}, {"id": 1127, "type": "ERROR", "text": "GCType", "parent": 1122, "children": [1128], "start_point": {"row": 322, "column": 19}, "end_point": {"row": 322, "column": 25}}, {"id": 1128, "type": "identifier", "text": "GCType", "parent": 1127, "children": [], "start_point": {"row": 322, "column": 19}, "end_point": {"row": 322, "column": 25}}, {"id": 1129, "type": ">", "text": ">", "parent": 1122, "children": [], "start_point": {"row": 322, "column": 25}, "end_point": {"row": 322, "column": 26}}, {"id": 1130, "type": "labeled_statement", "text": "ZoneCellIter : public ZoneCellIter<TenuredCell> {\n public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);\n }", "parent": 21, "children": [1131, 1132], "start_point": {"row": 323, "column": 6}, "end_point": {"row": 337, "column": 5}}, {"id": 1131, "type": "statement_identifier", "text": "ZoneCellIter", "parent": 1130, "children": [], "start_point": {"row": 323, "column": 6}, "end_point": {"row": 323, "column": 18}}, {"id": 1132, "type": "ERROR", "text": "public ZoneCellIter<TenuredCell>", "parent": 1130, "children": [1133, 1134, 1135, 1136], "start_point": {"row": 323, "column": 21}, "end_point": {"row": 323, "column": 53}}, {"id": 1133, "type": "identifier", "text": "ZoneCellIter", "parent": 1132, "children": [], "start_point": {"row": 323, "column": 28}, "end_point": {"row": 323, "column": 40}}, {"id": 1134, "type": "<", "text": "<", "parent": 1132, "children": [], "start_point": {"row": 323, "column": 40}, "end_point": {"row": 323, "column": 41}}, {"id": 1135, "type": "identifier", "text": "TenuredCell", "parent": 1132, "children": [], "start_point": {"row": 323, "column": 41}, "end_point": {"row": 323, "column": 52}}, {"id": 1136, "type": ">", "text": ">", "parent": 1132, "children": [], "start_point": {"row": 323, "column": 52}, "end_point": {"row": 323, "column": 53}}, {"id": 1137, "type": "labeled_statement", "text": "public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);", "parent": 1130, "children": [1138], "start_point": {"row": 324, "column": 2}, "end_point": {"row": 336, "column": 56}}, {"id": 1138, "type": "ERROR", "text": "explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind)", "parent": 1137, "children": [1139, 1140], "start_point": {"row": 335, "column": 4}, "end_point": {"row": 336, "column": 55}}, {"id": 1139, "type": "type_identifier", "text": "explicit", "parent": 1138, "children": [], "start_point": {"row": 335, "column": 4}, "end_point": {"row": 335, "column": 12}}, {"id": 1140, "type": "function_declarator", "text": "ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind)", "parent": 1138, "children": [1141, 1142, 1150, 1151, 1153, 1154, 1156], "start_point": {"row": 335, "column": 13}, "end_point": {"row": 336, "column": 55}}, {"id": 1141, "type": "identifier", "text": "ZoneCellIter", "parent": 1140, "children": [], "start_point": {"row": 335, "column": 13}, "end_point": {"row": 335, "column": 25}}, {"id": 1142, "type": "parameter_list", "text": "(JS::Zone* zone)", "parent": 1140, "children": [1143], "start_point": {"row": 335, "column": 25}, "end_point": {"row": 335, "column": 41}}, {"id": 1143, "type": "parameter_declaration", "text": "JS::Zone* zone", "parent": 1142, "children": [1144, 1145, 1147], "start_point": {"row": 335, "column": 26}, "end_point": {"row": 335, "column": 40}}, {"id": 1144, "type": "type_identifier", "text": "JS", "parent": 1143, "children": [], "start_point": {"row": 335, "column": 26}, "end_point": {"row": 335, "column": 28}}, {"id": 1145, "type": "ERROR", "text": "::Zone", "parent": 1143, "children": [1146], "start_point": {"row": 335, "column": 28}, "end_point": {"row": 335, "column": 34}}, {"id": 1146, "type": "identifier", "text": "Zone", "parent": 1145, "children": [], "start_point": {"row": 335, "column": 30}, "end_point": {"row": 335, "column": 34}}, {"id": 1147, "type": "pointer_declarator", "text": "* zone", "parent": 1143, "children": [1148, 1149], "start_point": {"row": 335, "column": 34}, "end_point": {"row": 335, "column": 40}}, {"id": 1148, "type": "*", "text": "*", "parent": 1147, "children": [], "start_point": {"row": 335, "column": 34}, "end_point": {"row": 335, "column": 35}}, {"id": 1149, "type": "identifier", "text": "zone", "parent": 1147, "children": [], "start_point": {"row": 335, "column": 36}, "end_point": {"row": 335, "column": 40}}, {"id": 1150, "type": "identifier", "text": "ZoneCellIter", "parent": 1140, "children": [], "start_point": {"row": 335, "column": 44}, "end_point": {"row": 335, "column": 56}}, {"id": 1151, "type": "ERROR", "text": "<", "parent": 1140, "children": [1152], "start_point": {"row": 335, "column": 56}, "end_point": {"row": 335, "column": 57}}, {"id": 1152, "type": "<", "text": "<", "parent": 1151, "children": [], "start_point": {"row": 335, "column": 56}, "end_point": {"row": 335, "column": 57}}, {"id": 1153, "type": "identifier", "text": "TenuredCell", "parent": 1140, "children": [], "start_point": {"row": 335, "column": 57}, "end_point": {"row": 335, "column": 68}}, {"id": 1154, "type": "ERROR", "text": ">() {", "parent": 1140, "children": [1155], "start_point": {"row": 335, "column": 68}, "end_point": {"row": 335, "column": 73}}, {"id": 1155, "type": ">", "text": ">", "parent": 1154, "children": [], "start_point": {"row": 335, "column": 68}, "end_point": {"row": 335, "column": 69}}, {"id": 1156, "type": "call_expression", "text": "init(zone, MapTypeToFinalizeKind<GCType>::kind)", "parent": 1140, "children": [1157, 1158], "start_point": {"row": 336, "column": 8}, "end_point": {"row": 336, "column": 55}}, {"id": 1157, "type": "identifier", "text": "init", "parent": 1156, "children": [], "start_point": {"row": 336, "column": 8}, "end_point": {"row": 336, "column": 12}}, {"id": 1158, "type": "argument_list", "text": "(zone, MapTypeToFinalizeKind<GCType>::kind)", "parent": 1156, "children": [1159, 1160], "start_point": {"row": 336, "column": 12}, "end_point": {"row": 336, "column": 55}}, {"id": 1159, "type": "identifier", "text": "zone", "parent": 1158, "children": [], "start_point": {"row": 336, "column": 13}, "end_point": {"row": 336, "column": 17}}, {"id": 1160, "type": "binary_expression", "text": "MapTypeToFinalizeKind<GCType>::kind", "parent": 1158, "children": [1161, 1165, 1166], "start_point": {"row": 336, "column": 19}, "end_point": {"row": 336, "column": 54}}, {"id": 1161, "type": "binary_expression", "text": "MapTypeToFinalizeKind<GCType", "parent": 1160, "children": [1162, 1163, 1164], "start_point": {"row": 336, "column": 19}, "end_point": {"row": 336, "column": 47}}, {"id": 1162, "type": "identifier", "text": "MapTypeToFinalizeKind", "parent": 1161, "children": [], "start_point": {"row": 336, "column": 19}, "end_point": {"row": 336, "column": 40}}, {"id": 1163, "type": "<", "text": "<", "parent": 1161, "children": [], "start_point": {"row": 336, "column": 40}, "end_point": {"row": 336, "column": 41}}, {"id": 1164, "type": "identifier", "text": "GCType", "parent": 1161, "children": [], "start_point": {"row": 336, "column": 41}, "end_point": {"row": 336, "column": 47}}, {"id": 1165, "type": ">", "text": ">", "parent": 1160, "children": [], "start_point": {"row": 336, "column": 47}, "end_point": {"row": 336, "column": 48}}, {"id": 1166, "type": "identifier", "text": "kind", "parent": 1160, "children": [], "start_point": {"row": 336, "column": 50}, "end_point": {"row": 336, "column": 54}}, {"id": 1167, "type": "labeled_statement", "text": "ZoneCellIter(JS::Zone* zone, const js::gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) {\n }", "parent": 21, "children": [1168, 1169, 1177], "start_point": {"row": 340, "column": 4}, "end_point": {"row": 341, "column": 5}}, {"id": 1168, "type": "statement_identifier", "text": "ZoneCellIter", "parent": 1167, "children": [], "start_point": {"row": 340, "column": 4}, "end_point": {"row": 340, "column": 16}}, {"id": 1169, "type": "ERROR", "text": "(JS::Zone* zone, const js:", "parent": 1167, "children": [1170, 1172, 1173, 1176], "start_point": {"row": 340, "column": 16}, "end_point": {"row": 340, "column": 42}}, {"id": 1170, "type": "type_descriptor", "text": "JS", "parent": 1169, "children": [1171], "start_point": {"row": 340, "column": 17}, "end_point": {"row": 340, "column": 19}}, {"id": 1171, "type": "type_identifier", "text": "JS", "parent": 1170, "children": [], "start_point": {"row": 340, "column": 17}, "end_point": {"row": 340, "column": 19}}, {"id": 1172, "type": "type_identifier", "text": "Zone", "parent": 1169, "children": [], "start_point": {"row": 340, "column": 21}, "end_point": {"row": 340, "column": 25}}, {"id": 1173, "type": "pointer_declarator", "text": "* zone", "parent": 1169, "children": [1174, 1175], "start_point": {"row": 340, "column": 25}, "end_point": {"row": 340, "column": 31}}, {"id": 1174, "type": "*", "text": "*", "parent": 1173, "children": [], "start_point": {"row": 340, "column": 25}, "end_point": {"row": 340, "column": 26}}, {"id": 1175, "type": "identifier", "text": "zone", "parent": 1173, "children": [], "start_point": {"row": 340, "column": 27}, "end_point": {"row": 340, "column": 31}}, {"id": 1176, "type": "identifier", "text": "js", "parent": 1169, "children": [], "start_point": {"row": 340, "column": 39}, "end_point": {"row": 340, "column": 41}}, {"id": 1177, "type": "labeled_statement", "text": "gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) {\n }", "parent": 1167, "children": [1178, 1179, 1181], "start_point": {"row": 340, "column": 43}, "end_point": {"row": 341, "column": 5}}, {"id": 1178, "type": "statement_identifier", "text": "gc", "parent": 1177, "children": [], "start_point": {"row": 340, "column": 43}, "end_point": {"row": 340, "column": 45}}, {"id": 1179, "type": "ERROR", "text": "::AutoAssertEmptyNursery&)", "parent": 1177, "children": [1180], "start_point": {"row": 340, "column": 45}, "end_point": {"row": 340, "column": 71}}, {"id": 1180, "type": "identifier", "text": "AutoAssertEmptyNursery", "parent": 1179, "children": [], "start_point": {"row": 340, "column": 47}, "end_point": {"row": 340, "column": 69}}, {"id": 1181, "type": "ERROR", "text": "ZoneCellIter(zone)", "parent": 1177, "children": [1182], "start_point": {"row": 340, "column": 74}, "end_point": {"row": 340, "column": 92}}, {"id": 1182, "type": "macro_type_specifier", "text": "ZoneCellIter(zone)", "parent": 1181, "children": [1183, 1184], "start_point": {"row": 340, "column": 74}, "end_point": {"row": 340, "column": 92}}, {"id": 1183, "type": "identifier", "text": "ZoneCellIter", "parent": 1182, "children": [], "start_point": {"row": 340, "column": 74}, "end_point": {"row": 340, "column": 86}}, {"id": 1184, "type": "type_descriptor", "text": "zone", "parent": 1182, "children": [1185], "start_point": {"row": 340, "column": 87}, "end_point": {"row": 340, "column": 91}}, {"id": 1185, "type": "type_identifier", "text": "zone", "parent": 1184, "children": [], "start_point": {"row": 340, "column": 87}, "end_point": {"row": 340, "column": 91}}, {"id": 1186, "type": "labeled_statement", "text": "ZoneCellIter(JS::Zone* zone, AllocKind kind) : ZoneCellIter<TenuredCell>(zone, kind)", "parent": 21, "children": [1187, 1188], "start_point": {"row": 345, "column": 4}, "end_point": {"row": 345, "column": 88}}, {"id": 1187, "type": "statement_identifier", "text": "ZoneCellIter", "parent": 1186, "children": [], "start_point": {"row": 345, "column": 4}, "end_point": {"row": 345, "column": 16}}, {"id": 1188, "type": "ERROR", "text": "(JS::Zone* zone, AllocKind kind)", "parent": 1186, "children": [1189, 1191, 1192, 1195, 1196], "start_point": {"row": 345, "column": 16}, "end_point": {"row": 345, "column": 48}}, {"id": 1189, "type": "type_descriptor", "text": "JS", "parent": 1188, "children": [1190], "start_point": {"row": 345, "column": 17}, "end_point": {"row": 345, "column": 19}}, {"id": 1190, "type": "type_identifier", "text": "JS", "parent": 1189, "children": [], "start_point": {"row": 345, "column": 17}, "end_point": {"row": 345, "column": 19}}, {"id": 1191, "type": "type_identifier", "text": "Zone", "parent": 1188, "children": [], "start_point": {"row": 345, "column": 21}, "end_point": {"row": 345, "column": 25}}, {"id": 1192, "type": "pointer_declarator", "text": "* zone", "parent": 1188, "children": [1193, 1194], "start_point": {"row": 345, "column": 25}, "end_point": {"row": 345, "column": 31}}, {"id": 1193, "type": "*", "text": "*", "parent": 1192, "children": [], "start_point": {"row": 345, "column": 25}, "end_point": {"row": 345, "column": 26}}, {"id": 1194, "type": "identifier", "text": "zone", "parent": 1192, "children": [], "start_point": {"row": 345, "column": 27}, "end_point": {"row": 345, "column": 31}}, {"id": 1195, "type": "identifier", "text": "AllocKind", "parent": 1188, "children": [], "start_point": {"row": 345, "column": 33}, "end_point": {"row": 345, "column": 42}}, {"id": 1196, "type": "identifier", "text": "kind", "parent": 1188, "children": [], "start_point": {"row": 345, "column": 43}, "end_point": {"row": 345, "column": 47}}, {"id": 1197, "type": "binary_expression", "text": "ZoneCellIter<TenuredCell>(zone, kind)", "parent": 1186, "children": [1198, 1202, 1203], "start_point": {"row": 345, "column": 51}, "end_point": {"row": 345, "column": 88}}, {"id": 1198, "type": "binary_expression", "text": "ZoneCellIter<TenuredCell", "parent": 1197, "children": [1199, 1200, 1201], "start_point": {"row": 345, "column": 51}, "end_point": {"row": 345, "column": 75}}, {"id": 1199, "type": "identifier", "text": "ZoneCellIter", "parent": 1198, "children": [], "start_point": {"row": 345, "column": 51}, "end_point": {"row": 345, "column": 63}}, {"id": 1200, "type": "<", "text": "<", "parent": 1198, "children": [], "start_point": {"row": 345, "column": 63}, "end_point": {"row": 345, "column": 64}}, {"id": 1201, "type": "identifier", "text": "TenuredCell", "parent": 1198, "children": [], "start_point": {"row": 345, "column": 64}, "end_point": {"row": 345, "column": 75}}, {"id": 1202, "type": ">", "text": ">", "parent": 1197, "children": [], "start_point": {"row": 345, "column": 75}, "end_point": {"row": 345, "column": 76}}, {"id": 1203, "type": "parenthesized_expression", "text": "(zone, kind)", "parent": 1197, "children": [1204], "start_point": {"row": 345, "column": 76}, "end_point": {"row": 345, "column": 88}}, {"id": 1204, "type": "comma_expression", "text": "zone, kind", "parent": 1203, "children": [1205, 1206], "start_point": {"row": 345, "column": 77}, "end_point": {"row": 345, "column": 87}}, {"id": 1205, "type": "identifier", "text": "zone", "parent": 1204, "children": [], "start_point": {"row": 345, "column": 77}, "end_point": {"row": 345, "column": 81}}, {"id": 1206, "type": "identifier", "text": "kind", "parent": 1204, "children": [], "start_point": {"row": 345, "column": 83}, "end_point": {"row": 345, "column": 87}}, {"id": 1207, "type": "labeled_statement", "text": "ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery& empty)\n : ZoneCellIter<TenuredCell>(zone, kind, empty)", "parent": 21, "children": [1208, 1209, 1220], "start_point": {"row": 350, "column": 4}, "end_point": {"row": 351, "column": 52}}, {"id": 1208, "type": "statement_identifier", "text": "ZoneCellIter", "parent": 1207, "children": [], "start_point": {"row": 350, "column": 4}, "end_point": {"row": 350, "column": 16}}, {"id": 1209, "type": "ERROR", "text": "(JS::Zone* zone, AllocKind kind, const js:", "parent": 1207, "children": [1210, 1212, 1213, 1216, 1217, 1219], "start_point": {"row": 350, "column": 16}, "end_point": {"row": 350, "column": 58}}, {"id": 1210, "type": "type_descriptor", "text": "JS", "parent": 1209, "children": [1211], "start_point": {"row": 350, "column": 17}, "end_point": {"row": 350, "column": 19}}, {"id": 1211, "type": "type_identifier", "text": "JS", "parent": 1210, "children": [], "start_point": {"row": 350, "column": 17}, "end_point": {"row": 350, "column": 19}}, {"id": 1212, "type": "type_identifier", "text": "Zone", "parent": 1209, "children": [], "start_point": {"row": 350, "column": 21}, "end_point": {"row": 350, "column": 25}}, {"id": 1213, "type": "pointer_declarator", "text": "* zone", "parent": 1209, "children": [1214, 1215], "start_point": {"row": 350, "column": 25}, "end_point": {"row": 350, "column": 31}}, {"id": 1214, "type": "*", "text": "*", "parent": 1213, "children": [], "start_point": {"row": 350, "column": 25}, "end_point": {"row": 350, "column": 26}}, {"id": 1215, "type": "identifier", "text": "zone", "parent": 1213, "children": [], "start_point": {"row": 350, "column": 27}, "end_point": {"row": 350, "column": 31}}, {"id": 1216, "type": "identifier", "text": "AllocKind", "parent": 1209, "children": [], "start_point": {"row": 350, "column": 33}, "end_point": {"row": 350, "column": 42}}, {"id": 1217, "type": "ERROR", "text": "kind", "parent": 1209, "children": [1218], "start_point": {"row": 350, "column": 43}, "end_point": {"row": 350, "column": 47}}, {"id": 1218, "type": "identifier", "text": "kind", "parent": 1217, "children": [], "start_point": {"row": 350, "column": 43}, "end_point": {"row": 350, "column": 47}}, {"id": 1219, "type": "identifier", "text": "js", "parent": 1209, "children": [], "start_point": {"row": 350, "column": 55}, "end_point": {"row": 350, "column": 57}}, {"id": 1220, "type": "labeled_statement", "text": "gc::AutoAssertEmptyNursery& empty)\n : ZoneCellIter<TenuredCell>(zone, kind, empty)", "parent": 1207, "children": [1221, 1222], "start_point": {"row": 350, "column": 59}, "end_point": {"row": 351, "column": 52}}, {"id": 1221, "type": "statement_identifier", "text": "gc", "parent": 1220, "children": [], "start_point": {"row": 350, "column": 59}, "end_point": {"row": 350, "column": 61}}, {"id": 1222, "type": "ERROR", "text": "::AutoAssertEmptyNursery& empty)", "parent": 1220, "children": [1223], "start_point": {"row": 350, "column": 61}, "end_point": {"row": 350, "column": 93}}, {"id": 1223, "type": "binary_expression", "text": "AutoAssertEmptyNursery& empty", "parent": 1222, "children": [1224, 1225], "start_point": {"row": 350, "column": 63}, "end_point": {"row": 350, "column": 92}}, {"id": 1224, "type": "identifier", "text": "AutoAssertEmptyNursery", "parent": 1223, "children": [], "start_point": {"row": 350, "column": 63}, "end_point": {"row": 350, "column": 85}}, {"id": 1225, "type": "identifier", "text": "empty", "parent": 1223, "children": [], "start_point": {"row": 350, "column": 87}, "end_point": {"row": 350, "column": 92}}, {"id": 1226, "type": "binary_expression", "text": "ZoneCellIter<TenuredCell>(zone, kind, empty)", "parent": 1220, "children": [1227, 1231, 1232], "start_point": {"row": 351, "column": 8}, "end_point": {"row": 351, "column": 52}}, {"id": 1227, "type": "binary_expression", "text": "ZoneCellIter<TenuredCell", "parent": 1226, "children": [1228, 1229, 1230], "start_point": {"row": 351, "column": 8}, "end_point": {"row": 351, "column": 32}}, {"id": 1228, "type": "identifier", "text": "ZoneCellIter", "parent": 1227, "children": [], "start_point": {"row": 351, "column": 8}, "end_point": {"row": 351, "column": 20}}, {"id": 1229, "type": "<", "text": "<", "parent": 1227, "children": [], "start_point": {"row": 351, "column": 20}, "end_point": {"row": 351, "column": 21}}, {"id": 1230, "type": "identifier", "text": "TenuredCell", "parent": 1227, "children": [], "start_point": {"row": 351, "column": 21}, "end_point": {"row": 351, "column": 32}}, {"id": 1231, "type": ">", "text": ">", "parent": 1226, "children": [], "start_point": {"row": 351, "column": 32}, "end_point": {"row": 351, "column": 33}}, {"id": 1232, "type": "parenthesized_expression", "text": "(zone, kind, empty)", "parent": 1226, "children": [1233], "start_point": {"row": 351, "column": 33}, "end_point": {"row": 351, "column": 52}}, {"id": 1233, "type": "comma_expression", "text": "zone, kind, empty", "parent": 1232, "children": [1234, 1235], "start_point": {"row": 351, "column": 34}, "end_point": {"row": 351, "column": 51}}, {"id": 1234, "type": "identifier", "text": "zone", "parent": 1233, "children": [], "start_point": {"row": 351, "column": 34}, "end_point": {"row": 351, "column": 38}}, {"id": 1235, "type": "comma_expression", "text": "kind, empty", "parent": 1233, "children": [1236, 1237], "start_point": {"row": 351, "column": 40}, "end_point": {"row": 351, "column": 51}}, {"id": 1236, "type": "identifier", "text": "kind", "parent": 1235, "children": [], "start_point": {"row": 351, "column": 40}, "end_point": {"row": 351, "column": 44}}, {"id": 1237, "type": "identifier", "text": "empty", "parent": 1235, "children": [], "start_point": {"row": 351, "column": 46}, "end_point": {"row": 351, "column": 51}}, {"id": 1238, "type": "function_definition", "text": "GCType* get() const { return ZoneCellIter<TenuredCell>::get<GCType>(); }", "parent": 21, "children": [1239, 1240], "start_point": {"row": 355, "column": 4}, "end_point": {"row": 355, "column": 76}}, {"id": 1239, "type": "type_identifier", "text": "GCType", "parent": 1238, "children": [], "start_point": {"row": 355, "column": 4}, "end_point": {"row": 355, "column": 10}}, {"id": 1240, "type": "pointer_declarator", "text": "* get() const", "parent": 1238, "children": [1241, 1242], "start_point": {"row": 355, "column": 10}, "end_point": {"row": 355, "column": 23}}, {"id": 1241, "type": "*", "text": "*", "parent": 1240, "children": [], "start_point": {"row": 355, "column": 10}, "end_point": {"row": 355, "column": 11}}, {"id": 1242, "type": "function_declarator", "text": "get() const", "parent": 1240, "children": [1243, 1244], "start_point": {"row": 355, "column": 12}, "end_point": {"row": 355, "column": 23}}, {"id": 1243, "type": "identifier", "text": "get", "parent": 1242, "children": [], "start_point": {"row": 355, "column": 12}, "end_point": {"row": 355, "column": 15}}, {"id": 1244, "type": "parameter_list", "text": "()", "parent": 1242, "children": [], "start_point": {"row": 355, "column": 15}, "end_point": {"row": 355, "column": 17}}, {"id": 1245, "type": "return_statement", "text": "return ZoneCellIter<TenuredCell>::get<GCType>();", "parent": 1238, "children": [1246], "start_point": {"row": 355, "column": 26}, "end_point": {"row": 355, "column": 74}}, {"id": 1246, "type": "binary_expression", "text": "ZoneCellIter<TenuredCell>::get<GCType>()", "parent": 1245, "children": [1247, 1257, 1258], "start_point": {"row": 355, "column": 33}, "end_point": {"row": 355, "column": 73}}, {"id": 1247, "type": "binary_expression", "text": "ZoneCellIter<TenuredCell>::get<GCType", "parent": 1246, "children": [1248, 1255, 1256], "start_point": {"row": 355, "column": 33}, "end_point": {"row": 355, "column": 70}}, {"id": 1248, "type": "binary_expression", "text": "ZoneCellIter<TenuredCell>::get", "parent": 1247, "children": [1249, 1253, 1254], "start_point": {"row": 355, "column": 33}, "end_point": {"row": 355, "column": 63}}, {"id": 1249, "type": "binary_expression", "text": "ZoneCellIter<TenuredCell", "parent": 1248, "children": [1250, 1251, 1252], "start_point": {"row": 355, "column": 33}, "end_point": {"row": 355, "column": 57}}, {"id": 1250, "type": "identifier", "text": "ZoneCellIter", "parent": 1249, "children": [], "start_point": {"row": 355, "column": 33}, "end_point": {"row": 355, "column": 45}}, {"id": 1251, "type": "<", "text": "<", "parent": 1249, "children": [], "start_point": {"row": 355, "column": 45}, "end_point": {"row": 355, "column": 46}}, {"id": 1252, "type": "identifier", "text": "TenuredCell", "parent": 1249, "children": [], "start_point": {"row": 355, "column": 46}, "end_point": {"row": 355, "column": 57}}, {"id": 1253, "type": ">", "text": ">", "parent": 1248, "children": [], "start_point": {"row": 355, "column": 57}, "end_point": {"row": 355, "column": 58}}, {"id": 1254, "type": "identifier", "text": "get", "parent": 1248, "children": [], "start_point": {"row": 355, "column": 60}, "end_point": {"row": 355, "column": 63}}, {"id": 1255, "type": "<", "text": "<", "parent": 1247, "children": [], "start_point": {"row": 355, "column": 63}, "end_point": {"row": 355, "column": 64}}, {"id": 1256, "type": "identifier", "text": "GCType", "parent": 1247, "children": [], "start_point": {"row": 355, "column": 64}, "end_point": {"row": 355, "column": 70}}, {"id": 1257, "type": ">", "text": ">", "parent": 1246, "children": [], "start_point": {"row": 355, "column": 70}, "end_point": {"row": 355, "column": 71}}, {"id": 1258, "type": "parenthesized_expression", "text": "()", "parent": 1246, "children": [1259], "start_point": {"row": 355, "column": 71}, "end_point": {"row": 355, "column": 73}}, {"id": 1259, "type": "identifier", "text": "", "parent": 1258, "children": [], "start_point": {"row": 355, "column": 72}, "end_point": {"row": 355, "column": 72}}, {"id": 1260, "type": "function_definition", "text": "operator GCType*() const { return get(); }", "parent": 21, "children": [1261, 1262, 1264], "start_point": {"row": 356, "column": 4}, "end_point": {"row": 356, "column": 46}}, {"id": 1261, "type": "type_identifier", "text": "operator", "parent": 1260, "children": [], "start_point": {"row": 356, "column": 4}, "end_point": {"row": 356, "column": 12}}, {"id": 1262, "type": "ERROR", "text": "GCType", "parent": 1260, "children": [1263], "start_point": {"row": 356, "column": 13}, "end_point": {"row": 356, "column": 19}}, {"id": 1263, "type": "identifier", "text": "GCType", "parent": 1262, "children": [], "start_point": {"row": 356, "column": 13}, "end_point": {"row": 356, "column": 19}}, {"id": 1264, "type": "pointer_declarator", "text": "*() const", "parent": 1260, "children": [1265, 1266, 1267], "start_point": {"row": 356, "column": 19}, "end_point": {"row": 356, "column": 28}}, {"id": 1265, "type": "*", "text": "*", "parent": 1264, "children": [], "start_point": {"row": 356, "column": 19}, "end_point": {"row": 356, "column": 20}}, {"id": 1266, "type": "ERROR", "text": "()", "parent": 1264, "children": [], "start_point": {"row": 356, "column": 20}, "end_point": {"row": 356, "column": 22}}, {"id": 1267, "type": "identifier", "text": "", "parent": 1264, "children": [], "start_point": {"row": 356, "column": 28}, "end_point": {"row": 356, "column": 28}}, {"id": 1268, "type": "return_statement", "text": "return get();", "parent": 1260, "children": [1269], "start_point": {"row": 356, "column": 31}, "end_point": {"row": 356, "column": 44}}, {"id": 1269, "type": "call_expression", "text": "get()", "parent": 1268, "children": [1270, 1271], "start_point": {"row": 356, "column": 38}, "end_point": {"row": 356, "column": 43}}, {"id": 1270, "type": "identifier", "text": "get", "parent": 1269, "children": [], "start_point": {"row": 356, "column": 38}, "end_point": {"row": 356, "column": 41}}, {"id": 1271, "type": "argument_list", "text": "()", "parent": 1269, "children": [], "start_point": {"row": 356, "column": 41}, "end_point": {"row": 356, "column": 43}}, {"id": 1272, "type": "ERROR", "text": "GCType* operator ->() const", "parent": 21, "children": [1273], "start_point": {"row": 357, "column": 4}, "end_point": {"row": 357, "column": 31}}, {"id": 1273, "type": "binary_expression", "text": "GCType* operator ->()", "parent": 1272, "children": [1274, 1275, 1276], "start_point": {"row": 357, "column": 4}, "end_point": {"row": 357, "column": 25}}, {"id": 1274, "type": "identifier", "text": "GCType", "parent": 1273, "children": [], "start_point": {"row": 357, "column": 4}, "end_point": {"row": 357, "column": 10}}, {"id": 1275, "type": "*", "text": "*", "parent": 1273, "children": [], "start_point": {"row": 357, "column": 10}, "end_point": {"row": 357, "column": 11}}, {"id": 1276, "type": "call_expression", "text": "operator ->()", "parent": 1273, "children": [1277, 1280], "start_point": {"row": 357, "column": 12}, "end_point": {"row": 357, "column": 25}}, {"id": 1277, "type": "field_expression", "text": "operator ->", "parent": 1276, "children": [1278, 1279], "start_point": {"row": 357, "column": 12}, "end_point": {"row": 357, "column": 23}}, {"id": 1278, "type": "identifier", "text": "operator", "parent": 1277, "children": [], "start_point": {"row": 357, "column": 12}, "end_point": {"row": 357, "column": 20}}, {"id": 1279, "type": "field_identifier", "text": "", "parent": 1277, "children": [], "start_point": {"row": 357, "column": 23}, "end_point": {"row": 357, "column": 23}}, {"id": 1280, "type": "argument_list", "text": "()", "parent": 1276, "children": [], "start_point": {"row": 357, "column": 23}, "end_point": {"row": 357, "column": 25}}, {"id": 1281, "type": "return_statement", "text": "return get();", "parent": 21, "children": [1282], "start_point": {"row": 357, "column": 34}, "end_point": {"row": 357, "column": 47}}, {"id": 1282, "type": "call_expression", "text": "get()", "parent": 1281, "children": [1283, 1284], "start_point": {"row": 357, "column": 41}, "end_point": {"row": 357, "column": 46}}, {"id": 1283, "type": "identifier", "text": "get", "parent": 1282, "children": [], "start_point": {"row": 357, "column": 41}, "end_point": {"row": 357, "column": 44}}, {"id": 1284, "type": "argument_list", "text": "()", "parent": 1282, "children": [], "start_point": {"row": 357, "column": 44}, "end_point": {"row": 357, "column": 46}}, {"id": 1285, "type": "ERROR", "text": "} /* namespace gc */\n}", "parent": 0, "children": [], "start_point": {"row": 360, "column": 0}, "end_point": {"row": 361, "column": 1}}, {"id": 1286, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 363, "column": 0}, "end_point": {"row": 363, "column": 6}}]}, "node_categories": {"declarations": {"functions": [21, 24, 29, 98, 105, 107, 199, 201, 216, 229, 231, 279, 315, 317, 402, 404, 424, 426, 503, 505, 542, 544, 569, 599, 616, 674, 676, 719, 726, 746, 789, 791, 839, 841, 992, 1035, 1039, 1056, 1058, 1101, 1103, 1140, 1238, 1242, 1260], "variables": [27, 31, 36, 41, 93, 101, 103, 110, 117, 204, 208, 281, 284, 287, 292, 295, 300, 303, 407, 412, 429, 434, 451, 508, 547, 551, 560, 580, 601, 618, 620, 729, 768, 771, 794, 801, 844, 851, 854, 1143], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": [266, 267, 270, 271, 275]}, "statements": {"expressions": [48, 49, 57, 60, 61, 66, 67, 72, 73, 78, 120, 123, 126, 137, 138, 139, 148, 149, 150, 159, 160, 161, 168, 169, 182, 183, 219, 222, 224, 234, 237, 239, 245, 249, 250, 308, 309, 320, 323, 325, 328, 333, 334, 337, 343, 344, 352, 354, 355, 362, 366, 370, 374, 375, 380, 381, 385, 386, 393, 394, 398, 415, 419, 437, 440, 443, 456, 457, 466, 475, 482, 490, 493, 496, 499, 513, 517, 528, 530, 531, 539, 572, 575, 577, 587, 588, 595, 603, 607, 625, 626, 633, 636, 639, 642, 644, 652, 657, 662, 663, 670, 671, 679, 682, 684, 692, 693, 697, 700, 701, 702, 707, 716, 734, 748, 749, 758, 759, 777, 781, 786, 804, 807, 811, 812, 813, 814, 819, 820, 821, 822, 823, 824, 825, 834, 861, 862, 867, 869, 872, 875, 876, 881, 882, 883, 888, 889, 890, 896, 897, 898, 903, 904, 911, 912, 914, 915, 919, 920, 924, 925, 930, 947, 948, 952, 953, 954, 955, 956, 963, 985, 996, 997, 1002, 1003, 1010, 1013, 1016, 1019, 1021, 1025, 1026, 1027, 1033, 1042, 1045, 1047, 1051, 1052, 1062, 1063, 1064, 1065, 1070, 1072, 1073, 1077, 1078, 1083, 1084, 1086, 1087, 1091, 1092, 1096, 1097, 1106, 1109, 1111, 1114, 1115, 1119, 1122, 1123, 1156, 1160, 1161, 1197, 1198, 1203, 1204, 1223, 1226, 1227, 1232, 1233, 1235, 1246, 1247, 1248, 1249, 1258, 1269, 1273, 1276, 1277, 1282], "assignments": [130, 134, 145, 156, 172, 176, 186, 190, 194, 242, 253, 257, 261, 340, 349, 447, 462, 471, 479, 487, 521, 525, 535, 687], "loops": [1061], "conditionals": [0, 1, 2, 5, 22, 23, 25, 26, 28, 30, 32, 35, 37, 40, 42, 45, 47, 50, 52, 54, 58, 62, 68, 74, 79, 83, 86, 87, 90, 91, 92, 94, 95, 97, 99, 102, 104, 108, 111, 113, 116, 118, 119, 121, 125, 127, 129, 131, 135, 140, 141, 142, 144, 146, 151, 152, 153, 155, 157, 162, 163, 164, 166, 167, 171, 173, 175, 177, 181, 185, 187, 189, 191, 193, 195, 202, 205, 207, 211, 213, 217, 220, 225, 228, 232, 235, 240, 243, 246, 247, 248, 252, 254, 256, 258, 260, 262, 268, 272, 276, 280, 283, 286, 288, 291, 293, 294, 296, 297, 299, 301, 302, 305, 307, 310, 312, 314, 318, 321, 326, 329, 331, 332, 335, 338, 339, 341, 345, 346, 348, 350, 356, 357, 359, 363, 367, 371, 376, 382, 387, 390, 391, 392, 395, 399, 403, 405, 408, 411, 413, 414, 416, 418, 420, 422, 423, 427, 430, 433, 435, 436, 438, 442, 444, 446, 448, 452, 454, 458, 459, 463, 465, 467, 469, 472, 474, 476, 478, 480, 483, 485, 488, 491, 495, 497, 500, 502, 506, 509, 512, 514, 516, 518, 520, 522, 524, 526, 532, 533, 536, 538, 540, 545, 548, 550, 552, 553, 555, 558, 559, 562, 564, 566, 570, 573, 578, 581, 585, 589, 591, 602, 605, 606, 608, 609, 610, 613, 615, 619, 621, 623, 627, 629, 631, 634, 637, 640, 645, 648, 651, 653, 655, 658, 660, 664, 666, 672, 677, 680, 685, 688, 690, 691, 694, 696, 698, 703, 708, 710, 712, 714, 718, 721, 722, 725, 727, 730, 733, 735, 737, 738, 739, 740, 743, 745, 750, 752, 754, 756, 760, 764, 766, 769, 770, 772, 773, 775, 778, 780, 782, 784, 787, 792, 795, 797, 800, 802, 803, 805, 808, 810, 815, 816, 826, 827, 829, 830, 832, 835, 837, 838, 842, 845, 847, 850, 852, 853, 855, 859, 863, 864, 866, 871, 873, 877, 878, 880, 884, 886, 891, 892, 893, 895, 899, 900, 901, 905, 906, 908, 909, 910, 916, 917, 921, 922, 926, 927, 929, 931, 935, 938, 940, 943, 944, 945, 946, 949, 951, 957, 958, 960, 961, 964, 966, 967, 969, 972, 973, 976, 977, 979, 980, 982, 984, 986, 988, 989, 993, 998, 999, 1004, 1006, 1008, 1011, 1014, 1017, 1022, 1028, 1029, 1031, 1034, 1036, 1040, 1043, 1048, 1053, 1054, 1059, 1066, 1067, 1074, 1075, 1079, 1080, 1082, 1088, 1089, 1093, 1094, 1098, 1099, 1104, 1107, 1112, 1116, 1117, 1120, 1124, 1126, 1128, 1131, 1133, 1135, 1139, 1141, 1144, 1146, 1149, 1150, 1153, 1157, 1159, 1162, 1164, 1166, 1168, 1171, 1172, 1175, 1176, 1178, 1180, 1182, 1183, 1185, 1187, 1190, 1191, 1194, 1195, 1196, 1199, 1201, 1205, 1206, 1208, 1211, 1212, 1215, 1216, 1218, 1219, 1221, 1224, 1225, 1228, 1230, 1234, 1236, 1237, 1239, 1243, 1250, 1252, 1254, 1256, 1259, 1261, 1263, 1267, 1270, 1274, 1278, 1279, 1283, 1286], "returns": [227, 622, 661, 995, 1024, 1050, 1245, 1268, 1281], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 274, 278, 369, 373, 384], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "AutoAssertEmptyNursery;", "text_snippet": "namespace js {\nnamespace gc {\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n "}, {"node_id": 24, "universal_type": "function", "name": "AutoAssertEmptyNursery;", "text_snippet": "namespace gc {\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n Arena* unswep"}, {"node_id": 29, "universal_type": "function", "name": "ArenaIter", "text_snippet": "class ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::Deb"}, {"node_id": 98, "universal_type": "function", "name": "unknown", "text_snippet": "init(zone, kind)"}, {"node_id": 105, "universal_type": "function", "name": "init", "text_snippet": "void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zon"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "init(JS::Zone* zone, AllocKind kind)"}, {"node_id": 199, "universal_type": "function", "name": "done", "text_snippet": "bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() "}, {"node_id": 201, "universal_type": "function", "name": "unknown", "text_snippet": "done()"}, {"node_id": 216, "universal_type": "function", "name": "unknown", "text_snippet": "get() const"}, {"node_id": 229, "universal_type": "function", "name": "next", "text_snippet": "void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n "}, {"node_id": 231, "universal_type": "function", "name": "unknown", "text_snippet": "next()"}, {"node_id": 279, "universal_type": "function", "name": "ArenaCellIterImpl", "text_snippet": "class ArenaCellIterImpl\n{\n size_t firstThingOffset;\n size_t thingSize;\n Arena* arenaAddr;\n "}, {"node_id": 315, "universal_type": "function", "name": "moveForwardIfFree", "text_snippet": "void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: "}, {"node_id": 317, "universal_type": "function", "name": "unknown", "text_snippet": "moveForwardIfFree()"}, {"node_id": 402, "universal_type": "function", "name": "unknown", "text_snippet": "explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(fa"}, {"node_id": 404, "universal_type": "function", "name": "unknown", "text_snippet": "ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)"}, {"node_id": 424, "universal_type": "function", "name": "init", "text_snippet": "void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n "}, {"node_id": 426, "universal_type": "function", "name": "unknown", "text_snippet": "init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)"}, {"node_id": 503, "universal_type": "function", "name": "reset", "text_snippet": "void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arena"}, {"node_id": 505, "universal_type": "function", "name": "unknown", "text_snippet": "reset(Arena* arena)"}, {"node_id": 542, "universal_type": "function", "name": "done", "text_snippet": "bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n "}, {"node_id": 544, "universal_type": "function", "name": "unknown", "text_snippet": "done()"}, {"node_id": 569, "universal_type": "function", "name": "unknown", "text_snippet": "getCell() const"}, {"node_id": 599, "universal_type": "function", "name": "unknown", "text_snippet": "(arenaAddr)"}, {"node_id": 616, "universal_type": "function", "name": "unknown", "text_snippet": "(cell, traceKind)"}, {"node_id": 674, "universal_type": "function", "name": "next", "text_snippet": "void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize"}, {"node_id": 676, "universal_type": "function", "name": "unknown", "text_snippet": "next()"}, {"node_id": 719, "universal_type": "function", "name": "ArenaCellIter", "text_snippet": "class ArenaCellIter : public ArenaCellIterImpl\n{\n public:\n explicit ArenaCellIter(Arena* arena)\n"}, {"node_id": 726, "universal_type": "function", "name": "unknown", "text_snippet": "ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)"}, {"node_id": 746, "universal_type": "function", "name": "unknown", "text_snippet": "()"}, {"node_id": 789, "universal_type": "function", "name": "init", "text_snippet": "void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n "}, {"node_id": 791, "universal_type": "function", "name": "unknown", "text_snippet": "init(JS::Zone* zone, AllocKind kind)"}, {"node_id": 839, "universal_type": "function", "name": "initForTenuredIteration", "text_snippet": "void initForTenuredIteration(JS::Zone* zone, AllocKind kind) {\n JSRuntime* rt = zone->runtime"}, {"node_id": 841, "universal_type": "function", "name": "unknown", "text_snippet": "initForTenuredIteration(JS::Zone* zone, AllocKind kind)"}, {"node_id": 992, "universal_type": "function", "name": "unknown", "text_snippet": "done()"}, {"node_id": 1035, "universal_type": "function", "name": "unknown", "text_snippet": "TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }"}, {"node_id": 1039, "universal_type": "function", "name": "unknown", "text_snippet": "getCell() const"}, {"node_id": 1056, "universal_type": "function", "name": "settle", "text_snippet": "void settle() {\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();"}, {"node_id": 1058, "universal_type": "function", "name": "unknown", "text_snippet": "settle()"}, {"node_id": 1101, "universal_type": "function", "name": "next", "text_snippet": "void next() {\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }"}, {"node_id": 1103, "universal_type": "function", "name": "unknown", "text_snippet": "next()"}, {"node_id": 1140, "universal_type": "function", "name": "unknown", "text_snippet": "ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKin"}, {"node_id": 1238, "universal_type": "function", "name": "unknown", "text_snippet": "GCType* get() const { return ZoneCellIter<TenuredCell>::get<GCType>(); }"}, {"node_id": 1242, "universal_type": "function", "name": "unknown", "text_snippet": "get() const"}, {"node_id": 1260, "universal_type": "function", "name": "unknown", "text_snippet": "operator GCType*() const { return get(); }"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"gc/GC.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"mozilla/DebugOnly.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"mozilla/Maybe.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"gc/Zone.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"gc/ArenaList-inl.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-\n* vim: set ts=8 sts=4 et sw=4 tw=99:\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n#ifndef gc_GC_inl_h\n#define gc_GC_inl_h\n\n#include \"gc/GC.h\"\n\n#include \"mozilla/DebugOnly.h\"\n#include \"mozilla/Maybe.h\"\n\n#include \"gc/Zone.h\"\n\n#include \"gc/ArenaList-inl.h\"\n\nnamespace js {\nnamespace gc {\n\nclass AutoAssertEmptyNursery;\n\nclass ArenaIter\n{\n Arena* arena;\n Arena* unsweptArena;\n Arena* sweptArena;\n mozilla::DebugOnly<bool> initialized;\n\n public:\n ArenaIter()\n : arena(nullptr), unsweptArena(nullptr), sweptArena(nullptr), initialized(false) {}\n\n ArenaIter(JS::Zone* zone, AllocKind kind) : initialized(false) { init(zone, kind); }\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(zone);\n initialized = true;\n arena = zone->arenas.getFirstArena(kind);\n unsweptArena = zone->arenas.getFirstArenaToSweep(kind);\n sweptArena = zone->arenas.getFirstSweptArena(kind);\n if (!unsweptArena) {\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n return !arena;\n }\n\n Arena* get() const {\n MOZ_ASSERT(!done());\n return arena;\n }\n\n void next() {\n MOZ_ASSERT(!done());\n arena = arena->next;\n if (!arena) {\n arena = unsweptArena;\n unsweptArena = sweptArena;\n sweptArena = nullptr;\n }\n }\n};\n\nenum CellIterNeedsBarrier : uint8_t\n{\n CellIterDoesntNeedBarrier = 0,\n CellIterMayNeedBarrier = 1\n};\n\nclass ArenaCellIterImpl\n{\n size_t firstThingOffset;\n size_t thingSize;\n Arena* arenaAddr;\n FreeSpan span;\n uint_fast16_t thing;\n JS::TraceKind traceKind;\n bool needsBarrier;\n mozilla::DebugOnly<bool> initialized;\n\n // Upon entry, |thing| points to any thing (free or used) and finds the\n // first used thing, which may be |thing|.\n void moveForwardIfFree() {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(thing);\n // Note: if |span| is empty, this test will fail, which is what we want\n // -- |span| being empty means that we're past the end of the last free\n // thing, all the remaining things in the arena are used, and we'll\n // never need to move forward.\n if (thing == span.first) {\n thing = span.last + thingSize;\n span = *span.nextSpan(arenaAddr);\n }\n }\n\n public:\n ArenaCellIterImpl()\n : firstThingOffset(0),\n thingSize(0),\n arenaAddr(nullptr),\n thing(0),\n traceKind(JS::TraceKind::Null),\n needsBarrier(false),\n initialized(false)\n {}\n\n explicit ArenaCellIterImpl(Arena* arena, CellIterNeedsBarrier mayNeedBarrier)\n : initialized(false)\n {\n init(arena, mayNeedBarrier);\n }\n\n void init(Arena* arena, CellIterNeedsBarrier mayNeedBarrier) {\n MOZ_ASSERT(!initialized);\n MOZ_ASSERT(arena);\n initialized = true;\n AllocKind kind = arena->getAllocKind();\n firstThingOffset = Arena::firstThingOffset(kind);\n thingSize = Arena::thingSize(kind);\n traceKind = MapAllocToTraceKind(kind);\n needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting();\n reset(arena);\n }\n\n // Use this to move from an Arena of a particular kind to another Arena of\n // the same kind.\n void reset(Arena* arena) {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(arena);\n arenaAddr = arena;\n span = *arena->getFirstFreeSpan();\n thing = firstThingOffset;\n moveForwardIfFree();\n }\n\n bool done() const {\n MOZ_ASSERT(initialized);\n MOZ_ASSERT(thing <= ArenaSize);\n return thing == ArenaSize;\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n TenuredCell* cell = reinterpret_cast<TenuredCell*>(uintptr_t(arenaAddr) + thing);\n\n // This can result in a a new reference being created to an object that\n // an ongoing incremental GC may find to be unreachable, so we may need\n // a barrier here.\n if (needsBarrier) {\n ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));\n }\n\n return cell;\n }\n\n template<typename T> T* get() const {\n MOZ_ASSERT(!done());\n MOZ_ASSERT(JS::MapTypeToTraceKind<T>::kind == traceKind);\n return reinterpret_cast<T*>(getCell());\n }\n\n void next() {\n MOZ_ASSERT(!done());\n thing += thingSize;\n if (thing < ArenaSize) {\n moveForwardIfFree();\n }\n }\n};\n\ntemplate<>\nJSObject*\nArenaCellIterImpl::get<JSObject>() const;\n\nclass ArenaCellIter : public ArenaCellIterImpl\n{\n public:\n explicit ArenaCellIter(Arena* arena)\n : ArenaCellIterImpl(arena, CellIterMayNeedBarrier)\n {\n MOZ_ASSERT(JS::RuntimeHeapIsTracing());\n }\n};\n\ntemplate <typename T>\nclass ZoneCellIter;\n\ntemplate <>\nclass ZoneCellIter<TenuredCell> {\n ArenaIter arenaIter;\n ArenaCellIterImpl cellIter;\n mozilla::Maybe<JS::AutoAssertNoGC> nogc;\n\n protected:\n // For use when a subclass wants to insert some setup before init().\n ZoneCellIter() {}\n\n void init(JS::Zone* zone, AllocKind kind) {\n MOZ_ASSERT_IF(IsNurseryAllocable(kind),\n (zone->isAtomsZone() ||\n zone->runtimeFromMainThread()->gc.nursery().isEmpty()));\n initForTenuredIteration(zone, kind);\n }\n\n void initForTenuredIteration(JS::Zone* zone, AllocKind kind) {\n JSRuntime* rt = zone->runtimeFromAnyThread();\n\n // If called from outside a GC, ensure that the heap is in a state\n // that allows us to iterate.\n if (!JS::RuntimeHeapIsBusy()) {\n // Assert that no GCs can occur while a ZoneCellIter is live.\n nogc.emplace();\n }\n\n // We have a single-threaded runtime, so there's no need to protect\n // against other threads iterating or allocating. However, we do have\n // background finalization; we may have to wait for this to finish if\n // it's currently active.\n if (IsBackgroundFinalized(kind) && zone->arenas.needBackgroundFinalizeWait(kind)) {\n rt->gc.waitBackgroundSweepEnd();\n }\n arenaIter.init(zone, kind);\n if (!arenaIter.done()) {\n cellIter.init(arenaIter.get(), CellIterMayNeedBarrier);\n settle();\n }\n }\n\n public:\n ZoneCellIter(JS::Zone* zone, AllocKind kind) {\n // If we are iterating a nursery-allocated kind then we need to\n // evict first so that we can see all things.\n if (IsNurseryAllocable(kind)) {\n zone->runtimeFromMainThread()->gc.evictNursery();\n }\n\n init(zone, kind);\n }\n\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery&) {\n // No need to evict the nursery. (This constructor is known statically\n // to not GC.)\n init(zone, kind);\n }\n\n bool done() const {\n return arenaIter.done();\n }\n\n template<typename T>\n T* get() const {\n MOZ_ASSERT(!done());\n return cellIter.get<T>();\n }\n\n TenuredCell* getCell() const {\n MOZ_ASSERT(!done());\n return cellIter.getCell();\n }\n\n void settle() {\n while (cellIter.done() && !arenaIter.done()) {\n arenaIter.next();\n if (!arenaIter.done()) {\n cellIter.reset(arenaIter.get());\n }\n }\n }\n\n void next() {\n MOZ_ASSERT(!done());\n cellIter.next();\n settle();\n }\n};\n\n// Iterator over the cells in a Zone, where the GC type (JSString, JSObject) is\n// known, for a single AllocKind. Example usages:\n//\n// for (auto obj = zone->cellIter<JSObject>(AllocKind::OBJECT0); !obj.done(); obj.next()) {\n// ...\n// }\n//\n// for (auto script = zone->cellIter<JSScript>(); !script.done(); script.next()) {\n// f(script->code());\n// }\n//\n// As this code demonstrates, you can use 'script' as if it were a JSScript*.\n// Its actual type is ZoneCellIter<JSScript>, but for most purposes it will\n// autoconvert to JSScript*.\n//\n// Note that in the JSScript case, ZoneCellIter is able to infer the AllocKind\n// from the type 'JSScript', whereas in the JSObject case, the kind must be\n// given (because there are multiple AllocKinds for objects).\n//\n// Also, the static rooting hazard analysis knows that the JSScript case will\n// not GC during construction. The JSObject case needs to GC, or more precisely\n// to empty the nursery and clear out the store buffer, so that it can see all\n// objects to iterate over (the nursery is not iterable) and remove the\n// possibility of having pointers from the store buffer to data hanging off\n// stuff we're iterating over that we are going to delete. (The latter should\n// not be a problem, since such instances should be using RelocatablePtr do\n// remove themselves from the store buffer on deletion, but currently for\n// subtle reasons that isn't good enough.)\n//\n// If the iterator is used within a GC, then there is no need to evict the\n// nursery (again). You may select a variant that will skip the eviction either\n// by specializing on a GCType that is never allocated in the nursery, or\n// explicitly by passing in a trailing AutoAssertEmptyNursery argument.\n//\ntemplate <typename GCType>\nclass ZoneCellIter : public ZoneCellIter<TenuredCell> {\n public:\n // Non-nursery allocated (equivalent to having an entry in\n // MapTypeToFinalizeKind). The template declaration here is to discard this\n // constructor overload if MapTypeToFinalizeKind<GCType>::kind does not\n // exist. Note that there will be no remaining overloads that will work,\n // which makes sense given that you haven't specified which of the\n // AllocKinds to use for GCType.\n //\n // If we later add a nursery allocable GCType with a single AllocKind, we\n // will want to add an overload of this constructor that does the right\n // thing (ie, it empties the nursery before iterating.)\n explicit ZoneCellIter(JS::Zone* zone) : ZoneCellIter<TenuredCell>() {\n init(zone, MapTypeToFinalizeKind<GCType>::kind);\n }\n\n // Non-nursery allocated, nursery is known to be empty: same behavior as above.\n ZoneCellIter(JS::Zone* zone, const js::gc::AutoAssertEmptyNursery&) : ZoneCellIter(zone) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable (and\n // therefore the nursery will be emptied before iterating.)\n ZoneCellIter(JS::Zone* zone, AllocKind kind) : ZoneCellIter<TenuredCell>(zone, kind) {\n }\n\n // Arbitrary kind, which will be assumed to be nursery allocable, but the\n // nursery is known to be empty already: same behavior as non-nursery types.\n ZoneCellIter(JS::Zone* zone, AllocKind kind, const js::gc::AutoAssertEmptyNursery& empty)\n : ZoneCellIter<TenuredCell>(zone, kind, empty)\n {\n }\n\n GCType* get() const { return ZoneCellIter<TenuredCell>::get<GCType>(); }\n operator GCType*() const { return get(); }\n GCType* operator ->() const { return get(); }\n};\n\n} /* namespace gc */\n} /* namespace js */\n\n#endif /* gc_GC_inl_h */\n"}
398
c
#include "sof_config.h"
23
1
(translation_unit) "#include "sof_config.h"\n" (preproc_include) "#include "sof_config.h"\n" (#include) "#include" (string_literal) ""sof_config.h"" (") """ (string_content) "sof_config.h" (") """
7
0
{"language": "c", "success": true, "metadata": {"lines": 1, "avg_line_length": 23.0, "nodes": 3, "errors": 0, "source_hash": "dbf04ceea2ff79ca012a7f3f3d46873b83745de7b78af1e1e913dfcd80d52ccb", "categorized_nodes": 3}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"sof_config.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": "\"sof_config.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 23}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"sof_config.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include \"sof_config.h\"\n"}
399